Re: [PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Kalle Valo
Himanshu Jha writes: > Check memory allocation failure and return -ENOMEM if failure > occurs. > > Signed-off-by: Himanshu Jha The title prefix is wrong:

Re: [PATCH v12 7/8] wireless: ipw2200: Replace PCI pool old API

2017-08-22 Thread Kalle Valo
+ linux-wireless Stanislav Yakovlev writes: > On 22 August 2017 at 07:47, Romain Perier wrote: >> The PCI pool API is deprecated. This commit replaces the PCI pool old >> API by the appropriate function with the DMA pool API. >> >>

Re: [PATCH 17/30] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-08-22 Thread Ian Molton
On 22/08/17 20:44, Arend van Spriel wrote: > By the way, the driver prefix in the subject is wrong, ie. brcmfamc > should be brcmfmac. I think it already was wrong in the previous series, > but I forgot to mention it. Drat. well spotted :) -Ian

Re: [PATCH v5] brcmfmac cleanup

2017-08-22 Thread Ian Molton
On 22/08/17 20:41, Arend van Spriel wrote: > On 22-08-17 13:25, Ian Molton wrote: >> Hi folks, >> >> Arend, as requested - a respin to take account of your comments. >> >> Unfortunately, although I've only included the patches you requested >> from v4, >> breaking out some of the simpler changes

[PATCH v3 1/2] ath10k: add the PCI PM core suspend/resume ops

2017-08-22 Thread ryanhsu
From: Ryan Hsu The actual PCI suspend/resume in ath10k has been handled in wow.c, but in the case of the device doesn't support remote wakeup, the .hif_suspend() and .hif_resume() will never be handled. ath10k_wow_op_suspend() { if

[PATCH v3 2/2] ath10k: Configure and enable the wakeup capability

2017-08-22 Thread ryanhsu
From: Ryan Hsu ACPI will rely on device driver to tell it if the device could support wakeup function when system in D3 state. This has caused some platform can't support remote wakeup correctly, because the ACPI wakeup GPE is not enabled, hence registers the

[PATCH] ath10k: fix napi_poll budget overflow

2017-08-22 Thread ryanhsu
From: Ryan Hsu In napi_poll, the budget number is used to control the amount of packets we should handle per poll to balance the resource in the system. In the list of the amsdu packets reception, we check if there is budget count left and handle the complete list of

[PATCH v2 1/2] ath10k: add the PCI PM core suspend/resume ops

2017-08-22 Thread ryanhsu
From: Ryan Hsu The actual PCI suspend/resume in ath10k has been handled in wow.c, but in the case of the device doesn't support remote wakeup, the .hif_suspend() and .hif_resume() will never be handled. ath10k_wow_op_suspend() { if

[PATCH v2 2/2] ath10k: Configure and enable the wakeup capability

2017-08-22 Thread ryanhsu
From: Ryan Hsu ACPI will rely on device driver to tell it if the device could support wakeup function when system in D3 state. This has caused some platform can't support remote wakeup correctly, because the ACPI wakeup GPE is not enabled, hence registers the

[PATCH] wireless: allow send peer mac in rssi cqm notify

2017-08-22 Thread Pradeep Kumar Chitrapu
Extend cqm rssi notifier apis to include peer mac address. Currently netlink cqm msg already accepts the mac. With this change just passing the mac address as an argument to cfg and mac80211 apis. Signed-off-by: Pradeep Kumar Chitrapu ---

Re: [PATCH 17/30] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-08-22 Thread Arend van Spriel
On 22-08-17 21:38, Arend van Spriel wrote: On 22-08-17 14:50, Julian Calaby wrote: Hi Ian, On Tue, Aug 22, 2017 at 9:25 PM, Ian Molton wrote: All functions that might require the window address changing call brcmf_sdiod_set_backplane_window() prior to access. Thus

Re: [PATCH v5] brcmfmac cleanup

