Skip to contentSkip to conversation

qtnfmac: announcement of new FullMAC driver for Quantenna chipsets

PATCH In review Avinash Patil 4 participants 7 messages May 26, 2016 – Jun 20, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtnfmac: announcement of new FullMAC driver for Quantenna chipsets

This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets.

QSR10G is Quantenna's 8x8, 160M, 11ac offering.
QSR10G supports 2 simultaneous WMACs- one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration.
FW supports 8 concurrent virtual interfaces on each WMAC.

Patch introduces 2 new drivers- qtnfmac.ko for interfacing with kernel/cfg80211 and qtnfmac_pcie.ko for PCIe bus interface.

---
 MAINTAINERS                                        |    8 +
 drivers/net/wireless/Kconfig                       |    1 +
 drivers/net/wireless/Makefile                      |    1 +
 drivers/net/wireless/quantenna/Kconfig             |   16 +
 drivers/net/wireless/quantenna/Makefile            |    6 +
 drivers/net/wireless/quantenna/include/bus.h       |  195 ++
 .../wireless/quantenna/include/pcie_regs_pearl.h   |  353 ++++
 drivers/net/wireless/quantenna/include/qlink.h     |  584 ++++++
 .../net/wireless/quantenna/include/qtn_hw_ids.h    |   34 +
 .../net/wireless/quantenna/include/shm_ipc_defs.h  |   46 +
 drivers/net/wireless/quantenna/qtnfmac/Kconfig     |   20 +
 drivers/net/wireless/quantenna/qtnfmac/Makefile    |   24 +
 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c  | 1097 +++++++++++
 drivers/net/wireless/quantenna/qtnfmac/cfg80211.h  |   34 +
 drivers/net/wireless/quantenna/qtnfmac/commands.c  | 1927 ++++++++++++++++++++
 drivers/net/wireless/quantenna/qtnfmac/commands.h  |   73 +
 drivers/net/wireless/quantenna/qtnfmac/core.c      |  220 +++
 drivers/net/wireless/quantenna/qtnfmac/core.h      |  170 ++
 drivers/net/wireless/quantenna/qtnfmac/event.c     |  436 +++++
 drivers/net/wireless/quantenna/qtnfmac/event.h     |   27 +
 drivers/net/wireless/quantenna/qtnfmac/init.c      |  320 ++++
 drivers/net/wireless/quantenna/qtnfmac/pcie.c      | 1374 ++++++++++++++
 drivers/net/wireless/quantenna/qtnfmac/pcie.h      |  143 ++
 drivers/net/wireless/quantenna/qtnfmac/pcie_ipc.h  |  144 ++
 .../net/wireless/quantenna/qtnfmac/qlink_util.c    |   71 +
 .../net/wireless/quantenna/qtnfmac/qlink_util.h    |   87 +
 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c   |  169 ++
 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h   |   80 +
 drivers/net/wireless/quantenna/qtnfmac/trans.c     |  224 +++
 drivers/net/wireless/quantenna/qtnfmac/trans.h     |   57 +
 drivers/net/wireless/quantenna/qtnfmac/util.c      |  134 ++
 drivers/net/wireless/quantenna/qtnfmac/util.h      |   53 +
 32 files changed, 8128 insertions(+)
 create mode 100644 drivers/net/wireless/quantenna/Kconfig
 create mode 100644 drivers/net/wireless/quantenna/Makefile
 create mode 100644 drivers/net/wireless/quantenna/include/bus.h
 create mode 100644 drivers/net/wireless/quantenna/include/pcie_regs_pearl.h
 create mode 100644 drivers/net/wireless/quantenna/include/qlink.h
 create mode 100644 drivers/net/wireless/quantenna/include/qtn_hw_ids.h
 create mode 100644 drivers/net/wireless/quantenna/include/shm_ipc_defs.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/Kconfig
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/Makefile
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/cfg80211.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/commands.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/commands.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/core.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/core.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/event.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/event.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/init.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pcie.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pcie.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/pcie_ipc.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qlink_util.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/qlink_util.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/trans.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/trans.h
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/util.c
 create mode 100644 drivers/net/wireless/quantenna/qtnfmac/util.h
MAINTAINERS +8 -0
index ee2fad5..1022fbe 100644
@@ -9151,6 +9151,14 @@ L:       [email protected]
 S:     Maintained
 F:     drivers/firmware/qemu_fw_cfg.c
 
+QUANTENNA QTNFMAC WIRELESS DRIVER
+M:     Igor Mitsyanko <[email protected]>
+M:     Avinash Patil <[email protected]>
+M:     Sergey Matyukevich <[email protected]>
+L:     [email protected]
+S:     Maintained
+F:     drivers/net/wireless/quantenna/qtnfmac
+
 RADOS BLOCK DEVICE (RBD)
 M:     Ilya Dryomov <[email protected]>
 M:     Sage Weil <[email protected]>
