Re: [PATCH] wcn36xx: handle rx skb allocation failure to avoid system crash

2015-12-11 Thread fengwei.yin
On 2015/12/11 22:08, Bob Copeland wrote: On Fri, Dec 11, 2015 at 09:44:54PM +0800, fengwei.yin wrote: /* skip this frame if we can't alloc a new rx buffer */ if (ret) goto drop; This can't work because we need to initialize the DMA for the old skb ag

Re: [PATCH v7] Add new mac80211 driver mwlwifi.

2015-12-11 Thread Grant Grundler
[resending as plain textgmail...grrrh.] On Fri, Dec 11, 2015 at 4:46 PM, Grant Grundler wrote: > Sorry for the late response...just one point below > > On Fri, Nov 20, 2015 at 3:22 AM, Johannes Berg > wrote: >> >> > +#define MWL_DRV_NAME KBUILD_MODNAME >> > +#define MWL_DRV_VERSION

Re: [linux-next] iwl_mvm_get_key_sta_id() suspicious RCU usage

2015-12-11 Thread Sergey Senozhatsky
On (12/12/15 09:05), Sergey Senozhatsky wrote: > On (12/11/15 14:49), Johannes Berg wrote: > > On Fri, 2015-12-11 at 22:44 +0900, Sergey Senozhatsky wrote: > > > > > [ 6385.246300] drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1226 > > > suspicious rcu_dereference_protected() usage! > > > > > > >

Re: [linux-next] iwl_mvm_get_key_sta_id() suspicious RCU usage

2015-12-11 Thread Sergey Senozhatsky
On (12/11/15 14:49), Johannes Berg wrote: > On Fri, 2015-12-11 at 22:44 +0900, Sergey Senozhatsky wrote: > > > [ 6385.246300] drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1226 > > suspicious rcu_dereference_protected() usage! > > > > Funny, Laura Abbott also reported this bug earlier today :) >

Re: iwlwifi - L1 Enabled - LTR Enabled loop

2015-12-11 Thread Johannes Berg
On Fri, 2015-12-11 at 15:17 -0800, Luis R. Rodriguez wrote: >  > I just tried a base config from opensuse, then localmodconfig, then > 'make xenconfig' (which I need) and that worked. I can't debug > further but I think this config might help debug this further: > > http://drvbp1.linux-foundation.

Re: iwlwifi - L1 Enabled - LTR Enabled loop

2015-12-11 Thread Luis R. Rodriguez
On Fri, Dec 11, 2015 at 10:59 AM, Luis R. Rodriguez wrote: > I could bisect *if this issue > is not known*, but it may take a while... So this is interesting.. The opensuse 4.2.4 kernel worked, but I tried my own vanilla 4.2.4 kernel and that didn't work. This lead me to believe this might be a

Re: [PATCH] iwlwifi: mvm: protect RCU dereference in iwl_mvm_get_key_sta_id

2015-12-11 Thread Laura Abbott
On 12/11/2015 12:13 AM, Johannes Berg wrote: From: Johannes Berg Properly protect the RCU dereference in iwl_mvm_get_key_sta_id() when coming from iwl_mvm_update_tkip_key() which cannot hold the mvm->mutex by moving the call into the RCU critical section. Modify the check to use rcu_dereference

Re: iwlwifi A-MSDU tx

2015-12-11 Thread Stefan Sperling
Hi Emmanuel, Thanks a bunch, this worked out quite well for me. I got what I was aiming for out of this already but I still have some additional questions if you don't mind. Do you know of a good way to generate A-MSDUs? One way I found is to run: top -d .01 on the AP and watching this top over

[PATCH] nl80211: Fix potential memory leak in nl80211_connect

2015-12-11 Thread Ola Olsson
Free cached keys if the last early return path is taken. Signed-off-by: Ola Olsson --- net/wireless/nl80211.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index c71e274..4b5ff71 100644 --- a/net/wireless/nl80211.c +++ b

iwlwifi - L1 Enabled - LTR Enabled loop

2015-12-11 Thread Luis R. Rodriguez
Using 4.4-rc4 and today's wireless-testing (master-2015-12-10), and the latest firmware on linux-firmware, my wireless driver runs into a non-functional loop rambling about "L1 Enabled - LTR Enabled loop". Reverting back to an older kernel works. I could bisect *if this issue is not known*, but it

[PATCH] regulatory: fix world regdomain

