Re: [PATCH rtw-next v3 4/5] wifi: rtw88: 88xxa: correct carrier-frequency offset
From: Luka Gejak
Date: Fri Nov 13 2026 - 04:53:13 EST
Hi Jie Feng,
Thanks for adding the comment. One small comment below.
On November 12, 2026 6:32:43 PM GMT+01:00, Ho Jie Feng <hjf3108@xxxxxxxxx>
wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/phy.c b/drivers/net/wireless/realtek/rtw88/phy.c
> index d0c1fb65be..eed3e2cb60 100644
> --- a/drivers/net/wireless/realtek/rtw88/phy.c
> +++ b/drivers/net/wireless/realtek/rtw88/phy.c
> @@ -687,13 +687,15 @@ static void rtw_phy_parsing_cfo_iter(void *data, u8 *mac,
> struct rtw_rx_pkt_stat *pkt_stat = iter_data->pkt_stat;
> struct rtw_dm_info *dm_info = &rtwdev->dm_info;
> struct rtw_cfo_track *cfo = &dm_info->cfo_track;
> + /* rtl8814a has 4 paths, but only 2 of them report cfo */
> + u8 path_num = min_t(u8, rtwdev->hal.rf_path_num, 2);
[ ... ]
> @@ -794,7 +796,7 @@ u8 rtw_phy_cfo_xcap_track(struct rtw_dev *rtwdev, u8 xcap_max, bool bt_hold)
> {
> struct rtw_dm_info *dm_info = &rtwdev->dm_info;
> struct rtw_cfo_track *cfo = &dm_info->cfo_track;
> - u8 path_num = rtwdev->hal.rf_path_num;
> + u8 path_num = min_t(u8, rtwdev->hal.rf_path_num, 2);
The new comment explains the 2 in rtw_phy_parsing_cfo_iter(), but
rtw_phy_cfo_xcap_track() has the same min_t() without it, so someone
reading that function still sees an unexplained 2.
Maybe add a define in phy.h and use it in both places, something like:
/* RTL8814A has 4 paths, but only paths A and B report CFO */
#define RTW_CFO_PATH_NUM_MAX 2
Best regards,
Luka Gejak