[RFCv3] brcmfmac: Add tracepoints for bcmdhd-dissector tool

2016-05-27 Thread Mikael Kanstrup
From: Mikael Kanstrup Add tracepoints to be used with bcmdhd-dissector: https://github.com/kanstrup/bcmdhd-dissector bcmdhd-dissector is a Wireshark LUA plugin dissector used to decode protocol data between the brcmfmac driver and the wifi chip firmware. This includes decoding firmware command

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:23 PM, Arnd Bergmann wrote: > > This patch changes all users of IS_ERR_VALUE() that I could find > on 32-bit ARM randconfig builds and x86 allmodconfig. For the > moment, this doesn't change the definition of IS_ERR_VALUE() > because there are probably still architecture

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Al Viro
On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote: > @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct > lib_info *libs) > > res = prepare_binprm(&bprm); > > - if (!IS_ERR_VALUE(res)) > + if (res >= 0) if (res == 0), please - prepare_bin

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Srinivas Kandagatla
On 27/05/16 22:23, Arnd Bergmann wrote: drivers/acpi/acpi_dbg.c | 22 +++--- drivers/ata/sata_highbank.c | 2 +- drivers/clk/tegra/clk-tegra210.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2 +-

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:46 PM, Andrew Morton wrote: > > So you do plan to add some sort of typechecking into IS_ERR_VALUE()? The easiest way to do it is to just turn the (x) into (unsigned long)(void *)(x), which then complains about casting an integer to a pointer if the integer has the wrong

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Andrew Morton
On Fri, 27 May 2016 23:23:25 +0200 Arnd Bergmann wrote: > Most users of IS_ERR_VALUE() in the kernel are wrong, as they > pass an 'int' into a function that takes an 'unsigned long' > argument. This happens to work because the type is sign-extended > on 64-bit architectures before it gets convert

[PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Arnd Bergmann
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an 'unsig

Re: [RFCv2] brcmfmac: Add tracepoints for bcmdhd-dissector tool

2016-05-27 Thread Arend Van Spriel
On 27-5-2016 16:24, Mikael Kanstrup wrote: > Add hexdump tracepoints to be used bcmdhd-dissector: > https://github.com/kanstrup/bcmdhd-dissector > > bcmdhd-dissector is a Wireshark LUA plugin dissector used to decode > protocol data between the brcmfmac driver and the wifi chip firmware. > This

[PATCH 4.7 FIX] brcmfmac: fix lockup when removing P2P interface after event timeout

2016-05-27 Thread Rafał Miłecki
Removing P2P interface is handled by sending a proper request to the firmware. On success firmware triggers an event and driver's handler removes a matching interface. However on event timeout we remove interface directly from the cfg80211 callback. Current code doesn't handle this case correctly

[PATCH V2] brcmfmac: fix setting AP channel with new firmwares

2016-05-27 Thread Rafał Miłecki
Firmware for new chipsets is based on a new major version of code internally maintained at Broadcom. E.g. brcmfmac4366b-pcie.bin (used for BCM4366B1) is based on 10.10.69.3309 while brcmfmac43602-pcie.ap.bin was based on 7.35.177.56. Currently setting AP 5 GHz channel doesn't work reliably with BC

Re: [PATCH] staging/wilc1000: fixes kzalloc call

2016-05-27 Thread Lidza Louina
On 05/27/2016 02:07 PM, Joe Perches wrote: On Fri, 2016-05-27 at 13:51 -0400, Lidza Louina wrote: The wl pointer was initialized as a pointer to a struct wilc and assigned to a piece of memory the size of the pointer. It should be the size of struct wilc. This isn't necessary. The code in qu

Re: [PATCH] iw: Fix -Wabsolute-value compiler warning in iw.c

2016-05-27 Thread Aurimas Liutikas
Hello again! I was curious if this looks like a reasonable change? Aurimas On Wed, May 18, 2016 at 9:12 AM, Aurimas Liutikas wrote: > Hey there! Any thoughts on this patch? > > Aurimas > > On Thu, May 12, 2016 at 9:16 AM, Aurimas Liutikas wrote: >> Signed-off-by: Aurimas Liutikas >> >> diff --

Re: [PATCH] staging/wilc1000: fixes kzalloc call

2016-05-27 Thread Joe Perches
On Fri, 2016-05-27 at 13:51 -0400, Lidza Louina wrote: > The wl pointer was initialized as a pointer to a struct wilc and > assigned to a piece of memory the size of the pointer. It should be the > size of struct wilc. This isn't necessary. The code in question is: struct wilc *wl;

Re: rtlwifi: Fix scheduling while atomic error from commit 49f86ec21c01

2016-05-27 Thread Kalle Valo
Larry Finger wrote: > Commit 49f86ec21c01 ("rtlwifi: Change long delays to sleeps") was correct > for most cases; however, driver rtl8192ce calls the affected routines while > in atomic context. The kernel bug output is as follows: > > BUG: scheduling while atomic: wpa_supplicant/627/0x0002 >

Re: [v2] brcmfmac: add fallback for devices that do not report per-chain values

2016-05-27 Thread Kalle Valo
Jaap Jan Meijer wrote: > If brcmf_cfg80211_get_station fails to determine the RSSI from the > per-chain values get the value individually as a fallback. > > Fixes: 1f0dc59a6de9 ("brcmfmac: rework .get_station() callback") > Signed-off-by: Jaap Jan Meijer > Acked-by: Arend van Spriel Thanks, 1

[PATCH] staging/wilc1000: fixes kzalloc call

2016-05-27 Thread Lidza Louina
The wl pointer was initialized as a pointer to a struct wilc and assigned to a piece of memory the size of the pointer. It should be the size of struct wilc. Signed-off-by: Lidza Louina --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: Ath9k - no bouncing...

2016-05-27 Thread Valo, Kalle
Hi Eduardo, Adding linux-wireless. Please don't send me mail privately, instead send it to the list. You get faster replies, others learn from this, I get less mail. Everybody win. Eduardo Abinader writes: > It's been some time I sent two times the following patches to ath9k-devel and > they we

Re: [RFCv2] brcmfmac: Add tracepoints for bcmdhd-dissector tool

2016-05-27 Thread Kalle Valo
Mikael Kanstrup writes: > Add hexdump tracepoints to be used bcmdhd-dissector: > https://github.com/kanstrup/bcmdhd-dissector > > bcmdhd-dissector is a Wireshark LUA plugin dissector used to decode > protocol data between the brcmfmac driver and the wifi chip firmware. > This includes decoding

[PATCH] wl3501_cs: avoid bogus gcc-6 warning

2016-05-27 Thread Arnd Bergmann
gcc-6 on x86 started warning about wl3501_get_encode when building with -O2: drivers/net/wireless/wl3501_cs.c: In function ‘wl3501_get_encode’: drivers/net/wireless/wl3501_cs.c:1769:5: warning: ‘implemented’ may be used uninitialized in this function drivers/net/wireless/wl3501_cs.c:1686:19: warn

[PATCH 5/5] ath10k: add pdev param support to enable/disable btcoex

2016-05-27 Thread Rajkumar Manoharan
10.4 firmware has support to enable or disable btcoex functionality without reloading firmware via wmi pdev param. Add provision to send pdev param command via existing btcoex knob. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/core.c | 10 ++ drivers/net/wireles

[PATCH 2/5] ath10k: remove unused phy_mode_to_band

2016-05-27 Thread Rajkumar Manoharan
Remove unused inline function phy_mode_to_band. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 28 1 file changed, 28 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c ind

[PATCH 3/5] ath10k: update module description

2016-05-27 Thread Rajkumar Manoharan
Update module description to advertise all supported QCA 802.11ac devices. Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/core.c | 2 +- drivers/net/wireless/ath/ath10k/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/a

[PATCH 4/5] ath10k: add new ATH10K_FW_FEATURE_BTCOEX_PARAM

2016-05-27 Thread Rajkumar Manoharan
This feature flag will be used for firmware to support BT-Coex feature without reloading firmware via WMI pdev param. To support Bluetooth coexistence pdev param, WMI_COEX_GPIO_SUPPORT of extended resource config should be enabled always. This firmware IE is used to configure WMI_COEX_GPIO_SUPPORT.

[PATCH 1/5] ath10k: fix operating irq mode for ahb device

2016-05-27 Thread Rajkumar Manoharan
Earlier when operating irq mode is legacy, interrupts are disabled and re-enabled based on num_msi_intrs. commit cfe9011a05a8 ("ath10k: remove MSI range support") replaced num_msi_intrs by oper_irq_mode. Since oper_irq_mode is not initialized for ahb devices (i.e qca4019), device boot up is failed

[RFCv2] brcmfmac: Add tracepoints for bcmdhd-dissector tool

2016-05-27 Thread Mikael Kanstrup
Add hexdump tracepoints to be used bcmdhd-dissector: https://github.com/kanstrup/bcmdhd-dissector bcmdhd-dissector is a Wireshark LUA plugin dissector used to decode protocol data between the brcmfmac driver and the wifi chip firmware. This includes decoding firmware command requests and respons

[PATCH 2/8] mwifiex: propagate sdio_enable_func() errno code in mwifiex_sdio_probe()

2016-05-27 Thread Javier Martinez Canillas
If the sdio_enable_func() function fails on .probe, the -EIO errno code is always returned but that could make more difficult to debug and find the cause of why the function actually failed. Since the driver/device core prints the value returned by .probe in its error message propagate what was re

[PATCH 3/8] mwifiex: propagate mwifiex_add_card() errno code in mwifiex_sdio_probe()

2016-05-27 Thread Javier Martinez Canillas
There's only a check if mwifiex_add_card() returned a nonzero value, but the actual error code is neither stored nor propagated to the caller. So instead of always returning -1 (which is -EPERM and not a suitable errno code in this case), propagate the value returned by mwifiex_add_card(). Patch a

[PATCH 0/8] mwifiex: Fix some error handling issues in mwifiex_sdio_probe() function

2016-05-27 Thread Javier Martinez Canillas
Hello, While booting a system with a mwifiex WiFi card, I noticed the following missleading error message: [ 12.480042] mwifiex_sdio mmc2:0001:1: sdio platform data not available This error only applies to platforms that define a child node for the SDIO device, but it's currently shown even in

[PATCH 1/8] mwifiex: only call mwifiex_sdio_probe_of() if dev has an OF node

2016-05-27 Thread Javier Martinez Canillas
SDIO is an auto enumerable bus so the SDIO devices are matched using the sdio_device_id table and not using compatible strings from a OF id table. However, commit ce4f6f0c353b ("mwifiex: add platform specific wakeup interrupt support") allowed to match nodes defined as child of the SDIO host contr

[PATCH 4/8] mwifiex: consolidate mwifiex_sdio_probe() error paths

2016-05-27 Thread Javier Martinez Canillas
Instead of duplicating part of the cleanups needed in case of an error in .probe callback, have a single error path and use goto labels as is common practice in the kernel. This also has the nice side effect that the cleanup operations are made in the inverse order of their counterparts, which was

[PATCH 5/8] mwifiex: use dev_err() instead of pr_err() in mwifiex_sdio_probe()

2016-05-27 Thread Javier Martinez Canillas
It's better to have the device name prefixed in the error message. Signed-off-by: Javier Martinez Canillas --- drivers/net/wireless/marvell/mwifiex/sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/

[PATCH 8/8] mwifiex: use better message and error code when OF node doesn't match

2016-05-27 Thread Javier Martinez Canillas
The Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt DT binding document lists the possible compatible strings that a SDIO child node can have, so the driver checks if the defined in the node matches. But the error message when that's not the case is misleading, so change for one

[PATCH 6/8] mwifiex: check if mwifiex_sdio_probe_of() fails and return error

2016-05-27 Thread Javier Martinez Canillas
The function can fail so the returned value should be checked and the error propagated to the caller in case of a failure. Signed-off-by: Javier Martinez Canillas --- drivers/net/wireless/marvell/mwifiex/sdio.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 7/8] mwifiex: don't print an error if an optional DT property is missing

