diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-11-05 15:49:02 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-11-05 15:49:02 -0500 |
commit | 353c78152c10027b8da5de446bad3472f977fcdc (patch) | |
tree | 8663ca32b912e8b3df428f570b7fd376aa3aa0cb /net/wireless/util.c | |
parent | 01925efdf7e03b4b803b5c9f985163d687f7f017 (diff) | |
parent | d0a361a5b3f5aa28778a0c336de5a911fc0cd678 (diff) |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts:
net/wireless/reg.c
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 3c8be6104ba..935dea9485d 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1249,7 +1249,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, enum cfg80211_chan_mode chmode; int num_different_channels = 0; int total = 1; - bool radar_required; + bool radar_required = false; int i, j; ASSERT_RTNL(); @@ -1264,14 +1264,20 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, case NL80211_IFTYPE_MESH_POINT: case NL80211_IFTYPE_P2P_GO: case NL80211_IFTYPE_WDS: - radar_required = !!(chan && - (chan->flags & IEEE80211_CHAN_RADAR)); + /* if the interface could potentially choose a DFS channel, + * then mark DFS as required. + */ + if (!chan) { + if (chanmode != CHAN_MODE_UNDEFINED && radar_detect) + radar_required = true; + break; + } + radar_required = !!(chan->flags & IEEE80211_CHAN_RADAR); break; case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_P2P_DEVICE: case NL80211_IFTYPE_MONITOR: - radar_required = false; break; case NUM_NL80211_IFTYPES: case NL80211_IFTYPE_UNSPECIFIED: |