aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel
AgeCommit message (Collapse)AuthorFilesLines
2018-04-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo4-20/+98
To fix a conflict reported by Stephen Rothwell <[email protected]>: Today's linux-next merge of the wireless-drivers-next tree got a conflict in: drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c between commit: 77e30e10ee28 ("iwlwifi: mvm: query regdb for wmm rule if needed") from the wireless-drivers tree and commits: 9c4f7d512740 ("iwlwifi: move all NVM parsing code to the common files") 4c625c564ba2 ("iwlwifi: get rid of fw/nvm.c") from the wireless-drivers-next tree.
2018-04-24iwlwifi: mvm: fix old scan version sizesLuca Coelho1-8/+5
When version 8 of the scan command API was introduced, only the size of version 7 was updated, causing older versions of the firmware to throw BAD_COMMAND errors. Calculating the old version based on the size of the latest version got too complicated and the size of the older versions will never change anyway, so it's better to just hardcoded the sizes. Fixes: 66fa2424df16 ("iwlwifi: fw api: support the new scan request FW API version") Reported-by: Scott Register <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-04-20iwlwifi: mvm: support 22000 HW opening agg before trafficLiad Kaufman1-0/+10
When trying to open aggregations on 22000 HW before traffic had actually passed, the driver will discover it is missing a queue to aggregate on. In such a case - allocate a queue. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: get rid of fw/nvm.cShaul Triebitz6-191/+114
There's already an opmode common file for nvm iwl-nvm-parse.c Move the content of fw/nvm.c to iwl-nvm-parse.c and delete fw/nvm.c. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: remove upper case letters in sku_capa_band_*_enableLuca Coelho5-13/+13
The sku_capa_band_24GHz_enable and sku_capa_band_52GHz_enable symbols cause checkpatch to complain whenever we use them. To prevent this, convert them to all lower case. Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: use flags to denote modifiers for the channel mapsLuca Coelho3-15/+34
Instead of having a boolean for each modifier we need to handle in the channel maps, create a bitmask with flags that denote each modification. Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: support api ver2 of NVM_GET_INFO respLiad Kaufman3-19/+38
NVM_GET_INFO API has changed to support indication of 11ax support. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: update rs-fw APINaftali Goldstein7-218/+114
Update rs-fw API to match changes in FW. Specifically, the TLC_MNG_NOTIF_REQ_CMD command and TLC_MNG_AMSDU_ENABLE_NOTIF notification are removed, the A-MSDU related info is received from FW via the TLC_MNG_UPDATE_NOTIF, and the TLC_MNG_CONFIG_CMD uses version 2 of its data structure. Additionally, constify some arguments in a couple of functions. Signed-off-by: Naftali Goldstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: set the MFP flag for keys that are used by MFP stationsEmmanuel Grumbach1-5/+13
22000 devices rely on this flag to install the key to the right queues. For earlier devices we didn't have a key / queue mapping and the key was sent along with the Tx command for each Tx hence the problem didn't arise. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: pcie: gen2: fix race in cmd fifo write ptrShaul Triebitz1-4/+6
Avoid a race where two (or more) commands get the same index: 1. T1 calls enqueue_hcmd and the local TFD index is assigned to txq->write_ptr; 2. Context switch 'before incrementing txq->write_ptr'; 3. T2 calls enqueue_hcmd and the local TFD index is assigned to txq->write_ptr; 4. Now the index is set to the same value for both commands of T1 and T2. To prevent this from happening, set the local TFD index inside the critical section (the index is set by global txq write pointer). Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: use the new get_tid functionSara Sharon2-11/+7
This saves some typing and is overall more readable. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: move all NVM parsing code to the common filesShaul Triebitz5-220/+247
Move all the NVM file handling code to iwl-nvm-parse.c where all this stuff belongs. This cleans up the MVM specific code and allows easier reuse by other opmodes if needed. Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: use shorter queues for mgmt and auxilary queuesSara Sharon2-4/+6
In 22000 devices, aka gen2, the TFS is 256 bytes. In order to save memory, use shorter TX queue for aux and mgmt queues, since there isn't much traffic on them. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: pcie: use the queue size as sent by opmodeSara Sharon1-3/+3
Op mode will begin tp use varying size of TX queue. All the infra is in place, allow it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: add TX queue size parameter to TX queue allocationSara Sharon5-7/+9
As preparation for dynamic queue sizing, add a parameter of the TX queue size to the dynamic queue allocation op mode API. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: Revert "iwlwifi: pcie: dynamic Tx command queue size"Sara Sharon6-35/+5
This reverts commit dd05f9aab4426ff178b12d601e50d19d336eba30. Shorter TX queues support was added eventually without the need for the parameters this patch added. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: pcie: allocate shorter TX queues for 22000 devicesSara Sharon2-1/+4
When support for shorter TX queues was introduced, it didn't include the actual allocation of shorter queue, which is the main motive for the change. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: move timestamp functions from debugfs.h to dbg.hHaim Dreyfuss3-31/+37
These functions are not debugfs functions so they should be in dbg.h instad in debugfs.h. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: pcie: implement the overlow queue for Gen2 devicesEmmanuel Grumbach2-4/+25
When we enable TSO, we can have a lot of packets in the operation mode that will be pushed to the transport no matter what is the queue's fullness state. To cope with that the transport can buffer those packets and add them to the ring later when there is more room. This implementation was missing in the Gen2 devices' code. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: support offload of AMSDU rate controlGregory Greenman8-15/+96
Support the new APIs and activate AMSDU based on the offloaded TLC decisions. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: fix OOC priority in scansLuca Coelho1-0/+5
The code that sets the correct out-of-channel priority depending on the scan type was accidentally removed during a rebase. Add it back. Fixes: c1a7515393e4 ("iwlwifi: mvm: add adaptive dwell support") Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: clean up scan capability checksJohannes Berg2-7/+18
Introduce and use iwl_mvm_cdb_scan_api(), which checks the family. Most of this will go away once the 22000 firmware supports adaptive dwell, after which the V6 scan API won't be used, but the V3 scan *config* API will still need to be distinguished. In any case, this gets rid of the completely bogus has_new_tx_api() checks. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: detect low latency and traffic load per bandSara Sharon4-50/+192
Detect low latency and traffic load per band. Add support for deciding on scan type and timings per band. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: detect U-APSD breaking aggregationJohannes Berg6-1/+244
Try to detect that the AP is not using aggregation even when there's enough traffic to make it worthwhile; if this is the case and U-APSD is enabled then assume the AP is broken (like so many) and doesn't enable aggregation when U-APSD is used. In this case, disconnect from the AP and blacklist U-APSD for a potential new connection to it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: BT Coex - make the primary / secondary pick traffic awareEmmanuel Grumbach1-0/+37
The primary channel is the channel that will be untouched by BT. The secondary channel might be touched by BT. Hence, we want the primary to be the most active channel. To do so, use the TCM infrastructure. Since the BT keeps sending notifications, we can rely on them to trigger the check. Every 10 seconds, we will check what is the most active context and chose the right primary. We need to wait 10 seconds before we modify the settings because frequent changes in these settings can confuse BT. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: use TCM data to decide scan priorityLuca Coelho1-1/+1
The code for changing the scan priority is already implemented, but isn't yet in use. Now that TCM data is available, we can base the scan priority decision on the traffic load. Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: add traffic condition monitoring (TCM)Luca Coelho10-9/+415
Traffic condition monitor gathers data about the traffic load and other conditions and can be used to make decisions regarding latency, throughput etc. This patch introduces the code and data structures to collect this data for future use. Signed-off-by: Luca Coelho <[email protected]>
2018-04-09iwlwifi: mvm: query regdb for wmm rule if neededHaim Dreyfuss3-19/+101
Since our device is regulatory self managed it maintains its regulatory rules by its own. However the wmm_rules values can't be set by the device itself but only the indication about the need to set it. In case the device set wmm indication, proactively query the regulatory data base to get these values Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-03-31Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-nextDavid S. Miller4-33/+21
Daniel Borkmann says: ==================== pull-request: bpf-next 2018-03-31 The following pull-request contains BPF updates for your *net-next* tree. The main changes are: 1) Add raw BPF tracepoint API in order to have a BPF program type that can access kernel internal arguments of the tracepoints in their raw form similar to kprobes based BPF programs. This infrastructure also adds a new BPF_RAW_TRACEPOINT_OPEN command to BPF syscall which returns an anon-inode backed fd for the tracepoint object that allows for automatic detach of the BPF program resp. unregistering of the tracepoint probe on fd release, from Alexei. 2) Add new BPF cgroup hooks at bind() and connect() entry in order to allow BPF programs to reject, inspect or modify user space passed struct sockaddr, and as well a hook at post bind time once the port has been allocated. They are used in FB's container management engine for implementing policy, replacing fragile LD_PRELOAD wrapper intercepting bind() and connect() calls that only works in limited scenarios like glibc based apps but not for other runtimes in containerized applications, from Andrey. 3) BPF_F_INGRESS flag support has been added to sockmap programs for their redirect helper call bringing it in line with cls_bpf based programs. Support is added for both variants of sockmap programs, meaning for tx ULP hooks as well as recv skb hooks, from John. 4) Various improvements on BPF side for the nfp driver, besides others this work adds BPF map update and delete helper call support from the datapath, JITing of 32 and 64 bit XADD instructions as well as offload support of bpf_get_prandom_u32() call. Initial implementation of nfp packet cache has been tackled that optimizes memory access (see merge commit for further details), from Jakub and Jiong. 5) Removal of struct bpf_verifier_env argument from the print_bpf_insn() API has been done in order to prepare to use print_bpf_insn() soon out of perf tool directly. This makes the print_bpf_insn() API more generic and pushes the env into private data. bpftool is adjusted as well with the print_bpf_insn() argument removal, from Jiri. 6) Couple of cleanups and prep work for the upcoming BTF (BPF Type Format). The latter will reuse the current BPF verifier log as well, thus bpf_verifier_log() is further generalized, from Martin. 7) For bpf_getsockopt() and bpf_setsockopt() helpers, IPv4 IP_TOS read and write support has been added in similar fashion to existing IPv6 IPV6_TCLASS socket option we already have, from Nikita. 8) Fixes in recent sockmap scatterlist API usage, which did not use sg_init_table() for initialization thus triggering a BUG_ON() in scatterlist API when CONFIG_DEBUG_SG was enabled. This adds and uses a small helper sg_init_marker() to properly handle the affected cases, from Prashant. 9) Let the BPF core follow IDR code convention and therefore use the idr_preload() and idr_preload_end() helpers, which would also help idr_alloc_cyclic() under GFP_ATOMIC to better succeed under memory pressure, from Shaohua. 10) Last but not least, a spelling fix in an error message for the BPF cookie UID helper under BPF sample code, from Colin. ==================== Signed-off-by: David S. Miller <[email protected]>
2018-03-28net/wireless/iwlwifi: fix iwlwifi_dev_ucode_error tracepointAlexei Starovoitov4-33/+21
fix iwlwifi_dev_ucode_error tracepoint to pass pointer to a table instead of all 17 arguments by value. dvm/main.c and mvm/utils.c have 'struct iwl_error_event_table' defined with very similar yet subtly different fields and offsets. tracepoint is still common and using definition of 'struct iwl_error_event_table' from dvm/commands.h while copying fields. Long term this tracepoint probably should be split into two. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
2018-03-28iwlwifi: wrt: add fw force restart via triggersShahar S Matityahu2-1/+17
We can set triggers that cause a debug data collection when something of interest happens (e.g. when too many probes are lost conscutively). Normally, this triggers don't cause the FW to be restarted, but in some cases that may be desired, so we recover from the problem. To support this, add a flag that indicates that the FW should be restarted when the trigger fires. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: save low latency causes in an enumSara Sharon3-17/+38
Currently we have a boolean variable for each cause. This costs space, and requires to check each separately when determining low latency. Since we have another cause incoming, convert it to an enum. While at it, move the retrieval of the prev value and the assignment of the new value to be inside iwl_mvm_update_low_latency and save the need for each caller to do it separately. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: bump the max API version for 9000 and 22000 devicesEmmanuel Grumbach2-2/+6
We are now ready to load 38.ucode Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: api: Add geographic profile information to MCC_UPDATE_CMDHaim Dreyfuss1-3/+17
Some geographic profiles require specific handling. For example ETSI profile requires special channel access handling. Add geographic profile information to MCC_UPDATE response to allow it. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: add a bunch of new 9000 PCI IDsLuca Coelho1-2/+155
A lot of new PCI IDs were added for the 9000 series. Add them to the list of supported PCI IDs. Cc: [email protected] # 4.13+ Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: fw api: support the new scan request FW API versionAyala Beker4-54/+136
Remove fragmented_dwell_time and add num_of_fragments to support the new API version. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: Allow iwl_mvm_mac_mgd_prepare_tx() when associatedIlan Peer1-3/+1
The FW does not allocate quota air time for the binding of a station MAC before iwlmvm indicates that it is associated. Currently iwlmvm indicates that the MAC is associated only after hearing a beacon from the AP. In case a deauthentication frame is sent before the MAC is associated, the frame might not be sent as the corresponding binding is not scheduled. To handle such cases, set IEEE80211_HW_DEAUTH_NEED_MGD_TX_PREP in the HW flags, requesting mac80211 to call the mgd_prepare_tx() callback before transmitting a deauthentication frame if associated but no beacon was heard from the AP. In addition, do not warn in iwl_mvm_mac_mgd_prepare_tx() when already associated as now the callback can be called also when associated. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: add support for oceZamir, Roee5-1/+44
Add support for Optimized Connectivity Experience (OCE). Get capabilities from the fw, expose them with nl80211, and enable them in UMAC scan if the relevant nl80211 flags are set by the userspace. Signed-off-by: Roee Zamir <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: add adaptive dwell supportZamir, Roee2-33/+67
Update the scan command API with support for adaptive dwell. Adaptive dwell is a type of scan that dynamically changes the time it remains on each channel listening for beacons or probe responses. Signed-off-by: Roee Zamir <[email protected]> Signed-off-by: Beni Lev <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: check if mac80211_queue is valid in iwl_mvm_disable_txqLuca Coelho1-2/+9
Sometimes iwl_mvm_disable_txq() may be called with mac80211_queue == IEEE80211_INVAL_HW_QUEUE, and this would cause us to use BIT(0xFF) which is way too large for the u16 we used to store it in hw_queue_to_mac820211. If this happens the following UBSAN warning will be generated: [ 167.185167] UBSAN: Undefined behaviour in drivers/net/wireless/intel/iwlwifi/mvm/utils.c:838:5 [ 167.185171] shift exponent 255 is too large for 64-bit type 'long unsigned int' Fix that by checking that it is not IEEE80211_INVAL_HW_QUEUE and, while at it, add a warning if the queue number is larger than IEEE80211_MAX_QUEUES. Fixes: 34e10860ae8d ("iwlwifi: mvm: remove references to queue_info in new TX path") Reported-by: Paul Menzel <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: set default timstamp marker cmdMordechay Goodstein3-9/+24
In case debug configuration is started with LDBG cmd also start timestamp marker for syncing logs witn the FW. Signed-off-by: Mordechay Goodstein <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: move TSO segment to a separate functionSara Sharon1-75/+83
This makes future bail-outs from transmitting an AMSDU more readable. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: take RCU lock before dereferencingSara Sharon1-1/+5
RCU isn't properly locked. Fixes: 46d372af9935 ("iwlwifi: mvm: rs: new rate scale API - add FW notifications") Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28iwlwifi: mvm: flip AMSDU addresses only for 9000 familySara Sharon1-10/+15
Hardware bug was fixed in later generation. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo11-81/+161
Requested by Luca, needed for upcoming patch "iwlwifi: add a bunch of new 9000 PCI IDs".
2018-03-27wireless: Use octal not symbolic permissionsJoe Perches17-281/+244
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-03-25Merge tag 'wireless-drivers-next-for-davem-2018-03-24' of ↵David S. Miller1-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.17 The biggest changes are the bluetooth related patches to the rsi driver. It adds a new bluetooth driver which communicates directly with the wireless driver and the interface is defined in include/net/rsi_91x.h. Major changes: wl1251 * read the MAC address from the NVS file rtlwifi * enable mac80211 fast-tx support mt76 * add capability to select tx/rx antennas mt7601 * let mac80211 validate rx CCMP Packet Number (PN) rsi * bluetooth: add new btrsi driver * btcoex support with the new btrsi driver ==================== Signed-off-by: David S. Miller <[email protected]>
2018-03-19iwlwifi: mvm: Move unused phy's to a default channelAndrei Otcheretianski1-5/+16
When immediate quiet bit is set in CSA, the entire channel is blocked by the firmware. It is expected that all the MACs will evacuate the channel and the phy will be eventually either moved or removed. Currently, the phy context is just unreferenced and thus, the quiet bit is kept set and it will be impossible to TX on this phy, if we will need to reuse it in the future. This can be seen when doing a channel switch with mode=1 (quiet) twice from channel X to Y and then back to channel X. Fix that, by moving the phy context to a default channel when not referenced anymore. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-19iwlwifi: mvm: fix array out of bounds referenceAvraham Stern1-27/+11
When starting aggregation, the code checks the status of the queue allocated to the aggregation tid, which might not yet be allocated and thus the queue index may be invalid. Fix this by reserving a new queue in case the queue id is invalid. While at it, clean up some unreachable code (a condition that is already handled earlier) and remove all the non-DQA comments since non-DQA mode is no longer supported. Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-03-19iwlwifi: mvm: make sure internal station has a valid idAvraham Stern1-1/+2
If the driver failed to resume from D3, it is possible that it has no valid aux station. In such case, fw restart will end up in sending station related commands with an invalid station id, which will result in an assert. Fix this by allocating a new station id for the aux station if it does not have a valid id even in the case of fw restart. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>