2022-04-05 00:41:07

by Toke Høiland-Jørgensen

[permalink] [raw]
Subject: Re: [PATCH v1 1/2] ath9k: fix ath_get_rate_txpower() to respect the rate list end tag

Peter Seiderer <[email protected]> writes:

> Stop reading (and copying) from ieee80211_tx_rate to ath_tx_info.rates
> after list end tag (count == 0, idx < 0), prevents copying of garbage
> to card registers.

In the normal case I don't think this patch does anything, since any
invalid rate entries will already be skipped (just one at a time instead
of all at once). So this comment is a bit misleading.

Also, Minstrel could in principle produce a rate sequence where the
indexes are all positive, but there's one in the middle with a count of
0, couldn't it? With this patch, the last entries of such a sequence
would now be skipped...

-Toke