Skip to content

Commit

Permalink
rndis_wlan: do not set default_key if not WEP key
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Dec 22, 2010
1 parent bfe3850 commit 0b57802
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b57802

Please sign in to comment.