ath9k: really disable DFS if CONFIG_ATH9K_DFS_CERTIFIED is not set
PATCH 1/1 ath9k: really disable DFS if CONFIG_ATH9K_DFS_CERTIFIED is not set
Currently ath9k allows hostapd to initialize radiation on DFS-channels even when CONFIG_ATH9K_DFS_CERTIFIED is not set. This is due to the advertised radar detection widths. This patch makes them depend on CONFIG_ATH9K_DFS_CERTIFIED.
---
drivers/net/wireless/ath/ath9k/init.c +2 -0
@@ -894,8 +894,10 @@ static const struct ieee80211_iface_comb .max_interfaces = 1, .num_different_channels = 1, .beacon_int_infra_match = true, +#ifdef CONFIG_ATH9K_DFS_CERTIFIED .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | BIT(NL80211_CHAN_WIDTH_20), +#endif } };
PATCH 1/1 ath9k: really disable DFS if CONFIG_ATH9K_DFS_CERTIFIED is not set
Hi,
this patch makes ath9k fail to load, hitting a warning on compat-wireless-2014-01-23.1/net/wireless/core.c:380, that is
/*
* Combinations with just one interface aren't real,
* however we make an exception for DFS.
*/
if (WARN_ON((c->max_interfaces < 2) && !c->radar_detect_widths))
return -EINVAL;
I think you need to remove the entire configuration if DFS is disabled.
Please find attached a patch that addresses this.
Regards,
M. Braun
---
---
compat-wireless-2014-01-23.1/drivers/net/wireless/ath/ath9k/init.c.orig
2014-03-05 11:28:28.192771126 +0100 +++ compat-wireless-2014-01-23.1/drivers/net/wireless/ath/ath9k/init.c 2014-03-05 11:29:01.407831112 +0100
@@ -891,19 +891,21 @@
.n_limits = ARRAY_SIZE(if_limits), .max_interfaces = 2048, .num_different_channels = 1, .beacon_int_infra_match = true,
},
+#ifdef CONFIG_ATH9K_DFS_CERTIFIED
{
.limits = if_dfs_limits,
.n_limits = ARRAY_SIZE(if_dfs_limits), .max_interfaces = 1, .num_different_channels = 1, .beacon_int_infra_match = true, .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT)
|
BIT(NL80211_CHAN_WIDTH_20),
}+#endif
};
static void ath9k_set_hw_capab(struct ath_softc *sc, structieee80211_hw *hw)
{
struct ath_hw *ah = sc->sc_ah;---
PATCH v2 1/1 ath9k: really disable DFS if CONFIG_ATH9K_DFS_CERTIFIED is not set
In reply to Matti LaaksoQuoted 11 lines
this patch makes ath9k fail to load, hitting a warning on
compat-wireless-2014-01-23.1/net/wireless/core.c:380, that is/*
* Combinations with just one interface aren't real,
* however we make an exception for DFS.
*/
if (WARN_ON((c->max_interfaces < 2) && !c->radar_detect_widths))return -EINVAL;I think you need to remove the entire configuration if DFS is disabled.
Thanks! I could've sworn I tested this with the config option disabled as well, but apparently not.
Quoted 1 line
Please find attached a patch that addresses this.
It seems your patch was mangled by your mail program. Here's a fixed version, rebased against wireless-next. I also took the liberty of adding a signed-off-by from you.
---
drivers/net/wireless/ath/ath9k/init.c +2 -0
@@ -670,15 +670,17 @@ static const struct ieee80211_iface_comb .num_different_channels = 1, .beacon_int_infra_match = true, }, +#ifdef CONFIG_ATH9K_DFS_CERTIFIED { .limits = if_dfs_limits, .n_limits = ARRAY_SIZE(if_dfs_limits), .max_interfaces = 1, .num_different_channels = 1, .beacon_int_infra_match = true, .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | BIT(NL80211_CHAN_WIDTH_20), } +#endif };static void ath9k_set_hw_capab (struct ath_softc *sc,struct ieee80211_hw *hw)