mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacmn: Fix radar detection failure for DA and PO
DFS capability was not set properly for Partial-offload(PO) and Direct-Attach(DA) radio. Thus radar detection failed. Change-Id: I5493d7195a57f160792a411653c05bbf220d3561 CRs-Fixed: 2160418
This commit is contained in:
parent
aa1810a8fb
commit
8136b58f56
3 changed files with 53 additions and 6 deletions
|
|
@ -57,10 +57,11 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_MCL
|
||||
#define TARGET_TYPE_AR900B 9
|
||||
#define TARGET_TYPE_AR900B 9 /* Beeliner */
|
||||
#define TARGET_TYPE_QCA9984 15 /* cascade */
|
||||
#define TARGET_TYPE_IPQ4019 16 /* dakota */
|
||||
#define TARGET_TYPE_QCA9888 17 /* besra */
|
||||
#define TARGET_TYPE_AR9888 7 /* Peregrine */
|
||||
#endif
|
||||
|
||||
typedef struct wlan_objmgr_psoc *(*get_psoc_handle_callback)(
|
||||
|
|
|
|||
|
|
@ -457,17 +457,55 @@ static QDF_STATUS target_if_dfs_set_phyerr_filter_offload(
|
|||
static QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_dfs_caps *dfs_caps)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc = NULL;
|
||||
struct target_psoc_info *tgt_psoc_info;
|
||||
|
||||
if (!dfs_caps) {
|
||||
target_if_err("null dfs_caps");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
dfs_caps->wlan_chip_is_bb_tlv = 1;
|
||||
dfs_caps->wlan_dfs_combined_rssi_ok = 0;
|
||||
dfs_caps->wlan_dfs_ext_chan_ok = 0;
|
||||
dfs_caps->wlan_dfs_use_enhancement = 0;
|
||||
dfs_caps->wlan_strong_signal_diversiry = 0;
|
||||
dfs_caps->wlan_fastdiv_val = 0;
|
||||
dfs_caps->wlan_chip_is_bb_tlv = 1;
|
||||
dfs_caps->wlan_chip_is_over_sampled = 0;
|
||||
dfs_caps->wlan_chip_is_ht160 = 0;
|
||||
dfs_caps->wlan_chip_is_false_detect = 0;
|
||||
|
||||
psoc = wlan_pdev_get_psoc(pdev);
|
||||
if (!psoc) {
|
||||
target_if_err("null psoc");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
tgt_psoc_info = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
if (!tgt_psoc_info) {
|
||||
target_if_err("null tgt_psoc_info");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
switch (tgt_psoc_info->target_type) {
|
||||
case TARGET_TYPE_AR900B:
|
||||
break;
|
||||
|
||||
case TARGET_TYPE_IPQ4019:
|
||||
dfs_caps->wlan_chip_is_false_detect = 0;
|
||||
break;
|
||||
|
||||
case TARGET_TYPE_AR9888:
|
||||
dfs_caps->wlan_chip_is_over_sampled = 1;
|
||||
break;
|
||||
|
||||
case TARGET_TYPE_QCA9984:
|
||||
case TARGET_TYPE_QCA9888:
|
||||
dfs_caps->wlan_chip_is_ht160 = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011, Atheros Communications Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
|
|
@ -457,17 +457,25 @@ void dfs_get_radars(struct wlan_dfs *dfs)
|
|||
#define AR9300_DEVID_AR956X_PCIE 0x0036 /* Aphrodite: 1x1 DB + BT - AR9564 */
|
||||
#define AR9300_DEVID_EMU_PCIE 0xabcd
|
||||
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
if (!dfs) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "dfs is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
if (lmac_is_mode_offload(dfs->dfs_pdev_obj)) {
|
||||
/* For offload */
|
||||
psoc = wlan_pdev_get_psoc(dfs->dfs_pdev_obj);
|
||||
if (!psoc) {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "psoc is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
if (wlan_objmgr_psoc_get_dev_type(psoc) == WLAN_DEV_OL) {
|
||||
/* For offload chip */
|
||||
ol_if_dfs_configure(dfs);
|
||||
} else {
|
||||
uint16_t devid = lmac_get_ah_devid(dfs->dfs_pdev_obj);
|
||||
/* For DA */
|
||||
/* For DA chip*/
|
||||
|
||||
switch (devid) {
|
||||
case AR5212_DEVID_IBM:
|
||||
|
|
|
|||
Loading…
Reference in a new issue