Re: [PATCH 28/28] mac80211: Don't wake up from PS for offchannel TX

2018-08-31 Thread Luca Coelho
On Fri, 2018-08-31 at 11:21 -0700, Peter Oh wrote: > > On 08/31/2018 01:31 AM, Luca Coelho wrote: > > ) > > > > From: Andrei Otcheretianski > > > > Otherwise the offchannel frame might be queued due to > > IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in > > ieee80211_tx_frags()). Anyway,

Re: [PATCH 28/28] mac80211: Don't wake up from PS for offchannel TX

2018-08-31 Thread Peter Oh
On 08/31/2018 01:31 AM, Luca Coelho wrote: ) From: Andrei Otcheretianski Otherwise the offchannel frame might be queued due to IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in ieee80211_tx_frags()). Anyway, it doesn't make much sense to wake up the device during ROC. Signed-off-by: An

Re: [PATCH] b43: Fix regression in kernel 4.18

2018-08-31 Thread Larry Finger
On 08/31/2018 10:38 AM, Kalle Valo wrote: Larry Finger wrote: In commit 66cffd6daab7 ("b43: fix transmit failure when VT is switched"), a condition is noted where the network controller needs to be reset. Note that this situation happens when running the open-source firmware (http://netweb.ing

Re: [PATCH] mt76: verify evt type in usb mcu response

2018-08-31 Thread Kalle Valo
Lorenzo Bianconi wrote: > Verify if evt field is set to EVT_CMD_DONE in usb mcu > response messages. This is a preliminary patch for usb_mcu layer > unification between mt76x0u and mt76x2u driver. > > Signed-off-by: Lorenzo Bianconi Patch applied to wireless-drivers-next.git, thanks. ac5d5b3f

Re: [PATCH] mt76x2u: run device cleanup routine if resume fails

2018-08-31 Thread Kalle Valo
Lorenzo Bianconi wrote: > Cleanup {tx,rx} and mcu queues if resume operation fails > > Fixes: ee676cd5017c ("mt76: add driver code for MT76x2u based devices") > Signed-off-by: Lorenzo Bianconi Patch applied to wireless-drivers-next.git, thanks. 9b2fd48d36e2 mt76x2u: run device cleanup routine

Re: [PATCH 1/2] rsi: fix memory alignment issue in ARM32 platforms

2018-08-31 Thread Kalle Valo
Siva Rebbagondla wrote: > From: Siva Rebbagondla > > During testing in ARM32 platforms, observed below kernel panic, as driver > accessing data beyond the allocated memory while submitting URB to USB. > > Fix: Resolved this by specifying correct length by considering 64 bit > alignment. so tha

Re: [PATCH] rt2x00: use simple_read_from_buffer()

2018-08-31 Thread Kalle Valo
Dan Carpenter wrote: > The problem with this copy_to_user() calls is that they don't ensure > that "size" is less than the "length" which the user provided. > > Obviously, this is debugfs and "size" is normally going to be very small > so it probably doesn't matter, but this is the correct thing

Re: [PATCH 1/2] mwifiex: do no submit URB in suspended state

2018-08-31 Thread Kalle Valo
Ganapathi Bhat wrote: > There is a possible race between USB suspend and main thread: > > 1. After processing the command response, main thread will submit > rx_cmd URB back so as to process next command response, by > calling mwifiex_usb_submit_rx_urb. > > 2. During USB suspend, the suspend ha

Re: [PATCH] rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument

2018-08-31 Thread Kalle Valo
Larry Finger wrote: > In gcc8, when the 3rd argument (size) of a call to strncpy() matches the > length of the first argument, the compiler warns of the possibility of an > unterminated string. Using strlcpy() forces a null at the end. > > Signed-off-by: Larry Finger Patch applied to wireless-

Re: [PATCH 1/2] brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT support

2018-08-31 Thread Kalle Valo
Chi-Hsien Lin wrote: > From: Chung-Hsien Hsu > > Add WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK in > brcmf_set_key_mgmt() for FT support. > > Signed-off-by: Chung-Hsien Hsu > Signed-off-by: Chi-Hsien Lin 2 patches applied to wireless-drivers-next.git, thanks. 4ad298da9392 brcmfmac:

Re: [PATCH v3] brcmfmac: add CYW89342 mini-PCIe device

2018-08-31 Thread Kalle Valo
Chi-Hsien Lin wrote: > From: Jia-Shyr Chuang > > CYW89342 is a 2x2 MIMO, 802.11a/b/g/n/ac for WLAN. It is a member of > 4355/4359 family. > > Signed-off-by: Jia-Shyr Chuang > Signed-off-by: Chi-Hsien Lin Patch applied to wireless-drivers-next.git, thanks. 2fef681a4cf7 brcmfmac: add CYW8934

Re: [PATCH] libertas_tf: prevent underflow in process_cmdrequest()

2018-08-31 Thread Kalle Valo
Dan Carpenter wrote: > If recvlength is less than MESSAGE_HEADER_LEN (4) we would end up > corrupting memory. > > Fixes: c305a19a0d0a ("libertas_tf: usb specific functions") > Signed-off-by: Dan Carpenter Patch applied to wireless-drivers-next.git, thanks. 3348ef6a6a12 libertas_tf: prevent un

[PATCH] firmware: Fix security issue with request_firmware_into_buf()

2018-08-31 Thread Luis R. Rodriguez
From: Rishabh Bhatnagar When calling request_firmware_into_buf() with the FW_OPT_NOCACHE flag it is expected that firmware is loaded into buffer from memory. But inside alloc_lookup_fw_priv every new firmware that is loaded is added to the firmware cache (fwc) list head. So if any driver requests

Re: [PATCH] mt76x2u: Add support for Alfa AWUS036ACM

2018-08-31 Thread Kalle Valo
Rosen Penev wrote: > A 2x2 unit with a USB dock for optimal placement. > > Signed-off-by: Rosen Penev > Acked-by: Lorenzo Bianconi Patch applied to wireless-drivers-next.git, thanks. 62a25dc56990 mt76x2u: Add support for Alfa AWUS036ACM -- https://patchwork.kernel.org/patch/10563587/ http

Re: [PATCH] b43: Fix regression in kernel 4.18

2018-08-31 Thread Kalle Valo
Larry Finger wrote: > In commit 66cffd6daab7 ("b43: fix transmit failure when VT is switched"), > a condition is noted where the network controller needs to be reset. Note > that this situation happens when running the open-source firmware > (http://netweb.ing.unibs.it/~openfwwf/), plus a number

Re: Build iw for 32bit ARM

2018-08-31 Thread Steve deRosier
Hi Jakov, On Fri, Aug 31, 2018 at 5:59 AM Jakov Simunic wrote: > > Hello, > I am working on an embedded project which uses an armv7l architecture, which > is a 32bit platform, and I am trying to compile iw-4.9 for it, and I don't > know how to compile it for 32bit arches. Unless you're buildin

Re: [PATCH] mt76x2: fix always true condition warning reported by static checker

2018-08-31 Thread Kalle Valo
Lorenzo Bianconi wrote: > Fix following warning reported by static checker: > > drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c:35 mt76x2_tx() > warn: always true condition '(wcid->hw_key_idx != -1) => (0-255 != (-1))' > > Fixes: 23405236460b ("mt76: fix transmission of encrypted mgmt fra

Re: pull-request: iwlwifi-next 2018-08-31

2018-08-31 Thread Kalle Valo
Luca Coelho writes: > Hi Kalle, > > This is first batch of patches intended for v4.20. This includes the > last 3 patchsets I sent. Usual development work, with focus on HE and > bugfixes, and some other small fixes and improvements. More details > about the contents in the tag description. >

Re: [PATCH 21/28] wireless: align to draft 11ax D3.0

2018-08-31 Thread Luca Coelho
On Fri, 2018-08-31 at 14:21 +0300, Kalle Valo wrote: > Kalle Valo writes: > > > Luca Coelho writes: > > > > > ) > > > > > > From: Shaul Triebitz > > > > That ')' in the first line doesn't look correct and don't know how > > patchwork or git will handle it. > > Actually all patches from 20 t

Re: [PATCH v3 1/2] mac80211: invoke sw_scan if hw_scan returns EPERM

2018-08-31 Thread Siva Rebbagondla
On Wed, Aug 29, 2018 at 12:54 PM Johannes Berg wrote: > > Huh, why did you send this like 10 times? Also, HTML is dropped by the > list ... > Hi Johannes, There was an issue with our mailing server and we received Mail Delivery Failure notification. Hence, we tried multiple times by doing the chan

[PATCH v8 0/2] Fix PTK rekey freezes and clear text leak

2018-08-31 Thread Alexander Wetzel
This patch series addresses a long standing issue how mac80211 handles PTK rekeys. The current implementation can only work with SW crypto or by chance, e.g. if there are no frames transmitted while the STAs are rekeying or you hit just the right combination of cards/drivers. Any ongoing transmiss

Re: [PATCH] Bluetooth: btrsi: fix bt tx timeout issue

2018-08-31 Thread Siva Rebbagondla
On Wed, Aug 29, 2018 at 2:24 PM Siva Rebbagondla wrote: > > From: Sanjay Kumar Konduri > > observed sometimes data is coming with unaligned address from kernel > BT stack. If unaligned address is passed, some data in payload is > stripped when packet is loading to firmware and this results, BT >

[PATCH v8 2/2] mac80211: Fix PTK rekey freezes and clear text leak

2018-08-31 Thread Alexander Wetzel
Rekeying PTK keys without "Extended Key ID for Individually Addressed Frames" did use a procedure not suitable to replace in-use keys and could caused the following issues: 1) Freeze caused by incoming frames: If the local STA installed the key prior to the remote STA we still had the old

[PATCH v8 1/2] nl80211: Add CAN_REPLACE_PTK0 API

2018-08-31 Thread Alexander Wetzel
Drivers able to correctly replace a in-use key should set @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 to allow the user space (e.g. hostapd or wpa_supplicant) to rekey PTK keys. The user space must detect a PTK rekey attempt and only go ahead with it when the driver has set this flag. If the driver is n

Build iw for 32bit ARM

2018-08-31 Thread Jakov Simunic
Hello, I am working on an embedded project which uses an armv7l architecture, which is a 32bit platform, and I am trying to compile iw-4.9 for it, and I don't know how to compile it for 32bit arches. Tried adding -m32 to the CFLAGS, everything passes the build except the iw binary, which says:

Re: [PATCH 21/28] wireless: align to draft 11ax D3.0

2018-08-31 Thread Kalle Valo
Kalle Valo writes: > Luca Coelho writes: > >> ) >> >> From: Shaul Triebitz > > That ')' in the first line doesn't look correct and don't know how > patchwork or git will handle it. Actually all patches from 20 to 28 seem to have the same problem. -- Kalle Valo