2017-08-22 Thread Arend van Spriel
On 22-08-17 13:25, Ian Molton wrote: Hi folks, Arend, as requested - a respin to take account of your comments. Unfortunately, although I've only included the patches you requested from v4, breaking out some of the simpler changes (whitespace, macos, etc.) has grown the set back up to 30

Re: [PATCH 17/30] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-08-22 Thread Arend van Spriel
On 22-08-17 14:50, Julian Calaby wrote: Hi Ian, On Tue, Aug 22, 2017 at 9:25 PM, Ian Molton wrote: All functions that might require the window address changing call brcmf_sdiod_set_backplane_window() prior to access. Thus resetting the window is not required. Wouldn't

[PATCH] rtlwifi: rtl8821ae: fix spelling mistake: "faill" -> "failed"

2017-08-22 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 17/30] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-08-22 Thread Julian Calaby
Hi Ian, On Tue, Aug 22, 2017 at 9:25 PM, Ian Molton wrote: > All functions that might require the window address changing call > brcmf_sdiod_set_backplane_window() prior to access. Thus resetting > the window is not required. Wouldn't it be more safe to write these sorts of

[PATCH 29/30] brcmfmac: Remove array of functions

2017-08-22 Thread Ian Molton
Replace the array of functions with a pair of pointers to the relevant functions. Signed-off-by: Ian Molton Acked-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 115 +++---

[PATCH 15/30] brcmfmac: Tidy register definitions a little

2017-08-22 Thread Ian Molton
Trivial tidy of register definitions. Signed-off-by: Ian Molton --- .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 ++-- .../net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 19 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff

[PATCH 27/30] brcmfmac: Replace function index with function pointer

2017-08-22 Thread Ian Molton
In preparation for removing the function array, remove all code that refers to function by index and replace with pointers to the function itself. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel # Conflicts: #

[PATCH 10/30] brcmfmac: Rename bcmerror to err

2017-08-22 Thread Ian Molton
Trivial cleanup of nasty variable name Signed-off-by: Ian Molton Acked-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 30/30] brcmfmac: Reduce the noise from repeatedly dereferencing common pointers

2017-08-22 Thread Ian Molton
This introduces no functional changes, but makes the code drastically more readable, reducing the amount of dereferencing performed inside functions throughout the SDIO core. For example, reduce: sdio_release_host(bus->sdiodev->func1); to: sdio_release_host(func1); Fixup a few

[PATCH 22/30] brcmfmac: Rename buscore->core for consistency

2017-08-22 Thread Ian Molton
Avoid confusion with unrelated _buscore labels. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

[PATCH 26/30] brcmfmac: More efficient and slightly easier to read fixup for 4339 chips

2017-08-22 Thread Ian Molton
Its more efficient to test the register we're interested in first, potentially avoiding two more comparisons, and therefore always avoiding one comparison per call on all other chips. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 9

[PATCH 19/30] brcmfmac: Remove unused macro.

2017-08-22 Thread Ian Molton
This macro is used exactly nowhere in the code. Delete it. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

[PATCH 13/30] brcmfmac: Clarify if using braces.

2017-08-22 Thread Ian Molton
Whilst this if () statement is technically correct, it lacks clarity. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 14/30] brcmfmac: Rename / replace old IO functions with simpler ones.

2017-08-22 Thread Ian Molton
Primarily this patch removes: brcmf_sdiod_f0_writeb() brcmf_sdiod_reg_write() brcmf_sdiod_reg_read() Since we no longer use the quirky method of deciding which function to address via the address being accessed, take the opportunity to rename some IO functions more in line with common kernel

[PATCH 28/30] brcmfmac: Clean up interrupt macros

2017-08-22 Thread Ian Molton
Make it more obvious that this code acually enables interrupts, and provide nice definitions for the bits in the register. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 3 ++-

[PATCH 12/30] brcmfmac: Whitespace fixes.

2017-08-22 Thread Ian Molton
Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

[PATCH 23/30] brcmfmac: stabilise the value of ->sbwad in use for some xfer routines.

