summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-07 20:32:12 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:06:14 +0100
commitc12bdc45d9bc4e576ca54944b708cd45c738ec07 (patch)
tree4344ae09aa279f6f7cd6d29042284b10082fdea5 /drivers
parentlibertas: endianness fixes (diff)
downloadlinux-c12bdc45d9bc4e576ca54944b708cd45c738ec07.tar.xz
linux-c12bdc45d9bc4e576ca54944b708cd45c738ec07.zip
libertas: Don't set IW_ENCODE_NOKEY when returning WEP keys.
Also clean up the double setting/clearing of IW_ENCODE_DISABLED. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/wext.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index b8c93c0adb2e..1af140bbbcb1 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1122,14 +1122,6 @@ static int lbs_get_encode(struct net_device *dev,
break;
}
- if ( adapter->secinfo.wep_enabled
- || adapter->secinfo.WPAenabled
- || adapter->secinfo.WPA2enabled) {
- dwrq->flags &= ~IW_ENCODE_DISABLED;
- } else {
- dwrq->flags |= IW_ENCODE_DISABLED;
- }
-
memset(extra, 0, 16);
mutex_lock(&adapter->lock);
@@ -1150,14 +1142,13 @@ static int lbs_get_encode(struct net_device *dev,
|| (adapter->secinfo.WPA2enabled)) {
/* return WPA enabled */
dwrq->flags &= ~IW_ENCODE_DISABLED;
+ dwrq->flags |= IW_ENCODE_NOKEY;
} else {
dwrq->flags |= IW_ENCODE_DISABLED;
}
mutex_unlock(&adapter->lock);
- dwrq->flags |= IW_ENCODE_NOKEY;
-
lbs_deb_wext("key: %02x:%02x:%02x:%02x:%02x:%02x, keylen %d\n",
extra[0], extra[1], extra[2],
extra[3], extra[4], extra[5], dwrq->length);