diff mbox

ath10k: fix printing of peer stats in non-AP firmware

Message ID CA+BoTQnG4QAYrinu3LLj9PbSAdvuUzqyAZQvgrWme5Qd2Hpq6Q@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Michal Kazior March 25, 2014, 9:47 a.m. UTC
On 25 March 2014 10:38, Yeoh Chun-Yeow <yeohchunyeow@gmail.com> wrote:
>> I don't think that's true for 10.1 firmware and AP interface types.
>
> I try to play around with 10.1 firmware as AP (3 connected STAs) and I
> get the following:
>
> The first WMI_UPDATE_STATS_EVENTID as follow:
> [ 338.290000] ath10k: pdev 0 vdev 0 peer 3
> [  338.300000] ath10k: MAC 04:f0:21:0c:a5:44
> [  338.300000] ath10k: RSSI 60
> [  338.300000] ath10k: Tx 1170000
> [  338.310000] ath10k: Rx 1170000
> [  338.310000] ath10k: MAC 04:f0:21:0c:a5:19
> [  338.320000] ath10k: RSSI 64
> [  338.320000] ath10k: Tx 1300000
> [  338.320000] ath10k: Rx 975000
> [  338.320000] ath10k: MAC 04:f0:21:0c:a5:1c
> [  338.330000] ath10k: RSSI 71
> [  338.330000] ath10k: Tx 975000
> [  338.330000] ath10k: Rx 1300000
>
> I think that above is correct.
>
> The second WMI_UPDATE_STATS_EVENTID as follow:
> [  338.340000] ath10k: pdev 1 vdev 0 peer 1
> [  338.350000] ath10k: MAC a8:02:00:00:00:00
> [  338.350000] ath10k: RSSI 0
> [  338.350000] ath10k: Tx 565
> [  338.360000] ath10k: Rx 0
>
> Although indicating 1 peer, but the data seems to be not the peer
> stats, not even self STA stats. Any idea?

Yes.

The second stats event has pdev stats. As per my other mail, 10.1 has
extra pdev stats. Since ath10k doesn't account that it reads peer
stats too early from the buffer. What you see is a tail of pdev stats
for 10.1.

You can try the following to test *10.1*:

Micha?
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Chun-Yeow Yeoh March 25, 2014, 10:31 a.m. UTC | #1
>
> The second stats event has pdev stats. As per my other mail, 10.1 has
> extra pdev stats. Since ath10k doesn't account that it reads peer
> stats too early from the buffer. What you see is a tail of pdev stats
> for 10.1.
>
> You can try the following to test *10.1*:
>
> --- a/drivers/net/wireless/ath/ath10k/wmi.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
> @@ -2804,6 +2804,12 @@ struct wmi_pdev_stats {
>         __le32 phy_err_count;  /* Phy error count */
>         __le32 chan_tx_pwr;    /* channel tx power */
>         struct wal_dbg_stats wal; /* WAL dbg stats */
> +       __le32 ack_rx_bad;
> +       __le32 rts_bad;
> +       __le32 rts_good;
> +       __le32 fcs_bad;
> +       __le32 no_beacons;
> +       __le32 mib_int_count;
>  } __packed;
>

Ok. Probably can come out with a patch extending the pdev stats on this.

I get the self STA stats as follow on 10.1 firmware:

AP:
[  754.280000] ath10k: pdev 1 vdev 0 peer 1
[  754.280000] ath10k: MAC 04:f0:21:0c:a5:43
[  754.280000] ath10k: RSSI 0
[  754.290000] ath10k: Tx 6000
[  754.290000] ath10k: Rx 0

STA:
[  880.060000] ath10k: pdev 1 vdev 0 peer 1
[  880.060000] ath10k: MAC 00:00:00:00:00:01
[  880.070000] ath10k: RSSI 0
[  880.070000] ath10k: Tx 6000
[  880.070000] ath10k: Rx 0

Similar to 636. But on 636, I don't find any tx rate, only rssi.

---
Chun-Yeow
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -2804,6 +2804,12 @@  struct wmi_pdev_stats {
        __le32 phy_err_count;  /* Phy error count */
        __le32 chan_tx_pwr;    /* channel tx power */
        struct wal_dbg_stats wal; /* WAL dbg stats */
+       __le32 ack_rx_bad;
+       __le32 rts_bad;
+       __le32 rts_good;
+       __le32 fcs_bad;
+       __le32 no_beacons;
+       __le32 mib_int_count;
 } __packed;