[PATCH 16/20] staging: wfx: allow to send 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Three things make this task more complex than it should: - Chip necessitate to associate a link-id to each station. It is same thing than association ID but, using 8 bits only. - Rate policy is sent separately from Tx frames - Driver try to handle itself power

[PATCH 13/20] staging: wfx: introduce "secure link"

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip support encryption of the link between host and chip. This feature is called "secure link". Driver code on github[1] support it. However, it relies on mbedtls for cryptographic functions. So, I decided to not import this feature in current patch. However, in order to

[PATCH 02/20] staging: wfx: add support for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Introduce bus level communication layer. At this level, 7 registers can be addressed. Notice that SPI driver is able to manage chip reset. SDIO mode relies on an external driver (`mmc-pwrseq`) to reset chip. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus.h

[PATCH 01/20] staging: wfx: add infrastructure for new driver

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Instantiate build infrastructure WFx driver. This driver provides support for Wifi chipset Silicon Labs WF200 and further: https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf This chip support SPI and SDIO bus. SDIO interface has two

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

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller 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

[PATCH 15/20] staging: wfx: add debug files and trace debug events

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Add traces when debug events happen and allow to ask internal information to chip. These features work independently from mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 122 +++ drivers/staging/wfx/hif_rx.c |

[PATCH 18/20] staging: wfx: allow to scan networks

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/hif_rx.c | 13 ++ drivers/staging/wfx/main.c | 5 + drivers/staging/wfx/scan.c | 258 +++

[PATCH 11/20] staging: wfx: allow to send commands to chip

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip has multiple input buffers and can handle multiple 802.11 frames in parallel. However, other HIF command must be sent sequentially. wsm_send_cmd() handles these requests. This commit also add send_hif_cmd in debugfs. This file allows to send arbitrary commands to

[PATCH 06/20] staging: wfx: import HIF API headers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These files are shared with firmware sources. Only a subset of these definitions are used by driver but, for now, it is easier to import all. API defines 3 kinds of messages: - Requests (req) are sent from host to chip - Confirmations (cnf) are sent by chip and are

[PATCH 08/20] staging: wfx: add tracepoints for HIF

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These tracepoints decode HIF headers and provide more human readable results. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 5 + drivers/staging/wfx/traces.h | 211 +++ 2 files changed, 216 insertions(+) diff --git

[PATCH v2 11/20] staging: wfx: allow to send commands to chip

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip has multiple input buffers and can handle multiple 802.11 frames in parallel. However, other HIF command must be sent sequentially. wsm_send_cmd() handles these requests. This commit also add send_hif_cmd in debugfs. This file allows to send arbitrary commands to

[PATCH v2 04/20] staging: wfx: add tracepoints for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Some tracepoints are useful for debugging. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 6 +- drivers/staging/wfx/debug.c | 10 +++ drivers/staging/wfx/hwio.c | 11 +++ drivers/staging/wfx/traces.h | 149 +++ 4

[PATCH v2 19/20] staging: wfx: implement 802.11 key handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/key.c| 258 +++ drivers/staging/wfx/key.h| 22 +++ drivers/staging/wfx/main.c | 2 + drivers/staging/wfx/sta.c| 4 +

[PATCH v2 08/20] staging: wfx: add tracepoints for HIF

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These tracepoints decode HIF headers and provide more human readable results. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 5 + drivers/staging/wfx/traces.h | 211 +++ 2 files changed, 216 insertions(+) diff --git

[PATCH v2 13/20] staging: wfx: introduce "secure link"

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip support encryption of the link between host and chip. This feature is called "secure link". Driver code on github[1] support it. However, it relies on mbedtls for cryptographic functions. So, I decided to not import this feature in current patch. However, in order to

[PATCH v2 17/20] staging: wfx: allow to receive 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Again, this task is more complex than it should since driver try to handle itself power saving of stations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/data_rx.c | 182 ++

[PATCH v2 12/20] staging: wfx: add HIF commands helpers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Provide an abstraction for HIF commands. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 375 +++ drivers/staging/wfx/hif_tx.h | 33 +++ drivers/staging/wfx/hif_tx_mib.h | 281 +++ 3 files

