diff options
-rw-r--r-- | net/wireless/chan.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index a48859982a32..2db713d18f71 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
@@ -579,6 +579,10 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy, | |||
579 | { | 579 | { |
580 | struct ieee80211_channel *c; | 580 | struct ieee80211_channel *c; |
581 | u32 freq, start_freq, end_freq; | 581 | u32 freq, start_freq, end_freq; |
582 | bool dfs_offload; | ||
583 | |||
584 | dfs_offload = wiphy_ext_feature_isset(wiphy, | ||
585 | NL80211_EXT_FEATURE_DFS_OFFLOAD); | ||
582 | 586 | ||
583 | start_freq = cfg80211_get_start_freq(center_freq, bandwidth); | 587 | start_freq = cfg80211_get_start_freq(center_freq, bandwidth); |
584 | end_freq = cfg80211_get_end_freq(center_freq, bandwidth); | 588 | end_freq = cfg80211_get_end_freq(center_freq, bandwidth); |
@@ -596,8 +600,9 @@ static bool cfg80211_get_chans_dfs_available(struct wiphy *wiphy, | |||
596 | if (c->flags & IEEE80211_CHAN_DISABLED) | 600 | if (c->flags & IEEE80211_CHAN_DISABLED) |
597 | return false; | 601 | return false; |
598 | 602 | ||
599 | if ((c->flags & IEEE80211_CHAN_RADAR) && | 603 | if ((c->flags & IEEE80211_CHAN_RADAR) && |
600 | (c->dfs_state != NL80211_DFS_AVAILABLE)) | 604 | (c->dfs_state != NL80211_DFS_AVAILABLE) && |
605 | !(c->dfs_state == NL80211_DFS_USABLE && dfs_offload)) | ||
601 | return false; | 606 | return false; |
602 | } | 607 | } |
603 | 608 | ||