소스 검색

qcacmn: Add Function pointer to Enable/Disable BW_Expand

When BW Expansion feature is enabled using UCI or cfg80211tool
command, the utility function to set/get the BW Expand feature
is introduced inside DFS module.

A new dfs member dfs_use_bw_expand is used to store the status
of BW Expansion feature.

CRs-Fixed: 3229250
Change-Id: If01e080f8e60e883fbeb2d7dfd599b91584bc293
Vijay Krishnan 3 년 전
부모
커밋
bcf7463728

+ 3 - 0
umac/dfs/core/src/dfs.h

@@ -1121,6 +1121,8 @@ struct dfs_rcac_params {
  *                                   bandwidth expansion feature.
  *                                   bandwidth expansion feature.
  * @dfs_bw_expand_des_mode:          User configured Channel Phymode for
  * @dfs_bw_expand_des_mode:          User configured Channel Phymode for
  *                                   bandwidth expansion feature.
  *                                   bandwidth expansion feature.
+ * @dfs_use_bw_expand:               User configured value for enabling or
+ *                                   disabling BW Expansion feature.
  * @dfs_agile_rcac_ucfg:             User configuration for Rolling CAC.
  * @dfs_agile_rcac_ucfg:             User configuration for Rolling CAC.
  * @dfs_fw_adfs_support_non_160:     Target Agile DFS support for non-160 BWs.
  * @dfs_fw_adfs_support_non_160:     Target Agile DFS support for non-160 BWs.
  * @dfs_fw_adfs_support_160:         Target Agile DFS support for 160 BW.
  * @dfs_fw_adfs_support_160:         Target Agile DFS support for 160 BW.
@@ -1295,6 +1297,7 @@ struct wlan_dfs {
 #if defined(QCA_DFS_BW_EXPAND)
 #if defined(QCA_DFS_BW_EXPAND)
 	qdf_freq_t      dfs_bw_expand_target_freq;
 	qdf_freq_t      dfs_bw_expand_target_freq;
 	enum wlan_phymode dfs_bw_expand_des_mode;
 	enum wlan_phymode dfs_bw_expand_des_mode;
+	bool           dfs_use_bw_expand;
 #endif
 #endif
 	uint8_t        dfs_agile_precac_ucfg:1,
 	uint8_t        dfs_agile_precac_ucfg:1,
 #if defined(QCA_SUPPORT_ADFS_RCAC)
 #if defined(QCA_SUPPORT_ADFS_RCAC)

+ 1 - 1
umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h

@@ -153,7 +153,7 @@ struct dfs_to_mlme {
 						    enum wlan_phymode des_mode);
 						    enum wlan_phymode des_mode);
 #endif
 #endif
 #endif
 #endif
-#ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
+#if defined(QCA_SUPPORT_DFS_CHAN_POSTNOL) || defined(QCA_DFS_BW_EXPAND)
 	QDF_STATUS
 	QDF_STATUS
 	(*mlme_postnol_chan_switch)(struct wlan_objmgr_pdev *pdev,
 	(*mlme_postnol_chan_switch)(struct wlan_objmgr_pdev *pdev,
 				    qdf_freq_t des_chan_freq,
 				    qdf_freq_t des_chan_freq,

+ 1 - 1
umac/dfs/dispatcher/src/wlan_dfs_init_deinit_api.c

@@ -79,7 +79,7 @@ register_dfs_precac_auto_chan_callbacks_freq(struct dfs_to_mlme *mlme_callback)
  * @mlme_callback: Pointer to dfs_to_mlme.
  * @mlme_callback: Pointer to dfs_to_mlme.
  */
  */
 #ifndef MOBILE_DFS_SUPPORT
 #ifndef MOBILE_DFS_SUPPORT
-#ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
+#if defined(QCA_SUPPORT_DFS_CHAN_POSTNOL) || defined(QCA_DFS_BW_EXPAND)
 static inline void
 static inline void
 register_dfs_postnol_csa_callback(struct dfs_to_mlme *mlme_callback)
 register_dfs_postnol_csa_callback(struct dfs_to_mlme *mlme_callback)
 {
 {

+ 9 - 0
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -2013,6 +2013,9 @@ struct wlan_lmac_if_wifi_pos_rx_ops {
  * @dfs_get_postnol_mode:             API to get phymode to switch to, post NOL.
  * @dfs_get_postnol_mode:             API to get phymode to switch to, post NOL.
  * @dfs_get_postnol_cfreq2:           API to get secondary center frequency to
  * @dfs_get_postnol_cfreq2:           API to get secondary center frequency to
  *                                    switch to, post NOL.
  *                                    switch to, post NOL.
+ * @dfs_set_bw_expand:                API to set BW Expansion feature.
+ * @dfs_get_bw_expand:                API to get the status of BW Expansion
+ *                                    feature.
  */
  */
 struct wlan_lmac_if_dfs_rx_ops {
 struct wlan_lmac_if_dfs_rx_ops {
 	QDF_STATUS (*dfs_get_radars)(struct wlan_objmgr_pdev *pdev);
 	QDF_STATUS (*dfs_get_radars)(struct wlan_objmgr_pdev *pdev);
@@ -2126,6 +2129,12 @@ struct wlan_lmac_if_dfs_rx_ops {
 	QDF_STATUS (*dfs_get_nol_subchannel_marking)(
 	QDF_STATUS (*dfs_get_nol_subchannel_marking)(
 			struct wlan_objmgr_pdev *pdev,
 			struct wlan_objmgr_pdev *pdev,
 			bool *value);
 			bool *value);
+	QDF_STATUS (*dfs_set_bw_expand)(
+			struct wlan_objmgr_pdev *pdev,
+			bool value);
+	QDF_STATUS (*dfs_get_bw_expand)(
+			struct wlan_objmgr_pdev *pdev,
+			bool *value);
 	QDF_STATUS (*dfs_set_bw_reduction)(struct wlan_objmgr_pdev *pdev,
 	QDF_STATUS (*dfs_set_bw_reduction)(struct wlan_objmgr_pdev *pdev,
 			bool value);
 			bool value);
 	QDF_STATUS (*dfs_is_bw_reduction_needed)(struct wlan_objmgr_pdev *pdev,
 	QDF_STATUS (*dfs_is_bw_reduction_needed)(struct wlan_objmgr_pdev *pdev,

+ 22 - 1
umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c

@@ -47,7 +47,7 @@
 #include <wlan_dfs_tgt_api.h>
 #include <wlan_dfs_tgt_api.h>
 #include <wlan_objmgr_vdev_obj.h>
 #include <wlan_objmgr_vdev_obj.h>
 #include <wlan_dfs_utils_api.h>
 #include <wlan_dfs_utils_api.h>
-#ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
+#if defined(QCA_SUPPORT_DFS_CHAN_POSTNOL) || defined(QCA_DFS_BW_EXPAND)
 #include <dfs_postnol_ucfg.h>
 #include <dfs_postnol_ucfg.h>
 #endif
 #endif
 #endif
 #endif
@@ -651,6 +651,26 @@ register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
 }
 }
 #endif
 #endif
 
 
+#ifdef QCA_DFS_BW_EXPAND
+/* register_dfs_bw_expand_rx_ops() - Register DFS Rx-Ops for BW Expand
+ * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
+ */
+static void
+register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
+{
+	if (!rx_ops)
+		return;
+
+	rx_ops->dfs_set_bw_expand = ucfg_dfs_set_bw_expand;
+	rx_ops->dfs_get_bw_expand = ucfg_dfs_get_bw_expand;
+}
+#else
+static inline void
+register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
+{
+}
+#endif
+
 #ifdef WLAN_MGMT_RX_REO_SUPPORT
 #ifdef WLAN_MGMT_RX_REO_SUPPORT
 static QDF_STATUS
 static QDF_STATUS
 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
@@ -804,6 +824,7 @@ wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
 	register_rcac_dfs_rx_ops(dfs_rx_ops);
 	register_rcac_dfs_rx_ops(dfs_rx_ops);
 	register_agile_dfs_rx_ops(dfs_rx_ops);
 	register_agile_dfs_rx_ops(dfs_rx_ops);
 	register_dfs_chan_postnol_rx_ops(dfs_rx_ops);
 	register_dfs_chan_postnol_rx_ops(dfs_rx_ops);
+	register_dfs_bw_expand_rx_ops(dfs_rx_ops);
 
 
 	return QDF_STATUS_SUCCESS;
 	return QDF_STATUS_SUCCESS;
 }
 }