2012-12-20 16:32:01

by John W. Linville

[permalink] [raw]
Subject: [PATCH] wireless: remove WARN_ON in __cfg80211_mlme_disassoc

From: "John W. Linville" <[email protected]>

It seems like all this WARN_ON does is generate useless bug reports...?

Signed-off-by: John W. Linville <[email protected]>
---
net/wireless/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 5e8123e..a2e1415 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -514,7 +514,7 @@ static int __cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev,
if (wdev->sme_state != CFG80211_SME_CONNECTED)
return -ENOTCONN;

- if (WARN_ON(!wdev->current_bss))
+ if (!wdev->current_bss)
return -ENOTCONN;

memset(&req, 0, sizeof(req));
--
1.7.11.7



2012-12-20 17:03:33

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] wireless: remove WARN_ON in __cfg80211_mlme_disassoc

On Thu, 2012-12-20 at 11:20 -0500, John W. Linville wrote:
> From: "John W. Linville" <[email protected]>
>
> It seems like all this WARN_ON does is generate useless bug reports...?

Well the warning isn't really spurious, and it really shouldn't happen
(and Stanislaw just pointed to the bugfix on the bugreport), but I agree
the warning is a bit useless because it doesn't tell us why it actually
happened. I'd still prefer to keep it though because it points to this
inconsistency in reporting state to userspace.

johannes