Felix Fietkau
05bfc1ae7f
mt76: add missing VHT maximum A-MPDU length capability
...
Signficantly improves throughput with some clients
Signed-off-by: Felix Fietkau <[email protected] >
2018-02-27 08:39:30 +01:00
Felix Fietkau
eba6b2a327
mt76x2: rework tx power handling
...
There were a number of issues in the existing tx power handling code:
1. The EEPROM target power for chain 0 refers to the actual output power
after the channel and bandwidth delta have been added to the initial
channel gain. This means the delta values should not be added/subtracted
for the rate power calculation
2. When power is reduced significantly, the initial channel gain
underflows very quickly, while the per-rate power offsets are high.
This miscalculation causes effective tx power to be increased when it
should actually be lowered.
Fix this by trying to adjust the channel gain to the lowest power from
the rate table. In case of under- or overflow, compensate by adding an
appropriate delta to the rate power values.
This makes power configuration more accurate on a wider range of
configurable values
Signed-off-by: Felix Fietkau <[email protected] >
2018-02-24 10:24:26 +01:00
Felix Fietkau
8fd8b05cba
mt76: stop tx queues from the driver callback instead of common code
...
Allows the driver to control whether to send a BlockAckReq after waking
up. MT76x2 needs this set to true, for MT7603 it needs to be false
Signed-off-by: Felix Fietkau <[email protected] >
2018-02-09 16:05:51 +01:00
Felix Fietkau
e478ef24a5
mt76: toggle driver station powersave bit before notifying mac80211
...
Avoids race conditions from mac80211 enqueueing tx packets before the
tx-drop bit is cleared
Signed-off-by: Felix Fietkau <[email protected] >
2018-02-09 16:05:51 +01:00
Felix Fietkau
f56a62f3f9
mt7603: avoid reordering qos-null data packets
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-02-09 16:05:51 +01:00
Felix Fietkau
2a32a4a8f8
mt76: check qos ack policy before reordering packets
...
Do not attempt to reorder packets not part of a BA session
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:37 +01:00
Felix Fietkau
bfda6a2984
mt76x2: do not set status->aggr for NULL data frames
...
Avoids data connection stalls when the client toggles powersave mode
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:37 +01:00
Felix Fietkau
6b70c25c18
mt76: avoid re-queueing A-MPDU rx reorder work if no frames are pending
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:37 +01:00
Felix Fietkau
20777f199b
mt76: implement processing of BlockAckReq frames
...
Avoids timeouts on reordered A-MPDU rx frames
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:37 +01:00
Felix Fietkau
afa61bcd61
mt76: implement AP_LINK_PS
...
With software A-MPDU reordering in place, frames that notify mac80211 of
powersave changes are reordered as well, which can cause connection
stalls. Fix this by implementing powersave state processing in the
driver.
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:36 +01:00
Felix Fietkau
c35933bc96
mt7603: fix rx LDPC reporting
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:36 +01:00
Felix Fietkau
2e7332f4b0
mt7603: fix 40 mhz channel bandwidth reporting
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:35:36 +01:00
Felix Fietkau
69c07bce67
mt76: let mac80211 validate CCMP PN for fragmented frames
...
The rules for those are more complex and performance is not an issue
here
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:34:04 +01:00
Felix Fietkau
2b5ea6f4e7
mt76: validate rx CCMP PN
...
Apparently hardware does not perform CCMP PN validation in hardware, so
we need to take care of this in the driver.
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:34:03 +01:00
Felix Fietkau
bd7f6e167e
mt76: pass the per-vif wcid to the core for multicast rx
...
Preparation for adding software rx CCMP PN validation
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:33:41 +01:00
Felix Fietkau
e436824261
mt76: split mt76_rx_complete
...
Add a separate function for processing frames after A-MPDU reordering,
reduce code duplication
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:33:41 +01:00
Felix Fietkau
f0a63aeba0
mt76: implement A-MPDU rx reordering in the driver code
...
This is required for performing CCMP PN validation in software
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:33:40 +01:00
Felix Fietkau
3a3a799042
mt76: get station pointer by wcid and pass it to mac80211
...
Avoids the rhashtable lookup based on the MAC address inside mac80211
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:33:11 +01:00
Felix Fietkau
2cda0ad31f
mt76: add an intermediate struct for rx status information
...
Preparation for passing in more internal rx data via skb->cb
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:32:53 +01:00
Felix Fietkau
380a56b74c
mt76x2: fix TSF value in probe responses
...
Like beacons, probe responses need a hardware-generated TSF value. Set
the flag that causes the hw to generate it
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
8d9cdd96ca
mt76: retry rx polling as long as there is budget left
...
Sending frames to mac80211 needs time, which could allow for more rx
packets to end up in the DMA ring. Retry polling until there are no more
frames left. Improves rx latency under load.
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
808c1c571a
mt76x2: add functions for setting extended MAC address registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
d225fa72b8
mt7603: fix configuration for HT40
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
4a11cc1256
mt7603: configure other-unicast drop based on monitor mode setting
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
a3dbfdbc8c
mt76x2: configure rx filter based on monitor mode setting
...
Due to an unrelated issue, the MT_RX_FILTR_CFG_PROMISC flag is currently
unset, which means that monitor mode is unconditionally enabled.
Toggle this flag based on the mac80211 monitor mode setting instead
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
91cc0d4734
Partially revert "mt7603: use mcu command to set timing registers, fix OFDM timeout values"
...
This reverts commit 268467b9a4 .
It is unnecessary to go through the MCU for this.
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
af68a59c5f
mt7603: update firmware to version 20160107100755
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-30 10:23:03 +01:00
Felix Fietkau
e326bc2ac4
mt7603: remove some harmless WARN_ONs in rx path
...
Discard affected packets instead. Should reduce the frequency of bogus
bug reports
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
86ddef3b21
mt76x2: remove some harmless WARN_ONs in tx status and rx path
...
Discard affected packets instead. Should reduce the frequency of bogus
bug reports
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
7dd2a9e771
mt7603: initialize wtbl ps flag on station add
...
Ensure that the firmware hasn't changed anything
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
123acf2461
mt7603: set tx-skip flag for powersave clients
...
Helps flush out frames faster
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
dc7a351279
mt7603: clear wtbl PS bit for powersave responses
...
Avoids filtering frames that are supposed to be sent
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
41e6a04837
mt7603: make mt7603_mac_watchdog_reset() static
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
7dc8db1362
mt7603: clean up dma debug reads
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
4ed7e07cd8
mt7603: warn if PSE reset fails
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
30750599f0
mt7603: simplify PSE reset
...
Skip PSE client reset, it is done by the firmware already
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
4490f93669
mt7603: remove WARN_ON_ONCE for workaround checks
...
It can happen during normal operation and it confuses users more than it
actually helps. workaround trigger counts are still available via
debugfs
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
c86c3a0f5c
mt7603: remove watchdog reset on interface stop
...
It can be harmful in some cases
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
ea4c2a165a
mt7603: rename MT_PSE_RESET register
...
It is actually a dummy control register used for communicating reset
state with the MCU firmware
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
e7eaa7c09b
mt7603: rename mt7603_mac_reset to mt7603_pse_reset
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
c2bd89ee91
mt76x2: convert between per-chain tx power and combined output
...
Using both chains adds max. 3 dBm.
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
58364a2ac4
mt76x2: initialize channel power limits
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
1acde21849
mt76x2: add channel argument to eeprom tx power functions
...
Preparation for exposing maximum power to mac80211
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
0532315f76
mt76x2: increase OFDM SIFS time
...
Fixes throughput issues in combination with LDPC
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
2c1a77c74f
mt76x2: fix transmission of encrypted management frames
...
Hardware encryption seems to break encrypted unicast mgmt tx.
Unfortunately the hardware TXWI header does not have a bit to indicate
that a frame is software encrypted, so sw-encrypted frames need to use a
different WCID. For that to work, the CCMP PN needs to be generated in
software, which makes things a bit slower, so only do it for keys that
also need to tx management frames.
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
82acc859fb
mt7603: add missing include required on newer kernels
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
8c821aa63f
mac80211: add missing include
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 21:45:43 +01:00
Felix Fietkau
0a0d16f817
mt76x2: sync tx power related values with reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:46 +01:00
Felix Fietkau
4bc9aa9da7
mt76x2: add more gain tuning based on the latest reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:46 +01:00
Felix Fietkau
60a4d67ca9
mt76x2: implement dynamic AGC tuning based on false packet detection count
...
Significantly improves radio performance
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:46 +01:00
Felix Fietkau
cc588c5e32
mt76x2: sync channel gain value with latest reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:46 +01:00
Felix Fietkau
fe7981687d
mt76x2: fix LNA gain register annotation
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
73902dc8a7
mt76x2: add rx statistics registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
7dfb354d3b
mt76: increase rx ring size for mt76x2
...
Should improve performance under load
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
941555ba89
mt76x2: clear drop mask when sending a PS response
...
Should make handling powersave clients more reliable
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
3e5afe7ba8
mt76x2: add helper function for setting drop mask
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
0dd8b688b2
mt76x2: clear per-WCID tx rate lookup register
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
f9d9c22491
mt76x2: clear drop flag for all WCIDs on init
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
8f1673a34b
mt76x2: limit client WCID entries to 0-127
...
The rx WCID lookup table and the per-WCID rate table only have 128
entries. All further WCID entries are tx-only.
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
8e453b32e3
mac80211: move DT led configuration to the "led" child node
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
f5498d2aeb
debugfs: add support for changing the LED pin
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
0b7984e252
mt7603: remove unnecessary mcu register read function
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
4d83561ee4
mt76x2: add LED register definitions
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
1b8c8a035a
mt7603: add LED definition registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 20:34:45 +01:00
Felix Fietkau
1be430fc8a
mt76x2: fix tx status ampdu length corner case
...
Sometimes the code would return a status update to mac80211 with a-mpdu
length of 0, leading to a crash in minstrel.
Make the logic of counting a-mpdu burst length easier to follow and add
an extra check to prevent this issue from happening.
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-12 12:43:27 +02:00
Felix Fietkau
c4e3deaa58
mt7603: use the real vif index in txwi header for normal tx.
...
Fixes rate control for multi-vif. Beacons and buffered multicast packets
still need the adjusted index
Signed-off-by: Felix Fietkau <[email protected] >
2017-07-01 16:53:18 +02:00
Felix Fietkau
32eab505a4
mt7603: set wtbl entry vif index
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-07-01 16:46:34 +02:00
Felix Fietkau
af326156d9
mt7603: change auto rate control register initialization
...
Allow the hardware to fall back if rates stop working, make the first
rate fail earlier.
Signed-off-by: Felix Fietkau <[email protected] >
Signed-off-by: Lorenzo Bianconi <[email protected] >
2017-06-26 14:06:31 +02:00
Felix Fietkau
219c8dc717
mt7603: fix endian issue in CCMP PN
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-05-26 09:40:49 +02:00
Felix Fietkau
b8a7d0729e
mt7603: fix rate update bw fallback index
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-05-26 08:59:00 +02:00
Felix Fietkau
6fdf3a700f
mt7603: defer unconditional hw reset to stop call
...
Makes repeated down/up calls more reliable
Signed-off-by: Felix Fietkau <[email protected] >
2017-05-25 21:44:10 +02:00
Felix Fietkau
dda684912e
mt7603: fix tx status reporting initialization
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-05-22 19:51:37 +02:00
Felix Fietkau
5d374dab96
mt7603: reserve more pages for beacons
...
Should improve reliablity for multiple interfaces
Signed-off-by: Felix Fietkau <[email protected] >
2017-05-12 14:56:44 +02:00
Felix Fietkau
7168d59902
mt7603: reset PSE queue hang indicator bits
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 14:47:01 +01:00
Felix Fietkau
38bae1d303
mt7603: improve reliability of the PSE reset
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 14:44:39 +01:00
Felix Fietkau
d1769e3346
mt7603: drop the PSE reset on init, it happens too early
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 14:44:17 +01:00
Felix Fietkau
040c73638c
mt7603: rename extended event enum fields
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 11:37:05 +01:00
Felix Fietkau
a85617295b
mt7603: move enqueueing of mcu events to mt7603_mcu.c
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 11:31:53 +01:00
Felix Fietkau
1a3ec7760c
mt7603: disable beacon timers during scan
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 11:06:19 +01:00
Felix Fietkau
e2d298d071
mt7603: issue tx reset bit 2 before DMA reset
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 10:44:53 +01:00
Felix Fietkau
b2d023520f
mt7603: remove redundant mac start
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-21 10:34:22 +01:00
Felix Fietkau
e5c58f6c64
mt76x2: fix size of the rssi offset eeprom field
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-17 15:48:57 +01:00
Felix Fietkau
4a54ab381c
mt7603: fall back to software crypto for IBSS/Mesh per-sta GTK
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-17 13:29:23 +01:00
Felix Fietkau
9f02db7efc
mt76x2: fall back to software crypto for IBSS/Mesh per-sta GTK
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-17 13:29:23 +01:00
Felix Fietkau
c91e660985
mt7603: set secondary beacon time offsets
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:48 +01:00
Felix Fietkau
93ce124526
mt7603: enable beacons for other virtual interfaces
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:46 +01:00
Felix Fietkau
59ce2b491b
mt7603: set tx vif own MAC index (needed for beacons)
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:44 +01:00
Felix Fietkau
e54add55e0
mt7603: move napi/tasklet enable/disable outside of the locked section
...
Should help prevent deadlocks
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:42 +01:00
Felix Fietkau
da8e79696d
mt7603: check wtbl busy status and stop/start tx queues when clearing sta entry
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:40 +01:00
Felix Fietkau
f22273bf85
mt7603: init WTBL entry before setting capabilities
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:38 +01:00
Felix Fietkau
dce8aac5c4
mt7603: fix endian issue in mt7603_mac_fill_rx
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:35 +01:00
Felix Fietkau
29b08d3abd
mt7603: fix endian issue in mt7603_mcu_set_timing
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-03-15 14:24:08 +01:00
Felix Fietkau
f020a60950
mt7603: support loading the entire EEPROM from OTP
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-27 09:52:36 +01:00
Felix Fietkau
b056a78fd7
dma: fix endian issue in mt76_dma_get_buf
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-27 09:44:20 +01:00
Felix Fietkau
cc704981bd
mt76x2: clarify queue selection field
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-07 21:13:16 +01:00
Felix Fietkau
03e44dcdb2
mt76x2: remove unnecessary headroom check
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-07 21:13:16 +01:00
Felix Fietkau
a5eaeb27d6
revert mt76_eeprom_override call reordering
...
This call order is necessary for handling the device MAC address
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-03 14:25:08 +01:00
Felix Fietkau
184e068b6f
use wiphy_read_of_freq_limits to parse band capability overrides
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-02-01 16:11:35 +01:00
Felix Fietkau
f8f49d2428
mt7603: return -EOPNOTSUPP on unsupported ciphers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-01-14 23:05:46 +01:00
Felix Fietkau
9af67d47e0
mt76x2: return -EOPNOTSUPP on unsupported ciphers
...
Silences a warning when using 802.11w
Signed-off-by: Felix Fietkau <[email protected] >
2017-01-14 23:04:59 +01:00