mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Handle multiple keyix cases for WEP
Add a check to see if the key index is more than 4. Assign default key_id of 0 if an invalid index is provided. Change-Id: Ic3a4230360f1fa4e05dfd3ba4f558ff0fb074aef CRs-fixed: 1103920
This commit is contained in:
parent
4c94ce779f
commit
a1e3bcfaf0
1 changed files with 4 additions and 0 deletions
|
|
@ -4152,6 +4152,10 @@ QDF_STATUS send_setup_install_key_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
(wmi_vdev_install_key_cmd_fixed_param));
|
||||
cmd->vdev_id = key_params->vdev_id;
|
||||
cmd->key_ix = key_params->key_idx;
|
||||
|
||||
if (key_params->key_idx >= (IEEE80211_WEP_NKID + 1))
|
||||
cmd->key_ix = 0;
|
||||
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(key_params->peer_mac, &cmd->peer_macaddr);
|
||||
cmd->key_flags |= key_params->key_flags;
|
||||
cmd->key_cipher = key_params->key_cipher;
|
||||
|
|
|
|||
Loading…
Reference in a new issue