]> 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:38:04 +0000 (14:38 +0200)
commitd2c65c8be7a145f178a69cbf33686da1d679ae66
tree9da7ca4bbc5a0e3efdc1ab0dc3fb0dc22062d664
parent3b61fb7889542f42484c3e1c5e1ba649c1e036b5
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