Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: prevent tuning during scanning
@ 2008-03-19 23:43 Reinette Chatre
  2008-03-20  0:06 ` Johannes Berg
  2008-03-20  0:13 ` Johannes Berg
  0 siblings, 2 replies; 6+ messages in thread
From: Reinette Chatre @ 2008-03-19 23:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Mohamed Abbas, Reinette Chatre

From: Mohamed Abbas <mohamed.abbas@intel.com>

Postpone calling ieee80211_hw_config if hardware scanning is active.
This is similar to solution for software scanning where channel setting
is delayed until scan complete.

Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 net/mac80211/ieee80211_ioctl.c |    2 +-
 net/mac80211/ieee80211_sta.c   |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 1d91575..83b79c9 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -308,7 +308,7 @@ int ieee80211_set_freq(struct ieee80211_local *local, int freqMHz)
 	}
 
 	if (set) {
-		if (local->sta_sw_scanning)
+		if (local->sta_sw_scanning || local->sta_hw_scanning)
 			ret = 0;
 		else
 			ret = ieee80211_hw_config(local);
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 4255ec4..1e9650e 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -3609,6 +3609,9 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
 
 	if (local->sta_hw_scanning) {
 		local->sta_hw_scanning = 0;
+		if (ieee80211_hw_config(local))
+			printk(KERN_DEBUG "%s: failed to restore operational "
+			       "channel after scan\n", dev->name);
 		/* Restart STA timer for HW scan case */
 		rcu_read_lock();
 		list_for_each_entry_rcu(sdata, &local->interfaces, list)
-- 
1.5.3.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-03-20 15:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 23:43 [PATCH] iwlwifi: prevent tuning during scanning Reinette Chatre
2008-03-20  0:06 ` Johannes Berg
2008-03-20  3:46   ` Abbas, Mohamed
2008-03-20 10:11     ` Johannes Berg
2008-03-20 15:15   ` Chatre, Reinette
2008-03-20  0:13 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox