From: Jussi Kivilinna Date: Tue, 21 Dec 2010 20:44:12 +0000 (+0200) Subject: rndis_wlan: do not set default_key if not WEP key X-Git-Tag: 2.1b_release~5947^2~14^2~3^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b578021745b61b2ff89f6bacbac5db08a9a8089;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index de4c050..9e6105c 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);