Re: [PATCH] staging: wilc1000: check for kmalloc allocation failures

2018-03-21 Thread Joe Perches
On Wed, 2018-03-21 at 19:19 +, Colin King wrote: > From: Colin Ian King > > There are three kmalloc allocations that are not null checked which > potentially could lead to null pointer dereference issues. Fix this > by adding null pointer return checks. looks like

[PATCH] staging: wilc1000: check for kmalloc allocation failures

2018-03-21 Thread Colin King
From: Colin Ian King There are three kmalloc allocations that are not null checked which potentially could lead to null pointer dereference issues. Fix this by adding null pointer return checks. Detected by CoverityScan, CID#1466025-27 ("Dereference null return")

Re: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 04:28:46PM +, Nipun Gupta wrote: > > > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Wednesday, March 21, 2018 15:05 > > To: Nipun Gupta > > Cc: robin.mur...@arm.com; h...@lst.de;

Re: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 12:25:23PM +0530, Nipun Gupta wrote: > With each bus implementing its own DMA configuration callback, > there is no need for bus to explicitly have force_dma in its > global structure. This patch modifies of_dma_configure API to > accept an input parameter which specifies

Re: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Greg KH
On Wed, Mar 21, 2018 at 12:25:22PM +0530, Nipun Gupta wrote: > It's bus specific aspect to map a given device on the bus and > relevant firmware description of its DMA configuration. > So, this change introduces '/dma_configure/' as bus callback > giving flexibility to busses for implementing its

Re: [PATCH v3 19/20] firmware: add request_firmware_cache() to help with cache on reboot

2018-03-21 Thread Greg KH
On Tue, Mar 20, 2018 at 06:24:09PM +, Luis R. Rodriguez wrote: > On Tue, Mar 20, 2018 at 06:38:01PM +0100, Greg KH wrote: > > On Tue, Mar 20, 2018 at 05:34:09PM +, Luis R. Rodriguez wrote: > > > On Tue, Mar 20, 2018 at 09:30:55AM +0100, Greg KH wrote: > > > > On Sat, Mar 10, 2018 at

Re: [PATCH v3] iw: avgerage ack rssi changes for data frames

2018-03-21 Thread Johannes Berg
On Thu, 2018-03-08 at 12:49 +0530, Balaji Pothunoori wrote: > This patch is to display the average ack rssi for data > frames. "avg ack signal" field diplay limited by host based on > firmware capablities. I no longer have a corresponding kernel patch pending, so this is useless? johannes

