Commit 2cf22b89 authored by Ben Greear's avatar Ben Greear Committed by John W. Linville

mac80211: Recalculate channel-type on iface removal.

When a vif goes away, it could cause the super-chan
to be recalculated differently, so do that calculation
on iface removal.
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4e6975f7
...@@ -382,6 +382,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, ...@@ -382,6 +382,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, *tmp; struct sk_buff *skb, *tmp;
u32 hw_reconf_flags = 0; u32 hw_reconf_flags = 0;
int i; int i;
enum nl80211_channel_type orig_ct;
if (local->scan_sdata == sdata) if (local->scan_sdata == sdata)
ieee80211_scan_cancel(local); ieee80211_scan_cancel(local);
...@@ -542,8 +543,14 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, ...@@ -542,8 +543,14 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
hw_reconf_flags = 0; hw_reconf_flags = 0;
} }
/* Re-calculate channel-type, in case there are multiple vifs
* on different channel types.
*/
orig_ct = local->_oper_channel_type;
ieee80211_set_channel_type(local, NULL, NL80211_CHAN_NO_HT);
/* do after stop to avoid reconfiguring when we stop anyway */ /* do after stop to avoid reconfiguring when we stop anyway */
if (hw_reconf_flags) if (hw_reconf_flags || (orig_ct != local->_oper_channel_type))
ieee80211_hw_config(local, hw_reconf_flags); ieee80211_hw_config(local, hw_reconf_flags);
spin_lock_irqsave(&local->queue_stop_reason_lock, flags); spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment