[PATCH v2 47/65] staging: wfx: fix bss_loss

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_tx_confirm_cb() retrieves the station associated with a frame using the MAC address from the 802.11 header. In the other side wfx_tx() retrieves the station using sta field from the ieee80211_tx_control argument. In wfx_cqm_bssloss_sm(), wfx_tx() was called directly

[PATCH v2 56/65] staging: wfx: simplify wfx_suspend_resume_mc()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Indeed, it is not necessary to pass whole hif_ind_suspend_resume_tx to wfx_suspend_resume_mc(). In add, the structure hif_ind_suspend_resume_tx come from hardware API. It is not intended to be manipulated in upper layers of the driver. Signed-off-by: Jérôme Pouiller

[PATCH v2 50/65] staging: wfx: simplify the link-id allocation

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The "link-id" is a slot number provided to the chip. A link-id is allocated to every station associated with the chip (mainly when the chip is in AP mode). It is more or less the same thing than the association ID, but it is limited to 14 values. Firmware uses t

[PATCH v2 41/65] staging: wfx: with multiple vifs, force PS only if channels differs

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller When multiple vif are in use (the only supported configuration is one station and one AP), the driver force power save flag on station. This behavior allows the station to leave the station channel and make its business on AP channel. However, this has a big impact on

[PATCH v2 40/65] staging: wfx: update power-save per interface

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller mac80211 and the device are both able to control power-save per vif. But, the current code retrieve power-save from wfx_config(). So, it does not allow to setup power-save independently for each vif. Driver just has to rely on wfx_bss_info_changed() instead of wfx_config

[PATCH v2 65/65] staging: wfx: update TODO

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Some work has been done :) Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO index 6b1cdd24afc9..efcb7c6a5aa7 100644 --- a

[PATCH v2 48/65] staging: wfx: fix RCU usage

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Indeed, sta was used after call to rcu_unlock() Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1c10ebd11944..cc72877a090f

[PATCH v2 54/65] staging: wfx: sta and dtim

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_ps_notify() is called for any changes in the TIM. However, association ID 0 is a very special case that should be handled independently. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 33 +++-- 1 file changed, 15 insertions

[PATCH v2 64/65] staging: wfx: simplify hif_multi_tx_confirm()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Usage of the "buf_loc" variable does not simplify the function. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wf

[PATCH v2 59/65] staging: wfx: ensure that packet_id is unique

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller In current code, packet_id is derivated from mac802.11 packet sequence number, but this number is only unique for a station. It is not sufficient. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 8 ++-- drivers/staging/wfx/wfx.h | 1 + 2 files

[PATCH v2 63/65] staging: wfx: simplify wfx_tx_queue_get_num_queued()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_tx_queue_get_num_queued() can take advantage of BIT() instead of maintaining one variable for a counter and another for a mask. In add, wfx_tx_queue_get_num_queued() has no real reason to return a size_t instead of an int. Signed-off-by: Jérôme Pouiller --- drivers

[PATCH v2 58/65] staging: wfx: simplify wfx_ps_notify_sta()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_ps_notify_sta() is too complex compared to the task it do. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c

[PATCH v2 57/65] staging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller When mac80211 ask for a frame to be sent after a DTIM, driver should: 1. Update TIM with multicast bit set (using update_ie). This function can be called whenever. 2. Keep buffered all frames marked "after dtim" 3. When it receive a suspend_resume indic

[PATCH v2 53/65] staging: wfx: pspoll_mask make no sense

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller pspoll_mask is here to send data buffered in driver. But since station is marked buffered, TIM for this station is 1 and mac80211 will call sta_notify when a ps-poll is received. So pspoll_mask is useless and sta_alseep_mask is sufficient. Signed-off-by: Jérôme Pouiller

[PATCH v2 60/65] staging: wfx: remove unused do_probe

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The identifier do_probe is unused since "staging: wfx: remove workaround to send probe requests" Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/w

[PATCH v2 62/65] staging: wfx: simplify hif_handle_tx_data()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Since enum action has now only two cases, it can be dropped. Then hif_handle_tx_data() can be simplified. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 40 ++--- 1 file changed, 15 insertions(+), 25 deletions(-) diff

[PATCH v2 61/65] staging: wfx: remove check for interface state

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Obviously, the value of wvif->state as no reason to be wrong. At least, if it the case, dropping the frame is probably not the bast thing to do. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 50 + 1 file changed,

Re: [[PATCH staging] 4/7] staging: wfx: annotate nested gc_list vs tx queue locking

2020-02-11 Thread Jérôme Pouiller
if (wakeup_stats) > @@ -259,10 +259,10 @@ int wfx_pending_requeue(struct wfx_dev *wdev, struct > sk_buff *skb) > spin_lock_bh(&queue->queue.lock); > ++queue->link_map_cache[tx_priv->link_id]; > > - spin_lock_bh(&stats->pending.lock); &g

