Felix Fietkau
8693864cd5
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-29 09:35:39 +01:00
Felix Fietkau
e67e7a55fd
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-26 15:16:04 +01:00
Felix Fietkau
c5209db332
mt76: avoid re-queueing A-MPDU rx reorder work if no frames are pending
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-26 13:16:25 +01:00
Felix Fietkau
974142c098
mt76: implement processing of BlockAckReq frames
...
Avoids timeouts on reordered A-MPDU rx frames
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-26 12:34:49 +01:00
Felix Fietkau
f515dfcca1
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-26 11:41:38 +01:00
Felix Fietkau
9c2e03dd0a
mt7603: fix rx LDPC reporting
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-25 16:46:58 +01:00
Felix Fietkau
3968dae910
mt7603: fix 40 mhz channel bandwidth reporting
...
Signed-off-by: Felix Fietkau <[email protected] >
2018-01-25 16:44:06 +01:00
Felix Fietkau
c6f8caced2
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-25 11:29:25 +01:00
Felix Fietkau
9b2c77826d
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-22 11:06:19 +01:00
Felix Fietkau
461cdf9f01
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-22 11:06:17 +01:00
Felix Fietkau
cf3cfc43af
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-22 10:43:22 +01:00
Felix Fietkau
b0508d3044
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-22 10:43:21 +01:00
Felix Fietkau
58a41f17aa
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-22 10:14:25 +01:00
Felix Fietkau
ad3f8e924e
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-21 10:48:29 +01:00
Felix Fietkau
0f8327abba
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-19 18:07:54 +01:00
Felix Fietkau
34d612d9ed
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-18 19:34:45 +01:00
Felix Fietkau
68b0cf17ef
mt76x2: add functions for setting extended MAC address registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-17 11:50:14 +01:00
Felix Fietkau
d242650960
Revert "mt76x2: remove MAC address limitation for multi-vif setups"
...
This reverts commit 170f3341c6 .
2017-12-17 11:44:47 +01:00
Felix Fietkau
bdc6f2f970
Revert "mt76x2: clean up MAC/BSSID address initialization"
...
This reverts commit 3563b8fd0a .
2017-12-17 11:44:27 +01:00
Felix Fietkau
bcd576e710
Revert "mt76x2: drop wiphy->addresses"
...
This reverts commit 9de77e1efc .
2017-12-17 11:44:11 +01:00
Felix Fietkau
860b185a43
Revert "mt76x2: init: disable APCLI by default"
...
This reverts commit a6a6e2582a .
2017-12-17 11:43:51 +01:00
Felix Fietkau
00f7e60e98
mt7603: fix configuration for HT40
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-14 17:59:37 +01:00
Felix Fietkau
e504656052
mt7603: configure other-unicast drop based on monitor mode setting
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-08 13:29:19 +01:00
Felix Fietkau
c64633e857
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] >
2017-12-08 11:55:29 +01:00
Felix Fietkau
9de77e1efc
mt76x2: drop wiphy->addresses
...
Now that the MAC address limitation is resolved, we no longer need a MAC
address list
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-07 19:51:01 +01:00
Felix Fietkau
3563b8fd0a
mt76x2: clean up MAC/BSSID address initialization
...
Drop the use of the EEPROM address entirely, rely on interface address
only
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-07 19:51:01 +01:00
Felix Fietkau
170f3341c6
mt76x2: remove MAC address limitation for multi-vif setups
...
The hardware has a separate set of registers to configure a
per-interface MAC address.
Signed-off-by: Lorenzo Bianconi <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-07 19:50:46 +01:00
Felix Fietkau
4d4cd05966
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] >
2017-12-07 17:09:28 +01:00
Felix Fietkau
d02a05b0b3
mt7603: update firmware to version 20160107100755
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 22:30:14 +01:00
Felix Fietkau
8e17d36381
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 18:15:05 +01:00
Felix Fietkau
b4034cf325
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 18:14:12 +01:00
Felix Fietkau
c8e5ab19ea
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 17:32:34 +01:00
Felix Fietkau
57a2e334ec
mt7603: set tx-skip flag for powersave clients
...
Helps flush out frames faster
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 17:32:34 +01:00
Felix Fietkau
e953c78806
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 16:49:02 +01:00
Felix Fietkau
96817d63ea
mt7603: make mt7603_mac_watchdog_reset() static
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-03 16:49:02 +01:00
Felix Fietkau
c079960b59
mt7603: clean up dma debug reads
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-02 11:11:58 +01:00
Felix Fietkau
d8a59901ec
mt7603: warn if PSE reset fails
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-02 10:50:08 +01:00
Felix Fietkau
c8807b4a3c
mt7603: simplify PSE reset
...
Skip PSE client reset, it is done by the firmware already
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-02 10:49:14 +01:00
Felix Fietkau
d99092baab
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-02 10:43:39 +01:00
Felix Fietkau
c4dd32abb5
mt7603: remove watchdog reset on interface stop
...
It can be harmful in some cases
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-01 17:51:44 +01:00
Felix Fietkau
8026638543
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-01 17:50:59 +01:00
Felix Fietkau
737cf2b6f7
mt7603: rename mt7603_mac_reset to mt7603_pse_reset
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-12-01 17:38:39 +01:00
Felix Fietkau
19fff41338
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-11-30 12:59:31 +01:00
Felix Fietkau
3bd7e76e2d
mt76x2: initialize channel power limits
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-30 12:33:47 +01:00
Felix Fietkau
11f42a8aab
mt76x2: add channel argument to eeprom tx power functions
...
Preparation for exposing maximum power to mac80211
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-30 12:16:39 +01:00
Felix Fietkau
a51358e3ae
mt76x2: increase OFDM SIFS time
...
Fixes throughput issues in combination with LDPC
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-29 13:14:45 +01:00
Felix Fietkau
792859b237
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-11-29 12:18:34 +01:00
Felix Fietkau
a4c82cad00
mt7603: add missing include required on newer kernels
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-29 10:07:24 +01:00
Felix Fietkau
fc28872399
mac80211: add missing include
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-21 09:48:19 +01:00
Felix Fietkau
8f1c8abdf7
mt76x2: sync tx power related values with reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 19:48:52 +01:00
Felix Fietkau
70f2002651
mt76x2: add more gain tuning based on the latest reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 19:25:33 +01:00
Felix Fietkau
4af37bd999
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 19:12:01 +01:00
Felix Fietkau
efd7724b1a
mt76x2: sync channel gain value with latest reference driver
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 18:31:06 +01:00
Felix Fietkau
af425def8c
mt76x2: fix LNA gain register annotation
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 18:09:43 +01:00
Felix Fietkau
b57ada5d54
mt76x2: add rx statistics registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 17:47:18 +01:00
Felix Fietkau
ff60d1482c
mt76: increase rx ring size for mt76x2
...
Should improve performance under load
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 16:26:45 +01:00
Felix Fietkau
ccc4baf446
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 14:14:08 +01:00
Felix Fietkau
0ce792337d
mt76x2: add helper function for setting drop mask
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-16 14:07:03 +01:00
Felix Fietkau
d8140b6f40
mt76x2: clear per-WCID tx rate lookup register
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-15 18:07:39 +01:00
Felix Fietkau
60172cc63c
mt76x2: clear drop flag for all WCIDs on init
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-15 18:00:10 +01:00
Felix Fietkau
e4e773440a
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-15 17:59:48 +01:00
Felix Fietkau
cc02e495cd
mac80211: move DT led configuration to the "led" child node
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-07 12:42:18 +01:00
Felix Fietkau
fbdbf656ce
debugfs: add support for changing the LED pin
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-07 12:18:56 +01:00
Felix Fietkau
51a67644b8
mt7603: remove unnecessary mcu register read function
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-11-01 09:11:03 +01:00
Felix Fietkau
f658dd21d7
mt76x2: add LED register definitions
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-27 12:15:53 +02:00
Felix Fietkau
a6fce8a34c
mt7603: add LED definition registers
...
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-27 12:15:53 +02:00
Felix Fietkau
37654d7047
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:24:12 +02:00
Felix Fietkau
e78156982f
update to latest mac80211/cfg80211 API changes
...
Signed-off-by: Hauke Mehrtens <[email protected] >
Signed-off-by: Felix Fietkau <[email protected] >
2017-10-05 20:50:48 +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