Skip to contentSkip to conversation

staging: ks7010: cfg80211 conversion, add FIL

RFC In review Tobin C. Harding 3 participants 9 messages Jun 1, 2017 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: ks7010: cfg80211 conversion, add FIL

Current ks7010 driver uses the WEXT interface. This series is the initial stage of re-writing the driver to use cfg80211.

Patch set applies on Linus' mainline.

5ed02dbb497422bf225783f46e6eadd237d23d6b Linux 4.12-rc3

Throws 4 compiler warnings for functions defined and not used.

As a first step I have implemented a Firmware Interface Layer (FIL) based on how the current driver interfaces with the firmware.

This is my first interaction with wireless networking and device driver development. Please be as pedantic as you like, I am here to learn.

I have attempted to document the driver functionality thoroughly, including explanation of wireless networking features. My understanding is far from complete, if I have made mistakes please do point them out. My aim is for this driver to be approachable by developers new to Wi-Fi drivers (as well as shamelessly educating myself).

I am unsure of the etiquette when attempting such a conversion so elected to keep the original code in a sub directory but exclude it from the build process.

Also the code does not include a licence comment in each file. It does include the MODULE_LICENSE("GPL") macro. I am unsure of the correct handling of the licensing, in particular which exact form of license comment to use and what to do about copyright. I do not wish to violate, or upset, the previous developers in any way. I am not employed by a company, all work is my own and is based on the current kernel driver.

Thank you for taking the time to read this and thank you in advance for any time that you spend on this RFC. All feedback very much appreciated.

Regards,
Tobin.

Tobin C. Harding (3):
staging: ks7010: move WEXT files to sub directory
staging: ks7010: Add cfg80211 files
MAINTAINERS: add maintainer entry for ks7010

 MAINTAINERS                                 |    7 +
 drivers/staging/ks7010/Kconfig              |    6 +-
 drivers/staging/ks7010/Makefile             |    9 +-
 drivers/staging/ks7010/README.rst           |   73 +
 drivers/staging/ks7010/TODO                 |   36 -
 drivers/staging/ks7010/TODO.rst             |   17 +
 drivers/staging/ks7010/cfg80211.c           |   45 +
 drivers/staging/ks7010/cfg80211.h           |    9 +
 drivers/staging/ks7010/common.h             |   10 +
 drivers/staging/ks7010/eap.h                |   36 +
 drivers/staging/ks7010/eap_packet.h         |  144 --
 drivers/staging/ks7010/fil.c                | 1294 ++++++++++++
 drivers/staging/ks7010/fil.h                |  527 +++++
 drivers/staging/ks7010/fil_types.h          |  845 ++++++++
 drivers/staging/ks7010/hif.c                |  104 +
 drivers/staging/ks7010/hif.h                |   23 +
 drivers/staging/ks7010/ks7010.h             |   94 +
 drivers/staging/ks7010/ks7010_sdio.c        | 1079 ----------
 drivers/staging/ks7010/ks7010_sdio.h        |  164 --
 drivers/staging/ks7010/ks_hostif.c          | 2638 -----------------------
 drivers/staging/ks7010/ks_hostif.h          |  685 ------
 drivers/staging/ks7010/ks_wlan.h            |  514 -----
 drivers/staging/ks7010/ks_wlan_ioctl.h      |   67 -
 drivers/staging/ks7010/ks_wlan_net.c        | 2999 ---------------------------
 drivers/staging/ks7010/main.c               |  122 ++
 drivers/staging/ks7010/michael_mic.c        |  148 --
 drivers/staging/ks7010/michael_mic.h        |   25 -
 drivers/staging/ks7010/sdio.c               |  399 ++++
 drivers/staging/ks7010/sdio.h               |   86 +
 drivers/staging/ks7010/tx.c                 |   29 +
 drivers/staging/ks7010/wext/Kconfig         |   10 +
 drivers/staging/ks7010/wext/Makefile        |    4 +
 drivers/staging/ks7010/wext/TODO            |   36 +
 drivers/staging/ks7010/wext/eap_packet.h    |  144 ++
 drivers/staging/ks7010/wext/ks7010_sdio.c   | 1079 ++++++++++
 drivers/staging/ks7010/wext/ks7010_sdio.h   |  164 ++
 drivers/staging/ks7010/wext/ks_hostif.c     | 2638 +++++++++++++++++++++++
 drivers/staging/ks7010/wext/ks_hostif.h     |  685 ++++++
 drivers/staging/ks7010/wext/ks_wlan.h       |  514 +++++
 drivers/staging/ks7010/wext/ks_wlan_ioctl.h |   67 +
 drivers/staging/ks7010/wext/ks_wlan_net.c   | 2999 +++++++++++++++++++++++++++
 drivers/staging/ks7010/wext/michael_mic.c   |  148 ++
 drivers/staging/ks7010/wext/michael_mic.h   |   25 +
 43 files changed, 12240 insertions(+), 8507 deletions(-)
 create mode 100644 drivers/staging/ks7010/README.rst
 delete mode 100644 drivers/staging/ks7010/TODO
 create mode 100644 drivers/staging/ks7010/TODO.rst
 create mode 100644 drivers/staging/ks7010/cfg80211.c
 create mode 100644 drivers/staging/ks7010/cfg80211.h
 create mode 100644 drivers/staging/ks7010/common.h
 create mode 100644 drivers/staging/ks7010/eap.h
 delete mode 100644 drivers/staging/ks7010/eap_packet.h
 create mode 100644 drivers/staging/ks7010/fil.c
 create mode 100644 drivers/staging/ks7010/fil.h
 create mode 100644 drivers/staging/ks7010/fil_types.h
 create mode 100644 drivers/staging/ks7010/hif.c
 create mode 100644 drivers/staging/ks7010/hif.h
 create mode 100644 drivers/staging/ks7010/ks7010.h
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.c
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.h
 delete mode 100644 drivers/staging/ks7010/ks_hostif.c
 delete mode 100644 drivers/staging/ks7010/ks_hostif.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_ioctl.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_net.c
 create mode 100644 drivers/staging/ks7010/main.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.h
 create mode 100644 drivers/staging/ks7010/sdio.c
 create mode 100644 drivers/staging/ks7010/sdio.h
 create mode 100644 drivers/staging/ks7010/tx.c
 create mode 100644 drivers/staging/ks7010/wext/Kconfig
 create mode 100644 drivers/staging/ks7010/wext/Makefile
 create mode 100644 drivers/staging/ks7010/wext/TODO
 create mode 100644 drivers/staging/ks7010/wext/eap_packet.h
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.c
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.h
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.c
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_ioctl.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_net.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.h
Signature · 1 line
2.7.4
#1 lore raw

