[RFC] cfg80211: Allow self managed devices to update global regulatory

2019-09-05 Thread Sriram R
Currently, self managed drivers cannot update the global regulatory using a regulatory hint from driver if the wiphy regd is already set from other sources. Due to this, when a regulatory hint is provided to cfg80211 from self managed devices, the request gets ignored and global reg is always at de

[PATCH] iwl-mvm: Report tx/rx antennas.

2019-09-05 Thread greearb
From: Ben Greear This makes it easier for user-space to know how many antennas the radio has. Seems to work with the AX200 radio, at least. Signed-off-by: Ben Greear --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drive

Re: iw scan dump for /AX attributes?

2019-09-05 Thread John Crispin
On 05/09/2019 21:02, Johannes Berg wrote: On Thu, 2019-09-05 at 11:20 -0700, Ben Greear wrote: Is anyone working on getting iw to print out /AX (HE) related info? Good question, I wonder why we didn't do that. But no, we're not working on it as far as I know, and I haven't seen anything from

Re: iw scan dump for /AX attributes?

2019-09-05 Thread Johannes Berg
On Thu, 2019-09-05 at 11:20 -0700, Ben Greear wrote: > Is anyone working on getting iw to print out /AX (HE) related > info? Good question, I wonder why we didn't do that. But no, we're not working on it as far as I know, and I haven't seen anything from anyone else either. johannes

iw scan dump for /AX attributes?

2019-09-05 Thread Ben Greear
Hello, Is anyone working on getting iw to print out /AX (HE) related info? As far as I can tell, it does not do so currently, but maybe I am doing something wrong. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com

[PATCH] mt76: usb: add lockdep_assert_held in __mt76u_vendor_request

2019-09-05 Thread Lorenzo Bianconi
Introduce lockdep_assert_held macro in __mt76u_vendor_request routine and remove comments regarding usb_ctrl_mtx lock Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediate

pull request: mt76 2019-09-05

2019-09-05 Thread Felix Fietkau
Hi Kalle, here's my first pull request for 5.4 - Felix The following changes since commit 84b0b66352470e6491c06159735ac916dc69a2ef: zd1211rw: zd_usb: Use struct_size() helper (2019-09-03 16:45:35 +0300) are available in the Git repository at: https://github.com/nbd168/wireless tags/mt76-f

[PATCH v2 21/21] iwlwifi: dbg: remove iwl_fw_cancel_dumps function

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Use cancel_delayed_work_sync on the dump workers only in case of unloading the op mode. In any other case use iwl_fw_flush_dumps or iwl_fw_dbg_stop_sync (depends if the op mode mutex is held or not). This way, the driver will wait until debug data is collected in all case

[PATCH v2 17/21] iwlwifi: dbg_ini: remove apply point, switch to time point API

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Remove the "apply points" mechanism as preparation for the changed debug API where this is now a "time point" instead. Use a new API across the code at the trigger points ("time points"), but don't yet implement it since that requires some more preparation. Signed-off-by

[PATCH v2 19/21] iwlwifi: dbg_ini: fix dump structs doc

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Fix the documentation of struct iwl_fw_ini_monitor_dump and iwl_fw_ini_error_dump_range. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/fw/error-dump.h | 16 1 file changed, 8 insertions(+), 8 deletio

[PATCH v2 15/21] iwlwifi: mvm: don't log un-decrypted frames

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach Sometimes the firmware won't be able to decrypt frames because the keys were not installed yet or other scenarios. The firmware will soon stop dropping multicast frames when MAC_FILTER_ACCEPT_GRP is not set. The firmware will simply always pass multicast frame in. In orde

[PATCH v2 14/21] iwlwifi: mvm: add support for single antenna diversity

2019-09-05 Thread Luca Coelho
From: Haim Dreyfuss There are products which have a single chain with 2 antennas. In these products, we need to inform the FW that the device has the single antenna diversity(SAD) feature. In the future, we will read the active antenna from a BIOS configuration. Currently, we use a default config

