qcacmn: Allow to set zero count action oui entry

Allow to set zero count action oui entry to clear the
target setting.

Change-Id: I76af4d7067a0764cfae0a1a4c378c3cbcb572402
CRs-Fixed: 3316588
This commit is contained in:
Liangwei Dong
2022-10-18 15:05:43 +08:00
committed by Madan Koyyalamudi
parent 71b1f90eb3
commit c4c0d15a2c

View File

@@ -219,8 +219,7 @@ send_action_oui_cmd_tlv(wmi_unified_t wmi_handle,
len = sizeof(*cmd);
len += WMI_TLV_HDR_SIZE; /* Array of wmi_vendor_oui_ext structures */
if (!no_oui_extns ||
no_oui_extns > WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION ||
if (no_oui_extns > WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION ||
(total_no_oui_extns > WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID *
WMI_MAX_VENDOR_OUI_ACTION_SUPPORTED_PER_ACTION)) {
wmi_err("Invalid number of action oui extensions");
@@ -232,6 +231,8 @@ send_action_oui_cmd_tlv(wmi_unified_t wmi_handle,
wmi_err("Invalid action id");
return QDF_STATUS_E_INVAL;
}
wmi_debug("wmi action_id %d num %d total_num %d", action_id,
no_oui_extns, total_no_oui_extns);
len += no_oui_extns * sizeof(*cmd_ext);
len += WMI_TLV_HDR_SIZE; /* Variable length buffer */
@@ -286,6 +287,7 @@ send_action_oui_cmd_tlv(wmi_unified_t wmi_handle,
if (!QDF_IS_STATUS_SUCCESS(status)) {
wmi_buf_free(wmi_buf);
wmi_buf = NULL;
wmi_err("failed to fill oui ext status %d", status);
return QDF_STATUS_E_INVAL;
}