RFC 1/3 staging: ks7010: move WEXT files to sub directory

Current driver implements the WEXT interface. WEXT is in maintenance mode, we need to re-write the driver using cfg80211. The current driver is handy as a reference for the new implementation, we can keep it in tree for now.

Move WEXT driver to sub directory, add dummy Makefile and Kconfig so build completes successfully but does not process any files from the WEXT directory.

---
 drivers/staging/ks7010/Kconfig              |    6 +-
 drivers/staging/ks7010/Makefile             |    3 -
 drivers/staging/ks7010/TODO                 |   36 -
 drivers/staging/ks7010/eap_packet.h         |  144 --
 drivers/staging/ks7010/ks7010_sdio.c        | 1079 ----------
 drivers/staging/ks7010/ks7010_sdio.h        |  164 --
 drivers/staging/ks7010/ks_hostif.c          | 2638 -----------------------
 drivers/staging/ks7010/ks_hostif.h          |  685 ------
 drivers/staging/ks7010/ks_wlan.h            |  514 -----
 drivers/staging/ks7010/ks_wlan_ioctl.h      |   67 -
 drivers/staging/ks7010/ks_wlan_net.c        | 2999 ---------------------------
 drivers/staging/ks7010/michael_mic.c        |  148 --
 drivers/staging/ks7010/michael_mic.h        |   25 -
 drivers/staging/ks7010/wext/Kconfig         |   10 +
 drivers/staging/ks7010/wext/Makefile        |    4 +
 drivers/staging/ks7010/wext/TODO            |   36 +
 drivers/staging/ks7010/wext/eap_packet.h    |  144 ++
 drivers/staging/ks7010/wext/ks7010_sdio.c   | 1079 ++++++++++
 drivers/staging/ks7010/wext/ks7010_sdio.h   |  164 ++
 drivers/staging/ks7010/wext/ks_hostif.c     | 2638 +++++++++++++++++++++++
 drivers/staging/ks7010/wext/ks_hostif.h     |  685 ++++++
 drivers/staging/ks7010/wext/ks_wlan.h       |  514 +++++
 drivers/staging/ks7010/wext/ks_wlan_ioctl.h |   67 +
 drivers/staging/ks7010/wext/ks_wlan_net.c   | 2999 +++++++++++++++++++++++++++
 drivers/staging/ks7010/wext/michael_mic.c   |  148 ++
 drivers/staging/ks7010/wext/michael_mic.h   |   25 +
 26 files changed, 8514 insertions(+), 8507 deletions(-)
 delete mode 100644 drivers/staging/ks7010/TODO
 delete mode 100644 drivers/staging/ks7010/eap_packet.h
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.c
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.h
 delete mode 100644 drivers/staging/ks7010/ks_hostif.c
 delete mode 100644 drivers/staging/ks7010/ks_hostif.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_ioctl.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_net.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.h
 create mode 100644 drivers/staging/ks7010/wext/Kconfig
 create mode 100644 drivers/staging/ks7010/wext/Makefile
 create mode 100644 drivers/staging/ks7010/wext/TODO
 create mode 100644 drivers/staging/ks7010/wext/eap_packet.h
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.c
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.h
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.c
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_ioctl.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_net.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.h
drivers/staging/ks7010/Kconfig +1 -5
index 0b92176..437b928 100644
@@ -1,10 +1,6 @@
 config KS7010
 	tristate "KeyStream KS7010 SDIO support"
-	depends on MMC && WIRELESS
-	select WIRELESS_EXT
-	select WEXT_PRIV
-	select FW_LOADER
-	help
+	---help---
 	  This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is
 	  found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only,
 	  sadly not FCC-ID "S2Y-WLAN-11B-G") and Spectec SDW-823 microSD cards.
drivers/staging/ks7010/Makefile +0 -3
index 69fcf8d..f58cf9a 100644
@@ -1,4 +1 @@
 obj-$(CONFIG_KS7010) += ks7010.o
