From: Luis R. Rodriguez Date: Mon, 25 Nov 2013 19:56:10 +0000 (+0100) Subject: cfg80211: DFS check dfs_region before usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=55f7435c189498ccbfe6a5fba606933587948d85;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git cfg80211: DFS check dfs_region before usage Check the DFS region before channel availability check. Signed-off-by: Luis R. Rodriguez Signed-off-by: Janusz Dziedzic Signed-off-by: Johannes Berg --- 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;