[PATCH v2 10/20] staging: wfx: instantiate mac80211 data

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Allocate a struct ieee80211_hw but do not yet register it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/debug.c | 12 ++ drivers/staging/wfx/debug.h | 15 drivers/staging/wfx/main.c | 41

[PATCH v2 03/20] staging: wfx: add I/O API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller hwio.c provides an abstraction to access different types of register of the chip. Note that only data register (aka FRAME_OUT) and control register are used normal communication. Other registers are only used during chip start up. Signed-off-by: Jérôme Pouiller ---

[PATCH v2 01/20] staging: wfx: add infrastructure for new driver

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Instantiate build infrastructure WFx driver. This driver provides support for Wifi chipset Silicon Labs WF200 and further: https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf This chip support SPI and SDIO bus. SDIO interface has two

[PATCH v2 15/20] staging: wfx: add debug files and trace debug events

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Add traces when debug events happen and allow to ask internal information to chip. These features work independently from mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 105 +++ drivers/staging/wfx/hif_rx.c |

[PATCH v2 06/20] staging: wfx: import HIF API headers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These files are shared with firmware sources. Only a subset of these definitions are used by driver but, for now, it is easier to import all. API defines 3 kinds of messages: - Requests (req) are sent from host to chip - Confirmations (cnf) are sent by chip and are

[PATCH v2 05/20] staging: wfx: load firmware

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A firmware is necessary to run the chip. wfx_init_device() is in charge of loading firmware on chip and doing low level initialization. Firmwares for WF200 are available here: https://github.com/SiliconLabs/wfx-firmware/ Note that firmware are encrypted. Driver checks

[PATCH v2 07/20] staging: wfx: add IRQ handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller bh_work() is in charge to schedule all HIF message from/to chip. On normal operation, when an IRQ is received, driver can get size of next message in control register. In order to save control register access, when chip send a message, it also appends a copy of control

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

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller 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

[PATCH v2 02/20] staging: wfx: add support for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Introduce bus level communication layer. At this level, 7 registers can be addressed. Notice that SPI driver is able to manage chip reset. SDIO mode relies on an external driver (`mmc-pwrseq`) to reset chip. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus.h

[PATCH v2 14/20] staging: wfx: setup initial chip configuration

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A few tasks remain to be done in order to finish chip initial configuration: - configure chip to use multi-tx confirmation (speed up data transfer) - configure chip to use wake-up feature (save power consumption during runtime) - set hardware

[PATCH v2 09/20] staging: wfx: add support for start-up indication

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Once firmware is loaded, it send a first indication to host. This indication signalize that host can start to communicate with firmware. In add, it contains information about chip and firmware (MAC addresses, firmware version, etc...). Signed-off-by: Jérôme Pouiller ---

[PATCH v2 18/20] staging: wfx: allow to scan networks

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/hif_rx.c | 13 ++ drivers/staging/wfx/main.c | 5 + drivers/staging/wfx/scan.c | 249 +++

[PATCH v3 18/20] staging: wfx: allow to scan networks

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip can make foreground scan or background, but both can't be mixed in same request. So, we need to split each mac80211 requests into multiple HIF requests. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/bh.c | 2 +-

[PATCH v3 14/20] staging: wfx: setup initial chip configuration

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A few tasks remain to be done in order to finish chip initial configuration: - configure chip to use multi-tx confirmation (speed up data transfer) - configure chip to use wake-up feature (save power consumption during runtime) - set hardware

[PATCH 07/20] staging: wfx: add IRQ handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller bh_work() is in charge to schedule all HIF message from/to chip. On normal operation, when an IRQ is received, driver can get size of next message in control register. In order to save control register access, when chip send a message, it also appends a copy of control

[PATCH 04/20] staging: wfx: add tracepoints for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Some tracepoints are useful for debugging. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 6 +- drivers/staging/wfx/debug.c | 10 +++ drivers/staging/wfx/hwio.c | 11 +++ drivers/staging/wfx/traces.h | 154 +++ 4

[PATCH 05/20] staging: wfx: load firmware

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A firmware is necessary to run the chip. wfx_init_device() is in charge of loading firmware on chip and doing low level initialization. Firmwares for WF200 are available here: https://github.com/SiliconLabs/wfx-firmware/ Note that firmware are encrypted. Driver checks

