diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-07 14:32:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:14 -0500 |
commit | c12bdc45d9bc4e576ca54944b708cd45c738ec07 (patch) | |
tree | 4344ae09aa279f6f7cd6d29042284b10082fdea5 /drivers/net/wireless/libertas | |
parent | c2df2efe96742b78454acdffe6d278ae334fc838 (diff) |
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/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 11 |
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, | |||
1122 | break; | 1122 | break; |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | if ( adapter->secinfo.wep_enabled | ||
1126 | || adapter->secinfo.WPAenabled | ||
1127 | || adapter->secinfo.WPA2enabled) { | ||
1128 | dwrq->flags &= ~IW_ENCODE_DISABLED; | ||
1129 | } else { | ||
1130 | dwrq->flags |= IW_ENCODE_DISABLED; | ||
1131 | } | ||
1132 | |||
1133 | memset(extra, 0, 16); | 1125 | memset(extra, 0, 16); |
1134 | 1126 | ||
1135 | mutex_lock(&adapter->lock); | 1127 | mutex_lock(&adapter->lock); |
@@ -1150,14 +1142,13 @@ static int lbs_get_encode(struct net_device *dev, | |||
1150 | || (adapter->secinfo.WPA2enabled)) { | 1142 | || (adapter->secinfo.WPA2enabled)) { |
1151 | /* return WPA enabled */ | 1143 | /* return WPA enabled */ |
1152 | dwrq->flags &= ~IW_ENCODE_DISABLED; | 1144 | dwrq->flags &= ~IW_ENCODE_DISABLED; |
1145 | dwrq->flags |= IW_ENCODE_NOKEY; | ||
1153 | } else { | 1146 | } else { |
1154 | dwrq->flags |= IW_ENCODE_DISABLED; | 1147 | dwrq->flags |= IW_ENCODE_DISABLED; |
1155 | } | 1148 | } |
1156 | 1149 | ||
1157 | mutex_unlock(&adapter->lock); | 1150 | mutex_unlock(&adapter->lock); |
1158 | 1151 | ||
1159 | dwrq->flags |= IW_ENCODE_NOKEY; | ||
1160 | |||
1161 | lbs_deb_wext("key: %02x:%02x:%02x:%02x:%02x:%02x, keylen %d\n", | 1152 | lbs_deb_wext("key: %02x:%02x:%02x:%02x:%02x:%02x, keylen %d\n", |
1162 | extra[0], extra[1], extra[2], | 1153 | extra[0], extra[1], extra[2], |
1163 | extra[3], extra[4], extra[5], dwrq->length); | 1154 | extra[3], extra[4], extra[5], dwrq->length); |