* [PATCH] mac80211: reject extra IEs for probe resp when hw_scan
@ 2009-02-09 20:00 Johannes Berg
2009-02-09 20:02 ` Johannes Berg
2009-02-09 20:06 ` Jouni Malinen
0 siblings, 2 replies; 4+ messages in thread
From: Johannes Berg @ 2009-02-09 20:00 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Jouni Malinen
We cannot currently hand off extra IEs to hw_scan, so reject
configuring extra IEs for probe response frames when hw_scan
is set.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Jouni Malinen <j@w1.fi>
---
net/mac80211/cfg.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/mac80211/cfg.c 2009-02-09 20:56:40.000000000 +0100
+++ wireless-testing/net/mac80211/cfg.c 2009-02-09 20:58:46.000000000 +0100
@@ -1176,9 +1176,12 @@ static int ieee80211_set_channel(struct
return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
}
-static int set_mgmt_extra_ie_sta(struct ieee80211_if_sta *ifsta, u8 subtype,
- u8 *ies, size_t ies_len)
+static int set_mgmt_extra_ie_sta(struct ieee80211_sub_if_data *sdata,
+ u8 subtype, u8 *ies, size_t ies_len)
{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+
switch (subtype) {
case IEEE80211_STYPE_PROBE_REQ >> 4:
kfree(ifsta->ie_probereq);
@@ -1186,6 +1189,8 @@ static int set_mgmt_extra_ie_sta(struct
ifsta->ie_probereq_len = ies_len;
return 0;
case IEEE80211_STYPE_PROBE_RESP >> 4:
+ if (local->ops->hw_scan)
+ break;
kfree(ifsta->ie_proberesp);
ifsta->ie_proberesp = ies;
ifsta->ie_proberesp_len = ies_len;
@@ -1244,7 +1249,7 @@ static int ieee80211_set_mgmt_extra_ie(s
switch (sdata->vif.type) {
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_ADHOC:
- ret = set_mgmt_extra_ie_sta(&sdata->u.sta, params->subtype,
+ ret = set_mgmt_extra_ie_sta(sdata, params->subtype,
ies, ies_len);
break;
default:
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] mac80211: reject extra IEs for probe resp when hw_scan
2009-02-09 20:00 [PATCH] mac80211: reject extra IEs for probe resp when hw_scan Johannes Berg
@ 2009-02-09 20:02 ` Johannes Berg
2009-02-09 20:06 ` Jouni Malinen
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-02-09 20:02 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Jouni Malinen
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
On Mon, 2009-02-09 at 21:00 +0100, Johannes Berg wrote:
> We cannot currently hand off extra IEs to hw_scan, so reject
> configuring extra IEs for probe response frames when hw_scan
> is set.
Umm, that was screwed up, should be in probe request! Ignore this patch.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: reject extra IEs for probe resp when hw_scan
2009-02-09 20:00 [PATCH] mac80211: reject extra IEs for probe resp when hw_scan Johannes Berg
2009-02-09 20:02 ` Johannes Berg
@ 2009-02-09 20:06 ` Jouni Malinen
2009-02-09 20:09 ` Johannes Berg
1 sibling, 1 reply; 4+ messages in thread
From: Jouni Malinen @ 2009-02-09 20:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Mon, Feb 09, 2009 at 09:00:31PM +0100, Johannes Berg wrote:
> We cannot currently hand off extra IEs to hw_scan, so reject
> configuring extra IEs for probe response frames when hw_scan
> is set.
Assuming this was for probe request.. I'm actually planning on adding
support to pass the extra IEs into hw_scan handler, so that would need
to revert this type of patch for probe req should one make in. Anyway,
that will also make it more difficult to figure out whether the IEs can
actually be added since the driver would need to somehow indicate
whether it supports this or not.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: reject extra IEs for probe resp when hw_scan
2009-02-09 20:06 ` Jouni Malinen
@ 2009-02-09 20:09 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-02-09 20:09 UTC (permalink / raw)
To: Jouni Malinen; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
On Mon, 2009-02-09 at 22:06 +0200, Jouni Malinen wrote:
> On Mon, Feb 09, 2009 at 09:00:31PM +0100, Johannes Berg wrote:
> > We cannot currently hand off extra IEs to hw_scan, so reject
> > configuring extra IEs for probe response frames when hw_scan
> > is set.
>
> Assuming this was for probe request..
Yeah, it was meant to, but I screwed up.
> I'm actually planning on adding
> support to pass the extra IEs into hw_scan handler, so that would need
> to revert this type of patch for probe req should one make in. Anyway,
> that will also make it more difficult to figure out whether the IEs can
> actually be added since the driver would need to somehow indicate
> whether it supports this or not.
Since I've posted my cfg80211 scan work, and I guess it'll go in, how
about instead extending that to pass in IEs? The scan request struct is
already passed down from cfg80211 through mac80211 to drivers, so
anything in there would be available to drivers too.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-09 20:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 20:00 [PATCH] mac80211: reject extra IEs for probe resp when hw_scan Johannes Berg
2009-02-09 20:02 ` Johannes Berg
2009-02-09 20:06 ` Jouni Malinen
2009-02-09 20:09 ` Johannes Berg
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).