All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: set the rates mask in connection probes over specified freq
@ 2014-10-07  9:42 Karl Beldan
  2014-10-09  9:32 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Beldan @ 2014-10-07  9:42 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan, Karl Beldan

From: Karl Beldan <karl.beldan@rivierawaves.com>

ATM, specifying the frequency when connecting sends a void 'supported
rates' EID.

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
---
 net/wireless/sme.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 8bbeeb3..2ebc54b 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -80,9 +80,16 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
 	if (!request)
 		return -ENOMEM;
 
-	if (wdev->conn->params.channel)
+	if (wdev->conn->params.channel) {
+		enum ieee80211_band band = wdev->conn->params.channel->band;
+		struct ieee80211_supported_band *sband =
+			wdev->wiphy->bands[band];
+
+		if (!sband)
+			return -EINVAL;
 		request->channels[0] = wdev->conn->params.channel;
-	else {
+		request->rates[band] = (1 << sband->n_bitrates) - 1;
+	} else {
 		int i = 0, j;
 		enum ieee80211_band band;
 		struct ieee80211_supported_band *bands;
-- 
2.0.1


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-07  9:42 [PATCH] cfg80211: set the rates mask in connection probes over specified freq Karl Beldan
@ 2014-10-09  9:32 ` Johannes Berg
  2014-10-09 13:00   ` Karl Beldan
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-10-09  9:32 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Karl Beldan

On Tue, 2014-10-07 at 11:42 +0200, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@rivierawaves.com>
> 
> ATM, specifying the frequency when connecting sends a void 'supported
> rates' EID.

Seems like this should be a stable fix?

johannes


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09  9:32 ` Johannes Berg
@ 2014-10-09 13:00   ` Karl Beldan
  2014-10-09 13:26     ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Beldan @ 2014-10-09 13:00 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan

On Thu, Oct 09, 2014 at 11:32:57AM +0200, Johannes Berg wrote:
> On Tue, 2014-10-07 at 11:42 +0200, Karl Beldan wrote:
> > From: Karl Beldan <karl.beldan@rivierawaves.com>
> > 
> > ATM, specifying the frequency when connecting sends a void 'supported
> > rates' EID.
> 
> Seems like this should be a stable fix?
> 
Indeed, I forgot to Cc stable.
 
Karl

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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09 13:00   ` Karl Beldan
@ 2014-10-09 13:26     ` Johannes Berg
  2014-10-09 16:26       ` Karl Beldan
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-10-09 13:26 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Karl Beldan

On Thu, 2014-10-09 at 15:00 +0200, Karl Beldan wrote:
> On Thu, Oct 09, 2014 at 11:32:57AM +0200, Johannes Berg wrote:
> > On Tue, 2014-10-07 at 11:42 +0200, Karl Beldan wrote:
> > > From: Karl Beldan <karl.beldan@rivierawaves.com>
> > > 
> > > ATM, specifying the frequency when connecting sends a void 'supported
> > > rates' EID.
> > 
> > Seems like this should be a stable fix?
> > 
> Indeed, I forgot to Cc stable.

Ok, I guess I can just add it.

Then again, maybe you can make a bit more verbose commit log, and check
what broke it?

johannes


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09 13:26     ` Johannes Berg
@ 2014-10-09 16:26       ` Karl Beldan
  2014-10-09 18:36         ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Beldan @ 2014-10-09 16:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan

On Thu, Oct 09, 2014 at 03:26:02PM +0200, Johannes Berg wrote:
> On Thu, 2014-10-09 at 15:00 +0200, Karl Beldan wrote:
> > On Thu, Oct 09, 2014 at 11:32:57AM +0200, Johannes Berg wrote:
> > > On Tue, 2014-10-07 at 11:42 +0200, Karl Beldan wrote:
> > > > From: Karl Beldan <karl.beldan@rivierawaves.com>
> > > > 
> > > > ATM, specifying the frequency when connecting sends a void 'supported
> > > > rates' EID.
> > > 
> > > Seems like this should be a stable fix?
> > > 
> > Indeed, I forgot to Cc stable.
> 
> Ok, I guess I can just add it.
> 
> Then again, maybe you can make a bit more verbose commit log, and check
> what broke it?
> 
After a glimpse before leaving FWIU :

- 6829c878 Jul 2009 - "cfg80211: emulate connect with auth/assoc"
original code for 'cmd'
ieee80211_build_preq_ies takes supported rates from sband->bitrates[].
- 8dcb2003 Aug 2010 - "mac80211: Filter ProbeReq SuppRates based on TX
rate mask"
ieee80211_build_preq_ies takes a rate mask, hw_scan uses -1/sw_scan uses
sdata->rc_rateidx_mask.
- 34850ab2 Jul 2011 - "cfg80211: allow userspace to control supported
rates in scan" add a "bitmap of rates to advertise" in the scan request.
- 85a237fe Jul 2011 - "mac80211: implement scan supported rates"
take the rate mask from 'cmd'
- 3965ac00 Sep 2011 - "wireless: Fix rate mask for scan request"
fix rate mask when 'cmd' has params.channel


.. and rate mask remains unset when 'cmd' has params.channel
So I guess it started showing after 85a237fe, but the original cmd never
filled a rate mask which started existing only after 34850ab ..

 
Karl


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09 16:26       ` Karl Beldan
@ 2014-10-09 18:36         ` Johannes Berg
  2014-10-09 20:49           ` Karl Beldan
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-10-09 18:36 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Karl Beldan

On Thu, 2014-10-09 at 18:26 +0200, Karl Beldan wrote:

> > Then again, maybe you can make a bit more verbose commit log, and check
> > what broke it?
> > 
> After a glimpse before leaving FWIU :
> 
> - 6829c878 Jul 2009 - "cfg80211: emulate connect with auth/assoc"
> original code for 'cmd'
> ieee80211_build_preq_ies takes supported rates from sband->bitrates[].
> - 8dcb2003 Aug 2010 - "mac80211: Filter ProbeReq SuppRates based on TX
> rate mask"
> ieee80211_build_preq_ies takes a rate mask, hw_scan uses -1/sw_scan uses
> sdata->rc_rateidx_mask.
> - 34850ab2 Jul 2011 - "cfg80211: allow userspace to control supported
> rates in scan" add a "bitmap of rates to advertise" in the scan request.
> - 85a237fe Jul 2011 - "mac80211: implement scan supported rates"
> take the rate mask from 'cmd'
> - 3965ac00 Sep 2011 - "wireless: Fix rate mask for scan request"
> fix rate mask when 'cmd' has params.channel
> 
> 
> .. and rate mask remains unset when 'cmd' has params.channel
> So I guess it started showing after 85a237fe, but the original cmd never
> filled a rate mask which started existing only after 34850ab ..

Heh, so I guess this goes way back ... what does it actually affect
really though? only connections with iw, which should really not be done
that much? potentially wpa_s with wext, though I'm not even sure that
works?

Either way - is it worth for 3.18/stable?

johannes


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09 18:36         ` Johannes Berg
@ 2014-10-09 20:49           ` Karl Beldan
  2014-10-10 15:10             ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Beldan @ 2014-10-09 20:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan

On Thu, Oct 09, 2014 at 08:36:33PM +0200, Johannes Berg wrote:
> Heh, so I guess this goes way back ... what does it actually affect
> really though? only connections with iw, which should really not be done
> that much? potentially wpa_s with wext, though I'm not even sure that
> works?
> 
For wext I wouldn't know.

> Either way - is it worth for 3.18/stable?
> 
Your call.
 
Karl

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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-09 20:49           ` Karl Beldan
@ 2014-10-10 15:10             ` Johannes Berg
  2014-10-10 15:11               ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-10-10 15:10 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Karl Beldan

On Thu, 2014-10-09 at 22:49 +0200, Karl Beldan wrote:

> > Either way - is it worth for 3.18/stable?
> > 
> Your call.

I've seen no complaints, and you haven't indicated that you'd like to
see it in older kernels, so I've applied it to mac80211-next.

johannes


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-10 15:10             ` Johannes Berg
@ 2014-10-10 15:11               ` Johannes Berg
  2014-10-10 16:07                 ` Karl Beldan
  0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2014-10-10 15:11 UTC (permalink / raw)
  To: Karl Beldan; +Cc: linux-wireless, Karl Beldan

On Fri, 2014-10-10 at 17:10 +0200, Johannes Berg wrote:
> On Thu, 2014-10-09 at 22:49 +0200, Karl Beldan wrote:
> 
> > > Either way - is it worth for 3.18/stable?
> > > 
> > Your call.
> 
> I've seen no complaints, and you haven't indicated that you'd like to
> see it in older kernels, so I've applied it to mac80211-next.

With a memory leak fix :)

johannes


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

* Re: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
  2014-10-10 15:11               ` Johannes Berg
@ 2014-10-10 16:07                 ` Karl Beldan
  0 siblings, 0 replies; 10+ messages in thread
From: Karl Beldan @ 2014-10-10 16:07 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan

On Fri, Oct 10, 2014 at 05:11:31PM +0200, Johannes Berg wrote:
> On Fri, 2014-10-10 at 17:10 +0200, Johannes Berg wrote:
> > On Thu, 2014-10-09 at 22:49 +0200, Karl Beldan wrote:
> > 
> > > > Either way - is it worth for 3.18/stable?
> > > > 
> > > Your call.
> > 
> > I've seen no complaints, and you haven't indicated that you'd like to
> > see it in older kernels, so I've applied it to mac80211-next.
> 
> With a memory leak fix :)
> 
Arf yes, thanks !
 
Karl

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

end of thread, other threads:[~2014-10-10 16:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07  9:42 [PATCH] cfg80211: set the rates mask in connection probes over specified freq Karl Beldan
2014-10-09  9:32 ` Johannes Berg
2014-10-09 13:00   ` Karl Beldan
2014-10-09 13:26     ` Johannes Berg
2014-10-09 16:26       ` Karl Beldan
2014-10-09 18:36         ` Johannes Berg
2014-10-09 20:49           ` Karl Beldan
2014-10-10 15:10             ` Johannes Berg
2014-10-10 15:11               ` Johannes Berg
2014-10-10 16:07                 ` Karl Beldan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.