[PATCH v2] brcmfmac: Fix glom_skb leak in brcmf_sdiod_recv_chain

2017-06-02 Thread Peter S. Housel
An earlier change to this function (3bdae810721b) fixed a leak in the case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the glom_skb buffer, used for emulating a scattering read, is never used or referenced after its contents are copied into the destination buffers, and therefore

ath9k - Division by zero in kernel (as well as firmware panic)

2017-06-02 Thread Nathan Royce
ODroid XU4 $ uname -a Linux computer 4.12.0-rc3-dirty #1 SMP Wed May 31 15:02:05 CDT 2017 armv7l GNU/Linux $ lsusb ... Bus 001 Device 002: ID 2109:2813 VIA Labs, Inc. Bus 001 Device 010: ID 0cf3:7015 Qualcomm Atheros Communications TP-Link TL-WN821N v3 / TL-WN822N v2 802.11n [Atheros

[PATCH 2/9] rtlwifi: btcoex: rename ex_halbtc*ant to ex_btc*ant

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang These external functions are for BT-coexistence, so remove the "hal" prefix for consistancy. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc:

[PATCH 9/9] rtlwifi: btcoex: let btcoex get wifi rssi and link status

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang Instead of rssi status, the btcoex also needs to get the link status of the wifi. In addition, some of the rssi status can be merged into link status. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger

[PATCH 6/9] rtlwifi: btcoex: hook external functions for newer chips

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang Hook the external functions for newer ICs such as 8821a and 8192e. Rename ex_halbtc8192e2ant_halt_notify to ex_btc8192e2ant_halt_notify. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger

[PATCH 1/9] rtlwifi: btcoex: add macros to check chip type

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang For some external functions that have hardware dependency, we need to know the type of the hardware before invoking them. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih

[PATCH 7/9] rtlwifi: btcoex: bind BT coex information with wifi driver

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang When initializing, gather BT information in struct btcoexist and provide them to wifi driver. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc:

[PATCH 4/9] rtlwifi: btcoex: hook external PnP notify by chip for wifi driver

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang Hook the chip-specific PnP notify functions for the wifi driver to notify btcoexistence. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming

[PATCH 5/9] rtlwifi: btcoex: add settings before the hardware is ready

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang When the hardware is turned on and in the initialization stage, the PTA circuit is unstable. Hence we need to force some hardware settings to make sure the PTA circuit work correctly, otherwise it may affect the user's experience. Signed-off-by:

[PATCH 3/9] rtlwifi: btcoex: settings before firmware is downloaded

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang The btcoex is sometimes unstable because there are some unexpected behaviors before the firmware has been downloaded successfully. Therefore we force the antenna path settings to avoid this, then let the firmware control the btcoexistence when the

[PATCH 0/9] rtlwifi: btcoex: Further updates

2017-06-02 Thread Larry Finger
This set of 9 patches contain the material that was originally sent as 1 of 7. Each of these now accomplish a single task. Larry Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu

[PATCH 8/9] rtlwifi: btcoex: remove unused display functions

2017-06-02 Thread Larry Finger
From: Yan-Hsuan Chuang These display functions are useless and will not be called in the future. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Birming Chiu

Re: [PATCH] brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain

2017-06-02 Thread Franky Lin
On Fri, Jun 2, 2017 at 10:22 AM, Peter S. Housel wrote: > An earlier change to this function (3bdae810721b) fixed a leak in the > case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the > glob_skb buffer, used for emulating a scattering read, is never used > or

Re: [PATCH] brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain

2017-06-02 Thread Florian Fainelli
On 06/02/2017 10:22 AM, Peter S. Housel wrote: > An earlier change to this function (3bdae810721b) fixed a leak in the > case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the > glob_skb buffer, used for emulating a scattering read, is never used > or referenced after its contents are

[PATCH] brcmfmac: Fix glob_skb leak in brcmf_sdiod_recv_chain

