aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorVictor Goldenshtein <victorg@ti.com>2012-06-21 03:56:46 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-06-21 10:42:17 -0400
commit66572cfc30a4b764150c83ee5d842a3ce17991c9 (patch)
tree3b344b9c986b55f77b4652fd46ce2dad9138ea31 /net/mac80211/driver-ops.h
parent0f6b3f597daab2254614e2773e322e73fb1b6f4b (diff)
mac80211: add command to get current rssi
Get current rssi (in dBm) from the driver/FW. Instead of reporting the signal received in the last rx packet, which might be inaccurate if rx traffic is low and beacon filtering is enabled, get the signal from the driver/FW. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 6d33a0c743ab..933026949df9 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -845,4 +845,19 @@ drv_allow_buffered_frames(struct ieee80211_local *local,
845 more_data); 845 more_data);
846 trace_drv_return_void(local); 846 trace_drv_return_void(local);
847} 847}
848
849static inline int drv_get_rssi(struct ieee80211_local *local,
850 struct ieee80211_sub_if_data *sdata,
851 struct ieee80211_sta *sta,
852 s8 *rssi_dbm)
853{
854 int ret;
855
856 might_sleep();
857
858 ret = local->ops->get_rssi(&local->hw, &sdata->vif, sta, rssi_dbm);
859 trace_drv_get_rssi(local, sta, *rssi_dbm, ret);
860
861 return ret;
862}
848#endif /* __MAC80211_DRIVER_OPS */ 863#endif /* __MAC80211_DRIVER_OPS */