-
-ccflags-y 	     += -DKS_WLAN_DEBUG=0
-ks7010-y	     := michael_mic.o ks_hostif.o ks_wlan_net.o ks7010_sdio.o
drivers/staging/ks7010/TODO deleted +0 -36
deleted file mode 100644
index d393ca5..0000000
@@ -1,36 +0,0 @@
-KS7010 Linux driver
-===================
-
-This driver is based on source code from the Ben Nanonote extra repository [1]
-which is based on the original v007 release from Renesas [2]. Some more
-background info about the chipset can be found here [3] and here [4]. Thank
-you to all which already participated in cleaning up the driver so far!
-
-[1] http://projects.qi-hardware.com/index.php/p/openwrt-packages/source/tree/master/ks7010/src
-[2] http://downloads.qi-hardware.com/software/ks7010_sdio_v007.tar.bz2
-[3] http://en.qi-hardware.com/wiki/Ben_NanoNote_Wi-Fi
-[4] https://wikidevi.com/wiki/Renesas
-
-TODO
-----
-
-First a few words what not to do (at least not blindly):
-
-- don't be overly strict with the 80 char limit. Only if it REALLY makes the
-  code more readable
-
-Now the TODOs:
-
-- fix codechecker warnings (checkpatch, sparse, smatch). But PLEASE make sure
-  that you are not only silencing the warning but really fixing code. You
-  should understand the change you submit.
-- fix the 'card removal' event when card is inserted when booting
-- check what other upstream wireless mechanisms can be used instead of the
-  custom ones here
-- replace custom Michael MIC implementation with the kernel
-  implementation. This task is only required for a *clean* WEXT interface.
-
-Please send any patches to:
-Greg Kroah-Hartman <[email protected]>
-Wolfram Sang <[email protected]>
-Linux Driver Project Developer List <[email protected]>
drivers/staging/ks7010/eap_packet.h deleted +0 -144

144 lines not on this page · raw message

drivers/staging/ks7010/ks7010_sdio.c deleted +0 -1079

1,079 lines not on this page · raw message

drivers/staging/ks7010/ks7010_sdio.h deleted +0 -164

164 lines not on this page · raw message

drivers/staging/ks7010/ks_hostif.c deleted +0 -2638

1,562 lines not on this page · raw message

drivers/staging/ks7010/ks_hostif.h deleted +0 -685

685 lines not on this page · raw message

drivers/staging/ks7010/ks_wlan.h deleted +0 -514

514 lines not on this page · raw message

drivers/staging/ks7010/ks_wlan_ioctl.h deleted +0 -67

67 lines not on this page · raw message

drivers/staging/ks7010/ks_wlan_net.c deleted +0 -2999

2,999 lines not on this page · raw message

drivers/staging/ks7010/michael_mic.c deleted +0 -148

148 lines not on this page · raw message

drivers/staging/ks7010/michael_mic.h deleted +0 -25
deleted file mode 100644
index 758e429..0000000

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

drivers/staging/ks7010/wext/Kconfig new file +10 -0
new file mode 100644
index 0000000..0b92176

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

drivers/staging/ks7010/wext/Makefile new file +4 -0
new file mode 100644
index 0000000..69fcf8d

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

drivers/staging/ks7010/wext/TODO new file +36 -0
new file mode 100644
index 0000000..d393ca5

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

drivers/staging/ks7010/wext/eap_packet.h new file +144 -0

144 lines not on this page · raw message

drivers/staging/ks7010/wext/ks7010_sdio.c new file +1079 -0

1,079 lines not on this page · raw message

drivers/staging/ks7010/wext/ks7010_sdio.h new file +164 -0

164 lines not on this page · raw message

drivers/staging/ks7010/wext/ks_hostif.c new file +2638 -0

2,638 lines not on this page · raw message

drivers/staging/ks7010/wext/ks_hostif.h new file +685 -0

685 lines not on this page · raw message

drivers/staging/ks7010/wext/ks_wlan.h new file +514 -0

514 lines not on this page · raw message

drivers/staging/ks7010/wext/ks_wlan_ioctl.h new file +67 -0

67 lines not on this page · raw message

drivers/staging/ks7010/wext/ks_wlan_net.c new file +2999 -0

2,999 lines not on this page · raw message

drivers/staging/ks7010/wext/michael_mic.c new file +148 -0

148 lines not on this page · raw message

drivers/staging/ks7010/wext/michael_mic.h new file +25 -0
new file mode 100644
index 0000000..758e429

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

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

Signature · 1 line
2.7.4

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

#5 lore raw

RFC 3/3 MAINTAINERS: add maintainer entry for ks7010

In reply to Tobin C. Harding

Driver ks7010 does not currently have a maintainer.

Add maintainers entry for ks7010.

---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
index 9e98464..75250ee 100644
@@ -7429,6 +7429,13 @@ F:	Documentation/auxdisplay/ks0108
 F:	drivers/auxdisplay/ks0108.c
 F:	include/linux/ks0108.h
 
+KS7010 KEYSTREAM DRIVER
+M:      Tobin Harding <[email protected]>
+L:      [email protected]
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
+S:      Maintained
+F:      drivers/staging/ks7010/
+
 L3MDEV
 M:	David Ahern <[email protected]>
 L:	[email protected]
Signature · 1 line
2.7.4
#4 lore raw

RFC 2/3 staging: ks7010: add cfg80211 files

In reply to Tobin C. Harding

