Search Linux Wireless

[RFC 8/9] mac80211: add DFS capabilities flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add new IEEE80211_HW_SUPPORTS_RADAR_DETECTION attribute which
indicates that hw supports radar detection.

Signed-off-by: Victor Goldenshtein <victorg@xxxxxx>
---
 include/net/mac80211.h |    3 +++
 net/mac80211/main.c    |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b0f4e67..90564b4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1138,6 +1138,8 @@ enum sta_notify_cmd {
  * @IEEE80211_HW_TX_AMPDU_SETUP_IN_HW: The device handles TX A-MPDU session
  *	setup strictly in HW. mac80211 should not attempt to do this in
  *	software.
+ *
+ * @IEEE80211_HW_SUPPORTS_RADAR_DETECTION: Hardware supports radar detection.
  */
 enum ieee80211_hw_flags {
 	IEEE80211_HW_HAS_RATE_CONTROL			= 1<<0,
@@ -1164,6 +1166,7 @@ enum ieee80211_hw_flags {
 	IEEE80211_HW_SUPPORTS_PER_STA_GTK		= 1<<21,
 	IEEE80211_HW_AP_LINK_PS				= 1<<22,
 	IEEE80211_HW_TX_AMPDU_SETUP_IN_HW		= 1<<23,
+	IEEE80211_HW_SUPPORTS_RADAR_DETECTION		= 1<<24,
 };
 
 /**
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 0a0d94a..4ec847c 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -866,6 +866,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)
 		local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
 
+	if (local->hw.flags & IEEE80211_HW_SUPPORTS_RADAR_DETECTION)
+		local->hw.wiphy->flags |= WIPHY_FLAG_SUPPORTS_DFS;
+
 	result = wiphy_register(local->hw.wiphy);
 	if (result < 0)
 		goto fail_wiphy_register;
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux