diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2010-12-21 15:44:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-22 15:43:30 -0500 |
commit | 0b578021745b61b2ff89f6bacbac5db08a9a8089 (patch) | |
tree | 95f43724389d7f8c5b3c2d9219dcc9453f5762bc | |
parent | bfe3850b0cfca6ba64395e2705d9a51cd044f374 (diff) |
rndis_wlan: do not set default_key if not WEP key
rndis_set_default_key did call add_wep_key to set default key on device, even
if key is WPA. This caused rndis_wlan not work with wpa_supplicant in nl80211
mode (causing disconnect from AP).
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index de4c05019f1e..9e6105cd54a5 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -2435,6 +2435,9 @@ static int rndis_set_default_key(struct wiphy *wiphy, struct net_device *netdev, | |||
2435 | 2435 | ||
2436 | priv->encr_tx_key_index = key_index; | 2436 | priv->encr_tx_key_index = key_index; |
2437 | 2437 | ||
2438 | if (is_wpa_key(priv, key_index)) | ||
2439 | return 0; | ||
2440 | |||
2438 | key = priv->encr_keys[key_index]; | 2441 | key = priv->encr_keys[key_index]; |
2439 | 2442 | ||
2440 | return add_wep_key(usbdev, key.material, key.len, key_index); | 2443 | return add_wep_key(usbdev, key.material, key.len, key_index); |