[PATCH v2 20/21] iwlwifi: dbg_ini: remove periodic trigger

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Remove periodic trigger functionality. After moving to the new API we will add periodic trigger functionality that matches the new API. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 27 +---

[PATCH v2 13/21] iwlwifi: mvm: handle BAR_FRAME_RELEASE (0xc2) notification

2019-09-05 Thread Luca Coelho
From: Johannes Berg In prior hardware generations (e.g. 9000 series), we received the BAR frame with fake NSSN information to handle releasing frames from the reorder buffer for the default queue, the other queues were getting the FRAME_RELEASE notification in this case. With multi-TID block-ack

[PATCH v2 10/21] iwlwifi: add support for suspend-resume flow for new device generation

2019-09-05 Thread Luca Coelho
From: Haim Dreyfuss The new device generation has a slightly different suspend resume flow Currently, the way the driver instruct the device to move to D3 is by sending D3_CONFIG_CMD. Instead of using the host command the indication is by writing to the doorbell interrupt. The FW will respond wit

[PATCH v2 18/21] iwlwifi: fw api: add DRAM buffer allocation command

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Add support code to be able to use the DRAM buffer allocation command, which allows us to send information about a buffer to the firmware to use it with the DBGC hardware. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/

[PATCH v2 05/21] iwlwifi: pass the iwl_config_trans_params when needed

2019-09-05 Thread Luca Coelho
From: Luca Coelho Instead of accessing the iwl_config_trans_params from the cfg that is stored in the trans struct, pass this structure directly to functions that need it during trans_alloc. This will be useful to isolate the elements needed during allocation and pass them separately before the

[PATCH v2 09/21] iwlwifi: fix warning iwl-trans.h is included more than once

2019-09-05 Thread Luca Coelho
From: Hariprasad Kelam Remove duplicate inclusion of iwl-trans.h. This issue was found by includecheck. Signed-off-by: Hariprasad Kelam Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/int

[PATCH v2 08/21] iwlwifi: always access the trans configuration via trans

2019-09-05 Thread Luca Coelho
From: Luca Coelho Stop accessing the trans configuration via the iwl_cfg structure and always access it via the iwl_trans structure. This completes the requirements to disassociate the trans-specific configuration from the rest of the configuration. Signed-off-by: Luca Coelho --- .../net/wire

[PATCH v2 03/21] iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe

2019-09-05 Thread Luca Coelho
From: Luca Coelho There were a couple of special handling to find the correct cfg inside iwl_trans_pcie_alloc(). Move them to iwl_pci_probe() so they're together with the rest of the decisions. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 112 +---

[PATCH v2 00/21] iwlwifi: updates intended for v5.4 2019-09-03-2

2019-09-05 Thread Luca Coelho
From: Luca Coelho Hi, Here's the fourth set of patches intended for v5.4. It's the usual development, new features, cleanups and bugfixes. The changes are: * Support for single antenna diversity; * Support for new WoWLAN FW API; * Initial refactoring of the device selection code; * Debug infr

[PATCH v2 07/21] iwlwifi: pass the iwl_trans instead of cfg to some functions

2019-09-05 Thread Luca Coelho
From: Shaul Triebitz A few functions were receiving the iwl_cfg struct directly, but we will also need other parts of the trans, so pass the trans (which includes the cfg) to them. Signed-off-by: Ido Yariv Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- drivers/net/wireless/inte

[PATCH v2 12/21] iwlwifi: mvm: drop BA sessions on too many old-SN frames

2019-09-05 Thread Luca Coelho
From: Johannes Berg Certain APs (I think a certain Broadcom model) interact badly with our full state BA bitmap handling, and if triggered badly with many powersave transitions they keep sending frames from before the window, which our hardware then doesn't appear to ACK (to them) since it has mo

[PATCH v2 01/21] iwlwifi: separate elements from cfg that are needed by trans_alloc