2015-12-11 Thread Johannes Berg
From: Johannes Berg Back in 2012, in commit 6d87df6f9657 ("regdb: allow 40 MHz on world roaming channels 12/13") I evidently broke the world regulatory data to the point where it was always discarded by the kernel because the 40 MHz bandwidth doesn't fit into the rule range. Around the same time

[PATCH v2] regulatory: fix world regulatory domain data

2015-12-11 Thread Johannes Berg
From: Johannes Berg The rule definitions here aren't really valid, they would be rejected if it came from userspace due to the bandwidth specified being bigger than the rule's width. This is fairly much inconsequential since the other rules around them do enable the bandwidth, but express that b

[PATCH] regulatory: fix world regulatory domain data

2015-12-11 Thread Johannes Berg
From: Johannes Berg The precise rule definition here isn't really valid, it would be rejected if it came from userspace due to the bandwidth it specifies being bigger than the rule's width. This is fairly much inconsequential since the other rule before it does enable the bandwidth, but express

Re: [PATCH] wireless: change cfg80211 regulatory domain info as debug messages

2015-12-11 Thread Johannes Berg
On Sun, 2015-11-15 at 15:31 +0800, Dave Young wrote: > cfg80211 module prints a lot of messages like below. Actually > printing once is acceptable but sometimes it will print again and > again, it looks very annoying. It is better to change these detail > messages to debugging only. > Despite the

[PATCH] cfg80211: remove CFG80211_REG_DEBUG

2015-12-11 Thread Johannes Berg
From: Johannes Berg Instead of having this Kconfig option, which just *floods* the kernel log, * remove the per-channel prints that are fairly useless anyway * convert the conditional printing to pr_debug() Signed-off-by: Johannes Berg --- net/wireless/Kconfig | 13 -- net/wireless/reg.

Re: [PATCH] wireless: change cfg80211 regulatory domain info as debug messages

2015-12-11 Thread Johannes Berg
On Mon, 2015-11-23 at 09:37 +0800, Dave Young wrote: > Seems there're a lot of other wireless messages. Should we refactor > them as well? I still did not get chance to see where is the code. > (My wireless driver being used is iwlwifi) Most are probably from net/mac80211/. > # dmesg|grep "Limi

Re: [RFC] mac80211: ignore AP power level when tx power type is "fixed"

2015-12-11 Thread Johannes Berg
On Sat, 2015-12-05 at 15:07 +0100, Felix Fietkau wrote: > In some cases a user might want to connect to a far away access > point, > which announces a low tx power limit. Using the AP's power limit can > make the connection significantly more unstable or even impossible, > and > mac80211 currently

Re: [PATCH] wcn36xx: handle rx skb allocation failure to avoid system crash

2015-12-11 Thread Bob Copeland
On Fri, Dec 11, 2015 at 09:44:54PM +0800, fengwei.yin wrote: > >/* skip this frame if we can't alloc a new rx buffer */ > >if (ret) > > goto drop; > This can't work because we need to initialize the DMA for the old skb again. > Which is done in following >

Re: [linux-next] iwl_mvm_get_key_sta_id() suspicious RCU usage

2015-12-11 Thread Johannes Berg
On Fri, 2015-12-11 at 22:44 +0900, Sergey Senozhatsky wrote: > [ 6385.246300] drivers/net/wireless/intel/iwlwifi/mvm/sta.c:1226 > suspicious rcu_dereference_protected() usage! > Funny, Laura Abbott also reported this bug earlier today :) I've sent out a fix, you can see it here: https://patchwo

[linux-next] iwl_mvm_get_key_sta_id() suspicious RCU usage

2015-12-11 Thread Sergey Senozhatsky
Hi, linux-next 20151211 [ 6385.246285] === [ 6385.246288] [ INFO: suspicious RCU usage. ] [ 6385.246294] 4.4.0-rc4-next-20151211-dbg-00015-g7b65ef3-dirty #302 Not tainted [ 6385.246296] --- [ 6385.246300] drivers/net/wireless/intel/iwlwifi

Re: [PATCH] wcn36xx: handle rx skb allocation failure to avoid system crash

2015-12-11 Thread fengwei.yin
On 2015/12/11 21:37, Bob Copeland wrote: On Fri, Dec 11, 2015 at 09:14:04PM +0800, fengwei.yin wrote: On 2015/12/2 13:27, Fengwei Yin wrote: Lawrence reported that git clone could make system crash on a Qualcomm ARM soc based device (DragonBoard, 1G memory without swap) running 64bit Debian.

[PATCHv2] mac80211: allow drivers to report (non-)monitor frames

