qcacld-3.0: Add async event for Spatial Reuse

Add async event for Spatial Reuse and also send Spatial Reuse
enable / disable event to upper layer due to same MAC concurrency.

Change-Id: Idcb5b99e39f1810e63ae7ac1e8d2eab6028a163f
CRs-Fixed: 3307801
This commit is contained in:
Rachit Kankane
2022-10-07 21:29:19 +05:30
committed by Madan Koyyalamudi
parent 45f42c90a8
commit 14e356b81e
11 changed files with 309 additions and 6 deletions

View File

@@ -20,6 +20,10 @@
#include <spatial_reuse_api.h>
#include <target_if_spatial_reuse.h>
struct sr_cb {
sr_osif_event_cb send_osif_event;
} sr_cb;
QDF_STATUS wlan_spatial_reuse_config_set(struct wlan_objmgr_vdev *vdev,
uint8_t sr_ctrl,
uint8_t non_srg_max_pd_offset)
@@ -114,3 +118,19 @@ QDF_STATUS wlan_spatial_reuse_pdev_init(struct wlan_objmgr_pdev *pdev)
return wmi_unified_pdev_param_send(wmi_handle, &pparam,
WILDCARD_PDEV_ID);
}
void wlan_sr_register_callback(struct wlan_objmgr_psoc *psoc,
sr_osif_event_cb cb)
{
if (!psoc)
return;
sr_cb.send_osif_event = cb;
}
void wlan_spatial_reuse_osif_event(struct wlan_objmgr_vdev *vdev,
enum sr_osif_operation sr_osif_oper,
enum sr_osif_reason_code sr_osif_rc)
{
if (sr_cb.send_osif_event)
sr_cb.send_osif_event(vdev, sr_osif_oper, sr_osif_rc);
}

View File

@@ -21,6 +21,12 @@
#include <spatial_reuse_ucfg_api.h>
#include <spatial_reuse_api.h>
void ucfg_spatial_reuse_register_cb(struct wlan_objmgr_psoc *psoc,
sr_osif_event_cb cb)
{
wlan_sr_register_callback(psoc, cb);
}
void ucfg_spatial_reuse_get_sr_config(struct wlan_objmgr_vdev *vdev,
uint8_t *sr_ctrl,
uint8_t *non_srg_max_pd_offset,