[PATCH 25/65] staging: wfx: drop wvif->setbssparams_done

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller setbssparams_done was here to ensure that the firmware does not enable powersave before to get the first beacon. However, mac80211 already ensures it gets a beacon before to associate to the BSS. And even, if it won't, the firmware wake up at least on every DTIM, which

[PATCH 24/65] staging: wfx: drop wvif->cqm_rssi_thold

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Current code keeps a copy of bss_conf->cqm_rssi_thold in wfx_vif. There is no sane reason for that. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6 ++ drivers/staging/wfx/wfx.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --

[PATCH 02/65] staging: wfx: make hif_scan() usage clearer

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller hif_scan() return max number of jiffies to wait before the completion indication. However, if this value is negative, an error has occurred. Reword the code to reflect that behavior. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 7 +++ 1 file

[PATCH 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 80a2a9e8256f..d50b583af187

[PATCH 42/65] staging: wfx: do not update uapsd if not necessary

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_conf_tx() is called for each queue. On every call, the function updates UAPSD mask and PM mode for all queues. It is a pity since the UAPSD configuration very rarely changes and it makes exchanges between the host and the chip more difficult to track. This patch avoid

[PATCH 27/65] staging: wfx: SSID should be provided to hif_start() even if hidden

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller SSID is hidden in beacon but firmware has to know to which probe requests it has to answer. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers

[PATCH 13/65] staging: wfx: drop struct wfx_ht_info

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller This struct is no more used. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 18 +++--- drivers/staging/wfx/sta.h | 6 -- drivers/staging/wfx/wfx.h | 1 - 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/staging/wfx

[PATCH 03/65] staging: wfx: add missing PROBE_RESP_OFFLOAD feature

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Some userspace tools (hostapd) rely on probe_resp_offload fields for certain features. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index

[PATCH 46/65] staging: wfx: relocate "buffered" information to sta_priv

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller It simplify the code if field buffered is hosted in the struct sta_priv instead of in the struct wfx_link_entry. More globally, struct wfx_link_entry has no real reasons to exist and should be dropped soon. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c

[PATCH 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 16/65] staging: wfx: rename wfx_upload_beacon()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller In fact, wfx_upload_beacon() uploads beacon and probe response. So, rename it in wfx_upload_ap_templates(). The call to wfx_fwd_probe_req() has nothing to do with template uploading, so relocate it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6

[PATCH 20/65] staging: wfx: simplify wfx_flush()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Current code of wfx_flush() force to drop packets in some contexts. However, there is no obvious reasons to do that. It looks like a workaround for a bug with the old implementation of __wfx_flush(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 12

[PATCH 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,

[PATCH 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 22/65] staging: wfx: drop wvif->dtim_period

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller It is not necessary to keep a copy of dtim_period in wfx_vif. Prefer to just rely on bss_conf->dtim_period. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 20 drivers/staging/wfx/wfx.h | 1 - 2 files changed, 4 insertions(+),

[PATCH 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 10/65] staging: wfx: use specialized structs for HIF arguments

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Most of the commands that are sent to device should take struct in argument. In the current code, when this struct is binary compatible with a __le32, the driver use a __le32. This behavior is error prone. This patch fixes that and uses the specialized structs instead

[PATCH 11/65] staging: wfx: retrieve ampdu_density from sta->ht_cap

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wvif->ht_info.ht_cap is a useless copy of sta->ht_cap. It makes no sense to rely on it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/s

[PATCH 19/65] staging: wfx: fix __wfx_flush() when drop == false

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_tx_queues_clear() only clear not yet sent requests. So, it always necessary to wait for tx_queue_stats.wait_link_id_empty whatever the value of "drop" argument. In add, it is not necessary to return with tx queue locked since all calls to __wfx_flush() unl

[PATCH 09/65] staging: wfx: simplify hif_start() usage

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The structure hif_req_start come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_start() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off

[PATCH 12/65] staging: wfx: retrieve greenfield mode from sta->ht_cap and bss_conf

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wvif->ht_info contains useless copies of sta->ht_cap and bss_conf->ht_operation_mode. Prefer to retrieve information from the original structs instead of rely on wvif->ht_info. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 18 ++

[PATCH 55/65] staging: wfx: firmware never return PS status for stations

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller At the beginning, firmware could send suspend_resume indication to notify that a station wake up or sleep down. However, mac80211 already handles power save status of stations and this behavior has been removed from the firmware. So now, when suspend_resume indication

[PATCH 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 52/65] staging: wfx: replace wfx_tx_get_tid() with ieee80211_get_tid()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_tx_get_tid() was used as a wrapper around ieee80211_get_tid(). It did sometime return WFX_MAX_TID to ask to upper layers to not include the frame in "buffered" counter. The objective of this behavior is not clear, but tests has shown that wfx_tx_get

Re: [PATCH 00/65] Simplify and improve the wfx driver

2020-01-15 Thread Jérôme Pouiller
On Wednesday 15 January 2020 14:40:10 CET Greg Kroah-Hartman wrote: > On Wed, Jan 15, 2020 at 12:12:07PM +0000, Jérôme Pouiller wrote: > > From: Jérôme Pouiller > > > > Hello all, > > > > This pull request is finally bigger than I expected, sorry. > > After

[PATCH v2 05/65] staging: wfx: simplify hif_set_tx_rate_retry_policy() usage

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The structure hif_mib_set_tx_rate_retry_policy come from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate handling of this structure to hif_set_tx_rate_retry_policy() (the low level function). Signed-off-by: Jérôme

[PATCH v2 35/65] staging: wfx: simplify hif_set_mac_addr_condition()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The structure hif_mib_mac_addr_data_frame_condition come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_mac_addr_condition() is too dumb. It should pack data with hardware representation instead

[PATCH v2 37/65] staging: wfx: simplify wfx_set_mcast_filter()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller HIF functions return only serious errors (OOM or device freeze). The current handling of errors in wfx_set_mcast_filter() does not bring anything. Finally it may disturb the developer more than it helps. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 30

[PATCH v2 32/65] staging: wfx: simplify hif_mib_uc_mc_bc_data_frame_condition

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The current API defines bitfields. It is not very convenient. Prefer to use bitmasks. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 14 -- drivers/staging/wfx/hif_tx_mib.h | 9 +++-- drivers/staging/wfx/sta.c | 4

[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

[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

[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 52/65] staging: wfx: replace wfx_tx_get_tid() with ieee80211_get_tid()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_tx_get_tid() was used as a wrapper around ieee80211_get_tid(). It did sometime return WFX_MAX_TID to ask to upper layers to not include the frame in "buffered" counter. The objective of this behavior is not clear, but tests has shown that wfx_tx_get

[PATCH v2 44/65] staging: wfx: fix possible overflow on jiffies comparaison

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is recommended to use function time_*() to compare jiffies. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 14 +- 1 file changed, 5 insertions

[PATCH v2 43/65] staging: wfx: fix case where RTS threshold is 0

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller If RTS threshold is 0, it currently disables RTS. It should mean "enabled for every frames". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_tx_mib.h

[PATCH v2 46/65] staging: wfx: relocate "buffered" information to sta_priv

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller It simplify the code if field buffered is hosted in the struct sta_priv instead of in the struct wfx_link_entry. More globally, struct wfx_link_entry has no real reasons to exist and should be dropped soon. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c

[PATCH v2 45/65] staging: wfx: remove handling of "early_data"

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller It seems that purpose of "early_data" was to prevent sending data to mac80211 before station was completely associated. It is a useless precaution. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 17 + drivers/staging/wfx/data

[PATCH v2 55/65] staging: wfx: firmware never return PS status for stations

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller At the beginning, firmware could send suspend_resume indication to notify that a station wake up or sleep down. However, mac80211 already handles power save status of stations and this behavior has been removed from the firmware. So now, when suspend_resume indication

[PATCH v2 51/65] staging: wfx: check that no tx is pending before release sta

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Just for sanity. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 75c1e2aecc23..33955278d9d3 100644 --- a/drivers/staging/wfx/sta.c +++ b

[PATCH v2 49/65] staging: wfx: simplify wfx_set_tim_impl()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller Argument provided to wfx_set_tim_impl() is always wvif->aid0_bit_set and there is no reason to provide another argument. Also rename wfx_set_tim_impl() into wfx_update_tim() to reflect the new behavior. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c |

[PATCH v2 38/65] staging: wfx: simplify wfx_update_filtering()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_update_filtering() has no reason to instantiate a struct hif_mib_bcn_filter_enable. Drop it and simplify the code. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 31 +-- 1 file changed, 13 insertions(+), 18 deletions

[PATCH v2 39/65] staging: wfx: simplify wfx_scan_complete()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_scan_complete() do nothing with argument hif_ind_scan_cmpl. In add, hif_ind_scan_cmpl come from hardware API and is not expected to be used with upper layers of the driver. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 3 +-- drivers/staging/wfx

[PATCH v2 33/65] staging: wfx: simplify hif_mib_set_data_filtering

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The field "default_filter" was not obvious. In add, explicitly declare that fields default_filter and enable are booleans. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 8 +--- drivers/staging/wfx/sta.c | 3 +-- 2 files

[PATCH v2 36/65] staging: wfx: simplify hif_set_config_data_filter()

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller The structure hif_mib_config_data_filter come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_config_data_filter() is too dumb. It should pack data with hardware representation instead of leaving all

[PATCH v2 42/65] staging: wfx: do not update uapsd if not necessary

2020-01-15 Thread Jérôme Pouiller
From: Jérôme Pouiller wfx_conf_tx() is called for each queue. On every call, the function updates UAPSD mask and PM mode for all queues. It is a pity since the UAPSD configuration very rarely changes and it makes exchanges between the host and the chip more difficult to track. This patch avoid

Re: [PATCH 25/55] staging: wfx: fix name of struct hif_req_start_scan_alt

2020-01-03 Thread Jérôme Pouiller
On Friday 3 January 2020 10:27:44 CET Dan Carpenter wrote: > On Mon, Dec 16, 2019 at 05:03:46PM +0000, Jérôme Pouiller wrote: > > From: Jérôme Pouiller > > > > The original name did not make any sense. > > > > Signed-off-by: Jérôme Pouiller > > --- >

Re: [PATCH 13/55] staging: wfx: avoid double warning when no more tx policy are available

2020-01-03 Thread Jérôme Pouiller
On Friday 3 January 2020 10:21:16 CET Dan Carpenter wrote: > On Mon, Dec 16, 2019 at 05:03:40PM +0000, Jérôme Pouiller wrote: > > From: Jérôme Pouiller > > > > Currently, number of available tx retry policies is checked two times. > > Only one is sufficient. > > &

Re: [PATCH v2] Staging: wfx: Fix style issues with hif_rx.c

2019-12-29 Thread Jérôme Pouiller
> struct hif_msg *hif, void *buf) > { > size_t len = hif->len - 4; // drop header > + > dev_err(wdev->dev, "firmware exception\n"); > print_hex_dump_bytes("Dump: ", DUMP_PREFIX_

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
rse 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 3/5] staging: wfx: make warning about pending frame less scary

2020-03-13 Thread Jérôme Pouiller
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(-) > > > > diff --git a/d

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

2020-04-02 Thread Jérôme Pouiller
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
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 all cas

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: [PATCH] staging: wfx: unlock on error path

2020-05-12 Thread Jérôme Pouiller
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] 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 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

Re: [PATCH 07/23] wfx: add bus_sdio.c

2020-10-15 Thread Jérôme Pouiller
On Wednesday 14 October 2020 14:43:34 CEST Pali Rohár wrote: > On Wednesday 14 October 2020 13:52:15 Jérôme Pouiller wrote: > > On Tuesday 13 October 2020 22:11:56 CEST Pali Rohár wrote: > > > On Monday 12 October 2020 12:46:32 Jerome Pouiller wrote: > > > >

Re: [PATCH] staging: wfx: Spacing and alignment cleanup

2020-10-12 Thread Jérôme Pouiller
ies on the last development tree. To get the development tree to use, you can run: ./scripts/get_maintainer.pl --scm -f drivers/staging/wfx/debug.c -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 07/23] wfx: add bus_sdio.c

2020-10-16 Thread Jérôme Pouiller
Hello Ulf, On Friday 16 October 2020 13:30:30 CEST Ulf Hansson wrote: > On Mon, 12 Oct 2020 at 12:47, Jerome Pouiller > wrote: > > > > From: Jérôme Pouiller > > Please fill out this commit message to explain a bit more about the > patch and the HW it enables suppo

Re: [PATCH] staging: wfx: make a const array static, makes object smaller

2020-10-19 Thread Jérôme Pouiller
[...] 7 .rodata 002d 0000 1dd4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA The difference of .rodata is exactly what is expected (24 bytes) and we save 115 bytes of code. 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 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-10 Thread Jérôme Pouiller
On Friday 9 October 2020 20:52:47 CEST Kalle Valo wrote: > Jerome Pouiller writes: > > > From: Jérôme Pouiller > > > > Smatch complains: > > > >drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: > > potential NULL parameter der

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

2020-10-10 Thread Jérôme Pouiller
On Friday 9 October 2020 20:51:01 CEST Kalle Valo 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. > > > Jerome Pouiller writes: > >

Re: [PATCH 3/8] staging: wfx: standardize the error when vif does not exist

2020-10-10 Thread Jérôme Pouiller
On Saturday 10 October 2020 14:40:34 CEST Greg Kroah-Hartman wrote: > On Sat, Oct 10, 2020 at 02:22:13PM +0200, Jérôme Pouiller wrote: > > On Friday 9 October 2020 20:52:47 CEST Kalle Valo wrote: > > > Jerome Pouiller writes: > > > > > > > From: Jérôme Pou

Re: [PATCH 07/23] wfx: add bus_sdio.c

2020-10-14 Thread Jérôme Pouiller
). Anyway, if we choose to rely on the DT, should we also check the VID/PID? Personally, I am in favor to probe the device only if VID/PID match and if a DT node is found, even if it is not the usual way. -- Jérôme Pouiller ___ devel mailing list de...@lin

Re: [PATCH 01/23] dt-bindings: introduce silabs,wfx.yaml

2020-10-14 Thread Jérôme Pouiller
On Tuesday 13 October 2020 18:49:35 CEST Rob Herring wrote: > On Mon, Oct 12, 2020 at 12:46:26PM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller [...] > > + Note that in add of the properties below, the WFx driver also supports > > + `mac-address` and `local-mac-

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

2020-10-08 Thread Jérôme Pouiller
it, or it would be an unnecessary effort? [1] https://lore.kernel.org/driverdev-devel/20190919142527.31797-1-jerome.pouil...@silabs.com/ or commits a7a91ca5a23d^..40115bbc40e2 -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverp

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 manageme

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

2020-05-27 Thread Jérôme Pouiller
. 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 either non-ess

Re: [PATCH] staging: wfx: simplify virt_addr_valid call

2020-09-16 Thread Jérôme Pouiller
tmp = buf; > > } > > ret = sram_buf_write(wdev, addr, tmp, len); > > - if (!virt_addr_valid(buf)) > > + if (tmp != buf) > > kfree(tmp); > > return ret; > > } > > Jerome, any thoughts? Look

Re: [PATCH] staging: wfx: avoid uninitialized variable use

2020-10-26 Thread Jérôme Pouiller
1609180-1-jerome.pouil...@silabs.com/ -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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. > +// careful to only call

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

2020-08-10 Thread Jérôme Pouiller
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 wfx_get_ps_tim

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 v5] staging: wfx: Get descriptors for GPIOs

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

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

2020-07-06 Thread Jérôme Pouiller
lized value. > 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 caught th

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

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

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

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

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

2020-06-10 Thread Jérôme Pouiller
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] Staging: silabs si4455 serial driver

2020-12-09 Thread Jérôme Pouiller
In), dataIn); > + if (ret == 0) { > + result->CHIPREV = dataIn[0]; > + memcpy(>PART, [1],sizeof(result->PART)); > + result->PBUILD = dataIn[3]; > + memcpy(>ID, [4], sizeof(result->ID));

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

2020-12-23 Thread Jérôme Pouiller
n in provided by PDS (Platform Data Set, this is the wording used in WF200 documentation) files. For hardware integrators, the full process to create PDS files is described here: https://github.com/SiliconLabs/wfx-firmware/blob/master/PDS/README.md So this function aims to send PDS to the device. H

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

2020-12-22 Thread Jérôme Pouiller
t; +#include > > +#else > > +#include > > +#include > > +#define __packed __attribute__((__packed__)) > > +#endif > > Why check for __KERNEL__ and redefined __packed? These don't belong to a > wireless driver. In the old days, this file was shared with other pr

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

2020-12-22 Thread Jérôme Pouiller
*/ > > > > This sounds very hacky to me, I have understood that you should never > > use stack with DMA. > > You should never do that because some platforms do not support it, so no > driver should ever try to do that as they do not know what platform they > are

Re: [PATCH v3 03/24] wfx: add Makefile/Kconfig

2020-12-22 Thread Jérôme Pouiller
On Tuesday 22 December 2020 16:02:38 CET Kalle Valo wrote: > Jerome Pouiller writes: > > > From: Jérôme Pouiller > > > > Signed-off-by: Jérôme Pouiller > > [...] > > > +wfx-$(CONFIG_SPI) += bus_spi.o > > +wfx-$(subst m,y,$(CONFIG_MMC)) += bus_sdi

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

2020-12-23 Thread Jérôme Pouiller
ning on. Just to be curious, why these platforms don't support DMA in a stack allocated area? If the memory is contiguous (= not vmalloced), correctly aligned and in the first 4GB of physical memory, it should be sufficient, shouldn't? -- Jérôme Pouiller ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v3 02/24] dt-bindings: introduce silabs,wfx.yaml

2020-11-05 Thread Jérôme Pouiller
On Wednesday 4 November 2020 20:15:54 CET Rob Herring wrote: > On Wed, 04 Nov 2020 16:51:45 +0100, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > Signed-off-by: Jérôme Pouiller > > --- > > .../bindings/net/wireless/silabs,wfx.yaml | 131 ++

Re: [PATCH] staging: wfx: avoid defining array of flexible struct

2021-02-11 Thread Jérôme Pouiller
ging/wfx/hif_api_cmd.h > @@ -100,7 +100,7 @@ struct hif_req_update_ie { > u8 reserved1:5; > u8 reserved2; > __le16 num_ies; > - struct element ie[]; > + u8 ie[]; > } __packed; > > struct hif_cnf_update_ie { > -- > 2.25.1 &

<    1   2   3   4   >