Re: [PATCH 21/28] wireless: align to draft 11ax D3.0

2018-08-31 Thread Kalle Valo
Luca Coelho writes: > ) > > From: Shaul Triebitz That ')' in the first line doesn't look correct and don't know how patchwork or git will handle it. -- Kalle Valo

[PATCH 12/16] iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz In order to receive TB (Trigger Based) PPDU in monitor mode, the Driver must send the HE_AIR_SNIFFER_CONFIG_CMD host command. Enable that via debugfs. Signed-off-by: Liad Kaufman Signed-off-by: Ido Yariv Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- .../w

[PATCH 14/16] iwlwifi: mvm: Support TKIP on gen2 data path

2018-08-31 Thread Luca Coelho
From: David Spinadel Make the adjustments for gen2 TX and RX of TKIP packets. Strip MIC on RX. Don't add IV space and keep the MIC space zeroed on TX. Devices that support gen2 data path support TKIP only in station mode. In all other modes, fall back to SW encryption. Do this early in the set

[PATCH 11/16] iwlwifi: mvm: cleanup dead code on resume flow for non unified image.

2018-08-31 Thread Luca Coelho
From: "Dreyfuss, Haim" CDB support has nothing to do with non unified image. Signed-off-by: Haim Dreyfuss Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/

[PATCH 15/16] iwlwifi: api: annotate compressed BA notif array sizes