[PATCH 12/20] staging: wfx: add HIF commands helpers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Provide an abstraction for HIF commands. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 375 +++ drivers/staging/wfx/hif_tx.h | 33 +++ drivers/staging/wfx/hif_tx_mib.h | 281 +++

[PATCH 14/20] staging: wfx: setup initial chip configuration

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A few tasks remain to be done in order to finish chip initial configuration: - configure chip to use multi-tx confirmation (speed up data transfer) - configure chip to use wake-up feature (save power consumption during runtime) - set hardware

[PATCH 09/20] staging: wfx: add support for start-up indication

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Once firmware is loaded, it send a first indication to host. This indication signalize that host can start to communicate with firmware. In add, it contains information about chip and firmware (MAC addresses, firmware version, etc...). Signed-off-by: Jérôme Pouiller ---

[PATCH 10/20] staging: wfx: instantiate mac80211 data

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Allocate a struct ieee80211_hw but do not yet register it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/debug.c | 12 ++ drivers/staging/wfx/debug.h | 15 drivers/staging/wfx/main.c | 41

[PATCH 19/20] staging: wfx: implement 802.11 key handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/key.c| 272 +++ drivers/staging/wfx/key.h| 22 +++ drivers/staging/wfx/main.c | 2 + drivers/staging/wfx/sta.c| 4 +

[PATCH 17/20] staging: wfx: allow to receive 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Again, this task is more complex than it should since driver try to handle itself power saving of stations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/data_rx.c | 187 ++

[PATCH v3 16/20] staging: wfx: allow to send 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Three things make this task more complex than it should: - Chip necessitate to associate a link-id to each station. It is same thing than association ID but, using 8 bits only. - Rate policy is sent separately from Tx frames - Driver try to handle itself power

[PATCH v3 15/20] staging: wfx: add debug files and trace debug events

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Add traces when debug events happen and allow to ask internal information to chip. These features work independently from mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 105 +++ drivers/staging/wfx/hif_rx.c |

[PATCH v3 02/20] staging: wfx: add support for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Introduce bus level communication layer. At this level, 7 registers can be addressed. Notice that SPI driver is able to manage chip reset. SDIO mode relies on an external driver (`mmc-pwrseq`) to reset chip. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus.h

[PATCH v3 19/20] staging: wfx: implement 802.11 key handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_set_key() mostly copy bytes on correct offsets. A big piece of code for a simple work. Unfortunately, I did not found any way to factorize it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/key.c| 258

[PATCH 20/20] staging: wfx: implement the rest of mac80211 API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 26 + drivers/staging/wfx/data_tx.c | 16 + drivers/staging/wfx/debug.c |2 + drivers/staging/wfx/hif_rx.c | 53 ++ drivers/staging/wfx/hif_tx.c |1 + drivers/staging/wfx/main.c| 137

[PATCH 03/20] staging: wfx: add I/O API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller hwio.c provides an abstraction to access different types of register of the chip. Note that only data register (aka FRAME_OUT) and control register are used normal communication. Other registers are only used during chip start up. Signed-off-by: Jérôme Pouiller ---

[PATCH v2 20/20] staging: wfx: implement the rest of mac80211 API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 26 + drivers/staging/wfx/data_tx.c | 16 + drivers/staging/wfx/debug.c |2 + drivers/staging/wfx/hif_rx.c | 53 ++ drivers/staging/wfx/hif_tx.c |1 + drivers/staging/wfx/main.c| 133

[PATCH v2 16/20] staging: wfx: allow to send 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Three things make this task more complex than it should: - Chip necessitate to associate a link-id to each station. It is same thing than association ID but, using 8 bits only. - Rate policy is sent separately from Tx frames - Driver try to handle itself power

[PATCH v3 10/20] staging: wfx: instantiate mac80211 data

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Allocate a struct ieee80211_hw but do not yet register it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/debug.c | 12 ++ drivers/staging/wfx/debug.h | 15 drivers/staging/wfx/main.c | 41

