diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-23 03:02:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-24 16:04:33 -0400 |
commit | a97c13c34509be460dea23c86f31c02daa2428b5 (patch) | |
tree | eb5d2860af9d6f3121254f2ef262e197b10bed34 /include | |
parent | d6dc1a386358979e12366d1f35eeb68fc181e101 (diff) |
mac80211: Add support for connection quality monitoring
Add support for the set_cqm_config op. This op function configures the
requested connection quality monitor rssi threshold and rssi hysteresis
values to the hardware if the hardware supports
IEEE80211_HW_SUPPORTS_CQM.
For unsupported hardware, currently -EOPNOTSUPP is returned, so the mac80211
is currently not doing connection quality monitoring on the host. This could be
added later, if needed.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d14226f29ffc..1a8f50af49a0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -144,6 +144,7 @@ struct ieee80211_low_level_stats { | |||
144 | * new beacon (beaconing modes) | 144 | * new beacon (beaconing modes) |
145 | * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be | 145 | * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be |
146 | * enabled/disabled (beaconing modes) | 146 | * enabled/disabled (beaconing modes) |
147 | * @BSS_CHANGED_CQM: Connection quality monitor config changed | ||
147 | */ | 148 | */ |
148 | enum ieee80211_bss_change { | 149 | enum ieee80211_bss_change { |
149 | BSS_CHANGED_ASSOC = 1<<0, | 150 | BSS_CHANGED_ASSOC = 1<<0, |
@@ -156,6 +157,7 @@ enum ieee80211_bss_change { | |||
156 | BSS_CHANGED_BSSID = 1<<7, | 157 | BSS_CHANGED_BSSID = 1<<7, |
157 | BSS_CHANGED_BEACON = 1<<8, | 158 | BSS_CHANGED_BEACON = 1<<8, |
158 | BSS_CHANGED_BEACON_ENABLED = 1<<9, | 159 | BSS_CHANGED_BEACON_ENABLED = 1<<9, |
160 | BSS_CHANGED_CQM = 1<<10, | ||
159 | }; | 161 | }; |
160 | 162 | ||
161 | /** | 163 | /** |
@@ -185,6 +187,9 @@ enum ieee80211_bss_change { | |||
185 | * @enable_beacon: whether beaconing should be enabled or not | 187 | * @enable_beacon: whether beaconing should be enabled or not |
186 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). | 188 | * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info). |
187 | * This field is only valid when the channel type is one of the HT types. | 189 | * This field is only valid when the channel type is one of the HT types. |
190 | * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value | ||
191 | * implies disabled | ||
192 | * @cqm_rssi_hyst: Connection quality monitor RSSI hysteresis | ||
188 | */ | 193 | */ |
189 | struct ieee80211_bss_conf { | 194 | struct ieee80211_bss_conf { |
190 | const u8 *bssid; | 195 | const u8 *bssid; |
@@ -202,6 +207,8 @@ struct ieee80211_bss_conf { | |||
202 | u64 timestamp; | 207 | u64 timestamp; |
203 | u32 basic_rates; | 208 | u32 basic_rates; |
204 | u16 ht_operation_mode; | 209 | u16 ht_operation_mode; |
210 | s32 cqm_rssi_thold; | ||
211 | u32 cqm_rssi_hyst; | ||
205 | }; | 212 | }; |
206 | 213 | ||
207 | /** | 214 | /** |
@@ -959,6 +966,12 @@ enum ieee80211_tkip_key_type { | |||
959 | * periodic keep-alives to the AP and probing the AP on beacon loss. | 966 | * periodic keep-alives to the AP and probing the AP on beacon loss. |
960 | * When this flag is set, signaling beacon-loss will cause an immediate | 967 | * When this flag is set, signaling beacon-loss will cause an immediate |
961 | * change to disassociated state. | 968 | * change to disassociated state. |
969 | * | ||
970 | * @IEEE80211_HW_SUPPORTS_CQM_RSSI: | ||
971 | * Hardware can do connection quality monitoring - i.e. it can monitor | ||
972 | * connection quality related parameters, such as the RSSI level and | ||
973 | * provide notifications if configured trigger levels are reached. | ||
974 | * | ||
962 | */ | 975 | */ |
963 | enum ieee80211_hw_flags { | 976 | enum ieee80211_hw_flags { |
964 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 977 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -981,6 +994,7 @@ enum ieee80211_hw_flags { | |||
981 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | 994 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, |
982 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, | 995 | IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, |
983 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, | 996 | IEEE80211_HW_CONNECTION_MONITOR = 1<<19, |
997 | IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, | ||
984 | }; | 998 | }; |
985 | 999 | ||
986 | /** | 1000 | /** |
@@ -2390,6 +2404,22 @@ void ieee80211_beacon_loss(struct ieee80211_vif *vif); | |||
2390 | */ | 2404 | */ |
2391 | void ieee80211_connection_loss(struct ieee80211_vif *vif); | 2405 | void ieee80211_connection_loss(struct ieee80211_vif *vif); |
2392 | 2406 | ||
2407 | /** | ||
2408 | * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring | ||
2409 | * rssi threshold triggered | ||
2410 | * | ||
2411 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
2412 | * @rssi_event: the RSSI trigger event type | ||
2413 | * @gfp: context flags | ||
2414 | * | ||
2415 | * When the %IEEE80211_HW_SUPPORTS_CQM_RSSI is set, and a connection quality | ||
2416 | * monitoring is configured with an rssi threshold, the driver will inform | ||
2417 | * whenever the rssi level reaches the threshold. | ||
2418 | */ | ||
2419 | void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, | ||
2420 | enum nl80211_cqm_rssi_threshold_event rssi_event, | ||
2421 | gfp_t gfp); | ||
2422 | |||
2393 | /* Rate control API */ | 2423 | /* Rate control API */ |
2394 | 2424 | ||
2395 | /** | 2425 | /** |