From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matti Laakso Date: Thu, 06 Mar 2014 10:08:01 +0100 Subject: [ath9k-devel] [PATCH v2] ath9k: really disable DFS if CONFIG_ATH9K_DFS_CERTIFIED is not set References: 5313943C.3000200@elisanet.fi Message-ID: <53183AF1.1010500@elisanet.fi> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org > 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. > 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. Reported-by: Martin Garbe Signed-off-by: Michael Braun Signed-off-by: Matti Laakso --- --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -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)