diff --git a/wmi/inc/wmi_unified_sta_param.h b/wmi/inc/wmi_unified_sta_param.h index 4276217b24..14eca73439 100644 --- a/wmi/inc/wmi_unified_sta_param.h +++ b/wmi/inc/wmi_unified_sta_param.h @@ -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 diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index bb75b67df0..de4806649a 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -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;