Commit Graph
106 Commits
Author SHA1 Message Date
Felix Fietkau fd315bd0f2 mt7603: disable dynamic sensitivity adjustment by default
The vendor driver also does not enable it, and it has been shown to cause
some issues. It can be re-enabled for testing through debugfs

Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26 15:15:54 +01:00
Roy LuoandFelix Fietkau e2a9d40772 mt7603: fix ba window size selection
The tx ba window size which is set to HW should not
exceed the actual window size of the ba session,
otherwise the HW might aggregate more packets than
what's negotiated.

Signed-off-by: Felix Fietkau <[email protected]>
2019-02-26 12:26:02 +01:00
Lorenzo BianconiandFelix Fietkau 82fa31293f mt7603: move alloc_dev common code in mt76_alloc_device
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-18 20:39:41 +01:00
Lorenzo BianconiandFelix Fietkau 11ab62057e mt7603: rely on mt76_tx_queue_skb_raw common routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-18 20:39:41 +01:00
Lorenzo BianconiandFelix Fietkau cacc986701 mt7603: rely on mt76_mcu_rx_event routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-07 14:50:23 +01:00
Lorenzo BianconiandFelix Fietkau 471c447ca1 mt7603: rely on mt76_mcu_get_response routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-07 14:50:10 +01:00
Lorenzo BianconiandFelix Fietkau db47920ac2 mt7603: rely on mt76_mcu_msg_alloc routine
Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-02-07 14:49:54 +01:00
Felix Fietkau 2afa0d7e7a mt7603: remove WCID override for software encrypted frames
It is not necessary, since the hardware has a flag to indicate hardware
encryption offload

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-31 21:51:29 +01:00
Felix Fietkau 8027b5d061 mt7603: remove copyright headers
No longer needed because of SPDX License Identifier

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-31 18:30:30 +01:00
Felix Fietkau a4ec45c294 mt7603: fix LED support (copy CFLAGS from main Makefile)
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-31 09:35:33 +01:00
Felix Fietkau b5ac8e49c5 mt7603: initialize LED callbacks only if CONFIG_MT76_LEDS is set
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-30 15:03:25 +01:00
Felix Fietkau 0db925f076 mt7603: update HT/VHT capabilities after assoc
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-30 12:18:32 +01:00
Felix Fietkau 6eef33bfd5 mt7603: remove mt7603_txq_init
Simplify the code by open coding it in the only remaining caller

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-30 12:10:45 +01:00
Felix Fietkau 7a53138b32 mt7603: trigger watchdog reset if flushing CAB queue fails
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-29 16:20:15 +01:00
Felix Fietkau c3da1aa3b0 mt7603: trigger beacon stuck detection faster
Check against number of active beacon interfaces instead of maximum number
of interfaces

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-29 16:18:19 +01:00
Felix Fietkau aa470d8655 mt7603: fix buffered multicast queue flush
For some reason the BMC queue flush does not work properly if packets were
queued for a BSS0_n interface (secondary vif).
Work around this issue by using the DMA scheduler to filter the queue before
issueing the BMC queue flush.

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22 15:25:16 +01:00
Felix Fietkau e342cc5c72 mt7603: fix buffered multicast count register
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22 14:24:43 +01:00
Felix Fietkau ce8cc5d52d mt7603: issue PSE client reset on init
Improves reliability of module reload after tx hangs

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22 14:09:54 +01:00
Felix Fietkau fe30bd35e2 mt7603: issue PSE reset on tx hang
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-22 14:03:31 +01:00
Felix Fietkau 2efa389b4c mt7603: limit station power save queue length to 64
Avoid excessive memory use, in case something goes wrong.

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 21:02:33 +01:00
Felix Fietkau 3df341d597 mt7603: avoid redundant MAC timing updates
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 15:04:37 +01:00
Felix Fietkau 79b337cfad mt7603: move CF-End rate update to mt7603_mac_set_timing
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 15:03:19 +01:00
Felix Fietkau b35cc8eefa mt7603: set timing on channel change before starting MAC
MAC needs to be stopped/started for timing change anyway

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 14:59:52 +01:00
Felix Fietkau 815fd03e0f mt7603: fix CCA timing values
Sync CCK values with reference driver.
Use OFDM values obtained from the hardware reset value
Stop tx/rx on change only using the ARB_SCR register

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 14:59:52 +01:00
Felix Fietkau 3e9a7d5c4d Revert "mt7603: fix txd q_idx field value"
This reverts commit 4bcb2f9fe2.
This causes a slight throughput regression

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-21 14:30:47 +01:00
Felix Fietkau fc31457cd9 mt7603: implement support for SMPS
The hardware needs to be notified of peers using dynamic SMPS mode
Fixes using dual-stream rates on some clients (e.g. Intel)

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-20 17:46:51 +01:00
Felix Fietkau 158529d679 mt7603: fix PSE reset retry sequence
Clear pending PSE request bit in order to avoid having it trigger by the
firmware at a bad point in time.
Only clear AC queue stuck bits if the PSE reset succeeded

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-20 15:15:13 +01:00
Felix Fietkau 702f557c75 mt7603: use maximum tx count for buffered multicast packets
Should improve stability

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-20 14:41:39 +01:00
Felix Fietkau c4e4982fa9 mt7603: set IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN
The hardware cannot report accurate tx A-MPDU length information, so tell rate
control to ignore it. Improves tx rate selection

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-16 22:35:17 +01:00
Felix Fietkau 4bcb2f9fe2 mt7603: fix txd q_idx field value
Use 802.11e ACI values - the vendor driver does the same

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-16 19:56:18 +01:00
Felix Fietkau 9d11596ec6 mt7603: discard bogus tx status data
If parsing tx status information fails, do not report any rates to mac80211

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-16 19:55:42 +01:00
Felix Fietkau e45db12888 mt7603: fix tx status info
Reporting A-MPDU length from txs does not work, because only completed
subframes are reported. Trying to aggregate tx status report for one
completed A-MPDU does not work, because individual subframe retries can
be different.
Do not report A-MPDU length > 1 and pass individual subframe tx status
information to mac80211 to fix rate control errors

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-16 19:53:45 +01:00
Felix Fietkau 63bf183451 mt76: add channel switch announcement support
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-15 14:27:02 +01:00
Felix Fietkau d273ddd9e3 mt7603: fix number of frames limit in .release_buffered_frames
Signed-off-by: Felix Fietkau <[email protected]>
2019-01-15 12:50:01 +01:00
Felix Fietkau f84b008222 mt76: fix tx status reporting for non-probing frames
On MT76x2, the hardware does not report tx status in the FIFO register,
if the packet id is 0.
Change the allocation of packet IDs to use 0 for no-ack packets, 1 for
non-probing packets and 2-255 for packets with tx status requested.
Fixes rate control issues

