Commit Graph
15 Commits
Author SHA1 Message Date
Lorenzo BianconiandFelix Fietkau 0b01aceeef mt76: mt76x02u: move mt76x02u_mac_start in mt76x02-usb module
Unify mt76x02u_mac_start between mt76x2u and mt76x0u since the
code is shared between both drivers

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-09-26 12:04:20 +02:00
Ryder LeeandFelix Fietkau f625afcedc mt76: switch to SPDX tag instead of verbose boilerplate text
No functional change intended.

Add SPDX identifiers to all remaining files in /mt76.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-08-20 15:22:20 +02:00
Lorenzo BianconiandFelix Fietkau 5007326555 mt76: add skb pointer to mt76_tx_info
Pass skb pointer to tx_prepare_skb through mt76_tx_info data structure.
This is a preliminary patch to properly support dma error path for
new chipsets (e.g. 7615)

Signed-off-by: Lorenzo Bianconi <[email protected]>
2019-04-25 12:04:34 +02:00
Stanislaw GruszkaandFelix Fietkau 37af803a2f mt76x02u: implement beacon_ops
Add implementation of beacon_ops for USB and exit function to
stop the timer if running when device is removed. Still no
actual work on pre tbtt event.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-24 08:22:22 +01:00
Stanislaw GruszkaandFelix Fietkau f2a18f5a7f mt76x02: introduce mt76x02_beacon.c
Move most of beaconing code into separate file and separate beacon
initialization for USB and MMIO as pre TBTT implementation for USB
will be different.

Signed-off-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-24 08:20:43 +01:00
Lorenzo BianconiandFelix Fietkau f977a924b8 mt76: introduce mt76_tx_info data structure
Add mt76_tx_info as auxiliary data structure to pass values
to tx_prepare_skb pointer. This is a preliminary patch to add
support for new chipsets (e.g. mt7615)

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-14 22:09:32 +01:00
Lorenzo BianconiandFelix Fietkau 9bc2d56c37 mt76: remove mt76_queue dependency from tx_complete_skb function pointer
Remove mt76_queue dependency from tx_complete_skb function pointer and
rely on mt76_tx_qid instead. Remove flush from tx_complete_skb
signature. This is a preliminary patch to introduce mt76_sw_queue
support

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-12 16:58:06 +01:00
Lorenzo BianconiandFelix Fietkau ddd98f8870 mt76: remove mt76_queue dependency from tx_prepare_skb function pointer
Remove mt76_queue dependency from tx_prepare_skb function pointer and
rely on mt76_tx_qid instead. This is a preliminary patch to introduce
mt76_sw_queue support

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2019-03-12 16:58:06 +01:00
Lorenzo BianconiandFelix Fietkau fd9b2b0fdf mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mac.c
Use mt76x02_dev data structure as reference in mt76x02_mac.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:47:02 +02:00
Lorenzo BianconiandFelix Fietkau 08ecb5f019 mt76: use mt76x02_dev instead of mt76_dev in mt76x02_usb_mcu.c
Use mt76x02_dev data structure as reference in mt76x02_usb_mcu.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-08 13:47:02 +02:00
Lorenzo BianconiandFelix Fietkau 9a3952131b mt76: usb: move mt76x02u_tx_complete_skb in mt76x02_usb_core.c
Move mt76x02u_tx_complete_skb and mt76x02u_remove_dma_hdr since they
are used just by usb code

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-05 19:59:45 +02:00
Lorenzo BianconiandFelix Fietkau 4bae980ce2 mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi
Use mt76x02u_tx_prepare_skb routine to fill txwi in mt76x2u and
mt76x0u driver and remove duplicated code. Moreover add static
qualifier to mt76x02_mac_tx_rate_val and mt76x02_mac_fill_txwi
routines

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2018-10-04 12:55:58 +02:00
Colin Ian KingandFelix Fietkau 6afb1b85a4 mt76: fix header guard macro define names
The header guards that are #defined are different from those being
checked.  Fix this by #defining them to the correct name.

Fixes clang warnings:
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h:17:9:
warning: '__MT76x02_MCU_H' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]

drivers/net/wireless/mediatek/mt76/mt76x02_usb.h:17:9:
warning: '__MT76x02_USB_H' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]

Fixes: 905db7470199 ("mt76: usb: move mt76x02 mcu code in mt76x02-usb module")
Fixes: edaa580bc830 ("mt76: move shared mcu_calibrate routine in mt76x02-lib module")
Signed-off-by: Colin Ian King <[email protected]>
2018-10-01 13:56:48 +02:00
Lorenzo BianconiandFelix Fietkau 6337ffbe07 mt76: usb: move mt76u_skb_dma_info in mt76x02_usb_core.c
Move mt76u_skb_dma_info routine in mt76x02-usb module and rename it in
mt76x02u_skb_dma_info. Moreover move mt76x02u_set_txinfo in
mt76x02_usb_core.c. This is a preliminary patch to move MT_TXD_INFO,
MT_MCU_MSG and MT_RX_FCE_INFO defs in mt76x02-lib module since other
chipsets (e.g. mt7603) use different dma definitions

Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-09-12 13:16:49 +02:00
Lorenzo BianconiandFelix Fietkau d2773ceed2 mt76: usb: move mt76x02 mcu code in mt76x02-usb module
Introduce mt76x02_usb_mcu.c in order to contain mt76x02u mcu related
code. Add mt76x02-usb module as a container for mt76x02 usb code.
This is a preliminary patch to move MT_TXD_INFO, MT_MCU_MSG and
MT_RX_FCE_INFO defs in mt76x02-lib module since other chipsets (e.g.
mt7603) use different dma definitions

Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
2018-09-12 13:16:24 +02:00