Commit Graph
39 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau 5a79f17160 mt76x02: move TXD/RXD/MCU definitions in mt76x02_dma.h
Introduce mt76x02_dma.h header file to contain mt76x02 dma
related definitions

Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-09-12 13:16:50 +02:00
Lorenzo BianconiandFelix Fietkau b85e072e4d mt76: move mt76_qsel definition in dma.h
Move mt76_qsel definition in dma.h in order to be reused in mt76x0
driver. Moreover remove empty mt76x2_dma.h header file

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-09-11 13:49:19 +02:00
Stanislaw GruszkaandFelix Fietkau 81a655afd7 mt76: unify {insert/remove}_hdr_pad
Merge insert/remove _hdr_pad from mt76x0 and mt76x2.

Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-09-11 13:49:19 +02:00
Stanislaw GruszkaandFelix Fietkau fcf2130e42 mt76: unify mt76x02_vif struct
Private vif structures definitions are the same for mt76x2 and mt76x0.

Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-09-11 13:49:19 +02:00
Stanislaw GruszkaandFelix Fietkau 51b74acc22 mt76: use mac_wcid_set_drop in mt76x0
Move mt76x02_mac_wcid_set_drop to common code and use it in mt76x0.

Signed-off-by: Stanislaw Gruszka <[email protected]>
2018-09-11 13:49:19 +02:00
Lorenzo BianconiandFelix Fietkau 9bf1aa1d8c mt76: add mt76x2_tx_common to mt76x2-common module
Move tx related code shared between mt76x2 and mt76x2u in mt76x2-common
module

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
2018-09-11 13:49:19 +02:00
Lorenzo BianconiandFelix Fietkau 7ac6dac9a3 mt76: rename mt76_tx_queue_skb in mt76_dma_tx_queue_skb
Move mt76_dma_tx_queue_skb routine in dma.c.
Remove static qualifier from mt76_get_txwi definition

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
2018-09-11 13:49:19 +02:00
Lorenzo BianconiandFelix Fietkau 1ab6cea9e5 mt76x2: add buffer len to mt76x2_mac_write_txwi signature
Add frame length to mt76x2_mac_write_txwi routine signature and do not
fetch it from skb since txwi data structure is added at the beginning of
the skb for usb based devices and mt76x2_mac_write_txwi will be shared
between pci and usb related code

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
2018-09-11 13:49:19 +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
Lorenzo BianconiandFelix Fietkau c66094e92d mt76x2: fix possible NULL pointer dereferencing in mt76x2_tx()
Fix a theoretical NULL pointer dereferencing in mt76x2_tx routine that
can occurs for injected frames in a monitor vif since vif pointer could
be NULL for that interfaces

Fixes: 23405236460b ("mt76: fix transmission of encrypted mgmt frames")
Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-03-19 21:38:25 +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 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 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
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 05e961782d move mt76_insert_hdr_pad to mt76x2_tx.c
Signed-off-by: Felix Fietkau <[email protected]>
2016-09-04 18:06:48 +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 c3127d2acc mt76x2: add debugfs entry to enable/disable per packet TPC
Signed-off-by: Lorenzo Bianconi <[email protected]>
2016-08-25 12:58:02 +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 11e0a12ce4 mt76x2: fix crash on monitor mode injection
Signed-off-by: Felix Fietkau <[email protected]>
2016-06-15 14:59:13 +02:00
Felix Fietkau 6355f35431 move tx queue wake to common code outside of locked section, fixes queue wake on mt7603
Signed-off-by: Felix Fietkau <[email protected]>
2016-03-03 15:57:39 +01:00
Felix Fietkau d4a94d8a91 mt76x2: remove unnecessary tx_info overrides for beacons
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 21:35:22 +01:00
Felix Fietkau 2cfb50f84d mt7603: pass the correct hardware queue index to the tx header
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-25 21:29:15 +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 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 2dfb9faa78 add support for queueing frames spanning multiple descriptors
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-05 01:15:35 +01:00
Felix Fietkau b08f5433d1 tx: move dma mapping code to core, unify tx callbacks into one that prepares tx_info, skb and txwi
Signed-off-by: Felix Fietkau <[email protected]>
2016-02-03 20:14:53 +01:00
Felix Fietkau 5a2e904bbd move more tx code to common
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-16 19:11:16 +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 a08c4a3cd4 add a driver ops struct to allow mt76 to call into driver specific code, will be used for queueing tx packets (incl. mac header processing)
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-16 18:38:39 +01:00
Felix Fietkau 645c93fefc move tx queues to struct mt76_dev
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-16 18:22:41 +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 66af6b3aad move low level DMA code to mt76.ko
Signed-off-by: Felix Fietkau <[email protected]>
2015-12-06 21:32:43 +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