Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
[firefly-linux-kernel-4.4.55.git] / net / mac80211 / tx.c
index 64e0f7587e6d6f09e11a8029ef7a995e406ff60d..3104c844b544c5465ef5ba1e7efcff05ca920501 100644 (file)
@@ -1480,7 +1480,12 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
 {
        int tail_need = 0;
 
-       if (may_encrypt && local->crypto_tx_tailroom_needed_cnt) {
+       /*
+        * This could be optimised, devices that do full hardware
+        * crypto (including TKIP MMIC) need no tailroom... But we
+        * have no drivers for such devices currently.
+        */
+       if (may_encrypt) {
                tail_need = IEEE80211_ENCRYPT_TAILROOM;
                tail_need -= skb_tailroom(skb);
                tail_need = max_t(int, tail_need, 0);