aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-09-15 08:10:16 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-19 02:57:22 -0400
commit151411e88fe1d1a729a4f706a2aebef8bc000a69 (patch)
treee94d839df20a4379b7e742b1d60723ffeb3dd833 /drivers
parent170826dd0d9fa71b648aa31ecb1e2973d777dbdb (diff)
ath6kl: Fix static WEP configuration in AP mode
Configuration of the WEP keys needs to be delayed until the AP mode has been properly started at the target. Partial support for delaying the WEP key configuration was already in place in the driver, but the actual part of deciding when to do this was missing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c16
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c4
2 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 17bb8e28b338..e196097e7524 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -904,6 +904,20 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
904 } 904 }
905 } 905 }
906 906
907 if (ar->next_mode == AP_NETWORK && key_type == WEP_CRYPT &&
908 !test_bit(CONNECTED, &ar->flag)) {
909 /*
910 * Store the key locally so that it can be re-configured after
911 * the AP mode has properly started
912 * (ath6kl_install_statioc_wep_keys).
913 */
914 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "Delay WEP key configuration "
915 "until AP mode has been started\n");
916 ar->wep_key_list[key_index].key_len = key->key_len;
917 memcpy(ar->wep_key_list[key_index].key, key->key, key->key_len);
918 return 0;
919 }
920
907 status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index, 921 status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index,
908 key_type, key_usage, key->key_len, 922 key_type, key_usage, key->key_len,
909 key->seq, key->key, KEY_OP_INIT_VAL, 923 key->seq, key->key, KEY_OP_INIT_VAL,
@@ -1018,7 +1032,7 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
1018 if (multicast) 1032 if (multicast)
1019 key_type = ar->grp_crypto; 1033 key_type = ar->grp_crypto;
1020 1034
1021 if (ar->nw_type == AP_NETWORK && !test_bit(CONNECTED, &ar->flag)) 1035 if (ar->next_mode == AP_NETWORK && !test_bit(CONNECTED, &ar->flag))
1022 return 0; /* Delay until AP mode has been started */ 1036 return 0; /* Delay until AP mode has been started */
1023 1037
1024 status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index, 1038 status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index,
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index d510046c99d6..acbd35d8df2b 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -1364,8 +1364,10 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid,
1364 cfg80211_del_sta(ar->net_dev, bssid, GFP_KERNEL); 1364 cfg80211_del_sta(ar->net_dev, bssid, GFP_KERNEL);
1365 } 1365 }
1366 1366
1367 if (memcmp(ar->net_dev->dev_addr, bssid, ETH_ALEN) == 0) 1367 if (memcmp(ar->net_dev->dev_addr, bssid, ETH_ALEN) == 0) {
1368 memset(ar->wep_key_list, 0, sizeof(ar->wep_key_list));
1368 clear_bit(CONNECTED, &ar->flag); 1369 clear_bit(CONNECTED, &ar->flag);
1370 }
1369 return; 1371 return;
1370 } 1372 }
1371 1373