[PATCH v7 00/10] ath10k: sdio support

2017-04-13 Thread Kalle Valo
More changes to Erik's SDIO patches. The biggest change in this round is refactoring of the ugly ath10k_sdio_io() function. Only compile tested, I don't have any SDIO boards at the moment. Changes in v7: * fix mutex unlock bug found by kbuild bot * fix function rename mistake found by Ryan * r

[PATCH v7 01/10] ath10k: htc: made static function public

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Changed ath10k_htc_notify_tx_completion and ath10k_htc_process_trailer from static to non static. These functions are needed by SDIO/mbox. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/htc.c | 14 -- drivers/net

[PATCH v7 02/10] ath10k: htc: rx trailer lookahead support

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl The RX trailer parsing is now capable of parsing lookahead reports. A lookahead contains the first 4 bytes of the next HTC message (that will be read in the next SDIO read operation). Lookaheads are used by the SDIO/mbox HIF layer to determine if the next message is part of a

[PATCH v7 03/10] ath10k: htc: move htc ctrl ep connect to htc_init

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl This patch moves the HTC ctrl service connect from htc_wait_target to htc_init. This is done in order to make sure the htc ctrl service is setup properly before hif_start is called. The reason for this is that we want the HTC ctrl service callback to be initialized before t

[PATCH v7 04/10] ath10k: htc: refactorization

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Code refactorization: Moved the code for ep 0 in ath10k_htc_rx_completion_handler to ath10k_htc_control_rx_complete. This eases the implementation of SDIO/mbox significantly since the ep_rx_complete cb is invoked directly from the SDIO/mbox hif layer. Since the ath10k_htc_

[PATCH v7 05/10] ath10k: various sdio related definitions

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Debug masks for SDIO HIF layer. Address definitions for SDIO/mbox based chipsets. Augmented struct host_interest with more members. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.h |3 ++ drivers/net/wireless/ath/

[PATCH v7 06/10] ath10k: add sdio extra initializations

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Extra initializations needed by all sdio boards. Derived from qcacld. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/core.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/wireless/ath/ath1

[PATCH v7 07/10] ath10k: sdio get target info

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Special BMI get target info function for SDIO. Signed-off-by: Erik Stromdahl Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/bmi.c | 71 drivers/net/wireless/ath/ath10k/bmi.h |2 + drivers/net/wireless/ath/ath10k/core

[PATCH v7 08/10] ath10k: htc: ready_ext msg support

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Added support for extended ready message. The extended ready message contains the maximum bundle count supported by SDIO chipsets. It is transmitted by SDIO chipset only and replaces the "standard" ready message in this case. Signed-off-by: Erik Stromdahl Signed-off-by: Ka

[PATCH v7 10/10] ath10k: add initial SDIO support

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Chipsets like QCA6584 have support for SDIO so add initial SDIO bus support to ath10k. With this patch we have the low level HTC protocol working and it's possible to boot the firmware, but it's still not possible to connect or anything like. More changes are needed for full

[PATCH v7 09/10] ath10k: different fw file name for sdio

2017-04-13 Thread Kalle Valo
From: Erik Stromdahl Since both SDIO based chipsets will use different firmware from the PCIe and AHB chipsets, the fw file name must be different depending on bus type. The new firmware names are: For PCIe and AHB: firmware-.bin (same as before) For SDIO: firmware-sdio-.bin Signed-off-by: Er

[PATCH] mac80211_hwsim: use per-interface power level

2017-04-13 Thread Johannes Berg
From: Johannes Berg When channel contexts are used, there's no global power level (the power_level is always 0). Use the per-interface TX power in mac80211_hwsim to have a proper setting for both cases. This fixes the bgscan_simple and bgscan_learn test cases when the number of channels advertis

[PATCH V2 09/10] brcmfmac: add mutex to protect pno requests

2017-04-13 Thread Arend van Spriel
The request references kept in pno are accessed in user-space context and in firmware event handler context. As such we need to protect it with a lock. As both context allow sleep a mutex seems appropriate. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin S

[PATCH V2 02/10] nl80211: allow multiple active scheduled scan requests

2017-04-13 Thread Arend van Spriel
This patch implements the idea to have multiple scheduled scan requests running concurrently. It mainly illustrates how to deal with the incoming request from user-space in terms of backward compatibility. In order to use multiple scheduled scans user-space needs to provide a flag attribute NL80211

