public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Felix Fietkau <nbd@nbd.name>
Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com
Subject: Re: [PATCH] mt76: move mt76_rates in mt76 module
Date: Thu, 29 Apr 2021 11:18:18 +0200	[thread overview]
Message-ID: <YIp52gS+gumkHDLY@lore-desk> (raw)
In-Reply-To: <3d5251c8-dfad-7b46-4603-3df3f50c5770@nbd.name>

[-- Attachment #1: Type: text/plain, Size: 1960 bytes --]

> 
> On 2021-04-29 10:32, Lorenzo Bianconi wrote:
> > Move mt76_rates array in mt76 module and remove duplicated code since it
> > is shared by all drivers
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> >  drivers/net/wireless/mediatek/mt76/mac80211.c | 16 +++++++++
> >  drivers/net/wireless/mediatek/mt76/mt76.h     | 15 ++++++++
> >  .../net/wireless/mediatek/mt76/mt7603/init.c  | 13 -------
> >  .../net/wireless/mediatek/mt76/mt7615/init.c  | 33 ++---------------
> >  .../wireless/mediatek/mt76/mt7615/pci_init.c  |  4 +--
> >  .../wireless/mediatek/mt76/mt7615/usb_sdio.c  |  4 +--
> >  .../net/wireless/mediatek/mt76/mt76x02_util.c | 16 +++------
> >  .../net/wireless/mediatek/mt76/mt7915/init.c  | 36 +++----------------
> >  .../net/wireless/mediatek/mt76/mt7921/init.c  | 32 ++---------------
> >  9 files changed, 48 insertions(+), 121 deletions(-)
> > 
> > index e1b2cfa56074..b46097ea334a 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c
> > @@ -304,19 +304,6 @@ mt7603_init_hardware(struct mt7603_dev *dev)
> >  	return 0;
> >  }
> >  
> > -#define CCK_RATE(_idx, _rate) {					\
> > -	.bitrate = _rate,					\
> > -	.flags = IEEE80211_RATE_SHORT_PREAMBLE,			\
> > -	.hw_value = (MT_PHY_TYPE_CCK << 8) | (_idx),		\
> > -	.hw_value_short = (MT_PHY_TYPE_CCK << 8) | (4 + _idx),	\
> > -}
> > -
> > -#define OFDM_RATE(_idx, _rate) {				\
> > -	.bitrate = _rate,					\
> > -	.hw_value = (MT_PHY_TYPE_OFDM << 8) | (_idx),		\
> > -	.hw_value_short = (MT_PHY_TYPE_OFDM << 8) | (_idx),	\
> > -}
> > -
> >  static struct ieee80211_rate mt7603_rates[] = {
> >  	CCK_RATE(0, 10),
> >  	CCK_RATE(1, 20),
> I think you can drop mt7603_rates as well and replace it with
> mt76_rates. The rest looks good to me.

it was in my plan but I forgot it, I will fix it in v2, thanks.

Regards,
Lorenzo

> 
> - Felix

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2021-04-29  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  8:32 [PATCH] mt76: move mt76_rates in mt76 module Lorenzo Bianconi
2021-04-29  9:14 ` Felix Fietkau
2021-04-29  9:18   ` Lorenzo Bianconi [this message]

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=YIp52gS+gumkHDLY@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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