[PATCH v9 04/24] wfx: add wfx.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/wfx.h | 166 ++ 1 file changed, 166 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/wfx.h diff --git a/drivers/net/wireless/silabs/wfx/wfx.h b/drivers/net/wireles

[PATCH v9 05/24] wfx: add main.c/main.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/main.c | 485 + drivers/net/wireless/silabs/wfx/main.h | 42 +++ 2 files changed, 527 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/main.c create mode 100644 dr

[PATCH v9 06/24] wfx: add bus.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/bus.h | 36 +++ 1 file changed, 36 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/bus.h diff --git a/drivers/net/wireless/silabs/wfx/bus.h b/drivers/net/wireless

[PATCH v9 07/24] wfx: add bus_spi.c

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/bus_spi.c | 297 ++ 1 file changed, 297 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/bus_spi.c diff --git a/drivers/net/wireless/silabs/wfx/bus_spi.c b/drivers/net

[PATCH v9 08/24] wfx: add bus_sdio.c

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/bus_sdio.c | 283 + 1 file changed, 283 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/bus_sdio.c diff --git a/drivers/net/wireless/silabs/wfx/bus_sdio.c b/drivers/n

[PATCH v9 09/24] wfx: add hwio.c/hwio.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/hwio.c | 335 + drivers/net/wireless/silabs/wfx/hwio.h | 78 ++ 2 files changed, 413 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/hwio.c create mode 100644

[PATCH v9 10/24] wfx: add fwio.c/fwio.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/fwio.c | 390 + drivers/net/wireless/silabs/wfx/fwio.h | 15 + 2 files changed, 405 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/fwio.c create mode 100644 driv

[PATCH v9 11/24] wfx: add bh.c/bh.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/bh.c | 323 +++ drivers/net/wireless/silabs/wfx/bh.h | 34 +++ 2 files changed, 357 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/bh.c create mode 100644 driver

[PATCH v9 12/24] wfx: add hif_api_*.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/hif_api_cmd.h | 554 ++ .../net/wireless/silabs/wfx/hif_api_general.h | 252 drivers/net/wireless/silabs/wfx/hif_api_mib.h | 346 +++ 3 files changed, 1152 insertions(+) cr

[PATCH v9 13/24] wfx: add hif_tx*.c/hif_tx*.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/hif_tx.c | 492 +++ drivers/net/wireless/silabs/wfx/hif_tx.h | 61 +++ drivers/net/wireless/silabs/wfx/hif_tx_mib.c | 308 drivers/net/wireless/silabs/wfx/hif_tx_mib.h

[PATCH v9 14/24] wfx: add key.c/key.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/key.c | 227 ++ drivers/net/wireless/silabs/wfx/key.h | 19 +++ 2 files changed, 246 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/key.c create mode 100644 driv

[PATCH v9 15/24] wfx: add hif_rx.c/hif_rx.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/hif_rx.c | 392 +++ drivers/net/wireless/silabs/wfx/hif_rx.h | 17 + 2 files changed, 409 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/hif_rx.c create mode 100644

[PATCH v9 16/24] wfx: add data_rx.c/data_rx.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/data_rx.c | 92 +++ drivers/net/wireless/silabs/wfx/data_rx.h | 17 + 2 files changed, 109 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/data_rx.c create mode 10

[PATCH v9 17/24] wfx: add queue.c/queue.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/queue.c | 298 drivers/net/wireless/silabs/wfx/queue.h | 44 2 files changed, 342 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/queue.c create mode 100644

[PATCH v9 18/24] wfx: add data_tx.c/data_tx.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/data_tx.c | 572 ++ drivers/net/wireless/silabs/wfx/data_tx.h | 66 +++ 2 files changed, 638 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/data_tx.c create mode 100

[PATCH v9 19/24] wfx: add sta.c/sta.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/sta.c | 798 ++ drivers/net/wireless/silabs/wfx/sta.h | 67 +++ 2 files changed, 865 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/sta.c create mode 100644 driv

[PATCH v9 20/24] wfx: add scan.c/scan.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/scan.c | 144 + drivers/net/wireless/silabs/wfx/scan.h | 22 2 files changed, 166 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/scan.c create mode 100644 d

