On Tue, 2013-12-03 at 13:24 +0100, Marek Puzyniak wrote: > + if (cfg80211_chandef_dfs_required(wdev->wiphy, &wdev->preset_chandef)) > + cfg80211_leave_dfs_chandef(wdev->wiphy, &wdev->preset_chandef); *far* too long lines. Read CodingStyle documentation please. Also, any reason to not always call cfg80211_leave_dfs_chandef()? > +static void cfg80211_leave_dfs_chans(struct wiphy *wiphy, > + u32 center_freq, > + u32 bandwidth) > +{ > + struct ieee80211_channel *c; > + u32 freq, start_freq, end_freq; > + > + start_freq = cfg80211_get_start_freq(center_freq, bandwidth); > + end_freq = cfg80211_get_end_freq(center_freq, bandwidth); > + > + for (freq = start_freq; freq <= end_freq; freq += 20) { > + c = ieee80211_get_channel(wiphy, freq); > + if (!c) > + continue; > + if (!(c->flags & IEEE80211_CHAN_RADAR)) > + continue; > + if (c->dfs_state != NL80211_DFS_AVAILABLE) > + continue; > + > + cfg80211_set_chans_dfs_state(wiphy, freq, 20, NL80211_DFS_USABLE); This seems to catch it anyway. This also seems a bit wrong, if regulatory happens to change and say the RADAR flag goes away, then this won't set it to USABLE, and then if the RADAR flag later re-appears? I guess Luis should handle that in reg.c though or so? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html