From 051b62368bf5a4eebfd8c74c7593fa3a3029bcde Mon Sep 17 00:00:00 2001 From: Shen Mintao Date: Fri, 23 Oct 2026 17:09:17 +0800 Subject: [PATCH] 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. --- drivers/aic8800/aic8800_fdrv/rwnx_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_main.c b/drivers/aic8800/aic8800_fdrv/rwnx_main.c index 4812550..82c63f4 100644 --- a/drivers/aic8800/aic8800_fdrv/rwnx_main.c +++ b/drivers/aic8800/aic8800_fdrv/rwnx_main.c @@ -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;