Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1223038pxy; Thu, 29 Apr 2021 02:21:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2bCNqWS9PmECMJSLob9UIQkwto0Bt+3zDw818Kg+fkXjrU4WD9psqbK5CmHnBR5DNK8SZ X-Received: by 2002:a05:6402:31ac:: with SMTP id dj12mr16879365edb.267.1619688069900; Thu, 29 Apr 2021 02:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619688069; cv=none; d=google.com; s=arc-20160816; b=WaF28Sx+JmBe21C1qah3Jsbl3hBeETjT9oslF99/60sv/kQC1UPJdIFZ+lqpNnq0z9 8+SpRyWpaZiXIt7J+obQLZ3wuEQCRcWJOl+9D/5LQNVD0acU9+vdYZGZDCAAntdsxe3r 1mGcw/SbOjKD/36QM8NO95zdpvqQ7tAGVOE49HQDXfULNcfsGUoWBvSsekL1/bNKhsOl PN6ymjgncoaKxpXAVIPxg7MLlxr2KvhBW0AuVUbY/dzlU6ANdrVZt9rYE8Bo1l3svD5H oqR3Jp5159Rg1q8DLsAbGDnEuo+8PydesYhkfOnZ9QjhvWoBBQSF2RiHb8AO5B5q1JoG EPPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aJXLqfG62hcqJENKDYkWLOhk7HXv1CCH+IOuXlhs4t4=; b=jgtPqU0LyxhNCLRkh+djkv6gmcvx/ZW+iJDv9rV/rah73IdcStIFBrgUAMPQ27ZDvn YIA0QDU8ptK0pY2N0nbuqL53tyd+Ci5oXGSxIs26UHDQ7+s2umfLypHRW/xNKrWYZR+Y N20gx8oG/87B23rwgUShnHhen3eoTCZeaz9FTxvN6AwwrgZJbL7HVwdtlR5r3FR/6zog gCQEN45LaHvq9V5ZZ6P1IC2kOLdlkAlZaza59dzmeNu5tw52T3zkTszADEMhx7cQ1cOV K8LjJrc4RcIKs5FD4oh/nI2PXgoydnm0nQCT/joh5EN+OvIJ1Wyv4IaYueciJhT5owav LobQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEvEo7I1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i19si1324942edr.172.2021.04.29.02.20.46; Thu, 29 Apr 2021 02:21:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JEvEo7I1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbhD2JTK (ORCPT + 99 others); Thu, 29 Apr 2021 05:19:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:57808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237366AbhD2JTK (ORCPT ); Thu, 29 Apr 2021 05:19:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 594E961445; Thu, 29 Apr 2021 09:18:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619687903; bh=K/egRLl1LkQqfLlp8hnE6ni3Yg7KzMgI7I/EHWxqgCQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JEvEo7I1CelKSoRuzK4bSb1CAkakaQttdp9Jz1/23oI1hFl4iUcVZJdGtyVmRa3RK gZUZlfwZ8RLjvZG4ukfwsp/NAGVnbQTD9Rot9ukpQaRA6sH1mt3ccXExetGgKm06u5 143o4TlqACRM8/IgNH+ONdB4MWbqaMtIi8rfp/u+myG2TZ+6z7BONfG2ZgwEtSv4d0 0m7647ktLSDLLGGmfGEgFpefZArMaPm1lFjt566MEcmwnc+3riyc5ledBu5DBXtMYh ftrW475/fqCftxS+6cYgq2s4luSRs3D1bKEUfnBiu9CqDMGhc1buXRiqfIN0rcVcZv u3ngG8fzzzE/Q== Date: Thu, 29 Apr 2021 11:18:18 +0200 From: Lorenzo Bianconi To: Felix Fietkau Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com Subject: Re: [PATCH] mt76: move mt76_rates in mt76 module Message-ID: References: <3d5251c8-dfad-7b46-4603-3df3f50c5770@nbd.name> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nQHsL+kKFsiv7XqR" Content-Disposition: inline In-Reply-To: <3d5251c8-dfad-7b46-4603-3df3f50c5770@nbd.name> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --nQHsL+kKFsiv7XqR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable >=20 > 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 > >=20 > > Signed-off-by: Lorenzo Bianconi > > --- > > 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(-) > >=20 > > 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; > > } > > =20 > > -#define CCK_RATE(_idx, _rate) { \ > > - .bitrate =3D _rate, \ > > - .flags =3D IEEE80211_RATE_SHORT_PREAMBLE, \ > > - .hw_value =3D (MT_PHY_TYPE_CCK << 8) | (_idx), \ > > - .hw_value_short =3D (MT_PHY_TYPE_CCK << 8) | (4 + _idx), \ > > -} > > - > > -#define OFDM_RATE(_idx, _rate) { \ > > - .bitrate =3D _rate, \ > > - .hw_value =3D (MT_PHY_TYPE_OFDM << 8) | (_idx), \ > > - .hw_value_short =3D (MT_PHY_TYPE_OFDM << 8) | (_idx), \ > > -} > > - > > static struct ieee80211_rate mt7603_rates[] =3D { > > 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 >=20 > - Felix --nQHsL+kKFsiv7XqR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCYIp52AAKCRA6cBh0uS2t rCEiAP9SLdlTCKuxoO9KvhH9gJUlWkpvw1DjhRFlloX2xsVE9gD8CdIHRguM5LNh bvFrNY5Q3HPrBKA5481Ct8KkuDDl6wU= =vjKY -----END PGP SIGNATURE----- --nQHsL+kKFsiv7XqR--