Explorar el Código

qcacmn: Remove opmode check for WIN in vdev_mgr_start_param_update

When staDFSEn option is enabled in the UCI, radar detection fails on a
STA VAP.

In the function vdev_mgr_start_param_update,since there is a condition
check for QDF_SAP_MODE and QDF_P2P_GO_MODE, the
tgt_dfs_set_current_channel_for_freq function does not get calledin case
of STA opmode.

As a result, DFS flag does not get set for the dfs->dfs_curchan,
and DFS_RADAR_EN flag does not get set for dfs->dfs_proc_phyerr.
Therefore, within the function dfs_process_phyerr, the function returns
without processing the radar pulses.

To fix this issue, add a new function
vdev_mgr_check_opmode_and_des_chan_freq under a macro
QCA_MCL_DFS_SUPPORT. If QCA_MCL_DFS_SUPPORT is defined, check the opmode
of the vdev, and frequency band of des_chan_freq. If QCA_MCL_DFS_SUPPORT
is not defined, return true.

Change-Id: I66fe3d4ccc0b75b70652b04f9bf93b199268f1fa
CRs-Fixed: 2640208
Hariharan Basuthkar hace 5 años
padre
commit
e10cc0fc38
Se han modificado 1 ficheros con 26 adiciones y 4 borrados
  1. 26 4
      umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

+ 26 - 4
umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c

@@ -90,6 +90,30 @@ QDF_STATUS vdev_mgr_create_send(struct vdev_mlme_obj *mlme_obj)
 	return status;
 }
 
+#ifdef QCA_MCL_DFS_SUPPORT
+static bool vdev_mgr_is_opmode_sap_or_p2p_go(enum QDF_OPMODE op_mode)
+{
+	return (op_mode == QDF_SAP_MODE || op_mode == QDF_P2P_GO_MODE);
+}
+
+static bool vdev_mgr_is_49G_5G_6G_chan_freq(uint16_t chan_freq)
+{
+	return WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq) ||
+		WLAN_REG_IS_49GHZ_FREQ(chan_freq) ||
+		WLAN_REG_IS_6GHZ_CHAN_FREQ(chan_freq);
+}
+#else
+static inline bool vdev_mgr_is_opmode_sap_or_p2p_go(enum QDF_OPMODE op_mode)
+{
+	return true;
+}
+
+static inline bool vdev_mgr_is_49G_5G_6G_chan_freq(uint16_t chan_freq)
+{
+	return true;
+}
+#endif
+
 static QDF_STATUS vdev_mgr_start_param_update(
 					struct vdev_mlme_obj *mlme_obj,
 					struct vdev_start_params *param)
@@ -123,10 +147,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 ((op_mode == QDF_SAP_MODE || op_mode == QDF_P2P_GO_MODE) &&
-	    (WLAN_REG_IS_5GHZ_CH_FREQ(des_chan->ch_freq) ||
-	     WLAN_REG_IS_49GHZ_FREQ(des_chan->ch_freq) ||
-	     WLAN_REG_IS_6GHZ_CHAN_FREQ(des_chan->ch_freq)))
+	if (vdev_mgr_is_opmode_sap_or_p2p_go(op_mode) &&
+	    vdev_mgr_is_49G_5G_6G_chan_freq(des_chan->ch_freq))
 		tgt_dfs_set_current_channel_for_freq(pdev, des_chan->ch_freq,
 						     des_chan->ch_flags,
 						     des_chan->ch_flagext,