drivers/net/wireless/Kconfig +1 -0
index 8c8edaf..dc45057 100644
@@ -26,6 +26,7 @@ source "drivers/net/wireless/intel/Kconfig"
 source "drivers/net/wireless/intersil/Kconfig"
 source "drivers/net/wireless/marvell/Kconfig"
 source "drivers/net/wireless/mediatek/Kconfig"
+source "drivers/net/wireless/quantenna/Kconfig"
 source "drivers/net/wireless/ralink/Kconfig"
 source "drivers/net/wireless/realtek/Kconfig"
 source "drivers/net/wireless/rsi/Kconfig"
drivers/net/wireless/Makefile +1 -0
index f00d429..9c311ff 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_WLAN_VENDOR_INTEL) += intel/
 obj-$(CONFIG_WLAN_VENDOR_INTERSIL) += intersil/
 obj-$(CONFIG_WLAN_VENDOR_MARVELL) += marvell/
 obj-$(CONFIG_WLAN_VENDOR_MEDIATEK) += mediatek/
+obj-$(CONFIG_WLAN_VENDOR_QUANTENNA) += quantenna/
 obj-$(CONFIG_WLAN_VENDOR_RALINK) += ralink/
 obj-$(CONFIG_WLAN_VENDOR_REALTEK) += realtek/
 obj-$(CONFIG_WLAN_VENDOR_RSI) += rsi/
drivers/net/wireless/quantenna/Kconfig new file +16 -0
new file mode 100644
index 0000000..c177dd5
@@ -0,0 +1,16 @@
+config WLAN_VENDOR_QUANTENNA
+       bool "Quantenna WLAN devices"
+       default y
+       ---help---
+         If you have a wireless card belonging to this class, say Y.
+
+         Note that the answer to this question doesn't directly affect the
+         kernel: saying N will just cause the configurator to skip all
+         the questions about  cards. If you say Y, you will be asked for
+         your specific card in the following questions.
+
+if WLAN_VENDOR_QUANTENNA
+
+source "drivers/net/wireless/quantenna/qtnfmac/Kconfig"
+
+endif # WLAN_VENDOR_QUANTENNA
drivers/net/wireless/quantenna/Makefile new file +6 -0
new file mode 100644
index 0000000..baebfbd
@@ -0,0 +1,6 @@
+#
+# Copyright (c) 2015-2016 Quantenna Communications, Inc.
+# All rights reserved.
+#
+
+obj-$(CONFIG_QTNFMAC)  += qtnfmac/
drivers/net/wireless/quantenna/include/bus.h new file +195 -0

195 lines not on this page · raw message

drivers/net/wireless/quantenna/include/pcie_regs_pearl.h new file +353 -0

353 lines not on this page · raw message

drivers/net/wireless/quantenna/include/qlink.h new file +584 -0

584 lines not on this page · raw message

drivers/net/wireless/quantenna/include/qtn_hw_ids.h new file +34 -0
new file mode 100644
index 0000000..353669b
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ **/
+
+#ifndef        _QTN_HW_IDS_H_
+#define        _QTN_HW_IDS_H_
+
+#include <linux/pci_ids.h>
+
+/* */
+
+#define PCIE_VENDOR_ID_QUANTENNA       (0x1bb5)
+
+/* PCIE Device IDs */
+
+#define        PCIE_DEVICE_ID_QTN_PEARL        (0x0008)
+
+/* FW names */
+
+#define QTN_PCI_FW_NAME                "pearl-linux.lzma.img"
+
+#endif /* _QTN_HW_IDS_H_ */
drivers/net/wireless/quantenna/include/shm_ipc_defs.h new file +46 -0

46 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/Kconfig new file +20 -0
new file mode 100644
index 0000000..b69c018
@@ -0,0 +1,20 @@
+config QTNFMAC
+       tristate "Quantenna WiFi FullMAC WLAN driver"
+       default n
+       depends on CFG80211
+       ---help---
+         This adds support for wireless adapters based on Quantenna chipsets.
+         If you choose to build it as a module, it will be called
+         qtnfmac.ko.
+
+config QTNFMAC_PCIE
+       tristate "PCIE bus interface support for Quantenna FullMAC driver"
+       default n
+       depends on QTNFMAC && PCI
+       depends on HAS_DMA
+       select FW_LOADER
+       select CRC32
+       ---help---
+         This option enables the PCIE bus support for Quantenna FullMAC
+         WLAN driver. If you choose to build it as a module, it will be called
+         qtnfmac_pcie.ko.
drivers/net/wireless/quantenna/qtnfmac/Makefile new file +24 -0
new file mode 100644
index 0000000..cf50e36
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2015-2016 Quantenna Communications, Inc.
+# All rights reserved.
+#
+
+ccflags-y += -Idrivers/net/wireless/quantenna/include
+ccflags-y += -D__CHECK_ENDIAN
+
+obj-$(CONFIG_QTNFMAC) += qtnfmac.o
+
+qtnfmac-objs += \
+       core.o \
+       init.o \
+       commands.o \
+       trans.o \
+       cfg80211.o \
+       event.o \
+       util.o \
+       qlink_util.o
+
+obj-$(CONFIG_QTNFMAC_PCIE) += qtnfmac_pcie.o
+qtnfmac_pcie-objs += \
+       pcie.o \
+       shm_ipc.o
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c new file +1097 -0

