]> www.infradead.org Git - users/jedix/linux-maple.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)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 3 Feb 2025 02:41:02 +0000 (10:41 +0800)
commit00451eb3bec763f708e7e58326468c1e575e5a66
treecd31e7780a6a6140b8df2a6b0f93106dd9c4da38
parent4828f572b20bc406f580c66b67c05c1b9ae75085
wifi: rtw88: Don't use static local variable in rtw8822b_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
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
drivers/net/wireless/realtek/rtw88/rtw8822b.c