* [PATCH] ath9k: fix PHY error accounting in debugfs
@ 2012-02-23 10:28 Zefir Kurtisi
2012-02-23 10:41 ` Mohammed Shafi
0 siblings, 1 reply; 4+ messages in thread
From: Zefir Kurtisi @ 2012-02-23 10:28 UTC (permalink / raw)
To: linville; +Cc: ath9k-devel, linux-wireless, rodrigue, Zefir Kurtisi
ath9k_phyerr are defined as index but have been treated as bitmask
(with an outdated mask used) for counting PHY errors in debugfs.
---
drivers/net/wireless/ath/ath9k/debug.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 68d972b..3be5b83 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1049,8 +1049,6 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
#define RX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].rs\
[sc->debug.rsidx].c)
- u32 phyerr;
-
RX_STAT_INC(rx_pkts_all);
sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen;
@@ -1068,9 +1066,11 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
RX_STAT_INC(decrypt_busy_err);
if (rs->rs_status & ATH9K_RXERR_PHY) {
+ u32 phyerr;
RX_STAT_INC(phy_err);
- phyerr = rs->rs_phyerr & 0x24;
- RX_PHY_ERR_INC(phyerr);
+ phyerr = rs->rs_phyerr;
+ if (phyerr < ATH9K_PHYERR_MAX)
+ RX_PHY_ERR_INC(phyerr);
}
sc->debug.stats.rxstats.rs_rssi_ctl0 = rs->rs_rssi_ctl0;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: fix PHY error accounting in debugfs
2012-02-23 10:28 [PATCH] ath9k: fix PHY error accounting in debugfs Zefir Kurtisi
@ 2012-02-23 10:41 ` Mohammed Shafi
2012-02-23 10:57 ` Zefir Kurtisi
0 siblings, 1 reply; 4+ messages in thread
From: Mohammed Shafi @ 2012-02-23 10:41 UTC (permalink / raw)
To: Zefir Kurtisi; +Cc: linville, ath9k-devel, linux-wireless, rodrigue
Hi Zefir,
On Thu, Feb 23, 2012 at 3:58 PM, Zefir Kurtisi
<zefir.kurtisi@neratec.com> wrote:
> ath9k_phyerr are defined as index but have been treated as bitmask
> (with an outdated mask used) for counting PHY errors in debugfs.
> ---
> drivers/net/wireless/ath/ath9k/debug.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
> index 68d972b..3be5b83 100644
> --- a/drivers/net/wireless/ath/ath9k/debug.c
> +++ b/drivers/net/wireless/ath/ath9k/debug.c
> @@ -1049,8 +1049,6 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
> #define RX_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].rs\
> [sc->debug.rsidx].c)
>
> - u32 phyerr;
> -
> RX_STAT_INC(rx_pkts_all);
> sc->debug.stats.rxstats.rx_bytes_all += rs->rs_datalen;
>
> @@ -1068,9 +1066,11 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
> RX_STAT_INC(decrypt_busy_err);
>
> if (rs->rs_status & ATH9K_RXERR_PHY) {
> + u32 phyerr;
> RX_STAT_INC(phy_err);
> - phyerr = rs->rs_phyerr & 0x24;
> - RX_PHY_ERR_INC(phyerr);
> + phyerr = rs->rs_phyerr;
> + if (phyerr < ATH9K_PHYERR_MAX)
> + RX_PHY_ERR_INC(phyerr);
> }
>
> sc->debug.stats.rxstats.rs_rssi_ctl0 = rs->rs_rssi_ctl0;
> --
very recently fixed by
http://www.spinics.net/lists/linux-wireless/msg85034.html
--
thanks,
shafi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: fix PHY error accounting in debugfs
2012-02-23 10:41 ` Mohammed Shafi
@ 2012-02-23 10:57 ` Zefir Kurtisi
2012-02-23 11:00 ` Mohammed Shafi
0 siblings, 1 reply; 4+ messages in thread
From: Zefir Kurtisi @ 2012-02-23 10:57 UTC (permalink / raw)
To: Mohammed Shafi; +Cc: linville, ath9k-devel, linux-wireless, rodrigue
On 02/23/2012 11:41 AM, Mohammed Shafi wrote:
> Hi Zefir,
>
> [...]
>
> very recently fixed by
> http://www.spinics.net/lists/linux-wireless/msg85034.html
>
Thanks, missed that one.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath9k: fix PHY error accounting in debugfs
2012-02-23 10:57 ` Zefir Kurtisi
@ 2012-02-23 11:00 ` Mohammed Shafi
0 siblings, 0 replies; 4+ messages in thread
From: Mohammed Shafi @ 2012-02-23 11:00 UTC (permalink / raw)
To: Zefir Kurtisi; +Cc: linville, ath9k-devel, linux-wireless, rodrigue
On Thu, Feb 23, 2012 at 4:27 PM, Zefir Kurtisi
<zefir.kurtisi@neratec.com> wrote:
> On 02/23/2012 11:41 AM, Mohammed Shafi wrote:
>> Hi Zefir,
>>
>> [...]
>>
>> very recently fixed by
>> http://www.spinics.net/lists/linux-wireless/msg85034.html
>>
> Thanks, missed that one.
anyway, thanks for finding it!
--
thanks,
shafi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-23 11:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 10:28 [PATCH] ath9k: fix PHY error accounting in debugfs Zefir Kurtisi
2012-02-23 10:41 ` Mohammed Shafi
2012-02-23 10:57 ` Zefir Kurtisi
2012-02-23 11:00 ` Mohammed Shafi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).