Search Linux Wireless

Re: [PATCH] wifi: rt2x00: limit MT7620 TX power based on eeprom calibration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi! Thanks for your review.

On Sun, 6 Aug 2023 10:27:01 +0200, Stanislaw Gruszka wrote:

> > -	max_power = chan->max_power * 2;
> > -	if (max_power > 0x2f)
> > -		max_power = 0x2f;
> > +	power_group[0] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG1);
> > +	power_group[1] = rt2800_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_BG2);
> > +	for (cnt = 0; cnt < 2; cnt++) {
> > +		chan_power = power_group[cnt][rt2x00dev->rf_channel - 1];
> 
> I whould add
> 
> if (WARN_ON(rt2x00dev->rf_channel not in proper range))
> 	return;
> 
> just to be on safe side. This can be done in separate patch, if you think
> it is appropriate.
> 
> The change overall looks ok to me.
> 
> Acked-by: Stanislaw Gruszka <stf_xl@xxxxx>

I add the channel check in V2 patch [1]. MT7620 only support WiFi4 2GHz
band, so I limit it to [1, 14].

[1] https://lore.kernel.org/all/TYAP286MB03159090ED14044215E59FD6BC10A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/

Regards
Shiji Yang



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux