]> www.infradead.org Git - users/hch/configfs.git/commitdiff
wifi: iwlwifi: mvm: unify and fix interface combinations
authorJohannes Berg <johannes.berg@intel.com>
Tue, 18 Jun 2024 17:03:02 +0000 (20:03 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 26 Jun 2024 08:28:22 +0000 (10:28 +0200)
AP interfaces fundamentally cannot leave the channel, so multi-
channel operation with them isn't really possible. We shouldn't
advertise support for such, at least not as long as we don't
have full multi-radio support. Thus, remove the AP bit from the
interface combinations for two channels and add another set for
just one channel that has it.

Also, to avoid duplicating everything even more, unify the NAN
and non-NAN cases.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240618200104.3213638262ef.I2a0031b37623d7763fd0c5405477ea7206a3e923@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

index 896e560f5a82fab3a8496d3615343d0a6265f9d0..1c1f9816cf5e617f3ac0eb7225d8c44ec2516bda 100644 (file)
 #include "iwl-nvm-parse.h"
 #include "time-sync.h"
 
+#define IWL_MVM_LIMITS(ap)                                     \
+       {                                                       \
+               .max = 1,                                       \
+               .types = BIT(NL80211_IFTYPE_STATION),           \
+       },                                                      \
+       {                                                       \
+               .max = 1,                                       \
+               .types = ap |                                   \
+                        BIT(NL80211_IFTYPE_P2P_CLIENT) |       \
+                        BIT(NL80211_IFTYPE_P2P_GO),            \
+       },                                                      \
+       {                                                       \
+               .max = 1,                                       \
+               .types = BIT(NL80211_IFTYPE_P2P_DEVICE),        \
+       }
+
 static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
-       {
-               .max = 1,
-               .types = BIT(NL80211_IFTYPE_STATION),
-       },
-       {
-               .max = 1,
-               .types = BIT(NL80211_IFTYPE_AP) |
-                       BIT(NL80211_IFTYPE_P2P_CLIENT) |
-                       BIT(NL80211_IFTYPE_P2P_GO),
-       },
-       {
-               .max = 1,
-               .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
-       },
+       IWL_MVM_LIMITS(0)
+};
+
+static const struct ieee80211_iface_limit iwl_mvm_limits_ap[] = {
+       IWL_MVM_LIMITS(BIT(NL80211_IFTYPE_AP))
 };
 
 static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
@@ -52,7 +59,13 @@ static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
                .num_different_channels = 2,
                .max_interfaces = 3,
                .limits = iwl_mvm_limits,
-               .n_limits = ARRAY_SIZE(iwl_mvm_limits),
+               .n_limits = ARRAY_SIZE(iwl_mvm_limits) - 1,
+       },
+       {
+               .num_different_channels = 1,
+               .max_interfaces = 3,
+               .limits = iwl_mvm_limits_ap,
+               .n_limits = ARRAY_SIZE(iwl_mvm_limits_ap) - 1,
        },
 };