qcacmn: Handle CSA_SWITCH_COUNT_STATUS_EVENTID
Currently, host decrements beacon switch count and sends channel switch frame every time until count becomes 0 this may introduce sync issue between fw and host. To avoid sync issue csa switch count is offloaded to fw. fw will send CSA_SWITCH_COUNT_STATUS_EVENTID once beacon count becomes 0 and host will send vdev restart once it recives CSA_SWITCH_COUNT_STATUS_EVENTID. Change-Id: I60238e8e83b56ca4c6490f9516d673d14ef9c323 CRs-Fixed: 2831356
This commit is contained in:
@@ -710,6 +710,51 @@ static int target_if_vdev_mgr_multi_vdev_restart_resp_handler(
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_vdev_csa_complete - CSA complete event handler
|
||||
* @psoc: psoc
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: 0 on success
|
||||
*/
|
||||
static int target_if_vdev_csa_complete(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct vdev_mlme_obj *vdev_mlme;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
int ret = 0;
|
||||
|
||||
if (!psoc) {
|
||||
mlme_err("Invalid input");
|
||||
return -EINVAL;
|
||||
}
|
||||
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||
WLAN_VDEV_TARGET_IF_ID);
|
||||
if (!vdev) {
|
||||
mlme_err("VDEV is NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
|
||||
if (!vdev_mlme) {
|
||||
mlme_err("VDEV_%d: PSOC_%d VDEV_MLME is NULL", vdev_id,
|
||||
wlan_psoc_get_id(psoc));
|
||||
ret = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((vdev_mlme->ops) && vdev_mlme->ops->mlme_vdev_csa_complete) {
|
||||
status = vdev_mlme->ops->mlme_vdev_csa_complete(vdev_mlme);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
mlme_err("vdev csa complete failed");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
}
|
||||
end:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_VDEV_TARGET_IF_ID);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_pdev_csa_status_event_handler - CSA event handler
|
||||
* @scn: Pointer to scn structure
|
||||
@@ -727,6 +772,7 @@ static int target_if_pdev_csa_status_event_handler(
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wmi_unified *wmi_handle;
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
int i;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!scn || !data) {
|
||||
@@ -760,6 +806,14 @@ static int target_if_pdev_csa_status_event_handler(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (wlan_psoc_nif_fw_ext_cap_get(psoc, WLAN_SOC_CEXT_CSA_TX_OFFLOAD)) {
|
||||
for (i = 0; i < csa_status.num_vdevs; i++) {
|
||||
if (!csa_status.current_switch_count)
|
||||
target_if_vdev_csa_complete(psoc,
|
||||
csa_status.vdev_ids[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return target_if_csa_switch_count_status(psoc, tgt_hdl, csa_status);
|
||||
}
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user