diff options
| author | Ryan Hsu <ryanhsu@codeaurora.org> | 2015-07-06 18:20:22 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-24 15:08:32 -0700 |
| commit | fb5706b7462b0b855d10da12ed88ebf10a2e8643 (patch) | |
| tree | 1ba37cded305fe158867733ab4243bcf04c4aab5 /net | |
| parent | 2e9944e96294b9ad2115020150129fcf680da085 (diff) | |
cfg80211: Bypass checkin the CHAN_RADAR if DFS_OFFLOAD is enabled
When WIPHY_FLAG_DFS_OFFLOAD is defined, driver would take care the
DFS related operation, hence the Kernel needs to ignore the DFS
states checking.
CRs-fixed:1032889
Change-Id: I02fa5e3e25427c0ca474455fa2d2be9eb6ea4bd9
Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/wireless/chan.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index aaa590c0b491..cf14c7e22fb3 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -593,10 +593,17 @@ static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy, for (freq = start_freq; freq <= end_freq; freq += 20) { c = ieee80211_get_channel(wiphy, freq); - if (!c || c->flags & prohibited_flags) + + if (!c) + return false; + + if ((!(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD)) && + (c->flags & prohibited_flags & IEEE80211_CHAN_RADAR)) return false; - } + if (c->flags & prohibited_flags & ~IEEE80211_CHAN_RADAR) + return false; + } return true; } |
