fix(cfg80211): gate netns moves for optional init_net users

Enable WIPHY_FLAG_NETNS_OK only when both CONFIG_BR_SUPPORT and CONFIG_BAND_STEERING are disabled. Their existing init_net paths do not provide the namespace behavior validated by the default build.

Validated all three modules against Linux 6.17 headers and checked the preprocessed capability assignment for all four bridge/steering configuration combinations.
This commit is contained in:
Shen Mintao committed 2026-10-23 17:09:17 +08:00
1 parent 2e305e8b1f
commit 051b62368b
1 file changed
+6 -2
+6 -2
View File
@@ -9281,8 +9281,12 @@ if((g_rwnx_plat->usbdev->chipid == PRODUCT_ID_AIC8801) ||
WIPHY_FLAG_HAS_CHANNEL_SWITCH |
#endif
WIPHY_FLAG_4ADDR_STATION |
WIPHY_FLAG_4ADDR_AP |
WIPHY_FLAG_NETNS_OK;
WIPHY_FLAG_4ADDR_AP;
#if !defined(CONFIG_BR_SUPPORT) && !defined(CONFIG_BAND_STEERING)
/* The optional bridge and steering paths still use init_net. */
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
wiphy->max_num_csa_counters = BCN_MAX_CSA_CPT;