1,097 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/cfg80211.h new file +34 -0
new file mode 100644
index 0000000..51f4a73
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2015-2016 Quantenna Communications, Inc.
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ **/
+
+#ifndef _QTN_FMAC_CFG80211_H_
+#define _QTN_FMAC_CFG80211_H_
+
+#include <net/cfg80211.h>
+
+#include "core.h"
+
+/* */
+
+int qtnf_register_wiphy(struct qtnf_bus *bus, struct qtnf_wmac *mac);
+int qtnf_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
+struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy,
+                                          const char *name,
+                                          unsigned char name_assign_type,
+                                          enum nl80211_iftype type, u32 *flags,
+                                          struct vif_params *params);
+
+#endif /* _QTN_FMAC_CFG80211_H_ */
drivers/net/wireless/quantenna/qtnfmac/commands.c new file +1927 -0

563 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/commands.h new file +73 -0

73 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/core.c new file +220 -0

220 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/core.h new file +170 -0

170 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/event.c new file +436 -0

436 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/event.h new file +27 -0
new file mode 100644
index 0000000..a693130

Lines of this file are not shown. View the raw message.

drivers/net/wireless/quantenna/qtnfmac/init.c new file +320 -0

320 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/pcie.c new file +1374 -0

1,374 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/pcie.h new file +143 -0

143 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/pcie_ipc.h new file +144 -0

144 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/qlink_util.c new file +71 -0

71 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/qlink_util.h new file +87 -0

87 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/shm_ipc.c new file +169 -0

169 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/shm_ipc.h new file +80 -0

80 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/trans.c new file +224 -0

224 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/trans.h new file +57 -0

57 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/util.c new file +134 -0

134 lines not on this page · raw message

drivers/net/wireless/quantenna/qtnfmac/util.h new file +53 -0

53 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

--
1.9.1

This email, including its contents and any attachment(s), may contain confidential information of Quantenna Communications, Inc. and is solely for the intended recipient(s). If you may have received this in error, please contact the sender and permanently delete this email, its contents and any attachment(s).

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi,

Quoted 10 lines · Avinash Patil

This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets.

QSR10G is Quantenna's 8x8, 160M, 11ac offering.
QSR10G supports 2 simultaneous WMACs- one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration.
FW supports 8 concurrent virtual interfaces on each WMAC.

Patch introduces 2 new drivers- qtnfmac.ko for interfacing with kernel/cfg80211 and qtnfmac_pcie.ko for PCIe bus interface.

Nice to see this one, will you also provide a pearl-linux.lzma.img as required for the firmware? What about cards in embedded devices, might they require a uboot as well? Since requesting uboot seems to be specifically supported by the card/firmware interface.

Quoted 1 line

This email, including its contents and any attachment(s), may contain confidential information of Quantenna Communications, Inc. and is solely for the intended recipient(s). If you may have received this in error, please contact the sender and permanently delete this email, its contents and any attachment(s).

You will need to remove this footer to be taken seriously, as confidential information would be not GPL compatible, and "may contain" means it is too risky to accept that.

Regards
Jonas

#2 lore raw
Quoted 11 lines · Jonas Gorski
Quoted 5 lines · Avinash Patil

This email, including its contents and any attachment(s), may contain confidential information of Quantenna Communications, Inc. and is solely for the intended recipient(s). If you may have received this in error, please contact the sender and permanently delete this email, its contents and any attachment(s).

You will need to remove this footer to be taken seriously, as confidential information would be not GPL compatible, and "may contain" means it is too risky to accept that.

Yeah, I'm not going to take (or even look) patches with such disclaimers. So please resend so that we can start the review.

Signature · 1 line
Kalle Valo
#4 lore raw
In reply to Jonas Gorski
Quoted 11 lines · Jonas Gorski

Hi,

Quoted 8 lines · Avinash Patil

This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets.

QSR10G is Quantenna's 8x8, 160M, 11ac offering.
QSR10G supports 2 simultaneous WMACs- one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration.
FW supports 8 concurrent virtual interfaces on each WMAC.

