[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1165767697.3131.29.camel@johannes.berg>
Date: Sun, 10 Dec 2006 17:21:37 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Pavel Roskin <proski@....org>
Cc: Paul Collins <paul@...ny.ondioline.org>,
"John W. Linville" <linville@...driver.com>, netdev@...r.kernel.org
Subject: [PATCH] fix cfg80211 WE compat code
When cfg80211's WE compat code is enabled and the cfg80211 module is
loaded (or built-in) WE calls on non-cfg80211 devices will return
-ENODEV because cfg80211 internally says -ENODEV for cfg80211 calls on
devices that don't have cfg80211 handlers.
This patch makes the cfg80211 core return -ENOSYS which is more
appropriate since the device exists but the configuration request can't
be fulfilled. This will then cause the fallback code to the original WE
to trigger.
Signed-off-by: Johannes Berg <johannes@...solutions.net>
---
John, please apply this to wireless-dev if Pavel says it works (I think
it should).
On Sun, 2006-12-10 at 11:08 -0500, Pavel Roskin wrote:
> Not quite. cfg80211_wext_ioctl() returns -ENODEV (no idea why), but the code
> only falls back to Wireless Extensions if the return code is -ENOSYS. That
> should be quite easy to fix.
Ah, but you said -ENOSYS and I thought that somehow went to userspace
and was confused.
Yeah, the bug is actually hidden in cfg80211_wx_setup() and all that
calls.
This patch should fix it.
--- wireless-dev.orig/net/wireless/core.c 2006-12-10 17:15:43.442451537 +0100
+++ wireless-dev/net/wireless/core.c 2006-12-10 17:15:54.672451537 +0100
@@ -131,7 +131,7 @@ cfg80211_get_drv_from_ifindex(int ifinde
if (drv)
mutex_lock(&drv->mtx);
else
- drv = ERR_PTR(-ENODEV);
+ drv = ERR_PTR(-ENOSYS);
dev_put(dev);
out:
mutex_unlock(&cfg80211_drv_mutex);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists