[PATCH v2 30/33] staging: wfx: explain the purpose of wfx_send_pds()

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller On first look, the goal of wfx_send_pds() is not obvious. A small explanation is welcomed. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c

[PATCH v2 27/33] staging: wfx: avoid c99 comments

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver is a network driver. C99 comments are prohibited in this part of the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 18 --- drivers/staging/wfx/bus_sdio.c| 8 +-- drivers/staging/wfx/bus_spi.c | 12

[PATCH v2 28/33] staging: wfx: fix comments styles

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Unify all comments of the wfx driver to use the same comment style. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 11 +++ drivers/staging/wfx/bus_spi.c | 6 ++ drivers/staging/wfx/fwio.c| 3 +-- drivers/staging/wfx/main.h| 3

[PATCH v2 29/33] staging: wfx: remove useless comments after #endif

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Comments after the last #endif of header files don't bring any information and are redundant with the name of the file. Drop them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.h | 2 +- drivers/staging/wfx/data_tx.h

[PATCH v2 25/33] staging: wfx: update files descriptions

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Each file of the driver contains a short description of its purpose. These description were a bit outdated. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_rx.h | 2 +-

[PATCH v2 26/33] staging: wfx: reformat comment

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The new comment takes only one line instead of three. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index

[PATCH v2 24/33] staging: wfx: remove references to WFxxx in comments

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The WF200 is the only representative of the WFxxx series and the development of any successor is not expected. So, for clarity, replace occurrences of "WFxxx" with "WF200". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++--

[PATCH v2 23/33] staging: wfx: fix space after cast operator

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller checkpatch.pl reports that cast operators should not been followed by a space. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index

[PATCH v2 20/33] staging: wfx: apply naming rules in hif_tx_mib.c

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller All the functions of hif_tx_mib.c format data to be sent to the hardware. In this file, the struct to be sent is always named 'arg'. Also applies this rule to hif_set_macaddr(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 6 +++--- 1 file

[PATCH v2 21/33] staging: wfx: remove unused definition

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The enum hif_fw_type is never used in the driver. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h

[PATCH v2 22/33] staging: wfx: remove useless debug statement

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller In the early age, it was unexpected to access a VIF that did not exist. With current code, this happens frequently. Having a trace associated on this event brings absolutely no informations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 5 + 1 file

[PATCH v2 18/33] staging: wfx: reorder function for slightly better eye candy

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller For a code more eye candy, group all the unconditional assignments together. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c

[PATCH v2 19/33] staging: wfx: fix error names

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller ENOTSUP is an alias of EOPNOTSUPP. However, EOPNOTSUPP is preferred. 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

[PATCH v2 17/33] staging: wfx: simplify hif_join()

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The new code is smaller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 6ffbae32028b..aea0ed55edc6 100644 ---

[PATCH v2 15/33] staging: wfx: fix misleading 'rate_id' usage

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The driver sometime use the term 'rate_id' to identify a retry policy (which is in fact a series of rate IDs). This is misleading. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

[PATCH v2 14/33] staging: wfx: uniformize counter names

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The device provide some internal statistic counters. However, the names of counter were not very meaningful. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 45 - drivers/staging/wfx/hif_api_mib.h | 82

[PATCH v2 16/33] staging: wfx: declare variables at beginning of functions

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller For better code, we prefer to declare all the local variables at beginning of the functions. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c

[PATCH v2 13/33] staging: wfx: update with the firmware API 3.8

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The firmware API 3.8 introduces new statistic counters. These changes are backward compatible. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 3 +++ drivers/staging/wfx/hif_api_mib.h | 5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff

[PATCH v2 12/33] staging: wfx: simplify API coherency check

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The 'channel' argument of hif_join() should never be NULL. hif_join() does not have the responsibility to recover bug of caller. A call to WARN() at the beginning of the function reminds this constraint to the developer. In current code, if the argument channel is NULL,

[PATCH v2 11/33] staging: wfx: relax the PDS existence constraint

2021-09-13 Thread Jerome Pouiller
the development, in most of the cases, an empty PDS file is sufficient to start WiFi communication. This patch keep an error, but allow the user to play with the device. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH v2 09/33] staging: wfx: declare support for TDLS

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Since the firmware API 3.8, the device is able to support TDLS. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 4b9fdf99981b..0a9d02d1af2f

