qcacld-3.0: Return chain_mask for legacy chip

wma_get_caps_for_phyidx_hwmode should return correct
tx/rx chain mask for 2G and 5G from target capability
info struct when the chip is legacy(no dbs support).

Change-Id: Ia02c9d5ae7c5376c5fe521fc47f97b51ad9980d5
CRs-Fixed: 2478143
This commit is contained in:
Liangwei Dong 2019-06-25 05:53:43 -04:00
parent 49083fa355
commit 4d479e38e8
2 changed files with 23 additions and 0 deletions

View File

@ -390,6 +390,19 @@
((hw_mode & WMA_HW_MODE_SBS_MODE_MASK) >> \
WMA_HW_MODE_SBS_MODE_BITPOS)
/*
* Extract 2G or 5G tx/rx chainmask
* format of txrx_chainmask (from wmi_service_ready_event_fixed_param):
* [7:0] - 2G band tx chain mask
* [15:8] - 2G band rx chain mask
* [23:16] - 5G band tx chain mask
* [31:24] - 5G band rx chain mask
*/
#define EXTRACT_TX_CHAIN_MASK_2G(chainmask) ((chainmask) & 0xFF)
#define EXTRACT_RX_CHAIN_MASK_2G(chainmask) (((chainmask) >> 8) & 0xFF)
#define EXTRACT_TX_CHAIN_MASK_5G(chainmask) (((chainmask) >> 16) & 0xFF)
#define EXTRACT_RX_CHAIN_MASK_5G(chainmask) (((chainmask) >> 24) & 0xFF)
/*
* PROBE_REQ_TX_DELAY
* param to specify probe request Tx delay for scans triggered on this VDEV

View File

@ -6349,6 +6349,7 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
int ht_cap_info, vht_cap_info;
uint8_t phyid, our_hw_mode = hw_mode, num_hw_modes;
struct wlan_psoc_host_mac_phy_caps *mac_phy_cap;
struct wlan_psoc_target_capability_info *tgt_cap_info;
if (!wma_handle) {
WMA_LOGE("Invalid wma handle");
@ -6365,6 +6366,7 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
vht_cap_info = target_if_get_vht_cap_info(tgt_hdl);
num_hw_modes = target_psoc_get_num_hw_modes(tgt_hdl);
mac_phy_cap = target_psoc_get_mac_phy_cap(tgt_hdl);
tgt_cap_info = target_psoc_get_target_caps(tgt_hdl);
if (!num_hw_modes) {
WMA_LOGD("Invalid number of hw modes, use legacy HT/VHT caps");
@ -6377,6 +6379,14 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
caps_per_phy->he_2g[1] = 0;
caps_per_phy->he_5g[0] = 0;
caps_per_phy->he_5g[1] = 0;
caps_per_phy->tx_chain_mask_2G =
EXTRACT_TX_CHAIN_MASK_2G(tgt_cap_info->txrx_chainmask);
caps_per_phy->rx_chain_mask_2G =
EXTRACT_RX_CHAIN_MASK_2G(tgt_cap_info->txrx_chainmask);
caps_per_phy->tx_chain_mask_5G =
EXTRACT_TX_CHAIN_MASK_5G(tgt_cap_info->txrx_chainmask);
caps_per_phy->rx_chain_mask_5G =
EXTRACT_RX_CHAIN_MASK_5G(tgt_cap_info->txrx_chainmask);
return QDF_STATUS_SUCCESS;
}