wireless: Remove spurious warning in mlme.c
PATCH 1/1 wireless: Remove spurious warning in mlme.c
From: Ben Greear <[email protected]>
Seems that we should not be warning if all of theauthtry_bsses are already NULL.
---
:100644 100644 d7680f2... 866d016... M net/wireless/mlme.c
net/wireless/mlme.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
net/wireless/mlme.c +3 -2
@@ -266,7 +266,7 @@ EXPORT_SYMBOL(cfg80211_send_disassoc);static void __cfg80211_auth_remove (struct wireless_dev *wdev,const u8 *addr) {int i; -bool done = false; +bool done = true;ASSERT_WDEV_LOCK (wdev);
@@ -277,9 +277,10 @@ static void __cfg80211_auth_remove(struct wireless_dev *wdev, const u8 *addr)cfg80211_unhold_bss (wdev->authtry_bsses[i]);cfg80211_put_bss (&wdev->authtry_bsses[i]->pub); wdev->authtry_bsses[i] =NULL ; - done = true;break ; } +else if (wdev->authtry_bsses[i]) + done = false; }WARN_ON (!done);
Signature · 1 line
1.7.2.3
Quoted 25 lines · On Tue, Dec 7, 2010 at 11:06 PM, <[email protected]> wrote:
From: Ben Greear <[email protected]>
Seems that we should not be warning if all of the
authtry_bssesare already NULL.Signed-off-by Ben Greear <[email protected]>---
:100644 100644 d7680f2... 866d016... M net/wireless/mlme.cnet/wireless/mlme.c| 5 +++--1 files changed, 3 insertions(+), 2 deletions(-)net/wireless/mlme.c +1
-1@@ -266,7 +266,7 @@ EXPORT_SYMBOL(cfg80211_send_disassoc); static void __cfg80211_auth_remove(struct wireless_dev *wdev, const u8 *addr) { int i; - bool done = false; + bool done = true; ASSERT_WDEV_LOCK(wdev);
net/wireless/mlme.c static void __cfg80211_auth_remove(struct wireless_dev *wdev, const u8 *addr) · line 283
Quoted 8 lines
net/wireless/mlme.c +2
-1@@ -277,9 +277,10 @@ static void __cfg80211_auth_remove(struct wireless_dev *wdev, const u8 *addr) cfg80211_unhold_bss(wdev->authtry_bsses[i]); cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); wdev->authtry_bsses[i] = NULL; - done = true; break; } + else if (wdev->authtry_bsses[i]) + done = false;
Coding style issues: always put the else on the same line as the closing brace, and if one branch is braced, both branches should be so.
Quoted 11 lines
net/wireless/mlme.c +0
-1} WARN_ON(!done); --1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
Johannes Berg
maintainerQuoted 4 lines · On Tue, 2010-12-07 at 14:06 -0800, [email protected] wrote:
From: Ben Greear <[email protected]>
Seems that we should not be warning if all of the
authtry_bssesare already NULL.
Do you keep running into the warning? I'd really like to understand how it happens -- it seems to point to a mac80211 bug.
So don't really like this patch.
johannes
Quoted 10 lines · Johannes Berg
Quoted 4 lines · On Tue, 2010-12-07 at 14:06 -0800, [email protected] wrote:
From: Ben Greear<[email protected]>
Seems that we should not be warning if all of the
authtry_bssesare already NULL.Do you keep running into the warning? I'd really like to understand how it happens -- it seems to point to a mac80211 bug.
So don't really like this patch.
Yes, it's easily repeatable in my setup when using wpa_supplicant for non-encrypted VIFS. I was using around 80 VIFS for most of this testing.
I posted the backtrace to no comment several weeks ago:
http://www.spinics.net/lists/linux-wireless/msg59525.html
Thanks,
Ben
Quoted 2 lines
johannes
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com