Only report PHY error frames for ANI on chipsets which do not have PHY error
counters in hardware.

Signed-off-by: Bruno Randolf <b...@einfach.org>
Acked-by: Bob Copeland <m...@bobcopeland.com>
---
 drivers/net/wireless/ath/ath5k/desc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/desc.c 
b/drivers/net/wireless/ath/ath5k/desc.c
index c0037b6..4324438 100644
--- a/drivers/net/wireless/ath/ath5k/desc.c
+++ b/drivers/net/wireless/ath/ath5k/desc.c
@@ -651,7 +651,8 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
                        rs->rs_status |= AR5K_RXERR_PHY;
                        rs->rs_phyerr = AR5K_REG_MS(rx_status->rx_status_1,
                                AR5K_5212_RX_DESC_STATUS1_PHY_ERROR_CODE);
-                       ath5k_ani_phy_error_report(ah, rs->rs_phyerr);
+                       if (!ah->ah_capabilities.cap_has_phyerr_counters)
+                               ath5k_ani_phy_error_report(ah, rs->rs_phyerr);
                }
 
                if (rx_status->rx_status_1 &

_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to