Browse Source

qcacmn: Introduce function to check max phy REP

If the rpt_max_phy featurte is enabled, the AP VAP of a
repeater may come up in chan 36 HT160 mode while the STA
of the repeater may come up in chan 36 HT80 mode. The
ic_curchan has the max BW value(i.e. 160 MHz). In this
case, ic_curchan is HT160. But dfs_curchan is updated
to HT80 by the API vdev_mgr_start_param_update. The
updated BW is send via VDEV START command.

This creates a mismatch between FW and HOST. FW has the BW
as HT160 and HOST has the BW as HT80. At this time, if
radar is found on chan 36, Host rejects the radar because
dfs_curchan is 36HT80 and it is a non-dfs channel. FW stops
beaconing because of no respone from host.

Fix: Dont send the VDEV START command, if the repeater max
phy mode is enabled.

This patch introduce a new API wlan_rptr_check_rpt_max_phy
that is used to invoke WIN API wlan_check_rpt_max_phy if
repeater max phy mode is enabled or not.

Before sending VDEV START command, check if the opmode is STA,
and repeater max phymode is not enabled. If the two conditions
satisfy, then send VDEV START command.

CRs-Fixed: 3613048
Change-Id: I072f62fe038c5f4dfae0318fff54189dca9e5a46
Vijay Krishnan 1 year ago
parent
commit
419023d09e
2 changed files with 26 additions and 1 deletions
  1. 9 0
      umac/mlme/include/wlan_pdev_mlme.h
  2. 17 1
      umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

+ 9 - 0
umac/mlme/include/wlan_pdev_mlme.h

@@ -61,4 +61,13 @@ struct pdev_mlme_obj {
 	qdf_atomic_t multivdev_restart_wait_cnt;
 };
 
+#ifdef MOBILE_DFS_SUPPORT
+static inline
+bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev)
+{
+	return false;
+}
+#else
+bool wlan_rptr_check_rpt_max_phy(struct wlan_objmgr_pdev *pdev);
+#endif /* MOBILE_DFS_SUPPORT */
 #endif

+ 17 - 1
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -26,6 +26,7 @@
 #include "vdev_mgr_ops.h"
 #include <wlan_objmgr_vdev_obj.h>
 #include <wlan_vdev_mlme_api.h>
+#include <wlan_pdev_mlme.h>
 #include <wlan_mlme_dbg.h>
 #include <wlan_vdev_mgr_tgt_if_tx_api.h>
 #include <target_if.h>
@@ -426,12 +427,26 @@ vdev_mgr_start_param_update_cac_ms(struct wlan_objmgr_vdev *vdev,
 	param->cac_duration_ms =
 			wlan_util_vdev_mgr_get_cac_timeout_for_vdev(vdev);
 }
+
+static inline
+bool vdev_mgr_is_sta_max_phy_enabled(enum QDF_OPMODE op_mode,
+				     struct wlan_objmgr_pdev *pdev)
+{
+	return false;
+}
 #else
 static void
 vdev_mgr_start_param_update_cac_ms(struct wlan_objmgr_vdev *vdev,
 				   struct vdev_start_params *param)
 {
 }
+
+static inline
+bool vdev_mgr_is_sta_max_phy_enabled(enum QDF_OPMODE op_mode,
+				     struct wlan_objmgr_pdev *pdev)
+{
+	return (op_mode == QDF_STA_MODE && wlan_rptr_check_rpt_max_phy(pdev));
+}
 #endif
 
 static QDF_STATUS vdev_mgr_start_param_update(
@@ -470,7 +485,8 @@ static QDF_STATUS vdev_mgr_start_param_update(
 	param->vdev_id = wlan_vdev_get_id(vdev);
 
 	op_mode = wlan_vdev_mlme_get_opmode(vdev);
-	if (vdev_mgr_is_opmode_sap_or_p2p_go(op_mode) &&
+	if (!vdev_mgr_is_sta_max_phy_enabled(op_mode, pdev) &&
+	    vdev_mgr_is_opmode_sap_or_p2p_go(op_mode) &&
 	    vdev_mgr_is_49G_5G_chan_freq(des_chan->ch_freq)) {
 		vdev_mgr_set_cur_chan_punc_bitmap(des_chan, &puncture_bitmap);
 		tgt_dfs_set_current_channel_for_freq(pdev, des_chan->ch_freq,