diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-01-29 08:22:27 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 15:58:17 -0500 |
commit | 9e0e29615a2077be852b1245b57c5b00fa609522 (patch) | |
tree | 73d899373e01efe1fd72a895d8e2fe2f6bc8fcb2 /net/wireless/ibss.c | |
parent | fe94f3a4ffaa20c7470038c69ffc8e545ef5f90a (diff) |
cfg80211: consider existing DFS interfaces
It was possible to break interface combinations in
the following way:
combo 1: iftype = AP, num_ifaces = 2, num_chans = 2,
combo 2: iftype = AP, num_ifaces = 1, num_chans = 1, radar = HT20
With the above interface combinations it was
possible to:
step 1. start AP on DFS channel by matching combo 2
step 2. start AP on non-DFS channel by matching combo 1
This was possible beacuse (step 2) did not consider
if other interfaces require radar detection.
The patch changes how cfg80211 tracks channels -
instead of channel itself now a complete chandef
is stored.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/ibss.c')
-rw-r--r-- | net/wireless/ibss.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index e37e39c29dfb..1470b90e438f 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -122,6 +122,7 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, | |||
122 | 122 | ||
123 | wdev->ibss_fixed = params->channel_fixed; | 123 | wdev->ibss_fixed = params->channel_fixed; |
124 | wdev->ibss_dfs_possible = params->userspace_handles_dfs; | 124 | wdev->ibss_dfs_possible = params->userspace_handles_dfs; |
125 | wdev->chandef = params->chandef; | ||
125 | #ifdef CONFIG_CFG80211_WEXT | 126 | #ifdef CONFIG_CFG80211_WEXT |
126 | wdev->wext.ibss.chandef = params->chandef; | 127 | wdev->wext.ibss.chandef = params->chandef; |
127 | #endif | 128 | #endif |
@@ -205,6 +206,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext) | |||
205 | 206 | ||
206 | wdev->current_bss = NULL; | 207 | wdev->current_bss = NULL; |
207 | wdev->ssid_len = 0; | 208 | wdev->ssid_len = 0; |
209 | memset(&wdev->chandef, 0, sizeof(wdev->chandef)); | ||
208 | #ifdef CONFIG_CFG80211_WEXT | 210 | #ifdef CONFIG_CFG80211_WEXT |
209 | if (!nowext) | 211 | if (!nowext) |
210 | wdev->wext.ibss.ssid_len = 0; | 212 | wdev->wext.ibss.ssid_len = 0; |