|
@@ -112,7 +112,6 @@ hdd_update_wiphy_eht_caps_6ghz(struct hdd_context *hdd_ctx,
|
|
|
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_6GHZ];
|
|
|
uint8_t *phy_info =
|
|
|
hdd_ctx->iftype_data_6g->eht_cap.eht_cap_elem.phy_cap_info;
|
|
|
- uint8_t max_fw_bw = sme_get_vht_ch_width();
|
|
|
|
|
|
if (!band_6g || !phy_info) {
|
|
|
hdd_debug("6ghz not supported in wiphy");
|
|
@@ -125,20 +124,21 @@ hdd_update_wiphy_eht_caps_6ghz(struct hdd_context *hdd_ctx,
|
|
|
band_6g->iftype_data = hdd_ctx->iftype_data_6g;
|
|
|
|
|
|
hdd_ctx->iftype_data_6g->eht_cap.has_eht = eht_cap.present;
|
|
|
- if (!hdd_ctx->iftype_data_6g->eht_cap.has_eht)
|
|
|
+ if (hdd_ctx->iftype_data_6g->eht_cap.has_eht &&
|
|
|
+ !hdd_ctx->iftype_data_6g->he_cap.has_he) {
|
|
|
+ hdd_debug("6 GHz HE caps not present");
|
|
|
+ hdd_ctx->iftype_data_6g->eht_cap.has_eht = false;
|
|
|
return;
|
|
|
-
|
|
|
- hdd_ctx->iftype_data_6g->he_cap.has_he = true;
|
|
|
-
|
|
|
- if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
|
|
|
- phy_info[0] |= CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G;
|
|
|
- if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
|
|
|
- phy_info[0] |= CHAN_WIDTH_SET_160MHZ_IN_5G;
|
|
|
- if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ)
|
|
|
- phy_info[0] |= CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
|
|
+ }
|
|
|
|
|
|
if (eht_cap.support_320mhz_6ghz)
|
|
|
phy_info[0] |= IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
|
|
|
+
|
|
|
+ if (eht_cap.su_beamformer)
|
|
|
+ phy_info[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
|
|
|
+
|
|
|
+ if (eht_cap.su_beamformee)
|
|
|
+ phy_info[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
|
|
|
}
|
|
|
|
|
|
#ifdef CFG80211_RU_PUNCT_SUPPORT
|
|
@@ -168,8 +168,6 @@ void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx)
|
|
|
QDF_STATUS status;
|
|
|
uint8_t *phy_info_5g =
|
|
|
hdd_ctx->iftype_data_5g->eht_cap.eht_cap_elem.phy_cap_info;
|
|
|
- uint8_t max_fw_bw = sme_get_eht_ch_width();
|
|
|
- uint32_t channel_bonding_mode_2g;
|
|
|
uint8_t *phy_info_2g =
|
|
|
hdd_ctx->iftype_data_2g->eht_cap.eht_cap_elem.phy_cap_info;
|
|
|
bool eht_capab;
|
|
@@ -194,17 +192,21 @@ void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx)
|
|
|
band_2g->iftype_data = hdd_ctx->iftype_data_2g;
|
|
|
|
|
|
hdd_ctx->iftype_data_2g->eht_cap.has_eht = eht_cap_cfg.present;
|
|
|
- if (hdd_ctx->iftype_data_2g->eht_cap.has_eht) {
|
|
|
- hdd_ctx->iftype_data_2g->he_cap.has_he = true;
|
|
|
-
|
|
|
- ucfg_mlme_get_channel_bonding_24ghz(
|
|
|
- hdd_ctx->psoc,
|
|
|
- &channel_bonding_mode_2g);
|
|
|
- if (channel_bonding_mode_2g)
|
|
|
- phy_info_2g[0] |= CHAN_WIDTH_SET_40MHZ_IN_2G;
|
|
|
+ if (hdd_ctx->iftype_data_2g->eht_cap.has_eht &&
|
|
|
+ !hdd_ctx->iftype_data_2g->he_cap.has_he) {
|
|
|
+ hdd_debug("2.4 GHz HE caps not present");
|
|
|
+ hdd_ctx->iftype_data_2g->eht_cap.has_eht = false;
|
|
|
+ goto band_5ghz;
|
|
|
}
|
|
|
+
|
|
|
+ if (eht_cap_cfg.su_beamformer)
|
|
|
+ phy_info_2g[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
|
|
|
+
|
|
|
+ if (eht_cap_cfg.su_beamformee)
|
|
|
+ phy_info_2g[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
|
|
|
}
|
|
|
|
|
|
+band_5ghz:
|
|
|
if (band_5g) {
|
|
|
hdd_ctx->iftype_data_5g->types_mask =
|
|
|
(BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP));
|
|
@@ -212,17 +214,21 @@ void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx)
|
|
|
band_5g->iftype_data = hdd_ctx->iftype_data_5g;
|
|
|
|
|
|
hdd_ctx->iftype_data_5g->eht_cap.has_eht = eht_cap_cfg.present;
|
|
|
- if (hdd_ctx->iftype_data_5g->eht_cap.has_eht) {
|
|
|
- hdd_ctx->iftype_data_5g->he_cap.has_he = true;
|
|
|
- if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
|
|
|
- phy_info_5g[0] |=
|
|
|
- CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G;
|
|
|
- if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
|
|
|
- phy_info_5g[0] |=
|
|
|
- CHAN_WIDTH_SET_160MHZ_IN_5G;
|
|
|
+ if (hdd_ctx->iftype_data_5g->eht_cap.has_eht &&
|
|
|
+ !hdd_ctx->iftype_data_5g->he_cap.has_he) {
|
|
|
+ hdd_debug("5 GHz HE caps not present");
|
|
|
+ hdd_ctx->iftype_data_5g->eht_cap.has_eht = false;
|
|
|
+ goto band_6ghz;
|
|
|
}
|
|
|
+
|
|
|
+ if (eht_cap_cfg.su_beamformer)
|
|
|
+ phy_info_5g[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
|
|
|
+
|
|
|
+ if (eht_cap_cfg.su_beamformee)
|
|
|
+ phy_info_5g[0] |= IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
|
|
|
}
|
|
|
|
|
|
+band_6ghz:
|
|
|
hdd_update_wiphy_eht_caps_6ghz(hdd_ctx, eht_cap_cfg);
|
|
|
|
|
|
hdd_exit();
|