We are in the process of re-writing the current WEXT driver to use the cfg80211 configuration API. Currently driver root directory is empty. First step is to implement all the firmware interface in a single layer of abstraction, Firmware Interface Layer (FIL). We can add a skeleton implementation for most of the rest of the driver at the same time.

Add cfg80211 driver skeleton. Implement FIL.

---
 drivers/staging/ks7010/Makefile    |    6 +
 drivers/staging/ks7010/README.rst  |   73 ++
 drivers/staging/ks7010/TODO.rst    |   17 +
 drivers/staging/ks7010/cfg80211.c  |   45 ++
 drivers/staging/ks7010/cfg80211.h  |    9 +
 drivers/staging/ks7010/common.h    |   10 +
 drivers/staging/ks7010/eap.h       |   36 +
 drivers/staging/ks7010/fil.c       | 1294 ++++++++++++++++++++++++++++++++++++
 drivers/staging/ks7010/fil.h       |  527 +++++++++++++++
 drivers/staging/ks7010/fil_types.h |  845 +++++++++++++++++++++++
 drivers/staging/ks7010/hif.c       |  104 +++
 drivers/staging/ks7010/hif.h       |   23 +
 drivers/staging/ks7010/ks7010.h    |   94 +++
 drivers/staging/ks7010/main.c      |  122 ++++
 drivers/staging/ks7010/sdio.c      |  399 +++++++++++
 drivers/staging/ks7010/sdio.h      |   86 +++
 drivers/staging/ks7010/tx.c        |   29 +
 17 files changed, 3719 insertions(+)
 create mode 100644 drivers/staging/ks7010/README.rst
 create mode 100644 drivers/staging/ks7010/TODO.rst
 create mode 100644 drivers/staging/ks7010/cfg80211.c
 create mode 100644 drivers/staging/ks7010/cfg80211.h
 create mode 100644 drivers/staging/ks7010/common.h
 create mode 100644 drivers/staging/ks7010/eap.h
 create mode 100644 drivers/staging/ks7010/fil.c
 create mode 100644 drivers/staging/ks7010/fil.h
 create mode 100644 drivers/staging/ks7010/fil_types.h
 create mode 100644 drivers/staging/ks7010/hif.c
 create mode 100644 drivers/staging/ks7010/hif.h
 create mode 100644 drivers/staging/ks7010/ks7010.h
 create mode 100644 drivers/staging/ks7010/main.c
 create mode 100644 drivers/staging/ks7010/sdio.c
 create mode 100644 drivers/staging/ks7010/sdio.h
 create mode 100644 drivers/staging/ks7010/tx.c
drivers/staging/ks7010/Makefile +6 -0
index f58cf9a..29c46db 100644
@@ -1 +1,7 @@
 obj-$(CONFIG_KS7010) += ks7010.o
+ks7010-y	     += main.o
+ks7010-y	     += tx.o
+ks7010-y	     += sdio.o
+ks7010-y	     += cfg80211.o
+ks7010-y	     += fil.o
+ks7010-y	     += hif.o
drivers/staging/ks7010/README.rst new file +73 -0

73 lines not on this page · raw message

drivers/staging/ks7010/TODO.rst new file +17 -0
new file mode 100644
index 0000000..8268855
@@ -0,0 +1,17 @@
+======
+TODO's
+======
+
+- Clear the FIXME's (in source files).
+- Clear the TODO's (in source files).
+- Implement cfg80211
+- Implement SDIO
+- Implement HIF (includes manually doing MIC for TKIP).
+- Implement init/cleanup functions at each layer (including probe/remove).
+- Implement tx/rx data paths.
+
+Please send patches to:
+Greg Kroah-Hartman <[email protected]>
+Wolfram Sang <[email protected]>
+Tobin C. Harding <[email protected]>
+Linux Driver Project Developer List <[email protected]>
drivers/staging/ks7010/cfg80211.c new file +45 -0

45 lines not on this page · raw message

drivers/staging/ks7010/cfg80211.h new file +9 -0
new file mode 100644
index 0000000..ffad6cb
@@ -0,0 +1,9 @@
+#ifndef _KS7010_CFG80211_H
+#define _KS7010_CFG80211_H
+
+#include "common.h"
+
+struct ks7010 *ks7010_cfg80211_create(void);
+void ks7010_cfg80211_destroy(struct ks7010 *ks);
+
+#endif	/* _KS7010_CFG80211_H */
drivers/staging/ks7010/common.h new file +10 -0
new file mode 100644
index 0000000..f9df129
@@ -0,0 +1,10 @@
+#ifndef _KS7010_COMMON_H
+#define _KS7010_COMMON_H
+
+struct ks7010;
+
+#define MAX_U16_VAL 0xFFFF
+
+#define IE_MAX_SIZE 128
+
+#endif	/* _KS7010_COMMON_H */
drivers/staging/ks7010/eap.h new file +36 -0
new file mode 100644
index 0000000..58b8575
@@ -0,0 +1,36 @@
+#ifndef _KS7010_EAP_H
+#define _KS7010_EAP_H
+
+/*
+ * FIXME these headers may be defined in the kernel already?
+ */
+
+/**
+ * enum protocol_id - Ethernet frame protocol identity.
+ * @PROTO_ID_EAPOL: EAP over LAN (802.1X)
+ * @PROTO_ID_IP: Internet Protocol version 4
+ * @PROTO_ID_ARP: Address resolution protocol
+ */
+enum protocol_id {
+	PROTO_ID_EAPOL	= 0x888e,
+	PROTO_ID_IP	= 0x0800,
+	PROTO_ID_ARP	= 0x0806
+};
+
+#define OUI_SIZE 3
+
+/**
+ * struct snap_hdr - EAPOL on 802.11 SNAP header.
+ * @dsap: Destination Service Access Point.
+ * @ssap: Source Service Access Point.
+ * @cntl: Control, set to 0x03 for Unnumbered Information.
+ * @oui: Organizationally Unique Identifier.
+ */
+struct snap_hdr {
+	u8 dsap;
+	u8 ssap;
+	u8 cntl;
+	u8 oui[OUI_SIZE];
+} __packed;
+
+#endif	/* _KS7010_EAP_H */
drivers/staging/ks7010/fil.c new file +1294 -0

