diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-27 16:08:01 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-01 13:48:21 -0500 |
commit | 3af6334c9e4fbf41ef0ebd3b4d5762f26b675c40 (patch) | |
tree | ffc05f816754d2393963ee13f4c7a3eb515e0627 /net/mac80211/rx.c | |
parent | c8dcfd8a046c1f49af0c15726761af17b957962d (diff) |
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.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5b534235d6be..5c1930ba8ebe 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) | |||
1156 | if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { | 1156 | if (rx->sdata->vif.type == NL80211_IFTYPE_ADHOC) { |
1157 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, | 1157 | u8 *bssid = ieee80211_get_bssid(hdr, rx->skb->len, |
1158 | NL80211_IFTYPE_ADHOC); | 1158 | NL80211_IFTYPE_ADHOC); |
1159 | if (compare_ether_addr(bssid, rx->sdata->u.ibss.bssid) == 0) | 1159 | if (compare_ether_addr(bssid, rx->sdata->u.ibss.bssid) == 0) { |
1160 | sta->last_rx = jiffies; | 1160 | sta->last_rx = jiffies; |
1161 | if (ieee80211_is_data(hdr->frame_control)) { | ||
1162 | sta->last_rx_rate_idx = status->rate_idx; | ||
1163 | sta->last_rx_rate_flag = status->flag; | ||
1164 | } | ||
1165 | } | ||
1161 | } else if (!is_multicast_ether_addr(hdr->addr1)) { | 1166 | } else if (!is_multicast_ether_addr(hdr->addr1)) { |
1162 | /* | 1167 | /* |
1163 | * Mesh beacons will update last_rx when if they are found to | 1168 | * Mesh beacons will update last_rx when if they are found to |
1164 | * match the current local configuration when processed. | 1169 | * match the current local configuration when processed. |
1165 | */ | 1170 | */ |
1166 | sta->last_rx = jiffies; | 1171 | sta->last_rx = jiffies; |
1172 | if (ieee80211_is_data(hdr->frame_control)) { | ||
1173 | sta->last_rx_rate_idx = status->rate_idx; | ||
1174 | sta->last_rx_rate_flag = status->flag; | ||
1175 | } | ||
1167 | } | 1176 | } |
1168 | 1177 | ||
1169 | if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) | 1178 | if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) |