diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index ee9945c6e3..b19548626f 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -597,6 +597,7 @@ struct wlan_lmac_if_reg_tx_ops { * support. * @dfs_send_avg_radar_params_to_fw: Send average radar parameters to FW. * @dfs_send_usenol_pdev_param: Send usenol pdev param to FW. + * @dfs_send_subchan_marking_pdev_param: Send subchan marking pdev param to FW. */ struct wlan_lmac_if_dfs_tx_ops { @@ -643,6 +644,9 @@ struct wlan_lmac_if_dfs_tx_ops { struct dfs_radar_found_params *params); QDF_STATUS (*dfs_send_usenol_pdev_param)(struct wlan_objmgr_pdev *pdev, bool usenol); + QDF_STATUS (*dfs_send_subchan_marking_pdev_param)( + struct wlan_objmgr_pdev *pdev, + bool subchanmark); }; /** diff --git a/wmi/inc/wmi_unified_dfs_api.h b/wmi/inc/wmi_unified_dfs_api.h index 1626e5bd88..b7e644702d 100644 --- a/wmi/inc/wmi_unified_dfs_api.h +++ b/wmi/inc/wmi_unified_dfs_api.h @@ -70,6 +70,7 @@ QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl, uint32_t len); #endif +#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) /** * wmi_send_usenol_pdev_param() - function to send usenol pdev param. * @wmi_hdl: wmi handle @@ -78,9 +79,22 @@ QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl, * * Return: QDF_STATUS */ -#if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, struct wlan_objmgr_pdev *pdev); + +/** + * wmi_send_subchan_marking_pdev_param() - Function to send subchannel + * marking pdev param. + * @wmi_hdl: WMI handle. + * @subchanmark: Value of use subchannel marking. + * @pdev: Pointer to objmgr_pdev structure. + * + * Return: QDF_STATUS + */ +QDF_STATUS +wmi_send_subchan_marking_pdev_param(void *wmi_hdl, + bool subchanmark, + struct wlan_objmgr_pdev *pdev); #else static inline QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, @@ -88,5 +102,13 @@ wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, { return QDF_STATUS_SUCCESS; } + +static inline QDF_STATUS +wmi_send_subchan_marking_pdev_param(void *wmi_hdl, + bool subchanmark, + struct wlan_objmgr_pdev *pdev) +{ + return QDF_STATUS_SUCCESS; +} #endif #endif /* _WMI_UNIFIED_DFS_API_H_ */ diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 734d901102..d827352dc4 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -4934,6 +4934,7 @@ typedef enum { wmi_pdev_param_enable_peer_retry_stats, wmi_pdev_param_ul_trig_int, wmi_pdev_param_max, + wmi_pdev_param_sub_channel_marking, } wmi_conv_pdev_params_id; diff --git a/wmi/src/wmi_unified_dfs_api.c b/wmi/src/wmi_unified_dfs_api.c index 062402d57a..05bf68c5ff 100644 --- a/wmi/src/wmi_unified_dfs_api.c +++ b/wmi/src/wmi_unified_dfs_api.c @@ -93,4 +93,25 @@ QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx); } + +QDF_STATUS +wmi_send_subchan_marking_pdev_param(void *wmi_hdl, + bool subchanmark, + struct wlan_objmgr_pdev *pdev) +{ + struct pdev_params pparam; + int pdev_idx; + struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; + + pdev_idx = lmac_get_pdev_idx(pdev); + if (pdev_idx < 0) + return QDF_STATUS_E_FAILURE; + + qdf_mem_set(&pparam, sizeof(pparam), 0); + pparam.param_id = wmi_pdev_param_sub_channel_marking; + pparam.param_value = subchanmark; + + return wmi_unified_pdev_param_send(wmi_handle, &pparam, pdev_idx); +} + #endif diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 2269330446..ef5eb54f93 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -12118,6 +12118,8 @@ static void populate_pdev_param_tlv(uint32_t *pdev_param) /* Trigger interval for all trigger types. */ pdev_param[wmi_pdev_param_ul_trig_int] = WMI_PDEV_PARAM_SET_UL_BSR_TRIG_INTERVAL; + pdev_param[wmi_pdev_param_sub_channel_marking] = + WMI_PDEV_PARAM_SUB_CHANNEL_MARKING; } /**