Commit Graph
46 Commits
Author SHA1 Message Date
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 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 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 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
Lorenzo BianconiandFelix Fietkau 50ca27f230 mt76x2: fix WMM parameter configuration
Fix hw queue configuration since mt76x2 devices use a reverse queue
enumeration respect to mac80211 one:
 - 0: AC_BE
 - 1: AC_BK
 - 2: AC_VI
 - 3: AC_VO

The issue can be reproduced sending two concurrent flow using
two separate queues:
 - VO: 20Mbps UDP traffic
 - BE: TCP traffic

In this scenario the UDP traffic will be blocked by the TCP one.
Fix it configuring properly WMM hw queue parameters

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Tested-by: Gaetano Catalli <[email protected]>
Signed-off-by: Gaetano Catalli <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-01-30 10:23:03 +01:00
Lorenzo BianconiandFelix Fietkau 23355cec21 mt76x2: dfs: avoid tasklet scheduling during mt76x2_dfs_init_params()
Substitute tasklet_kill with tasklet_disable/tasklet_enable in order to
guarantee dfs tasklet can not be executed during dfs parameter
initialization

Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-01-30 10:23:03 +01:00
Fengguang WuandFelix Fietkau 58dbda75bd mt76: fix returnvar.cocci warnings
drivers/net/wireless/mediatek/mt76/mt76x2_main.c:86:5-8: Unneeded variable: "ret". Return "0" on line 112

 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: a5f6039c8f9c ("mt76: add driver code for MT76x2e")
CC: Felix Fietkau <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
2018-01-30 10:23:03 +01:00
Lorenzo BianconiandFelix Fietkau 0ee431dac9 mt76x2: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
Initialize mt76_txq pointer after ieee80211_txq pointer check.
Remove space after the pointer cast

Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <[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 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 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 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 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 892543eb79 Revert "mt76x2: fix queue mapping in mt76x2_conf_tx()"
This reverts commit adf1bbd03c.
A report indicates that this causes a tx/rx throughput regression

Signed-off-by: Felix Fietkau <[email protected]>
2016-11-05 10:42:38 +01:00
Lorenzo BianconiandFelix Fietkau adf1bbd03c mt76x2: fix queue mapping in mt76x2_conf_tx()
Signed-off-by: Gaetano Catalli <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-11-03 12:25:13 +01:00
Lorenzo BianconiandFelix Fietkau 6375fc1abe mt76x2: add hw radar detector
add hw DFS pattern detector support for mt76x2 based devices
DFS region supported:
 - FCC
 - ETSI
 - JAPAN_W53
 - JAPAN_W56

Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-09-25 18:13:12 +02:00
Lorenzo BianconiandFelix Fietkau 93907807ca mt76x2: fix typo in mt76x2_tx_get_max_txpwr_adj() signature
Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-09-05 10:43:30 +02:00
Felix Fietkau d7f5112c09 mt76x2: fix checkpatch warnings
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 18:59:22 +02:00
Felix Fietkau b300bdc42e use the new bitfield accessor macros
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:37:26 +02:00
Felix Fietkau 53c1b7f6ac update my email address
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 17:33:28 +02:00
Lorenzo BianconiandFelix Fietkau 2637e6b9c0 mt76x2: add tx power adjustment for auto response frames
Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-08-25 12:57:56 +02:00
Lorenzo BianconiandFelix Fietkau aa77eadf0e mt76x2: add TPC support
add per-packet tx power adjustment support

Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-08-25 12:57:47 +02:00
Felix Fietkau ced81a3458 relicense to ISC (except for util.h which is based on GPL'd kernel code
Signed-off-by: Felix Fietkau <[email protected]>
2016-07-12 08:38:46 +02:00
Felix Fietkau 3c8a4bc30e mt76x2: implement survey support
Signed-off-by: Felix Fietkau <[email protected]>
2016-06-15 16:47:23 +02:00
Felix Fietkau 675868d4e8 mt7603: opt out of the tx BAR refresh at wakeup time
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-28 22:02:21 +01:00
Felix Fietkau 079ad90fe2 update copyright lines
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 18:09:13 +01:00
Felix Fietkau 762463bf9b mt76x2: reset mtxq->aggr after regular aggregation stop
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-19 20:56:16 +01:00
Felix Fietkau 33189cedfa mt7603: fix wcid leak
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-19 09:26:42 +01:00
Felix Fietkau 9e305ef093 add rx helper function which uses ieee80211_rx_napi
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-08 15:06:21 +01:00
Felix Fietkau 81ea5f7225 mt76x2: move mt76x2_txq_init to main.c and make it static
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-06 19:22:26 +01:00
Felix Fietkau 2c2fa07e98 suspend txq scheduling during scanning
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-03 16:10:54 +01:00
Felix Fietkau 71fae84d55 mt76x2: move mt76x2_set_channel to mt76x2_main.c
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-03 15:58:40 +01:00
Felix Fietkau a6d7949f67 move rx polling to core
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-03 15:51:17 +01:00
Felix Fietkau 7630ee71e3 sync with mac80211 API changes
Signed-off-by: Felix Fietkau <[email protected]>
2016-01-15 17:52:34 +01:00
Felix Fietkau 6ca2852f65 move mac address validation to core
Signed-off-by: Felix Fietkau <[email protected]>
2016-01-01 19:38:59 +01:00
Felix Fietkau b9484962c7 move mt76_wcid_alloc to core
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-20 22:40:53 +01:00
Felix Fietkau 93db8eede4 mt76x2: remove msta->sleeping, it is unused
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-20 10:26:01 +01:00
Felix Fietkau 43d5b84989 move tx scheduling code to common
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-16 19:04:06 +01:00
Felix Fietkau 42b9c4db0a move wcid and txq struct to mt76.h in preparation for making tx scheduling code more generic
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-16 17:45:46 +01:00
Felix Fietkau 2044de5229 move mt76 state enum/storage to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 22:05:42 +01:00
Felix Fietkau 62ecfb9730 move more register accessor functions to mt76.h
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 18:01:45 +01:00
Felix Fietkau e20a9c13a5 move mmio functions/init to mt76.ko
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 17:52:00 +01:00
Felix Fietkau 00af5f3105 add accessor function for struct ieee80211_hw from mt76x2_dev
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 17:37:45 +01:00
Felix Fietkau a0ee20716f add a mt76x2_ prefix to all files
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 16:54:53 +01:00