Search Linux Wireless

Re: [REGRESSION] wiphy_register fails for mvm (AX211)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/2/24 12:41 PM, Alexander Wetzel wrote:
The commit 5c38bedac16a ("wifi: iwlwifi: mvm: unify and fix interface
combinations") breaks mvm hard. wlan interface can't be created and even
rmmod fails.

On driver load I get:

WARNING: CPU: 5 PID: 1358 at net/wireless/core.c:689 wiphy_register+0x8ee/0x920 [cfg80211]
ran into the same issue. Debugging revealed that the " - 1" is the problem
because wiphy_verify_combinations checks if the specified limits in n_limits.max
adds up to at least max_interfaces (=3), which isn't true anymore with the
" - 1" as the ieee80211_iface_limit with NL80211_IFTYPE_P2P_DEVICE is missing.

Not sure, if this needs fixing in cfg80211 or iwlwifi. But I can confirm that this
patch "works" (not sure if it's correct/intended though).
---
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 60bfe42d5386..e40f993b17fd 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -59,13 +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) - 1,
+		.n_limits = ARRAY_SIZE(iwl_mvm_limits),
 	},
 	{
 		.num_different_channels = 1,
 		.max_interfaces = 3,
 		.limits = iwl_mvm_limits_ap,
-		.n_limits = ARRAY_SIZE(iwl_mvm_limits_ap) - 1,
+		.n_limits = ARRAY_SIZE(iwl_mvm_limits_ap),
 	},
 };
---

relevant iw phy dump

        valid interface combinations:
                 * #{ managed } <= 1, #{ P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 2
                 * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ P2P-device } <= 1,
                   total <= 3, #channels <= 1


Cheers,
Christian





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux