[PATCH 00/20] Add support for Silicon Labs WiFi chip WF200 and further

From: Jerome Pouiller
Date: Thu Sep 19 2019 - 06:52:40 EST


From: JÃrÃme Pouiller <jerome.pouiller@xxxxxxxxxx>

Hello all,

This series add support for Silicon Labs WiFi chip WF200 and further:

https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf

This driver is an export from:

https://github.com/SiliconLabs/wfx-linux-driver/

I squashed all commits from github (it definitely does not make sense to
import history). Then I split it in comprehensible (at least try to be)
commits. I hope it will help readers to understand driver architecture.
IMHO, firsts commits are clean enough to be reviewed. Things get more
difficult when I introduce mac8011 API. I tried to extract important
parts like Rx/Tx process but, big and complex patches seem unavoidable
in this part.

Architecture itself is described in commit messages.

The series below is aligned on version 2.3.1 on github. If compare this
series with github, you will find traditional differences between
external and a in-tree driver: Documentation, build infrastructure,
etc... In add, I dropped all code in CONFIG_WFX_SECURE_LINK. Indeed,
"Secure Link" feature depends on mbedtls and I don't think to pull
mbedtls in kernel is an option (see "To be done" below).


What need to be done in this driver to leave staging area?

- I kept wfx_version.h in order to ensure synchronization with github
waiting for development goes entirely in kernel
- I also kept compatibility code for earlier Linux kernel version. I
may drop it in future. Maybe I will maintain compatibility with
older kernels in a external set of patches.
- I have to make decision about secure link support. I can:
- drop completely
- keep it in an external patch (my preferred option)
- replace call to mbedtls with kernel crypto API (necessitate a
bunch of work)
- pull mbedtls in kernel (non-realistic)
- mac80211 interface does not (yet) have expected quality to be placed
outside of staging:
- Some processings are redundant with mac80211 ones
- Many members from wfx_dev/wfx_vif can be retrieved from mac80211
structures
- Some functions are too complex
- ...

JÃrÃme Pouiller (20):
staging: wfx: add infrastructure for new driver
staging: wfx: add support for I/O access
staging: wfx: add I/O API
staging: wfx: add tracepoints for I/O access
staging: wfx: load firmware
staging: wfx: import HIF API headers
staging: wfx: add IRQ handling
staging: wfx: add tracepoints for HIF
staging: wfx: add support for start-up indication
staging: wfx: instantiate mac80211 data
staging: wfx: allow to send commands to chip
staging: wfx: add HIF commands helpers
staging: wfx: introduce "secure link"
staging: wfx: setup initial chip configuration
staging: wfx: add debug files and trace debug events
staging: wfx: allow to send 802.11 frames
staging: wfx: allow to receive 802.11 frames
staging: wfx: allow to scan networks
staging: wfx: implement 802.11 key handling
staging: wfx: implement the rest of mac80211 API

