linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
@ 2024-03-12 12:17 Bitterblue Smith
  2024-03-13  1:55 ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Bitterblue Smith @ 2024-03-12 12:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ping-Ke Shih, Larry Finger

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.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
index d835a27429f0..56b5cd032a9a 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
@@ -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;
 			}
-- 
2.43.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
  2024-03-12 12:17 [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Bitterblue Smith
@ 2024-03-13  1:55 ` Ping-Ke Shih
  2024-03-13  2:00   ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2024-03-13  1:55 UTC (permalink / raw)
  To: Bitterblue Smith, linux-wireless; +Cc: Larry Finger



> -----Original Message-----
> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Sent: Tuesday, March 12, 2024 8:17 PM
> To: linux-wireless@vger.kernel.org
> Cc: Ping-Ke Shih <pkshih@realtek.com>; Larry Finger <Larry.Finger@lwfinger.net>
> 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.
> 
> 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.
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
  2024-03-13  1:55 ` Ping-Ke Shih
@ 2024-03-13  2:00   ` Ping-Ke Shih
  2024-03-13 22:34     ` Bitterblue Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2024-03-13  2:00 UTC (permalink / raw)
  To: Bitterblue Smith, linux-wireless; +Cc: Larry Finger



> -----Original Message-----
> From: Ping-Ke Shih <pkshih@realtek.com>
> Sent: Wednesday, March 13, 2024 9:55 AM
> To: Bitterblue Smith <rtl8821cerfe2@gmail.com>; linux-wireless@vger.kernel.org
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
> 
> > 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
  2024-03-13  2:00   ` Ping-Ke Shih
@ 2024-03-13 22:34     ` Bitterblue Smith
  2024-03-14  0:25       ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Bitterblue Smith @ 2024-03-13 22:34 UTC (permalink / raw)
  To: Ping-Ke Shih, linux-wireless; +Cc: Larry Finger

On 13/03/2024 04:00, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Ping-Ke Shih <pkshih@realtek.com>
>> Sent: Wednesday, March 13, 2024 9:55 AM
>> To: Bitterblue Smith <rtl8821cerfe2@gmail.com>; linux-wireless@vger.kernel.org
>> Cc: Larry Finger <Larry.Finger@lwfinger.net>
>> Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
>>
>>> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
  2024-03-13 22:34     ` Bitterblue Smith
@ 2024-03-14  0:25       ` Ping-Ke Shih
  0 siblings, 0 replies; 5+ messages in thread
From: Ping-Ke Shih @ 2024-03-14  0:25 UTC (permalink / raw)
  To: linux-wireless, rtl8821cerfe2; +Cc: Larry.Finger

On Thu, 2024-03-14 at 00:34 +0200, Bitterblue Smith wrote:
> 
> On 13/03/2024 04:00, Ping-Ke Shih wrote:
> > 
> > > -----Original Message-----
> > > From: Ping-Ke Shih <pkshih@realtek.com>
> > > Sent: Wednesday, March 13, 2024 9:55 AM
> > > To: Bitterblue Smith <rtl8821cerfe2@gmail.com>; linux-wireless@vger.kernel.org
> > > Cc: Larry Finger <Larry.Finger@lwfinger.net>
> > > Subject: RE: [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
> > > 
> > > > 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. 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-14  0:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 12:17 [PATCH] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power Bitterblue Smith
2024-03-13  1:55 ` Ping-Ke Shih
2024-03-13  2:00   ` Ping-Ke Shih
2024-03-13 22:34     ` Bitterblue Smith
2024-03-14  0:25       ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).