aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-02-08 12:16:20 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 03:41:04 -0500
commit164eb02d070af987890e1db1c12b8ae0394b19f7 (patch)
treec7c1f7a8d051f095cbf02a580ad70d7b4537b714 /include
parent04f39047af2a6df64b763ea5a271db24879d0391 (diff)
mac80211: add radar detection command/event
Add command to trigger radar detection in the driver/FW. Once radar detection is started it should continuously monitor for radars as long as the channel active. If radar is detected usermode notified with 'radar detected' event. Scanning and remain on channel functionality must be disabled while doing radar detection/scanning, and vice versa. Based on original patch by Victor Goldenshtein <victorg@ti.com> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/mac80211.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0eaa9092364b..7241962f9f13 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -147,10 +147,12 @@ struct ieee80211_low_level_stats {
147 * enum ieee80211_chanctx_change - change flag for channel context 147 * enum ieee80211_chanctx_change - change flag for channel context
148 * @IEEE80211_CHANCTX_CHANGE_WIDTH: The channel width changed 148 * @IEEE80211_CHANCTX_CHANGE_WIDTH: The channel width changed
149 * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed 149 * @IEEE80211_CHANCTX_CHANGE_RX_CHAINS: The number of RX chains changed
150 * @IEEE80211_CHANCTX_CHANGE_RADAR: radar detection flag changed
150 */ 151 */
151enum ieee80211_chanctx_change { 152enum ieee80211_chanctx_change {
152 IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0), 153 IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(0),
153 IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1), 154 IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(1),
155 IEEE80211_CHANCTX_CHANGE_RADAR = BIT(2),
154}; 156};
155 157
156/** 158/**
@@ -165,6 +167,7 @@ enum ieee80211_chanctx_change {
165 * @rx_chains_dynamic: The number of RX chains that must be enabled 167 * @rx_chains_dynamic: The number of RX chains that must be enabled
166 * after RTS/CTS handshake to receive SMPS MIMO transmissions; 168 * after RTS/CTS handshake to receive SMPS MIMO transmissions;
167 * this will always be >= @rx_chains_static. 169 * this will always be >= @rx_chains_static.
170 * @radar_enabled: whether radar detection is enabled on this channel.
168 * @drv_priv: data area for driver use, will always be aligned to 171 * @drv_priv: data area for driver use, will always be aligned to
169 * sizeof(void *), size is determined in hw information. 172 * sizeof(void *), size is determined in hw information.
170 */ 173 */
@@ -173,6 +176,8 @@ struct ieee80211_chanctx_conf {
173 176
174 u8 rx_chains_static, rx_chains_dynamic; 177 u8 rx_chains_static, rx_chains_dynamic;
175 178
179 bool radar_enabled;
180
176 u8 drv_priv[0] __aligned(sizeof(void *)); 181 u8 drv_priv[0] __aligned(sizeof(void *));
177}; 182};
178 183
@@ -967,6 +972,7 @@ enum ieee80211_smps_mode {
967 * 972 *
968 * @channel: the channel to tune to 973 * @channel: the channel to tune to
969 * @channel_type: the channel (HT) type 974 * @channel_type: the channel (HT) type
975 * @radar_enabled: whether radar detection is enabled
970 * 976 *
971 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 977 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
972 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, 978 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
@@ -993,6 +999,7 @@ struct ieee80211_conf {
993 999
994 struct ieee80211_channel *channel; 1000 struct ieee80211_channel *channel;
995 enum nl80211_channel_type channel_type; 1001 enum nl80211_channel_type channel_type;
1002 bool radar_enabled;
996 enum ieee80211_smps_mode smps_mode; 1003 enum ieee80211_smps_mode smps_mode;
997}; 1004};
998 1005
@@ -3945,6 +3952,13 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
3945 gfp_t gfp); 3952 gfp_t gfp);
3946 3953
3947/** 3954/**
3955 * ieee80211_radar_detected - inform that a radar was detected
3956 *
3957 * @hw: pointer as obtained from ieee80211_alloc_hw()
3958 */
3959void ieee80211_radar_detected(struct ieee80211_hw *hw);
3960
3961/**
3948 * ieee80211_chswitch_done - Complete channel switch process 3962 * ieee80211_chswitch_done - Complete channel switch process
3949 * @vif: &struct ieee80211_vif pointer from the add_interface callback. 3963 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
3950 * @success: make the channel switch successful or not 3964 * @success: make the channel switch successful or not