[PATCH v2 13/31] timer: Remove meaningless .data/.function assignments

2017-09-20 Thread Kees Cook
Several timer users needlessly reset their .function/.data fields during their timer callback, but nothing else changes them. Some users do not use their .data field at all. Each instance is removed here. Cc: Krzysztof Halasa Cc: Aditya Shankar Cc:

Re: rtl8821ae keep alive not set, connection lost

2017-09-20 Thread James Cameron
On Wed, Sep 20, 2017 at 04:48:23PM -0500, Larry Finger wrote: > On 09/20/2017 04:36 AM, James Cameron wrote: > >When the problem occurs, register 0x350 bit 25 is set, for which a > >comment in _rtl8821ae_check_pcie_dma_hang says means there is an RX > >hang. > > > >So perhaps driver should call

Re: rtl8821ae keep alive not set, connection lost

2017-09-20 Thread Larry Finger
On 09/20/2017 04:36 AM, James Cameron wrote: When the problem occurs, register 0x350 bit 25 is set, for which a comment in _rtl8821ae_check_pcie_dma_hang says means there is an RX hang. So perhaps driver should call _rtl8821ae_check_pcie_dma_hang and _rtl8821ae_reset_pcie_interface_dma. Any

[PATCH] rtlwifi: rtl8821ae: Fix connection lost problem

