All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Dave <kilroyd@googlemail.com>
Subject: [PATCH] cfg80211: fix giwrange
Date: Sun, 05 Jul 2009 23:13:19 +0200	[thread overview]
Message-ID: <1246828399.4411.7.camel@johannes.local> (raw)

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];



             reply	other threads:[~2009-07-05 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-05 21:13 Johannes Berg [this message]
2009-07-06 17:36 ` [PATCH] cfg80211: fix giwrange Dave
2009-07-06 17:40   ` Johannes Berg
2009-07-06 17:40   ` [PATCH v2] " Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246828399.4411.7.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=kilroyd@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.