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: 1080548
Change-Id: I02fa5e3e25427c0ca474455fa2d2be9eb6ea4bd9
Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 9175073..bb1362e 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -596,10 +596,12 @@
 
 		if (!c)
 			return false;
-		/* check for radar flags */
+
 		if ((!(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD)) &&
-		    (prohibited_flags & c->flags & IEEE80211_CHAN_RADAR) &&
-		    (c->dfs_state != NL80211_DFS_AVAILABLE))
+		    (c->flags & prohibited_flags & IEEE80211_CHAN_RADAR))
+			return false;
+
+		if (c->flags & prohibited_flags & ~IEEE80211_CHAN_RADAR)
 			return false;
 	}
 	return true;