[PATCH v9 21/24] wfx: add debug.c/debug.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/debug.c | 331 drivers/net/wireless/silabs/wfx/debug.h | 19 ++ 2 files changed, 350 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/debug.c create mode 100644 d

[PATCH v9 22/24] wfx: add traces.h

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/traces.h | 496 +++ 1 file changed, 496 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/traces.h diff --git a/drivers/net/wireless/silabs/wfx/traces.h b/drivers/net/w

[PATCH v9 24/24] wfx: get out from the staging area

2022-01-11 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver is now mature enough to leave the staging area. Signed-off-by: Jérôme Pouiller --- MAINTAINERS | 3 ++- drivers/net/wireless/Kconfig | 1 + drivers/net/wireless/Makefile| 1 + drivers/net/wireless/silabs/Kconfig

[PATCH 01/31] staging: wfx: fix Makefile and Kconfig licenses

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller License was missing in Kconfig. Makefile license was GPL-2.0 while rest of the driver use GPL-2.0-only. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Kconfig | 1 + drivers/staging/wfx/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 00/31] staging/wfx: apply suggestions from the linux-wireless review

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Most of the patches of this series are the result of the review process on linux-wireless[1]. The patches 1 to 25 are cosmetics. The last 3 patches are not fully backward compatible. I believe it is not a problem in the staging area. [1]: https://lore.kernel.org/netdev/20

[PATCH 02/31] staging: wfx: fix HIF API license

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Apache-2.0 is not allowed in the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 2 +- drivers/staging/wfx/hif_api_general.h | 2 +- drivers/staging/wfx/hif_api_mib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --g

[PATCH 03/31] staging: wfx: fix missing headers

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Each headers files should include every types it needs to compile (ie. "gcc $CFLAGS -xc file.h" should compile) Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 1 + drivers/staging/wfx/hif_tx.h | 4 drivers/staging/wfx/hif_tx_mib.h | 7 +

[PATCH 04/31] staging: wfx: fix comment correctness

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Using DMA with stack allocated buffers is not supported, whatever the value of CONFIG_VMAP_STACK. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 12 drivers/staging/wfx/hwio.h | 4 2 files changed, 4 insertions(+), 12 deletions(-) diff

[PATCH 05/31] staging: wfx: explain uncommon Makefile statement

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller I have got questions about this line from several reviewers. A comment is definitively welcome. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile

[PATCH 06/31] staging: wfx: remove unnecessary braces

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Braces are not necessary for single statement blocks Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 858d778cc589..ddc95ea1

[PATCH 07/31] staging: wfx: remove useless #ifdef

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller In the old days, this file was shared with other projects. Obviously, this "#ifdef __KERNEL__" have no reasons to be in the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/st

[PATCH 08/31] staging: wfx: use IS_ALIGNED()

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller It "IS_ALIGNED(ptr, 4)" is more explicit than "ptr & 3". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 9 + drivers/staging/wfx/hwio.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.

[PATCH 09/31] staging: wfx: replace magic value by WFX_HIF_BUFFER_SIZE

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Magic values are not recommended. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index a2a37efc51a6..977b9325f496 100644 --- a/

[PATCH 10/31] stagigg: wfx: replace magic number by HIF_ID_IS_INDICATION

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Magic values are not recommended. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 6963b54d5593..5e675d2c3e82 100644 --- a/

[PATCH 11/31] staging: wfx: preserve endianness of struct hif_ind_startup

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller The hardware fills struct hif_ind_startup with little endian values. So, declare it with little endian fields. It is now a bit more verbose to access to fields of struct hif_ind_startup, but it is less confusing. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.

[PATCH 13/31] staging: wfx: fix ambiguous function name

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller The prefix 'ieee80211' is reserved for mac80211. It should not been used. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c

[PATCH 12/31] staging: wfx: fix ambiguous function name

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller The prefix 'ieee80211' is reserved for mac80211. It should not been used. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index

[PATCH 14/31] staging: wfx: prefix functions from hif_*.h with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c| 2 +- drivers/staging/wfx/debug.c | 2 +- drivers/staging/wfx/hif_rx.c | 103 +- drivers/staging/wfx/hif_tx

[PATCH 16/31] staging: wfx: prefix functions from debug.h with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 6 +++--- drivers/staging/wfx/debug.h | 6 +++--- drivers/staging/wfx/hif_tx.c | 8 3 files changed, 10 insertions(+), 10 deletion

