aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/iface.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index b4ac596a7cb7..bab5c63c0bad 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -819,13 +819,15 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
819 * (because if we remove a STA after ops->remove_interface() 819 * (because if we remove a STA after ops->remove_interface()
820 * the driver will have removed the vif info already!) 820 * the driver will have removed the vif info already!)
821 * 821 *
822 * This is relevant only in WDS mode, in all other modes we've 822 * In WDS mode a station must exist here and be flushed, for
823 * already removed all stations when disconnecting or similar, 823 * AP_VLANs stations may exist since there's nothing else that
824 * so warn otherwise. 824 * would have removed them, but in other modes there shouldn't
825 * be any stations.
825 */ 826 */
826 flushed = sta_info_flush(sdata); 827 flushed = sta_info_flush(sdata);
827 WARN_ON_ONCE((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) || 828 WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
828 (sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1)); 829 ((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) ||
830 (sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1)));
829 831
830 /* don't count this interface for promisc/allmulti while it is down */ 832 /* don't count this interface for promisc/allmulti while it is down */
831 if (sdata->flags & IEEE80211_SDATA_ALLMULTI) 833 if (sdata->flags & IEEE80211_SDATA_ALLMULTI)