Re: [PATCH ath-next v4 2/8] wifi: ath9k_htc: fix the byte count of a full RMW buffer flush

From: Toke Høiland-Jørgensen

Date: Mon Oct 19 2026 - 15:19:26 EST


Nerijus Bendžiūnas <nerijus.bendziunas@xxxxxxxxx> writes:

> ath9k_reg_rmw_buffer() sizes a full-buffer flush with
> sizeof(struct register_write), 8 bytes, instead of
> sizeof(struct register_rmw), 12 bytes. ar9271_hw_pa_cal() queues
> exactly 15 read-modify-writes, so the AR9271 PA calibration has been
> losing its last five writes since the buffer was added.
>
> The corrected command is 192 bytes, three full 64-byte USB packets,
> and the firmware ends a command only on a short packet, so the device
> stops answering WMI on the first interface open. Send the whole buffer
> on a full flush and cap it at 14 entries; 15 is the only count within
> the buffer's reach that fills whole packets.
>
> Fixes: 8badb50cfab6 ("ath9k_htc: add new WMI_REG_RMW_CMDID command")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@xxxxxxxxx>

Acked-by: Toke Høiland-Jørgensen <toke@xxxxxxx>