소스 검색

qcacld-3.0: Advertise 40, 80, 160, 80+80 caps in wiphy

Currently driver does not advertise the bandwidth
capability for 5ghz band in the he capability
structure of wiphy, result of which is supplicant
is unable to turn on P2P-GO interface in HE40, 80
mode.

Fix is to advertise that the driver supports all
the bandwidths in HE mode which is supported by FW.

Change-Id: Ie94ad9784243ce1f562938b1a50c53f3a25db834
CRs-Fixed: 2673025
gaurank kathpalia 5 년 전
부모
커밋
83e526cc1a
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      core/hdd/src/wlan_hdd_main.c

+ 13 - 0
core/hdd/src/wlan_hdd_main.c

@@ -2122,6 +2122,9 @@ static void hdd_update_wiphy_he_cap(struct hdd_context *hdd_ctx)
 	struct ieee80211_supported_band *band_5g =
 			hdd_ctx->wiphy->bands[HDD_NL80211_BAND_5GHZ];
 	QDF_STATUS status;
+	uint8_t *phy_info_5g =
+		    hdd_ctx->iftype_data_5g->he_cap.he_cap_elem.phy_cap_info;
+	uint8_t max_fw_bw = sme_get_vht_ch_width();
 
 	status = ucfg_mlme_cfg_get_he_caps(hdd_ctx->psoc, &he_cap_cfg);
 
@@ -2141,7 +2144,17 @@ static void hdd_update_wiphy_he_cap(struct hdd_context *hdd_ctx)
 		hdd_ctx->iftype_data_5g->he_cap.has_he = he_cap_cfg.present;
 		band_5g->n_iftype_data = 1;
 		band_5g->iftype_data = hdd_ctx->iftype_data_5g;
+		if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
+			phy_info_5g[0] |=
+				IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G;
+		if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
+			phy_info_5g[0] |=
+				IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
+		if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ)
+			phy_info_5g[0] |=
+			     IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
 	}
+
 	hdd_update_wiphy_he_caps_6ghz(hdd_ctx);
 }
 #else