aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r--net/mac80211/ieee80211.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 5d5034f36fde..73e314e33de2 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -442,6 +442,7 @@ static int ieee80211_open(struct net_device *dev)
442 } else { 442 } else {
443 ieee80211_if_config(dev); 443 ieee80211_if_config(dev);
444 ieee80211_reset_erp_info(dev); 444 ieee80211_reset_erp_info(dev);
445 ieee80211_enable_keys(sdata);
445 } 446 }
446 447
447 if (sdata->type == IEEE80211_IF_TYPE_STA && 448 if (sdata->type == IEEE80211_IF_TYPE_STA &&
@@ -510,6 +511,9 @@ static int ieee80211_stop(struct net_device *dev)
510 local->monitors--; 511 local->monitors--;
511 if (!local->monitors) 512 if (!local->monitors)
512 local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP; 513 local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP;
514 } else {
515 /* disable all keys for as long as this netdev is down */
516 ieee80211_disable_keys(sdata);
513 } 517 }
514 518
515 local->open_count--; 519 local->open_count--;
@@ -908,7 +912,7 @@ static void ieee80211_remove_tx_extra(struct ieee80211_local *local,
908 } 912 }
909 913
910 if (skb->len >= mic_len && 914 if (skb->len >= mic_len &&
911 (key->conf.flags & IEEE80211_KEY_FORCE_SW_ENCRYPT)) 915 !(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE))
912 skb_trim(skb, skb->len - mic_len); 916 skb_trim(skb, skb->len - mic_len);
913 if (skb->len >= iv_len && skb->len > hdrlen) { 917 if (skb->len >= iv_len && skb->len > hdrlen) {
914 memmove(skb->data + iv_len, skb->data, hdrlen); 918 memmove(skb->data + iv_len, skb->data, hdrlen);