2017-08-22 Thread Ian Molton
The IO functions operate within the Chipcommon IO window. Explicitly set this, rather than relying on the last initialisation IO access to leave it set to the right value by chance. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 8

[PATCH 25/30] brcmfmac: Remove func0 from function array

2017-08-22 Thread Ian Molton
Linux doesnt pass you func0 as a function when probing - instead providing specific access functions to read/write it. This prepares for a patch to remove the actual array entry itself. Signed-off-by: Ian Molton # Conflicts: #

[PATCH 21/30] brcmfmac: Remove {r,w}_sdreg32

2017-08-22 Thread Ian Molton
Remove yet another IO function from the code and replace with one that already exists. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c| 91 +++--- 1 file changed, 45 insertions(+), 46 deletions(-) diff --git

[PATCH 18/30] brcmfmac: Cleanup offsetof()

2017-08-22 Thread Ian Molton
Create a macro to make the code a bit more readable, whilst we're stuck with using struct element offsets as register offsets. Signed-off-by: Ian Molton --- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c| 35 +- 1 file changed, 14 insertions(+), 21

[PATCH 20/30] brcmfmac: Remove repeated calls to brcmf_chip_get_core()

2017-08-22 Thread Ian Molton
There is no need to repeatdly call brcmf_chip_get_core(), which traverses a list of cores every time its called (including during register access code!). Call it once, and store a pointer to the core structure. The existing code does nto keep track of users of the cores anyway, and even so, this

[PATCH 11/30] brcmfmac: Split brcmf_sdiod_buffrw function up.

2017-08-22 Thread Ian Molton
This function needs to be split up into separate read / write variants for clarity. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 67 +++--- 1 file changed, 45

[PATCH 17/30] brcmfamc: remove unnecessary call to brcmf_sdiod_set_backplane_window()

2017-08-22 Thread Ian Molton
All functions that might require the window address changing call brcmf_sdiod_set_backplane_window() prior to access. Thus resetting the window is not required. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 5 - 1 file

[PATCH 16/30] brcmfmac: Remove brcmf_sdiod_addrprep()

2017-08-22 Thread Ian Molton
This function has become trivial enough that it may as well be pushed into its callers, which has the side-benefit of clarifying what's going on. Remove it, and rename brcmf_sdiod_set_sbaddr_window() to brcmf_sdiod_set_backplane_window() as it's easier to understand. Signed-off-by: Ian Molton

[PATCH 24/30] brcmfmac: Correctly handle accesses to SDIO func0

2017-08-22 Thread Ian Molton
Rather than workaround the restrictions on func0 addressing in the driver, set MMC_QUIRK_LENIENT_FN0 Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 4 ++-- 2 files

[PATCH 04/30] brcmfmac: Clean up brcmf_sdiod_set_sbaddr_window()

2017-08-22 Thread Ian Molton
This function sets the address of the IO window used for SDIO accesses onto the backplane of the chip. It currently uses 3 separate masks despite the full mask being defined in the code already. Remove the separate masks and clean up. Signed-off-by: Ian Molton

[PATCH 06/30] brcmfmac: Remove bandaid for SleepCSR

2017-08-22 Thread Ian Molton
Register access code is not the place for band-aid fixes like this. If this is a genuine problem, it should be fixed further up in the driver stack. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel ---

[PATCH 07/30] brcmfmac: Remove brcmf_sdiod_request_data()

2017-08-22 Thread Ian Molton
This function is obfuscating how IO works on this chip. Remove it and push its logic into brcmf_sdiod_reg_{read,write}(). Handling of -ENOMEDIUM is altered, but as that's pretty much broken anyway we can ignore that. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel

[PATCH 09/30] brcmfmac: Remove noisy debugging.

2017-08-22 Thread Ian Molton
If you need debugging this low level, you're doing something wrong. Remove these noisy debug statements so the code is more readable. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH 08/30] brcmfmac: Fix asymmetric IO functions.

2017-08-22 Thread Ian Molton
Unlikely to be a problem, but brcmf_sdiod_regrb() is not symmetric with brcmf_sdiod_regrl(). Fix. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +- 1 file