[PATCH 15/31] staging: wfx: prefix functions from hwio.h with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 8 +-- drivers/staging/wfx/fwio.c | 78 ++-- drivers/staging/wfx/hif_tx.c | 2 +- drivers/staging/wfx/hwio.c | 135

[PATCH 17/31] staging: wfx: prefix tx_policy_is_equal() with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller tx_policy_is_equal() was the only function from data_tx.c without the prefix wfx_. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/

[PATCH 19/31] staging: wfx: prefix structs tx_policy and hwbus_ops with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus.h | 2 +- drivers/staging/wfx/bus_sdio.c | 2 +- drivers/staging/wfx/bus_spi.c | 2 +- drivers/staging/wfx/data_tx.c | 38 +--

[PATCH 18/31] staging: wfx: prefix structs hif_* with wfx_

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 12 +-- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_rx.h | 4 +- drivers/staging/wfx/data_tx.c

[PATCH 21/31] staging: wfx: reformat comments on 100 columns

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write cod

[PATCH 20/31] staging: wfx: reformat code on 100 columns

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write cod

[PATCH 22/31] staging: wfx: fix structs alignments

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Some structs members were not properly aligned. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 12 ++--- drivers/staging/wfx/bus_spi.c | 12 ++--- drivers/staging/wfx/debug.c| 2 +- drivers/staging/wfx/fwio.c | 6 +-- drivers/staging/wfx/ma

[PATCH 23/31] staging: wfx: use explicit labels for errors

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Prefer fully named labels to handle errors instead of err0, err1, ... Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 9 - drivers/staging/wfx/main.c | 31 +++ 2 files changed, 19 insertions(+), 21 deletions(-)

[PATCH 24/31] staging: wfx: replace compiletime_assert() by BUILD_BUG_ON_MSG()

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller It seems that BUILD_BUG_ON_MSG() is a bit more popular. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index ca2f24b92d2

[PATCH 25/31] staging: wfx: do not display functions names in logs

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller It is not necessary to prefix error logs with the function name when an error message is unique in the code. Note this patch still prefixes the message 'received event for non-existent vif' with the function name since it is used several times. Signed-off-by: Jérôme Pouill

[PATCH 26/31] staging: wfx: remove force_ps_timeout

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller ps_timeout should be in nl80211, not in debugfs. Let's remove it until the driver is accepted. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 23 --- drivers/staging/wfx/main.c | 1 - drivers/staging/wfx/sta.c | 8 ++-- drive

[PATCH 27/31] staging: wfx: map 'compatible' attribute with board name

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller "WF200" only designates the chip. To make a WiFi board, the chip must be associated with an antenna. The antenna configuration is located in separate files (aka PDS files in Silabs wording). Currently, user has to write in his DT something like: compatible = "silabs,wf2

[PATCH 28/31] staging: wfx: fix firmware location

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller There is currently, a mismatch between the location of the firmware in linux-firmware and the path written in the driver. We take this opportunity to relocate the WF200 firmware in wfx/ instead of silabs/. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c

[PATCH 29/31] staging: wfx: drop legacy compatible values

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Values "silabs,wfx-sdio" and "silabs,wfx-spi" are deprecated for a while now. We take advantage of getting out of the staging tree to drop them and start from a blank sheet. Signed-off-by: Jérôme Pouiller --- .../devicetree/bindings/net/wireless/silabs,wfx.yaml | 3 +--

[PATCH 30/31] staging: wfx: rename "config-file" DT attribute

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller "config-file" is too broad. Replace it by "silabs,antenna-config-file" which is more explicit. The attribute "config-file" is probably not widely used. This patch obviously breaks setups that use this attribute. Signed-off-by: Jérôme Pouiller --- .../devicetree/bindings/

[PATCH 31/31] staging: wfx: do not probe the device if not in the DT

2022-01-13 Thread Jerome Pouiller
From: Jérôme Pouiller Since the WF200 VID/PID are not reliable, it's recommended to declare it in the DT. Until now, if the device was not declared, the driver just printed a warning and continue. But, the risk of a collision is too high, the driver now returns an error. Signed-off-by: Jérôme Po