2019-09-05 Thread Luca Coelho
From: Luca Coelho In order to be able to select the cfg depending on the HW revision or on the RF ID, we need to set up the trans before selecting the cfg. To do so, move the elements from cfg that are needed by iwl_trans_alloc() to a separate struct at the top of the cfg, so it can be used by ot

[PATCH v2 11/21] iwlwifi: add sta_id to WOWLAN_CONFIG_CMD

2019-09-05 Thread Luca Coelho
From: Haim Dreyfuss WoWlan feature within the FW uses the station id for various of reasons. Thus we need to add this information to the command. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/api/d3.h | 6 -- drivers/net/wireless/intel/i

[PATCH v2 06/21] iwlwifi: add a pointer to the trans_cfg directly in trans

2019-09-05 Thread Luca Coelho
From: Luca Coelho Add a pointer to the iwl_trans structure and point it to the trans part of the cfg. This is the first step in disassociating the trans configuration from the rest of the configuration. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 30 ++---

[PATCH v2 02/21] iwlwifi: pcie: use the cfg we passed to iwl_trans_pcie_alloc()

2019-09-05 Thread Luca Coelho
From: Luca Coelho Instead of using iwl_trans->cfg in iwl_trans_pcie_alloc(), use the local argument that we received. This will allow us to not to set the cfg during iwl_trans_alloc() so it can be decided later. Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c |

[PATCH v2 16/21] iwlwifi: add iwl_tlv_array_len()

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Allows to easily calculate array length at the end of a TLV. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/file.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/wireless/intel/i

[PATCH v2 04/21] iwlwifi: pcie: set iwl_trans->cfg later in the probe function

2019-09-05 Thread Luca Coelho
From: Luca Coelho Instead of setting the cfg to iwl_trans already during allocation, set it only later when we have had the time to decide which cfg to use. This is part of the effort to be able to decide the cfg based on HW revision and RF ID after iwl_trans_alloc() has been called. For now, si

Re: [PATCH 01/49] dt: bindings: net: add qcom,ath11k.txt

2019-09-05 Thread Kalle Valo
Rob Herring writes: > On Tue, Aug 20, 2019 at 06:47:27PM +0300, Kalle Valo wrote: > > Missing commit message and Sob (and on the other patches). My original plan was to commit all this in one commit and use the cover letter as my commit. But based on your comment I realised we should have three

[PATCH v2 15/18] iwlwifi: dbg: add debug periphery registers to 9000 device family

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Add debug HW periphery registers to 9000 device family. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/d