MAINTAINERS | 5 +
drivers/staging/Kconfig | 2 +
drivers/staging/Makefile | 1 +
.../bindings/net/wireless/siliabs,wfx.txt | 97 +
drivers/staging/wfx/Kconfig | 7 +
drivers/staging/wfx/Makefile | 24 +
drivers/staging/wfx/bh.c | 316 ++++
drivers/staging/wfx/bh.h | 32 +
drivers/staging/wfx/bus.h | 34 +
drivers/staging/wfx/bus_sdio.c | 268 +++
drivers/staging/wfx/bus_spi.c | 335 ++++
drivers/staging/wfx/data_rx.c | 213 +++
drivers/staging/wfx/data_rx.h | 18 +
drivers/staging/wfx/data_tx.c | 799 ++++++++
drivers/staging/wfx/data_tx.h | 93 +
drivers/staging/wfx/debug.c | 322 ++++
drivers/staging/wfx/debug.h | 19 +
drivers/staging/wfx/fwio.c | 397 ++++
drivers/staging/wfx/fwio.h | 15 +
drivers/staging/wfx/hif_api_cmd.h | 681 +++++++
drivers/staging/wfx/hif_api_general.h | 437 +++++
drivers/staging/wfx/hif_api_mib.h | 558 ++++++
drivers/staging/wfx/hif_rx.c | 336 ++++
drivers/staging/wfx/hif_rx.h | 18 +
drivers/staging/wfx/hif_tx.c | 470 +++++
drivers/staging/wfx/hif_tx.h | 67 +
drivers/staging/wfx/hif_tx_mib.h | 281 +++
drivers/staging/wfx/hwio.c | 338 ++++
drivers/staging/wfx/hwio.h | 75 +
drivers/staging/wfx/key.c | 272 +++
drivers/staging/wfx/key.h | 22 +
drivers/staging/wfx/main.c | 504 +++++
drivers/staging/wfx/main.h | 48 +
drivers/staging/wfx/queue.c | 606 ++++++
drivers/staging/wfx/queue.h | 59 +
drivers/staging/wfx/scan.c | 298 +++
drivers/staging/wfx/scan.h | 42 +
drivers/staging/wfx/secure_link.h | 46 +
drivers/staging/wfx/sta.c | 1682 +++++++++++++++++
drivers/staging/wfx/sta.h | 116 ++
drivers/staging/wfx/traces.h | 439 +++++
drivers/staging/wfx/wfx.h | 234 +++
drivers/staging/wfx/wfx_version.h | 3 +
43 files changed, 10629 insertions(+)
create mode 100644 drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt
create mode 100644 drivers/staging/wfx/Kconfig
create mode 100644 drivers/staging/wfx/Makefile
create mode 100644 drivers/staging/wfx/bh.c
create mode 100644 drivers/staging/wfx/bh.h
create mode 100644 drivers/staging/wfx/bus.h
create mode 100644 drivers/staging/wfx/bus_sdio.c
create mode 100644 drivers/staging/wfx/bus_spi.c
create mode 100644 drivers/staging/wfx/data_rx.c
create mode 100644 drivers/staging/wfx/data_rx.h
create mode 100644 drivers/staging/wfx/data_tx.c
create mode 100644 drivers/staging/wfx/data_tx.h
create mode 100644 drivers/staging/wfx/debug.c
create mode 100644 drivers/staging/wfx/debug.h
create mode 100644 drivers/staging/wfx/fwio.c
create mode 100644 drivers/staging/wfx/fwio.h
create mode 100644 drivers/staging/wfx/hif_api_cmd.h
create mode 100644 drivers/staging/wfx/hif_api_general.h
create mode 100644 drivers/staging/wfx/hif_api_mib.h
create mode 100644 drivers/staging/wfx/hif_rx.c
create mode 100644 drivers/staging/wfx/hif_rx.h
create mode 100644 drivers/staging/wfx/hif_tx.c
create mode 100644 drivers/staging/wfx/hif_tx.h
create mode 100644 drivers/staging/wfx/hif_tx_mib.h
create mode 100644 drivers/staging/wfx/hwio.c
create mode 100644 drivers/staging/wfx/hwio.h
create mode 100644 drivers/staging/wfx/key.c
create mode 100644 drivers/staging/wfx/key.h
create mode 100644 drivers/staging/wfx/main.c
create mode 100644 drivers/staging/wfx/main.h
create mode 100644 drivers/staging/wfx/queue.c
create mode 100644 drivers/staging/wfx/queue.h
create mode 100644 drivers/staging/wfx/scan.c
create mode 100644 drivers/staging/wfx/scan.h
create mode 100644 drivers/staging/wfx/secure_link.h
create mode 100644 drivers/staging/wfx/sta.c
create mode 100644 drivers/staging/wfx/sta.h
create mode 100644 drivers/staging/wfx/traces.h
create mode 100644 drivers/staging/wfx/wfx.h
create mode 100644 drivers/staging/wfx/wfx_version.h

--
2.20.1

--
JÃrÃme Pouiller
Silicon Labs