summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rndis_wlan.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2010-12-21 22:44:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-12-22 15:43:30 -0500
commit0b578021745b61b2ff89f6bacbac5db08a9a8089 (patch)
tree95f43724389d7f8c5b3c2d9219dcc9453f5762bc /drivers/net/wireless/rndis_wlan.c
parentbfe3850b0cfca6ba64395e2705d9a51cd044f374 (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>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r--drivers/net/wireless/rndis_wlan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index de4c05019f1..9e6105cd54a 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,
priv->encr_tx_key_index = key_index;
+ if (is_wpa_key(priv, key_index))
+ return 0;
+
key = priv->encr_keys[key_index];
return add_wep_key(usbdev, key.material, key.len, key_index);