X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/70d07962470a238e6abee8416b2a21e25dc641ee..071f766b1ddbdd19a8c97ed2773e892c039a35d1:/package/madwifi/patches/342-performance.patch?ds=sidebyside diff --git a/package/madwifi/patches/342-performance.patch b/package/madwifi/patches/342-performance.patch index 2252c972c..88cec182d 100644 --- a/package/madwifi/patches/342-performance.patch +++ b/package/madwifi/patches/342-performance.patch @@ -1,8 +1,6 @@ -Index: madwifi-trunk-r3314/ath/if_ath.c -=================================================================== ---- madwifi-trunk-r3314.orig/ath/if_ath.c -+++ madwifi-trunk-r3314/ath/if_ath.c -@@ -3237,7 +3237,6 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -3239,7 +3239,6 @@ ath_hardstart(struct sk_buff *skb, struc struct ath_softc *sc = dev->priv; struct ieee80211_node *ni = NULL; struct ath_buf *bf = NULL; @@ -10,7 +8,7 @@ Index: madwifi-trunk-r3314/ath/if_ath.c ath_bufhead bf_head; struct ath_buf *tbf, *tempbf; struct sk_buff *tskb; -@@ -3249,6 +3248,7 @@ +@@ -3251,6 +3250,7 @@ ath_hardstart(struct sk_buff *skb, struc */ int requeue = 0; #ifdef ATH_SUPERG_FF @@ -18,7 +16,7 @@ Index: madwifi-trunk-r3314/ath/if_ath.c unsigned int pktlen; struct ieee80211com *ic = &sc->sc_ic; struct ath_node *an; -@@ -3314,27 +3314,9 @@ +@@ -3316,27 +3316,9 @@ ath_hardstart(struct sk_buff *skb, struc requeue = 1; goto hardstart_fail; } @@ -46,11 +44,9 @@ Index: madwifi-trunk-r3314/ath/if_ath.c /* NB: use this lock to protect an->an_tx_ffbuf (and txq->axq_stageq) * in athff_can_aggregate() call too. */ ATH_TXQ_LOCK_IRQ(txq); -Index: madwifi-trunk-r3314/net80211/ieee80211_output.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_output.c -+++ madwifi-trunk-r3314/net80211/ieee80211_output.c -@@ -283,7 +283,7 @@ +--- a/net80211/ieee80211_output.c ++++ b/net80211/ieee80211_output.c +@@ -283,7 +283,7 @@ ieee80211_hardstart(struct sk_buff *skb, * normal vap. */ if (vap->iv_xrvap && (ni == vap->iv_bss) && vap->iv_xrvap->iv_sta_assoc) { @@ -59,7 +55,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c if (skb1) { memset(SKB_CB(skb1), 0, sizeof(struct ieee80211_cb)); #ifdef IEEE80211_DEBUG_REFCNT -@@ -566,7 +566,7 @@ +@@ -566,7 +566,7 @@ ieee80211_skbhdr_adjust(struct ieee80211 struct ieee80211_key *key, struct sk_buff *skb, int ismulticast) { /* XXX pre-calculate per node? */ @@ -68,7 +64,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c int need_tailroom = 0; #ifdef ATH_SUPERG_FF int isff = ATH_FF_MAGIC_PRESENT(skb); -@@ -608,109 +608,56 @@ +@@ -608,109 +608,56 @@ ieee80211_skbhdr_adjust(struct ieee80211 need_tailroom += cip->ic_miclen; } @@ -77,6 +73,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c - ieee80211_ref_node(SKB_CB(skb)->ni); - /* Unshare the node, decrementing users in the old skb */ - skb = skb_unshare(skb, GFP_ATOMIC); +- } + need_headroom -= skb_headroom(skb); + if (isff) + need_tailroom -= skb_tailroom(skb2); @@ -87,42 +84,32 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c + need_headroom = 0; + if (need_tailroom < 0) + need_tailroom = 0; -+ -+ if (skb_cloned(skb) || (need_headroom > 0) || -+ (!isff && (need_tailroom > 0))) { -+ -+ if (pskb_expand_head(skb, need_headroom, need_tailroom, GFP_ATOMIC)) { -+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, -+ "%s: cannot expand storage (tail)\n", __func__); -+ goto error; -+ } - } - #ifdef ATH_SUPERG_FF - if (isff) { +-#ifdef ATH_SUPERG_FF +- if (isff) { - if (skb == NULL) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, - "%s: cannot unshare for encapsulation\n", - __func__); - vap->iv_stats.is_tx_nobuf++; - ieee80211_dev_kfree_skb(&skb2); -- ++ if (skb_cloned(skb) || (need_headroom > 0) || ++ (!isff && (need_tailroom > 0))) { + - return NULL; -- } -+ inter_headroom -= skb_headroom(skb2); -+ if (inter_headroom < 0) -+ inter_headroom = 0; -+ if ((skb_cloned(skb2) || -+ (inter_headroom > 0) || (need_tailroom > 0))) { ++ if (pskb_expand_head(skb, need_headroom, need_tailroom, GFP_ATOMIC)) { ++ IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, ++ "%s: cannot expand storage (tail)\n", __func__); ++ goto error; + } ++ } - /* first skb header */ - if (skb_headroom(skb) < need_headroom) { - struct sk_buff *tmp = skb; - skb = skb_realloc_headroom(skb, need_headroom); - if (skb == NULL) { -+ if (pskb_expand_head(skb2, inter_headroom, -+ need_tailroom, GFP_ATOMIC)) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, +- IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, - "%s: cannot expand storage (head1)\n", - __func__); - vap->iv_stats.is_tx_nobuf++; @@ -134,7 +121,14 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c - /* NB: cb[] area was copied, but not next ptr. must do that - * prior to return on success. */ - } -- ++#ifdef ATH_SUPERG_FF ++ if (isff) { ++ inter_headroom -= skb_headroom(skb2); ++ if (inter_headroom < 0) ++ inter_headroom = 0; ++ if ((skb_cloned(skb2) || ++ (inter_headroom > 0) || (need_tailroom > 0))) { + - /* second skb with header and tail adjustments possible */ - if (skb_tailroom(skb2) < need_tailroom) { - int n = 0; @@ -143,7 +137,9 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c - if (pskb_expand_head(skb2, n, - need_tailroom - skb_tailroom(skb2), GFP_ATOMIC)) { - ieee80211_dev_kfree_skb(&skb2); -- IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, ++ if (pskb_expand_head(skb2, inter_headroom, ++ need_tailroom, GFP_ATOMIC)) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT, - "%s: cannot expand storage (tail2)\n", - __func__); - vap->iv_stats.is_tx_nobuf++; @@ -167,10 +163,10 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c - } else - ieee80211_skb_copy_noderef(tmp, skb); - ieee80211_dev_kfree_skb(&tmp); - } +- } - if (skb) { - skb->next = skb2; -- } + } - return skb; + skb->next = skb2; } @@ -216,11 +212,9 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_output.c } #define KEY_UNDEFINED(k) ((k).wk_cipher == &ieee80211_cipher_none) -Index: madwifi-trunk-r3314/net80211/ieee80211_input.c -=================================================================== ---- madwifi-trunk-r3314.orig/net80211/ieee80211_input.c -+++ madwifi-trunk-r3314/net80211/ieee80211_input.c -@@ -204,7 +204,6 @@ +--- a/net80211/ieee80211_input.c ++++ b/net80211/ieee80211_input.c +@@ -204,7 +204,6 @@ ieee80211_input(struct ieee80211vap * va struct ieee80211_frame *wh; struct ieee80211_key *key; struct ether_header *eh; @@ -228,7 +222,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_input.c #ifdef ATH_SUPERG_FF struct llc *llc; #endif -@@ -244,20 +243,6 @@ +@@ -244,20 +243,6 @@ ieee80211_input(struct ieee80211vap * va vap->iv_stats.is_rx_tooshort++; goto out; } @@ -249,7 +243,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_input.c /* * Bit of a cheat here, we use a pointer for a 3-address -@@ -738,7 +723,7 @@ +@@ -738,7 +723,7 @@ ieee80211_input(struct ieee80211vap * va /* ether_type must be length as FF frames are always LLC/SNAP encap'd */ frame_len = ntohs(eh_tmp->ether_type); @@ -258,7 +252,7 @@ Index: madwifi-trunk-r3314/net80211/ieee80211_input.c if (skb1 == NULL) goto err; ieee80211_skb_copy_noderef(skb, skb1); -@@ -1137,7 +1122,7 @@ +@@ -1137,7 +1122,7 @@ ieee80211_deliver_data(struct ieee80211_ if (ETHER_IS_MULTICAST(eh->ether_dhost) && !netif_queue_stopped(dev)) { /* Create a SKB for the BSS to send out. */