2018-08-31 Thread Luca Coelho
From: Johannes Berg Annotate the compressed BA notification array sizes and make both of them 0-length since the length of 1 is just confusing - it may be different than that and the offset to the second one needs to be calculated in the C code anyhow. Signed-off-by: Johannes Berg Signed-off-by

[PATCH 13/16] iwlwifi: pcie: read correct prph address for newer devices

2018-08-31 Thread Luca Coelho
From: Sara Sharon For newer devices we have higher range of periphery addresses. Currently it is masked out, so we end up reading another address. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 16 ++-- 1 file changed, 1

[PATCH 10/16] iwlwifi: fix non_shared_ant for 22000 devices

2018-08-31 Thread Luca Coelho
From: Erel Geron The non-shared antenna was wrong for 22000 device series. Fix it to ANT_B for correct antenna preference by coex in MVM driver. Fixes: e34d975e40ff ("iwlwifi: Add a000 HW family support") Signed-off-by: Erel Geron Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlw

[PATCH 16/16] iwlwifi: pcie: gen2: pull adding frags to helper routine

2018-08-31 Thread Luca Coelho
From: Johannes Berg Move the skb fragment loop into a helper routine to be able to reuse it later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git

[PATCH 09/16] iwlwifi: dbg: don't crash if the firmware crashes in the middle of a debug dump

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach We can dump data from the firmware either when it crashes, or when the firmware is alive. Not all the data is available if the firmware is running (like the Tx / Rx FIFOs which are available only when the firmware is halted), so we first check that the firmware is alive to

