aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>2011-07-08 11:46:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:06 -0400
commit615f7b9bb1f8e0e3188470245cec44f175189084 (patch)
tree4c0803460f682c34b11929a1fe22e150839efedb /include/net
parent0a49b2c2a6bf2f774675e472afe68951900596fb (diff)
mac80211: add driver RSSI threshold events
mac80211 maintains a running average of the RSSI when a STA is associated to an AP. Report threshold events to any driver that has registered callbacks for getting RSSI measurements. Implement callbacks in mac80211 so that driver can set thresholds. Add callbacks in mac80211 which is invoked when an RSSI threshold event occurs. mac80211: add tracing to rssi_reports api and remove extraneous fn argument mac80211: scale up rssi thresholds from driver by 16 before storing Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b29456a945c2..8ff3d8a1377c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -194,6 +194,17 @@ enum ieee80211_bss_change {
194#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4 194#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4
195 195
196/** 196/**
197 * enum ieee80211_rssi_event - RSSI threshold event
198 * An indicator for when RSSI goes below/above a certain threshold.
199 * @RSSI_EVENT_HIGH: AP's rssi crossed the high threshold set by the driver.
200 * @RSSI_EVENT_LOW: AP's rssi crossed the low threshold set by the driver.
201 */
202enum ieee80211_rssi_event {
203 RSSI_EVENT_HIGH,
204 RSSI_EVENT_LOW,
205};
206
207/**
197 * struct ieee80211_bss_conf - holds the BSS's changing parameters 208 * struct ieee80211_bss_conf - holds the BSS's changing parameters
198 * 209 *
199 * This structure keeps information about a BSS (and an association 210 * This structure keeps information about a BSS (and an association
@@ -1867,6 +1878,8 @@ enum ieee80211_ampdu_mlme_action {
1867 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection 1878 * @set_bitrate_mask: Set a mask of rates to be used for rate control selection
1868 * when transmitting a frame. Currently only legacy rates are handled. 1879 * when transmitting a frame. Currently only legacy rates are handled.
1869 * The callback can sleep. 1880 * The callback can sleep.
1881 * @rssi_callback: Notify driver when the average RSSI goes above/below
1882 * thresholds that were registered previously. The callback can sleep.
1870 */ 1883 */
1871struct ieee80211_ops { 1884struct ieee80211_ops {
1872 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1885 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1975,6 +1988,8 @@ struct ieee80211_ops {
1975 bool (*tx_frames_pending)(struct ieee80211_hw *hw); 1988 bool (*tx_frames_pending)(struct ieee80211_hw *hw);
1976 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1989 int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1977 const struct cfg80211_bitrate_mask *mask); 1990 const struct cfg80211_bitrate_mask *mask);
1991 void (*rssi_callback)(struct ieee80211_hw *hw,
1992 enum ieee80211_rssi_event rssi_event);
1978}; 1993};
1979 1994
1980/** 1995/**
@@ -3316,4 +3331,9 @@ ieee80211_vif_type_p2p(struct ieee80211_vif *vif)
3316 return ieee80211_iftype_p2p(vif->type, vif->p2p); 3331 return ieee80211_iftype_p2p(vif->type, vif->p2p);
3317} 3332}
3318 3333
3334void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
3335 int rssi_min_thold,
3336 int rssi_max_thold);
3337
3338void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
3319#endif /* MAC80211_H */ 3339#endif /* MAC80211_H */