aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/iface.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index af237223a8cd..3b9e2b7b3f30 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -898,6 +898,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
898 list_del(&sdata->u.vlan.list); 898 list_del(&sdata->u.vlan.list);
899 mutex_unlock(&local->mtx); 899 mutex_unlock(&local->mtx);
900 RCU_INIT_POINTER(sdata->vif.chanctx_conf, NULL); 900 RCU_INIT_POINTER(sdata->vif.chanctx_conf, NULL);
901 /* see comment in the default case below */
902 ieee80211_free_keys(sdata, true);
901 /* no need to tell driver */ 903 /* no need to tell driver */
902 break; 904 break;
903 case NL80211_IFTYPE_MONITOR: 905 case NL80211_IFTYPE_MONITOR:
@@ -923,17 +925,16 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
923 /* 925 /*
924 * When we get here, the interface is marked down. 926 * When we get here, the interface is marked down.
925 * Free the remaining keys, if there are any 927 * Free the remaining keys, if there are any
926 * (shouldn't be, except maybe in WDS mode?) 928 * (which can happen in AP mode if userspace sets
929 * keys before the interface is operating, and maybe
930 * also in WDS mode)
927 * 931 *
928 * Force the key freeing to always synchronize_net() 932 * Force the key freeing to always synchronize_net()
929 * to wait for the RX path in case it is using this 933 * to wait for the RX path in case it is using this
930 * interface enqueuing frames * at this very time on 934 * interface enqueuing frames at this very time on
931 * another CPU. 935 * another CPU.
932 */ 936 */
933 ieee80211_free_keys(sdata, true); 937 ieee80211_free_keys(sdata, true);
934
935 /* fall through */
936 case NL80211_IFTYPE_AP:
937 skb_queue_purge(&sdata->skb_queue); 938 skb_queue_purge(&sdata->skb_queue);
938 } 939 }
939 940