KVM: hyperv: Fix Direct Synthetic timers assert an interrupt w/o lapic_in_kernel
[linux-2.6-microblaze.git] / net / mac80211 / wpa.c
index ee72779..91bf32a 100644 (file)
@@ -946,7 +946,8 @@ ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx)
 
        info = IEEE80211_SKB_CB(skb);
 
-       if (info->control.hw_key)
+       if (info->control.hw_key &&
+           !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIE))
                return TX_CONTINUE;
 
        if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
@@ -962,6 +963,9 @@ ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx)
 
        bip_ipn_set64(mmie->sequence_number, pn64);
 
+       if (info->control.hw_key)
+               return TX_CONTINUE;
+
        bip_aad(skb, aad);
 
        /*