[PATCH V2 10/10] brcmfmac: add scheduled scan support for specified BSSIDs

2017-04-13 Thread Arend van Spriel
Add support to handle scheduled scan request containing BSSID in the matchsets. The firmware can send event upon finding BSSIDs and SSIDs. To get these in one event the bit REPORT_SEPERATELY needed to be removed from the flags in brcmf_pno_config(). Reviewed-by: Hante Meuleman Reviewed-by: Pieter

[PATCH V2 01/10] nl80211: add request id in scheduled scan event messages

2017-04-13 Thread Arend van Spriel
For multi-scheduled scan support in subsequent patch a request id will be added. This patch add this request id to the scheduled scan event messages. For now the request id will always be zero. With multi-scheduled scan its value will inform user-space to which scan the event relates. Reviewed-by:

[PATCH V2 03/10] nl80211: add support for BSSIDs in scheduled scan matchsets

2017-04-13 Thread Arend van Spriel
This patch allows for the scheduled scan request to specify matchsets for specific BSSIDs. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- include/net/cfg80211.h | 6 +- include/uapi/linux/nl80211.h | 2 ++

[PATCH V2 05/10] cfg80211: add request id to cfg80211_sched_scan_*() api

2017-04-13 Thread Arend van Spriel
Have proper request id filled in the SCHED_SCAN_RESULTS and SCHED_SCAN_STOPPED notifications toward user-space by having the driver provide it through the api. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- V2: - ad

[PATCH V2 07/10] brcmfmac: move scheduled scan wiphy param setting to pno module

2017-04-13 Thread Arend van Spriel
As pno module is providing scheduled scan functionality have it taking care of setting related wiphy parameters as well. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211

[PATCH V2 08/10] brcmfmac: add support multi-scheduled scan

2017-04-13 Thread Arend van Spriel
This change adds support for multi-scheduled scan in the driver. It currently relies on g-scan support in firmware and will set struct wiphy::max_sched_scan_reqs accordingly. This is limited to 16 concurrent requests. The firmware currently has a limit of 64 channels that can be configured for all

[PATCH V2 00/10] cfg80211: support multiple scheduled scans

2017-04-13 Thread Arend van Spriel
After the RFC rounds here is multi-scheduled scan submission. What has been added since the RFC is support for user-space to specify a BSSID in the matchset (PATCH 3/10). As example this could be used for roaming algorithm done in user-space. The patches for scheduled scan notification api have bee

[PATCH V2 04/10] cfg80211: add request id parameter to .sched_scan_stop() signature

2017-04-13 Thread Arend van Spriel
For multiple scheduled scan support the driver needs to know which scheduled scan request is being stopped. Pass the request id in the .sched_scan_stop() callback. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- driver

[PATCH V2 06/10] brcmfmac: add firmware feature detection for gscan feature

2017-04-13 Thread Arend van Spriel
From: Arend van Spriel Detect gscan support in firmware by doing pfn_gscan_cfg iovar with invalid version. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel --- .../wireless/broadcom/brcm80211/brcmfmac/feature.c | 22 +

pull-request: iwlwifi-next 2017-04-13

2017-04-13 Thread Luca Coelho
Hi Kalle, Here's my first pull-request intended for v4.12. This is generic development work, nothing really stands out. More details in the tag description. I have sent this out before, and kbuildbot reported success. Please let me know if there are any issues. Cheers, Luca. The following c

[PATCH] mac80211: fix MU-MIMO follow-MAC mode