1,294 lines not on this page · raw message

drivers/staging/ks7010/fil.h new file +527 -0

527 lines not on this page · raw message

drivers/staging/ks7010/fil_types.h new file +845 -0

845 lines not on this page · raw message

drivers/staging/ks7010/hif.c new file +104 -0

104 lines not on this page · raw message

drivers/staging/ks7010/hif.h new file +23 -0
new file mode 100644
index 0000000..660aa73
@@ -0,0 +1,23 @@
+#ifndef _KS7010_HIF_H
+#define _KS7010_HIF_H
+
+#include <linux/compiler.h>
+#include <linux/skbuff.h>
+#include <linux/ieee80211.h>
+
+#include "common.h"
+
+int ks7010_hif_tx(struct ks7010 *ks, struct sk_buff *skb);
+void ks7010_hif_rx(struct ks7010 *ks, u8 *data, size_t data_size);
+
+void ks7010_hif_set_power_mgmt_active(struct ks7010 *ks);
+void ks7010_hif_set_power_mgmt_sleep(struct ks7010 *ks);
+void ks7010_hif_set_power_mgmt_deep_sleep(struct ks7010 *ks);
+
+void ks7010_hif_init(struct ks7010 *ks);
+void ks7010_hif_cleanup(struct ks7010 *ks);
+
+void ks7010_hif_create(struct ks7010 *ks);
+void ks7010_hif_destroy(struct ks7010 *ks);
+
+#endif	/* _KS7010_HIF_H */
drivers/staging/ks7010/ks7010.h new file +94 -0

10 lines not on this page · raw message

drivers/staging/ks7010/main.c new file +122 -0

122 lines not on this page · raw message

drivers/staging/ks7010/sdio.c new file +399 -0

399 lines not on this page · raw message

drivers/staging/ks7010/sdio.h new file +86 -0

86 lines not on this page · raw message

drivers/staging/ks7010/tx.c new file +29 -0
new file mode 100644
index 0000000..98446a2

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

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

Signature · 1 line
2.7.4

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

#2 lore raw

Re: [RFC 1/3] staging: ks7010: move WEXT files to sub directory

In reply to Tobin C. Harding
Quoted 54 lines · Tobin C. Harding

Current driver implements the WEXT interface. WEXT is in maintenance mode, we need to re-write the driver using cfg80211. The current driver is handy as a reference for the new implementation, we can keep it in tree for now.

Move WEXT driver to sub directory, add dummy Makefile and Kconfig so build completes successfully but does not process any files from the WEXT directory.

---
 drivers/staging/ks7010/Kconfig              |    6 +-
 drivers/staging/ks7010/Makefile             |    3 -
 drivers/staging/ks7010/TODO                 |   36 -
 drivers/staging/ks7010/eap_packet.h         |  144 --
 drivers/staging/ks7010/ks7010_sdio.c        | 1079 ----------
 drivers/staging/ks7010/ks7010_sdio.h        |  164 --
 drivers/staging/ks7010/ks_hostif.c          | 2638 -----------------------
 drivers/staging/ks7010/ks_hostif.h          |  685 ------
 drivers/staging/ks7010/ks_wlan.h            |  514 -----
 drivers/staging/ks7010/ks_wlan_ioctl.h      |   67 -
 drivers/staging/ks7010/ks_wlan_net.c        | 2999 ---------------------------
 drivers/staging/ks7010/michael_mic.c        |  148 --
 drivers/staging/ks7010/michael_mic.h        |   25 -
 drivers/staging/ks7010/wext/Kconfig         |   10 +
 drivers/staging/ks7010/wext/Makefile        |    4 +
 drivers/staging/ks7010/wext/TODO            |   36 +
 drivers/staging/ks7010/wext/eap_packet.h    |  144 ++
 drivers/staging/ks7010/wext/ks7010_sdio.c   | 1079 ++++++++++
 drivers/staging/ks7010/wext/ks7010_sdio.h   |  164 ++
 drivers/staging/ks7010/wext/ks_hostif.c     | 2638 +++++++++++++++++++++++
 drivers/staging/ks7010/wext/ks_hostif.h     |  685 ++++++
 drivers/staging/ks7010/wext/ks_wlan.h       |  514 +++++
 drivers/staging/ks7010/wext/ks_wlan_ioctl.h |   67 +
 drivers/staging/ks7010/wext/ks_wlan_net.c   | 2999 +++++++++++++++++++++++++++
 drivers/staging/ks7010/wext/michael_mic.c   |  148 ++
 drivers/staging/ks7010/wext/michael_mic.h   |   25 +
 26 files changed, 8514 insertions(+), 8507 deletions(-)
 delete mode 100644 drivers/staging/ks7010/TODO
 delete mode 100644 drivers/staging/ks7010/eap_packet.h
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.c
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.h
 delete mode 100644 drivers/staging/ks7010/ks_hostif.c
 delete mode 100644 drivers/staging/ks7010/ks_hostif.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_ioctl.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_net.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.h
 create mode 100644 drivers/staging/ks7010/wext/Kconfig
 create mode 100644 drivers/staging/ks7010/wext/Makefile
 create mode 100644 drivers/staging/ks7010/wext/TODO
 create mode 100644 drivers/staging/ks7010/wext/eap_packet.h
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.c
Quoted 8 lines
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.h
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.c
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_ioctl.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_net.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.h