Quoted 6 lines
Quoted 2 lines

Patch introduces 2 new drivers- qtnfmac.ko for interfacing with kernel/cfg80211 and qtnfmac_pcie.ko for PCIe bus interface.

Nice to see this one, will you also provide a pearl-linux.lzma.img as required for the firmware? What about cards in embedded devices, might they require a uboot as well? Since requesting uboot seems to be specifically supported by the card/firmware interface.

Hi Jonas,
we will provide firmware, but we're not sure at which point it should be done: addressing any review comments for driver may affect firmware itself, probably the best time to provide firmware would be after new driver is accepted and merged?

Uboot is currently not needed: right now device only supports booting with uboot binary stored in internal flash memory, we do not transfer it from host over PCIe.

Quoted 9 lines
Quoted 2 lines

This email, including its contents and any attachment(s), may contain confidential information of Quantenna Communications, Inc. and is solely for the intended recipient(s). If you may have received this in error, please contact the sender and permanently delete this email, its contents and any attachment(s).

You will need to remove this footer to be taken seriously, as confidential information would be not GPL compatible, and "may contain" means it is too risky to accept that.

Regards
Jonas

#3 lore raw
In reply to Kalle Valo
Quoted 9 lines · Kalle Valo
Quoted 7 lines · Jonas Gorski
Quoted 5 lines · Avinash Patil

This email, including its contents and any attachment(s), may contain confidential information of Quantenna Communications, Inc. and is solely for the intended recipient(s). If you may have received this in error, please contact the sender and permanently delete this email, its contents and any attachment(s).

Quoted 6 lines
Quoted 3 lines

You will need to remove this footer to be taken seriously, as confidential information would be not GPL compatible, and "may contain" means it is too risky to accept that.

Yeah, I'm not going to take (or even look) patches with such disclaimers. So please resend so that we can start the review.

Kalle, Jonas,
we will resend the patch without disclaimer, sorry for inconvenience.

#5 lore raw
In reply to Igor Mitsyanko
Quoted 19 lines · Igor Mitsyanko
Quoted 11 lines · Jonas Gorski

Hi,

Quoted 8 lines · Avinash Patil

This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets.

QSR10G is Quantenna's 8x8, 160M, 11ac offering.
QSR10G supports 2 simultaneous WMACs- one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration.
FW supports 8 concurrent virtual interfaces on each WMAC.

Quoted 6 lines
Quoted 2 lines

Patch introduces 2 new drivers- qtnfmac.ko for interfacing with kernel/cfg80211 and qtnfmac_pcie.ko for PCIe bus interface.

Nice to see this one, will you also provide a pearl-linux.lzma.img as required for the firmware? What about cards in embedded devices, might they require a uboot as well? Since requesting uboot seems to be specifically supported by the card/firmware interface.

Quoted 5 lines

Hi Jonas,
we will provide firmware, but we're not sure at which point it should be done: addressing any review comments for driver may affect firmware itself, probably the best time to provide firmware would be after new driver is accepted and merged?

I would prefer to see the firmware images publically available before the driver gets applied. What if you send the firmware patches as RFC only to linux-wireless? That way linux-firmware.git maintainers won't apply them, hopefully. And mention in the commit log that this is just for testing purposes, not to be applied.

Signature · 1 line
Kalle Valo
#6 lore raw
Quoted 25 lines · Kalle Valo
Quoted 18 lines · Igor Mitsyanko
Quoted 11 lines · Jonas Gorski

Hi,

Quoted 8 lines · Avinash Patil

This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets.

QSR10G is Quantenna's 8x8, 160M, 11ac offering.
QSR10G supports 2 simultaneous WMACs- one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration.
FW supports 8 concurrent virtual interfaces on each WMAC.

Quoted 6 lines
Quoted 2 lines

Patch introduces 2 new drivers- qtnfmac.ko for interfacing with kernel/cfg80211 and qtnfmac_pcie.ko for PCIe bus interface.

Nice to see this one, will you also provide a pearl-linux.lzma.img as required for the firmware? What about cards in embedded devices, might they require a uboot as well? Since requesting uboot seems to be specifically supported by the card/firmware interface.

Quoted 5 lines

Hi Jonas,
we will provide firmware, but we're not sure at which point it should be done: addressing any review comments for driver may affect firmware itself, probably the best time to provide firmware would be after new driver is accepted and merged?

Quoted 6 lines

I would prefer to see the firmware images publically available before the driver gets applied. What if you send the firmware patches as RFC only to linux-wireless? That way linux-firmware.git maintainers won't apply them, hopefully. And mention in the commit log that this is just for testing purposes, not to be applied.

Kalle, sure, we will send firmware binary as an RFC to linux-wireless while patch itself is in review.