2017-04-13 Thread Johannes Berg
From: Johannes Berg There are two bugs in the follow-MAC code: * it treats the radiotap header as the 802.11 header (therefore it can't possibly work) * it doesn't verify that the skb data it accesses is actually present in the header, which is mitigated by the first point Fix this by mo

[PATCH] mac80211: keep a separate list of monitor interfaces that are up

2017-04-13 Thread Johannes Berg
From: Johannes Berg In addition to keeping monitor interfaces on the regular list of interfaces, keep those that are up and not in cooked mode on a separate list. This saves having to iterate all interfaces when delivering to monitor interfaces. Signed-off-by: Johannes Berg --- net/mac80211/ie

Re: ath6kl: Add __printf verification to ath6kl_dbg

2017-04-13 Thread Kalle Valo
Joe Perches wrote: > Fix fallout too. > > Signed-off-by: Joe Perches > Reviewed-by: Steve deRosier Patch applied to ath-next branch of ath.git, thanks. 169345d40d0f ath6kl: add __printf verification to ath6kl_dbg -- https://patchwork.kernel.org/patch/9655275/ https://wireless.wiki.kernel.o

Re: ath10k: Fix compile time sanity check for CE4 buffer size

2017-04-13 Thread Kalle Valo
Mohammed Shafi Shajakhan wrote: > From: Mohammed Shafi Shajakhan > > In 'ath10k_ce_alloc_pipe' the compile time sanity check to > ensure that there is sufficient buffers in CE4 for HTT Tx > MSDU descriptors, but this did not take into account of the > case with 'peer flow control' enabled, fix t

Re: [01/11] wil6210: fix sequence for scan-abort during reset

2017-04-13 Thread Kalle Valo
Maya Erez wrote: > From: Hamad Kadmany > > Communication with FW must be done before wil->status > is initialized in order to properly handle cases where > communication with FW halts during reset sequence. > > Signed-off-by: Hamad Kadmany > Signed-off-by: Maya Erez 11 patches applied to ath

Re: [PATCH] mwifiex: MAC randomization should not be persistent

2017-04-13 Thread Kalle Valo
Brian Norris writes: > On Thu, Apr 06, 2017 at 07:02:15AM +0300, Kalle Valo wrote: >> Brian Norris writes: >> >> > nl80211 provides the NL80211_SCAN_FLAG_RANDOM_ADDR for every scan >> > request that should be randomized; the absence of such a flag means we >> > should not randomize. However, mw

Re: [PATCH] MAINTAINERS: drop akarwar from mwifiex

2017-04-13 Thread Kalle Valo
Brian Norris writes: > His email is bouncing, and I expect he's not doing this work any more. > > Cc: Amitkumar Karwar > Cc: Nishant Sarmukadam > Cc: Ganapathi Bhat > Cc: Xinming Hu > Signed-off-by: Brian Norris > --- > Or alternatively, we can update his email address. I just don't want to

Re: [PATCH 1/5] netlink: extended ACK reporting

2017-04-13 Thread Nicolas Dichtel
Le 10/04/2017 à 08:18, Johannes Berg a écrit : > >> perhaps I misunderstand something, but nla_parse suggests attribute >> type can not be 0: > [...] > > Yes, some - very few - families still insist on using attribute 0, > perhaps parsing by hand or so. Like you say though, the entire > infrastru

Re: [PATCH 1/5] netlink: extended ACK reporting

2017-04-13 Thread Johannes Berg
On Thu, 2017-04-13 at 15:27 +0200, Nicolas Dichtel wrote: > > > Yes, some - very few - families still insist on using attribute 0, > > perhaps parsing by hand or so. Like you say though, the entire > > infrastructure makes that hard and undesirable, so I don't really > > see > > why we need to inv

[PATCH v2] mac80211: keep a separate list of monitor interfaces that are up

2017-04-13 Thread Johannes Berg
From: Johannes Berg In addition to keeping monitor interfaces on the regular list of interfaces, keep those that are up and not in cooked mode on a separate list. This saves having to iterate all interfaces when delivering to monitor interfaces. Signed-off-by: Johannes Berg --- net/mac80211/ie

[PATCH] mac80211: rewrite monitor mode delivery logic

2017-04-13 Thread Johannes Berg
From: Johannes Berg The monitor mode delivery logic makes it hard to add any kind of filtering in an efficient way, because the monitor SKB is created first and then passed to all interfaces. Rewrite the logic to create the monitor SKB the first time it's actually needed, and then keep deliverin

[RFC v2 2/3] cfg80211: add API to attach monitor filter program

2017-04-13 Thread Johannes Berg
From: Johannes Berg Some people have suggested that the nl80211 API to look at management frames should be extended to allow multiple registrations, in order to allow applications other than the usual controllers (wpa_supplicant/hostapd) to look out for frames, e.g. for statistics or similar. Sug

[RFC v2 3/3] mac80211: support bpf monitor filter

2017-04-13 Thread Johannes Berg
From: Johannes Berg Add the necessary hooks for running monitor filter programs in mac80211's RX path, before a frame is handed off to a monitor interface. If the frame isn't accepted then this will save the overhead of creating a new SKB and building the radiotap header. Signed-off-by: Johannes

[RFC v2 1/3] bpf/wireless: add wifimon program type

2017-04-13 Thread Johannes Berg
From: Johannes Berg Add a new program type for wifi monitor interfaces. This program type can * access __sk_buff, but only skb->len * call bpf_skb_load_bytes() The program type is only enabled when something selects the new Kconfig symbol WANT_BPF_WIFIMON, which will be done by mac80211 in a f

Re: [RFC v2 3/3] mac80211: support bpf monitor filter

2017-04-13 Thread Johannes Berg
If anyone wants to play with this ... The necessary code is in the "bpf" branch of my mac80211-next and iw trees. The setup of the filter is a bit stupid right now - the test program in mac80211-next/bpf (samples/bpf/wifimon) will call iw for the nl80211 part ... I should make an ELF parser in iw,

Re: [PATCH v4 4/4] mwifiex: pcie: extract wifi part from combo firmware during function level reset

2017-04-13 Thread Kalle Valo
Xinming Hu writes: > From: Xinming Hu > > A seprate wifi-only firmware was download during pcie function level reset. > It is in fact the tail part of wifi/bt combo firmware. Per Brian's and > Dmitry's suggestion, this patch extract the wifi part from combo firmware. > > After that, we can disca

Re: [PATCH 1/5] netlink: extended ACK reporting

2017-04-13 Thread Nicolas Dichtel
Le 13/04/2017 à 15:29, Johannes Berg a écrit : > On Thu, 2017-04-13 at 15:27 +0200, Nicolas Dichtel wrote: >> >>> Yes, some - very few - families still insist on using attribute 0, >>> perhaps parsing by hand or so. Like you say though, the entire >>> infrastructure makes that hard and undesirable,

Re: mwifiex: Fix invalid port issue

2017-04-13 Thread Kalle Valo
Ganapathi Bhat wrote: > We have to use start port, for TX/RX of single packet, > instead of current aggregating port. This will fix SDIO > CMD53(TX/RX) returning -ETIMEDOUT and halting the data path. > > Fixes: 0cb52aac4d19 ("mwifiex: do not set multiport flag for tx/rx single > packet") > Signe

Re: brcmfmac: properly align buffers on certain platforms with 64 bit DMA

2017-04-13 Thread Kalle Valo
Heiner Kallweit wrote: > Systems with 64 bit DMA at least partially require buffers to be used > for DMA to be 8-byte-aligned. One example is Amlogic Meson GX. > Switching the MMC/SDIO driver for this platform to SG DMA mode > resulted in problems due to unaligned buffers. > > Fortunately the brc

Re: [1/6] brcmfmac: rename brcmf_fws_{de, }init to brcmf_fws{at, de}tach

2017-04-13 Thread Kalle Valo
Arend Van Spriel wrote: > This is a non-functional change to align the fwsignal module to > the naming pattern used throughout the driver. > > Reviewed-by: Hante Meuleman > Reviewed-by: Pieter-Paul Giesberts > Reviewed-by: Franky Lin > Signed-off-by: Arend van Spriel 6 patches applied to wir

Re: [01/13] rtlwifi: btcoex: 23b 2ant: check PS state before setting tdma duration

2017-04-13 Thread Kalle Valo
Larry Finger wrote: > From: Yan-Hsuan Chuang > > For time division multiple access, the wifi and bt take turns to > transmit, but we need to let AP know that wifi is under standby mode by > sending null data to "pretend" entering power saving state using lps > rpwm. > > But, the fw does not kno

Re: [01/11] rtlwifi: btcoex: 23b 2ant: set coex table when wifi is idle

2017-04-13 Thread Kalle Valo
Larry Finger wrote: > From: Yan-Hsuan Chuang > > When wifi is idle, the bt should have more resource to transmit. > > Signed-off-by: Yan-Hsuan Chuang > Signed-off-by: Larry Finger > Cc: Pkshih > Cc: Birming Chiu > Cc: Shaofu > Cc: Steven Ting 11 patches applied to wireless-drivers-next.g

Re: [01/14] rtlwifi: btcoex: 21a 1ant: fw settings for softap mode

2017-04-13 Thread Kalle Valo
Larry Finger wrote: > From: Yan-Hsuan Chuang > > For ap mode, adjust fw settings to operate properly. > > Signed-off-by: Yan-Hsuan Chuang > Signed-off-by: Larry Finger > Cc: Pkshih > Cc: Birming Chiu > Cc: Shaofu > Cc: Steven Ting 14 patches applied to wireless-drivers-next.git, thanks.

Re: [v3] rt2x00: reverse external PA capability flag logic

2017-04-13 Thread Kalle Valo
Daniel Golle wrote: > Consequently refer to external PA instead of inverting the logic and > use an internal PA capability flag which is a bit confusing. > Currently this is used for Rt3352 only, but MT7620A also allows for an > external PA which will be supported by a follow up patch. > > Signed

[PATCH 01/26] iwlwifi: mvm: read new secure boot registers

2017-04-13 Thread Luca Coelho
From: Sara Sharon Addresses were changed for a000 devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 13 ++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff

[PATCH 05/26] iwlwifi: mvm: use same scan API for all a000 devices

2017-04-13 Thread Luca Coelho
From: Sara Sharon API will be the same regardless of FW compilation. CDB related values will be filled in only for CDB. Cahneg code and names accordingly. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/mvm/fw-api-scan.h | 14 ++-- drivers/net/wirele

[PATCH 07/26] iwlwifi: mvm: refactor SAR init to prepare for dynamic SAR

2017-04-13 Thread Luca Coelho
From: Haim Dreyfuss We are adding support for dynamic TX power tables for SAR (specific absorption rate) compliance. Currently, we only support a single (static) TX power table, which is read from ACPI, and use it statically. To prepare for more tables that can be switched dynamically, refactor

[PATCH 08/26] iwlwifi: mvm: spin off SAR profile selection function

2017-04-13 Thread Luca Coelho
From: Luca Coelho For dynamic SAR, we will need to select the current profile from different places. In preparation for that, spin the profile selection code out of iwl_mvm_sar_init(). Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 68 +++-

[PATCH 06/26] iwlwifi: mvm: disable multi-queue for a000 devices

2017-04-13 Thread Luca Coelho
From: Sara Sharon Firmware isn't configuring multi RX queue hardware yet in the self init mode. Disable it for now until we have an API that enables it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++- 1 file changed, 2 insertions(

[PATCH 04/26] iwlwifi: mvm: prepare for station count change

2017-04-13 Thread Luca Coelho
From: Sara Sharon In a000 devices we will support up to 32 stations. The max station define is used also for invalid station marking which makes finding usages of actual maximum station pretty hard to sort through - change it to be a different define in order to make future changes easier. Use al

[PATCH 00/26] iwlwifi: updates intended for v4.12 2017-04-13

2017-04-13 Thread Luca Coelho
From: Luca Coelho Hi, This is the second patch set intended for v4.12. These are the changes: * A large amount of work on the A000 device series; * A couple of cleanup patches; * Dynamic SAR support; As usual, I'm pushing this to a pending branch, for kbuild bot, and will send a pull-reque

[PATCH 02/26] iwlwifi: mvm: add queues after adding station

2017-04-13 Thread Luca Coelho
From: Sara Sharon Currently aux & broadcast queues are added before calling add station, which results with a SCD_QUEUE_CFG command sent with a station id unknown yet to fw. While this works for pre-a000 firmware, the a000 fw requires the order to be reversed. The reason the change is only for a0

[PATCH 09/26] iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table

2017-04-13 Thread Luca Coelho
From: Luca Coelho Dynamic SAR allows changing TX power limits at runtime to comply with SAR regulations on multiple form factors (e.g. tablet vs. clamshell mode). To support this, a new table was added to ACPI, which is called Extended Wireless Regulatory Descriptor (EWRD). This table allows OE

[PATCH 03/26] iwlwifi: cleanup unused function

2017-04-13 Thread Luca Coelho
From: Sara Sharon iwl_has_secure_boot() isn't getting called anywhere. Clean it up. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-c

[PATCH 13/26] iwlwifi: mvm: support moving to mgmt tid

2017-04-13 Thread Luca Coelho
From: Sara Sharon For a000 FW moved to 15 as management TID. The change for us is fairly local - translate old TID to 15 when enabling and disabling a queue, and make sure to cover it also on TX responses. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iw

[PATCH 11/26] iwlwifi: pcie: introduce a000 TX queues management

2017-04-13 Thread Luca Coelho
From: Sara Sharon In a000 devices the TX handling is different in a few ways: * Queues are allocated dynamically * DQA is enabled by default * Driver shouldn't access TFH registers - ucode configures it all in SCD_QUEUE_CFG command Support all this in a new API with op mode, where op mode send

[PATCH 15/26] iwlwifi: mvm: remove unnecessary debugging from UMAC scan

2017-04-13 Thread Luca Coelho
From: Luca Coelho There are several occasions where a scan of the same type is requested concurrently, so logging every time this happens is just noisy and unnecessary. Remove the logging for these cases. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 +

[PATCH 25/26] iwlwifi: pcie: introduce new stop_device

2017-04-13 Thread Luca Coelho
From: Sara Sharon This function is basically the same as gen1, except for clean ups of old devices configuration that are never used in a000 configuration. It will also help with refactoring rf_kill later on. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel

[PATCH 10/26] iwlwifi: mvm: support new TX API

2017-04-13 Thread Luca Coelho
From: Sara Sharon Support the new TX command API for a000 devices. Command is a very slim version of current TX command. Generalize iwl_mvm_tx_mpdu to get rid of TX command dependencies. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/fw-api-tx

[PATCH 26/26] iwlwifi: pcie: alloc queues dynamically

2017-04-13 Thread Luca Coelho
From: Sara Sharon Change queue allocation to be dynamic. On transport init only the command queue is being allocated. Other queues are allocated on demand. This is due to the huge amount of queues we will soon enable (512) and as a preparation for TX Virtual Queue Manager feature (TVQM), where fi

[PATCH 12/26] iwlwifi: mvm: support a000 SCD queue configuration

2017-04-13 Thread Luca Coelho
From: Sara Sharon a000 devices queue management is going to change significantly. We will have 512 queues. Those queues will be assigned number by the firmware and not by the driver. In addition, due to SN offload having TX queue shared between TIDs is impossible Also, the ADD_STA command no lo

[PATCH 23/26] iwlwifi: pcie: remove block and freeze operations from new transport

2017-04-13 Thread Luca Coelho
From: Sara Sharon New transport will be used only by op modes that supports buffer station offload - hence those will never be called. Clean it up. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 --- drivers/net/wireless/intel/

[PATCH 19/26] iwlwifi: pcie: support new TX command

2017-04-13 Thread Luca Coelho
From: Sara Sharon Move to use the correct structure. Remove code referring to old command. Update DMA locations. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 10 +---

[PATCH 22/26] iwlwifi: pcie: support new write pointer width

2017-04-13 Thread Luca Coelho
From: Sara Sharon In a000 devices we have 16 bytes for the TFD index and 16 for the queue, in order to support 512 queues. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[PATCH 18/26] iwlwifi: pcie: cleanup old transport code from gen2

2017-04-13 Thread Luca Coelho
From: Sara Sharon Cleanup code that is irrelevant for a000 devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 4 - drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 195 +++-- drivers/net/wireless/intel/

[PATCH 21/26] iwlwifi: pcie: support host commands in new transport

2017-04-13 Thread Luca Coelho
From: Sara Sharon Code is basically the same, with a cleanups of old narrow host command, ampg workarounds, some cosmetic stuff, and usage of TFH functions when accessing TFD queues. This enables also the cleanup of iwl_pcie_tfd_set_tb() since now it won't be called anywhere in the a000 data path

[PATCH 14/26] iwlwifi: pcie: copy TX functions to new transport

2017-04-13 Thread Luca Coelho
From: Sara Sharon This is just a copy-paste in order to make changes tracking easier. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 13 + drivers/net/wireless/intel/iwlwifi/pcie/trans.c| 2 +- drivers/net/wireless/intel/i

[PATCH 20/26] iwlwifi: pcie: rewrite TFD creation

2017-04-13 Thread Luca Coelho
From: Sara Sharon Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 215 +- 1 file changed, 82 insertions(+), 133 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c b/drivers/net/wireless

[PATCH 24/26] iwlwifi: pcie: prepare for dynamic queue allocation

2017-04-13 Thread Luca Coelho
From: Sara Sharon In a000 transport we will allocate queues dynamically. Right now queue are allocated as one big chunk of memory and accessed as such. The dynamic allocation of the queues will require accessing the queues as pointers. In order to keep simplicity of pre-a000 tx queues handling, k

[PATCH 16/26] iwlwifi: mvm: tell the firmware about the U-APSD parameters

2017-04-13 Thread Luca Coelho
From: Emmanuel Grumbach Newer firmware versions will be able to handle all the WMM-PS flows internally when we act as a GO. The firwmare relies on the fact that the drivers puts frames for different peers in different queues (DQA) to achieve this. The driver will not be aware of the power state o

[PATCH 17/26] iwlwifi: mvm: move new API code to the end

2017-04-13 Thread Luca Coelho
From: "Goodstein, Mordechay" By moving all the code that depends on the new API we avoid unnecessary indentation in the code. Signed-off-by: Mordechai Goodstein Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 69 +++-- 1 file changed, 36 in

[PATCH v2] cfg80211: Fix array-bounds warning in fragment copy

2017-04-13 Thread Matthias Kaehlcke
__ieee80211_amsdu_copy_frag intentionally initializes a pointer to array[-1] to increment it later to valid values. clang rightfully generates an array-bounds warning on the initialization statement. Initialize the pointer to array[0] and change the algorithm from increment before to increment aft

Re: Re: [PATCH v3 4/4] mwifiex: pcie: extract wifi part from combo firmware during function level reset

2017-04-13 Thread Brian Norris
Hi, On Thu, Apr 13, 2017 at 06:47:59AM +, Xinming Hu wrote: > > -Original Message- > > From: Brian Norris [mailto:briannor...@chromium.org] > > Sent: 2017年4月11日 9:37 > > To: Xinming Hu > > Cc: Linux Wireless; Kalle Valo; Dmitry Torokhov; raja...@google.com; > > Amitkumar Karwar; Cathy

[PATCH 00/19] rtlwifi: btcoex: First set of changes for rtl8821ae 2ant

2017-04-13 Thread Larry Finger
These patches are the first set of patches for file btcoexist/halbtc8821a2ant.c. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Yan-Hsuan Chuang (19): rtlwifi: btcoex: 21a 2ant: limit rx aggregation size to avoid bt i

[PATCH 01/19] rtlwifi: btcoex: 21a 2ant: limit rx aggregation size to avoid bt interrupt

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Larger packets have higher opportunity to be interrupt by bt signal. In order to shorten the transmission time, control the packet aggregation size. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting ---

[PATCH 05/19] rtlwifi: btcoex: 21a 2ant: finer adjustment of bt power

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Originally we only increase/decrease bt power in a fixed power gap, this patch makes us be able to modify bt power for multiple power gaps and we can precisely adjust the bt power. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu

[PATCH 02/19] rtlwifi: btcoex: 21a 2ant: monitor if bt is slave or not

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang We monitor the packet counter to guess if the bt is slave or not, and when bt is slave, it may receive packet at any time, so we will have to take care about it Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Stev

[PATCH 03/19] rtlwifi: btcoex: 21a 2ant: monitor wifi counter to check network status

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang If there are a lot of low-rate packets, then the connection of wifi is unstable. If so, we should switch resource to bt to have a higher transmission quality, or wifi resource will be wasted Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birm

[PATCH 07/19] rtlwifi: btcoex: 21a 2ant: suffer less tx penalty from retry

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Change h2c parameter to decrease tx penalty. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 6 +++--- 1 file changed, 3 inserti

[PATCH 17/19] rtlwifi: btcoex: 21a 2ant: action for wifi is idle/linking/common

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Depending on the state of wifi, we need to set different tdma and coex table parameters to make wfi and bt coexist smoothly. Otherwise the bt may have low sound quality or mouse lag, which mean bad user experience. The same problem may occur on wifi also, if could disconnec

[PATCH 15/19] rtlwifi: btcoex: 21a 2ant: slot time fine tune

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Tune the wifi/bt slot time to get better performance. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c| 52 +++--- 1 file change

[PATCH 10/19] rtlwifi: btcoex: 21a 2ant: centralized control of coex table

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Gather multiple coex table settings into a function coex_table_with_type() and control the coex table according the type value as put in switch-case expression. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Stev

[PATCH 14/19] rtlwifi: btcoex: 21a 2ant: let PTA circuit control the switch

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Register 0xcb4 determines if the PTA circuit can control the swtich Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 1 - 1 file

[PATCH 16/19] rtlwifi: btcoex: 21a 2ant: tdma cases for low wifi/bt rssi

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang If the wifi or bt has low rssi, they need extra parameter settings for the tdma. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c| 91 ++

[PATCH 13/19] rtlwifi: btcoex: 21a 2ant: set coex table and tdma when bt inquiry

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Instead of just setting the coex table directly, we check if the wifi is under some important activity (scanning|roaming|linking) and mark the packets as high priority in that case. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu

[PATCH 19/19] rtlwifi: btcoex: 21a 2ant: refine tdma duration adjust function

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang 1. Add more cases to adjust the wifi duration and add a case with the max interval of 3 for some future uses. 2. rename tdma_adj -> ps_tdma_du_adj to indicate that this member is for power saving tdma duration adjustment Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Lar

[PATCH 11/19] rtlwifi: btcoex: 21a 2ant: check if wifi status changed

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Monitor wifi status and check if it is changed. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c| 41 ++ .../realtek/rtlwifi

[PATCH 09/19] rtlwifi: btcoex: 21a 2ant: do not check wifi bandwidth

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Remove workaround for HT40 issues for RF low pass filter. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 10 -- 1 file ch

[PATCH 06/19] rtlwifi: btcoex: 21a 2ant: move from bt_stack_info to bt_link_info

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang Gather variables to the 8821a2ant coex structure. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- .../realtek/rtlwifi/btcoexist/halbtc8821a2ant.c| 112 ++--- 1 file changed, 5

[PATCH 12/19] rtlwifi: btcoex: 21a 2ant: ignore wifi if it is at 5G band

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang When wifi is at 5G band, it does not intefere with 2.4G bt signal, hence we can just ignore it and transmit normally as nothing happened. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/n

[PATCH 18/19] rtlwifi: btcoex: 21a 2ant: fix invalid argument passed

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang The dac swing level should be an unsigned 32-bit value rather than boolean. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c | 2 +-

[PATCH 04/19] rtlwifi: btcoex: 21a 2ant: update bt profiling information

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang This function updates the information of bt profiling to help us decide the network status and dispatch the resource properly. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Larry Finger Cc: Pkshih Cc: Birming Chiu Cc: Shaofu --- .../realtek/rtlwifi/btcoexist/halbtc8

[PATCH 08/19] rtlwifi: btcoex: 21a 2ant: check power save state before pstdma

2017-04-13 Thread Larry Finger
From: Yan-Hsuan Chuang The power_save_state function checks the state of power saving. For tdma settings, the wifi sends nullfunc to pretend enter power saving and then bt can transmit. Hence the coex needs to check the power status before set the pstdma function. Signed-off-by: Yan-Hsuan Chuang

How to debug DMAR errors?

2017-04-13 Thread Ben Greear
Hello, I have been seeing a regular occurrence of DMAR errors, looking something like this when testing my ath10k driver/firmware under some specific loads (maximum receive of 512 byte frames in AP mode): DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Read] Request device [05:00.0] fault add

Re: [Make-wifi-fast] [PATCH v3] mac80211: Dynamically set CoDel parameters per station

2017-04-13 Thread Dave Taht
On Thu, Apr 6, 2017 at 8:58 AM, Toke Høiland-Jørgensen wrote: > Eric Dumazet writes: > >> On Thu, 2017-04-06 at 11:38 +0200, Toke Høiland-Jørgensen wrote: >> >>> + >>> +if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) { >>> +sta->cparams.target = MS2TIME(50); >>> +

Re: [PATCH v4 4/4] mwifiex: pcie: extract wifi part from combo firmware during function level reset

2017-04-13 Thread Brian Norris
Hi Xinming, On Thu, Apr 13, 2017 at 06:48:22AM +, Xinming Hu wrote: > From: Xinming Hu > > A seprate wifi-only firmware was download during pcie function level reset. > It is in fact the tail part of wifi/bt combo firmware. Per Brian's and > Dmitry's suggestion, this patch extract the wifi p

  1   2   >