[PATCH 03/16] iwlwifi: fw: stop and start debugging using host command

2018-08-31 Thread Luca Coelho
From: Sara Sharon In new devices, access to periphery is forbidden. Send instead host command to start and stop debugging. Memory allocation is written in context info, but in case we need to update it there is a dedicated command. Add definitions, currently unused, of the new command. Signed-o

[PATCH 07/16] iwlwifi: mvm: report RU offset is known

2018-08-31 Thread Luca Coelho
From: Johannes Berg We already report the RU offset, so we'd better also report that we know the value. Fixes: e5721e3f770f ("iwlwifi: mvm: add radiotap data for HE") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 3 ++- 1 file chan

[PATCH 02/16] iwlwifi: fw: add a restart FW debug function

2018-08-31 Thread Luca Coelho
From: Sara Sharon Move the restart FW debug code to a function. This avoids code duplication and lays the infra to support the new start and stop host commands in some future devices. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 37

[PATCH 08/16] iwlwifi: remove ucode error tracepoint

2018-08-31 Thread Luca Coelho
From: Johannes Berg Alexei's patch, assumed that all versions of "struct iwl_error_event_table" are the same, but there are really different versions in different files. Rather than trying to fix this, or splitting the tracepoint, or anything of the sort, just remove it entirely - turns out that

[PATCH 04/16] iwlwifi: RX API: remove unnecessary anonymous struct

2018-08-31 Thread Luca Coelho
From: Johannes Berg There's no value in having an anonymous struct for holding a few fields, remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- .../net/wireless/intel/iwlwifi/fw/api/rx.h| 28 +-- 1 file changed, 13 insertions(+), 15 deletions(-) diff -

[PATCH 05/16] iwlwifi: debug flow cleanup

2018-08-31 Thread Luca Coelho
From: Shahar S Matityahu Cleanup of the debug flow by moving several flows to separate functions to increase readability. Three functions were created: 1. iwl_fw_get_prph_len - returns the size needed for periphery dump. 2. iwl_fw_dump_mem for - executes the memory dumping flow. 3. iwl_trans_ge

[PATCH 06/16] iwlwifi: iwlmvm: fix typo when checking for TX Beamforming

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz Check the actual bit (mask) in Rx notification rate_n_flags. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/m

[PATCH 00/16] iwlwifi: updates intended for v4.20 2018-08-

2018-08-31 Thread Luca Coelho
From: Luca Coelho Hi, Here's the fourth set of patches intended for v4.20. It's the usual development, with some small new features, cleanups and bugfixes. The changes are: * TKIP implementation in new devices; * Fix for the shared antenna setting in 22000 series; * Report that we set the RU

[PATCH 01/16] iwlwifi: mvm: fix a comment about the SP length

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach The SP length in the ADD_STA command is an actual number of frames, and not the SP len as it appears in the WME IE. Fix that comment. The actual code is fine. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/api/sta.

