wifi: mac80211_hwsim: Declare HE/EHT capabilities support for P2P interfaces
authorIlan Peer <ilan.peer@intel.com>
Wed, 20 Mar 2024 07:14:01 +0000 (09:14 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2024 14:39:28 +0000 (15:39 +0100)
Declare HE/EHT capabilities support also for P2P client and P2P GO
interface types.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320091155.73ae309d27c2.I31ef6af2f1ebf54281858e2f63afcb10b61985fe@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim.c

index c27c84b989d63960877261ccfc53badda1f240cf..4399eb1d9f4671789ab11f852f2584ab800a9979 100644 (file)
@@ -4128,7 +4128,8 @@ out_err:
 
 static const struct ieee80211_sband_iftype_data sband_capa_2ghz[] = {
        {
-               .types_mask = BIT(NL80211_IFTYPE_STATION),
+               .types_mask = BIT(NL80211_IFTYPE_STATION) |
+                             BIT(NL80211_IFTYPE_P2P_CLIENT),
                .he_cap = {
                        .has_he = true,
                        .he_cap_elem = {
@@ -4235,7 +4236,8 @@ static const struct ieee80211_sband_iftype_data sband_capa_2ghz[] = {
                },
        },
        {
-               .types_mask = BIT(NL80211_IFTYPE_AP),
+               .types_mask = BIT(NL80211_IFTYPE_AP) |
+                             BIT(NL80211_IFTYPE_P2P_GO),
                .he_cap = {
                        .has_he = true,
                        .he_cap_elem = {
@@ -4386,8 +4388,8 @@ static const struct ieee80211_sband_iftype_data sband_capa_2ghz[] = {
 
 static const struct ieee80211_sband_iftype_data sband_capa_5ghz[] = {
        {
-               /* TODO: should we support other types, e.g., P2P? */
-               .types_mask = BIT(NL80211_IFTYPE_STATION),
+               .types_mask = BIT(NL80211_IFTYPE_STATION) |
+                             BIT(NL80211_IFTYPE_P2P_CLIENT),
                .he_cap = {
                        .has_he = true,
                        .he_cap_elem = {
@@ -4511,7 +4513,8 @@ static const struct ieee80211_sband_iftype_data sband_capa_5ghz[] = {
                },
        },
        {
-               .types_mask = BIT(NL80211_IFTYPE_AP),
+               .types_mask = BIT(NL80211_IFTYPE_AP) |
+                             BIT(NL80211_IFTYPE_P2P_GO),
                .he_cap = {
                        .has_he = true,
                        .he_cap_elem = {
@@ -4682,8 +4685,8 @@ static const struct ieee80211_sband_iftype_data sband_capa_5ghz[] = {
 
 static const struct ieee80211_sband_iftype_data sband_capa_6ghz[] = {
        {
-               /* TODO: should we support other types, e.g., P2P? */
-               .types_mask = BIT(NL80211_IFTYPE_STATION),
+               .types_mask = BIT(NL80211_IFTYPE_STATION) |
+                             BIT(NL80211_IFTYPE_P2P_CLIENT),
                .he_6ghz_capa = {
                        .capa = cpu_to_le16(IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START |
                                            IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP |
@@ -4828,7 +4831,8 @@ static const struct ieee80211_sband_iftype_data sband_capa_6ghz[] = {
                },
        },
        {
-               .types_mask = BIT(NL80211_IFTYPE_AP),
+               .types_mask = BIT(NL80211_IFTYPE_AP) |
+                             BIT(NL80211_IFTYPE_P2P_GO),
                .he_6ghz_capa = {
                        .capa = cpu_to_le16(IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START |
                                            IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP |