[PATCH v2] ath10k: handle cycle count wrap around

Michal Kazior michal.kazior at tieto.com
Mon May 18 05:05:09 PDT 2015


On 16 May 2015 at 00:29, Srinivasa Duvvuri <sduvvuri at chromium.org> wrote:
> This patch addresses
>  couple of issues related to survey data that results   in a random/large
>  values in the out put of iw dev wlan0 surevey dump.
>
>   These are the 2 changes that address the issue.
>
>   1) Handle Cycle count wrap around.
>      When the cycle counts part of wmi_ch_info_ev_arg reach max value of
>      0xffffffff. The HW/FW right shifts all the counteirs by 1 . The cycle
>      count will be reset to 0x7fffffff and starts counting from 0x7fffffff and
>      the other counters will have their value right shifted by 1 (divided by 2).

>      There is no way to handle this odd wrap around. Detect and ignore the wrap
>      around case.

This is incorrect. This *can* be handled.

Also this problem is relevant for qca988x only. qca61x4 doesn't have
this weird wraparound. ath10k needs to support both of these properly.


>
>   2) Handle Back to back channel info events from FW with
>      WMI_CHAN_INFO_FLAG_COMPLETE.
>      Between 2 scans FW sends back to back events with
>      WMI_CHAN_INFO_FLAG_COMPLETE flag set. One at the end of first scan
>      and the second at the beginning of scan. Depending on the time
>      between 2 scans , the cycle counts could have wrapped around several
>      timesi. Fix is detect and to ignore such events.

I don't think it's actually necessary to ignore this. This can be
handled on a best-effort basis and still provide some reasonable data
to the user.

Also a patch should never change more than 1 thing. Your patch tries
to fix 2 problems at once.

I can pick this up and continue with a v3 later on if you don't mind.


Michał



More information about the ath10k mailing list