Эх сурвалжийг харах

qcacmn: Disable CAC timer in special vaps

Special vap on AR9887 (ap_monitor) is used as both monitor and
AP mode. During channel change on DFS channels, vap is not up till DFS
CAC timer completes and hence cfg80211tool is not releasing the
rtnl_lock.
For Scan radio, CAC timer can be disabled on DFS channels.

Change-Id: I6142325892401e3a374760179ec7e4e206296f33
CRs-Fixed: 3341288
Divya R 2 жил өмнө
parent
commit
2a176c8c3e

+ 36 - 1
target_if/core/src/target_if_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -856,6 +856,9 @@ target_pdev_is_scan_radio_supported(struct wlan_objmgr_pdev *pdev,
 	int32_t phy_id;
 	struct target_psoc_info *tgt_psoc_info;
 	struct target_pdev_info *tgt_pdev;
+	uint32_t target_type = TARGET_TYPE_UNKNOWN;
+	struct wlan_lmac_if_target_tx_ops *target_type_tx_ops;
+	struct wlan_lmac_if_tx_ops *tx_ops;
 
 	if (!is_scan_radio_supported) {
 		target_if_err("input argument is null");
@@ -880,6 +883,21 @@ target_pdev_is_scan_radio_supported(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
+	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+	if (!tx_ops) {
+		target_if_err("tx_ops is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+
+	target_type_tx_ops = &tx_ops->target_tx_ops;
+	if (target_type_tx_ops->tgt_get_tgt_type)
+		target_type = target_type_tx_ops->tgt_get_tgt_type(psoc);
+
+	if (target_type == TARGET_TYPE_AR9888) {
+		*is_scan_radio_supported = true;
+		return QDF_STATUS_SUCCESS;
+	}
+
 	num_scan_radio_caps =
 		target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
 	if (!num_scan_radio_caps)
@@ -922,6 +940,9 @@ target_pdev_scan_radio_is_dfs_enabled(struct wlan_objmgr_pdev *pdev,
 	int32_t phy_id;
 	struct target_psoc_info *tgt_psoc_info;
 	struct target_pdev_info *tgt_pdev;
+	uint32_t target_type = TARGET_TYPE_UNKNOWN;
+	struct wlan_lmac_if_target_tx_ops *target_type_tx_ops;
+	struct wlan_lmac_if_tx_ops *tx_ops;
 
 	if (!is_dfs_en) {
 		target_if_err("input argument is null");
@@ -946,6 +967,20 @@ target_pdev_scan_radio_is_dfs_enabled(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_INVAL;
 	}
 
+	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
+	if (!tx_ops) {
+		target_if_err("tx_ops is null");
+		return QDF_STATUS_E_NULL_VALUE;
+	}
+	target_type_tx_ops = &tx_ops->target_tx_ops;
+	if (target_type_tx_ops->tgt_get_tgt_type)
+		target_type = target_type_tx_ops->tgt_get_tgt_type(psoc);
+
+	if (target_type == TARGET_TYPE_AR9888) {
+		*is_dfs_en = false;
+		return QDF_STATUS_SUCCESS;
+	}
+
 	num_scan_radio_caps =
 		target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
 	if (!num_scan_radio_caps) {