[PATCH v3 12/20] staging: wfx: add HIF commands helpers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Provide an abstraction for HIF commands. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 375 +++ drivers/staging/wfx/hif_tx.h | 33 +++ drivers/staging/wfx/hif_tx_mib.h | 281 +++ 3 files

[PATCH v3 06/20] staging: wfx: import HIF API headers

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These files are shared with firmware sources. Only a subset of these definitions are used by driver but, for now, it is easier to import all. API defines 3 kinds of messages: - Requests (req) are sent from host to chip - Confirmations (cnf) are sent by chip and are

[PATCH v3 17/20] staging: wfx: allow to receive 802.11 frames

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Again, this task is more complex than it should since driver try to handle itself power saving of stations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + drivers/staging/wfx/data_rx.c | 182 ++

[PATCH v3 13/20] staging: wfx: introduce "secure link"

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip support encryption of the link between host and chip. This feature is called "secure link". Driver code on github[1] support it. However, it relies on mbedtls for cryptographic functions. So, I decided to not import this feature in current patch. However, in order to

[PATCH v3 05/20] staging: wfx: load firmware

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller A firmware is necessary to run the chip. wfx_init_device() is in charge of loading firmware on chip and doing low level initialization. Firmwares for WF200 are available here: https://github.com/SiliconLabs/wfx-firmware/ Note that firmware are encrypted. Driver checks

[PATCH v3 01/20] staging: wfx: add infrastructure for new driver

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Instantiate build infrastructure WFx driver. This driver provides support for Wifi chipset Silicon Labs WF200 and further: https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf This chip support SPI and SDIO bus. SDIO interface has two

[PATCH v3 20/20] staging: wfx: implement the rest of mac80211 API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Finish to fill struct ieee80211_ops with necessary callbacks. Driver is now ready to be registered to mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 26 + drivers/staging/wfx/data_tx.c | 16 + drivers/staging/wfx/debug.c |2 +

[PATCH v3 08/20] staging: wfx: add tracepoints for HIF

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller These tracepoints decode HIF headers and provide more human readable results. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 5 + drivers/staging/wfx/traces.h | 211 +++ 2 files changed, 216 insertions(+) diff --git

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

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller 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

[PATCH v3 09/20] staging: wfx: add support for start-up indication

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Once firmware is loaded, it send a first indication to host. This indication signalize that host can start to communicate with firmware. In add, it contains information about chip and firmware (MAC addresses, firmware version, etc...). Signed-off-by: Jérôme Pouiller ---

[PATCH v3 11/20] staging: wfx: allow to send commands to chip

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Chip has multiple input buffers and can handle multiple 802.11 frames in parallel. However, other HIF command must be sent sequentially. wsm_send_cmd() handles these requests. This commit also add send_hif_cmd in debugfs. This file allows to send arbitrary commands to

[PATCH v3 07/20] staging: wfx: add IRQ handling

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller bh_work() is in charge to schedule all HIF message from/to chip. On normal operation, when an IRQ is received, driver can get size of next message in control register. In order to save control register access, when chip send a message, it also appends a copy of control

[PATCH v3 04/20] staging: wfx: add tracepoints for I/O access

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller Some tracepoints are useful for debugging. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 6 +- drivers/staging/wfx/debug.c | 10 +++ drivers/staging/wfx/hwio.c | 11 +++ drivers/staging/wfx/traces.h | 149 +++ 4

[PATCH v3 03/20] staging: wfx: add I/O API

2019-09-19 Thread Jerome Pouiller
From: Jérôme Pouiller hwio.c provides an abstraction to access different types of register of the chip. Note that only data register (aka FRAME_OUT) and control register are used normal communication. Other registers are only used during chip start up. Signed-off-by: Jérôme Pouiller ---

Re: [PATCH 02/20] staging: wfx: add support for I/O access