Re: [PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-21 Thread Johannes Berg
On Mon, 2018-03-19 at 12:57 +1300, Ben Caradoc-Davies wrote: > Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") adds an > argument qos_ok to ieee80211_nullfunc_get to support QoS NDP. Despite > the claim in the commit log "Change all the drivers to *not* allow > QoS NDP for now, even

[PATCH v4] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-21 Thread Johannes Berg
From: Ben Caradoc-Davies Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing") added an argument qos_ok to ieee80211_nullfunc_get to support QoS NDP. Despite the claim in the commit log "Change all the drivers to *not* allow QoS NDP for now, even though it looks like

[PATCH] ath9k_htc: use non-QoS NDP for AP probing

2018-03-21 Thread Johannes Berg
From: Johannes Berg When switching mac80211 to use QoS NDP, it turned out that ath9k_htc is somehow broken by this, e.g. see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891060. Fix this by using the new mac80211 flag to go back to the old, incorrect, behaviour for

[PATCH] ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr

2018-03-21 Thread Joe Perches
Remove the static array and use the generic routine to set the Ethernet broadcast address. Signed-off-by: Joe Perches --- drivers/net/wireless/ath/ath.h| 2 -- drivers/net/wireless/ath/ath5k/attach.c | 2 +- drivers/net/wireless/ath/ath9k/htc_drv_init.c |

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Ajay Singh
Hi Dan, On Wed, 21 Mar 2018 10:51:16 +0300 Dan Carpenter wrote: > These look good. I've reviewed them all. > > Reviewed-by: Dan Carpenter Thanks for reviewing all the patches. > > I had some small process complaints but it doesn't make

Re: [PATCH 2/2] cfg80211: Modify wiphy registration semantics for self managed hints

2018-03-21 Thread Johannes Berg
So I really think this should just be one patch - it's not about "registration semantics" but about which types of requests get passed to reg_notifier(), and if you do it in one place you'd better also do it in the other. Secondly, this changes behaviour - not only for ath which presumably is

Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Johannes Berg
On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: > > + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { > + if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) > + return -EINVAL; > There might be value in adding GENL_SET_ERR_MSG() calls to new

[PATCH] mac80211_hwsim: fix secondary MAC address assignment

2018-03-21 Thread Johannes Berg
From: Johannes Berg OR'ing in 0x40 before a memcpy() to overwrite the value doesn't do much good - flip the order of operations are reported and tested by Jouni. Fixes: cb1a5bae5684 ("mac80211_hwsim: add permanent mac address option for new radios") Reported-by: Jouni

[PATCH] ath10k: build ce layer in ath10k core module

2018-03-21 Thread Govind Singh
CE layer is shared between pci and snoc target and results in duplicate object inclusion if both modules are compiled together statically and undefined KBUILD_MODNAME if compiled as module. Fix this by building ce layer in ath10k core module by adding ce object inclusion with ATH10K_CE boolean

[PATCH] mac80211_hwsim: Set wmediumd for new radios

2018-03-21 Thread Andrew Zaborowski
Set the wmediumd to the net's wmediumd when the radio gets created. Radios created after HWSIM_CMD_REGISTER don't currently get their data->wmediumd set and the userspace would need to reconnect to netlink to be able to call HWSIM_CMD_REGISTER again. Alternatively I think data->netgroup and

Re: [PATCH 04/11] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char

2018-03-21 Thread Dan Carpenter
This one would have been easier for me to review if it were broken up slightly differently. I have a script to review when people split functions up, but there were a bunch of other stuff so my script gets confused. Anyway, looks good. regards, dan carpenter

Re: [RFC v5 4/9] cfg80211: Support all iftypes in autodisconnect_wk

2018-03-21 Thread Johannes Berg
On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: > Currently autodisconnect_wk assumes that only interface types of > P2P_CLIENT and STATION use conn_owner_nlportid. Change this so all > interface types are supported. Hmm. This sort of duplicates cfg80211_leave() for the most part, apart

Re: [RFC] mac80211: advertise supported interface types for sw encryption

2018-03-21 Thread Johannes Berg
On Fri, 2018-03-09 at 11:57 +0530, mpubb...@codeaurora.org wrote: > From: Manikanta Pubbisetty > > Extending SW_CRYPTO_CONTROL interface so that drivers can advertise > the interface types on which they can support software encryption. > Driver's job is not done by

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Bharat Bhushan > Sent: Wednesday, March 21, 2018 12:49 > > > > +int dma_configure(struct device *dev) > > +{ > > + if (dev->bus->dma_configure) > > + return dev->bus->dma_configure(dev); > > What if dma_common_configure() is called in case

Re: [PATCH] mt76: enable MAC80211_LEDS by default

2018-03-21 Thread Arnd Bergmann
On Wed, Mar 21, 2018 at 6:45 AM, Johannes Berg wrote: > On Fri, 2018-03-16 at 15:45 +0100, Lorenzo Bianconi wrote: >> --- a/drivers/net/wireless/mediatek/mt76/Kconfig >> +++ b/drivers/net/wireless/mediatek/mt76/Kconfig >> @@ -1,5 +1,8 @@ >> config MT76_CORE >>

Re: [PATCH 06/11] staging: wilc1000: refactor mgmt_tx to fix line over 80 chars

2018-03-21 Thread Dan Carpenter
This would have been easier for me if it were split up slightly different again. This patch is fine. I have a couple comments for future patches which you are free to ignore if you want because it's mostly just my personal taste. On Tue, Mar 20, 2018 at 10:25:39PM +0530, Ajay Singh wrote: > +

Re: [PATCH 09/11] staging: wilc1000: remove line over 80 char in cfg_connect_result()

2018-03-21 Thread Dan Carpenter
On Tue, Mar 20, 2018 at 10:25:42PM +0530, Ajay Singh wrote: > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > index 1b6fe64..af1b8aa 100644 > --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c > +++

[PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Nipun Gupta
With each bus implementing its own DMA configuration callback, there is no need for bus to explicitly have force_dma in its global structure. This patch modifies of_dma_configure API to accept an input parameter which specifies if implicit DMA configuration is required even when it is not

[PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
It's bus specific aspect to map a given device on the bus and relevant firmware description of its DMA configuration. So, this change introduces '/dma_configure/' as bus callback giving flexibility to busses for implementing its own dma configuration function. The change eases the addition of new

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Dan Carpenter
These look good. I've reviewed them all. Reviewed-by: Dan Carpenter I had some small process complaints but it doesn't make life easier for me if you resend them and I have to review everything twice :P regards, dan carpenter

Re: [PATCH] mac80211: notify driver for change in multicast rates

2018-03-21 Thread Johannes Berg
On Tue, 2018-03-20 at 16:52 -0700, Pradeep Kumar Chitrapu wrote: > It is required to pass the rate information to driver/firmware > when rate control is offloaded to firmware. This helps in changing > multicast traffic rates thereby improving the network performance. Looks like there are two more

Re: [PATCH] ath9k_htc: use non-QoS NDP for AP probing

2018-03-21 Thread Kalle Valo
Johannes Berg writes: > From: Johannes Berg > > When switching mac80211 to use QoS NDP, it turned out that > ath9k_htc is somehow broken by this, e.g. see > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891060. > > Fix this by using the

pull-request: mac80211 2018-03-21

2018-03-21 Thread Johannes Berg
Hi Dave, Another few fixes - one for hwsim, so not really all that interesting, and two patches to work around an ath9k_htc problem. Note that I pulled your net tree today, so you may need to be careful to not fast-forward if you don't merge anything else before this. Please pull and let me

[PATCH] brcmfmac: Add timestamp to scan results report

2018-03-21 Thread dimitrysh
From 01da9ee11ce6e0973972b2ffd37eef660714f71a Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Wed, 21 Mar 2018 15:35:45 -0700 Subject: [PATCH] brcmfmac: Add timestamp to scan results report Monotonic time from boot is good timestamp indicator and it can be used by

[trivial PATCH V2] treewide: Align function definition open/close braces

2018-03-21 Thread Joe Perches
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1. Move those braces to column 1. This allows various function analyzers like gnu complexity to work properly for these modified functions. Signed-off-by: Joe Perches

[PATCH v4 2/3] firmware: add firmware_request_cache() to help with cache on reboot

2018-03-21 Thread Luis R. Rodriguez
Some devices have an optimization in place to enable the firmware to be retaineed during a system reboot, so after reboot the device can skip requesting and loading the firmware. This can save up to 1s in load time. The mt7601u 802.11 device happens to be such a device. When these devices retain

[PATCH v4 1/3] firmware: fix typo on pr_info_once() when ignore_sysfs_fallback is used

2018-03-21 Thread Luis R. Rodriguez
When the sysctl knob is used ignore the fallback mechanism we pr_info_once() to ensure its noted the knob was used. The print incorrectly states its a debugfs knob, its a sysctl knob, so correct this typo. Signed-off-by: Luis R. Rodriguez ---

[PATCH v4 3/3] mt7601u: use firmware_request_cache() to address cache on reboot

2018-03-21 Thread Luis R. Rodriguez
request_firmware_cache() will ensure the firmware is available on resume from suspend if on reboot the device retains the firmware. This optimization is in place given otherwise on reboot we have to reload the firmware, the opmization saves us about max 1s, minimum 10ms. Cantabile has reported

[PATCH v4 0/3] firmware: add firmware_request_cache()

2018-03-21 Thread Luis R. Rodriguez
Greg, Here are the last straggler patches to clean up what was left which you requested and to add the new firmware_request_cache() call to fix a corner case suspend issue. The extra space character you found in earlier patches no longer needs to be fixed as that assignement was replaced with a

[PATCH v2] mac80211: notify driver for change in multicast rates

2018-03-21 Thread Pradeep Kumar Chitrapu
It is required to pass the rate information to driver/firmware when rate control is offloaded to firmware. This helps in changing multicast traffic rates thereby improving the network performance. Signed-off-by: Pradeep Kumar Chitrapu --- V2: - Set the flag in missing

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 08:42 -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wvla, remove VLAs and replace them > with dynamic memory allocation instead. > > The use of stack Variable Length Arrays needs to be avoided, as they > can be a vector for stack exhaustion, which can be

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Gustavo A. R. Silva
On 03/21/2018 08:48 AM, Johannes Berg wrote: On Wed, 2018-03-21 at 08:42 -0500, Gustavo A. R. Silva wrote: In preparation to enabling -Wvla, remove VLAs and replace them with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Gustavo A. R. Silva
On 03/21/2018 08:58 AM, Johannes Berg wrote: On Wed, 2018-03-21 at 08:57 -0500, Gustavo A. R. Silva wrote: SHA_DESC_ON_STACK is currently being used in multiple places. But, yeah, I think we can define multiple macros of the same kind and adjust to the characteristics of each the component.

Re: [RFC v5 0/9] EAPoL over NL80211

2018-03-21 Thread Johannes Berg
> TODO: That was well-hidden :) > - It is unclear to me how AP_VLAN and AP interfaces should synchronize on > conn_owner_nlportid. This is required for tx_control_port to work. I'm not really sure what you mean? Technically I guess an AP_VLAN could have a different owner from an AP, but if

Re: [PATCH 04/11] staging: wilc1000: refactor WILC_WFI_p2p_rx() to avoid line over 80 char

2018-03-21 Thread Claudiu Beznea
Also good for me, only one minor thing mentioned below. On 20.03.2018 18:55, Ajay Singh wrote: > + if (subtype == GO_NEG_REQ || subtype == GO_NEG_RSP || > + subtype == P2P_INV_REQ || subtype == P2P_INV_RSP) { > + for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < size; i++) { > +

Re: [PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly

2018-03-21 Thread Claudiu Beznea
Patch 6 may be reworked a bit. Other than this: Reviewed-by: Claudiu Beznea On 21.03.2018 11:20, Ajay Singh wrote: > Hi Dan, > > On Wed, 21 Mar 2018 10:51:16 +0300 > Dan Carpenter wrote: > >> These look good. I've reviewed them all. >>

Re: [PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 08:57 -0500, Gustavo A. R. Silva wrote: > > SHA_DESC_ON_STACK is currently being used in multiple places. But, yeah, > I think we can define multiple macros of the same kind and adjust to the > characteristics of each the component. > > How big do you think tfm can get?

Re: [PATCH 06/11] staging: wilc1000: refactor mgmt_tx to fix line over 80 chars

2018-03-21 Thread Claudiu Beznea
On 20.03.2018 18:55, Ajay Singh wrote: > Refactor mgmt_tx() to fix line over 80 characters issue. Split the > function to avoid the checkpatch.pl warning. Returning the same error > code in case of memory allocation failure. > > Signed-off-by: Ajay Singh > --- >

Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Denis Kenzior
Hi Johannes, On 03/21/2018 02:47 AM, Johannes Berg wrote: On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { + if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) + return -EINVAL; There

Re: [RFC v5 3/9] nl80211: Add CONTROL_PORT_OVER_NL80211 attribute

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 10:01 -0500, Denis Kenzior wrote: > Hi Johannes, > > On 03/21/2018 02:47 AM, Johannes Berg wrote: > > On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: > > > > > > + if (info->attrs[NL80211_ATTR_CONTROL_PORT_OVER_NL80211]) { > > > + if

Intel Corporation Wireless 8260 [8086:24f3] (rev 3a) - Hardware error in PCI passthrough

2018-03-21 Thread Mohamed Khalfella
Hi, I am working in pci passthrough for qemu under SmartOS. My test machine is Intel NUC Kit NUC6i3SYH BOXNUC6I3SYH which comes with Intel Wireless 8260 [8086:24f3]. So far the guest OS recognize the PCI device and the driver, iwlwifi reports an error when it tries to initialize the device. Here

Re: [PATCH] mt76: enable MAC80211_LEDS by default

2018-03-21 Thread Arnd Bergmann
On Wed, Mar 21, 2018, 23:27 Lorenzo Bianconi wrote: > > On Mar 21, Arnd Bergmann wrote: > > On Wed, Mar 21, 2018 at 6:45 AM, Johannes Berg > > wrote: > > > On Fri, 2018-03-16 at 15:45 +0100, Lorenzo Bianconi wrote: > > >> ---

Re: [PATCH] mac80211: add ieee80211_hw flag for QoS NDP support

2018-03-21 Thread Ben Caradoc-Davies
On 21/03/18 22:53, Johannes Berg wrote: I've applied a modified version of this patch - it will also require setting the new "broken" flag in the driver. Thanks very much, Johannes. I have tested your modified patch together with the patch

RE: [PATCH v2 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, March 21, 2018 15:00 > > +int dma_configure(struct device *dev) > > +{ > > + if (dev->bus->dma_configure) > > + return dev->bus->dma_configure(dev); > > + > > + return 0; > > +} >

RE: [PATCH v2 2/2] drivers: remove force dma flag from buses

2018-03-21 Thread Nipun Gupta
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Wednesday, March 21, 2018 15:05 > To: Nipun Gupta > Cc: robin.mur...@arm.com; h...@lst.de; li...@armlinux.org.uk; > m.szyprow...@samsung.com; bhelg...@google.com; zaj...@gmail.com; >

Re: [ath10k throughput] low throughput in multi-user mode

2018-03-21 Thread Ben Greear
On 03/20/2018 06:44 PM, gary wrote: Hi all, I have run the throughput test on veriwave.(from Ethernet to wireless) My AP suports 4*4, 11ac, mu-mimo.,wireless chip is QCA9984. At first, the throughput is about 80Mbps only with 16 users, so I force to return true in function

[PATCH] mac80211: aes-cmac: remove VLA usage

2018-03-21 Thread Gustavo A. R. Silva
In preparation to enabling -Wvla, remove VLAs and replace them with dynamic memory allocation instead. The use of stack Variable Length Arrays needs to be avoided, as they can be a vector for stack exhaustion, which can be both a runtime bug or a security flaw. Also, in general, as code evolves

Re: [RFC v5 4/9] cfg80211: Support all iftypes in autodisconnect_wk

2018-03-21 Thread Denis Kenzior
Hi Johannes, On 03/21/2018 02:46 AM, Johannes Berg wrote: On Tue, 2018-03-13 at 16:59 -0500, Denis Kenzior wrote: Currently autodisconnect_wk assumes that only interface types of P2P_CLIENT and STATION use conn_owner_nlportid. Change this so all interface types are supported. Hmm. This sort

Re: [RFC v5 0/9] EAPoL over NL80211

2018-03-21 Thread Denis Kenzior
Hi Johannes, On 03/21/2018 10:13 AM, Johannes Berg wrote: TODO: That was well-hidden :) Sorry. I assumed people read the change log :) - It is unclear to me how AP_VLAN and AP interfaces should synchronize on conn_owner_nlportid. This is required for tx_control_port to work. I'm

Re: [PATCH] mt76: enable MAC80211_LEDS by default

2018-03-21 Thread Lorenzo Bianconi
On Mar 21, Arnd Bergmann wrote: > On Wed, Mar 21, 2018 at 6:45 AM, Johannes Berg > wrote: > > On Fri, 2018-03-16 at 15:45 +0100, Lorenzo Bianconi wrote: > >> --- a/drivers/net/wireless/mediatek/mt76/Kconfig > >> +++ b/drivers/net/wireless/mediatek/mt76/Kconfig > >> @@

Re: AP6335 with mainline kernel

2018-03-21 Thread Vanessa Maegima
Hi Arend, On Sex, 2018-01-19 at 10:02 +0100, Arend van Spriel wrote: > On 1/18/2018 12:47 PM, Vanessa Maegima wrote: > > > > Hi Arend, > > > > On Ter, 2018-01-16 at 21:21 +0100, Arend van Spriel wrote: > > > > > > On 1/15/2018 9:08 PM, Fabio Estevam wrote: > > > > > > > > > > > > Hi Arend, >

Re: [RFC v5 4/9] cfg80211: Support all iftypes in autodisconnect_wk

2018-03-21 Thread Johannes Berg
On Wed, 2018-03-21 at 10:27 -0500, Denis Kenzior wrote: > > cfg80211_leave also messes with scans and autodisconnect_wk didn't. So > I played it safe as I didn't want to introduce any silent semantic changes. Makes sense, but we could pass an argument and avoid duplicating the code? > Also,