linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mac80211: reorder channel and freq reporting in wext scan report
@ 2008-05-22 22:36 Tomas Winkler
  2008-05-23 11:36 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Winkler @ 2008-05-22 22:36 UTC (permalink / raw)
  To: linville, johannes, yi.zhu; +Cc: dcbw, linux-wireless, Tomas Winkler

This patch switch order of channel and freq (SIOCGIWFREQ) reports
in scan results in order to overcome wpa_supplicant inability
to handle channel numbers in 5.2Ghz band.
Wext reporting channel number is ambiguous as channels 7-12 (802.11j)
exist on both bands.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 net/mac80211/mlme.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 7cfd12e..c7eca4d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4095,18 +4095,17 @@ ieee80211_sta_scan_result(struct net_device *dev,
 
 	memset(&iwe, 0, sizeof(iwe));
 	iwe.cmd = SIOCGIWFREQ;
-	iwe.u.freq.m = bss->freq;
-	iwe.u.freq.e = 6;
+	iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq);
+	iwe.u.freq.e = 0;
 	current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
 					  IW_EV_FREQ_LEN);
 
 	memset(&iwe, 0, sizeof(iwe));
 	iwe.cmd = SIOCGIWFREQ;
-	iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq);
-	iwe.u.freq.e = 0;
+	iwe.u.freq.m = bss->freq;
+	iwe.u.freq.e = 6;
 	current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
 					  IW_EV_FREQ_LEN);
-
 	memset(&iwe, 0, sizeof(iwe));
 	iwe.cmd = IWEVQUAL;
 	iwe.u.qual.qual = bss->signal;
-- 
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] 2+ messages in thread

* Re: [PATCH 1/1] mac80211: reorder channel and freq reporting in wext scan report
  2008-05-22 22:36 [PATCH 1/1] mac80211: reorder channel and freq reporting in wext scan report Tomas Winkler
@ 2008-05-23 11:36 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2008-05-23 11:36 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: linville, johannes, yi.zhu, linux-wireless

On Fri, 2008-05-23 at 01:36 +0300, Tomas Winkler wrote:
> This patch switch order of channel and freq (SIOCGIWFREQ) reports
> in scan results in order to overcome wpa_supplicant inability
> to handle channel numbers in 5.2Ghz band.
> Wext reporting channel number is ambiguous as channels 7-12 (802.11j)
> exist on both bands.
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  net/mac80211/mlme.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 7cfd12e..c7eca4d 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -4095,18 +4095,17 @@ ieee80211_sta_scan_result(struct net_device *dev,
>  
>  	memset(&iwe, 0, sizeof(iwe));
>  	iwe.cmd = SIOCGIWFREQ;
> -	iwe.u.freq.m = bss->freq;
> -	iwe.u.freq.e = 6;
> +	iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq);
> +	iwe.u.freq.e = 0;
>  	current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
>  					  IW_EV_FREQ_LEN);
>  
>  	memset(&iwe, 0, sizeof(iwe));
>  	iwe.cmd = SIOCGIWFREQ;
> -	iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq);
> -	iwe.u.freq.e = 0;
> +	iwe.u.freq.m = bss->freq;
> +	iwe.u.freq.e = 6;
>  	current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe,
>  					  IW_EV_FREQ_LEN);
> -
>  	memset(&iwe, 0, sizeof(iwe));
>  	iwe.cmd = IWEVQUAL;
>  	iwe.u.qual.qual = bss->signal;


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

end of thread, other threads:[~2008-05-23 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 22:36 [PATCH 1/1] mac80211: reorder channel and freq reporting in wext scan report Tomas Winkler
2008-05-23 11:36 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).