From 305d509e751331636ecaa3c690771bbcc193742d Mon Sep 17 00:00:00 2001 From: Sandeep Puligilla Date: Mon, 16 Apr 2018 14:40:50 -0700 Subject: [PATCH] qcacld-3.0: Enable wiphy RxLDPC for 5G band RxLDPC is disabled in wiphy 5g capability due to which hostapd is failed to start in 5G channel with RXLDPC enabled. Read the RxLDPC capability value of 5G from single MAC mode and update wiphy 5g band capability structure to enable the RxLDPC. Change-Id: Iec2b3674207d5f9ec13a40e110342d6b67ca391c CRs-Fixed: 2215101 --- core/hdd/src/wlan_hdd_main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b2975740f3b3..78ac8e2c82a6 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1425,6 +1425,7 @@ static void hdd_update_tgt_vht_cap(struct hdd_context *hdd_ctx, uint32_t temp = 0; uint32_t ch_width = eHT_CHANNEL_WIDTH_80MHZ; uint32_t hw_rx_ldpc_enabled; + struct wma_caps_per_phy caps_per_phy; if (!band_5g) { hdd_debug("5GHz band disabled, skipping capability population"); @@ -1719,8 +1720,22 @@ static void hdd_update_tgt_vht_cap(struct hdd_context *hdd_ctx, hdd_err("failed to set SHORT GI 160MHZ"); } - if (cfg->vht_rx_ldpc & WMI_VHT_CAP_RX_LDPC) + if (cfg->vht_rx_ldpc & WMI_VHT_CAP_RX_LDPC) { band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_RXLDPC; + hdd_debug("VHT RxLDPC capability is set"); + } else { + /* + * Get the RX LDPC capability for the NON DBS + * hardware mode for 5G band + */ + status = wma_get_caps_for_phyidx_hwmode(&caps_per_phy, + HW_MODE_DBS_NONE, CDS_BAND_5GHZ); + if ((QDF_IS_STATUS_SUCCESS(status)) && + (caps_per_phy.vht_5g & WMI_VHT_CAP_RX_LDPC)) { + band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_RXLDPC; + hdd_debug("VHT RX LDPC capability is set"); + } + } if (cfg->vht_short_gi_80 & WMI_VHT_CAP_SGI_80MHZ) band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_SHORT_GI_80;