* [PATCH] cfg80211: fix giwrange
@ 2009-07-05 21:13 Johannes Berg
2009-07-06 17:36 ` Dave
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2009-07-05 21:13 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless, Dave
commit c4c496e49ddbf022e51adbd25cedd071329280db
Author: David Kilroy <kilroyd@googlemail.com>
Date: Thu Jun 18 23:21:14 2009 +0100
cfg80211: Advertise ciphers via WE according to driver capability
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
unfortunately broke iwrange -- it used the variable c
that needs to be 0 for the channel list.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/wireless/wext-compat.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- wireless-testing.orig/net/wireless/wext-compat.c 2009-07-05 23:10:33.000000000 +0200
+++ wireless-testing/net/wireless/wext-compat.c 2009-07-05 23:10:37.000000000 +0200
@@ -154,7 +154,7 @@ int cfg80211_wext_giwrange(struct net_de
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct iw_range *range = (struct iw_range *) extra;
enum ieee80211_band band;
- int c = 0;
+ int i, c = 0;
if (!wdev)
return -EOPNOTSUPP;
@@ -201,7 +201,7 @@ int cfg80211_wext_giwrange(struct net_de
range->avg_qual.noise = range->max_qual.noise / 2;
range->avg_qual.updated = range->max_qual.updated;
- for (c = 0; c < wdev->wiphy->n_cipher_suites; c++) {
+ for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
switch (wdev->wiphy->cipher_suites[c]) {
case WLAN_CIPHER_SUITE_TKIP:
range->enc_capa |= (IW_ENC_CAPA_CIPHER_TKIP |
@@ -226,7 +226,6 @@ int cfg80211_wext_giwrange(struct net_de
}
for (band = 0; band < IEEE80211_NUM_BANDS; band ++) {
- int i;
struct ieee80211_supported_band *sband;
sband = wdev->wiphy->bands[band];
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cfg80211: fix giwrange
2009-07-05 21:13 [PATCH] cfg80211: fix giwrange Johannes Berg
@ 2009-07-06 17:36 ` Dave
2009-07-06 17:40 ` Johannes Berg
2009-07-06 17:40 ` [PATCH v2] " Johannes Berg
0 siblings, 2 replies; 4+ messages in thread
From: Dave @ 2009-07-06 17:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
Johannes Berg wrote:
> commit c4c496e49ddbf022e51adbd25cedd071329280db
> Author: David Kilroy <kilroyd@googlemail.com>
> Date: Thu Jun 18 23:21:14 2009 +0100
>
> cfg80211: Advertise ciphers via WE according to driver capability
>
> unfortunately broke iwrange -- it used the variable c
> that needs to be 0 for the channel list.
Doh! I distinctly recall wonderring whether I should use a separate
variable. Must've got side-tracked. Sorry :(
Just one thing about the fix though...
> @@ -201,7 +201,7 @@ int cfg80211_wext_giwrange(struct net_de
> range->avg_qual.noise = range->max_qual.noise / 2;
> range->avg_qual.updated = range->max_qual.updated;
>
> - for (c = 0; c < wdev->wiphy->n_cipher_suites; c++) {
> + for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
> switch (wdev->wiphy->cipher_suites[c]) {
^ needs to be i
Dave.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cfg80211: fix giwrange
2009-07-06 17:36 ` Dave
@ 2009-07-06 17:40 ` Johannes Berg
2009-07-06 17:40 ` [PATCH v2] " Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-07-06 17:40 UTC (permalink / raw)
To: Dave; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]
On Mon, 2009-07-06 at 18:36 +0100, Dave wrote:
> Johannes Berg wrote:
> > commit c4c496e49ddbf022e51adbd25cedd071329280db
> > Author: David Kilroy <kilroyd@googlemail.com>
> > Date: Thu Jun 18 23:21:14 2009 +0100
> >
> > cfg80211: Advertise ciphers via WE according to driver capability
> >
> > unfortunately broke iwrange -- it used the variable c
> > that needs to be 0 for the channel list.
>
> Doh! I distinctly recall wonderring whether I should use a separate
> variable. Must've got side-tracked. Sorry :(
No worries.
> Just one thing about the fix though...
>
> > @@ -201,7 +201,7 @@ int cfg80211_wext_giwrange(struct net_de
> > range->avg_qual.noise = range->max_qual.noise / 2;
> > range->avg_qual.updated = range->max_qual.updated;
> >
> > - for (c = 0; c < wdev->wiphy->n_cipher_suites; c++) {
> > + for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
> > switch (wdev->wiphy->cipher_suites[c]) {
> ^ needs to be i
Ouch! Thanks, good catch.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] cfg80211: fix giwrange
2009-07-06 17:36 ` Dave
2009-07-06 17:40 ` Johannes Berg
@ 2009-07-06 17:40 ` Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-07-06 17:40 UTC (permalink / raw)
To: Dave; +Cc: John Linville, linux-wireless
commit c4c496e49ddbf022e51adbd25cedd071329280db
Author: David Kilroy <kilroyd@googlemail.com>
Date: Thu Jun 18 23:21:14 2009 +0100
cfg80211: Advertise ciphers via WE according to driver capability
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
unfortunately broke iwrange -- it used the variable c
that needs to be 0 for the channel list.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
v2: fix bug pointed out by dave
net/wireless/wext-compat.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- wireless-testing.orig/net/wireless/wext-compat.c 2009-07-06 12:03:14.000000000 +0200
+++ wireless-testing/net/wireless/wext-compat.c 2009-07-06 19:40:06.000000000 +0200
@@ -154,7 +154,7 @@ int cfg80211_wext_giwrange(struct net_de
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct iw_range *range = (struct iw_range *) extra;
enum ieee80211_band band;
- int c = 0;
+ int i, c = 0;
if (!wdev)
return -EOPNOTSUPP;
@@ -201,8 +201,8 @@ int cfg80211_wext_giwrange(struct net_de
range->avg_qual.noise = range->max_qual.noise / 2;
range->avg_qual.updated = range->max_qual.updated;
- for (c = 0; c < wdev->wiphy->n_cipher_suites; c++) {
- switch (wdev->wiphy->cipher_suites[c]) {
+ for (i = 0; i < wdev->wiphy->n_cipher_suites; i++) {
+ switch (wdev->wiphy->cipher_suites[i]) {
case WLAN_CIPHER_SUITE_TKIP:
range->enc_capa |= (IW_ENC_CAPA_CIPHER_TKIP |
IW_ENC_CAPA_WPA);
@@ -226,7 +226,6 @@ int cfg80211_wext_giwrange(struct net_de
}
for (band = 0; band < IEEE80211_NUM_BANDS; band ++) {
- int i;
struct ieee80211_supported_band *sband;
sband = wdev->wiphy->bands[band];
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-06 17:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-05 21:13 [PATCH] cfg80211: fix giwrange Johannes Berg
2009-07-06 17:36 ` Dave
2009-07-06 17:40 ` Johannes Berg
2009-07-06 17:40 ` [PATCH v2] " 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).