2016-05-27 Thread Javier Martinez Canillas
The Documentation/devicetree/bindings/net/wireless/marvell-sd8xxx.txt DT binding document say that the "interrupts" property in the child node is optional. So the property being missed shouldn't be treated as an error. Signed-off-by: Javier Martinez Canillas --- drivers/net/wireless/marvell/mwi

[PATCH] iwlwifi: mvm: avoid harmless -Wmaybe-uninialized warning

2016-05-27 Thread Arnd Bergmann
gcc is apparently unablel to track the state of the local 'resp_v2' variable across the kzalloc() function, and warns about the response variable being used without an initialization: drivers/net/wireless/intel/iwlwifi/mvm/nvm.c: In function ‘iwl_mvm_update_mcc’: drivers/net/wireless/intel/iwlwifi

Re: [PATCH 0/2] ath10k: Add support for QCA9887

2016-05-27 Thread Valo, Kalle
Sven Eckelmann writes: > On Thursday 26 May 2016 17:32:30 Valo, Kalle wrote: >> Sven Eckelmann writes: >> >> > the QCA9887 chip is similar to the QCA988x chips. But it requires a special >> > firmware and uses a different calibration data source. Unfortunately, no >> > working firmware currentl

[PATCH v2] mwifiex: fix race condition when downloading firmware

