Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266604
b: refs/heads/master
c: 151411e
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and Kalle Valo committed Sep 19, 2011
1 parent 45ab140 commit 08f449a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 170826dd0d9fa71b648aa31ecb1e2973d777dbdb
refs/heads/master: 151411e88fe1d1a729a4f706a2aebef8bc000a69
16 changes: 15 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,20 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
}
}

if (ar->next_mode == AP_NETWORK && key_type == WEP_CRYPT &&
!test_bit(CONNECTED, &ar->flag)) {
/*
* Store the key locally so that it can be re-configured after
* the AP mode has properly started
* (ath6kl_install_statioc_wep_keys).
*/
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "Delay WEP key configuration "
"until AP mode has been started\n");
ar->wep_key_list[key_index].key_len = key->key_len;
memcpy(ar->wep_key_list[key_index].key, key->key, key->key_len);
return 0;
}

status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index,
key_type, key_usage, key->key_len,
key->seq, key->key, KEY_OP_INIT_VAL,
Expand Down Expand Up @@ -1018,7 +1032,7 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
if (multicast)
key_type = ar->grp_crypto;

if (ar->nw_type == AP_NETWORK && !test_bit(CONNECTED, &ar->flag))
if (ar->next_mode == AP_NETWORK && !test_bit(CONNECTED, &ar->flag))
return 0; /* Delay until AP mode has been started */

status = ath6kl_wmi_addkey_cmd(ar->wmi, ar->def_txkey_index,
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,8 +1364,10 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid,
cfg80211_del_sta(ar->net_dev, bssid, GFP_KERNEL);
}

if (memcmp(ar->net_dev->dev_addr, bssid, ETH_ALEN) == 0)
if (memcmp(ar->net_dev->dev_addr, bssid, ETH_ALEN) == 0) {
memset(ar->wep_key_list, 0, sizeof(ar->wep_key_list));
clear_bit(CONNECTED, &ar->flag);
}
return;
}

Expand Down

0 comments on commit 08f449a

Please sign in to comment.