|
@@ -1,6 +1,6 @@
|
|
/*
|
|
/*
|
|
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
|
* 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
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
* 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;
|
|
int32_t phy_id;
|
|
struct target_psoc_info *tgt_psoc_info;
|
|
struct target_psoc_info *tgt_psoc_info;
|
|
struct target_pdev_info *tgt_pdev;
|
|
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) {
|
|
if (!is_scan_radio_supported) {
|
|
target_if_err("input argument is null");
|
|
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;
|
|
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 =
|
|
num_scan_radio_caps =
|
|
target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
|
|
target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
|
|
if (!num_scan_radio_caps)
|
|
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;
|
|
int32_t phy_id;
|
|
struct target_psoc_info *tgt_psoc_info;
|
|
struct target_psoc_info *tgt_psoc_info;
|
|
struct target_pdev_info *tgt_pdev;
|
|
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) {
|
|
if (!is_dfs_en) {
|
|
target_if_err("input argument is null");
|
|
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;
|
|
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 =
|
|
num_scan_radio_caps =
|
|
target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
|
|
target_psoc_get_num_scan_radio_caps(tgt_psoc_info);
|
|
if (!num_scan_radio_caps) {
|
|
if (!num_scan_radio_caps) {
|