summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi (follow)
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: fw: add a restart FW debug functionSara Sharon2018-09-285-35/+50
| | | | | | | | | 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 <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: fix a comment about the SP lengthEmmanuel Grumbach2018-09-281-1/+3
| | | | | | | | | 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 <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: fix devices with PCI Device ID 0x34F0 and 11ac RF modulesLuca Coelho2018-08-313-32/+97
| | | | | | | | | | | | | | 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 used and the official name of the device to the cfg structs. This is least reorganization possible (without messing things even more) that could be done as a bugfix for this SoC. Further reorganization of this code will be done separately. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* Revert "iwlwifi: allow memory debug TLV to specify the memory type"Johannes Berg2018-08-313-73/+12
| | | | | | | | | This reverts the addition of memory type in the memory debug TLV as the firmware never ended up implementing it, and now the PRPH dump is added as a different TLV. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: activate fragmented EBS in case of fragmented scanAyala Beker2018-08-312-1/+12
| | | | | | | | In case of fragmented scan on the HB channels, configure EBS to be fragmented as well. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: refactor txq_alloc for supporting more command typeGolan Ben Ami2018-08-314-40/+82
| | | | | | | | | Support more txq_alloc command types by moving the command declaration to the gen specific area. While at it, move some of the code segments to a common place for re-use. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: decode HE TB PPDU dataJohannes Berg2018-08-312-25/+34
| | | | | | | | Decode the HE TB PPDU data that we get in sniffer mode and use it to populate the HE radiotap information. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: rs-fw: support dcmNaftali Goldstein2018-08-312-0/+18
| | | | | | | | | Add flags to the tlc_cfg_cmd for signaling peer support for receiving Dual Carrier Modulation at BPSK (MCS 0), and set them according to peer capabilities. Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: rs-fw: enable STBC in he correctlyNaftali Goldstein2018-08-312-7/+23
| | | | | | | | | In the HE phy capabilities IE there are 2 bits to signal support for STBC in bandwidths of 80Mhz or less, and of 160Mhz. Use these bits to determine STBC support if this IE exists. Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: avoid code duplication in stopping fw debug data recordingShahar S Matityahu2018-08-315-18/+11
| | | | | | | | | Make all FW debug data stop recording flows to use iwl_fw_dbg_stop_recording function instead of writing to FW registers directly. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: change monitor DMA to be coherentShahar S Matityahu2018-08-312-45/+21
| | | | | | | | Allow access to the memory by the host and the device simultaneously. This will be needed in some future patches. Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: always init rs_fw with 20MHz bandwidth ratesNaftali Goldstein2018-08-313-4/+5
| | | | | | | | | | | | As with the non-offloaded rs case, during assoc on the ap side the phy context is set to 20MHz until authorization of a client that supports wider channel-widths. Support this by sending the initial tlc_config_cmd with max supported channel width of 20MHz until authorization succeeds. Fixes: 6b7a5aea71b3 ("iwlwifi: mvm: always init rs with 20mhz bandwidth rates") Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: send BCAST management frames to the right stationEmmanuel Grumbach2018-08-311-1/+1
| | | | | | | | | | | | | Probe responses were sent to the multicast station while they should be routed to the broadcast station. This has no negative effect since the frame was still routed to the right queue, but it looked very fishy to send a frame to a (queue, station) tuple where 'queue' is not mapped to 'station'. Fixes: 7c305de2b954 ("iwlwifi: mvm: Direct multicast frames to the correct station") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: Add missing 11n disable module parameter checkIdo Yariv2018-08-311-1/+3
| | | | | | | | In the new method of parsing the NVM the disable_11n module parameter isn't consulted when setting up HT capabilities. Fix this. Signed-off-by: Ido Yariv <idox.yariv@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: remove channel 2 from HE radiotap if not applicableJohannes Berg2018-08-311-2/+4
| | | | | | | | | | If the bandwidth is only 20 MHz, then the second channel doesn't exist, but the hardware reports the CRC was OK. Suppress the data of the second channel in the HE radiotap in this case, by marking it as not known. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: report # of LTF symbols for extended range SU PPDUsJohannes Berg2018-08-311-2/+2
| | | | | | | This is the same as for SU PPDUs, so it's easy to do. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: properly decode HE GI durationJohannes Berg2018-08-311-6/+16
| | | | | | | | The GI duration depends on the frame type in some cases, take that into account when decoding for radiotap. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: put LTF symbol size into HE radiotapJohannes Berg2018-08-311-1/+13
| | | | | | | | | | | I evidently completely confused "number of LTF symbols" and "LTF size". Radiotap was reporting the former, while I thought it was the latter, and we really need both. Add the LTF symbol size into the newly defined field in radiotap. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: implement extended HE-MU sniffer APIJohannes Berg2018-08-312-51/+206
| | | | | | | | | | | | | | | | Implement the extended HE-MU info type decoding to show the HE-SIG-B common contents in the HE-MU radiotap field. The DW4 data is partially overwritten by the hardware in all cases, so only the higher 16 bits can be used. To be able to use it for the HE SIG-B common data anyway, move the bits around in the following way: SIG-B common 0: DW 4 -> DW 7 SIG-B common 1: DW 7 -> DW 8 SIG-B common 2: DW 8 -> DW 4 (upper half) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove all occurrences of the FSF address paragraphLuca Coelho2018-08-31102-455/+0
| | | | | | | | The Free Software Foundation address is superfluous and causes checkpatch to issue a warning when present. Remove all paragraphs with FSF's address to prevent that. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: set interrupt coalescing also for gen2Sara Sharon2018-08-311-0/+3
| | | | | | | | | | | | We offloaded all the RX configuration of init to firmware. However, the configuration of interrupt coalescing was left hanging - it wasn't offloaded nor was it written by host. This write to the CSR is allowed in gen2, so the host can do it. Without it we have various issues with RX fullness. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: Send LQ command as async when necessaryAvraham Stern2018-08-315-18/+17
| | | | | | | | | | | | | | | The parameter that indicated whether the LQ command should be sent as sync or async was removed, causing the LQ command to be sent as sync from interrupt context (e.g. from the RX path). This resulted in a kernel warning: "scheduling while atomic" and failing to send the LQ command, which ultimately leads to a queue hang. Fix it by adding back the required parameter to send the command as sync only when it is allowed. Fixes: d94c5a820d10 ("iwlwifi: mvm: open BA session only when sta is authorized") Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: avoid sending too many BARsSara Sharon2018-08-311-0/+8
| | | | | | | | | | | | | | | | | When we receive TX response, we may release a few packets due to a hole that was closed in the transmission window. However, if that frame failed, we will mark all the released frames as failed and will send multiple BARs. This affects statistics badly, and cause unnecessary frames transmission. Instead, mark all the following packets as success, with the desired result of sending a bar for the failed frame only. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: fix BAR seq ctrl reportingSara Sharon2018-08-311-4/+5
| | | | | | | | | | | | | | | There is a bug in FW where the sequence control may be incorrect, and the driver overrides it with the value of the ieee80211 header. However, in BAR there is no sequence control in the header, which result with arbitrary sequence. This access to an unknown location is bad and it makes the logs very confusing - so fix it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: improve the flow when a NIC is disconnectedEmmanuel Grumbach2018-08-314-14/+12
| | | | | | | | | | | | | | | | | When the NIC is disconnected, we just can't do anything besides seeking for help from the bus driver. Dumping the device's memory is not necessary and just bloats the logs with unusable data. Moreover, asking mac80211 to restart the hardware is also useless. Bypass all this. Also, use the STATUS_TRANS_DEAD status bit instead of a bool inside the transport layer. The advantage of this is that now, the transport and the op_mode can know what is the situation and bypass the useless recovery steps mentioned above. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support Coex Schema 2Erel Geron2018-08-313-2/+12
| | | | | | | | | The new coex schema requires moving to SISO only when BT AG is 4. Adjust the SISO criteria according to the coex schema version reported by firmware. Signed-off-by: Erel Geron <erelx.geron@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: avoid unnecessary work if NIC is disconnectedMatt Chen2018-08-312-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the NIC is disconnected from PCI bus, we are not able to access it anymore. Check the status to avoid some unnecessary work so can improve the performance. It will help to make PCI bus rescan to bring back the device much faster. The real test is able to improve 7 seconds. [w/o patch] It takes around 9 seconds .. 2018-04-20T01:22:39.691929-07:00 WARNING kernel: [ 66.335881] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) .. 2018-04-20T01:22:48.101094-07:00 INFO kernel: [ 74.747364] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm [w/a patch] It takes about 2 seconds. .. 2018-04-20T01:18:16.454087-07:00 WARNING kernel: [ 75.966860] Timeout waiting for hardware access (CSR_GP_CNTRL 0xffffffff) .. 2018-04-20T01:18:18.602717-07:00 INFO kernel: [ 78.116132] iwlwifi 0000:01:00.0: loaded firmware version 29.610311.0 op_mode iwlmvm .. Fixes: 49564a806fc5 ("iwlwifi: pcie: remove non-responsive device") Signed-off-by: Matt Chen <matt.chen@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: don't WARN on trying to dump dead firmwareJohannes Berg2018-08-311-4/+3
| | | | | | | | | | | | There's no point in warning here, the user will just get an error back to the debugfs file write, and warning just makes it seem like there's an internal consistency problem when in reality the user just happened to hit this at a bad time. Remove the warning. Fixes: f45f979dc208 ("iwlwifi: mvm: disable dbg data collect when fw isn't alive") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add 80211 hdr offset to trace dataMordechay Goodstein2018-08-313-22/+24
| | | | | | | | | | | | Every rx mpdu cmd is built from cmd_hdr | 80211_hdr. The problem is that the size of cmd_hdr changes with API changes and we don't know where the 80211_hdr starts. By adding the size of cmd_hdr dynamically, we can ensure that we always know how to parse mpdu frames, without dependending on the API changes. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: make gen2 of apm_init non-staticGolan Ben Ami2018-08-312-1/+2
| | | | | | | This will allow using the same init in future generations. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: store the default rxq numberGolan Ben Ami2018-08-313-1/+5
| | | | | | | | Store the default rxq number in a variable, so we won't need to use the actual number in the code. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support new reduce tx power FW API.Haim Dreyfuss2018-08-315-18/+66
| | | | | | | Update reduce tx power command API to be compatible with new FW API. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: skip EBS in low latency mode while fragmented scan isn't supportedAyala Beker2018-08-313-1/+17
| | | | | | | | | While associated in low latency mode, or when traffic load is high, don't enable EBS in scan request if fragmented EBS is not supported by the FW. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove FSF's address from the license noticeGolan Ben Ami2018-08-311-3/+3
| | | | | | | | | The Free Software Foundation's address shouldn't be in the license notice anymore, and some of our check scripts complain about it (via checkpatch.pl). Remove the address to silence it. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove dump_regs() from transport opsJohannes Berg2018-08-314-14/+3
| | | | | | | | | This is used only within PCIe, and there's no reason to go through the transport methods for a function call within PCIe itself. Remove the dump_regs() method and call the function directly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: make non-static hcmd and rx codeGolan Ben Ami2018-08-314-8/+16
| | | | | | | | | Allow other device generations to use the utilities that are used to send and reclaim host commands and to allocate rx, by making it non-static. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: allow using tx init for other queues but the command queueGolan Ben Ami2018-08-313-13/+15
| | | | | | | | We would like to allow using tx init code for other queues but the command queue - for newer devices. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: drop packets with bad status in CDSara Sharon2018-08-314-62/+70
| | | | | | | | | | | We need to drop packets with errors (such as replay, MIC, ICV, conversion, duplicate and so on). Drop invalid packets, put the status bits in the metadata and move the enum definition to the correct place (FW API header). Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: enable reading the value of delay in timestamp_marker cmdMordechay Goodstein2018-08-311-1/+9
| | | | | | | | The user can validate what was written to the file by reading it, and check what is the default value before changing it. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: move he RX handling to a separate functionSara Sharon2018-08-311-1/+1
| | | | | | | The HE code is bloating the RX handling, and makes it too big. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: move he RX handling to a separate functionSara Sharon2018-08-311-296/+286
| | | | | | | The HE code is bloating the RX handling, and makes it too big. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add support for RX_AMPDU_EOF bit for HE SULiad Kaufman2018-08-311-1/+2
| | | | | | | Current implementation turns this bit on only for HE MU. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add bss color to radiotapLiad Kaufman2018-08-311-0/+14
| | | | | | | Add BSS color to the HE radiotap. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add required include to iwl-fh.hGolan Ben Ami2018-08-311-0/+2
| | | | | | | | | | | Some variables are used in iwl-fh.h, but their type's definition isn't included. This may break compilation when using the file without including the necessary dependencies first. Add the required include to iwl-fh.h. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: add NOA and CSA to a probe responseGregory Greenman2018-08-315-0/+204
| | | | | | | | | | | | | | | | A probe response built by a P2P GO should contain: 1. CSA/eCSA IE when relevant 2. If the corresponding probe request had P2P IE, then need to add P2P IE with NOA attributes. However, the NOA attributes and the updated channel switch counter are known only to the FW. The solution is that FW will send a notification with the relevant probe response data and the driver will save it and update the probe response accordingly. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support new WoWLAN status FW APILuca Coelho2018-08-315-54/+208
| | | | | | | | | | | | | | | A new FW API has been added for WOWLAN_GET_STATUSES to support multiple GTK keys and IGTK keys. Check the respective TLV and use the new API when it is set. Let most of the code use the new version (v7) and convert the old version (v6) to the new one when needed. Also refactor some functions a bit so that they can be reused more easily. Particularly the part that calls WOWLAN_GET_STATUSES which is reused in D3 and D0i3. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: protect D0i3 code behind CONFIG_PMLuca Coelho2018-08-313-2/+20
| | | | | | | | | | Runtime PM can only be used if CONFIG_PM is set. Move all the d0i3 code (which is essentially runtime PM) behind the CONFIG_PM flag. This prevents undefined usage of some functions when CONFIG_PM is not defined. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: remove duplicate if in iwl_mvm_setup_connection_keep()Luca Coelho2018-08-311-4/+3
| | | | | | | We repeated the same if twice in a row. Remove the second one and move the code block into the previous one. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add d3 debug data supportShahar S Matityahu2018-08-3112-10/+85
| | | | | | | | | During d3, the firmware records debug data into internal buffer if debug data collection occurs, collect the data that was written to the buffer Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: set the tid for non-QOS frames to zeroAvraham Stern2018-08-312-7/+19
| | | | | | | | | | | | | | | | | The tid for Non-QOS frames is set to IWL_MAX_TID_COUNT. This value is also used for configuring the queue for non-QOS data. However, this tid is used by the FW for management queues. As a result, the FW does not encrypt non-QOS data frames. Fix this by setting the tid for non-QOS data frames to zero, which is a valid value for data frames in the FW. This also fixes a bug in sending multicast frames, where the queues are allocated with tid == 0, but are sent with tid == 8, which may lead to unexpected behavior. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>