Commit Graph
100 Commits
Author SHA1 Message Date
Felix Fietkau 96fa353e79 mt76: do not store aggregation sequence number for null-data frames
Fixes a rare corner case where a BlockAckReq might get the wrong
sequence number.

Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:46:42 +02:00
Felix Fietkau 94d44458f1 mt76: mt76x2: fix multi-interface beacon configuration
If the first virtual interface is a station (or an AP with beacons
temporarily disabled), the beacon of the second interface needs to
occupy hardware beacon slot 0.
For some reason the beacon index was incorrectly masked with the
virtual interface beacon mask, which prevents the secondary
interface from sending beacons unless the first one also does.

Cc: [email protected]
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-01 13:25:40 +02:00
Felix Fietkau 7464cc9710 mt76: check aggregation sequence number for frames sent via drv_tx
ps-poll response frames can be sent via drv_tx. Store the frame sequence number
for such frames, in case a BlockAckReq needs to be sent

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-29 13:15:33 +02:00
Felix Fietkau 542f17edfc mt76: fix handling ps-poll frames
Hardware station lookup for pspoll frames can fail, which makes the driver
ignore ps-poll frames. Fix the resulting powersave issues by looking up
the station for pspoll frames in software

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-29 13:13:10 +02:00
Felix Fietkau 14f70f4d28 mt7603: fix wcid for frames sent via drv_tx
pspoll responses can be sent via drv_tx, which may need to be encrypted

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-29 13:11:45 +02:00
Felix Fietkau 62ce3245da move mt7603 source files to mt7603/
Signed-off-by: Felix Fietkau <[email protected]>
2018-09-28 18:02:01 +02:00
Felix Fietkau 41c552f13a mt76x0: work around cflags issue in compat layer for trace.h
Signed-off-by: Felix Fietkau <[email protected]>
2018-09-28 13:03:29 +02:00
Felix Fietkau 6c3ee6bbd8 mt76x2: disable WLAN core before probe
If the WLAN core is still active during initialization, it might cause
the MCU or DMA to hang. This can happen during soft reboot, so disable
the core + clock early to avoid this issue.

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-26 22:04:27 +02:00
Felix Fietkau 8cd4ecfa0e mt76: include linux/module.h in files using MODULE_*
Fix source files using MODULE_* macros without including linux/module.h

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-26 22:04:27 +02:00
Felix Fietkau 6cf6fbaadb mt76: add stbc entries to mt76_rate_power
Add stbc tx power eeprom parsing support for mt76x2 driver.
When writing power entries, make a distinction between rates that are
read from the same EEPROM value, but have separate register entries.

No effect on runtime behavior, but preparation for unification with mt76x0
and for placing restrictions on individual rate power limits

Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-09-21 18:05:15 +02:00
Felix Fietkau a6f80ef56b build: make building 76x2e and 7603e optional
Signed-off-by: Felix Fietkau <[email protected]>
2018-09-12 14:04:57 +02:00
Felix Fietkau 39a380a06c mt76: use a per rx queue page fragment cache
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragments.

This can happen if the driver grabs one or two fragments for rx ring
refill, while other drivers use (and free up) the remaining fragments.
The 32 KiB higher-order page can only be freed once all users have freed
their fragments.

Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak.

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-12 13:16:50 +02:00
Felix Fietkau 8ba17b1825 Revert "mt76: use a per rx queue page fragment cache"
Will be added back after merging upstream changes

Signed-off-by: Felix Fietkau <[email protected]>
2018-09-11 13:49:15 +02:00
Felix Fietkau 0853d79366 Revert "mt76x2: add functions for setting extended MAC address registers"
This reverts commit 68b0cf17ef.
Not used at the moment, will be added back later, when needed.

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-25 13:17:16 +02:00
Felix Fietkau d220f4383a Revert "mt76x2: reset HW before probe"
This reverts commit 4d2c565653.
Will be added back later after mt76x2u rework

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-25 13:17:16 +02:00
Felix Fietkau 30b8371ad7 mt7603: fix BAR rate
The mask is wider, and the rate should be configured to OFDM 6M

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-24 14:00:05 +02:00
Felix Fietkau 980c60666e mt7603: add fix for CCA signal configuration
Allow preamble detection to block tx

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-24 12:22:26 +02:00
Felix Fietkau 7daf9621ad mt7603: add survey support
Since channel active time is not available from MIB registers, emulate it
using the kernel boot time (in us)

