[Make-wifi-fast] [PATCH v2] mac80211: Move crypto IV generation to after TXQ dequeue.
Johannes Berg
johannes at sipsolutions.net
Wed Aug 17 15:49:08 EDT 2016
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
More information about the Make-wifi-fast
mailing list