aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/cfg80211.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-11-02 17:45:55 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 05:59:59 -0500
commitf4bb9a6fbc1f49058fc9eb6dcb4a3022d99013b4 (patch)
tree45deb6e360d87d793f77701aec84fc0f8aa6515d /drivers/net/wireless/ath/ath6kl/cfg80211.c
parent1ddc3377e1f43b0bd62c7042cb2032824ebfb663 (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/cfg80211.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4a880b4dda5b..d7e0a8c75001 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -500,7 +500,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
500 vif->prwise_crypto, 500 vif->prwise_crypto,
501 GROUP_USAGE | TX_USAGE, 501 GROUP_USAGE | TX_USAGE,
502 key->key_len, 502 key->key_len,
503 NULL, 503 NULL, 0,
504 key->key, KEY_OP_INIT_VAL, NULL, 504 key->key, KEY_OP_INIT_VAL, NULL,
505 NO_SYNC_WMIFLAG); 505 NO_SYNC_WMIFLAG);
506 } 506 }
@@ -1014,7 +1014,8 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
1014 status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, 1014 status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
1015 vif->def_txkey_index, 1015 vif->def_txkey_index,
1016 key_type, key_usage, key->key_len, 1016 key_type, key_usage, key->key_len,
1017 key->seq, key->key, KEY_OP_INIT_VAL, 1017 key->seq, key->seq_len, key->key,
1018 KEY_OP_INIT_VAL,
1018 (u8 *) mac_addr, SYNC_BOTH_WMIFLAG); 1019 (u8 *) mac_addr, SYNC_BOTH_WMIFLAG);
1019 1020
1020 if (status) 1021 if (status)
@@ -1134,7 +1135,8 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
1134 status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, 1135 status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
1135 vif->def_txkey_index, 1136 vif->def_txkey_index,
1136 key_type, key_usage, 1137 key_type, key_usage,
1137 key->key_len, key->seq, key->key, 1138 key->key_len, key->seq, key->seq_len,
1139 key->key,
1138 KEY_OP_INIT_VAL, NULL, 1140 KEY_OP_INIT_VAL, NULL,
1139 SYNC_BOTH_WMIFLAG); 1141 SYNC_BOTH_WMIFLAG);
1140 if (status) 1142 if (status)