RE: [PATCH rtw-next v6 3/3] wifi: rtw88: rtw8822c: Replace custom DAC IQ sorting with kernel sort
From: Ping-Ke Shih
Date: Tue Aug 25 2026 - 03:43:32 EST
Arsenii Pashchenko <ulijg308@xxxxxxxxx> wrote:
> Replace the custom, nested bubble-sort logic in the calibration loop
> with direct calls to the kernel's optimized heapsort implementation
> inside rtw8822c_dac_cal_iq_search().
>
> Implement a safe, overflow-proof s32 comparator using the subtraction
> of relationals pattern. Since the input values are already properly
> sign-extended into signed arrays, the custom circular index sorting
> rules and helper functions completely disappear, reducing lines of code.
>
> Signed-off-by: Arsenii Pashchenko <ulijg308@xxxxxxxxx>
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>