Skip to contentSkip to conversation

wifi: rtlwifi: Fix octal 024 typo in P2P_PS_OFFLOAD H2C command IDs

PATCH In review Ian Rogers 2 participants 3 messages Nov 19 – Nov 22 Realtek wireless driver (rtlwifi family)

lore
Share & tools
lore

Ian Rogers

author
#0 lore raw

PATCH 1/1 wifi: rtlwifi: Fix octal 024 typo in P2P_PS_OFFLOAD H2C command IDs

In rtl8821ae, rtl8192ee, and rtl8188ee, the H2C power-save command enums define 0x20, 0x21, 0x22, 0x23 followed by 'H2C_*_P2P_PS_OFFLOAD = 024'. The missing 'x' makes 024 an octal constant (decimal 20, 0x14) instead of 0x24 (decimal 36, matching H2C_8723B_P2P_PS_OFFLOAD = 0x24 in rtl8723be and rtl8xxxu), sending the wrong H2C command ID to firmware during Wi-Fi Direct P2P power-save offload updates.

Change 024 to 0x24 in all three headers.

Found via inspection of H2C command enums during an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig warning audit; fix and changelog drafted with an AI coding assistant. Build-tested under LLVM=1 W=1 (-Werror); not tested on Realtek Wi-Fi hardware.

Fixes f0eb856e0b6c ("rtlwifi: rtl8188ee: Add new driver")
Fixes 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree")
Fixes b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree")
---
 drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.h | 2 +-
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h +1 -1
index 79f095e47d71..583e1c51c5c9 100644
@@ -127,7 +127,7 @@ enum rtl8188e_h2c_cmd {
 	H2C_88E_PS_TUNING_PARA = 0x21,
 	H2C_88E_PS_TUNING_PARA2 = 0x22,
 	H2C_88E_PS_LPS_PARA = 0x23,
-	H2C_88E_P2P_PS_OFFLOAD = 024,
+	H2C_88E_P2P_PS_OFFLOAD = 0x24,
 
 #if (USE_OLD_WOWLAN_DEBUG_FW == 0)
 	H2C_88E_WO_WLAN = 0x80,
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.h +1 -1
index 27ac4f8b9a9b..e485d6f8b6bc 100644
@@ -89,7 +89,7 @@ enum rtl8192e_h2c_cmd {
 	H2C_92E_PS_TUNING_PARA = 0x21,
 	H2C_92E_PS_TUNING_PARA2 = 0x22,
 	H2C_92E_PS_LPS_PARA = 0x23,
-	H2C_92E_P2P_PS_OFFLOAD = 024,
+	H2C_92E_P2P_PS_OFFLOAD = 0x24,
 
 #if (USE_OLD_WOWLAN_DEBUG_FW == 0)
 	H2C_92E_WO_WLAN = 0x80,
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.h +1 -1
index af8d17b9e012..d5e65186fc85 100644
@@ -131,7 +131,7 @@ enum rtl8821a_h2c_cmd {
 	H2C_8821AE_PS_TUNING_PARA = 0x21,
 	H2C_8821AE_PS_TUNING_PARA2 = 0x22,
 	H2C_8821AE_PS_LPS_PARA = 0x23,
-	H2C_8821AE_P2P_PS_OFFLOAD = 024,
+	H2C_8821AE_P2P_PS_OFFLOAD = 0x24,
 
 	H2C_8821AE_WO_WLAN = 0x80,
 	H2C_8821AE_REMOTE_WAKE_CTRL = 0x81,
Signature · 1 line
2.56.1.708.g77570a6a1d-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Ian Rogers

In rtl8821ae, rtl8192ee, and rtl8188ee, the H2C power-save command enums define 0x20, 0x21, 0x22, 0x23 followed by 'H2C_*_P2P_PS_OFFLOAD = 024'. The missing 'x' makes 024 an octal constant (decimal 20, 0x14) instead of 0x24 (decimal 36, matching H2C_8723B_P2P_PS_OFFLOAD = 0x24 in rtl8723be and rtl8xxxu), sending the wrong H2C command ID to firmware during Wi-Fi Direct P2P power-save offload updates.

Change 024 to 0x24 in all three headers.

Found via inspection of H2C command enums during an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig warning audit; fix and changelog drafted with an AI coding assistant. Build-tested under LLVM=1 W=1 (-Werror); not tested on Realtek Wi-Fi hardware.

Quoted 4 lines
Fixes f0eb856e0b6c ("rtlwifi: rtl8188ee: Add new driver")
Fixes 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree")
Fixes b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree")

Cross check with vendor driver. 0x24 is correct.

maintainer
#2 lore raw
In reply to Ian Rogers
Quoted 14 lines · Ian Rogers

In rtl8821ae, rtl8192ee, and rtl8188ee, the H2C power-save command enums define 0x20, 0x21, 0x22, 0x23 followed by 'H2C_*_P2P_PS_OFFLOAD = 024'. The missing 'x' makes 024 an octal constant (decimal 20, 0x14) instead of 0x24 (decimal 36, matching H2C_8723B_P2P_PS_OFFLOAD = 0x24 in rtl8723be and rtl8xxxu), sending the wrong H2C command ID to firmware during Wi-Fi Direct P2P power-save offload updates.

Change 024 to 0x24 in all three headers.

Found via inspection of H2C command enums during an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig warning audit; fix and changelog drafted with an AI coding assistant. Build-tested under LLVM=1 W=1 (-Werror); not tested on Realtek Wi-Fi hardware.

Quoted 5 lines
Fixes f0eb856e0b6c ("rtlwifi: rtl8188ee: Add new driver")
Fixes 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree")
Fixes b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree")

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

931e49022fb6 wifi: rtlwifi: Fix octal 024 typo in P2P_PS_OFFLOAD H2C command IDs

---
https://github.com/pkshih/rtw.git