Jelajahi Sumber

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
Sandeep Puligilla 7 tahun lalu
induk
melakukan
305d509e75
1 mengubah file dengan 16 tambahan dan 1 penghapusan
  1. 16 1
      core/hdd/src/wlan_hdd_main.c

+ 16 - 1
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;