Commit 0d2afe09 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

mt76: mt7921: add mt7921u driver



Introduce support for MT7921U 802.11ax 2x2:2SS wireless devices.

Tested-by: default avatarSean Wang <sean.wang@mediatek.com>
Tested-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 8b7a56d5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -24,3 +24,14 @@ config MT7921S
	  This adds support for MT7921S 802.11ax 2x2:2SS wireless devices.

	  To compile this driver as a module, choose M here.

config MT7921U
	tristate "MediaTek MT7921U (USB) support"
	select MT76_USB
	select MT7921_COMMON
	depends on MAC80211
	depends on USB
	help
	  This adds support for MT7921U 802.11ax 2x2:2SS wireless devices.

	  To compile this driver as a module, choose M here.
+2 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
obj-$(CONFIG_MT7921_COMMON) += mt7921-common.o
obj-$(CONFIG_MT7921E) += mt7921e.o
obj-$(CONFIG_MT7921S) += mt7921s.o
obj-$(CONFIG_MT7921U) += mt7921u.o

CFLAGS_trace.o := -I$(src)

@@ -10,3 +11,4 @@ mt7921-common-y := mac.o mcu.o main.o init.o debugfs.o trace.o
mt7921-common-$(CONFIG_NL80211_TESTMODE) += testmode.o
mt7921e-y := pci.o pci_mac.o pci_mcu.o dma.o
mt7921s-y := sdio.o sdio_mac.o sdio_mcu.o
mt7921u-y := usb.o usb_mac.o
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ int mt7921_register_device(struct mt7921_dev *dev)
		dev->pm.ds_enable = true;
	}

	if (mt76_is_sdio(&dev->mt76))
	if (!mt76_is_mmio(&dev->mt76))
		hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;

	ret = mt7921_init_hardware(dev);
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ enum tx_mcu_port_q_idx {
#define MT_SDIO_TXD_SIZE		(MT_TXD_SIZE + 8 * 4)
#define MT_SDIO_TAIL_SIZE		8
#define MT_SDIO_HDR_SIZE		4
#define MT_USB_TAIL_SIZE		4

#define MT_TXD0_Q_IDX			GENMASK(31, 25)
#define MT_TXD0_PKT_FMT			GENMASK(24, 23)
+2 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ static int mt7921_start(struct ieee80211_hw *hw)
	return err;
}

static void mt7921_stop(struct ieee80211_hw *hw)
void mt7921_stop(struct ieee80211_hw *hw)
{
	struct mt7921_dev *dev = mt7921_hw_dev(hw);
	struct mt7921_phy *phy = mt7921_hw_phy(hw);
@@ -281,6 +281,7 @@ static void mt7921_stop(struct ieee80211_hw *hw)
	mt76_connac_mcu_set_mac_enable(&dev->mt76, 0, false, false);
	mt7921_mutex_release(dev);
}
EXPORT_SYMBOL_GPL(mt7921_stop);

static int mt7921_add_interface(struct ieee80211_hw *hw,
				struct ieee80211_vif *vif)
Loading