diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-07-28 13:40:12 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-09-19 02:48:26 +0100 |
commit | 7c459ac1d5a9a5c507afd7a3205dccfad20883d1 (patch) | |
tree | 24dda31482c091b5583c1d414433b2c2b4407ea4 /package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch | |
parent | d004110ef7b6a656b59ea7a5ca4a3deb4fc7ef99 (diff) | |
download | upstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.tar.gz upstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.tar.bz2 upstream-7c459ac1d5a9a5c507afd7a3205dccfad20883d1.zip |
mac80211: rt2x00: experimental improvements for MT7620 wifi
Serge Vasilugin reports:
To improve mt7620 built-in wifi performance some changes:
1. Correct BW20/BW40 switching (see comments with mark (1))
2. Correct TX_SW_CFG1 MAC reg from v3 of vendor driver see
https://gitlab.com/dm38/padavan-ng/-/blob/master/trunk/proprietary/rt_wifi/rtpci/3.0.X.X/mt76x2/chips/rt6352.c#L531
3. Set bbp66 for all chains.
4. US_CYC_CNT init based on Programming guide, default value was 33 (pci),
set chipset bus clock with fallback to cpu clock/3.
5. Don't overwrite default values for mt7620.
6. Correct some typos.
7. Add support for external LNA:
a) RF and BBP regs never be corrected for this mode
b) eLNA is driven the same way as ePA with mt7620's pin PA
but vendor driver explicitly pin PA to gpio mode (for forrect calibration?)
so I'm not sure that request for pa_pin in dts-file will be enough
First 5 changes (really 2) improve performance for boards w/o eLNA/ePA.
Changes 7 add support for eLNA
Configuration w/o eLAN/ePA and with eLNA show results
tx/rx (from router point of view) for each stream:
35-40/30-35 Mbps for HT20
65-70/60-65 Mbps for HT40
Yes. Max results for 2T2R client is 140-145/135-140
with peaks 160/150, It correspond to mediatek driver results.
Boards with ePA untested.
Reported-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[directly include v3 of the patchset submitted upstream]
(cherry picked from commit 31a6605de04218e1c04bd5c2436c24d7d1c07506)
(cherry picked from commit e785ca05e9f0502894772f5df92192b816ba5d7c)
(cherry picked from commit 412fcf3d4400f84551f3ead0514834c62d94a251)
Diffstat (limited to 'package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch')
-rw-r--r-- | package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch new file mode 100644 index 0000000000..02d1f7a2e5 --- /dev/null +++ b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch @@ -0,0 +1,76 @@ +From patchwork Sat Sep 17 20:26:40 2022 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle <daniel@makrotopia.org> +X-Patchwork-Id: 12979243 +X-Patchwork-Delegate: kvalo@adurom.com +Return-Path: <linux-wireless-owner@kernel.org> +Date: Sat, 17 Sep 2022 21:26:40 +0100 +From: Daniel Golle <daniel@makrotopia.org> +To: linux-wireless@vger.kernel.org, Stanislaw Gruszka <stf_xl@wp.pl>, + Helmut Schaa <helmut.schaa@googlemail.com> +Cc: Kalle Valo <kvalo@kernel.org>, + "David S. Miller" <davem@davemloft.net>, + Eric Dumazet <edumazet@google.com>, + Jakub Kicinski <kuba@kernel.org>, + Paolo Abeni <pabeni@redhat.com>, + Johannes Berg <johannes.berg@intel.com> +Subject: [PATCH v3 02/16] rt2x00: add throughput LED trigger +Message-ID: + <73f5ba4134e621462a26186449400cf0c1ac1730.1663445157.git.daniel@makrotopia.org> +References: <cover.1663445157.git.daniel@makrotopia.org> +MIME-Version: 1.0 +Content-Disposition: inline +In-Reply-To: <cover.1663445157.git.daniel@makrotopia.org> +Precedence: bulk +List-ID: <linux-wireless.vger.kernel.org> +X-Mailing-List: linux-wireless@vger.kernel.org + +From: David Bauer <mail@david-bauer.net> + +This adds a (currently missing) throughput LED trigger for the rt2x00 +driver. Previously, LED triggers had to be assigned to the netdev, which +was limited to a single VAP. + +Tested-by: Christoph Krapp <achterin@googlemail.com> +Signed-off-by: David Bauer <mail@david-bauer.net> +Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> +--- + drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c ++++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +@@ -1093,6 +1093,19 @@ static void rt2x00lib_remove_hw(struct r + kfree(rt2x00dev->spec.channels_info); + } + ++static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = { ++ { .throughput = 0 * 1024, .blink_time = 334 }, ++ { .throughput = 1 * 1024, .blink_time = 260 }, ++ { .throughput = 2 * 1024, .blink_time = 220 }, ++ { .throughput = 5 * 1024, .blink_time = 190 }, ++ { .throughput = 10 * 1024, .blink_time = 170 }, ++ { .throughput = 25 * 1024, .blink_time = 150 }, ++ { .throughput = 54 * 1024, .blink_time = 130 }, ++ { .throughput = 120 * 1024, .blink_time = 110 }, ++ { .throughput = 265 * 1024, .blink_time = 80 }, ++ { .throughput = 586 * 1024, .blink_time = 50 }, ++}; ++ + static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) + { + struct hw_mode_spec *spec = &rt2x00dev->spec; +@@ -1174,6 +1187,11 @@ static int rt2x00lib_probe_hw(struct rt2 + + #undef RT2X00_TASKLET_INIT + ++ ieee80211_create_tpt_led_trigger(rt2x00dev->hw, ++ IEEE80211_TPT_LEDTRIG_FL_RADIO, ++ rt2x00_tpt_blink, ++ ARRAY_SIZE(rt2x00_tpt_blink)); ++ + /* + * Register HW. + */ |