[PATCH 2/2] staging: wfx: remove support for legacy PDS format

2022-02-11 Thread Jerome Pouiller
From: Jérôme Pouiller We don't want to support legacy PDS format. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 55 +++--- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c in

[PATCH 0/2] staging/wfx: change config files format

2022-02-11 Thread Jerome Pouiller
From: Jérôme Pouiller I have changed the format of the antenna configuration files, as discussed here: https://lore.kernel.org/netdev/4055223.VTxhiZFAix@pc-42/ Jérôme Pouiller (2): staging: wfx: allow new PDS format staging: wfx: remove support for legacy PDS format drivers/staging/wfx/m

[PATCH 1/2] staging: wfx: allow new PDS format

2022-02-11 Thread Jerome Pouiller
From: Jérôme Pouiller The device needs data about the antenna configuration. This information in provided by PDS (Platform Data Set, this is the wording used in WF200 documentation) files. Until now, the driver had to parse the PDS file before to send it. This solution was not acceptable for the

[PATCH 00/31] staging: wfx: fix last items of the TODO list

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Hello folks, This PR fixes most of the items of the TODO list associated to the wfx driver. Normally, my next PR will ask to move the wfx driver out of the staging area. Jérôme Pouiller (31): staging: wfx: improve readability of association processing staging: wfx: rel

[PATCH 05/31] staging: wfx: drop 'secure link' feature

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The Secure Link (slk) feature allows to encrypt (and authenticate) the traffic between the host and the device. The official implementation of this feature relies on mbedTLS. For that reason, this implementation is not included in the current driver. To be included, the impl

[PATCH 09/31] staging: wfx: drop useless union hif_commands_ids

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Union hif_commands_ids is unused. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 75e8c2a7fdf9..c132d8e43b50 100644 -

[PATCH 03/31] staging: wfx: simplify hif_set_association_mode()

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The file hif_tx_mib.c expects to contain functions that format messages for the hardware. It is unexpected to find function that manipulate RCU and structures from mac80211. Keep hif_set_association_mode() with the code necessary for message formatting and relocate the smar

[PATCH 01/31] staging: wfx: improve readability of association processing

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The statements in wfx_bss_info_changed() has no particular order. For better readability, group and sort the statements relative to the association processing. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 53 +++ 1 fi

[PATCH 07/31] staging: wfx: drop useless function

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Since the code for multicast filtering has been dropped, the function hif_set_data_filtering() is only called to disable multicast filtering. In fact, the multicast filtering is already disabled by default. So, this function is useless and can be dropped. Signed-off-by: Jér

[PATCH 20/31] staging: wfx: drop useless stricts only used in hif_req_start_scan_alt

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The structs hif_scan_type, hif_scan_flags and hif_auto_scan_param have no real reasons to exist (apart maybe defining namespaces). Moreover, the names of the fields within these structs are not all meaningful. Drop the structs and rename the fields. Signed-off-by: Jérôme P

[PATCH 06/31] staging: wfx: drop multicast filtering

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The device allows to filter multicast frames. The driver has the necessary code to take advantage of this feature. However, some bugs has been reported on this feature. So, it was temporary disabled. Finally, the things work well as-is for more than one year now. So there i

[PATCH 14/31] staging: wfx: drop useless struct hif_map_link_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_map_link_flags has no reason to exist. Drop it and simplify access to struct hif_req_map_link. Also rename the field 'map_direction' in 'unmap'. It is more meaningful and allows to drop enum hif_sta_map_direction. Signed-off-by: Jérôme Pouiller --- drivers/sta

[PATCH 17/31] staging: wfx: drop useless struct hif_rx_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_rx_flags has no reason to exist. Drop it and simplify access to struct hif_ind_rx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/hif_api_cmd.h | 25 ++--- 2 files changed, 11 insertions(+),

[PATCH 08/31] staging: wfx: drop useless enum hif_beacon

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Enum hif_beacon is not used. Moreover, it is just another definition of a boolean. Absolutely useless. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers

[PATCH 21/31] staging: wfx: drop useless structs only used in hif_ind_startup

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The structs hif_capabilities, hif_otp_regul_sel_mode_info and hif_otp_phy_info have no real reasons to exist. Drop them and simplify access to fields of struct hif_ind_startup. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 32 +

