RE: [PATCH 3/4] wifi: rtw88: rtw8822c: switch to the kernel's sort() library
From: Ping-Ke Shih
Date: Fri Aug 14 2026 - 04:04:04 EST
Arsenii Pashchenko <ulijg308@xxxxxxxxx> wrote:
> Replace the custom, nested bubble-sort logic in rtw8822c_dac_iq_sort()
> and __rtw8822c_dac_iq_sort() with a call to the kernel's optimized
> heapsort implementation.
>
> Implement a concise, localized s32 comparator. Since the previous
> patch already guarantees that input values are properly sign-extended
> into signed arrays, the custom circular index sorting rules completely
> disappear, trimming down lines of code.
>
> Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
I think this patch is correct, but please use real hardware to verify please.
The calibration is very important to WiFi performance, and hard to find
a slight degrade (e.g. throughput degrade from 500Mbps to 480Mbps).
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>