[PATCH] iwlwifi: fix devices with PCI Device ID 0x34F0 and 11ac RF modules

2018-08-31 Thread Luca Coelho
From: Luca Coelho The devices with PCI device ID 0x34F0 are part of the SoC and can be combined with some different external RF modules. The configuration for these devices should reflect that, but are currently mixed up. To avoid confusion with discrete devices, add part of the firmware to be

Re: [PATCH 00/16] unify usb mcu layer between mt76x2u and mt76x0u drivers

2018-08-31 Thread Stanislaw Gruszka
On Sat, Aug 25, 2018 at 12:40:40PM +0200, Lorenzo Bianconi wrote: > Use shared mt76u mcu routines available in mt76-usb module and > unify usb mcu layer between mt76x2u and mt76x0u drivers. > Remove unused mt76x0 routines. > This patchset is based on top of Stanislaw's patchset (not applied yet): >

[PATCH 27/28] mac80211: Always report TX status

2018-08-31 Thread Luca Coelho
) From: Andrei Otcheretianski If a frame is dropped for any reason, mac80211 wouldn't report the TX status back to user space. As the user space may rely on the TX_STATUS to kick its state machines, resends etc, it's better to just report this frame as not acked instead. Signed-off-by: Andrei

[PATCH 15/28] mac80211: introduce capability flags for VHT EXT NSS support

2018-08-31 Thread Luca Coelho
From: Johannes Berg Depending on whether or not rate control supports selecting rates depending on the bandwidth, we can use VHT extended NSS support. In essence, this is dot11VHTExtendedNSSBWCapable from the spec, since depending on that we'll need to parse the bandwidth. If needed, also set/cl

[PATCH 14/28] ieee80211: add new VHT capability fields/parsing

2018-08-31 Thread Luca Coelho
From: Johannes Berg IEEE 802.11-2016 extended the VHT capability fields to allow indicating the number of spatial streams depending on the actually used bandwidth, add support for decoding this. Signed-off-by: Johannes Berg --- include/linux/ieee80211.h | 35 +++- net/wireless/util.c

[PATCH 11/28] mac80211: shorten the IBSS debug messages

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach When tracing is enabled, all the debug messages are recorded and must not exceed MAX_MSG_LEN (100) columns. Longer debug messages grant the user with: WARNING: CPU: 3 PID: 32642 at /tmp/wifi-core-20180806094828/src/iwlwifi-stack-dev/net/mac80211/./trace_msg.h:32 trace_e

[PATCH 12/28] cfg80211: add he_capabilities (ext) IE to AP settings

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz Same as for HT and VHT. This helps the lower level to know whether the AP supports HE. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- include/net/cfg80211.h | 2 ++ net/wireless/nl80211.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/net/cf

[PATCH 26/28] cfg80211: reg: Init wiphy_idx in regulatory_hint_core()

2018-08-31 Thread Luca Coelho
) From: Andrei Otcheretianski Core regulatory hints didn't set wiphy_idx to WIPHY_IDX_INVALID. Since the regulatory request is zeroed, wiphy_idx was always implicitly set to 0. This resulted in updating only phy #0. Fix that. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho ---

[PATCH 17/28] mac80211: copy VHT EXT NSS BW Support/Capable data to station

2018-08-31 Thread Luca Coelho
From: Johannes Berg When taking VHT capabilities for a station, copy the new fields if we support them as a transmitter. Also adjust the maximum bandwidth the station supports appropriately. Also, since it was missing, copy tx_highest and rx_highest. Signed-off-by: Johannes Berg --- net/mac80

[PATCH 18/28] mac80211: support radiotap L-SIG data

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz As before with HE, the data needs to be provided by the driver in the skb head, since there's not enough space in the skb CB. Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- include/net/ieee80211_radiotap.h | 15 +++

[PATCH 19/28] mac80211: support reporting 0-length PSDU in radiotap

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz For certain sounding frames, it may be useful to report them to userspace even though they don't have a PSDU in order to determine the PHY parameters (e.g. VHT rate/stream config.) Add support for this to mac80211. Signed-off-by: Johannes Berg Signed-off-by: Shaul Triebitz

pull-request: iwlwifi-next 2018-08-31

