|
@@ -28,6 +28,15 @@
|
|
|
#include "wlan_utility.h"
|
|
|
#include "wlan_mlme_ucfg_api.h"
|
|
|
|
|
|
+#define CHAN_WIDTH_SET_40MHZ_IN_2G \
|
|
|
+ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G
|
|
|
+#define CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G \
|
|
|
+ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G
|
|
|
+#define CHAN_WIDTH_SET_160MHZ_IN_5G \
|
|
|
+ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G
|
|
|
+#define CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G \
|
|
|
+ IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G
|
|
|
+
|
|
|
void hdd_update_tgt_eht_cap(struct hdd_context *hdd_ctx,
|
|
|
struct wma_tgt_cfg *cfg)
|
|
|
{
|
|
@@ -89,7 +98,7 @@ void wlan_hdd_check_11be_support(struct hdd_beacon_data *beacon,
|
|
|
|
|
|
static void
|
|
|
hdd_update_wiphy_eht_caps_6ghz(struct hdd_context *hdd_ctx,
|
|
|
- struct wma_tgt_cfg *cfg)
|
|
|
+ tDot11fIEeht_cap eht_cap)
|
|
|
{
|
|
|
struct ieee80211_supported_band *band_6g =
|
|
|
hdd_ctx->wiphy->bands[HDD_NL80211_BAND_6GHZ];
|
|
@@ -104,25 +113,24 @@ hdd_update_wiphy_eht_caps_6ghz(struct hdd_context *hdd_ctx,
|
|
|
|
|
|
hdd_ctx->iftype_data_6g->types_mask =
|
|
|
(BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP));
|
|
|
- hdd_ctx->iftype_data_6g->eht_cap.has_eht = true;
|
|
|
- hdd_ctx->iftype_data_6g->he_cap.has_he = true;
|
|
|
band_6g->n_iftype_data = 1;
|
|
|
+ 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)
|
|
|
+ return;
|
|
|
+
|
|
|
+ hdd_ctx->iftype_data_6g->he_cap.has_he = true;
|
|
|
|
|
|
if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ)
|
|
|
- phy_info[0] |=
|
|
|
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G;
|
|
|
+ phy_info[0] |= CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G;
|
|
|
if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ)
|
|
|
- phy_info[0] |=
|
|
|
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
|
|
|
+ phy_info[0] |= CHAN_WIDTH_SET_160MHZ_IN_5G;
|
|
|
if (max_fw_bw >= WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ)
|
|
|
- phy_info[0] |=
|
|
|
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
|
|
-
|
|
|
- band_6g->iftype_data = hdd_ctx->iftype_data_6g;
|
|
|
+ phy_info[0] |= CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
|
|
}
|
|
|
|
|
|
-void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx,
|
|
|
- struct wma_tgt_cfg *cfg)
|
|
|
+void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx)
|
|
|
{
|
|
|
tDot11fIEeht_cap eht_cap_cfg;
|
|
|
struct ieee80211_supported_band *band_2g =
|
|
@@ -140,49 +148,50 @@ void hdd_update_wiphy_eht_cap(struct hdd_context *hdd_ctx,
|
|
|
hdd_enter();
|
|
|
|
|
|
status = ucfg_mlme_cfg_get_eht_caps(hdd_ctx->psoc, &eht_cap_cfg);
|
|
|
-
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
|
return;
|
|
|
|
|
|
if (band_2g) {
|
|
|
hdd_ctx->iftype_data_2g->types_mask =
|
|
|
(BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP));
|
|
|
- hdd_ctx->iftype_data_2g->eht_cap.has_eht = eht_cap_cfg.present;
|
|
|
- hdd_ctx->iftype_data_2g->he_cap.has_he = true;
|
|
|
band_2g->n_iftype_data = 1;
|
|
|
band_2g->iftype_data = hdd_ctx->iftype_data_2g;
|
|
|
|
|
|
- ucfg_mlme_get_channel_bonding_24ghz(hdd_ctx->psoc,
|
|
|
- &channel_bonding_mode_2g);
|
|
|
- if (channel_bonding_mode_2g)
|
|
|
- phy_info_2g[0] |=
|
|
|
- IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G;
|
|
|
- qdf_mem_copy(
|
|
|
- &hdd_ctx->iftype_data_2g->eht_cap.eht_cap_elem.mac_cap_info[0],
|
|
|
- &cfg->eht_cap.eht_mac_cap, 6);
|
|
|
- qdf_mem_copy(
|
|
|
- &hdd_ctx->iftype_data_2g->eht_cap.eht_cap_elem.phy_cap_info[0],
|
|
|
- &cfg->eht_cap.phy_cap_bytes, 11);
|
|
|
+ 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 (band_5g) {
|
|
|
hdd_ctx->iftype_data_5g->types_mask =
|
|
|
(BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP));
|
|
|
- hdd_ctx->iftype_data_5g->eht_cap.has_eht = eht_cap_cfg.present;
|
|
|
- hdd_ctx->iftype_data_5g->he_cap.has_he = true;
|
|
|
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_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 (max_fw_bw >=
|
|
|
+ WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ)
|
|
|
+ phy_info_5g[0] |=
|
|
|
+ CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- hdd_update_wiphy_eht_caps_6ghz(hdd_ctx, cfg);
|
|
|
+ hdd_update_wiphy_eht_caps_6ghz(hdd_ctx, eht_cap_cfg);
|
|
|
|
|
|
hdd_exit();
|
|
|
}
|