Search Linux Wireless

Re: [RFC 4/5] mt76: move mt76x02_mac_write_txwi in mt76x02-lib module

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

 



> On Sat, Sep 29, 2018 at 07:44:55PM +0200, Lorenzo Bianconi wrote:
> > +	if (dev->drv->get_tx_txpwr_adj) {
> > +		txpwr_adj = dev->drv->get_tx_txpwr_adj(dev, dev->txpower_conf,
> > +						       max_txpwr_adj);
> > +		txwi->ctl2 = FIELD_PREP(MT_TX_PWR_ADJ, txpwr_adj);
> > +	}
> > +
> > +	if (is_mt76x2(dev) && mt76_rev(dev) >= MT76XX_REV_E4)
> > +		txwi->txstream = 0x13;
> > +	else if (is_mt76x2(dev) && mt76_rev(dev) >= MT76XX_REV_E3 &&
> > +		 !(txwi->rate & cpu_to_le16(rate_ht_mask)))
> > +		txwi->txstream = 0x93;
> 
> All above looks mt76x2 specific, maybe would be beter to place this in 
> in setup_txwi() calback i.e:
> 
> 	if (dev->drv->setup_txwi)
> 		drv->drv->setup_txwi(...)
> 
> or maybe you plan to implement get_tx_txpwr_adj() for mt76x0 as well,
> is this feature supported by the MT76x0 chips ?

For the moment tpc is supported just for mt76x2 chipsets but tx power subfield
is present in mt76x0_txwi as well. Moreover merging mt76x2_dev and mt76x0_dev
in mt76x02_dev allows us to move mt76x2_get_tx_txpwr_adj() in mt76x02-lib
module, remove get_tx_txpwr_adj callback and just make tpc disabled for mt76x0
for the moment.
As suggested by Felix, we can take into account chainmask for txstream
configuration and remove is_mt76x2() check.
Agree?

Regards,
Lorenzo

> 
> Thanks
> Stanislaw



[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