qcacmn: Don't allow PASN peer create if peer del all is not supported
Firmware advertises WMI_SERVICE_DELETE_ALL_PEER_SUPPORT capability to indicate vdev peer delete all command support. PASN peer relies on the WMI_VDEV_DELETE_ALL_PEER_CMDID command to delete the PASN peers before vdev delete. So allow PASN peer create only on targets that advertise WMI_SERVICE_DELETE_ALL_PEER_SUPPORT. Change-Id: Ib94d9e14e34dd1e5c25bf6946e0d59fe83fd6dd3 CRs-Fixed: 3229438
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f2a742540b
commit
728ff15ea3
@@ -390,6 +390,10 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle,
|
||||
cdp_soc_set_param(wlan_psoc_get_dp_handle(psoc),
|
||||
DP_SOC_PARAM_MULTI_PEER_GRP_CMD_SUPPORT, 1);
|
||||
|
||||
if (wmi_service_enabled(wmi_handle, wmi_service_vdev_delete_all_peer))
|
||||
wlan_psoc_nif_fw_ext2_cap_set(psoc,
|
||||
WLAN_VDEV_DELETE_ALL_PEER_SUPPORT);
|
||||
|
||||
init_deinit_update_rssi_dbm_conv_support(wmi_handle, psoc);
|
||||
|
||||
init_deinit_update_multi_client_ll_caps(wmi_handle, psoc);
|
||||
|
@@ -166,23 +166,31 @@ int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
|
||||
|
||||
data = qdf_mem_malloc(sizeof(*data));
|
||||
if (!data)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
return -ENOMEM;
|
||||
|
||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
qdf_mem_free(data);
|
||||
return QDF_STATUS_NOT_INITIALIZED;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wlan_objmgr_psoc_get_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||
|
||||
if (!wlan_psoc_nif_fw_ext2_cap_get(psoc,
|
||||
WLAN_VDEV_DELETE_ALL_PEER_SUPPORT)) {
|
||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||
qdf_mem_free(data);
|
||||
target_if_debug("Firmware doesn't support Peer delete all");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||
qdf_mem_free(data);
|
||||
target_if_err("wmi_handle is null");
|
||||
return QDF_STATUS_NOT_INITIALIZED;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
status = wmi_extract_pasn_peer_create_req(wmi_handle, buf, data);
|
||||
@@ -190,7 +198,7 @@ int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
|
||||
wifi_pos_err("Extract PASN peer create failed");
|
||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||
qdf_mem_free(data);
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rx_ops = wifi_pos_get_rx_ops(psoc);
|
||||
@@ -199,7 +207,7 @@ int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
|
||||
!rx_ops ? "rx_ops" : "rx_ops_cb");
|
||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_WIFI_POS_TGT_IF_ID);
|
||||
qdf_mem_free(data);
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rx_ops->wifi_pos_ranging_peer_create_cb(psoc, data->peer_info,
|
||||
|
@@ -247,6 +247,9 @@
|
||||
/* vendor handoff control feature support */
|
||||
#define WLAN_SOC_VENDOR_HANDOFF_CONTROL 0x00000020
|
||||
|
||||
/* Delete all vdev peer support */
|
||||
#define WLAN_VDEV_DELETE_ALL_PEER_SUPPORT 0x00000040
|
||||
|
||||
/* PSOC op flags */
|
||||
|
||||
/* Invalid VHT cap */
|
||||
|
Reference in New Issue
Block a user