2015-12-11 Thread Grzegorz Bajorski
Some drivers offload some frames internally (e.g. AddBa). Reporting such frames to mac80211 would only confuse MLME. However it would be useful to be able to pass such frames to monitor interfaces for sniffing purposes, e.g. when running AP + monitor. To do that allow drivers to tell mac80211 whet

Re: [PATCH] wcn36xx: handle rx skb allocation failure to avoid system crash

2015-12-11 Thread Bob Copeland
On Fri, Dec 11, 2015 at 09:14:04PM +0800, fengwei.yin wrote: > > On 2015/12/2 13:27, Fengwei Yin wrote: > >Lawrence reported that git clone could make system crash on a > >Qualcomm ARM soc based device (DragonBoard, 1G memory without > >swap) running 64bit Debian. > > > >It's turned out the crash

Re: [PATCH] ath9k: fix inconsistent indenting on return statement

2015-12-11 Thread Kalle Valo
Colin King writes: > From: Colin Ian King > > minor change, indenting is one tab out. > > Signed-off-by: Colin Ian King Applied to ath.git, thanks. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org

Re: [PATCH 1/2] ath6kl: fix tx/rx antenna reporting for 2x2 devices.

2015-12-11 Thread Kalle Valo
gree...@candelatech.com writes: > From: Ben Greear > > My previous patch incorrectly reported the antenna > for 2x2 devices. It should be a mask instead of > a numeric count. This patch fixes that. > > Signed-off-by: Ben Greear Both patches applied, thanks. -- Kalle Valo -- To unsubscribe f

Re: [PATCH v3] ath9k: feeding entropy in kernel from ADC capture

