wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1}
PATCH 1/2 wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1}
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.
--- drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw88/rtw8822c.c +2 -2
@@ -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 ) {
Signature · 1 line
2.54.0
PATCH 2/2 wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1
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.
--- drivers/net/wireless/realtek/rtw88/rtw8822b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/rtw8822b.c +1 -1
@@ -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 ;
Signature · 1 line
2.54.0
RE: [PATCH rtw-next 2/2] wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1
Quoted 6 lines · Bitterblue Smith
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 thephy_infofile in debugfs was printing unexpected values for RF path C.Signed-off-by Bitterblue Smith <[email protected]>
Quoted 6 lines · Bitterblue Smith
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_infofile in debugfs was printing unexpected values for RF path C.Signed-off-by Bitterblue Smith <[email protected]>
Ping-Ke Shih
maintainerQuoted 7 lines · Bitterblue Smith
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_infofile in debugfs was printing unexpected values for RF path C.Signed-off-by Bitterblue Smith <[email protected]>Acked-by Ping-Ke Shih <[email protected]>
2 patch(es) applied to rtw-next branch of rtw.git, thanks.
a4a2c1a1032f wifi: rtw88: 8822c: Don't process RF path C in query_phy_status_page{0,1} 617b1d97617b wifi: rtw88: 8822b: Don't process RF path C in query_phy_status_page1