[PATCH v2 05/33] staging: wfx: avoid possible lock-up during scan

2021-09-13 Thread Jerome Pouiller
ime. This patch reworks the scan processing. It gives to the device a smaller time budget than previously. However, it does not expect the scan to be complete and it is able to send another scan request to finish the work. A big part of the patch aims to avoid an infinite loop if the device goes cr

[PATCH v2 10/33] staging: wfx: fix support for CSA

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The WF200 is able to filter beacons. However, it uses a positive filter: any change to an IE not listed won't be reported. In current code, the changes in Channel Switch Announcement (CSA) are not reported to the host. Thus, it fixes the support for CSA in station mode.

[PATCH v2 08/33] staging: wfx: take advantage of wfx_tx_queue_empty()

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_tx_queues_check_empty() can be slightly simplified by calling wfx_tx_queue_empty(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/queue.c

[PATCH v2 07/33] staging: wfx: fix atomic accesses in wfx_tx_queue_empty()

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Checking if a skb_queue is empty is not an atomic operation. We should take some precautions to do it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/queue.c

[PATCH v2 06/33] staging: wfx: drop unused argument from hif_scan()

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller It is no more necessary to compute the expected duration of the scan request. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 9 + drivers/staging/wfx/hif_tx.h | 2 +- drivers/staging/wfx/scan.c | 2 +- 3 files changed, 3 insertions(+), 10

[PATCH v2 04/33] staging: wfx: wait for SCAN_CMPL after a SCAN_STOP

2021-09-13 Thread Jerome Pouiller
n request. A timeout happens almost never but is theoretically possible. Currently, if it happens the driver does not wait for the SCAN_COMPL. Then, when the driver starts the next scan request, the device may return -EBUSY (scan requests often occur back-to-back). This patch give a chance t

[PATCH v2 03/33] staging: wfx: ignore PS when STA/AP share same channel

2021-09-13 Thread Jerome Pouiller
the user expected. This patch detect this case and applies a sane configuration in all cases. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging

[PATCH v2 02/33] staging: wfx: do not send CAB while scanning

2021-09-13 Thread Jerome Pouiller
) since this traffic cannot be delayed. It could be possible to make the lock local to each interface. But It would only push the problem further. The device won't be able to send the CAB before the end of the scan. So, this patch just ignore the DTIM indication when a scan is in progress

[PATCH v2 01/33] staging: wfx: use abbreviated message for "incorrect sequence"

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver checks carefully the coherency of of the DTIM notifications. We have noticed several times some small inconsistencies from the firmware on these notification. They have never been critical. However on the driver side they lead to big fat warnings. Worse, if

[PATCH v2 00/33] staging/wfx: usual maintenance

2021-09-13 Thread Jerome Pouiller
From: Jérôme Pouiller Hi, The following PR contains now usual maintenance for the wfx driver. I have more-or-less sorted the patches by importance: - the first ones and the two last ones are fixes for a few corner-cases reported by users - the patches 9 and 10 add support for CSA

Re: [PATCH] [PATCH 4.9] staging: android: ion: fix page is NULL

2021-09-11 Thread Cheng Chao
the bug has been introduced by the patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/staging/android/ion/ion_system_heap.c?h=v4.9.282=e7f63771b60e7802c5a9b437c5ab1a8e33a0bb35 On Sat, Sep 11, 2021 at 10:20 PM Cheng Chao wrote: > > for longterm v4

Re: [PATCH] [PATCH 4.9] staging: android: ion: fix page is NULL

2021-09-11 Thread Cheng Chao
; --- a/drivers/staging/android/ion/ion_system_heap.c > > +++ b/drivers/staging/android/ion/ion_system_heap.c > > @@ -75,7 +75,7 @@ static struct page *alloc_buffer_page(struct > > ion_system_heap *heap, > > > > page = ion_page_pool_alloc(pool); > > >

Re: [PATCH] [PATCH 4.9] staging: android: ion: fix page is NULL

2021-09-11 Thread Greg KH
ge *alloc_buffer_page(struct > ion_system_heap *heap, > > page = ion_page_pool_alloc(pool); > > - if (cached) > + if (page && cached) > ion_pages_sync_for_device(NULL, page, PAGE_SIZE << order, >

[PATCH] [PATCH 4.9] staging: android: ion: fix page is NULL

2021-09-11 Thread Cheng Chao
kernel panic is here: Unable to handle kernel paging request at virtual address b038 pgd = d9d94000 [b038] *pgd= Internal error: Oops: 2805 [#1] PREEMPT SMP ARM ... task: daa2dd00 task.stack: da194000 PC is at v7_dma_clean_range+0x1c/0x34 LR is at

[PATCH v5 1/3] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip

2021-09-10 Thread lichenyang
From: Chenyang Li This patch adds an initial DRM driver for the Loongson LS7A1000 bridge chip(LS7A). The LS7A bridge chip contains two display controllers, support dual display output. The maximum support for each channel display is to 1920x1080@60Hz. At present, DC device detection and DRM

[PATCH v5 2/3] drm/loongson: Add GPIO and I2C driver for loongson drm.

2021-09-10 Thread lichenyang
Implement use GPIO and I2C driver to detect connector and fetch EDID via DDC. v4: - Delete the gpioo_chip subsystem call. - Delete some redundant prints. v3: - Change some driver log to the drm_ version. v2: - Optimize the error handling process. - Delete loongson_i2c_bus_match and

[PATCH v5 3/3] drm/loongson: Add interrupt driver for LS7A

2021-09-10 Thread lichenyang
Add LS7A DC vsync interrupt enable and close function, and register irq_handler function interface. Add vbrank event processing flow. v4: - Replace drm_irq_install with devm_request_irq. - Delete the irq_ hooks in drm_driver. v3: - Improve code readability. - Use the to_pci_dev function to get

Re: [PATCH 31/31] staging: wfx: indent functions arguments

2021-09-10 Thread Kari Argillander
nction arguments must be aligned with left parenthesis. Apply that > > > rule. > > > > To my eyes something still go wrong with this patch. Might be my email > > fault, but every other patch looks ok. Now these are too left. > > I don't try anymore to check alignments

Re: [PATCH 00/31] [PATCH 00/31] staging/wfx: usual maintenance

2021-09-10 Thread Jérôme Pouiller
> > more-or-less sorted the patches by importance: > > - the first ones are fixes for a few corner-cases reported by users > > - the patches 9 and 10 add support for CSA and TDLS > > - then the end of the series is mostly cosmetics and nitpicking > > Nic

Re: [PATCH 02/31] staging: wfx: do not send CAB while scanning

2021-09-10 Thread Jérôme Pouiller
layed. > > > > > > > > It could be possible to make the lock local to each interface. But It > > > > would only push the problem further. The device won't be able to send > > > > the CAB before the end of the scan. > > > > >

Re: [PATCH 31/31] staging: wfx: indent functions arguments

2021-09-10 Thread Jérôme Pouiller
To my eyes something still go wrong with this patch. Might be my email > fault, but every other patch looks ok. Now these are too left. I don't try anymore to check alignments with my email viewer. The original patch is as I expect (and I take care to send my patch with base64 to avoid pitfalls with M

Re: [PATCH 00/31] [PATCH 00/31] staging/wfx: usual maintenance

2021-09-10 Thread Kari Argillander
corner-cases reported by users > - the patches 9 and 10 add support for CSA and TDLS > - then the end of the series is mostly cosmetics and nitpicking Nicely formated patch series. Should be pretty easy to review. I just check for fast eyes. But overall nice clean up series. > > I

Re: [PATCH 29/31] staging: wfx: remove useless comments after #endif

2021-09-10 Thread Kari Argillander
; > At the end of any non-trivial #if or #ifdef block (more than a > > few line), place a comment after the #endif on the same line, > > noting the conditional expression used. > > > > There is no point dropping them imo. If you think about space

Re: [PATCH 13/31] staging: wfx: update with API 3.8

2021-09-10 Thread Jérôme Pouiller
On Friday 10 September 2021 18:43:26 CEST Kari Argillander wrote: > > On Fri, Sep 10, 2021 at 06:04:46PM +0200, Jerome Pouiller wrote: > > From: Jérôme Pouiller > > > > API 3.8 introduces new statistic counters. These changes are backward > > compatible. > > It will be obvious to some what API

Re: [PATCH 02/31] staging: wfx: do not send CAB while scanning

2021-09-10 Thread Kari Argillander
gt; > It could be possible to make the lock local to each interface. But It > > > would only push the problem further. The device won't be able to send > > > the CAB before the end of the scan. > > > > > > So, this patch just ignore the DTIM indication when a scan

Re: [PATCH 31/31] staging: wfx: indent functions arguments

2021-09-10 Thread Kari Argillander
On Fri, Sep 10, 2021 at 06:05:04PM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > Function arguments must be aligned with left parenthesis. Apply that > rule. To my eyes something still go wrong with this patch. Might be my email fault, but every other patch l

Re: [PATCH 02/31] staging: wfx: do not send CAB while scanning

2021-09-10 Thread Jérôme Pouiller
This causes > > trouble when the queued traffic contains CAB (Content After DTIM Beacon) > > since this traffic cannot be delayed. > > > > It could be possible to make the lock local to each interface. But It > > would only push the problem further. The device won't be ab

Re: [PATCH 29/31] staging: wfx: remove useless comments after #endif

2021-09-10 Thread Jérôme Pouiller
e a comment after the #endif on the same line, > noting the conditional expression used. > > There is no point dropping them imo. If you think about space saving > this patch will take more space. Because it will be in version history. > So nack from me unless some one can trun my head

Re: [PATCH 13/31] staging: wfx: update with API 3.8

2021-09-10 Thread Kari Argillander
On Fri, Sep 10, 2021 at 06:04:46PM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > API 3.8 introduces new statistic counters. These changes are backward > compatible. It will be obvious to some what API 3.8 is. But at least me can rise my hand and admit that I do not. Probably wfx api

[PATCH v3 1/1] binder: fix freeze race

2021-09-10 Thread Li Li
thread A initiates a new sync binder transaction to process B; 3) Main thread A is frozen by "echo 1 > cgroup.freeze"; 4) The response from process B reaches the frozen thread, which will unexpectedly fail. This patch provides a mechanism to check if there's any new pending transact

[PATCH v3 0/1] binder: fix freeze race

2021-09-10 Thread Li Li
the app. This patch allows a post-froze rollback mechanism by checking if there's any new pending binder transaction waiting for response. At the same time, it treats the response transaction like an oneway transaction so that the response can successfully reach the frozen process. Changes in v2

Re: [PATCH 17/31] staging: wfx: simplify hif_join()

2021-09-10 Thread Kari Argillander
On Fri, Sep 10, 2021 at 06:04:50PM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > The new code is smaller. > > Signed-off-by: Jérôme Pouiller > --- > drivers/staging/wfx/hif_tx.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git

Re: [PATCH 02/31] staging: wfx: do not send CAB while scanning

2021-09-10 Thread Kari Argillander
he CAB before the end of the scan. > > So, this patch just ignore the DTIM indication when a scan is in > progress. The firmware will send another indication on the next DTIM and > this time the system will be able to send the traffic just behind the > beacon. > > The only dr

Re: [PATCH 29/31] staging: wfx: remove useless comments after #endif

2021-09-10 Thread Kari Argillander
If you think about space saving this patch will take more space. Because it will be in version history. So nack from me unless some one can trun my head around. > > Signed-off-by: Jérôme Pouiller > --- > drivers/staging/wfx/bh.h | 2 +- > drivers/staging/wfx/data_rx.h |

[PATCH 31/31] staging: wfx: indent functions arguments

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Function arguments must be aligned with left parenthesis. Apply that rule. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 2 +- drivers/staging/wfx/key.c| 26 +- 2 files changed, 14 insertions(+), 14 deletions(-)

[PATCH 30/31] staging: wfx: explain the purpose of wfx_send_pds()

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller On first look, the goal of wfx_send_pds() is not obvious. A small explanation is welcomed. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c

[PATCH 29/31] staging: wfx: remove useless comments after #endif

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Comments after the last #endif of header files don't bring any information and are redundant with the name of the file. Drop them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.h | 2 +- drivers/staging/wfx/data_tx.h

[PATCH 27/31] staging: wfx: avoid c99 comments

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver is a network driver. C99 comments are prohibited in this part of the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 18 +++--- drivers/staging/wfx/bus_sdio.c| 8 +-- drivers/staging/wfx/bus_spi.c | 12

[PATCH 28/31] staging: wfx: fix comments styles

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Unify all comments of the wfx driver to use the same comment style. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 11 +++ drivers/staging/wfx/bus_spi.c | 6 ++ drivers/staging/wfx/fwio.c| 3 +-- drivers/staging/wfx/main.h| 3

[PATCH 26/31] staging: wfx: reformat comment

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The new comment takes only one line instead of three. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index

[PATCH 25/31] staging: wfx: update files descriptions

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Each file of the driver contains a short description of its purpose. These description were a bit outdated. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_rx.h | 2 +-

[PATCH 24/31] staging: wfx: remove references to WFxxx in comments

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The WF200 is the only representative of the WFxxx series and the development of any successor is not expected. So, for clarity, replace occurrences of "WFxxx" with "WF200". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++--

[PATCH 23/31] staging: wfx: fix space after cast operator

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller checkpatch.pl reports that cast operators should not been followed by a space. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index

[PATCH 22/31] staging: wfx: remove useless debug statement

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller In the early age, it was unexpected to access a VIF that did not exist. With current code, this happens frequently. Having a trace associated on this event brings absolutely no informations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 5 + 1 file

[PATCH 21/31] staging: wfx: remove unused definition

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The enum hif_fw_type is never used in the driver. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h

[PATCH 20/31] staging: wfx: apply naming rules in hif_tx_mib.c

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller All the functions of hif_tx_mib.c format data to be sent to the hardware. In this file, the struct to be sent is always named 'arg'. Also applies this rule to hif_set_macaddr(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 6 +++--- 1 file

[PATCH 19/31] staging: wfx: fix error names

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller ENOTSUP is an alias of EOPNOTSUPP. However, EOPNOTSUPP is preferred. 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

[PATCH 18/31] staging: wfx: reorder function for slightly better eye candy

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller For a code more eye candy, group all the unconditional assignments together. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c

[PATCH 17/31] staging: wfx: simplify hif_join()

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The new code is smaller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 6ffbae32028b..aea0ed55edc6 100644 ---

[PATCH 16/31] staging: wfx: declare variables at beginning of functions

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller For better code, we prefer to declare all the local variables at beginning of the functions. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c

[PATCH 15/31] staging: wfx: fix misleading 'rate_id' usage

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The driver sometime use the term 'rate_id' to identify a retry policy (which is in fact a series of rate IDs). This is misleading. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff

[PATCH 14/31] staging: wfx: uniformize counter names

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The device provide some internal statistic counters. However, the names of counter were not very meaningful. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 45 - drivers/staging/wfx/hif_api_mib.h | 82

[PATCH 13/31] staging: wfx: update with API 3.8

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller API 3.8 introduces new statistic counters. These changes are backward compatible. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 3 +++ drivers/staging/wfx/hif_api_mib.h | 5 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH 12/31] staging: wfx: simplify API coherency check

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The 'channel' argument of hif_join() should never be NULL. hif_join() does not have the responsibility to recover bug of caller. A call to WARN() at the beginning of the function reminds this constraint to the developer. In current code, if the argument channel is NULL,

[PATCH 11/31] staging: wfx: relax the PDS existence constraint

2021-09-10 Thread Jerome Pouiller
the development, in most of the cases, an empty PDS file is sufficient to start WiFi communication. This patch keep an error, but allow the user to play with the device. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[PATCH 10/31] staging: wfx: fix support for CSA

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The WF200 is able to filter beacons. However, it uses a positive filter: any change to an IE not listed won't be reported. In current code, the changes in Channel Switch Announcement (CSA) are not reported to the host. Thus, it fixes the support for CSA in station mode.

[PATCH 09/31] staging: wfx: declare support for TDLS

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Since API 3.8, the device is able to support TDLS. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 4b9fdf99981b..0a9d02d1af2f 100644 ---

[PATCH 08/31] staging: wfx: take advantage of wfx_tx_queue_empty()

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller wfx_tx_queues_check_empty() can be slightly simplified by calling wfx_tx_queue_empty(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/queue.c

[PATCH 07/31] staging: wfx: fix atomic accesses in wfx_tx_queue_empty()

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Checking if a skb_queue is empty is not an atomic operation. We should take some precautions to do it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/queue.c

[PATCH 06/31] staging: wfx: drop unused argument from hif_scan()

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller It is no more necessary to compute the expected duration of the scan request. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 9 + drivers/staging/wfx/hif_tx.h | 2 +- drivers/staging/wfx/scan.c | 2 +- 3 files changed, 3 insertions(+), 10

[PATCH 05/31] staging: wfx: avoid possible lock-up during scan

2021-09-10 Thread Jerome Pouiller
ime. This patch reworks the scan processing. It gives to the device a smaller time budget than previously. However, it does not expect the scan to be complete and it is able to send another scan request to finish the work. A big part of the patch aims to avoid an infinite loop if the device goes cr

[PATCH 04/31] staging: wfx: wait for SCAN_CMPL after a SCAN_STOP

2021-09-10 Thread Jerome Pouiller
n request. A timeout happens almost never but is theoretically possible. Currently, if it happens the driver does not wait for the SCAN_COMPL. Then, when the driver starts the next scan request, the device may return -EBUSY (scan requests often occur back-to-back). This patch give a chance t

[PATCH 03/31] staging: wfx: ignore PS when STA/AP share same channel

2021-09-10 Thread Jerome Pouiller
the user expected. This patch detect this case and applies a sane configuration in all cases. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging

[PATCH 02/31] staging: wfx: do not send CAB while scanning

2021-09-10 Thread Jerome Pouiller
) since this traffic cannot be delayed. It could be possible to make the lock local to each interface. But It would only push the problem further. The device won't be able to send the CAB before the end of the scan. So, this patch just ignore the DTIM indication when a scan is in progress

[PATCH 00/31] [PATCH 00/31] staging/wfx: usual maintenance

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller Hi, The following PR contains now usual maintenance for the wfx driver. I have more-or-less sorted the patches by importance: - the first ones are fixes for a few corner-cases reported by users - the patches 9 and 10 add support for CSA and TDLS - then the end

[PATCH 01/31] staging: wfx: use abbreviated message for "incorrect sequence"

2021-09-10 Thread Jerome Pouiller
From: Jérôme Pouiller The wfx driver checks carefully the coherency of of the DTIM notifications. We have noticed several times some small inconsistencies from the firmware on these notification. They have never been critical. However on the driver side they lead to big fat warnings. Worse, if

Re: [PATCH v2 1/1] binder: fix freeze race

2021-09-10 Thread Greg KH
On Thu, Sep 09, 2021 at 11:17:42PM -0700, Li Li wrote: > On Thu, Sep 9, 2021 at 10:38 PM Greg KH wrote: > > > > On Thu, Sep 09, 2021 at 08:53:16PM -0700, Li Li wrote: > > > struct binder_frozen_status_info { > > > __u32pid; > > > + > > > + /* process received sync

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-10 Thread Li Li
On Thu, Sep 9, 2021 at 11:03 PM Dan Carpenter wrote: > > On Thu, Sep 09, 2021 at 04:21:41PM -0700, Li Li wrote: > > @@ -4648,6 +4647,22 @@ static int binder_ioctl_get_node_debug_info(struct > > binder_proc *proc, > > return 0; > > } > > > > +static int binder_txns_pending(struct

Re: [PATCH v2 1/1] binder: fix freeze race

2021-09-10 Thread Li Li
On Thu, Sep 9, 2021 at 10:38 PM Greg KH wrote: > > On Thu, Sep 09, 2021 at 08:53:16PM -0700, Li Li wrote: > > struct binder_frozen_status_info { > > __u32pid; > > + > > + /* process received sync transactions since last frozen > > + * bit 0: received sync transaction

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-10 Thread Dan Carpenter
On Thu, Sep 09, 2021 at 04:21:41PM -0700, Li Li wrote: > @@ -4648,6 +4647,22 @@ static int binder_ioctl_get_node_debug_info(struct > binder_proc *proc, > return 0; > } > > +static int binder_txns_pending(struct binder_proc *proc) > +{ > + struct rb_node *n; > + struct

Re: [PATCH v2 1/1] binder: fix freeze race

2021-09-09 Thread Greg KH
cess B reaches the frozen thread, which will > unexpectedly fail. > > This patch provides a mechanism to check if there's any new pending > transaction happening between ioctl(BINDER_FREEZE) and freezing the > main thread. If there's any, the main thread freezing operation can > be r

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Todd Kjos
ight happen. > > 1) Binder interface is frozen by ioctl(BINDER_FREEZE); > 2) Main thread initiates a new sync binder transaction; > 3) Main thread is frozen by "echo 1 > cgroup.freeze"; > 4) The response reaches the frozen thread, which will unexpectedly fail. > > T

[PATCH v2 1/1] binder: fix freeze race

2021-09-09 Thread Li Li
thread A initiates a new sync binder transaction to process B; 3) Main thread A is frozen by "echo 1 > cgroup.freeze"; 4) The response from process B reaches the frozen thread, which will unexpectedly fail. This patch provides a mechanism to check if there's any new pending transact

[PATCH v2 0/1] binder: fix freeze race

2021-09-09 Thread Li Li
the app. This patch allows a post-froze rollback mechanism by checking if there's any new pending binder transaction waiting for response. At the same time, it treats the response transaction like an oneway transaction so that the response can successfully reach the frozen process. Changes in v2

Re: [PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Li Li
Hi Todd, Thanks for reviewing the patch! Please see my reply below. And I'll send out v2 soon addressing your concerns. On Thu, Sep 9, 2021 at 4:54 PM Todd Kjos wrote: > > On Thu, Sep 9, 2021 at 4:21 PM Li Li wrote: > > > > From: Li Li > > > > Currently cg

[PATCH v1 1/1] binder: fix freeze race

2021-09-09 Thread Li Li
binder transaction; 3) Main thread is frozen by "echo 1 > cgroup.freeze"; 4) The response reaches the frozen thread, which will unexpectedly fail. This patch provides a mechanism for user space freezer manager to check if there's any new pending transaction happening between

[PATCH v1 0/1] binder: fix freeze race

2021-09-09 Thread Li Li
the app. This patch allows a post-froze rollback mechanism by checking if there's any new pending binder transaction waiting for response. At the same time, it treats the response transaction like an oneway transaction so that the response can successfully reach the frozen process. Li Li (1

Re: [PATCH] binder: make sure fd closes complete

2021-09-03 Thread Todd Kjos
On Fri, Sep 3, 2021 at 1:06 AM Dan Carpenter wrote: > > On Thu, Sep 02, 2021 at 08:35:35AM -0700, Todd Kjos wrote: > > On Tue, Aug 31, 2021 at 12:24 AM Martijn Coenen wrote: > > > > > > On Mon, Aug 30, 2021 at 9:51 PM 'Todd Kjos' via kernel-team > > > wrote: > > > > > > > > During

Re: [PATCH] binder: make sure fd closes complete

2021-09-03 Thread Dan Carpenter
On Thu, Sep 02, 2021 at 08:35:35AM -0700, Todd Kjos wrote: > On Tue, Aug 31, 2021 at 12:24 AM Martijn Coenen wrote: > > > > On Mon, Aug 30, 2021 at 9:51 PM 'Todd Kjos' via kernel-team > > wrote: > > > > > > During BC_FREE_BUFFER processing, the BINDER_TYPE_FDA object > > > cleanup may close 1 or

<    2   3   4   5   6   7   8   9   10   11   >