2019-10-02 Thread Jerome Pouiller
On Thursday 19 September 2019 18:34:48 CEST Andrew Lunn wrote: > On Thu, Sep 19, 2019 at 10:52:35AM +0000, Jerome Pouiller wrote: > > +static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, > > + void *dst, size_t count) > > +{ > >

Re: [PATCH 02/20] staging: wfx: add support for I/O access

2019-10-02 Thread Jerome Pouiller
On Wednesday 2 October 2019 18:42:14 CEST Greg Kroah-Hartman wrote: > On Wed, Oct 02, 2019 at 04:29:09PM +0000, Jerome Pouiller wrote: [...] > > > > Hi Andrew, > > > > I did not forget your suggestion. However, if everyone is agree with that, > > I'd > &

Re: [PATCH v2 1/3] staging: wfx: replace uintXX_t to uXX and intXX_t to sXX

2019-11-11 Thread Jerome Pouiller
On Monday 11 November 2019 14:30:53 CET Jules Irenge wrote: > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > Replace uint8_t to u8, uint16_t to u16, uint32_t to u32 >

Re: [PATCH v2 3/3] staging: wfx: replace u32 by __le32

2019-11-11 Thread Jerome Pouiller
On Monday 11 November 2019 14:30:55 CET Jules Irenge wrote: [...] > - u32 count_rts_failures; > - u32 count_ack_failures; > - u32 count_rx_multicast_frames; > - u32 count_rx_frames_success; > - u32 count_rx_cmacicv_errors; > - u32

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-12 Thread Jerome Pouiller
On Tuesday 12 November 2019 00:16:59 CET Al Viro wrote: [...] > More fun: > int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *val, > size_t val_len) > { > int ret; > struct hif_msg *hif; > int buf_len = sizeof(struct hif_cnf_read_mib) + val_len; >

Re: [PATCH] staging: wfx: add gcc extension __force cast

2019-11-12 Thread Jerome Pouiller
Hello Al, Thank you for your extensive review. On Monday 11 November 2019 21:28:52 CET Al Viro wrote: > On Mon, Nov 11, 2019 at 01:51:33PM +, Jules Irenge wrote: > > > > > NAK. force-cast (and it's not a gcc extension, BTW - it's sparse) is > > > basically > > > "I know better; the code is

Re: [PATCH v1 1/5] staging: wfx: fix warnings of no space is necessary

2019-10-21 Thread Jerome Pouiller
On Saturday 19 October 2019 16:24:43 CEST Dan Carpenter wrote: > On Sat, Oct 19, 2019 at 03:07:15PM +0100, Jules Irenge wrote: > > diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c > > index 3355183fc86c..573216b08042 100644 > > --- a/drivers/staging/wfx/bh.c > > +++

Re: [PATCH] staging: wfx: remove unnecessary void pointer

2019-10-21 Thread Jerome Pouiller
On Monday 21 October 2019 14:24:49 CEST Jules Irenge wrote: > Remove unnecessary void pointers. > Issue detected and solved by coccinelle tool. > semantic use > @@expression e ;@@ > -(void*)(e) > +e > > Signed-off-by: Jules Irenge > --- > drivers/staging/wfx/bh.c | 2 +- >

[PATCH 4/6] staging: wfx: fix Oops when CONFIG_OF_NET is not set

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller In most case, of_get_mac_address() return NULL in case of error. However, if CONFIG_OF_NET is not set, it return -ENODEV. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/6] staging: wfx: fix CONFIG_MMC=m with CONFIG_WFX=y

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller If CONFIG_MMC=m and CONFIG_WFX=y, compilation complains with undefined references: drivers/staging/wfx/main.o: In function `wfx_core_init': /linux/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o: In

[PATCH 1/6] staging: wfx: drop module version

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_version.h says that this code is same same than driver 2.3.1 hosted on github: https://github.com/siliconlabs/wfx-linux-driver/tree/2.3.1-public However, it is inaccurate, driver in-tree contains multiple small patches ahead 2.3.1. I prefer to drop this confusing

[PATCH 5/6] staging: wfx: fix setting MAC address from DT

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller MAC address read from chip is unconditionally used even if a MAC address is configured in device tree. Reported-by: Marc Dorval Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 2/6] staging: wfx: relocate wfx_fill_sl_key() in secure_link.h

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller "Secure link" feature is not available in in-tree driver (because it depends on mbedtls). Thus, secure_link.h only empty functions. Module parameter "slk_key" and associated function wfx_fill_sl_key() had an unjustifiable place in main.c. This patch relocate them to

[PATCH 6/6] staging: wfx: fix number of available tx_policies

2019-10-17 Thread Jerome Pouiller
From: Jérôme Pouiller Original API declares 16 tx_policies. But in fact, the 16th is used internally by the firmware. So, only 15 tx_policies are available for driver. Reported-by: Alban Jeantheau Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 2 +- 1 file changed, 1

Re: [PATCH v2] staging: wfx: Fix a memory leak in 'wfx_upload_beacon'

2019-11-04 Thread Jerome Pouiller
On Saturday 2 November 2019 16:59:45 CET Christophe JAILLET wrote: > The current code is a no-op, because all it can do is 'dev_kfree_skb(NULL)' > Remove the test before 'dev_kfree_skb()' > > Signed-off-by: Christophe JAILLET > --- > V2: remove the 'if(...)', 'dev_kfree_skb()' can handle NULL. >

Re: [staging:staging-testing 41/59] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42

2019-10-07 Thread Jerome Pouiller
On Friday 4 October 2019 12:48:32 CEST kbuild test robot wrote: [...] > >> drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after > >> initialization to constant on line 42 > > vim +47 drivers/staging/wfx/main.c > > 30 > 31 struct gpio_desc *wfx_get_gpio(struct device *dev,

[PATCH 0/7] Fix various compilation issues with wfx driver

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Most of problems are related to big-endian architectures. Jérôme Pouiller (7): staging: wfx: simplify memory allocation in wfx_update_filtering() staging: wfx: remove misused call to cpu_to_le16() staging: wfx: le16_to_cpus() takes a reference as parameter staging:

[PATCH 1/7] staging: wfx: simplify memory allocation in wfx_update_filtering()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Original code did not handle case where kmalloc failed. By the way, it is more convenient to allocate and build HIF message in hif_set_beacon_filter_table() instead of to ask to caller function to build it. Fixes: 40115bbc40e2 ("staging: wfx: implement the rest of mac80211

[PATCH 2/7] staging: wfx: remove misused call to cpu_to_le16()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Indeed, hif_msg->id is a uint8_t, so use of cpu_to_le16() is a madness. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2

[PATCH 4/7] staging: wfx: correctly cast data on big-endian targets

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller When built for a big-endian target, original code caused error: include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int *}' but argument is of type 'struct hif_mib_protected_mgmt_policy *' Fixes: f95a29d40782 ("staging: wfx: add HIF commands

[PATCH 5/7] staging: wfx: fix copy_{to,from}_user() usage

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller On error, copy_to_user() returns number of bytes remaining. Driver should return -EFAULT. Fixes: 4f8b7fabb15d ("staging: wfx: allow to send commands to chip") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller ---

[PATCH 7/7] staging: wfx: avoid namespace contamination

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller tx_policy_init() was already defined in driver cw1200. So, compilation failed when wfx and cw1200 were both built-in. In order to keep a coherent naming scheme, this patch prefixes all "tx_policy_*" functions with "wfx_". Fixes: 9bca45f3d692 ("staging: wfx: allow to send

[PATCH 6/7] staging: wfx: drop calls to BUG_ON()

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Most of calls to BUG_ON() could replaced by WARN(). By the way, this patch also try to favor WARN() (that include a comment about the problem) instead of WARN_ON(). Reported-by: Andrew Lunn Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++--

[PATCH 3/7] staging: wfx: le16_to_cpus() takes a reference as parameter

2019-10-08 Thread Jerome Pouiller
From: Jérôme Pouiller Original code caused an (100% reproducible) invalid memory access on big-endian targets. Fixes: b0998f0c040d "staging: wfx: add IRQ handling" Reported-by: kbuild test robot Reported-by: Stephen Rothwell Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4

Re: [PATCH][next] staging: wfx: fix spelling mistake "hexdecimal" -> "hexadecimal"

2019-10-08 Thread Jerome Pouiller
On Tuesday 8 October 2019 10:22:05 CEST Colin King wrote: > From: Colin Ian King > > There is a spelling mistake in the documentation and a module parameter > description. Fix these. > > Signed-off-by: Colin Ian King > --- > .../devicetree/bindings/net/wireless/siliabs,wfx.txt| 2

Re: [PATCH][next] staging: wfx: fix swapped arguments in memset call

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 11:46:08 CEST Colin King wrote: > From: Colin Ian King > > The memset appears to have the 2nd and 3rd arguments in the wrong > order, fix this by swapping these around into the correct order. > > Addresses-Coverity: ("Memset fill truncated") > Fixes: 4f8b7fabb15d

Re: [staging:staging-testing 57/111] drivers/staging/wfx/scan.c:207 wfx_scan_work() warn: inconsistent returns 'sem:>scan.lock'.

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 09:38:31 CEST kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > staging-testing > head: d49d1c76b96ebf39539e93d5ab7943a01ef70e4f > commit: 1a61af0f8cbecd1610c6fc380d0fb00f57fd43f2 [57/111] staging: wfx: allow >

Re: [PATCH v2 3/3] staging: wfx: Make some functions static in sta.c

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 15:43:35 CEST zhengbin wrote: > Fix sparse warnings: > > drivers/staging/wfx/sta.c:269:6: warning: symbol 'wfx_update_filtering_work' > was not declared. Should it be static? > drivers/staging/wfx/sta.c:475:6: warning: symbol 'wfx_event_handler_work' was > not

Re: [PATCH v2 1/3] staging: wfx: Make function 'sram_write_dma_safe','load_firmware_secure' static

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 15:43:31 CEST zhengbin wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Fix sparse warnings: > > drivers/staging/wfx/fwio.c:83:5:

Re: [PATCH v2 2/3] staging: wfx: Make function 'wfx_tx_queue_get' static

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 15:43:35 CEST zhengbin wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > Fix sparse warnings: > >

Re: [staging:staging-testing 41/59] drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after initialization to constant on line 42

2019-10-09 Thread Jerome Pouiller
On Wednesday 9 October 2019 08:51:10 CEST Rong Chen wrote: > On 10/7/19 4:36 PM, Jerome Pouiller wrote: > > On Friday 4 October 2019 12:48:32 CEST kbuild test robot wrote: > > [...] > >>>> drivers/staging/wfx/main.c:47:14-21: ERROR: PTR_ERR applied after > >&g

Re: [PATCH 0/7] Fix various compilation issues with wfx driver

2019-10-09 Thread Jerome Pouiller
On Tuesday 8 October 2019 17:10:56 CEST Greg Kroah-Hartman wrote: > On Tue, Oct 08, 2019 at 09:42:47AM +0000, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > Most of problems are related to big-endian architectures. > > kbuild still reports 2 errors

Re: [staging:staging-testing 50/59] drivers/staging/wfx/hif_tx.c:53:2-8: preceding lock on line 38 (fwd)

2019-10-04 Thread Jerome Pouiller
On Friday 4 October 2019 13:18:16 CEST Julia Lawall wrote: > Hello, > > Is an unlock needed on line 53? > > julia > > -- Forwarded message -- > Date: Fri, 4 Oct 2019 19:14:33 +0800 > From: kbuild test robot > To: kbu...@01.org > Cc: Julia Lawall > Subject:

[PATCH v3] staging: wfx: fix potential vulnerability to spectre

2019-10-11 Thread Jerome Pouiller
From: Jérôme Pouiller array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller --- v2: cut down commit-id to 12 characters v3: fix

[PATCH v2] staging: wfx: fix potential vulnerability to spectre

2019-10-11 Thread Jerome Pouiller
From: Jérôme Pouiller array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller --- v2: cut down commit-id to 12 characters

Re: [PATCH] staging: wfx: fix potential vulnerability to spectre

2019-10-11 Thread Jerome Pouiller
On Friday 11 October 2019 14:10:35 CEST Greg Kroah-Hartman wrote: > On Fri, Oct 11, 2019 at 10:15:54AM +0000, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > array_index_nospec() should be applied after a bound check. > > > > Fixes: 9bca45f3d6924f19f29c0d

[PATCH] staging: wfx: fix potential vulnerability to spectre

2019-10-11 Thread Jerome Pouiller
From: Jérôme Pouiller array_index_nospec() should be applied after a bound check. Fixes: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e ("staging: wfx: allow to send 802.11 frames") Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Jérôme Pouiller ---

  1   2   3   4   5   6   7   8   >