From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org
Subject: Re: [RFC 4/5] mt76: move mt76x02_mac_write_txwi in mt76x02-lib module
Date: Mon, 1 Oct 2018 12:06:56 +0200 [thread overview]
Message-ID: <20181001100656.GC3055@localhost.localdomain> (raw)
In-Reply-To: <20181001054838.GC22206@redhat.com>
> 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
next prev parent reply other threads:[~2018-10-01 10:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 17:44 [RFC 4/5] mt76: move mt76x02_mac_write_txwi in mt76x02-lib module Lorenzo Bianconi
2018-10-01 5:48 ` Stanislaw Gruszka
2018-10-01 10:04 ` Felix Fietkau
2018-10-01 10:06 ` Lorenzo Bianconi [this message]
2018-10-01 16:00 ` Stanislaw Gruszka
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=20181001100656.GC3055@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=sgruszka@redhat.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 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).