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

From: Toke Høiland-Jørgensen
Date: Mon Apr 04 2022 - 18:00:33 EST


Peter Seiderer <ps.report@xxxxxxx> 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