From: Ben Greear Date: Tue, 23 Oct 2018 20:36:52 +0000 (-0700) Subject: mac80211: Clear beacon_int in ieee80211_do_stop X-Git-Tag: v3.18.129~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=302846379cba7766bf4c1bcf0cebd3aa52004fc5;p=thirdparty%2Fkernel%2Fstable.git mac80211: Clear beacon_int in ieee80211_do_stop commit 5c21e8100dfd57c806e833ae905e26efbb87840f upstream. This fixes stale beacon-int values that would keep a netdev from going up. To reproduce: Create two VAP on one radio. vap1 has beacon-int 100, start it. vap2 has beacon-int 240, start it (and it will fail because beacon-int mismatch). reconfigure vap2 to have beacon-int 100 and start it. It will fail because the stale beacon-int 240 will be used in the ifup path and hostapd never gets a chance to set the new beacon interval. Cc: stable@vger.kernel.org Signed-off-by: Ben Greear Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 672e28918a44d..f4ce34670fa83 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -958,6 +958,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, if (local->open_count == 0) ieee80211_clear_tx_pending(local); + sdata->vif.bss_conf.beacon_int = 0; + /* * If the interface goes down while suspended, presumably because * the device was unplugged and that happens before our resume,