aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-16 17:23:34 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-03-30 04:17:09 -0400
commita818292952bbfad12ec5a32ab01330cb1ceed013 (patch)
treead86dcdaf4e0ae381180d5c2f8545bef55de21c7 /include
parent2c158887f1185e04b3763ae346da9f71fcbc4429 (diff)
mac80211: convert rssi_callback() to event_callback()
We will be able to add more events, such as MLME events and others. The low level driver may be interested in knowing about these events to dump firmware data upon failures, or to change parameters in case connection attempts fail etc... Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/mac80211.h48
1 files changed, 38 insertions, 10 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 157c0f151766..7a966f3ed67a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -301,17 +301,44 @@ enum ieee80211_bss_change {
301#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4 301#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4
302 302
303/** 303/**
304 * enum ieee80211_rssi_event - RSSI threshold event 304 * enum ieee80211_event_type - event to be notified to the low level driver
305 * An indicator for when RSSI goes below/above a certain threshold. 305 * @RSSI_EVENT: AP's rssi crossed the a threshold set by the driver.
306 * @RSSI_EVENT_HIGH: AP's rssi crossed the high threshold set by the driver.
307 * @RSSI_EVENT_LOW: AP's rssi crossed the low threshold set by the driver.
308 */ 306 */
309enum ieee80211_rssi_event { 307enum ieee80211_event_type {
308 RSSI_EVENT,
309};
310
311/**
312 * enum ieee80211_rssi_event_data - relevant when event type is %RSSI_EVENT
313 * @RSSI_EVENT_HIGH: AP's rssi went below the threshold set by the driver.
314 * @RSSI_EVENT_LOW: AP's rssi went above the threshold set by the driver.
315 */
316enum ieee80211_rssi_event_data {
310 RSSI_EVENT_HIGH, 317 RSSI_EVENT_HIGH,
311 RSSI_EVENT_LOW, 318 RSSI_EVENT_LOW,
312}; 319};
313 320
314/** 321/**
322 * enum ieee80211_rssi_event - data attached to an %RSSI_EVENT
323 * @data: See &enum ieee80211_rssi_event_data
324 */
325struct ieee80211_rssi_event {
326 enum ieee80211_rssi_event_data data;
327};
328
329/**
330 * struct ieee80211_event - event to be sent to the driver
331 * @type The event itself. See &enum ieee80211_event_type.
332 * @rssi: relevant if &type is %RSSI_EVENT
333 */
334struct ieee80211_event {
335 enum ieee80211_event_type type;
336 union {
337 struct ieee80211_rssi_event rssi;
338 } u;
339};
340
341/**
315 * struct ieee80211_bss_conf - holds the BSS's changing parameters 342 * struct ieee80211_bss_conf - holds the BSS's changing parameters
316 * 343 *
317 * This structure keeps information about a BSS (and an association 344 * This structure keeps information about a BSS (and an association
@@ -2862,8 +2889,9 @@ enum ieee80211_reconfig_type {
2862 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection 2889 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection
2863 * when transmitting a frame. Currently only legacy rates are handled. 2890 * when transmitting a frame. Currently only legacy rates are handled.
2864 * The callback can sleep. 2891 * The callback can sleep.
2865 * @rssi_callback: Notify driver when the average RSSI goes above/below 2892 * @event_callback: Notify driver about any event in mac80211. See
2866 * thresholds that were registered previously. The callback can sleep. 2893 * &enum ieee80211_event_type for the different types.
2894 * The callback can sleep.
2867 * 2895 *
2868 * @release_buffered_frames: Release buffered frames according to the given 2896 * @release_buffered_frames: Release buffered frames according to the given
2869 * parameters. In the case where the driver buffers some frames for 2897 * parameters. In the case where the driver buffers some frames for
@@ -3159,9 +3187,9 @@ struct ieee80211_ops {
3159 bool (*tx_frames_pending)(struct ieee80211_hw *hw); 3187 bool (*tx_frames_pending)(struct ieee80211_hw *hw);
3160 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 3188 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
3161 const struct cfg80211_bitrate_mask *mask); 3189 const struct cfg80211_bitrate_mask *mask);
3162 void (*rssi_callback)(struct ieee80211_hw *hw, 3190 void (*event_callback)(struct ieee80211_hw *hw,
3163 struct ieee80211_vif *vif, 3191 struct ieee80211_vif *vif,
3164 enum ieee80211_rssi_event rssi_event); 3192 const struct ieee80211_event *event);
3165 3193
3166 void (*allow_buffered_frames)(struct ieee80211_hw *hw, 3194 void (*allow_buffered_frames)(struct ieee80211_hw *hw,
3167 struct ieee80211_sta *sta, 3195 struct ieee80211_sta *sta,