All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Lorenzo Bianconi <lorenzo@kernel.org>
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:14:40 +0200	[thread overview]
Message-ID: <3d5251c8-dfad-7b46-4603-3df3f50c5770@nbd.name> (raw)
In-Reply-To: <a8da66822d9dbfd7afbebcd915f1c4e1bb59d41f.1619685085.git.lorenzo@kernel.org>


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.

- Felix

  reply	other threads:[~2021-04-29  9:14 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 [this message]
2021-04-29  9:18   ` Lorenzo Bianconi

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=3d5251c8-dfad-7b46-4603-3df3f50c5770@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.