[PATCH v2 18/18] iwlwifi: dbg_ini: remove periphery phy and aux regions handling

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu periphery phy and aux regions should not be collected like periphery mac region. Remove their handling. The handling will be added in the future once the FW will support it. Signed-off-by: Shahar S Matityahu Fixes: 7a14c23dcdee ("iwlwifi: dbg: dump data according to the

[PATCH v2 05/18] iwlwifi: Set w-pointer upon resume according to SN

2019-09-05 Thread Luca Coelho
From: Alex Malamud During D3 state, FW may send packets. As a result, "write" queue pointer will be incremented by FW. Upon resume from D3, driver should adjust its shadows of "write" and "read" pointers to the value reported by FW. 1. Keep TID used during wowlan configuration. 2. Upon resume, s

[PATCH v2 06/18] iwlwifi: remove runtime_pm_mode

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach This is always set to IWL_PLAT_PM_MODE_DISABLED Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/iwl-trans.h| 33 +++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 28 .../net/wireless

[PATCH v2 02/18] iwlwifi: scan: add support for new scan request command version

2019-09-05 Thread Luca Coelho
From: Ayala Beker Scan API was changed to support 6Ghz channels as well. Support the new version. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/fw/api/scan.h | 55 ++-- drivers/net/wireless/intel/iwlwifi/fw/file.h | 1 + drivers/net/wirele

[PATCH v2 08/18] iwlwifi: pcie: remove the refs / unrefs from the transport

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach This code is now stale Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/iwl-trans.c| 14 - .../net/wireless/intel/iwlwifi/iwl-trans.h| 9 .../net/wireless/intel/iwlwifi/pcie/trans.c | 33 ..

[PATCH v2 03/18] iwlwifi: mvm: name magic numbers with enum

2019-09-05 Thread Luca Coelho
From: Mordechay Goodstein It's hard to follow the numbers so rename it with enum Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/fw/api/rs.h| 18 +- .../net/wireless/intel/iwlwifi/mvm/rs-fw.c| 19 +++ 2 f

[PATCH v2 09/18] iwlwifi: pcie: remove some more d0i3 code from the transport

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach CMD_SEND_IN_IDLE, CMD_MAKE_TRANS_IDLE and CMD_WAKE_UP_TRANS are not used. Remove them. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/iwl-trans.h| 14 +-- .../wireless/intel/iwlwifi/pcie/internal.h| 2 --

[PATCH v2 17/18] iwlwifi: dbg_ini: use linked list to store debug TLVs

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Use a linked list to maintain the debug TLVs instead of a single buffer. This way, the driver does not need to iterate over the binary file twice and allocates smaller chunks of memory. Also, in case one allocation fails the driver will work with the partial configuration

[PATCH v2 07/18] iwlwifi: remove the opmode's d0i3 handlers

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach Remove the now unneeded functions that called those from the transport layer. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/iwl-op-mode.h | 23 -- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 70 -

[PATCH v2 16/18] iwlwifi: dbg_ini: maintain buffer allocations from trans instead of TLVs buffer

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu Maintain DRAM debug buffer status in trans instead of keeping it as part of the TLVs buffer to avoid allocating extra space for it. Needed for future changes. Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- .../wireless/intel/iwlwifi/fw/api/dbg-tlv.h

[PATCH v2 04/18] iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL

2019-09-05 Thread Luca Coelho
From: Johannes Berg It doesn't make sense to use the FW thermal monitoring only if we have CONFIG_THERMAL, because then we use the default thresholds etc. which may be different from what the firmware implements, as we don't maintain them in the driver now. Only the CTDP code needs to actually be

[PATCH v2 11/18] iwlwifi: remove pm_runtime completely

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach This means: 1) stop calling pm_runtime_resume when starting the hardware 2) removing the unneeded low_power parameter to start / stop hw / fw transport ops 3) squashing transport functions that are now the same _iwl_trans_pcie_start_hw / iwl_trans_pcie_start_hw Sign

[PATCH v2 14/18] iwlwifi: remove unused regdb_ptrs allocation

2019-09-05 Thread Luca Coelho
From: Haim Dreyfuss regdb_ptrs is not in used anymore, remove it. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.

[PATCH v2 10/18] iwlwifi: remove the d0i3 related module parameters