2018-08-31 Thread Luca Coelho
Hi Kalle, This is first batch of patches intended for v4.20. This includes the last 3 patchsets I sent. Usual development work, with focus on HE and bugfixes, and some other small fixes and improvements. More details about the contents in the tag description. I have sent this out before and kb

[PATCH 22/28] mac80211: avoid kernel panic when building AMSDU from non-linear SKB

2018-08-31 Thread Luca Coelho
) From: Sara Sharon When building building AMSDU from non-linear SKB, we hit a kernel panic when trying to push the padding to the tail. Instead, put the padding at the head of the next subframe. This also fixes the A-MSDU subframes to not have the padding accounted in the length field and not h

[PATCH 21/28] wireless: align to draft 11ax D3.0

2018-08-31 Thread Luca Coelho
) From: Shaul Triebitz Align to new 11ax draft D3.0. Change/add new MAC and PHY capabilities and update drivers' 11ax capabilities and mac80211's debugfs accordingly. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- .../wireless/intel/iwlwifi/iwl-nvm-parse.c| 51

[PATCH 28/28] mac80211: Don't wake up from PS for offchannel TX

2018-08-31 Thread Luca Coelho
) From: Andrei Otcheretianski Otherwise the offchannel frame might be queued due to IEEE80211_QUEUE_STOP_REASON_PS and later dropped (in ieee80211_tx_frags()). Anyway, it doesn't make much sense to wake up the device during ROC. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho

[PATCH 13/28] mac80211: in AP mode, set bss_conf::he_supported

2018-08-31 Thread Luca Coelho
From: Shaul Triebitz In AP mode, If AP advertises HE capabilities, set to true bss_conf::he_supported so that the Driver knows about it. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- net/mac80211/cfg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/mac80211/cfg.c b/

[PATCH 24/28] mac80211: allow AMSDU size limitation per-TID

2018-08-31 Thread Luca Coelho
) From: Sara Sharon Some drivers may have AMSDU size limitation per TID, due to HW constrains. Add an option to set this limit. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- include/net/mac80211.h | 2 ++ net/mac80211/tx.c | 4 2 files changed, 6 insertions(+) diff --g

[PATCH 25/28] mac80211: add an option for drivers to check if packets can be aggregated

2018-08-31 Thread Luca Coelho
) From: Sara Sharon Some hardwares have limitations on the packets' type in AMSDU. Add an optional driver callback to determine if two skbs can be used in the same AMSDU or not. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- include/net/mac80211.h| 7 +++ net/mac80211/dri

[PATCH 10/28] mac80211: don't Tx a deauth frame if the AP forbade Tx

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach If the driver fails to properly prepare for the channel switch, mac80211 will disconnect. If the CSA IE had mode set to 1, it means that the clients are not allowed to send any Tx on the current channel, and that includes the deauthentication frame. Make sure that we don'

[PATCH 23/28] mac80211: add an option for station management TXQ

2018-08-31 Thread Luca Coelho
) From: Sara Sharon We have a TXQ abstraction for non-data packets that need powersave buffering. Since the AP cannot sleep, in case of station we can use this TXQ for all management frames, regardless if they are bufferable. Add HW flag to allow that. Signed-off-by: Sara Sharon Signed-off-by:

[PATCH 16/28] mac80211: add ability to parse CCFS2

2018-08-31 Thread Luca Coelho
From: Johannes Berg With newer VHT implementations, it's necessary to look at the HT operation's CCFS2 field to identify the actual bandwidth used. Signed-off-by: Johannes Berg --- net/mac80211/ibss.c| 4 +++- net/mac80211/ieee80211_i.h | 4 +++- net/mac80211/mesh.c| 5 +++-

[PATCH 20/28] mac80211: fix saving a few HE values

2018-08-31 Thread Luca Coelho
) From: Naftali Goldstein After masking the he_oper_params, to get the requested values as integers one must rshift and not lshift. Fix that. Fixes: 41cbb0f5a295 ("mac80211: add support for HE") Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho --- net/mac80211/mlme.c | 4 ++-- 1 f

[PATCH 09/28] mac80211: pass the TWT support bits in extended caps to the driver

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach The Target Wake Time is a feature define in 11ah but has been enhanced in 802.11ax. 802.11ax D3.0 defines in 9.4.2.27 two bits in the Extended Capabilities IE that the low level driver needs to be aware of: bits 77 and 78. Through those bits, the AP can advertise if it su

