Skip to contentSkip to conversation

wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

PATCH Superseded Bitterblue Smith 2 participants 5 messages Mar 12, 2024 – Mar 14, 2024 Realtek wireless driver (rtlwifi family)

v1 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

Different channels have different TX power settings. rtl8192de is using the TX power setting from the wrong channel in the 5 GHz band because _rtl92c_phy_get_rightchnlplace expects an array which includes 2.4 GHz and 5 GHz channel numbers, but it's using an array which includes only the 5 GHz channel numbers.

Use the array channel_all (defined in rtl8192de/phy.c) instead of the incorrect channel5g (defined in core.c).

Tested only with rtl8192du, which will use the same TX power code.

---
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +2 -2
index d835a27429f0..56b5cd032a9a 100644
@@ -892,8 +892,8 @@ static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
 	u8 place = chnl;
 
 	if (chnl > 14) {
-		for (place = 14; place < ARRAY_SIZE(channel5g); place++) {
-			if (channel5g[place] == chnl) {
+		for (place = 14; place < ARRAY_SIZE(channel_all); place++) {
+			if (channel_all[place] == chnl) {
 				place++;
 				break;
 			}
Signature · 1 line
2.43.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Bitterblue Smith <[email protected]>
Sent: Tuesday, March 12, 2024 8:17 PM
To: [email protected]
Cc: Ping-Ke Shih <[email protected]>; Larry Finger <[email protected]>
Subject: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

Different channels have different TX power settings. rtl8192de is using the TX power setting from the wrong channel in the 5 GHz band because _rtl92c_phy_get_rightchnlplace expects an array which includes 2.4 GHz and 5 GHz channel numbers, but it's using an array which includes only the 5 GHz channel numbers.

Quoted 5 lines

Use the array channel_all (defined in rtl8192de/phy.c) instead of the incorrect channel5g (defined in core.c).

Tested only with rtl8192du, which will use the same TX power code.

maintainer
#2 lore raw
Quoted 10 lines

-----Original Message-----
From: Ping-Ke Shih <[email protected]>
Sent: Wednesday, March 13, 2024 9:55 AM
To: Bitterblue Smith <[email protected]>; [email protected]
Cc: Larry Finger <[email protected]>
Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

Quoted 1 line

Tested only with rtl8192du, which will use the same TX power code.

Because another patchset adding rtl8192du is based on this patch, I suggest to send them as single one patchset.

Ping-Ke

#3 lore raw
Quoted 9 lines · Ping-Ke Shih
Quoted 9 lines

-----Original Message-----
From: Ping-Ke Shih <[email protected]>
Sent: Wednesday, March 13, 2024 9:55 AM
To: Bitterblue Smith <[email protected]>; [email protected]
Cc: Larry Finger <[email protected]>
Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

Quoted 7 lines
Quoted 1 line
Quoted 1 line

Tested only with rtl8192du, which will use the same TX power code.

Because another patchset adding rtl8192du is based on this patch, I suggest to send them as single one patchset.

Ping-Ke

I can do that, but Kalle will probably apply this patch long before v2 of that patchset is ready.

maintainer
#4 lore raw
Quoted 10 lines · Bitterblue Smith
Quoted 8 lines · Ping-Ke Shih
Quoted 8 lines

-----Original Message-----
From: Ping-Ke Shih <[email protected]>
Sent: Wednesday, March 13, 2024 9:55 AM
To: Bitterblue Smith <[email protected]>; [email protected]
Cc: Larry Finger <[email protected]>
Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power

Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

Tested only with rtl8192du, which will use the same TX power code.

Because another patchset adding rtl8192du is based on this patch, I suggest to send them as single one patchset.

I can do that, but Kalle will probably apply this patch long before v2 of that patchset is ready.

Right. But next time you can send mutual dependent patches in a patchset, or describe their dependency in cover letter. And, I prefer them in a patchset.