[PATCH 05/30] brcmfmac: Remove dead IO code

2017-08-22 Thread Ian Molton
The value passed to brcmf_sdiod_addrprep() is *always* 4 remove this parameter and the unused code to handle it. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel --- .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 18

[PATCH 03/30] brcmfmac: Split brcmf_sdiod_regrw_helper() up.

2017-08-22 Thread Ian Molton
This large function is concealing a LOT of obscure logic about how the hardware functions. Time to split it up. This first patch splits the function into two pieces - read and write, doing away with the rw flag in the process. Signed-off-by: Ian Molton Reviewed-by:

[PATCH v5] brcmfmac cleanup

2017-08-22 Thread Ian Molton
Hi folks, Arend, as requested - a respin to take account of your comments. Unfortunately, although I've only included the patches you requested from v4, breaking out some of the simpler changes (whitespace, macos, etc.) has grown the set back up to 30 patches. I hope this is OK. I've tried to

[PATCH 01/30] brcmfmac: Fix parameter order in brcmf_sdiod_f0_writeb()

2017-08-22 Thread Ian Molton
All the other IO functions are the other way round in this driver. Make this one match. Signed-off-by: Ian Molton --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 02/30] brcmfmac: Register sizes on hardware are not dependent on compiler types

2017-08-22 Thread Ian Molton
The 4 IO functions in this patch are incorrect as they use compiler types to determine how many bytes to send to the hardware. Signed-off-by: Ian Molton Reviewed-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 22

Re: [PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Himanshu Jha
On Tue, Aug 22, 2017 at 10:41:45AM +0200, Matteo Croce wrote: > Il giorno mar, 22/08/2017 alle 13.41 +0530, Himanshu Jha ha scritto: > > Check memory allocation failure and return -ENOMEM if failure > > occurs. > > > > Signed-off-by: Himanshu Jha > > --- > >

[PATCH v3] brcmfmac: add CLM download support

2017-08-22 Thread Wright Feng
From: Chung-Hsien Hsu The firmware for brcmfmac devices includes information regarding regulatory constraints. For certain devices this information is kept separately in a binary form that needs to be downloaded to the device. This patch adds support to download this

Re: [PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Matteo Croce
Il giorno mar, 22/08/2017 alle 13.41 +0530, Himanshu Jha ha scritto: > Check memory allocation failure and return -ENOMEM if failure > occurs. > > Signed-off-by: Himanshu Jha > --- > drivers/net/wireless/atmel/at76c50x-usb.c | 14 +++--- > 1 file changed, 7

[PATCH] drivers: net: wireless: atmel: check memory allocation failure

2017-08-22 Thread Himanshu Jha
Check memory allocation failure and return -ENOMEM if failure occurs. Signed-off-by: Himanshu Jha --- drivers/net/wireless/atmel/at76c50x-usb.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v2] iwlwifi: pcie: move rx workqueue initialization to iwl_trans_pcie_alloc()

2017-08-22 Thread Luca Coelho
From: Luca Coelho Work queues cannot be allocated when a mutex is held because the mutex may be in use and that would make it sleep. Doing so generates the following splat with 4.13+: [ 19.513298] == [ 19.513429]

[PATCH] iwlwifi: pcie: move rx workqueue initialization to iwl_trans_pcie_alloc()

2017-08-22 Thread Luca Coelho
From: Luca Coelho Work queues cannot be allocated in when a mutex is held because the mutex may be in use and that would make it sleep. Doing so generates the following splat with 4.13+: [ 19.513298] == [

Re: ath9k driver - is it possible to disable tx/rx radio chains?

2017-08-22 Thread Matthias May
On 18/08/17 23:04, Håvard Rabbe wrote: > Hi > Thank you so much. You made my day! > The command works. Im looking forward to test it out :-) > > > I also have two of these card. they don’t have the same bitmap, but I assume > they work the same way? > > qca9882 chipset with 2 chains available