Skip to contentSkip to conversation

staging: rtl8723bs: fix broken code when cflag is used

PATCH In review Rodrigo Gobbi 2 participants 2 messages Nov 25, 2024 – Dec 4, 2024 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: rtl8723bs: fix broken code when cflag is used

When using an extra cflag, DBG_RX_SIGNAL_DISPLAY_RAW_DATA, hal_com.c file doesn't compile.

Fixes ec57f8641fbc ("staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style.")

---
As noticed at [1], hal_com.c is not compiling with -DDBG_RX_SIGNAL_DISPLAY_RAW_DATA due the changes at [2] (a few statements were not replaced with the new struct). A little discussion was made at [1] too about how useful this cflag was or if the code under the cflag should be deleted. I think there is no harm to keep those things as is since we can easily fix the error and someone might be interested in using that to further debug the driver.
Tks and regards.

[1] https://lore.kernel.org/linux-staging/[email protected]/T/#mffa281a89e67c609db9b125878d5b8d090776812
[2] "staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style.", commit ec57f8641fbca07bbb61a75bd4760fd7aef86860
---
Changelog
v2: add missing commit msg and fixes tag;
v1: https://lore.kernel.org/linux-staging/2024112500-authentic-primarily-b5da@gregkh/T/#mea4fba3775a1015f345dfe322854c55db0cddf43

---
 drivers/staging/rtl8723bs/hal/hal_com.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/hal_com.c +3 -3
index 95fb38283c58..63bf6f034f61 100644
@@ -906,7 +906,7 @@ void rtw_store_phy_info(struct adapter *padapter, union recv_frame *prframe)
 	struct hal_com_data *pHalData =  GET_HAL_DATA(padapter);
 	struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
 
-	struct odm_phy_info *pPhyInfo  = (PODM_PHY_INFO_T)(&pattrib->phy_info);
+	struct odm_phy_info *pPhyInfo  = (struct odm_phy_info *)(&pattrib->phy_info);
 	struct rx_raw_rssi *psample_pkt_rssi = &padapter->recvpriv.raw_rssi_info;
 
 	psample_pkt_rssi->data_rate = pattrib->data_rate;
@@ -919,8 +919,8 @@ void rtw_store_phy_info(struct adapter *padapter, union recv_frame *prframe)
 		psample_pkt_rssi->mimo_signal_strength[rf_path] = pPhyInfo->rx_mimo_signal_strength[rf_path];
 		psample_pkt_rssi->mimo_signal_quality[rf_path] = pPhyInfo->rx_mimo_signal_quality[rf_path];
 		if (!isCCKrate) {
-			psample_pkt_rssi->ofdm_pwr[rf_path] = pPhyInfo->RxPwr[rf_path];
-			psample_pkt_rssi->ofdm_snr[rf_path] = pPhyInfo->RxSNR[rf_path];
+			psample_pkt_rssi->ofdm_pwr[rf_path] = pPhyInfo->rx_pwr[rf_path];
+			psample_pkt_rssi->ofdm_snr[rf_path] = pPhyInfo->rx_snr[rf_path];
 		}
 	}
 }
Signature · 1 line
2.47.0
maintainer
#1 lore raw
Quoted 5 lines · Rodrigo Gobbi

When using an extra cflag, DBG_RX_SIGNAL_DISPLAY_RAW_DATA, hal_com.c file doesn't compile.

Fixes ec57f8641fbc ("staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' coding style.")
Quoted 7 lines

---
As noticed at [1], hal_com.c is not compiling with -DDBG_RX_SIGNAL_DISPLAY_RAW_DATA due the changes at [2] (a few statements were not replaced with the new struct). A little discussion was made at [1] too about how useful this cflag was or if the code under the cflag should be deleted. I think there is no harm to keep those things as is since we can easily fix the error and someone might be interested in using that to further debug the driver.

Let's just delete that flag entirely, no one builds in-kernel modules with different cflags. Please just remove the code completly.

thanks,

greg k-h