diff options
author | Victor Goldenshtein <victorg@ti.com> | 2012-06-21 07:56:46 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-06-21 14:42:17 (GMT) |
commit | 66572cfc30a4b764150c83ee5d842a3ce17991c9 (patch) | |
tree | 3b344b9c986b55f77b4652fd46ce2dad9138ea31 /net/mac80211/driver-ops.h | |
parent | 0f6b3f597daab2254614e2773e322e73fb1b6f4b (diff) | |
download | linux-fsl-qoriq-66572cfc30a4b764150c83ee5d842a3ce17991c9.tar.xz |
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.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 6d33a0c..9330269 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, more_data); trace_drv_return_void(local); } + +static inline int drv_get_rssi(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_sta *sta, + s8 *rssi_dbm) +{ + int ret; + + might_sleep(); + + ret = local->ops->get_rssi(&local->hw, &sdata->vif, sta, rssi_dbm); + trace_drv_get_rssi(local, sta, *rssi_dbm, ret); + + return ret; +} #endif /* __MAC80211_DRIVER_OPS */ |