2015-12-11 Thread Kalle Valo
miaoq...@codeaurora.org writes: > From: Miaoqing Pan > > This patch is derived from > commit 6301566e0b2d ("ath9k: export HW random number generator"), > > We evaluated the entropy of the ADC data on QCA9531, QCA9561, QCA955x, > and AR9340, and it has sufficient quality random data (at least 10 b

Re: [PATCH] wcn36xx: handle rx skb allocation failure to avoid system crash

2015-12-11 Thread fengwei.yin
On 2015/12/2 13:27, Fengwei Yin wrote: Lawrence reported that git clone could make system crash on a Qualcomm ARM soc based device (DragonBoard, 1G memory without swap) running 64bit Debian. It's turned out the crash is related with rx skb allocation failure. git could consume more than 600MB a

Re: [v2] wlcore/wl12xx: spi: fix oops on firmware load

2015-12-11 Thread Kalle Valo
> The maximum chunks used by the function is > (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE + 1). > The original commands array had space for > (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) commands. > When the last chunk is used (len > 4 * WSPI_MAX_CHUNK_SIZE), the last > command is stored outside

Re: [V2,01/13] brcmfmac: Simplify scan timing configuration

2015-12-11 Thread Kalle Valo
> From: Hante Meuleman > > No need to pass timing configuration in local functions as they are > static anyway. > > Reviewed-by: Arend Van Spriel > Reviewed-by: Pieter-Paul Giesberts > Signed-off-by: Hante Meuleman > Signed-off-by: Arend van Spriel Thanks, 12 patches applied to wireless-dr

Re: iwlegacy: mark il_adjust_beacon_interval as noinline

2015-12-11 Thread Kalle Valo
> With the new optimized do_div() code, some versions of gcc > produce obviously incorrect code that leads to a link error > in iwlegacy/common.o: > > drivers/built-in.o: In function `il_send_rxon_timing': > :(.text+0xa6b4d4): undefined reference to `ilog2_NaN' > :(.text+0xa6b4f0): undefined

Re: [v2] rtlwifi: fix memory leak for USB device

2015-12-11 Thread Kalle Valo
> Free skb for received frames with a wrong checksum. This can happen > pretty rapidly, exhausting all memory. > > This fixes a memleak (detected with kmemleak). Originally found while > using monitor mode, but it also appears during managed mode (once the > link is up). > > Cc: sta...@vger.kern

Re: prism54: fix compare_const_fl.cocci warnings

2015-12-11 Thread Kalle Valo
> Move constants to the right of binary operators. > > Generated by: scripts/coccinelle/misc/compare_const_fl.cocci > > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscr

Re: mwifiex: fix semicolon.cocci warnings

2015-12-11 Thread Kalle Valo
> Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the bo

Re: brcm80211: fix compare_const_fl.cocci warnings

2015-12-11 Thread Kalle Valo
> Move constants to the right of binary operators. > > Generated by: scripts/coccinelle/misc/compare_const_fl.cocci > > Signed-off-by: Fengguang Wu > Signed-off-by: Julia Lawall Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscr

Re: [1/6] mwifiex: parse adhoc start/join result

2015-12-11 Thread Kalle Valo
> Even if ADHOC start or join attempt is failed, these commands > are returned with success status by firmware. Actual connection > result is provided inside command response. > > This patch parses the adhoc connection result and resets > connection state variables if connection is not successful

Re: hostap: fix an error code in prism2_config()

2015-12-11 Thread Kalle Valo
> The current code returns success if prism2_init_local_data() fails, but > we want to return an error code. Also we can remove the bogus > ret initializer because it is wrong and never used. > > Signed-off-by: Dan Carpenter Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsub

Re: prism54: off by one BUG_ON() test

2015-12-11 Thread Kalle Valo
> This code was supposed to trigger a BUG() if we truncate the output but > it's off by one so it allows one character to be truncated. Really > drivers shouldn't call BUG_ON() and especially for something minor like > this so I've changed it to a WARN_ON(). > > Signed-off-by: Dan Carpenter Th

Re: mwifiex: remove an unneeded condition

2015-12-11 Thread Kalle Valo
> We already know that "wep_key->key_length" is set so there is no need to > check again. Also the last curly brace was indented too far. > > Signed-off-by: Dan Carpenter Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linu

Re: iwlegacy: cleanup end of il_send_add_sta()

2015-12-11 Thread Kalle Valo
> This code causes a static checker warning because we check for > "if (ret == 0)" but we have already had verified that was true. Clean > it up a little. > > Signed-off-by: Dan Carpenter > Acked-by: Stanislaw Gruszka Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe

Re: cw1200: remove some dead code

2015-12-11 Thread Kalle Valo
> If the mode is NL80211_IFTYPE_UNSPECIFIED then we return success at the > start of the function so this condition is never true. > > Signed-off-by: Dan Carpenter Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wirele

Re: brcmfmac: only lock and unlock fws if fws is not null

2015-12-11 Thread Kalle Valo
> From: Colin Ian King > > There is a null ptr check for fws to set bcmc_credit_check, however, > there a lock and unlock on fws should only performed if fwts is > also not null to also avoid a potential null pointer deference. > > Signed-off-by: Colin Ian King > Acked-by: Arend van Spriel T

Re: [V2] wlcore: split wl12xx/wl18xx sg parameters

2015-12-11 Thread Kalle Valo
> Align to new wl18xx sg parameters. > This requires to split both wl12xx/wl18xx enumerators. > > Signed-off-by: Guy Mishol > Acked-by: Eliad Peller Thanks, applied to wireless-drivers-next.git. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the bod

Re: [PATCH V2 13/13] brcmfmac: add arp offload ip address table configuration support

2015-12-11 Thread Arend van Spriel
On 12/11/2015 10:29 AM, Kalle Valo wrote: Arend van Spriel writes: On 12/10/2015 01:43 PM, Arend van Spriel wrote: From: Franky Lin Obtain ipv4 address through inetaddr notification for ARP offload host ip table configuration. Turns out this patch has a sparse warning, ie. would not work

RE: [PATCH 5/6] mwifiex: add iw vendor command support

2015-12-11 Thread Amitkumar Karwar
Hi Kalle, > -Original Message- > From: Kalle Valo [mailto:kv...@codeaurora.org] > Sent: Friday, December 11, 2015 2:32 PM > To: Amitkumar Karwar > Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam; Jeff > CF Chen > Subject: Re: [PATCH 5/6] mwifiex: add iw vendor command sup

Re: [PATCH V2 13/13] brcmfmac: add arp offload ip address table configuration support

2015-12-11 Thread Kalle Valo
Arend van Spriel writes: > On 12/10/2015 01:43 PM, Arend van Spriel wrote: >> From: Franky Lin >> >> Obtain ipv4 address through inetaddr notification for ARP offload host >> ip table configuration. > > Turns out this patch has a sparse warning, ie. would not work on > big-endian system. We have

RE: [PATCH] mwifiex: parse hscfg_gpio info from device tree

2015-12-11 Thread Amitkumar Karwar
Hi Kalle, > -Original Message- > From: Kalle Valo [mailto:kv...@codeaurora.org] > Sent: Friday, December 11, 2015 2:04 PM > To: Amitkumar Karwar > Cc: linux-wireless@vger.kernel.org; Nishant Sarmukadam; Xinming Hu; > devicet...@vger.kernel.org > Subject: Re: [PATCH] mwifiex: parse hscfg_gp

Re: [PATCH V2 13/13] brcmfmac: add arp offload ip address table configuration support

2015-12-11 Thread Arend van Spriel
On 12/10/2015 01:43 PM, Arend van Spriel wrote: From: Franky Lin Obtain ipv4 address through inetaddr notification for ARP offload host ip table configuration. Turns out this patch has a sparse warning, ie. would not work on big-endian system. We have a fix for that. Should I mark this patch

Re: [PATCH V2 11/13] brcmfmac: Change error print in debug print

2015-12-11 Thread Arend van Spriel
On 12/11/2015 09:40 AM, Kalle Valo wrote: Arend van Spriel writes: From: Hante Meuleman The pcie suspend and resume routines contain some error prints, which should have been debug prints. Reviewed-by: Arend Van Spriel Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Hante Meuleman Chan

ath10k and mac80211 number of chains meaning

2015-12-11 Thread Simon Malthieu
Hi, I would like to know the exact meaning of "chains" member of struct sta_info. mac80211 sta_info.h states : "@chains: chains ever used for RX from this station" In ath9k, it is incremented when testing each value of the chain_signal array (code here is ath9k common.c) : if (rssi != ATH9

Re: [PATCH 5/6] mwifiex: add iw vendor command support

2015-12-11 Thread Kalle Valo
Amitkumar Karwar writes: > From: chunfan chen > > The patch allows user to > 1. Enable turbo mode in firmware using > following command. > iw dev mlan0 vendor send 0x005043 0x00 0x01 > > 2. Download configuration data to FW using > following command > iw dev mlan0 vendor send 0x005043 0x01 filen

Re: [PATCH V5] wlcore/wl18xx: fw logger over sdio

2015-12-11 Thread Kalle Valo
Guy Mishol writes: > From: Shahar Patury > > enable the FW Logger to work over the SDIO interface instead of only > over UART. > in new design we will use fw internal memory instead of packet ram > that was used in older (and wl12xx) design. > this change will reduce the impact on tp and stabili

Re: [PATCH V2 11/13] brcmfmac: Change error print in debug print

2015-12-11 Thread Kalle Valo
Arend van Spriel writes: > From: Hante Meuleman > > The pcie suspend and resume routines contain some error prints, > which should have been debug prints. > > Reviewed-by: Arend Van Spriel > Reviewed-by: Pieter-Paul Giesberts > Signed-off-by: Hante Meuleman > Change-Id: Ibafe5d38301ee8f5e8688

Re: [PATCH V2 06/13] brcmfmac: Add support for PCIE 4350 revision 5 device

2015-12-11 Thread Kalle Valo
Arend van Spriel writes: > From: Hante Meuleman > > Reviewed-by: Arend Van Spriel > Reviewed-by: Pieter-Paul Giesberts > Signed-off-by: Hante Meuleman > Change-Id: I72b519ec6a7ff0d36f076df06d042f0c5894142c > Reviewed-on: http://hnd-swgit.sj.broadcom.com:8080/5513 > Signed-off-by: Arend van Sp

Re: [PATCH] mwifiex: parse hscfg_gpio info from device tree

2015-12-11 Thread Kalle Valo
+ devicetree list Amitkumar Karwar writes: > From: Xinming Hu > > This patch reads hscfg_gpio from device tree and update > internal variable > > Signed-off-by: Xinming Hu > Signed-off-by: Amitkumar Karwar > --- > drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 11 +++ > 1 file chan

Re: [PATCH v2 11/13] ath9k: MCC add sta_ap_ratio module param

2015-12-11 Thread Kalle Valo
Janusz Dziedzic writes: > In case of MCC we can setup STA/AP(GO) ratio. > Eg. setting sta_ap_ratio=80 > STA will get 80% of time, while AP(GO) 20%. > Setup correct ctwindow. > > Signed-off-by: Janusz Dziedzic Why? What's the use case? And isn't there a better way to do this? Like using nl80211

[PATCH] iwlwifi: mvm: protect RCU dereference in iwl_mvm_get_key_sta_id

2015-12-11 Thread Johannes Berg
From: Johannes Berg Properly protect the RCU dereference in iwl_mvm_get_key_sta_id() when coming from iwl_mvm_update_tkip_key() which cannot hold the mvm->mutex by moving the call into the RCU critical section. Modify the check to use rcu_dereference_check() to permit this. Fixes: 9513c5e18a0d (