> In mac80211 have a module parameter "ieee80211_disable_40mhz_24ghz" > which, for backward compatibility reasons, actually defaults to false, > so you need to set it to true to get a compliant system. When a system > is integrated, this parameter can be set as default. > > I don't think it really is necessary to set this at runtime. > > I guess I see two options: > 1) move the module parameter to cfg80211, and check the sdata HT config > in the driver again when this is needed Hi Johannes, The change below adopts your idea of moving ieee80211_disable_40mhz_24ghz from mac80211 to cfg80211. Could you please review it? I will resend the patch if it looks OK for you. --- diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d30eada..1cdc43e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1974,6 +1974,7 @@ extern int ieee80211_radiotap_iterator_next( extern const unsigned char rfc1042_header[6]; extern const unsigned char bridge_tunnel_header[6]; +extern bool cfg80211_disable_40mhz_24ghz; /** * ieee80211_get_hdrlen_from_skb - get header length from data diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 0ab2a8d..4290b50 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -33,12 +33,6 @@ #include "cfg.h" #include "debugfs.h" - -static bool ieee80211_disable_40mhz_24ghz; -module_param(ieee80211_disable_40mhz_24ghz, bool, 0644); -MODULE_PARM_DESC(ieee80211_disable_40mhz_24ghz, - "Disable 40MHz support in the 2.4GHz band"); - static struct lock_class_key ieee80211_rx_skb_queue_class; void ieee80211_configure_filter(struct ieee80211_local *local) @@ -729,11 +723,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) channels += sband->n_channels; /* - * Since ieee80211_disable_40mhz_24ghz is global, we can + * Since cfg80211_disable_40mhz_24ghz is global, we can * modify the sband's ht data even if the driver uses a * global structure for that. */ - if (ieee80211_disable_40mhz_24ghz && + if (cfg80211_disable_40mhz_24ghz && band == IEEE80211_BAND_2GHZ && sband->ht_cap.ht_supported) { sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0efa7fd..3f45d46 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -23,6 +23,12 @@ #include "nl80211.h" #include "reg.h" +bool cfg80211_disable_40mhz_24ghz; +module_param(cfg80211_disable_40mhz_24ghz, bool, 0644); +MODULE_PARM_DESC(cfg80211_disable_40mhz_24ghz, + "Disable 40MHz support in the 2.4GHz band"); +EXPORT_SYMBOL_GPL(cfg80211_disable_40mhz_24ghz); + static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, struct genl_info *info); static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb, --- Thanks, Bing ÿô.nÇ·®+%˱é¥wÿº{.nÇ·¥{±ÿ«zW¬³ø¡Ü}©²ÆzÚj:+v¨þø®w¥þàÞ¨è&¢)ß«a¶Úÿûz¹ÞúÝjÿwèf