2019-09-05 Thread Luca Coelho
From: Emmanuel Grumbach Those are now effectless. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 8 drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 9 ++--- 2 files changed, 2 insertions(+), 15 deletions(-

[PATCH v2 01/18] iwlwifi: LTR updates

2019-09-05 Thread Luca Coelho
From: Alex Malamud New FW versions introduces LTR feature enablement by default. For such FW versions, driver (mvm/xvt) should not send host command to enable LTR feature, also it should be possible to override LTR configuration through the debugfs. 1. Send LTR feature enablement command only fo

[PATCH v2 13/18] iwlwifi: dbg_ini: align dbg tlv functions names to a single format

2019-09-05 Thread Luca Coelho
From: Shahar S Matityahu align the naming to iwl_dbg_tlv_* Signed-off-by: Shahar S Matityahu Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 20 +-- .../net/wireless/intel/iwlwifi/iwl-dbg-tlv.h | 14 ++--- drivers/net/wireless/intel/iwlw

[PATCH v2 12/18] iwlwifi: scan: don't pass large argument by value

2019-09-05 Thread Luca Coelho
From: Ayala Beker Function iwl_mvm_scan_set_legacy_probe_req() second argument size is too large to be passed by value. Fix it to be passed by reference. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 15 --- 1 file change

[PATCH v2 00/18] iwlwifi: updates intended for v5.4 2019-08-21-2

2019-09-05 Thread Luca Coelho
From: Luca Coelho Hi, Here's the second set of patches intended for v5.4. It's the usual development, new features, cleanups and bugfixes. The changes are: * Removal of (broken) d0i3 continues; * Debug infrastructure work continues; * Fix for the SN value in certain suspend/resume situations;

Re: [PATCH 05/18] iwlwifi: Set w-pointer upon resume according to SN

2019-09-05 Thread Kalle Valo
Luca Coelho writes: > On Tue, 2019-09-03 at 14:26 +0300, Kalle Valo wrote: >> Luca Coelho writes: >> >> > From: Alex Malamud >> > >> > During D3 state, FW may send packets. >> > As a result, "write" queue pointer will be incremented by FW. >> > Upon resume from D3, driver should adjust its sh

Re: [PATCH 05/18] iwlwifi: Set w-pointer upon resume according to SN

2019-09-05 Thread Luca Coelho
On Tue, 2019-09-03 at 14:26 +0300, Kalle Valo wrote: > Luca Coelho writes: > > > From: Alex Malamud > > > > During D3 state, FW may send packets. > > As a result, "write" queue pointer will be incremented by FW. > > Upon resume from D3, driver should adjust its shadows of "write" and "read" > >

Re: [PATCH 31/49] ath11k: add mac.c

2019-09-05 Thread Johannes Berg
On Thu, 2019-09-05 at 15:29 +0300, Kalle Valo wrote: > > Yeah, I was supposed to write: > > "maybe we should change mac80211 to not require this op to be present" > > But of course I could have just misunderstood, let's see what Johannes > says :) :-) Yes, that's what I meant. johannes

Re: [PATCH 31/49] ath11k: add mac.c

2019-09-05 Thread Kalle Valo
Vasanthakumar Thiagarajan writes: > On 2019-09-05 16:54, Kalle Valo wrote: >> Vasanthakumar Thiagarajan writes: >> >>> On 2019-08-21 02:16, Johannes Berg wrote: On Tue, 2019-08-20 at 18:47 +0300, Kalle Valo wrote: > +static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32

Re: [PATCH 31/49] ath11k: add mac.c

2019-09-05 Thread Vasanthakumar Thiagarajan
On 2019-09-05 16:54, Kalle Valo wrote: Vasanthakumar Thiagarajan writes: On 2019-08-21 02:16, Johannes Berg wrote: On Tue, 2019-08-20 at 18:47 +0300, Kalle Valo wrote: +static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) +{ + struct ath11k *ar = hw->priv; + in

Re: [PATCH 08/49] ath11k: add core.c

2019-09-05 Thread Kalle Valo
Johannes Berg writes: >> +module_param_named(debug_mask, ath11k_debug_mask, uint, 0644); >> + >> +MODULE_PARM_DESC(debug_mask, "Debugging mask"); >> + >> +static const struct ath11k_hw_params ath11k_hw_params = { >> +.name = "ipq8074", > > indentation here seems a bit too much

Re: [PATCH 31/49] ath11k: add mac.c

2019-09-05 Thread Kalle Valo
Vasanthakumar Thiagarajan writes: > On 2019-08-21 02:16, Johannes Berg wrote: >> On Tue, 2019-08-20 at 18:47 +0300, Kalle Valo wrote: >> >>> +static int ath11k_mac_op_config(struct ieee80211_hw *hw, u32 changed) >>> +{ >>> + struct ath11k *ar = hw->priv; >>> + int ret = 0; >>> + >>> + /* ma