Re: [PATCH v2] staging: android: ion: use macro DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops

2020-04-10 Thread Greg Kroah-Hartman
On Thu, Apr 09, 2020 at 10:43:18PM +0530, R Veera Kumar wrote: > It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file > operation rather than DEFINE_SIMPLE_ATTRIBUTE. No, it is not "more clear", the two defines are not the same thing, they do different things. If they were just

[PATCH 1/2] staging: mt7621-pci-phy: dt: bindings: add mediatek, mt7621-pci-phy.yaml

2020-04-10 Thread Sergio Paracuellos
Add bindings to describe Mediatek MT7621 PCIe PHY. Signed-off-by: Sergio Paracuellos --- .../mediatek,mt7621-pci-phy.yaml | 36 +++ 1 file changed, 36 insertions(+) create mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy.yaml diff --git a/drivers/

[PATCH 2/2] staging: mt7621-pci-phy: dt: bindings: remove bindings txt file

2020-04-10 Thread Sergio Paracuellos
Yaml file for bindings has been properly added. Hence, remove the old txt file. Signed-off-by: Sergio Paracuellos --- .../mediatek,mt7621-pci-phy.txt | 28 --- 1 file changed, 28 deletions(-) delete mode 100644 drivers/staging/mt7621-pci-phy/mediatek,mt7621-pci-phy

[PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml

2020-04-10 Thread Sergio Paracuellos
In order to get this driver a new chance to be properly mainlined convert bindings file into a new yaml one is missing. Previous bindings got the 'Reviewed-by' tag from Rob Herring last year in a second attempt to get this driver mainlined. See: - https://patchwork.kernel.org/patch/10878071/ In

[PATCH 2/2] staging: vt6656: Remove duplicate code for the phy->service assignment

2020-04-10 Thread Oscar Carter
Take out the "phy->service" assignment from the if-else statement due to it's the same for the two branches. Signed-off-by: Oscar Carter --- drivers/staging/vt6656/baseband.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/stagin

[PATCH 0/2] staging: vt6656: Refactor the vnt_get_phy_field function

2020-04-10 Thread Oscar Carter
This patch series makes a refactor of the vnt_get_phy_field function through two patches. The first one refactors the assignment of the "phy->signal" variable using a constant array with the correct values for every rate. The second patch removes duplicate code for the assignment of the "phy->ser

[PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Oscar Carter
Create a constant array with the values of the "phy->signal" for every rate. Remove all "phy->signal" assignments inside the switch statement and replace these with a single reading from the new vnt_phy_signal array. Signed-off-by: Oscar Carter --- drivers/staging/vt6656/baseband.c | 101 +++

[PATCH 01/19] staging: wfx: fix race between configure_filter and remove_interface

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_remove_interface() and wfx_configure_filter() can be run concurrently. Therefore, this patch protect access to the list of interfaces from wfx_configure_filter(). Notice that wfx_configure_filter() now lock "conf_lock" and "scan_lock". Beside that, wfx_hw_scan_work() al

[PATCH 03/19] staging: wfx: call wfx_do_unjoin() synchronously

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Currently, wfx_do_unjoin() are called by the mean of work queues. However, the contexts from where they are called are not atomic. So there is no reason to not call it synchronously. This change will simplify the code. Notice two main changes: - There no more reason to l

[PATCH 11/19] staging: wfx: request to send beacons in IBSS mode

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Currently, firmware take in charge of start/stop sending beacons while in IBSS mode. However, this behavior may change in the further releases. Currently, asking to firmware to send beacon while in IBSS mode return an error but is harmless. Therefore, send this request unc

[PATCH 16/19] staging: wfx: re-enable BA after reset

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Firmware does not support Block Acks when multiple vif are running. Thus, wfx_add_interface() and wfx_remove_interface() enable and disable Block Acks as necessary. Block Ack policy is also reset after hif_reset(). Driver have to re-enable it after each call to hif_reset().

[PATCH 05/19] staging: wfx: set all parameters before starting AP

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Current code start AP and then configure the different parameters. Since all the configuration is sent quickly after AP started, it works. However, it is not very nice. In add, last firmware releases start to disallow incorrect settings. Signed-off-by: Jérôme Pouiller ---

[PATCH 07/19] staging: wfx: remove useless call to wfx_tx_flush()

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_do_join() calls wfx_tx_lock_flush() ate beginning of the function. Therefore, the subsequent call to wfx_tx_flush() is useless. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wfx/sta.c

[PATCH 04/19] staging: wfx: implement start_ap/stop_ap

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Currently, wfx_bss_info_changed() check interface status changes and guess when the pattern match with an AP start and AP stop (through wfx_update_beaconing()). It is far easier to rely on start_ap and stop_ap callbacks provided by mac80211. wfx_bss_info_changed() keeps onl

[PATCH 17/19] staging: wfx: check value of beacon_int

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Firmware dislike when beacon_int value is 0. This patch add some warnings in case it would happen. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_

[PATCH 08/19] staging: wfx: fix support for BSS_CHANGED_KEEP_ALIVE

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Chip firmware is able to send periodic null frames to keep the association with the AP. The driver arbitrary set this period to 30sec. We prefer to rely on BSS_CHANGED_KEEP_ALIVE that provide a true value. Note that if BSS_CHANGED_KEEP_ALIVE is not received, we just disabl

[PATCH 00/19] staging: wfx: simplify start/shutdown of RF

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Hello, This series mainly simplify the processes to join/leave/create networks. Notice it intended to be applied on top of the Pull-Request named "staging: wfx: clean up HIF API". Jérôme Pouiller (19): staging: wfx: fix race between configure_filter and remove_interfac

[PATCH 06/19] staging: wfx: change the way the station associate to an AP

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Chipset need two steps to associate with an AP: 1. it start receiving beacon from the AP (done with wfx_do_join()) 2. it sent the association request (done with wfx_join_finalize()) The join request (see hif_join()) contains basic rates, beacon interval and bssid to c

[PATCH 18/19] staging: wfx: drop unused attribute 'beacon_int'

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller The field beacon_int is never read. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 5 - drivers/staging/wfx/wfx.h | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 91b4ce945598..53

[PATCH 02/19] staging: wfx: reduce hold duration of cfg80211_bss

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Pointer to cfg80211_bss is held during all duration of wfx_do_join. But, it is not necessary, We can release it far earlier. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/

[PATCH 15/19] staging: wfx: introduce wfx_join_ibss() and wfx_leave_ibss()

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Currently, IBSS networks are started by the mean of wfx_bss_info_changed(). It easier to use use callbacks provided by mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 2 ++ drivers/staging/wfx/sta.c | 19 +-- drivers/staging/wfx

[PATCH 09/19] staging: wfx: disabling keep alive during unjoin is useless

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller After a call to hif_reset(), the parameters associated with BSS are reset. So, it useless to explicitly reset the keep alive period. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b

[PATCH 12/19] staging: wfx: remove unnecessary conditions in wfx_bss_info_changed()

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_bss_info_changed() update ERP and CQM related stuff. Thus, it check the flags BSS_CHANGED_ERP_* and BSS_CHANGED_CQM. It also update ERP and CQM on join and leave by checking the flag BSS_CHANGED_ASSOC. This check is useless. Mac80211 already do that job and set necessar

[PATCH 13/19] staging: wfx: avoid duplicate updating of beacon template

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller When ERP changes, mac80211 call wfx_bss_info_changed() with BSS_CHANGED_ERP_* and with BSS_CHANGED_BEACON. The driver already update beacon template because of BSS_CHANGED_BEACON. It is not necessary to also update beacon template because of BSS_CHANGED_ERP_*. Signed-off-b

[PATCH 19/19] staging: wfx: drop useless update of macaddr

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Mac address is set in wfx_add_interface() and removed in wfx_remove_interface(). Currently, there is also an additional update of mac address in wfx_do_unjoin(). It has no rationale. Mac address is already present and nothing has changed it. Therefore, we can drop it. Sign

[PATCH 10/19] staging: wfx: drop unnecessary condition checks in wfx_upload_ap_templates()

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller In former code, wfx_upload_ap_templates() was called in more cases than necessary. Therefore, it tried to not update the frame templates if it was not necessary. Now, wfx_upload_ap_templates() is called only if mac80211 asked to update the templates. In add, it does not hur

[PATCH 14/19] staging: wfx: allow to join IBSS networks

2020-04-10 Thread Jerome Pouiller
From: Jérôme Pouiller Current code does not permit to join an already existing IBSS network. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 75f1c515751b

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Malcolm Priestley
On 10/04/2020 12:28, Oscar Carter wrote: Create a constant array with the values of the "phy->signal" for every rate. Remove all "phy->signal" assignments inside the switch statement and replace these with a single reading from the new vnt_phy_signal array. Signed-off-by: Oscar Carter ---

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Oscar Carter
On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote: > > > On 10/04/2020 12:28, Oscar Carter wrote: > > Create a constant array with the values of the "phy->signal" for every > > rate. Remove all "phy->signal" assignments inside the switch statement > > and replace these with a single

Re: [PATCH] Documentation: android: binderfs: add 'stats' mount option

2020-04-10 Thread Jonathan Corbet
On Wed, 8 Apr 2020 21:08:09 +0200 Christian Brauner wrote: > On Wed, Apr 08, 2020 at 10:29:50AM -0700, Randy Dunlap wrote: > > From: Randy Dunlap > > > > Add documentation of the binderfs 'stats' mount option. > > > > Description taken from the commit message. > > > > Fixes: f00834518ed3 ("bi

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Malcolm Priestley
On 10/04/2020 16:59, Oscar Carter wrote: On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote: On 10/04/2020 12:28, Oscar Carter wrote: Create a constant array with the values of the "phy->signal" for every rate. Remove all "phy->signal" assignments inside the switch statement

Re: [PATCH 1/2] staging: vt6656: Refactor the assignment of the phy->signal variable

2020-04-10 Thread Oscar Carter
On Fri, Apr 10, 2020 at 05:40:52PM +0100, Malcolm Priestley wrote: > > > On 10/04/2020 16:59, Oscar Carter wrote: > > On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote: > > > > > > > > > On 10/04/2020 12:28, Oscar Carter wrote: > > > > Create a constant array with the values of the

Re: [PATCH] staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

2020-04-10 Thread NeilBrown
On Sun, Mar 08 2020, Sergio Paracuellos wrote: > Function 'mt7621_pcie_init_virtual_bridges' is a bit mess and can be > refactorized properly in a cleaner way. Introduce new 'pcie_rmw' inline > function helper to do clear and set the correct bits this function needs > to work. > > Signed-off-by: S

Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml

2020-04-10 Thread NeilBrown
Hi Sergio, thanks for your continuing work on mt7621-pci. I've looked through you patches and while things seem to make sense I don't have the expertise to review them properly. I've just a build a kernel based on v5.6.3 with the patches listed below applied from your various emails over the

Re: [PATCH] staging: mt7621-pci: simplify 'mt7621_pcie_init_virtual_bridges' function

2020-04-10 Thread Sergio Paracuellos
Hi Neil, On Sat, Apr 11, 2020 at 5:26 AM NeilBrown wrote: > > On Sun, Mar 08 2020, Sergio Paracuellos wrote: > > > Function 'mt7621_pcie_init_virtual_bridges' is a bit mess and can be > > refactorized properly in a cleaner way. Introduce new 'pcie_rmw' inline > > function helper to do clear and s

Re: [PATCH 0/2] staging: mt7621-pci-phy: dt: bindings: convert bindings file from txt to yaml

2020-04-10 Thread Sergio Paracuellos
Hi Neil, On Sat, Apr 11, 2020 at 5:45 AM NeilBrown wrote: > > > Hi Sergio, > thanks for your continuing work on mt7621-pci. > I've looked through you patches and while things seem to make sense I > don't have the expertise to review them properly. > > I've just a build a kernel based on v5.6.