Commit 5580d810 authored by Kalle Valo's avatar Kalle Valo
Browse files

Merge tag 'mt76-for-kvalo-2018-10-05' of https://github.com/nbd168/wireless

mt76 patches for 4.20

* unify code between mt76x0, mt76x2
* mt76x0 fixes
* another fix for rx buffer allocation regression on usb
* move mt76x2 source files to mt76x2 folder
* more work on mt76x0e support
parents 2a455012 9b43960b
Loading
Loading
Loading
Loading
+2 −41
Original line number Diff line number Diff line
@@ -13,44 +13,5 @@ config MT76x02_USB
	tristate
	select MT76_USB

config MT76x0_COMMON
	tristate
	select MT76x02_LIB

config MT76x2_COMMON
	tristate
	select MT76x02_LIB

config MT76x0U
	tristate "MediaTek MT76x0U (USB) support"
	select MT76x0_COMMON
	select MT76x02_USB
	depends on MAC80211
	depends on USB
	help
	  This adds support for MT7610U-based wireless USB dongles.

config MT76x0E
	tristate "MediaTek MT76x0E (PCIe) support"
	select MT76x0_COMMON
	depends on MAC80211
	depends on PCI
	help
	  This adds support for MT7610/MT7630-based wireless PCIe devices.

config MT76x2E
	tristate "MediaTek MT76x2E (PCIe) support"
	select MT76x2_COMMON
	depends on MAC80211
	depends on PCI
	---help---
	  This adds support for MT7612/MT7602/MT7662-based wireless PCIe devices.

config MT76x2U
	tristate "MediaTek MT76x2U (USB) support"
	select MT76x2_COMMON
	select MT76x02_USB
	depends on MAC80211
	depends on USB
	help
	  This adds support for MT7612U-based wireless USB dongles.
source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig"
source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig"
+5 −21
Original line number Diff line number Diff line
obj-$(CONFIG_MT76_CORE) += mt76.o
obj-$(CONFIG_MT76_USB) += mt76-usb.o
obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o
obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o
obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o
obj-$(CONFIG_MT76x2E) += mt76x2e.o
obj-$(CONFIG_MT76x2U) += mt76x2u.o

mt76-y := \
	mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o tx.o agg-rx.o
@@ -14,25 +10,13 @@ mt76-usb-y := usb.o usb_trace.o usb_mcu.o

CFLAGS_trace.o := -I$(src)
CFLAGS_usb_trace.o := -I$(src)
CFLAGS_mt76x02_trace.o := -I$(src)

mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \
		 mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o
		 mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o \
		 mt76x02_txrx.o mt76x02_trace.o

mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o

mt76x2-common-y := \
	mt76x2_eeprom.o mt76x2_tx_common.o mt76x2_mac_common.o \
	mt76x2_init_common.o mt76x2_common.o mt76x2_phy_common.o \
	mt76x2_debugfs.o mt76x2_mcu_common.o

mt76x2e-y := \
	mt76x2_pci.o mt76x2_dma.o \
	mt76x2_main.o mt76x2_init.o mt76x2_tx.o \
	mt76x2_core.o mt76x2_mac.o mt76x2_mcu.o mt76x2_phy.o \
	mt76x2_dfs.o mt76x2_trace.o

mt76x2u-y := \
	mt76x2_usb.o mt76x2u_init.o mt76x2u_main.o mt76x2u_mac.o \
	mt76x2u_mcu.o mt76x2u_phy.o mt76x2u_core.o

CFLAGS_mt76x2_trace.o := -I$(src)
obj-$(CONFIG_MT76x0_COMMON) += mt76x0/
obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
+2 −4
Original line number Diff line number Diff line
@@ -262,8 +262,6 @@ struct mt76_driver_ops {

	void (*sta_ps)(struct mt76_dev *dev, struct ieee80211_sta *sta,
		       bool ps);
	s8 (*get_max_txpwr_adj)(struct mt76_dev *dev,
				const struct ieee80211_tx_rate *rate);
};

struct mt76_channel_state {
@@ -519,8 +517,8 @@ static inline u16 mt76_rev(struct mt76_dev *dev)
#define mt76xx_chip(dev) mt76_chip(&((dev)->mt76))
#define mt76xx_rev(dev) mt76_rev(&((dev)->mt76))

#define __mt76_init_queues(dev)		(dev)->queue_ops->init((dev))
#define __mt76_queue_alloc(dev, ...)	(dev)->queue_ops->alloc((dev), __VA_ARGS__)
#define mt76_init_queues(dev)		(dev)->mt76.queue_ops->init(&((dev)->mt76))
#define mt76_queue_alloc(dev, ...)	(dev)->mt76.queue_ops->alloc(&((dev)->mt76), __VA_ARGS__)
#define mt76_queue_add_buf(dev, ...)	(dev)->mt76.queue_ops->add_buf(&((dev)->mt76), __VA_ARGS__)
#define mt76_queue_rx_reset(dev, ...)	(dev)->mt76.queue_ops->rx_reset(&((dev)->mt76), __VA_ARGS__)
#define mt76_queue_tx_cleanup(dev, ...)	(dev)->mt76.queue_ops->tx_cleanup(&((dev)->mt76), __VA_ARGS__)
+20 −0
Original line number Diff line number Diff line
config MT76x0_COMMON
	tristate
	select MT76x02_LIB

config MT76x0U
	tristate "MediaTek MT76x0U (USB) support"
	select MT76x0_COMMON
	select MT76x02_USB
	depends on MAC80211
	depends on USB
	help
	  This adds support for MT7610U-based wireless USB dongles.

config MT76x0E
	tristate "MediaTek MT76x0E (PCIe) support"
	select MT76x0_COMMON
	depends on MAC80211
	depends on PCI
	help
	  This adds support for MT7610/MT7630-based wireless PCIe devices.
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ obj-$(CONFIG_MT76x0_COMMON) += mt76x0-common.o

mt76x0-common-y := \
	init.o main.o trace.o eeprom.o phy.o \
	mac.o debugfs.o tx.o
	mac.o debugfs.o
mt76x0u-y := usb.o usb_mcu.o
mt76x0e-y := pci.o pci_mcu.o

Loading