diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-11-02 17:45:55 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 05:59:59 -0500 |
commit | f4bb9a6fbc1f49058fc9eb6dcb4a3022d99013b4 (patch) | |
tree | 45deb6e360d87d793f77701aec84fc0f8aa6515d /drivers/net/wireless/ath/ath6kl/main.c | |
parent | 1ddc3377e1f43b0bd62c7042cb2032824ebfb663 (diff) |
ath6kl: Fix key configuration to copy at most seq_len from seq
There is no guarantee on the caller using 8-octet buffer for
key->seq, so better follow the key->seq_len parameter on figuring
out how many octets to copy.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index 021b2f65d541..5e5f4ca8f3f0 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -442,7 +442,7 @@ static void ath6kl_install_static_wep_keys(struct ath6kl_vif *vif) | |||
442 | WEP_CRYPT, | 442 | WEP_CRYPT, |
443 | keyusage, | 443 | keyusage, |
444 | vif->wep_key_list[index].key_len, | 444 | vif->wep_key_list[index].key_len, |
445 | NULL, | 445 | NULL, 0, |
446 | vif->wep_key_list[index].key, | 446 | vif->wep_key_list[index].key, |
447 | KEY_OP_INIT_VAL, NULL, | 447 | KEY_OP_INIT_VAL, NULL, |
448 | NO_SYNC_WMIFLAG); | 448 | NO_SYNC_WMIFLAG); |
@@ -477,7 +477,8 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel) | |||
477 | memset(key_rsc, 0, sizeof(key_rsc)); | 477 | memset(key_rsc, 0, sizeof(key_rsc)); |
478 | res = ath6kl_wmi_addkey_cmd( | 478 | res = ath6kl_wmi_addkey_cmd( |
479 | ar->wmi, vif->fw_vif_idx, ik->key_index, ik->key_type, | 479 | ar->wmi, vif->fw_vif_idx, ik->key_index, ik->key_type, |
480 | GROUP_USAGE, ik->key_len, key_rsc, ik->key, | 480 | GROUP_USAGE, ik->key_len, key_rsc, ATH6KL_KEY_SEQ_LEN, |
481 | ik->key, | ||
481 | KEY_OP_INIT_VAL, NULL, SYNC_BOTH_WMIFLAG); | 482 | KEY_OP_INIT_VAL, NULL, SYNC_BOTH_WMIFLAG); |
482 | if (res) { | 483 | if (res) { |
483 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "Delayed " | 484 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "Delayed " |