diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2014-01-15 11:07:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-01-16 14:55:44 -0500 |
commit | 1cc47a5b2417b319d022d8aa995888d791b1eee1 (patch) | |
tree | 2ee5e43b1b4db8694f1c91ecb3d92fe5f606a0ca /drivers/net/wireless/ath/ath9k | |
parent | f1d267cab2bc6ecd225abfd8d7e130f9a651408f (diff) |
ath9k: use ath_is_mybeacon
This patch will also change behavior of rx_beacons statistic.
Instead of collecting all received beacons, it will collect only
ours. This, IMO make more sense, since for troubleshooting we will
need to know count of our beacons, or both.
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 5bf3243dce0f..a0ebdd000fc2 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -969,21 +969,6 @@ static void ath9k_process_tsf(struct ath_rx_status *rs, | |||
969 | rxs->mactime += 0x100000000ULL; | 969 | rxs->mactime += 0x100000000ULL; |
970 | } | 970 | } |
971 | 971 | ||
972 | static bool ath9k_is_mybeacon(struct ath_softc *sc, struct ieee80211_hdr *hdr) | ||
973 | { | ||
974 | struct ath_hw *ah = sc->sc_ah; | ||
975 | struct ath_common *common = ath9k_hw_common(ah); | ||
976 | |||
977 | if (ieee80211_is_beacon(hdr->frame_control)) { | ||
978 | RX_STAT_INC(rx_beacons); | ||
979 | if (!is_zero_ether_addr(common->curbssid) && | ||
980 | ether_addr_equal_64bits(hdr->addr3, common->curbssid)) | ||
981 | return true; | ||
982 | } | ||
983 | |||
984 | return false; | ||
985 | } | ||
986 | |||
987 | /* | 972 | /* |
988 | * For Decrypt or Demic errors, we only mark packet status here and always push | 973 | * For Decrypt or Demic errors, we only mark packet status here and always push |
989 | * up the frame up to let mac80211 handle the actual error case, be it no | 974 | * up the frame up to let mac80211 handle the actual error case, be it no |
@@ -1071,7 +1056,10 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, | |||
1071 | goto exit; | 1056 | goto exit; |
1072 | } | 1057 | } |
1073 | 1058 | ||
1074 | rx_stats->is_mybeacon = ath9k_is_mybeacon(sc, hdr); | 1059 | if (ath_is_mybeacon(common, hdr)) { |
1060 | RX_STAT_INC(rx_beacons); | ||
1061 | rx_stats->is_mybeacon = true; | ||
1062 | } | ||
1075 | 1063 | ||
1076 | /* | 1064 | /* |
1077 | * This shouldn't happen, but have a safety check anyway. | 1065 | * This shouldn't happen, but have a safety check anyway. |