All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Santhosh Ramesh" <quic_santrame@quicinc.com>
Cc: "ath12k@lists.infradead.org" <ath12k@lists.infradead.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	<quic_murugana@quicinc.com>
Subject: Re: [PATCH] wifi: ath12k: fix tx power, max reg power update to firmware
Date: Fri, 13 Dec 2024 09:42:50 +0100	[thread overview]
Message-ID: <D6AFU1A3PRGK.1I5GCZJV2BQ14@gmail.com> (raw)
In-Reply-To: <51afbe69-e770-0344-6ca0-0fe5cd721d2d@quicinc.com>

On Fri Sep 20, 2024 at 6:43 AM CEST, Santhosh Ramesh wrote:
> "Nicolas Escande" <nico.escande@gmail.com> writes:
[...]
> > 
> > diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
> > index a97e1399eeed..87e3ae49afa5 100644
> > --- a/drivers/net/wireless/ath/ath12k/wmi.c
> > +++ b/drivers/net/wireless/ath/ath12k/wmi.c
> > @@ -2563,6 +2563,8 @@ int ath12k_wmi_send_scan_chan_list_cmd(struct ath12k *ar,
> >  						  WMI_CHAN_REG_INFO1_REG_CLS);
> >  			*reg2 |= le32_encode_bits(channel_arg->antennamax,
> >  						  WMI_CHAN_REG_INFO2_ANT_MAX);
> > +			*reg2 |= le32_encode_bits(channel_arg->maxregpower,
> > +						  WMI_CHAN_REG_INFO2_MAX_TX_PWR);
> >  
> >  			ath12k_dbg(ar->ab, ATH12K_DBG_WMI,
> >  				   "WMI chan scan list chan[%d] = %u, chan_info->info %8x\n",
> > 
> > It seems that ath11k has a similar piece of code in the equivalent function
> > ath11k_wmi_send_scan_chan_list_cmd . Isn't this needed ?
>
> This change is in a separate patch, which will be sent for public review soon.

Hey Santhosh,

Unless I'm mistaken (which is very much possible) I didn't see any patch posted
to fix that. Weren't you guys supposed to have done it by now ?

> > 
> > Also I see that in ath12k/reg.c in ath12k_reg_update_chan_list we also send to
> > the firmware:
> > 			ch->maxpower = channel->max_power * 2;
> > 			ch->maxregpower = channel->max_reg_power * 2;
> > 			ch->antennamax = channel->max_antenna_gain * 2;
> > 
> > As it is in a different wmi message, I guess the units are different. 0.5 dBm
> > increment in struct ath12k_wmi_channel_arg right ? Or should we remove the '*2'
> > 
>
> Yes, the firmware expects these values in 0.5 dBm increments, so we multiply 
> them by 2 in the ath12k_reg_update_chan_list function.

Thanks


  parent reply	other threads:[~2024-12-13  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09  7:30 [PATCH] wifi: ath12k: fix tx power, max reg power update to firmware Santhosh Ramesh
2024-09-09  8:20 ` Nicolas Escande
2024-09-09  9:07   ` Kalle Valo
2024-09-09 10:23     ` Nicolas Escande
2024-09-09 11:15       ` Kalle Valo
2024-09-09 12:55         ` Nicolas Escande
     [not found]   ` <93d580b4-cf7a-471f-8f3a-673d456f726f@quicinc.com>
2024-09-20  4:43     ` Santhosh Ramesh
2024-09-20  7:15       ` Nicolas Escande
2024-12-13  8:42       ` Nicolas Escande [this message]
2024-12-12 14:37 ` Kalle Valo
2025-01-07  1:27 ` Aditya Kumar Singh
2025-01-08  0:32 ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D6AFU1A3PRGK.1I5GCZJV2BQ14@gmail.com \
    --to=nico.escande@gmail.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_murugana@quicinc.com \
    --cc=quic_santrame@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.