2017-06-02 Thread Peter S. Housel
An earlier change to this function (3bdae810721b) fixed a leak in the case of an unsuccessful call to brcmf_sdiod_buffrw(). However, the glob_skb buffer, used for emulating a scattering read, is never used or referenced after its contents are copied into the destination buffers, and therefore

Re: [PATCH][wireless-next] qtnfmac: check band before allocating cmd_skb to avoid resource leak

2017-06-02 Thread Igor Mitsyanko
On 06/02/2017 08:40 AM, Colin King wrote: External Email From: Colin Ian King The current code allocates cmd_skb and then will leak this if band->band is an illegal value. It is simpler to sanity check the band first before allocating cmd_skb so that we don't have

[PATCH][wireless-next] qtnfmac: check band before allocating cmd_skb to avoid resource leak

2017-06-02 Thread Colin King
From: Colin Ian King The current code allocates cmd_skb and then will leak this if band->band is an illegal value. It is simpler to sanity check the band first before allocating cmd_skb so that we don't have to free cmd_skb if an invalid band occurs. Detected by

Re: pull-request: mac80211 2017-06-02

2017-06-02 Thread David Miller
From: Johannes Berg Date: Fri, 2 Jun 2017 15:47:44 +0200 > Here I just have two fixes for issues that folks reported to me recently. > > Please pull and let me know if there's any problem. Looks good, pulled, thanks!

[PATCH 3/6] rsi: Register interrupt handler before firmware load

2017-06-02 Thread Amitkumar Karwar
From: Prameela Rani Garnepudi Before firmware load, sometimes false interrupts are received. System hang is observed if interrupt handler is not registered to receive these interrupts. Hence interrupt handler registration is moved before firmware load. We will drop

[PATCH 5/6] rsi: configure new boot parameters to device

2017-06-02 Thread Amitkumar Karwar
From: Prameela Rani Garnepudi Boot parameters are changed in new firmware. Also three new sdio sleep parameters are added for ultra low power save. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar

[PATCH 4/6] rsi: receive path enhancement for RS9113

2017-06-02 Thread Amitkumar Karwar
From: Prameela Rani Garnepudi RS9113 chipset supports Coex feature. Initial frame exchanges during device initialization happens on coex queue. This patch adds the handling for coex queue. Signed-off-by: Prameela Rani Garnepudi Signed-off-by:

[PATCH 6/6] rsi: add tx frame for common device configuration

2017-06-02 Thread Amitkumar Karwar
From: Prameela Rani Garnepudi After successful loading of firmware, a CARD READY indication is received by host. Common device configuration parameters are sent to the device after this. It includes information like device operating mode (Wi-Fi alone or BT coex), power

[PATCH 2/6] rsi: use enum for FSM states

2017-06-02 Thread Amitkumar Karwar
Currently macros are used for FSM states. We will replace it with enum so that new state can be added easily without worrying about macro value. Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/rsi/rsi_main.h | 16 +--- 1 file changed, 9

[PATCH 1/6] rsi: add usb RS9113 chipset support

2017-06-02 Thread Amitkumar Karwar
From: Prameela Rani Garnepudi usb device id and vendor id for RS9113 chipset are included. So it can be used through usb interface. Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar ---

[PATCH 0/6] rsi driver bringup changes

2017-06-02 Thread Amitkumar Karwar
This patch series includes the changes for adding USB chipset, frames exchanged with firmware during initialization and false interrupt problem fix for SDIO. Amitkumar Karwar (1): rsi: use enum for FSM states Prameela Rani Garnepudi (5): rsi: add usb RS9113 chipset support rsi: Register

Re: [PATCH V2 0/9] nl80211: add support for PTK/GTK handshake offload

