* [PATCH] wireless: Remove spurious warning in mlme.c
@ 2010-12-07 22:06 greearb
2010-12-07 23:05 ` Gábor Stefanik
2010-12-08 8:11 ` Johannes Berg
0 siblings, 2 replies; 4+ messages in thread
From: greearb @ 2010-12-07 22:06 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
Seems that we should not be warning if all of the
authtry_bsses are already NULL.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 d7680f2... 866d016... M net/wireless/mlme.c
net/wireless/mlme.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index d7680f2..866d016 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -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);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] wireless: Remove spurious warning in mlme.c
2010-12-07 22:06 [PATCH] wireless: Remove spurious warning in mlme.c greearb
@ 2010-12-07 23:05 ` Gábor Stefanik
2010-12-08 8:11 ` Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Gábor Stefanik @ 2010-12-07 23:05 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless
On Tue, Dec 7, 2010 at 11:06 PM, <greearb@candelatech.com> wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> Seems that we should not be warning if all of the
> authtry_bsses are already NULL.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 d7680f2... 866d016... M net/wireless/mlme.c
> net/wireless/mlme.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
> index d7680f2..866d016 100644
> --- a/net/wireless/mlme.c
> +++ b/net/wireless/mlme.c
> @@ -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;
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.
> }
>
> 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wireless: Remove spurious warning in mlme.c
2010-12-07 22:06 [PATCH] wireless: Remove spurious warning in mlme.c greearb
2010-12-07 23:05 ` Gábor Stefanik
@ 2010-12-08 8:11 ` Johannes Berg
2010-12-08 15:36 ` Ben Greear
1 sibling, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2010-12-08 8:11 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless
On Tue, 2010-12-07 at 14:06 -0800, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> Seems that we should not be warning if all of the
> authtry_bsses are 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] wireless: Remove spurious warning in mlme.c
2010-12-08 8:11 ` Johannes Berg
@ 2010-12-08 15:36 ` Ben Greear
0 siblings, 0 replies; 4+ messages in thread
From: Ben Greear @ 2010-12-08 15:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 12/08/2010 12:11 AM, Johannes Berg wrote:
> On Tue, 2010-12-07 at 14:06 -0800, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> Seems that we should not be warning if all of the
>> authtry_bsses are 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
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-08 15:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 22:06 [PATCH] wireless: Remove spurious warning in mlme.c greearb
2010-12-07 23:05 ` Gábor Stefanik
2010-12-08 8:11 ` Johannes Berg
2010-12-08 15:36 ` Ben Greear
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).