Re: [[PATCH staging] 6/7] staging: wfx: use sleeping gpio accessors

2020-02-11 Thread Jérôme Pouiller
"enable 'quiescent' power mode with gpio %d and PDS > file %s\n", > desc_to_gpio(wdev->pdata.gpio_wakeup), > wdev->pdata.file_pds); > - gpiod_set_value(wdev->pdata.gpio_wakeup, 1); > +

Re: [[PATCH staging] 7/7] staging: wfx: use more power-efficient sleep for reset

2020-02-11 Thread Jérôme Pouiller
vers/staging/wfx/hwio.c > +++ b/drivers/staging/wfx/hwio.c > @@ -142,7 +142,7 @@ static int indirect_read(struct wfx_dev *wdev, int reg, > u32 addr, void *buf, > goto err; > if (!(cfg & prefetch)) > break; > - ude

Re: [PATCH v2 1/6] staging: wfx: fix init/remove vs IRQ race

2020-02-11 Thread Jérôme Pouiller
ieee80211_free_hw(wdev->hw); > -} > - > int wfx_probe(struct wfx_dev *wdev) > { > int i; > diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h > index 875f8c227803..9c9410072def 100644 > --- a/drivers/staging/wfx/main.h > +++ b/drive

Re: [PATCH v2 1/6] staging: wfx: fix init/remove vs IRQ race

2020-02-11 Thread Jérôme Pouiller
> > - mutex_destroy(&wdev->conf_mutex); > > > - wfx_tx_queues_deinit(wdev); > > > - ieee80211_free_hw(wdev->hw); > > > -} > > > - > > > int wfx_probe(struct wfx_dev *wdev) > > > { > > > int i; >

Re: [PATCH -next] staging: wfx: remove set but not used variable 'tx_priv'

2020-02-11 Thread Jérôme Pouiller
ev, queue, tx_allowed_mask); > if (!skb) > continue; > - tx_priv = wfx_skb_tx_priv(skb); > hif = (struct hif_msg *) skb->data; > wvif = wdev_to_wvif(wdev, hif-&g

Re: [PATCH -next] staging: wfx: remove set but not used variable 'tx_priv'

2020-02-11 Thread Jérôme Pouiller
On Tuesday 11 February 2020 16:21:41 CET Jérôme Pouiller wrote: > On Tuesday 11 February 2020 15:03:34 CET YueHaibing wrote: > > drivers/staging/wfx/queue.c: In function wfx_tx_queues_get: > > drivers/staging/wfx/queue.c:484:28: warning: variable tx_priv set but not > > u

Re: [PATCH] docs: dt: fix several broken doc references

2020-02-24 Thread Jérôme Pouiller
ies are recognized either by SPI and SDIO > versions: > Must contains 64 hexadecimal digits. Not supported in current version. > > WFx driver also supports `mac-address` and `local-mac-address` as described > in > -Documentation/devicetree/binding/net/ethernet.txt > +Do

Re: [PATCH] staging: wfx: match parentheses alignment

2020-02-24 Thread Jérôme Pouiller
On Sunday 23 February 2020 20:32:01 CET Kaaira Gupta wrote: > > match next line with open parentheses by giving appropriate tabs. Maybe the body of the commit message should start with a capital letter, else: Reviewed-by: Jérôme Pouiller > > Signed-off-by: Kaaira Gupta >

Re: [PATCH 3/5] staging: wfx: make warning about pending frame less scary

2020-03-13 Thread Jérôme Pouiller
scary. Indeed, my idea was the reviewers start by reading subjects and then read the body of the commit. I will care now. > > Signed-off-by: Jérôme Pouiller > > --- > > drivers/staging/wfx/sta.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > >

Re: [PATCH 04/32] staging: wfx: remove "burst" mechanism

2020-04-02 Thread Jérôme Pouiller
16 best = score; >417 winner = i; >418 } >419 } Indeed. In add, this code is useless. That's why I drop this code in patch 22/32. -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 08/32] staging: wfx: simplify hif_handle_tx_data()

2020-04-02 Thread Jérôme Pouiller
rue); 100 goto err; 101 } However, I can improve this code: - "4" should be replaced by "sizeof(struct hif_msg)" for readability - hif->len is tested through computed_len, but I am not sure to be able to prove that it covers al

Re: [PATCH 01/32] staging: wfx: add sanity checks to hif_join()

2020-04-02 Thread Jérôme Pouiller
On Thursday 2 April 2020 14:42:23 CEST Dan Carpenter wrote: > On Wed, Apr 01, 2020 at 01:03:34PM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > Add a few check on start of hif_join(). > > > > Signed-off-by: Jérôme Pouiller > > --- > >