[PATCH 18/31] staging: wfx: drop useless struct hif_tx_result_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_tx_result_flags has no reason to exist. Drop it and simplify access to struct hif_cnf_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 3 +-- drivers/staging/wfx/hif_api_cmd.h | 16 ++-- 2 files changed, 7 insertions(+), 1

[PATCH 29/31] staging: wfx: uniformize naming rules in hif_tx_mib.c

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller hif_tx_mib.c contains functions that format data to be sent to the hardware. In this file, sometime the struct to be sent is named 'arg', sometime 'val'. In some other function 'val' is used for the argument of the function. This patch uniformize the things and choose to ca

[PATCH 22/31] staging: wfx: drop useless union hif_privacy_key_data

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The union hif_privacy_key_data is never used in the driver. So, it is not necessary to declare it separately from hif_req_add_key. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 24 +++- 1 file changed, 11 insertions(+), 13 dele

[PATCH 26/31] staging: wfx: drop macro API_SSID_SIZE

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The maximum length of a SSID is defined by 802.11 specification. It is already defined in mac80211: IEEE80211_MAX_SSID_LEN. Therefore, use this generic definition. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 8 +++- drivers/staging/wfx/h

[PATCH 10/31] staging: wfx: drop useless struct hif_reset_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_reset_flags has no reason to exist. Drop it and simplify access to struct hif_req_reset. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +++--- drivers/staging/wfx/hif_tx.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH 11/31] staging: wfx: drop useless struct hif_ie_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_ie_flags has no reason to exist. Drop it and simplify access to struct hif_req_update_ie. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 14 +- drivers/staging/wfx/hif_tx.c | 2 +- 2 files changed, 6 insertions(+), 10 d

[PATCH 12/31] staging: wfx: drop useless struct hif_join_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_join_flags has no reason to exist. Drop it and simplify access to struct hif_req_join. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/staging/w