Please use the -M option to 'git format-patch" so that we can just see file moves, not delete/add like you have here.

thanks,

greg k-h

#6 lore raw

Re: [RFC 3/3] MAINTAINERS: add maintainer entry for ks7010

In reply to Tobin C. Harding
Quoted 14 lines · Tobin C. Harding

Driver ks7010 does not currently have a maintainer.

Add maintainers entry for ks7010.

---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)
MAINTAINERS +0 -0
index 9e98464..75250ee 100644

MAINTAINERS F: Documentation/auxdisplay/ks0108 · line 7437

Quoted 9 lines
MAINTAINERS +6 -0
@@ -7429,6 +7429,13 @@ F:	Documentation/auxdisplay/ks0108
 F:	drivers/auxdisplay/ks0108.c
 F:	include/linux/ks0108.h
 
+KS7010 KEYSTREAM DRIVER
+M:      Tobin Harding <[email protected]>
+L:      [email protected]
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
+S:      Maintained
+F:      drivers/staging/ks7010/

All tabs please :)

#7 lore raw

Re: [RFC 3/3] MAINTAINERS: add maintainer entry for ks7010

Quoted 2 lines · Greg KH
Quoted 1 line · Tobin C. Harding

Add maintainers entry for ks7010.

[]

Quoted 1 line

MAINTAINERS

Quoted 1 line
MAINTAINERS +0 -0

[]

Quoted 4 lines
Quoted 4 lines
MAINTAINERS +0 -0
@@ -7429,6 +7429,13 @@ F:	Documentation/auxdisplay/ks0108
 F:	drivers/auxdisplay/ks0108.c
 F:	include/linux/ks0108.h
 
Quoted 8 lines

MAINTAINERS F: Documentation/auxdisplay/ks0108 · line 7437

Quoted 6 lines
MAINTAINERS +6 -0
+KS7010 KEYSTREAM DRIVER
+M:      Tobin Harding <[email protected]>
+L:      [email protected]
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
+S:      Maintained
+F:      drivers/staging/ks7010/

All tabs please :)

Right. Perhaps someone could do:

$ sed -r -i -e "s/^([A-Z]):\s*/\1:\t/" MAINTAINERS

For today's -next, that gives:

---
 MAINTAINERS | 122 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 61 insertions(+), 61 deletions(-)
MAINTAINERS +61 -61
index a4d082acb458..335a18e9785b 100644
@@ -1080,7 +1080,7 @@ S:	Maintained
 F:	arch/arm/mach-meson/
 F:	arch/arm/boot/dts/meson*
 F:	arch/arm64/boot/dts/amlogic/
-F: 	drivers/pinctrl/meson/
+F:	drivers/pinctrl/meson/
 F:	drivers/mmc/host/meson*
 N:	meson
 
@@ -3101,14 +3101,14 @@ S:	Supported
 F:	drivers/mmc/host/cavium*
 
 CAVIUM LIQUIDIO NETWORK DRIVER
-M:     Derek Chickles <[email protected]>
-M:     Satanand Burla <[email protected]>
-M:     Felix Manlunas <[email protected]>
-M:     Raghu Vatsavayi <[email protected]>
-L:     [email protected]
-W:     http://www.cavium.com
-S:     Supported
-F:     drivers/net/ethernet/cavium/liquidio/
+M:	Derek Chickles <[email protected]>
+M:	Satanand Burla <[email protected]>
+M:	Felix Manlunas <[email protected]>
+M:	Raghu Vatsavayi <[email protected]>
+L:	[email protected]
+W:	http://www.cavium.com
+S:	Supported
+F:	drivers/net/ethernet/cavium/liquidio/
 
 CAVIUM OCTEON-TX CRYPTO DRIVER
 M:	George Cherian <[email protected]>
@@ -4327,14 +4327,14 @@ F:	include/uapi/drm/i915_drm.h
 F:	Documentation/gpu/i915.rst
 
 INTEL GVT-g DRIVERS (Intel GPU Virtualization)
-M:      Zhenyu Wang <[email protected]>
-M:      Zhi Wang <[email protected]>
-L:      [email protected]
-L:      [email protected]
-W:      https://01.org/igvt-g
-T:      git https://github.com/01org/gvt-linux.git
-S:      Supported
-F:      drivers/gpu/drm/i915/gvt/
+M:	Zhenyu Wang <[email protected]>
+M:	Zhi Wang <[email protected]>
+L:	[email protected]
+L:	[email protected]
+W:	https://01.org/igvt-g
+T:	git https://github.com/01org/gvt-linux.git
+S:	Supported
+F:	drivers/gpu/drm/i915/gvt/
 
 DRM DRIVERS FOR ATMEL HLCDC
 M:	Boris Brezillon <[email protected]>