Re: [staging:staging-next 127/127] drivers/staging/wfx/bh.c:88:32: sparse: warning: restricted __le16 degrades to integer

2020-04-15 Thread Jérôme Pouiller
this fact. Sparse should now report meaningful errors. And indeed, Sparse now reports ton of errors :). I am currently working on these warnings. I hope to provide a patch soon. -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: wfx: unlock on error path

2020-05-12 Thread Jérôme Pouiller
nf.txpower) > hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); > -- > 2.26.2 > > Good catch! Reviewed-by: Jérôme Pouiller -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'

2020-05-12 Thread Jérôme Pouiller
On Tuesday 12 May 2020 09:43:34 CEST Geert Uytterhoeven wrote: > Hi Jerome, > > On Mon, May 11, 2020 at 5:53 PM Jerome Pouiller > wrote: > > From: Jérôme Pouiller > > > > The struct hif_msg is received from the hardware. So, it declared as > > little endia

Re: [PATCH] wfx: typo fix

2020-05-13 Thread Jérôme Pouiller
an now nearlu be used with __print_symbolic() but, > + * 5. list_name can now nearly be used with __print_symbolic() but, > * __print_symbolic() dislike last comma of list. So we define a new > list > * with a dummy element: Ok. Thank you for your

Re: [PATCH 05/19] staging: wfx: fix coherency of hif_scan() prototype

2020-05-15 Thread Jérôme Pouiller
On Friday 15 May 2020 15:53:59 CEST Greg Kroah-Hartman wrote: > On Fri, May 15, 2020 at 10:33:11AM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > The function hif_scan() return the timeout for the completion of the > > scan request. It is the only

Re: [PATCH] staging: wfx: typo fix

2020-05-16 Thread Jérôme Pouiller
gt; * with a dummy element: > * The subject of the mail should have been "[PATCH v2]" (it is automatic if use the -v option of "git send-email"). Apart from that: Reviewed-by: Jérôme Pouiller -- Jérôme Pouiller __

Re: [PATCH 00/10] staging: wfx: introduce nl80211 vendor extensions

2020-05-27 Thread Jérôme Pouiller
rs/net/wireless. Also do note > that we have special rules for nl80211 vendor commands: > > https://wireless.wiki.kernel.org/en/developers/documentation/nl80211#vendor-specific_api I hoped to suggest the move of this driver outside of staging in some weeks (the last items in TODO list are

Re: [staging-testing] drivers/staging/wfx/hif_tx.c

2020-06-10 Thread Jérôme Pouiller
context. In some specific usages (RT-mutex? lock proving?), acquire mutex from a context and release it from another can produce some errors. In contrary a boolean semaphore does not have this restriction. (can anyone confirm that?) -- Jérôme Pouiller

Re: [PATCH v3] staging: wfx: Get descriptors for GPIOs

2020-06-29 Thread Jérôme Pouiller
01 { > compatible = "silabs,wf200"; > reset-gpios = <&gpio0 1>; > wakeup-gpios = <&gpio0 2>; > }; > > Cc: Jérôme Pouiller > Signed-off-by: Linus Walleij > --- > ChangeLog v2->v3: > - ERR_CAST not PTR_CAST > ChangeLog v1-

Re: [PATCH v4] staging: wfx: Get descriptors for GPIOs

2020-07-01 Thread Jérôme Pouiller
wfx@0x01 { > compatible = "silabs,wf200"; > reset-gpios = <&gpio0 1>; > wakeup-gpios = <&gpio0 2>; > }; > > Cc: Jérôme Pouiller > Signed-off-by: Linus Walleij > --- > ChangeLog v3->v4: > - Finally figured out how to c

Re: [PATCH v5] staging: wfx: Get descriptors for GPIOs

2020-07-03 Thread Jérôme Pouiller
01 { > compatible = "silabs,wf200"; > reset-gpios = <&gpio0 1>; > wakeup-gpios = <&gpio0 2>; > }; > > Cc: Jérôme Pouiller > Signed-off-by: Linus Walleij > --- > ChangeLog v4->v5: > - Make the wakeup GPIO optional. > ChangeL

Re: [PATCH][next] staging: wfx: fix uninitialized variable bytes_done

2020-07-06 Thread Jérôme Pouiller
lue. > Fix this by initializing bytes_done to zero. > > Addresses-Coverity: ("Uninitialized scalar variable") > Fixes: a9408ad79ff3 ("staging: wfx: load the firmware faster") > Signed-off-by: Colin Ian King Good catch! I am surprised that my gcc hasn't caug

Re: [bug report] staging: wfx: load the firmware faster

