[PATCH] wifi: ath12k: fix tx power, max reg power update to firmware
Nicolas Escande
nico.escande at gmail.com
Fri Dec 13 00:42:50 PST 2024
On Fri Sep 20, 2024 at 6:43 AM CEST, Santhosh Ramesh wrote:
> "Nicolas Escande" <nico.escande at 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
More information about the ath12k
mailing list