[PATCH 08/28] mac80211: Fix station bandwidth setting after channel switch

2018-08-31 Thread Luca Coelho
From: Ilan Peer When performing a channel switch flow for a managed interface, the flow did not update the bandwidth of the AP station and the rate scale algorithm. In case of a channel width downgrade, this would result with the rate scale algorithm using a bandwidth that does not match the inte

[PATCH 07/28] ieee80211: remove redundant leading zeroes

2018-08-31 Thread Luca Coelho
From: Sara Sharon The defines of IEEE80211_HE_OPERATION_VHT_OPER_INFO and IEEE80211_HE_OPERATION_MULTI_BSSID_AP have leading zeroes that makes the number look like it is bigger than 32 bit. This is misleading, remove it. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- include/linux/

[PATCH 04/28] mac80211: fix a race between restart and CSA flows

2018-08-31 Thread Luca Coelho
From: Emmanuel Grumbach We hit a problem with iwlwifi that was caused by a bug in mac80211. A bug in iwlwifi caused the firwmare to crash in certain cases in channel switch. Because of that bug, drv_pre_channel_switch would fail and trigger the restart flow. Now we had the hw restart worker which

[PATCH 06/28] mac80211: add an optional TXQ for other PS-buffered frames

2018-08-31 Thread Luca Coelho
From: Johannes Berg Some drivers may want to also use the TXQ abstraction with non-data packets that need powersave buffering, so add a hardware flag to allow this. Signed-off-by: Johannes Berg --- include/net/mac80211.h | 17 - net/mac80211/debugfs.c | 2 ++ net/mac80

[PATCH 00/28] cfg80211/mac80211 patches from our internal tree 2018-08-31

2018-08-31 Thread Luca Coelho
From: Luca Coelho Hi, Some patches with mac80211 and cfg80211 changes from our internal tree. Please review, though you have already reviewed most if not all of them ;) Cheers, Luca. Andrei Otcheretianski (3): cfg80211: reg: Init wiphy_idx in regulatory_hint_core() mac80211: Always repor

[PATCH 01/28] mac80211: Add he_capa debugfs entry

2018-08-31 Thread Luca Coelho
From: Ido Yariv Export HE capabilities information via debugfs, similar to HT & VHT. Signed-off-by: Ido Yariv Signed-off-by: Luca Coelho --- net/mac80211/debugfs_sta.c | 325 + 1 file changed, 325 insertions(+) diff --git a/net/mac80211/debugfs_sta.c b/net

[PATCH 05/28] mac80211: use le16_encode_bits() instead of open-coding

2018-08-31 Thread Luca Coelho
From: Johannes Berg Instead of open-coding the equivalent of le16_encode_bits(), just use that. Signed-off-by: Johannes Berg --- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 134bbbc9cd6e..f988609e1283 100644 -

[PATCH 03/28] mac80211: remove pointless 'params' NULL checks

2018-08-31 Thread Luca Coelho
From: Johannes Berg These checks aren't necessary, cfg80211 never passes NULL. Some static checkers complain about the missing checks on the next line, but really the NULL checks are unnecessary. Signed-off-by: Johannes Berg --- net/mac80211/cfg.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 02/28] mac80211: fix WMM TXOP calculation

2018-08-31 Thread Luca Coelho
From: "Dreyfuss, Haim" In commit 9236c4523e5b ("mac80211: limit wmm params to comply with ETSI requirements"), we have limited the WMM parameters to comply with 802.11 and ETSI standard. Mistakenly the TXOP value was caluclated wrong. Fix it by taking the minimum between 802.11 to ETSI to make

[PATCH] cfg80211: fix a type issue in ieee80211_chandef_to_operating_class()

2018-08-31 Thread Dan Carpenter
The "chandef->center_freq1" variable is a u32 but "freq" is a u16 so we are truncating away the high bits. I noticed this bug because in commit 9cf0a0b4b64a ("cfg80211: Add support for 60GHz band channels 5 and 6") we made "freq <= 56160 + 2160 * 6" a valid requency when before it was only "freq <