[PATCH 02/31] staging: wfx: relocate wfx_join() beside wfx_join_finalize()

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_join() and wfx_join_finalize() are the two halves of the association process. Group them. In addition, for better uniformity of the code, rename wfx_do_join() in wfx_join(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 100 +++---

[PATCH 04/31] staging: wfx: keep API error list up-to-date

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller A new kind of error has appeared in API 3.4. The Linux driver is not concerned by this new error, but let's keep the API in sync with the firmware. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 1 + drivers/staging/wfx/hif_rx.c | 2 +

[PATCH 16/31] staging: wfx: drop useless struct hif_pm_mode

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_pm_mode has no reason to exist. Drop it and simplify access to struct hif_req_set_pm_mode. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +- drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions

[PATCH 13/31] staging: wfx: drop useless struct hif_bss_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_bss_flags has no reason to exist. In add, it is never used. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/stagi

[PATCH 15/31] staging: wfx: drop useless struct hif_suspend_resume_flags

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller Struct hif_suspend_resume_flags has no reason to exist. Drop it and simplify access to struct hif_ind_suspend_resume_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +- drivers/staging/wfx/hif_rx.c | 6 +++--- 2 files changed, 4 inser

[PATCH 31/31] staging: wfx: update TODO list

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The driver is now close to leave the staging directory. Update the TODO list to reflect the work done. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/st

[PATCH 30/31] staging: wfx: drop async field from struct hif_cmd

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The parameter "async" in wfx_cmd_send() allows to send command without waiting for the reply. In this case, the mutex hif_cmd.lock is released asynchronously in the context of the receiver workqueue. However, "kbuild test robot" complains about this architecture[1] since it

[PATCH 27/31] staging: wfx: fix naming of hif_tx_rate_retry_policy

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller In the wfx driver, the prefix 'hif_mib_' is normally used for structures that represent a hardware message. hif_mib_tx_rate_retry_policy does not fall in this category. So, rename it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 4 ++-- 1 file ch

[PATCH 23/31] staging: wfx: drop useless union hif_event_data

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The union hif_event_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_event. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a

[PATCH 25/31] staging: wfx: drop struct hif_ie_tlv

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller This struct hif_ie_tlv is definitively an Information Element (IE). This struct is defined by 802.11 specification and already exists in mac80211. Reuse this definition instead of struct hif_ie_tlv. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 10

[PATCH 24/31] staging: wfx: drop useless union hif_indication_data

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The union hif_indication_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_generic. In add, drop prefix 'indication_' from the names 'indication_type' and 'indication_data' since it is redundant with the name of the struct. Sig

[PATCH 19/31] staging: wfx: drop useless structs only used in hif_req_tx

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller The structs hif_queue, hif_data_flags, hif_tx_flags and hif_ht_tx_parameters have no real reasons to exist. Drop them and simplify access to fields of struct hif_req_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 39 ++-- dr

[PATCH 28/31] staging: wfx: fix spaces

2020-09-07 Thread Jerome Pouiller
From: Jérôme Pouiller There is no reason to place two spaces between the field tx_conf_payload and its type. In the same vein, remove duplicate empty lines between declarations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 4 +--- drivers/staging/wfx/hif_api_gene

[PATCH 1/7] staging: wfx: fix handling of MMIC error

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller As expected, when the device detect a MMIC error, it returns a specific status. However, it also strip IV from the frame (don't ask me why). So, with the current code, mac80211 detects a corrupted frame and it drops it before it handle the MMIC error. The expected behavior

[PATCH 6/7] dt-bindings: staging: wfx: silabs,wfx yaml conversion

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller The device can be connected on SPI or on SDIO. The original file described the two options separately. So, most of the file had to be rewritten in order to match with the Yaml requirements. Some device requirements are still written in the comments since they cannot been ex

[PATCH 0/7] wfx: move out from the staging area

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller I think the wfx driver is now mature enough to be accepted in the drivers/net/wireless directory. There is still one item on the TODO list. It is an idea to improve the rate control in some particular cases[1]. However, the current performances of the driver seem to satisfy

[PATCH 7/7] wfx: move out from the staging area

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver is now mature enough to leave the staging area. Signed-off-by: Jérôme Pouiller --- .../bindings/net/wireless/silabs,wfx.yaml | 0 MAINTAINERS | 2 +- drivers/net/wireless/Kconfig| 1 + drivers

[PATCH 2/7] staging: wfx: remove remaining code of 'secure link' feature

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller Commit e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") had removed the 'secure link' feature. However, a few lines of codes were yet here. Fixes: e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") Signed-off-by: Jérôme Pouiller --- .../bindings/net/wirele

[PATCH 4/7] staging: wfx: fix QoS priority for slow buses

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller The device is in charge of respecting the QoS constraints. The driver have to ensure that all the queues contain data and the device choose the right queue to send. The things starts to be more difficult when the bandwidth of the bus is lower than the bandwidth of the WiFi.

[PATCH 3/7] staging: wfx: fix BA sessions for older firmwares

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller Firmwares with API < 3.6 do not forward DELBA requests. Thus, when a Block Ack session is restarted, the reordering buffer is not flushed and the received sequence number is not contiguous. Therefore, mac80211 starts to wait some missing frames that it will never receive. T

[PATCH 5/7] staging: wfx: update copyrights dates

2020-10-07 Thread Jerome Pouiller
From: Jérôme Pouiller Most of the files have been modified in 2020, so update the copyright notices. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/bus.h | 2 +- drivers/staging/wfx/

[PATCH 2/8] staging: wfx: check memory allocation

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf' 227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); 228 ret = wfx_send_pds(wdev, tmp_buf, pds->size);

[PATCH 4/8] staging: wfx: wfx_init_common() returns NULL on error

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer bus->core contains the result of wfx_init_common(). With this patch, wfx_init_common() returns a

[PATCH 1/8] staging: wfx: improve error handling of hif_join()

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315) 311 if (!hif) 312 return -ENOMEM; 313 body->infrastructure_bss_mode = !conf->ibss_joined; 314 body->shor

[PATCH 5/8] staging: wfx: increase robustness of hif_generic_confirm()

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4 20 static int hif_generic_confirm(struct wfx_dev *wdev, 21 const struct hif_msg *hif, const void *buf) 22 {

[PATCH 6/8] staging: wfx: gpiod_get_value() can return an error

2020-10-09 Thread Jerome Pouiller
From: Jérôme Pouiller Smatch complains: hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative Reported-by: Dan

<    1   2   3   4   5   6   7   8   >