2016-05-27 Thread Wei-Ning Huang
The action 'check for winner' and 'download firmware' should be an atomic action. This is true for btmrvl driver but not mwmfiex, which cause firmware download to fail when the following scenario happens: 1) mwifiex check winner status: true 2) btmrvl check winner status: true, and start downloadi

[PATCH] cfg80211: remove extra space on alpha2 definition

2016-05-27 Thread Eduardo Abinader
Just small adjustment. Signed-off-by: Eduardo Abinader --- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 5dbac37..5e3394d 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -217,7 +217,7 @@ static DEC

Re: [PATCH V5] brcmfmac: print errors if creating interface fails

2016-05-27 Thread Arend Van Spriel
On 27-5-2016 11:13, Julian Calaby wrote: > Hi Arend, > > On Fri, May 27, 2016 at 6:49 PM, Arend van Spriel wrote: >> From: Rafał Miłecki >> >> This is helpful for debugging. Without this all I was getting from "iw" >> command on failed creating of P2P interface was: >>> command failed: Too many

Re: [PATCH V5] brcmfmac: print errors if creating interface fails

2016-05-27 Thread Julian Calaby
Hi Arend, On Fri, May 27, 2016 at 6:49 PM, Arend van Spriel wrote: > From: Rafał Miłecki > > This is helpful for debugging. Without this all I was getting from "iw" > command on failed creating of P2P interface was: >> command failed: Too many open files in system (-23) > > Signed-off-by: Rafal

Re: [PATCH v1] ath10k: Fix 10.4 extended peer stats update

2016-05-27 Thread Mohammed Shafi Shajakhan
On Fri, May 27, 2016 at 10:12:45AM +0200, Sven Eckelmann wrote: > On Wednesday 11 May 2016 11:54:30 Mohammed Shafi Shajakhan wrote: > > #else > > -static inline void ath10k_sta_update_rx_duration(struct ath10k *ar, > > -struct list_head *peer) > > +stati

[PATCH v2] ath10k: Fix 10.4 extended peer stats update

2016-05-27 Thread Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan 10.4 'extended peer stats' will be not be appended with normal peer stats data and they shall be coming in separate chunks. Fix this by maintaining a separate linked list 'extender peer stats' for 10.4 and update rx_duration for per station statistics. Also parse th

[PATCH V6] brcmfmac: print errors if creating interface fails

2016-05-27 Thread Arend van Spriel
From: Rafał Miłecki This is helpful for debugging. Without this all I was getting from "iw" command on failed creating of P2P interface was: > command failed: Too many open files in system (-23) Signed-off-by: Rafal Milecki [ar...@broadcom.com: reduce error prints upon iface creation] Signed-of

[PATCH V5] brcmfmac: print errors if creating interface fails

2016-05-27 Thread Arend van Spriel
From: Rafał Miłecki This is helpful for debugging. Without this all I was getting from "iw" command on failed creating of P2P interface was: > command failed: Too many open files in system (-23) Signed-off-by: Rafal Milecki [ar...@broadcom.com: reduce error prints upon iface creation] Signed-of

Re: [PATCH 0/2] ath10k: Add support for QCA9887

2016-05-27 Thread Sven Eckelmann
On Thursday 26 May 2016 17:32:30 Valo, Kalle wrote: > Sven Eckelmann writes: > > > the QCA9887 chip is similar to the QCA988x chips. But it requires a special > > firmware and uses a different calibration data source. Unfortunately, no > > working firmware currently exists. But it is possible to

Re: [PATCH v1] ath10k: Fix 10.4 extended peer stats update

2016-05-27 Thread Sven Eckelmann
On Wednesday 11 May 2016 11:54:30 Mohammed Shafi Shajakhan wrote: > #else > -static inline void ath10k_sta_update_rx_duration(struct ath10k *ar, > - struct list_head *peer) > +static inline > +void ath10k_sta_update_rx_duration(struct ath10k *ar, > +