Signed-off-by: Felix Fietkau <[email protected]>
2018-08-22 12:26:35 +02:00
Felix Fietkau 08719b1129 mt76: use a per rx queue page fragment cache
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragments.

This can happen if the driver grabs one or two fragments for rx ring
refill, while other drivers use (and free up) the remaining fragments.
The 32 KiB higher-order page can only be freed once all users have freed
their fragments.

Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak.

Signed-off-by: Felix Fietkau <[email protected]>
2018-07-13 16:28:41 +02:00
Felix Fietkau 1d4ca10a56 mt76x2: track rssi for gain adjustment per station
This preserves more sensitivity when weak stations are active

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-19 11:15:19 +02:00
Felix Fietkau f450659334 mt76x2: improve gain adjustment in noisy environments
When switching between low gain (high RSSI) and high gain settings, it
can take a few seconds to adjust to the current environment.
This can lead to short periods of time with extreme packet loss.

When switching from low_gain=1 to low_gain=2, start with the same gain
adjustment value instead of the lowest to avoid spikes of huge numbers
of false CCA events

Also avoid resetting adjustment values on switching between low_gain
values 0 and 1, since it affects only the upper limit of vga adjustment

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-18 12:27:02 +02:00
Felix Fietkau 65e161bec8 mt76x2: fix tracking rssi for dynamic gain adjustment
Only use unicast rssi, to avoid counting signal data from other
networks.

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 20:49:55 +02:00
Felix Fietkau f3522e1d2b mt76x2: add a debugfs file to dump agc calibration information
Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 19:12:14 +02:00
Felix Fietkau 1528fe7f57 mt76x2: fix variable gain adjustment range
The range should only be limited to 4 for really weak signals, for all
other gain settings the range is 16.

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 19:02:24 +02:00
Felix Fietkau 4936c0cef0 mt76x2: clear false CCA counters after changing gain settings
They will be read on the next calibration step without gain change and
must not count earlier events

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 18:56:58 +02:00
Felix Fietkau a39ab7043a mt76x2: adjust AGC control register 26 based on gain for VHT80
Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 18:41:20 +02:00
Felix Fietkau 2cbaa57a77 mt76x2: fix swapped values for RXO-18 in gain control
The lowest bit should be set to 0 only for strong links, not for weak
ones.

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 18:28:53 +02:00
Felix Fietkau 9090f9c705 mt76x2: fix threshold for gain adjustment
The gain should be reduced only for very strong connections, not for mid
range.

Signed-off-by: Felix Fietkau <[email protected]>
2018-06-15 18:27:54 +02:00
Felix Fietkau 792dbe0261 mt7603: do not hold dev->mutex while flushing dev->mac_work
Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau fcbb49e863 mt76x2: use udelay instead of usleep_range in mt76x2_mac_stop
usleep_range can cause excessive latency on channel change if waiting
for the MAC to stop fails. It will be forced to stop by the code
following that loop anyway.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau 730c292a2c mt76: wait for pending tx to complete before switching channel
Reduces interruption caused by scanning

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau 21c1e1eae5 mt76: move ieee80211_hw allocation to common core
Allows it to be shared between different drivers and locks to be
initialized earlier

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau f399da3b2e mt76: prevent tx scheduling during channel change
Re-schedule tx afterwards

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau 0ef26ef052 mt76: only stop tx queues on offchannel, not during the entire scan
During scans, mac80211 frequently switches back to the home channel to
minimize interruption of ongoing traffic. Keep regular tx queues active
during that time.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau d87e4b0252 mt7603: clear PSE reset bit if PSE reset fails
If the firmware is blocked, it should not continue to attempt a reset
until it is safe to do so

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-20 07:57:25 +02:00
Felix Fietkau f24b56f935 update MT7628 firmware to the latest version
Signed-off-by: Felix Fietkau <[email protected]>
2018-05-19 10:52:29 +02:00
Felix Fietkau 664e32171c mt7603: add extra PSE hang check signature for MT7628
Signed-off-by: Felix Fietkau <[email protected]>
2018-05-19 10:48:48 +02:00
Felix Fietkau 20c0766c8f mt7603: adjust rx hang watchdog for MT7628
The MT7628 vendor driver checks a different DMA debug register compared to
MT7603.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-19 10:48:33 +02:00
Felix Fietkau 0b8d1ddec9 mt76: fix beacon timer drift
The beacon timer drifts by 1 microsecond every TBTT. After 20 minutes
with a beacon interval of 100, the drift will be almost 12 ms, enough to
cause weird issues for devices in powersave mode.

