]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtlwifi: rtl8188ee: correct allstasleep in P2P PS H2C command
authorPing-Ke Shih <pkshih@realtek.com>
Thu, 6 Nov 2025 00:49:32 +0000 (08:49 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 11 Nov 2025 02:10:21 +0000 (10:10 +0800)
The "->allstasleep" variable is a 1 bit bitfield. It can only be 0 or 1.
This "= -1" assignement should be "= 0" as other chips and vendor driver.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-wireless/5c992936-4e7b-4c0a-abfc-0ec0fb9ef9fd@suswa.mountain/T/#t
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/1762390172-21091-1-git-send-email-pkshih@realtek.com
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c

index 7252bc62121165d104fabfbcb611b6b0079993d2..9a9f9e14f472e254d2685b8e78d1668c37a93040 100644 (file)
@@ -694,7 +694,7 @@ void rtl88e_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
 
                        if (P2P_ROLE_GO == rtlpriv->mac80211.p2p) {
                                p2p_ps_offload->role = 1;
-                               p2p_ps_offload->allstasleep = -1;
+                               p2p_ps_offload->allstasleep = 0;
                        } else {
                                p2p_ps_offload->role = 0;
                        }