mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-19 19:20:58 -04:00
qcacld-3.0: Add RX LDPC support for legacy platforms
wma_get_caps_for_phyidx_hwmode() does not check legacy chips like Rome, which leads to wrong HT/VHT caps being populated. Fix is to check legacy chips in wma_get_caps_for_phyidx_hwmode() and populate HT/VHT caps accordingly including RX LDPC capability. Change-Id: I496191636f0f21ef3399c24fbfb43a562ca2debc CRs-Fixed: 2061889
This commit is contained in:
parent
70d3d931d9
commit
080abce12e
1 changed files with 25 additions and 6 deletions
|
|
@ -5241,8 +5241,16 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
|
|||
}
|
||||
|
||||
if (0 == wma_handle->phy_caps.num_hw_modes.num_hw_modes) {
|
||||
WMA_LOGE("Invalid number of hw modes");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
WMA_LOGD("Invalid number of hw modes, use legacy HT/VHT caps");
|
||||
caps_per_phy->ht_2g = wma_handle->ht_cap_info;
|
||||
caps_per_phy->ht_5g = wma_handle->ht_cap_info;
|
||||
caps_per_phy->vht_2g = wma_handle->vht_cap_info;
|
||||
caps_per_phy->vht_5g = wma_handle->vht_cap_info;
|
||||
/* legacy platform doesn't support HE IE */
|
||||
caps_per_phy->he_2g = 0;
|
||||
caps_per_phy->he_5g = 0;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!policy_mgr_is_dbs_enable(wma_handle->psoc))
|
||||
|
|
@ -5282,6 +5290,7 @@ QDF_STATUS wma_get_caps_for_phyidx_hwmode(struct wma_caps_per_phy *caps_per_phy,
|
|||
*/
|
||||
bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel)
|
||||
{
|
||||
t_wma_handle *wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
struct wma_caps_per_phy caps_per_phy = {0};
|
||||
enum cds_band_type band;
|
||||
bool status;
|
||||
|
|
@ -5296,10 +5305,20 @@ bool wma_is_rx_ldpc_supported_for_channel(uint32_t channel)
|
|||
HW_MODE_DBS, band)) {
|
||||
return false;
|
||||
}
|
||||
if (WLAN_REG_IS_24GHZ_CH(channel))
|
||||
status = (!!(caps_per_phy.ht_2g & WMI_HT_CAP_RX_LDPC));
|
||||
else
|
||||
status = (!!(caps_per_phy.ht_5g & WMI_HT_CAP_RX_LDPC));
|
||||
|
||||
/*
|
||||
* Legacy platforms like Rome set WMI_HT_CAP_LDPC to specify RX LDPC
|
||||
* capability. But new platforms like Helium set WMI_HT_CAP_RX_LDPC
|
||||
* instead.
|
||||
*/
|
||||
if (wma_handle->phy_caps.num_hw_modes.num_hw_modes == 0) {
|
||||
status = (!!(caps_per_phy.ht_2g & WMI_HT_CAP_LDPC));
|
||||
} else {
|
||||
if (WLAN_REG_IS_24GHZ_CH(channel))
|
||||
status = (!!(caps_per_phy.ht_2g & WMI_HT_CAP_RX_LDPC));
|
||||
else
|
||||
status = (!!(caps_per_phy.ht_5g & WMI_HT_CAP_RX_LDPC));
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue