* [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1}
@ 2026-06-10 13:01 Bitterblue Smith
2026-06-10 13:02 ` [PATCH rtw-next 2/2] wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1 Bitterblue Smith
2026-06-11 0:58 ` [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Ping-Ke Shih
0 siblings, 2 replies; 4+ messages in thread
From: Bitterblue Smith @ 2026-06-10 13:01 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih
Replace <= with < in the loops in query_phy_status_page{0,1}(). They
were processing data related to RF path C, which this chip doesn't have.
The only bad effect seems to be that the phy_info file in debugfs was
printing unexpected values for RF path C.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
index 244c8026479c..80c9f0c11e5c 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
@@ -2584,7 +2584,7 @@ static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status,
pkt_stat->rx_power[RF_PATH_A] = rx_power[RF_PATH_A];
pkt_stat->rx_power[RF_PATH_B] = rx_power[RF_PATH_B];
- for (path = 0; path <= rtwdev->hal.rf_path_num; path++) {
+ for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
rssi = rtw_phy_rf_power_2_rssi(&pkt_stat->rx_power[path], 1);
dm_info->rssi[path] = rssi;
}
@@ -2644,7 +2644,7 @@ static void query_phy_status_page1(struct rtw_dev *rtwdev, u8 *phy_status,
pkt_stat->cfo_tail[RF_PATH_A] = GET_PHY_STAT_P1_CFO_TAIL_A(phy_status);
pkt_stat->cfo_tail[RF_PATH_B] = GET_PHY_STAT_P1_CFO_TAIL_B(phy_status);
- for (path = 0; path <= rtwdev->hal.rf_path_num; path++) {
+ for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
rssi = rtw_phy_rf_power_2_rssi(&pkt_stat->rx_power[path], 1);
dm_info->rssi[path] = rssi;
if (path == RF_PATH_A) {
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH rtw-next 2/2] wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1
2026-06-10 13:01 [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Bitterblue Smith
@ 2026-06-10 13:02 ` Bitterblue Smith
2026-06-11 0:58 ` Ping-Ke Shih
2026-06-11 0:58 ` [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Ping-Ke Shih
1 sibling, 1 reply; 4+ messages in thread
From: Bitterblue Smith @ 2026-06-10 13:02 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org; +Cc: Ping-Ke Shih
Replace <= with < in the loop in query_phy_status_page1(). It was
processing data related to RF path C, which this chip doesn't have.
The only bad effect seems to be that the phy_info file in debugfs was
printing unexpected values for RF path C.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index e9e8a7f3f382..37b7a520fea0 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -896,7 +896,7 @@ static void query_phy_status_page1(struct rtw_dev *rtwdev, u8 *phy_status,
pkt_stat->cfo_tail[RF_PATH_A] = GET_PHY_STAT_P1_CFO_TAIL_A(phy_status);
pkt_stat->cfo_tail[RF_PATH_B] = GET_PHY_STAT_P1_CFO_TAIL_B(phy_status);
- for (path = 0; path <= rtwdev->hal.rf_path_num; path++) {
+ for (path = 0; path < rtwdev->hal.rf_path_num; path++) {
rssi = rtw_phy_rf_power_2_rssi(&pkt_stat->rx_power[path], 1);
dm_info->rssi[path] = rssi;
dm_info->rx_snr[path] = pkt_stat->rx_snr[path] >> 1;
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1}
2026-06-10 13:01 [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Bitterblue Smith
2026-06-10 13:02 ` [PATCH rtw-next 2/2] wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1 Bitterblue Smith
@ 2026-06-11 0:58 ` Ping-Ke Shih
1 sibling, 0 replies; 4+ messages in thread
From: Ping-Ke Shih @ 2026-06-11 0:58 UTC (permalink / raw)
To: Bitterblue Smith, linux-wireless@vger.kernel.org
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> Replace <= with < in the loops in query_phy_status_page{0,1}(). They
> were processing data related to RF path C, which this chip doesn't have.
> The only bad effect seems to be that the phy_info file in debugfs was
> printing unexpected values for RF path C.
>
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-11 0:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 13:01 [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Bitterblue Smith
2026-06-10 13:02 ` [PATCH rtw-next 2/2] wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1 Bitterblue Smith
2026-06-11 0:58 ` Ping-Ke Shih
2026-06-11 0:58 ` [PATCH rtw-next 1/2] wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox