diff --git a/chromeos/compat-wireless/net/mac80211/ieee80211_i.h b/chromeos/compat-wireless/net/mac80211/ieee80211_i.h index 0663893..abcc6fe 100644 --- a/chromeos/compat-wireless/net/mac80211/ieee80211_i.h +++ b/chromeos/compat-wireless/net/mac80211/ieee80211_i.h @@ -996,6 +996,16 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) is_broadcast_ether_addr(raddr); } +int __ieee80211_hw_config(struct ieee80211_local *local, + u32 changed, bool nocheck); + +static inline int ieee80211_hw_config(struct ieee80211_local *local, + u32 changed) +{ + return __ieee80211_hw_config(local, changed, false); +} + + int ieee80211_hw_config(struct ieee80211_local *local, u32 changed); void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); diff --git a/chromeos/compat-wireless/net/mac80211/iface.c b/chromeos/compat-wireless/net/mac80211/iface.c index 956ef9b..278942e 100644 --- a/chromeos/compat-wireless/net/mac80211/iface.c +++ b/chromeos/compat-wireless/net/mac80211/iface.c @@ -523,18 +523,14 @@ static int ieee80211_stop(struct net_device *dev) ieee80211_recalc_ps(local, -1); + printk(KERN_DEBUG "mac80211: %s: hw config %s\n", __func__, hw_reconf_flags); + __ieee80211_hw_config(local, hw_reconf_flags, true); + if (local->open_count == 0) { ieee80211_clear_tx_pending(local); ieee80211_stop_device(local); - - /* no reconfiguring after stop! */ - hw_reconf_flags = 0; } - /* do after stop to avoid reconfiguring when we stop anyway */ - if (hw_reconf_flags) - ieee80211_hw_config(local, hw_reconf_flags); - spin_lock_irqsave(&local->queue_stop_reason_lock, flags); for (i = 0; i < IEEE80211_MAX_QUEUES; i++) { skb_queue_walk_safe(&local->pending[i], skb, tmp) { diff --git a/chromeos/compat-wireless/net/mac80211/main.c b/chromeos/compat-wireless/net/mac80211/main.c index b7f84db..3974e88 100644 --- a/chromeos/compat-wireless/net/mac80211/main.c +++ b/chromeos/compat-wireless/net/mac80211/main.c @@ -97,7 +97,7 @@ static void ieee80211_reconfig_filter(struct work_struct *work) ieee80211_configure_filter(local); } -int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) +int __ieee80211_hw_config(struct ieee80211_local *local, u32 changed, bool nocheck) { struct ieee80211_channel *chan, *scan_chan; int ret = 0; @@ -109,6 +109,8 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) scan_chan = local->scan_channel; + printk(KERN_DEBUG "mac80211: %s: %d %d\n", __func__, changed, nocheck); + offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; if (scan_chan) { chan = scan_chan; @@ -160,7 +162,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) local->hw.conf.power_level = power; } - if (changed && local->open_count) { + if (changed && (nocheck || local->open_count)) { ret = drv_config(local, changed); /* * Goal: