]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: rtw88: Don't use static local variable in rtw8821c_set_tx_power_index_by_rate
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Sun, 26 Jan 2025 14:04:21 +0000 (16:04 +0200)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 3 Feb 2025 02:41:10 +0000 (10:41 +0800)
commit0d1d165eff9d6cfad51113e18d9d8c9a8de27d6d
tree587add6cce4f14dc1956cf2138c613b83a9c93a3
parent00451eb3bec763f708e7e58326468c1e575e5a66
wifi: rtw88: Don't use static local variable in rtw8821c_set_tx_power_index_by_rate

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
rtw8821c_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/fe42858c-9b9f-4f03-9aaa-737472c2cd90@gmail.com
drivers/net/wireless/realtek/rtw88/rtw8821c.c