summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-27 22:08:01 +0100
committerJohn W. Linville <linville@tuxdriver.com>2011-03-01 13:48:21 -0500
commit3af6334c9e4fbf41ef0ebd3b4d5762f26b675c40 (patch)
treeffc05f816754d2393963ee13f4c7a3eb515e0627 /net/mac80211/rx.c
parentc8dcfd8a046c1f49af0c15726761af17b957962d (diff)
downloadop-kernel-dev-3af6334c9e4fbf41ef0ebd3b4d5762f26b675c40.zip
op-kernel-dev-3af6334c9e4fbf41ef0ebd3b4d5762f26b675c40.tar.gz
mac80211: add support for showing the last rx bitrate
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 5b53423..5c1930ba 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1156,14 +1156,23 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) {
u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len,
NL80211_IFTYPE_ADHOC);
- if (compare_ether_addr(bssid, rx->sdata->u.ibss.bssid) == 0)
+ if (compare_ether_addr(bssid, rx->sdata->u.ibss.bssid) == 0) {
sta->last_rx = jiffies;
+ if (ieee80211_is_data(hdr->frame_control)) {
+ sta->last_rx_rate_idx = status->rate_idx;
+ sta->last_rx_rate_flag = status->flag;
+ }
+ }
} else if (!is_multicast_ether_addr(hdr->addr1)) {
/*
* Mesh beacons will update last_rx when if they are found to
* match the current local configuration when processed.
*/
sta->last_rx = jiffies;
+ if (ieee80211_is_data(hdr->frame_control)) {
+ sta->last_rx_rate_idx = status->rate_idx;
+ sta->last_rx_rate_flag = status->flag;
+ }
}
if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
OpenPOWER on IntegriCloud