2017-09-20 Thread Larry Finger
In commit 40b368af4b75 ("rtlwifi: Fix alignment issues"), the read of REG_DBI_READ was changed from 16 to 8 bits. For unknown reasonsi this change results in reduced stability for the wireless connection. This regression was located using bisection. Fixes: 40b368af4b75 ("rtlwifi: Fix alignment

Re: usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 21:27 +0200, Christian Lamparter wrote: > It seems this is caused as a result of: > -> lock_map_acquire(>lockdep_map); > lock_map_release(>lockdep_map); > > in flush_work() [0] Agree. > This was added by: > > commit

AP6335 with mainline kernel

2017-09-20 Thread Vanessa Ayumi Maegima
Hi, I am trying to enable Wifi on imx7d-pico using mainline kernel. imx7d-pico has an AP6335 chip. I am facing some issues related to the nvram file. I am using the firmware provided by Buildroot (brcmfmac4339-sdio.bin). I get the following error: [8.630380] brcmfmac: brcmf_sdio_htclk: HT

Re: usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-20 Thread Christian Lamparter
On Wednesday, September 20, 2017 8:37:08 PM CEST Andrey Konovalov wrote: > Hi! > > I've got the following report while fuzzing the kernel with syzkaller. > > On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). > > INFO: trying to register non-static key. > the code is fine but needs

usb/net/p54: trying to register non-static key in p54_unregister_leds

2017-09-20 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit ebb2c2437d8008d46796902ff390653822af6cc4 (Sep 18). INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 1404 Comm:

Re: mac80211: avoid allocating TXQs that won't be used

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 17:08 +0100, Colin Ian King wrote: > Johannes, > > Static analysis with CoverityScan on linux-next today detected a null > pointer dereference issue on commit: > > From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00 > 2001 > From: Johannes Berg

re: mac80211: avoid allocating TXQs that won't be used

2017-09-20 Thread Colin Ian King
Johannes, Static analysis with CoverityScan on linux-next today detected a null pointer dereference issue on commit: >From 0fc4b3403d215ecd3c05505ec1f0028a227ed319 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 22 Jun 2017 12:20:29 +0200 Subject: [PATCH]

Re: [V2, 1/9] qtnfmac: qlink: convert channel width from bitfiled to simple enum

2017-09-20 Thread Sergey Matyukevich
Hello Kalle, > BTW, I got a mail undelivered message. Not sure why smtp.codeaurora.org > could not find the host but reporting it here just in case: > > : unable to look up host > quantenna-com.mail.protection.outlook.com: Name or service not known > >

Re: [2/2] mwifiex: use get_random_mask_addr() helper

2017-09-20 Thread Kalle Valo
Ganapathi Bhat wrote: > Avoid calculating random MAC address in driver. Instead make > use of 'get_random_mask_addr()' function. > > Signed-off-by: Ganapathi Bhat > Reviewed-by: Brian Norris Patch applied to

Re: mwifiex: avoid storing random_mac in private

2017-09-20 Thread Kalle Valo
Ganapathi Bhat wrote: > Application will keep track of whether MAC address randomization > is enabled or not during scan. But at present driver is storing > 'random_mac' in mwifiex_private which implies even after scan is > done driver has some reference to the earlier 'scan

Re: mwifiex: make const arrays static to shink object code size

2017-09-20 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > Don't populate const arrays on the stack, instead make them static > Makes the object code smaller by nearly 300 bytes: > > Before: >text data bss dec hex filename >

Re: mwifiex: remove unnecessary call to memset

2017-09-20 Thread Kalle Valo
Himanshu Jha wrote: > call to memset to assign 0 value immediately after allocating > memory with kzalloc is unnecesaary as kzalloc allocates the memory > filled with 0 value. > > Semantic patch used to resolve this issue: > > @@ > expression e,e2; constant c; >

Re: mwifiex: check for mfg_mode in add_virtual_intf

2017-09-20 Thread Kalle Valo
Ganapathi Bhat wrote: > If driver is loaded with 'mfg_mode' enabled, then the sending > commands are not allowed. So, skip sending commands, to firmware > in mwifiex_add_virtual_intf if 'mfg_mode' is enabled. > > Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly

Re: mwifiex: notify cfg80211 about scan abort

2017-09-20 Thread Kalle Valo
Ganapathi Bhat wrote: > Driver sends a series of scan commands to firmware to serve a > user scan request. If an intermediate scan command fails, driver > aborts the scan but it is not being informed to cfg80211. This > will cause issues in applications performing periodic

Re: rtlwifi: rtl8192ee: Fix memory leak when loading firmware

2017-09-20 Thread Kalle Valo
Larry Finger wrote: > In routine rtl92ee_set_fw_rsvdpagepkt(), the driver allocates an skb, but > never calls rtl_cmd_send_packet(), which will free the buffer. All other > rtlwifi drivers perform this operation correctly. > > This problem has been in the driver since

Re: rtlwifi: btcoexist: 23b 1ant: fix duplicated code for different branches

2017-09-20 Thread Kalle Valo
Larry Finger wrote: > A typo led to this issue, which was detected with the help of Coccinelle. > > In addition to fixing the error, the code is refactored to eliminate an > if statement. > > Addresses-Coverity-ID: 1226788 > > Reported-by: Gustavo A. R. Silva

Re: [1/2] b43: fix unitialized reads of ret by initializing the array to zero

2017-09-20 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > The u8 char array ret is not being initialized and elements outside > the range start to end contain just garbage values from the stack. > This results in a later scan of the array to read

Re: rsi: fix a dereference on adapter before it has been null checked

2017-09-20 Thread Kalle Valo
Colin Ian King wrote: > From: Colin Ian King > > The assignment of dev is dereferencing adapter before adapter has > been null checked, potentially leading to a null pointer dereference. > Fix this by simply moving the assignment of dev to a

Re: [1/8] rsi: add p2p support parameters to mac80211

2017-09-20 Thread Kalle Valo
Amitkumar Karwar wrote: > From: Prameela Rani Garnepudi > > This patch adds p2p supported parameters to mac80211 hw and > wiphy structures during mac80211 registration. > > Signed-off-by: Prameela Rani Garnepudi >

Re: [v2,1/2] qtnfmac: lock access to h/w in tx path

2017-09-20 Thread Kalle Valo
Sergey Matyukevich wrote: > Fix tx path regression. Lock should be held when queuing packets > to h/w fifos in order to properly handle configurations with > multiple enabled interfaces. > > Signed-off-by: Sergey Matyukevich

Re: [V2, 1/9] qtnfmac: qlink: convert channel width from bitfiled to simple enum

2017-09-20 Thread Kalle Valo
Kalle Valo writes: > Igor Mitsyanko wrote: > >> From: Igor Mitsyanko >> >> Signed-off-by: Igor Mitsyanko >> Reviewed-by: Sergey Matyukevich

Re: [V2, 1/9] qtnfmac: qlink: convert channel width from bitfiled to simple enum

2017-09-20 Thread Kalle Valo
Igor Mitsyanko wrote: > From: Igor Mitsyanko > > Signed-off-by: Igor Mitsyanko > Reviewed-by: Sergey Matyukevich No empty commit logs, please. After the

Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 15:11 +0300, Ville Syrjälä wrote: > > > I guess since the outer pointer isn't protected, only the inner ... > > I think just the fact that even the pointers in ieee80211_tx_data > don't have the __rcu annotation makes it rather hard to see what is > really rcu protected and

Re: [PATCH 1/2] mwifiex: resubmit failed to submit RX URBs in main thread

2017-09-20 Thread Kalle Valo
Ganapathi Bhat writes: > From: James Cao > > Current driver has 6 Rx data URBs. Once any packet received > kernel calls our callback, in which the same URB will be > resubmitted after Rx indication. In URB submission function a new > skb will be allocated

Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Ville Syrjälä
On Wed, Sep 20, 2017 at 12:39:24PM +0200, Johannes Berg wrote: > On Wed, 2017-09-20 at 13:11 +0300, Ville Syrjala wrote: > > > --- a/net/mac80211/tx.c > > +++ b/net/mac80211/tx.c > > @@ -1770,15 +1770,21 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw > > *hw, > >   struct

Re: [PATCH 2/2] mwifiex: print URB submit failure error after threshold attemtps

2017-09-20 Thread Kalle Valo
Brian Norris writes: > On Wed, Sep 20, 2017 at 07:30:29AM +0300, Kalle Valo wrote: >> Brian Norris writes: >> >> > Hi Ganapathi, >> > >> > On Thu, Sep 14, 2017 at 02:14:24PM +, Ganapathi Bhat wrote: >> >> > On Thu, 2017-08-31 at 01:21

Re: [PATCH 2/2] mwifiex: use get_random_mask_addr() helper

2017-09-20 Thread Kalle Valo
Brian Norris writes: > Hi, > > On Tue, Sep 19, 2017 at 05:30:06PM +0300, Kalle Valo wrote: >> Ganapathi Bhat writes: >> >> > Hi Kalle, >> >> >> >> > Avoid calculating random MAC address in driver. Instead make use of >> >> >

Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Kalle Valo
Xinming Hu writes: >> You could look at >> nl80211 vendor commands, but that is also under scrutiny if common wifi >> functionality is provided by it. I am pretty sure Kalle has his ideas about >> this :-) >> > > Yes, the new utility should use nl80211 interface. > But we

Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Kalle Valo
Arend van Spriel writes: > On 9/20/2017 8:44 AM, Xinming Hu wrote: >> From: Xinming Hu >> >> Add net_dev ndo_do_ioctl handler, which could be used for >> downloading host command by utility in manufactory test > > Not sure if we want ioctls in

