wifi: rtlwifi: rtl8192cu: Fix 2T2R chip type detection
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Tue, 13 Feb 2024 14:33:02 +0000 (16:33 +0200)
committerKalle Valo <kvalo@kernel.org>
Thu, 15 Feb 2024 11:10:47 +0000 (13:10 +0200)
commitbcfcbf23a98ca19ba5931914801b5939e0d17bda
tree3ab811846aeaf6d120ef6f5860f09fefdf1bc055
parent63d94f7496233600186303f1eee000ab2ffc920a
wifi: rtlwifi: rtl8192cu: Fix 2T2R chip type detection

rtl8192cu handles 1T1R devices (RTL8188CUS), 1T2R devices (RTL8191CU),
and 2T2R devices (RTL8192CU). The 2T2R devices were incorrectly detected
as 1T2R because of a mistake in the IS_92C_1T2R macro.

The visible effect of this is that the firmware was allowed to use
TX rates only up to MCS7.

Fix the IS_92C_1T2R macro.

Now my 2T2R device has much better upload speed.
Before: 46 Mbps.
After:  82 Mbps.

Also fix a debug message which was printing "RF_1T1R" even for 1T2R
chips.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/ed960059-5c77-422d-ac4e-fe9fc9d0d296@gmail.com
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c