diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-11-25 20:56:10 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-03 13:53:40 +0100 |
commit | 55f7435c189498ccbfe6a5fba606933587948d85 (patch) | |
tree | e45efd204e085d301484b454aa5ddd475edf4c18 /net/wireless | |
parent | 6c474799dccc91c9cf03cd18ec32f97929549e9f (diff) | |
download | linux-55f7435c189498ccbfe6a5fba606933587948d85.tar.bz2 |
cfg80211: DFS check dfs_region before usage
Check the DFS region before channel availability check.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 93e3356091ff..9cd8c6113e94 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5651,8 +5651,13 @@ static int nl80211_start_radar_detection(struct sk_buff *skb, struct net_device *dev = info->user_ptr[1]; struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_chan_def chandef; + enum nl80211_dfs_regions dfs_region; int err; + dfs_region = reg_get_dfs_region(wdev->wiphy); + if (dfs_region == NL80211_DFS_UNSET) + return -EINVAL; + err = nl80211_parse_chandef(rdev, info, &chandef); if (err) return err; |