Re: [PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Johannes Berg
On Wed, 2017-09-20 at 13:11 +0300, Ville Syrjala wrote: > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -1770,15 +1770,21 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, >   struct ieee80211_tx_data tx; >   struct sk_buff *skb2; >   > - if

[PATCH v2 1/2] mac80211: Add rcu read side critical sections

2017-09-20 Thread Ville Syrjala
From: Ville Syrjälä I got the following lockdep warning about the rcu_dereference()s in ieee80211_tx_h_select_key(). After tracing all callers of ieee80211_tx_h_select_key() I discovered that ieee80211_get_buffered_bc() and ieee80211_build_data_template() had the

Re: Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Xinming Hu
Hi, > -Original Message- > From: Arend van Spriel [mailto:arend.vanspr...@broadcom.com] > Sent: 2017年9月20日 16:40 > To: Xinming Hu ; Linux Wireless > > Cc: Kalle Valo ; Brian Norris > ;

Re: rtl8821ae keep alive not set, connection lost

2017-09-20 Thread James Cameron
On Tue, Sep 19, 2017 at 07:42:04PM +1000, James Cameron wrote: > On Thu, Sep 14, 2017 at 07:27:39PM +1000, James Cameron wrote: > > On Wed, Sep 13, 2017 at 07:39:35PM -0500, Larry Finger wrote: > > > On 09/13/2017 04:46 PM, James Cameron wrote: > > > > > > > >I'll give it some more testing and let

RE: [EXT] Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Xinming Hu
Hi, > -Original Message- > From: Souptick Joarder [mailto:jrdr.li...@gmail.com] > Sent: 2017年9月20日 16:07 > To: Xinming Hu > Cc: Linux Wireless ; Kalle Valo > ; Brian Norris ; Dmitry >

Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Arend van Spriel
On 9/20/2017 8:44 AM, Xinming Hu wrote: From: Xinming Hu Add net_dev ndo_do_ioctl handler, which could be used for downloading host command by utility in manufactory test Not sure if we want ioctls in upstream wireless drivers. You could look at nl80211 vendor commands,

Re: [PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Souptick Joarder
On Wed, Sep 20, 2017 at 12:14 PM, Xinming Hu wrote: > From: Xinming Hu > > Add net_dev ndo_do_ioctl handler, which could be used for > downloading host command by utility in manufactory test > > Signed-off-by: Xinming Hu >

[PATCH] mwifiex: add device specific ioctl handler

2017-09-20 Thread Xinming Hu
From: Xinming Hu Add net_dev ndo_do_ioctl handler, which could be used for downloading host command by utility in manufactory test Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat ---

Re: [PATCH 2/2] mwifiex: print URB submit failure error after threshold attemtps

2017-09-20 Thread Brian Norris
Hi Kalle, On Wed, Sep 20, 2017 at 07:30:29AM +0300, Kalle Valo wrote: > Brian Norris writes: > > > Hi Ganapathi, > > > > On Thu, Sep 14, 2017 at 02:14:24PM +, Ganapathi Bhat wrote: > >> > On Thu, 2017-08-31 at 01:21 +0530, Ganapathi Bhat wrote: > >> > Why not use