qcacmn: Set WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL only for pmksa_flush
The supplicant sends del_pmksa command to delete the pmk,pmkid for a particular bssid. In this command pmk_len will be 0. In send_set_del_pmkid_cache_cmd_tlv() the host driver currently checks the pmk_len to set WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL. If pmk_len is 0 WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL is set, which is not correct. pmk_len will be zero in both the flush and delete cases. So add a new flag is_flush_all which will be set to true when the supplicant sends pmksa flush command. At WMI based on this flag set the flush flag to the wmi cmd. Change-Id: I7626c500721a4b8cccbb21a08d4235c041456d1b CRs-Fixed: 2502478
This commit is contained in:

committed by
nshrivas

parent
43168e82c6
commit
63eb9e48dd
@@ -204,6 +204,8 @@ struct sar_limit_event {
|
||||
* @cache_id: PMK Cache ID
|
||||
* @cat_flag: whether (bssid) or (ssid,cache_id) is valid
|
||||
* @action_flag: add/delete the entry
|
||||
* @is_flush_all: FLAG to indicate PMKSA flush. True if PMKSA cache flush is
|
||||
* needed.
|
||||
*/
|
||||
struct wmi_unified_pmk_cache {
|
||||
uint8_t vdev_id;
|
||||
@@ -216,6 +218,7 @@ struct wmi_unified_pmk_cache {
|
||||
uint32_t cache_id;
|
||||
uint32_t cat_flag;
|
||||
uint32_t action_flag;
|
||||
bool is_flush_all;
|
||||
};
|
||||
|
||||
#define WMI_QOS_NUM_AC_MAX 4
|
||||
|
@@ -1581,7 +1581,8 @@ static QDF_STATUS send_set_del_pmkid_cache_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
wmi_pmk_cache *pmksa;
|
||||
uint32_t len = sizeof(*cmd);
|
||||
|
||||
if (pmk_info->pmk_len)
|
||||
if (pmk_info &&
|
||||
!pmk_info->is_flush_all)
|
||||
len += WMI_TLV_HDR_SIZE + sizeof(*pmksa);
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
@@ -1599,8 +1600,8 @@ static QDF_STATUS send_set_del_pmkid_cache_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
|
||||
cmd->vdev_id = pmk_info->vdev_id;
|
||||
|
||||
/* If pmk_info->pmk_len is 0, this is a flush request */
|
||||
if (!pmk_info->pmk_len) {
|
||||
/* If pmk_info->is_flush_all is true, this is a flush request */
|
||||
if (pmk_info->is_flush_all) {
|
||||
cmd->op_flag = WMI_PMK_CACHE_OP_FLAG_FLUSH_ALL;
|
||||
cmd->num_cache = 0;
|
||||
goto send_cmd;
|
||||
|
Reference in New Issue
Block a user