2017-06-02 Thread Johannes Berg
On Fri, 2017-06-02 at 13:19 +0200, Arend van Spriel wrote: > I was thinking about adding a DOC section in nl80211.h: Sure! > /** >   * DOC: WPA/WPA2 temporal key exchange offload >   * >   * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag > drivers >   * can indicate offload support

pull-request: mac80211 2017-06-02

2017-06-02 Thread Johannes Berg
Hi Dave, Here I just have two fixes for issues that folks reported to me recently. Please pull and let me know if there's any problem. Thanks, johannes The following changes since commit 029c58178b9aa0a293a86ee0da3355611ac99d07: Merge tag 'mac80211-for-davem-2017-05-23' of

[PATCH 24/25] iwlwifi: mvm: fix many kernel-doc warnings

2017-06-02 Thread Luca Coelho
From: Johannes Berg Fix many kernel-doc warnings. In one case, this required adding a new enum value to be able to document things properly. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 13/25] iwlwifi: mvm: add documentation links to various fields

2017-06-02 Thread Luca Coelho
From: Johannes Berg Link various fields to the documentation of the enums that define their values. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/mvm/fw-api-coex.h | 10

[PATCH 25/25] iwlwifi: add wait for tx queue empty

2017-06-02 Thread Luca Coelho
From: Sara Sharon Now that we have 512 queues, add a wait for single TX queue to gen2. This replaces gen1 wait_tx_queues_empty, which was limited to 32 queues. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho ---

[PATCH 16/25] iwlwifi: mvm: create/name various enums

2017-06-02 Thread Luca Coelho
From: Johannes Berg Some values should be in enums so documentation can refer to them, some values should be named for the same reason. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 23/25] iwlwifi: mvm: remove unused REPLY_MAX

2017-06-02 Thread Luca Coelho
From: Johannes Berg This value is unused, and there's no reason we'd ever use it. Just remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 -- 1

[PATCH 18/25] iwlwifi: mvm: remove wrt support of page dumps in gen2

2017-06-02 Thread Luca Coelho
From: Liad Kaufman In gen2, page dumping should be done in transport layer, since the addresses needed for the paging mechanism reside there. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho ---

[PATCH 10/25] iwlwifi: mvm: add documentation to some WoWLAN commands

2017-06-02 Thread Luca Coelho
From: Johannes Berg Add some documentation for the WoWLAN commands, also linking the correct enums used. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h

[PATCH 12/25] iwlwifi: mvm: fix some kernel-doc

2017-06-02 Thread Luca Coelho
From: Johannes Berg This mostly fixes missing tags/struct names, but also some other things. Lots of issues remain though. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 20/25] iwlwifi: Add fw_name_pre_rf_next_step to support different rf steps

2017-06-02 Thread Luca Coelho
From: Haim Dreyfuss Integrated chip may have different HW and RF steps. Currently, the driver supports only different HW steps. Add logic to support different RF steps enables combining different HW and RF steps. Signed-off-by: Haim Dreyfuss

[PATCH 21/25] iwlwifi: mvm: remove unused TX_CMD_NEXT_FRAME_*

2017-06-02 Thread Luca Coelho
From: Johannes Berg Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx.h | 25 +- 1 file changed, 1 insertion(+), 24 deletions(-) diff

[PATCH 15/25] iwlwifi: mvm: disentangle binding command versions

2017-06-02 Thread Luca Coelho
From: Johannes Berg The comments/size of the different binding commands get lost in documentation, so introduce two different command structs that can be used there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho

[PATCH 11/25] iwlwifi: mvm: wait for the flushed queue only

2017-06-02 Thread Luca Coelho
From: Sara Sharon The function flushed only agg queue and no more traffic is queued on it. However, it waits for all queues to empty, which is not necessary and may take more time. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho

[PATCH 14/25] iwlwifi: update device ID for a000 family

2017-06-02 Thread Luca Coelho
From: Sara Sharon Three configurations will share device ID 2720, and will be differentiated by RF ID. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 3 ++-

[PATCH 19/25] iwlwifi: pcie: support page dumping in wrt in gen2

2017-06-02 Thread Luca Coelho
From: Liad Kaufman In gen2, page dumping needs to be done in the trans layer, as it is the one with access to the paging pointers. Signed-off-by: Liad Kaufman Signed-off-by: Luca Coelho ---

[PATCH 22/25] iwlwifi: kernel-doc: make proper links

2017-06-02 Thread Luca Coelho
From: Johannes Berg Using %enum instead of (and in one case, %struct) results in the wrong parsing. Fix that so that if documentation is generated, the result is clickable links. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho

[PATCH 17/25] iwlwifi: mvm: document structures used by commands

2017-06-02 Thread Luca Coelho
From: Johannes Berg Add documentation to a lot of command IDs that links to the appropriate structure(s) used with those IDs. In one case, actually add and use a new struct for that purpose. Signed-off-by: Johannes Berg Signed-off-by: Luca

[PATCH 04/25] iwlwifi: mvm: fix endianness in lq_cmd declaration

2017-06-02 Thread Luca Coelho
From: Johannes Berg This member doesn't seem to be used, so this doesn't really fix anything, but it's better to have the right type there. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 08/25] iwlwifi: mvm: use u8 for reserved fields

2017-06-02 Thread Luca Coelho
From: Johannes Berg There's no saying what kind of type a reserved field will get in the future, so use u8 arrays to reserve space. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 06/25] iwlwifi: mvm: use proper sta_addr in firmware API

2017-06-02 Thread Luca Coelho
From: Johannes Berg There's no point to declare an address as a __le32/__le16 and then only take a pointer to it anyway, change that to just a sta_addr[ETH_ALEN]. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho

[PATCH 09/25] iwlwifi: mvm: disentangle paging command structs

2017-06-02 Thread Luca Coelho
From: Johannes Berg Instead of using a union and hard-coding the size difference, declare both command structs properly, use a union on the stack to build them and the right sizeof() for the size. Signed-off-by: Johannes Berg Signed-off-by:

[PATCH 07/25] iwlwifi: mvm: fix MCC endianness bug

2017-06-02 Thread Luca Coelho
From: Johannes Berg Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/nvm.c| 4 ++-- 2 files changed, 3

[PATCH 01/25] iwlwifi: mvm: flush per station for DQA mode

2017-06-02 Thread Luca Coelho
From: Sara Sharon Avoid using the global flush and move to flush per station whenever possible in DQA mode. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |

[PATCH 00/25] iwlwifi: updates intended for v4.13 2017-06-02

2017-06-02 Thread Luca Coelho
From: Luca Coelho Hi, Here's my first set of patches for v4.13. These are the changes: * A bunch of FW API documentation updates; * Continued work for the new A000 family; * Some small fixes and cleanups here and there. As usual, I'm pushing this to a pending

[PATCH 02/25] iwlwifi: mvm: support getting nvm data from firmware

2017-06-02 Thread Luca Coelho
From: Sara Sharon This API replaces the complex NVM parsing of the iwlwifi module. Instead, we get all needed data from firmware. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho ---

[PATCH 03/25] iwlwifi: mvm: support old method of NVM parsing

2017-06-02 Thread Luca Coelho
From: Sara Sharon Add configuration for allowing driver's nvm parsing and bypassing the new host command, for debugging. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho ---

[PATCH 05/25] iwlwifi: mvm: document which group enums are used with which group ID

2017-06-02 Thread Luca Coelho
From: Johannes Berg Make it explicit which command definition enum is supposed to be used with which command group, rather than relying on being able to figure it out by name. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho

Re: [PATCH V2 0/9] nl80211: add support for PTK/GTK handshake offload

2017-06-02 Thread Arend van Spriel
On 5/29/2017 11:31 AM, Johannes Berg wrote: Hi Arend, Note that this (checking NEW_KEY) only works when you don't have any split between AP/client cases. Not sure what's the case for you. Late response so hopefully you recall, but what do you mean by "any split between AP/client cases"? I

[PATCH 10/10] iwlwifi: fix host command memory leaks

2017-06-02 Thread Luca Coelho
From: Shahar S Matityahu Sending host command with CMD_WANT_SKB flag demands the release of the response buffer with iwl_free_resp function. The patch adds the memory release in all the relevant places Signed-off-by: Shahar S Matityahu

Re: After upgrading to 4.11.1, wifi driver refuses to load after being unloaded once.

2017-06-02 Thread Luca Coelho
On Thu, 2017-05-25 at 19:48 -0700, Marc MERLIN wrote: > Howdy, > > First I tried i...@linux.intel.com which is now dead > Then linuxw...@intel.com, but no reply. > So I'm trying here next. Sorry, Marc. Somehow your emails really slipped through the cracks and I hadn't seen them before. > 3

[PATCH 06/10] iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3

2017-06-02 Thread Luca Coelho
From: Luca Coelho We only need to handle d0i3 entry and exit during suspend resume if system_pm is set to IWL_PLAT_PM_MODE_D0I3, otherwise d0i3 entry failures will cause suspend to fail. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=194791 Signed-off-by: Luca

[PATCH 08/10] iwlwifi: mvm: clear new beacon command template struct

2017-06-02 Thread Luca Coelho
From: Johannes Berg Clear the struct so that all reserved fields are zero when we send the struct down to the device. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho ---

[PATCH 03/10] iwlwifi: mvm: support ibss in dqa mode

2017-06-02 Thread Luca Coelho
From: Liad Kaufman Allow working IBSS also when working in DQA mode. This is done by setting it to treat the queues the same as a BSS AP treats the queues. Fixes: 7948b87308a4 ("iwlwifi: mvm: enable dynamic queue allocation mode") Signed-off-by: Liad Kaufman

[PATCH 02/10] iwlwifi: mvm: Fix command queue number on d0i3 flow

2017-06-02 Thread Luca Coelho
From: Haim Dreyfuss During d0i3 flow we flush all the queue except from the command queue. Currently, in this flow the command queue is hard coded to 9. In DQA the command queue number has changed from 9 to 0. Fix that. Fixes: 097129c9e625 ("iwlwifi: mvm: move cmd queue

[PATCH 05/10] iwlwifi: mvm: fix firmware debug restart recording

2017-06-02 Thread Luca Coelho
From: Emmanuel Grumbach When we want to stop the recording of the firmware debug and restart it later without reloading the firmware we don't need to resend the configuration that comes with host commands. Sending those commands confused the hardware and led to an

[PATCH 07/10] iwlwifi: mvm: don't fail when removing a key from an inexisting sta

2017-06-02 Thread Luca Coelho
From: Luca Coelho The iwl_mvm_remove_sta_key() function handles removing a key when the sta doesn't exist anymore. Mistakenly, this was changed to return an error while fixing another bug. If the mvm_sta doesn't exist, we continue normally, but just don't try to

[PATCH 01/10] iwlwifi: mvm: rs: start using LQ command color

2017-06-02 Thread Luca Coelho
From: Gregory Greenman Up until now, the driver was comparing the rate reported by the FW and the rate of the latest LQ command to avoid processing data belonging to the old LQ command. Recently, FW changed the meaning of the initial rate field in tx response and it

[PATCH 00/10] iwlwifi: some fixes intended for 4.12

2017-06-02 Thread Luca Coelho
From: Luca Coelho Hi, Here some patches that I intend to send in a pull-request for 4.12. Some of the issues solved are: * Some memory leaks; * IBSS support; * Some bugzilla bugs; * Some runtime PM fixes; * Rate-scaling issues; * Some locking problems; As usual, I'm

[PATCH][-next] mwifiex: make function mwifiex_ret_pkt_aggr_ctrl static

2017-06-02 Thread Colin King
From: Colin Ian King function mwifiex_ret_pkt_aggr_ctrl can be made static as it does not need to be in global scope. Cleans up sparse warning: "symbol 'mwifiex_ret_pkt_aggr_ctrl' was not declared. Should it be static?" Signed-off-by: Colin Ian King