Since the beacon timer is configured in units of 1/16 TU (64 us), we
need to adjust it once every 64 beacons and only for one beacon.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-18 17:46:01 +02:00
Felix Fietkau 73edb22822 mt76: discard early received packets if not running yet
If the radio was previously in running state, it can receive some
packets before it is able to process them.
This can lead to a crash if the channel is not initialized yet.
Discard all rx packets until start() is called

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-15 14:28:28 +02:00
Felix Fietkau a78673d523 mt76: fix sending encrypted broadcast packets for secondary interfaces
For encryption to work properly, the BSS index needs to be initialized
for the WCID entry used for the interface.

Signed-off-by: Felix Fietkau <[email protected]>
2018-05-15 13:03:31 +02:00
Felix Fietkau e2eedc9229 mt7603: retry PSE reset calls
PSE reset can fail and a subsequent reset could recover it again

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-18 11:53:24 +02:00
Felix Fietkau ec8435e711 mt76: initialize rx lock earlier
Fixes lockdep warning on mt7603

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-18 09:38:07 +02:00
Felix Fietkau ca5cc9a478 mt76: fix concurrent rx calls on A-MPDU release
Add a spinlock in mt76_rx_complete. Without this, multiple stats updates
could happen in parallel, which can lead to deadlocks. There are
probably more corner cases fixed by this change.

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-17 14:49:29 +02:00
Felix Fietkau 8c92c91abe mt7603: turn vif wcid entry back into a full mt7603_sta
The tx status reporting code needs access to mt7603_sta members for rate
status processing.

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-16 12:07:53 +02:00
Felix Fietkau 2d08440e90 mt76: add rcu locking around tx scheduling
Fixes a reported lockdep error in mac80211:

