Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: remove "bcn_int" and "capab" scan results info
@ 2007-11-21 16:55 John W. Linville
  2007-11-21 17:01 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2007-11-21 16:55 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, John W. Linville

These bits were dead code before "mac80211: Remove local->scan_flags"
(commit 6681dd3fd0e4d36a4547415853e83411baa7b705) and probably should
have been removed as part of that commit.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 net/mac80211/ieee80211_sta.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 2a321f0..936f1cd 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -3001,31 +3001,6 @@ ieee80211_sta_scan_result(struct net_device *dev,
 		}
 	}
 
-	do {
-		char *buf;
-
-		buf = kmalloc(100, GFP_ATOMIC);
-		if (!buf)
-			break;
-
-		memset(&iwe, 0, sizeof(iwe));
-		iwe.cmd = IWEVCUSTOM;
-		sprintf(buf, "bcn_int=%d", bss->beacon_int);
-		iwe.u.data.length = strlen(buf);
-		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
-						  buf);
-
-		memset(&iwe, 0, sizeof(iwe));
-		iwe.cmd = IWEVCUSTOM;
-		sprintf(buf, "capab=0x%04x", bss->capability);
-		iwe.u.data.length = strlen(buf);
-		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
-						  buf);
-
-		kfree(buf);
-		break;
-	} while (0);
-
 	return current_ev;
 }
 
-- 
1.5.3.3


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

* Re: [PATCH] mac80211: remove "bcn_int" and "capab" scan results info
  2007-11-21 16:55 [PATCH] mac80211: remove "bcn_int" and "capab" scan results info John W. Linville
@ 2007-11-21 17:01 ` Johannes Berg
  2007-11-22  4:31   ` Jouni Malinen
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-11-21 17:01 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Jouni Malinen

[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]


On Wed, 2007-11-21 at 11:55 -0500, John W. Linville wrote:
> These bits were dead code before "mac80211: Remove local->scan_flags"
> (commit 6681dd3fd0e4d36a4547415853e83411baa7b705) and probably should
> have been removed as part of that commit.

I'm all for it. But Jouni complained although this code couldn't be
triggered. I think Jouni's objections will be addressed with nl80211
work though, so maybe we can remove it for now anyway?

johannes

> diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
> index 2a321f0..936f1cd 100644
> --- a/net/mac80211/ieee80211_sta.c
> +++ b/net/mac80211/ieee80211_sta.c
> @@ -3001,31 +3001,6 @@ ieee80211_sta_scan_result(struct net_device *dev,
>  		}
>  	}
>  
> -	do {
> -		char *buf;
> -
> -		buf = kmalloc(100, GFP_ATOMIC);
> -		if (!buf)
> -			break;
> -
> -		memset(&iwe, 0, sizeof(iwe));
> -		iwe.cmd = IWEVCUSTOM;
> -		sprintf(buf, "bcn_int=%d", bss->beacon_int);
> -		iwe.u.data.length = strlen(buf);
> -		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
> -						  buf);
> -
> -		memset(&iwe, 0, sizeof(iwe));
> -		iwe.cmd = IWEVCUSTOM;
> -		sprintf(buf, "capab=0x%04x", bss->capability);
> -		iwe.u.data.length = strlen(buf);
> -		current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe,
> -						  buf);
> -
> -		kfree(buf);
> -		break;
> -	} while (0);
> -
>  	return current_ev;
>  }
>  

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [PATCH] mac80211: remove "bcn_int" and "capab" scan results info
  2007-11-21 17:01 ` Johannes Berg
@ 2007-11-22  4:31   ` Jouni Malinen
  2007-11-22 12:57     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Jouni Malinen @ 2007-11-22  4:31 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless

On Wed, Nov 21, 2007 at 06:01:15PM +0100, Johannes Berg wrote:
> On Wed, 2007-11-21 at 11:55 -0500, John W. Linville wrote:
> > These bits were dead code before "mac80211: Remove local->scan_flags"
> > (commit 6681dd3fd0e4d36a4547415853e83411baa7b705) and probably should
> > have been removed as part of that commit.
> 
> I'm all for it. But Jouni complained although this code couldn't be
> triggered. I think Jouni's objections will be addressed with nl80211
> work though, so maybe we can remove it for now anyway?

If I understood correctly, the proposed change was removing 'capab'
information from scan results(?). If that is the case, that would break
wpa_supplicant network selection since there would be no information on
whether the network is using encryption or not (privacy flag) and
whether it is a BSS or an IBSS. Consequently, I obviously continue to
object this type of change as long as WE is used for getting scan
results.

-- 
Jouni Malinen                                            PGP id EFC895FA

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

* Re: [PATCH] mac80211: remove "bcn_int" and "capab" scan results info
  2007-11-22  4:31   ` Jouni Malinen
@ 2007-11-22 12:57     ` Johannes Berg
  2007-11-23 10:46       ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-11-22 12:57 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: John W. Linville, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]


> If I understood correctly, the proposed change was removing 'capab'
> information from scan results(?). If that is the case, that would break
> wpa_supplicant network selection since there would be no information on
> whether the network is using encryption or not (privacy flag) and
> whether it is a BSS or an IBSS. Consequently, I obviously continue to
> object this type of change as long as WE is used for getting scan
> results.

Well, wpa_supplicant currently works, right? And this code is never
triggered before the change to remove scan_flags because scan_flags
cannot be set. Hence, I don't see how wpa_supplicant can possibly need
this information.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [PATCH] mac80211: remove "bcn_int" and "capab" scan results info
  2007-11-22 12:57     ` Johannes Berg
@ 2007-11-23 10:46       ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2007-11-23 10:46 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: John W. Linville, linux-wireless

> > If I understood correctly, the proposed change was removing 'capab'
> > information from scan results(?). If that is the case, that would break
> > wpa_supplicant network selection since there would be no information on
> > whether the network is using encryption or not (privacy flag) and
> > whether it is a BSS or an IBSS. Consequently, I obviously continue to
> > object this type of change as long as WE is used for getting scan
> > results.
> 
> Well, wpa_supplicant currently works, right? And this code is never
> triggered before the change to remove scan_flags because scan_flags
> cannot be set. Hence, I don't see how wpa_supplicant can possibly need
> this information.

In fact, wpa_supplicant isn't even using the capab= information from the
possibly present custom structure in the scan result, it uses
SIOCGIWMODE to figure out whether it's a BSS or an IBSS, and probably
IWEVGENIE to figure out encryption.

The only thing it can possibly read from the custom scan result is
wpa_ie= and rsn_ie= which are IWEVGENIE and tsf= which we never pass.

Therefore, we should merge this patch.

johannes


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

end of thread, other threads:[~2007-11-23 12:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-21 16:55 [PATCH] mac80211: remove "bcn_int" and "capab" scan results info John W. Linville
2007-11-21 17:01 ` Johannes Berg
2007-11-22  4:31   ` Jouni Malinen
2007-11-22 12:57     ` Johannes Berg
2007-11-23 10:46       ` Johannes Berg

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