Signed-off-by: Felix Fietkau <[email protected]>
2019-01-11 15:24:32 +01:00
Felix Fietkau 48fb0116f0 mt7603: fix CF-End transmit rate when 11b stations are connected
Use a CCK rate in that case

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-30 17:08:40 +01:00
Felix Fietkau 24ec040a97 mt7603: fix BSSID configuration in AP mode
Fixes BSSID value in self-generated frames, such as CF-End

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-30 16:41:17 +01:00
Felix Fietkau 962152bd73 mt7603: fix WMM TXOP limit configuration
The config registers are swapped, AC2/AC3 comes before AC1/AC0

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-30 16:10:59 +01:00
Felix Fietkau 2a092e2b1d mt7603: fix per-rate retry accounting
Each rate retry slot takes up MT7603_RATE_RETRY tries, and cannot be altered
based on mac80211 provided rate retry counts.

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-29 19:42:15 +01:00
Felix Fietkau 148219d572 mt7603: fix checkpatch issues
Signed-off-by: Felix Fietkau <[email protected]>
2018-12-29 13:27:35 +01:00
Felix Fietkau bce700dd0c mt7603: fix signal strength reporting on single-stream devices
The second chain value is 0 if the second chain is disabled, which
would make the reported signal strength 0 as well.

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-29 13:03:20 +01:00
Weijie GaoandFelix Fietkau 8178f0d2ce mt7603: apply efuse data only when it exists
Some mt7603e chip has empty efuse data.
In this case driver will crash due to dereferencing NULL pointer.

The mt7603_eeprom_load will return success directly if the chip has no efuse
data and dev->mt76.otp.data is left empty, i.e. NULL pointer.
The mt7603_eeprom_init will then try to dereference dev->mt76.otp.data
without checking its value.

This patch adds a check around these codes to prevent kernel panic.

Signed-off-by: Weijie Gao <[email protected]>
2018-12-11 14:11:39 +01:00
Felix Fietkau 294e095a48 mt7603: reset DMA scheduler on MT7628
Should improve stability

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-09 17:18:12 +01:00
Felix Fietkau 6203d46fcc mt7603: add support for setting transmit power
Signed-off-by: Felix Fietkau <[email protected]>
2018-12-06 14:38:07 +01:00
Felix Fietkau 2c8e9acb40 mt7603: initialize channel maximum power from eeprom data
Signed-off-by: Felix Fietkau <[email protected]>
2018-12-06 14:13:29 +01:00
Felix Fietkau 9d009be68d mt7603: add dynamic sensitivity tuning based on false CCA events
This reduces sensitivity in cases where it could help throughput/stability.

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-05 18:26:20 +01:00
Felix Fietkau 417ab779a0 mt7603: improve recovery from PSE reset failure
Only clear reset status and switch to DMA reset after 3 tries.

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-05 15:31:43 +01:00
Felix Fietkau da00af00c5 mt7603: clear bit 18 in MT_SEC_SCR to fix ICV error
Ported from vendor driver

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-04 12:22:21 +01:00
Felix Fietkau 0ad998b6ff mt7603: increase aggregation limits (based on vendor driver changes)
Signed-off-by: Felix Fietkau <[email protected]>
2018-12-04 12:22:21 +01:00
Felix Fietkau 8929a6e6b7 mt7603: increase MCU timeout
Sometimes during startup, the MCU response time can be quite long,
especially in newer versions. This change prevents false timeout errors

Signed-off-by: Felix Fietkau <[email protected]>
2018-12-04 12:22:21 +01:00