[  179.867321] =============================
[  179.871510] WARNING: suspicious RCU usage
[  179.875528] 4.14.32 #0 Not tainted
[  179.878924] -----------------------------
[  179.882981] backports-2017-11-01/net/mac80211/tx.c:594 suspicious rcu_dereference_check() usage!
[  179.891785]
[  179.891785] other info that might help us debug this:
[  179.891785]
[  179.899824]
[  179.899824] rcu_scheduler_active = 2, debug_locks = 1
[  179.906343] 2 locks held by ksoftirqd/0/7:
[  179.910479]  #0:  (&(&q->lock)->rlock){+.-.}, at: [<86b207a4>] mt76_dma_tx_cleanup+0x64/0x354 [mt76]
[  179.919734]  #1:  (&(&fq->lock)->rlock){+.-.}, at: [<87238410>] ieee80211_tx_dequeue+0x54/0xc3c [mac80211]
[  179.929890]
[  179.929890] stack backtrace:
[  179.934257] CPU: 0 PID: 7 Comm: ksoftirqd/0 Not tainted 4.14.32 #0
[  179.940421] Stack : 00000000 00000000 00000000 00000000 80e0fce2 00000036 00000000 00000000
[  179.948864]         87c3d24c 80696377 8061039c 00000000 00000007 00000001 87c5db78 6534689d
[  179.957306]         00000000 00000000 80e10000 87c5da74 00000001 0000015a 00000007 00000000
[  179.965748]         00000000 806a0000 000e4171 00000000 00000000 00000000 ffffffff 00000001
[  179.974189]         806c0000 8692b240 86b000d0 87316fe4 00000001 802c9a68 00000000 80700000
[  179.982632]         ...
[  179.985104] Call Trace:
[  179.987582] [<80010a48>] show_stack+0x58/0x100
[  179.992040] [<804c2c58>] dump_stack+0xe8/0x170
[  179.996868] [<87234a04>] ieee80211_tx_h_select_key+0xa8/0x5b8 [mac80211]
[  180.004299] [<87238d44>] ieee80211_tx_dequeue+0x988/0xc3c [mac80211]
[  180.011048] [<86b230dc>] mt76_txq_schedule+0x110/0x3a4 [mt76]
[  180.016821] [<86b209d0>] mt76_dma_tx_cleanup+0x290/0x354 [mt76]
[  180.022777] [<86be2e60>] mt7603_tx_tasklet+0x40/0x6c [mt7603e]
[  180.028637] [<80037058>] tasklet_action+0x110/0x1ec
[  180.033532] [<804e1dac>] __do_softirq+0x164/0x35c
[  180.038235] [<80037174>] run_ksoftirqd+0x40/0x84
[  180.042870] [<800580c8>] smpboot_thread_fn+0x1a8/0x1d8
[  180.048023] [<800542e8>] kthread+0x130/0x144
[  180.052297] [<8000b1f8>] ret_from_kernel_thread+0x14/0x1c

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-15 19:36:13 +02:00
Felix Fietkau ea6dd6f668 mt7603: add missing spin lock init
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-15 19:26:25 +02:00
Felix Fietkau a8e8921559 mt7603: add more checks to avoid dereferencing invalid pointers in wcid lookup
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-15 10:14:46 +02:00
Felix Fietkau d9e5da36e2 mt76: add rcu locking in tid reorder function
Avoids having the tid or station entry disappear prematurely.
Also cancel the reorder work earlier

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-14 21:48:35 +02:00
Felix Fietkau 873a7c990c mt7603: call mt76_txq_schedule_all as a barrier to prevent tx during reset
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 11:50:19 +02:00
Felix Fietkau 7a31731af2 mt76: check for pending reset before attempting to schedule tx
The check within mt76_txq_send_burst is not enough, as it happens after
a first frame has already been queued up

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 11:47:45 +02:00
Felix Fietkau 9a23989932 mt7603: remove warning on rx with invalid channel info
This can happen during a watchdog reset and is harmless

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 10:42:01 +02:00
Felix Fietkau f36f3083ec mt7603: improve validation of rx frames
- discard packets that have no rx group 3 (signal/rate info missing)
- discard packets marked as VHT (no hardware support)
- discard packets with invalid HT rate values

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-13 10:38:35 +02:00
Felix Fietkau 9c52f36091 mt7603: pull the final rate index from the status descriptor
When doing rate probing, multiple frames might end up getting sent with
the probe rate, because of the way that rate probing is set up.
This race window is most visible with MCS rates and aggregation.

To improve rate control stats accuracy, pull the final tx rate from the
descriptor

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-12 18:17:10 +02:00
Felix Fietkau df9f9f6740 mt7603: always try tx rate1 first
Tx status reporting cannot account for the tx attempt starting at a rate
further down the chain, so without this flag it leads to inaccurate
results.

Signed-off-by: Felix Fietkau <[email protected]>
2018-04-12 17:40:48 +02:00
Felix Fietkau 549f43b23e mt7603: ensure that the ACK flag is set for A-MPDUs with any acked subframe
Signed-off-by: Felix Fietkau <[email protected]>
2018-04-12 12:14:23 +02:00
Felix Fietkau ffa2069e78 mt76: fix potential sleep in atomic context
Use cancel_delayed_work instead of cancel_delayed_work_sync

Signed-off-by: Felix Fietkau <[email protected]>
2018-02-27 16:04:08 +01:00
Felix Fietkau cda627fd8f mt76: add missing VHT maximum A-MPDU length capability
Signficantly improves throughput with some clients

Signed-off-by: Felix Fietkau <[email protected]>
2018-02-26 21:54:53 +01:00
Felix Fietkau 5ba59953c5 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:07 +01:00
Felix Fietkau 62d52e940b mt76: set RX_FLAG_DUP_VALIDATED for A-MPDU reordered packets
Required for fast-rx and allows mac80211 to skip an unnnecessary check.

Signed-off-by: Felix Fietkau <[email protected]>
2018-02-09 16:28:09 +01:00
Felix Fietkau 246d548b06 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:01:39 +01:00
Felix Fietkau c60e6dbc4a 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 14:14:02 +01:00
Felix Fietkau 3413961e36 mt7603: avoid reordering qos-null data packets
Signed-off-by: Felix Fietkau <[email protected]>
2018-02-09 11:19:11 +01:00
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