2020-07-09 Thread Jérôme Pouiller
On Thursday 9 July 2020 11:26:29 CEST dan.carpen...@oracle.com wrote: > Hello Jérôme Pouiller, > > The patch a9408ad79ff3: "staging: wfx: load the firmware faster" from > Jul 1, 2020, leads to the following static checker warning: > > drivers/staging/wf

Re: [PATCH][next][V2] staging: wfx: fix a handful of spelling mistakes

2020-08-10 Thread Jérôme Pouiller
*file_fw; > const char *file_pds; > struct gpio_desc *gpio_wakeup; > diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c > index 4e30ab17a93d..ad63332f690c 100644 > --- a/drivers/staging/wfx/sta.c > +++ b/drivers/staging/wfx/sta.c > @@ -214,7 +214,7 @@ static int

Re: [PATCH v2] staging: wfx: refactor to avoid duplication at hif_tx.c

2020-08-10 Thread Jérôme Pouiller
+ > // This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to > any > // request anymore. We need to slightly hack struct wfx_hif_cmd for that > job. Be > -// carefull to only call this funcion during device unregister. > +// carefu

Re: [PATCH 01/12] staging: wfx: fix BA when device is AP and MFP is enabled

2020-08-24 Thread Jérôme Pouiller
On Monday 24 August 2020 11:50:42 CEST Dan Carpenter wrote: > On Thu, Aug 20, 2020 at 05:58:47PM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > The protection of the management frames is mainly done by mac80211. > > However, frames for the management o

Re: [PATCH 2/2] staging: wfx: apply the necessary SDIO quirks for the Silabs WF200

2022-02-17 Thread Jérôme Pouiller
On Thursday 17 February 2022 16:04:51 CET Kalle Valo wrote: > Ulf Hansson writes: > > On Thu, 17 Feb 2022 at 10:59, Kalle Valo wrote: > >> Jerome Pouiller writes: > >> > From: Jérôme Pouiller > >> > > >> > Until now, the SDIO quirks are a

Re: [PATCH] staging: wfx: fix scan with WFM200 and WW regulation

2022-02-18 Thread Jérôme Pouiller
e was removing the flag > IEEE80211_CHAN_NO_IR from channels where a BSS is discovered. This was > making subsequent scans to fail because the driver was trying active > scans on prohibited channels. > > Signed-off-by: Jérôme Pouiller I forgot to mention I have reviewed on this pat

Re: [PATCH] staging: wfx: fix scan with WFM200 and WW regulation

2022-02-18 Thread Jérôme Pouiller
On Friday 18 February 2022 12:00:54 CET Greg Kroah-Hartman wrote: > On Fri, Feb 18, 2022 at 11:57:47AM +0100, Jérôme Pouiller wrote: > > On Friday 18 February 2022 11:53:58 CET Jerome Pouiller wrote: > > > From: Riccardo Ferrazzo > > > > > > Some variants

Re: [PATCH] staging: wfx: fix scan with WFM200 and WW regulation

2022-02-18 Thread Jérôme Pouiller
avoid top-posting). Nevertheless, Greg, is it sufficient for you? [1]: https://useplaintext.email/ > On Friday 18 February 2022 12:00:54 CET Greg Kroah-Hartman wrote: > > On Fri, Feb 18, 2022 at 11:57:47AM +0100, Jérôme Pouiller wrote: > > > On Friday 18 February 2022 11:53:58 CET

Re: [PATCH v10 0/1] wfx: get out from the staging area

2022-02-28 Thread Jérôme Pouiller
e staging tree, that way we would minimise the chance of conflicts > between trees. Right. > Greg, what do you think? Would this work for you? IIRC we did the same > with wilc1000 back in 2020 and I recall it went without hiccups. -- Jérôme Pouiller ___

Re: [PATCH v10 0/1] wfx: get out from the staging area

2022-04-04 Thread Jérôme Pouiller
eat to me, let's plan on that happening after 5.18-rc1 is > > out. > > Very good, we have a plan then. I marked the patch as deferred in > patchwork: > > https://patchwork.kernel.org/project/linux-wireless/patch/20220226092142.10164-2-jerome.pouil...@silabs.com/ > > Jerome, feel free to remind me about this after v5.18-rc1 is released. v5.18-rc1 is released :) -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/3] wfx: add antenna configuration files

2022-07-08 Thread Jérôme Pouiller
On Thursday 7 July 2022 19:40:27 CEST Josh Boyer wrote: > On Thu, Jul 7, 2022 at 1:04 PM Ben Brown wrote: > > On 21/02/2022 16:37, Jerome Pouiller wrote: > > > From: Jérôme Pouiller > > > > > diff --git a/WHENCE b/WHENCE > > > index 0a6cb15..96f67f7 10

<    1   2   3   4