Hi, You need to work on coding style, a lot of your indentation is completely messed up. > + switch (sdata->vif.type) { > + case NL80211_IFTYPE_STATION: > + if (sdata->u.mgd.use_4addr) { > + pn_offs = 30; > + break; > + } > + pn_offs = 24; > + break; > + case NL80211_IFTYPE_AP_VLAN: > + if (sdata->wdev.use_4addr) { > + pn_offs = 30; > + break; > + } > + /* fall through */ > + case NL80211_IFTYPE_ADHOC: > + case NL80211_IFTYPE_AP: > + pn_offs = 24; > + break; > + default: > + return; > + } > + > + if (sta->sta.wme) { > + pn_offs += 2; > + } I think you just reinvented ieee80211_hdrlen(). No? > - if (fast_tx->pn_offs) { > - u64 pn; > - u8 *crypto_hdr = skb->data + fast_tx->pn_offs; No need to undo the pn_offs optimisation for the !txq case, you can pass it in to the new function that will fill it. However, you're still doing it wrong - now you haven't fixed anything for TKIP, which won't hit the fastpath. johannes