@@ -4933,10 +4933,10 @@ F:	drivers/edac/skx_edac.c
 
 EDAC-XGENE
 APPLIED MICRO (APM) X-GENE SOC EDAC
-M:     Loc Ho <[email protected]>
-S:     Supported
-F:     drivers/edac/xgene_edac.c
-F:     Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
+M:	Loc Ho <[email protected]>
+S:	Supported
+F:	drivers/edac/xgene_edac.c
+F:	Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
 
 EDIROL UA-101/UA-1000 DRIVER
 M:	Clemens Ladisch <[email protected]>
@@ -6778,11 +6778,11 @@ F:	drivers/net/ethernet/intel/
 F:	drivers/net/ethernet/intel/*/
 
 INTEL RDMA RNIC DRIVER
-M:     Faisal Latif <[email protected]>
-M:     Shiraz Saleem <[email protected]>
-L:     [email protected]
-S:     Supported
-F:     drivers/infiniband/hw/i40iw/
+M:	Faisal Latif <[email protected]>
+M:	Shiraz Saleem <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	drivers/infiniband/hw/i40iw/
 
 INTEL MERRIFIELD GPIO DRIVER
 M:	Andy Shevchenko <[email protected]>
@@ -6867,7 +6867,7 @@ W:	http://software.intel.com/en-us/mic-developer
 F:	include/linux/mic_bus.h
 F:	include/linux/scif.h
 F:	include/uapi/linux/mic_common.h
-F: 	include/uapi/linux/mic_ioctl.h
+F:	include/uapi/linux/mic_ioctl.h
 F:	include/uapi/linux/scif_ioctl.h
 F:	drivers/misc/mic/
 F:	drivers/dma/mic_x100_dma.c
@@ -8393,10 +8393,10 @@ F:	drivers/leds/leds-mlxcpld.c
 F:	Documentation/leds/leds-mlxcpld.txt
 
 MELLANOX PLATFORM DRIVER
-M:      Vadim Pasternak <[email protected]>
-L:      [email protected]
-S:      Supported
-F:      drivers/platform/x86/mlx-platform.c
+M:	Vadim Pasternak <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	drivers/platform/x86/mlx-platform.c
 
 MELLANOX MLX CPLD HOTPLUG DRIVER
 M:	Vadim Pasternak <[email protected]>
@@ -9677,11 +9677,11 @@ F:	Documentation/mn10300/
 F:	arch/mn10300/
 
 PARALLEL LCD/KEYPAD PANEL DRIVER
-M:      Willy Tarreau <[email protected]>
-M:      Ksenija Stanojevic <[email protected]>
-S:      Odd Fixes
-F:      Documentation/misc-devices/lcd-panel-cgram.txt
-F:      drivers/misc/panel.c
+M:	Willy Tarreau <[email protected]>
+M:	Ksenija Stanojevic <[email protected]>
+S:	Odd Fixes
+F:	Documentation/misc-devices/lcd-panel-cgram.txt
+F:	drivers/misc/panel.c
 
 PARALLEL PORT SUBSYSTEM
 M:	Sudip Mukherjee <[email protected]>
@@ -10002,11 +10002,11 @@ F:	Documentation/devicetree/bindings/pci/rockchip-pcie.txt
 F:	drivers/pci/host/pcie-rockchip.c
 
 PCIE DRIVER FOR QUALCOMM MSM
-M:     Stanimir Varbanov <[email protected]>
-L:     [email protected]
-L:     [email protected]
-S:     Maintained
-F:     drivers/pci/dwc/*qcom*
+M:	Stanimir Varbanov <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/pci/dwc/*qcom*
 
 PCIE DRIVER FOR CAVIUM THUNDERX
 M:	David Daney <[email protected]>
@@ -10176,14 +10176,14 @@ S:	Maintained
 F:	drivers/pinctrl/spear/
 
 PISTACHIO SOC SUPPORT
-M:      James Hartley <[email protected]>
-M:      Ionela Voinescu <[email protected]>
-L:      [email protected]
-S:      Maintained
-F:      arch/mips/pistachio/
-F:      arch/mips/include/asm/mach-pistachio/
-F:      arch/mips/boot/dts/img/pistachio*
-F:      arch/mips/configs/pistachio*_defconfig
+M:	James Hartley <[email protected]>
+M:	Ionela Voinescu <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	arch/mips/pistachio/
+F:	arch/mips/include/asm/mach-pistachio/
+F:	arch/mips/boot/dts/img/pistachio*
+F:	arch/mips/configs/pistachio*_defconfig
 
 PKTCDVD DRIVER
 S:	Orphan
@@ -10667,12 +10667,12 @@ 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
+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
 
 RADOS BLOCK DEVICE (RBD)
 M:	Ilya Dryomov <[email protected]>
@@ -13686,12 +13686,12 @@ F:	drivers/virtio/virtio_input.c
 F:	include/uapi/linux/virtio_input.h
 
 VIRTIO CRYPTO DRIVER
-M:  Gonglei <[email protected]>
-L:  [email protected]
-L:  [email protected]
-S:  Maintained
-F:  drivers/crypto/virtio/
-F:  include/uapi/linux/virtio_crypto.h
+M:	Gonglei <[email protected]>
+L:	[email protected]
+L:	[email protected]
+S:	Maintained
+F:	drivers/crypto/virtio/
+F:	include/uapi/linux/virtio_crypto.h
 
 VIA RHINE NETWORK DRIVER
 S:	Orphan
#3 lore raw

Re: [RFC 1/3] staging: ks7010: move WEXT files to sub directory

In reply to Greg KH
Quoted 64 lines · Greg KH
Quoted 54 lines · Tobin C. Harding

Current driver implements the WEXT interface. WEXT is in maintenance mode, we need to re-write the driver using cfg80211. The current driver is handy as a reference for the new implementation, we can keep it in tree for now.

Move WEXT driver to sub directory, add dummy Makefile and Kconfig so build completes successfully but does not process any files from the WEXT directory.

---
 drivers/staging/ks7010/Kconfig              |    6 +-
 drivers/staging/ks7010/Makefile             |    3 -
 drivers/staging/ks7010/TODO                 |   36 -
 drivers/staging/ks7010/eap_packet.h         |  144 --
 drivers/staging/ks7010/ks7010_sdio.c        | 1079 ----------
 drivers/staging/ks7010/ks7010_sdio.h        |  164 --
 drivers/staging/ks7010/ks_hostif.c          | 2638 -----------------------
 drivers/staging/ks7010/ks_hostif.h          |  685 ------
 drivers/staging/ks7010/ks_wlan.h            |  514 -----
 drivers/staging/ks7010/ks_wlan_ioctl.h      |   67 -
 drivers/staging/ks7010/ks_wlan_net.c        | 2999 ---------------------------
 drivers/staging/ks7010/michael_mic.c        |  148 --
 drivers/staging/ks7010/michael_mic.h        |   25 -
 drivers/staging/ks7010/wext/Kconfig         |   10 +
 drivers/staging/ks7010/wext/Makefile        |    4 +
 drivers/staging/ks7010/wext/TODO            |   36 +
 drivers/staging/ks7010/wext/eap_packet.h    |  144 ++
 drivers/staging/ks7010/wext/ks7010_sdio.c   | 1079 ++++++++++
 drivers/staging/ks7010/wext/ks7010_sdio.h   |  164 ++
 drivers/staging/ks7010/wext/ks_hostif.c     | 2638 +++++++++++++++++++++++
 drivers/staging/ks7010/wext/ks_hostif.h     |  685 ++++++
 drivers/staging/ks7010/wext/ks_wlan.h       |  514 +++++
 drivers/staging/ks7010/wext/ks_wlan_ioctl.h |   67 +
 drivers/staging/ks7010/wext/ks_wlan_net.c   | 2999 +++++++++++++++++++++++++++
 drivers/staging/ks7010/wext/michael_mic.c   |  148 ++
 drivers/staging/ks7010/wext/michael_mic.h   |   25 +
 26 files changed, 8514 insertions(+), 8507 deletions(-)
 delete mode 100644 drivers/staging/ks7010/TODO
 delete mode 100644 drivers/staging/ks7010/eap_packet.h
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.c
 delete mode 100644 drivers/staging/ks7010/ks7010_sdio.h
 delete mode 100644 drivers/staging/ks7010/ks_hostif.c
 delete mode 100644 drivers/staging/ks7010/ks_hostif.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_ioctl.h
 delete mode 100644 drivers/staging/ks7010/ks_wlan_net.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.c
 delete mode 100644 drivers/staging/ks7010/michael_mic.h
 create mode 100644 drivers/staging/ks7010/wext/Kconfig
 create mode 100644 drivers/staging/ks7010/wext/Makefile
 create mode 100644 drivers/staging/ks7010/wext/TODO
 create mode 100644 drivers/staging/ks7010/wext/eap_packet.h
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.c
Quoted 8 lines
 create mode 100644 drivers/staging/ks7010/wext/ks7010_sdio.h
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.c
 create mode 100644 drivers/staging/ks7010/wext/ks_hostif.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_ioctl.h
 create mode 100644 drivers/staging/ks7010/wext/ks_wlan_net.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.c
 create mode 100644 drivers/staging/ks7010/wext/michael_mic.h
Quoted 2 lines

Please use the -M option to 'git format-patch" so that we can just see file moves, not delete/add like you have here.

Point noted, will submit v2 using -M option. This is the second time you have told me this, that means I have to buy you a beer doesn't it?

Will follow the 'wait a day before submitting next version' rule.

thanks,
Tobin.

#8 lore raw

Re: [RFC 3/3] MAINTAINERS: add maintainer entry for ks7010

In reply to Greg KH
Quoted 18 lines · Greg KH
Quoted 17 lines · Tobin C. Harding

Driver ks7010 does not currently have a maintainer.

Add maintainers entry for ks7010.

---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)
MAINTAINERS +0 -0
index 9e98464..75250ee 100644
@@ -7429,6 +7429,13 @@ F:	Documentation/auxdisplay/ks0108
 F:	drivers/auxdisplay/ks0108.c
 F:	include/linux/ks0108.h
 
Quoted 8 lines

MAINTAINERS F: Documentation/auxdisplay/ks0108 · line 7437

Quoted 6 lines
MAINTAINERS +6 -0
+KS7010 KEYSTREAM DRIVER
+M:      Tobin Harding <[email protected]>
+L:      [email protected]
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
+S:      Maintained
+F:      drivers/staging/ks7010/

All tabs please :)

Will fix in v2.

thanks,
Tobin.