Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/1] mac80211: scan on IBSS mode like on STA mode
@ 2008-09-08 13:31 Tomas Winkler
  2008-09-08 14:55 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Tomas Winkler @ 2008-09-08 13:31 UTC (permalink / raw)
  To: linville, johannes, yi.zhu; +Cc: linux-wireless, Ester Kummer

From: Ester Kummer <ester.kummer@intel.com>

This patch handle scanning on IBSS mode like on STA mode.
When queuing the scan work we don't refer to the return value of
ieee80211_sta_start_scan so if we are in the last scan period, we will
return 0 to ieee80211_ioctl_siwscan and not -EAGAIN, and then iwlist will
call ieee80211_ioctl_giwscan to get the scan results and will not fail.

Signed-off-by: Ester Kummer <ester.kummer@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
---
 net/mac80211/mlme.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2564553..72d5fe2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4090,7 +4090,8 @@ int ieee80211_sta_req_scan(struct ieee80211_sub_if_data *sdata, u8 *ssid, size_t
 	struct ieee80211_if_sta *ifsta = &sdata->u.sta;
 	struct ieee80211_local *local = sdata->local;
 
-	if (sdata->vif.type != IEEE80211_IF_TYPE_STA)
+	if (sdata->vif.type != IEEE80211_IF_TYPE_STA ||
+	    sdata->vif.type != IEEE80211_IF_TYPE_IBSS)
 		return ieee80211_sta_start_scan(sdata, ssid, ssid_len);
 
 	if (local->sta_sw_scanning || local->sta_hw_scanning) {
-- 
1.5.4.1

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2008-09-10 21:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 13:31 [PATCH 1/1] mac80211: scan on IBSS mode like on STA mode Tomas Winkler
2008-09-08 14:55 ` Johannes Berg
2008-09-08 15:05   ` Johannes Berg
2008-09-08 15:16     ` Johannes Berg
2008-09-08 16:53       ` Tomas Winkler
2008-09-08 18:13         ` Johannes Berg
2008-09-08 22:24           ` Tomas Winkler
2008-09-10 21:32             ` Tomas Winkler
2008-09-10 21:37               ` Johannes Berg
2008-09-08 16:42   ` Tomas Winkler

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