]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Sun, 26 Jan 2025 14:03:11 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:17 +0000 (14:40 +0200)
commitf4c4d18f72d59cebfacc1bc7f16826b7d6812531
tree8caa5454468a7dfae56f81805c3e666ccc2b2a04
parent60f09a491f42d3f780b997383f1aa8d185cd29a1
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate

[ Upstream commit 00451eb3bec763f708e7e58326468c1e575e5a66 ]

Some users want to plug two identical USB devices at the same time.
This static variable could theoretically cause them to use incorrect
TX power values.

Move the variable to the caller and pass a pointer to it to
rtw8822b_set_tx_power_index_by_rate().

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/8a60f581-0ab5-4d98-a97d-dd83b605008f@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw88/rtw8822b.c