aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi
AgeCommit message (Collapse)AuthorFilesLines
2016-08-30iwlwifi: mvm: use defines for SCD_CONFIG_CMD enablementLiad Kaufman3-10/+19
Due to the addition of another option in the SCD_CONFIG_CMD's %enable field, change the assignment of this field to use defines rather than hard-code the value itself. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-30iwlwifi: mvm: re-assign old queues after hw restart in dqa modeLiad Kaufman1-2/+70
When working in DQA mode, if a queue is shared and a HW restart occurs, there might be a possible race condition between stations on the queues, and an existing queue might be left with no queues. To solve this, make sure in DQA mode to re-assign the same queues as before the HW restart. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-30iwlwifi: mvm: keep track of tid associated with each queueLiad Kaufman3-0/+11
When sending the SCD_QUEUE_CONFIG command, the queue is associated to a specific TID. If later there is a need to use this TID on a different queue instead, it first needs to be unassociated from the first queue. Keep track for every queue what TID is associated with it. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-30iwlwifi: mvm: re-aggregate shared queue after unsharingLiad Kaufman5-28/+205
When a shared queue becomes unshared, aggregations should be re-enabled if they've existed before. Make sure that they do this, if required. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: support new paging command formatSara Sharon3-10/+32
For a000 devices there is a support of 64 bit DMA addressing. The paging command was changed accordingly - support it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: support GMAC protocolAyala Beker4-17/+76
Add support for installing and removing GMAC key for newer FW versions that support GCM and MFP. GMAC provides authentication and integrity for multicast management frames. Firmware API was changed, update the driver accordingly. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: allow same PN for de-aggregated AMSDUSara Sharon1-1/+5
The 9000 hardware will de-aggregate AMSDUs. In the process it will copy the mac header "as is" to the new MPDUs. This means driver should allow the same PN for MPDUs originated from the same AMSDU. Do that by incrementing the PN only for the last MPDU in the sequence. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: Advertise support for AP channel width changePeer, Ilan1-0/+1
The iwlmvm driver supports channel width change in AP mode. Add the proper flag. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: don't use ret when not initialisedEmmanuel Grumbach1-1/+2
fw-dbg code return ret but that variable was either 0 or not initialised. Return 0 always. Signed-off-by: Emmanuel Grumbach <[email protected]> Fixes: 6a95126763fb ("iwlwifi: mvm: send dbg config hcmds to fw if set in tlv") Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: check if vif is NULL before using itSharon Dvir1-0/+2
wdev_to_ieee80211_vif() might return NULL. Check that vif != NULL before dereferencing it. Signed-off-by: Sharon Dvir <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: consider P2p device type for firmware dump triggersEmmanuel Grumbach1-1/+2
When the user really wanted a dump on P2P Client, he coudln't get it because we checked vif->type but didn't take vif->p2p into account. Fix that. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-07iwlwifi: use %pdAl Viro3-16/+10
Signed-off-by: Al Viro <[email protected]>
2016-07-18Merge tag 'iwlwifi-next-for-kalle-2016-07-11' of ↵Kalle Valo3-5/+5
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * bump firmware version to load newer firmwares
2016-07-14Merge tag 'wireless-drivers-next-for-davem-2016-07-13' of ↵David S. Miller57-833/+2470
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.8 Major changes: iwlwifi * more work on the RX path for the 9000 device series * some more dynamic queue allocation work * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) mwifiex * implement get_tx_power and get_antenna cfg80211 operation callbacks wl18xx * add support for 64bit clock rtl8xxxu * aggregation support (optional for now) Also wireless-drivers is merged to fix some conflicts. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-07-12iwlwifi: add missing type declarationArnd Bergmann1-0/+1
The iwl-debug.h header relies in implicit inclusion of linux/device.h and we get a lot of warnings without that: drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:23: error: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace, ^~~~~~ In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.h:66:0, from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:68: drivers/net/wireless/intel/iwlwifi/iwl-trans.h: In function 'iwl_trans_tx': drivers/net/wireless/intel/iwlwifi/iwl-trans.h:1030:348: error: passing argument 1 of '__iwl_err' from incompatible pointer type [-Werror=incompatible-pointer-types] IWL_ERR(trans, "%s bad state = %d\n", __func__, trans->state); ^ In file included from drivers/net/wireless/intel/iwlwifi/iwl-eeprom-read.c:67:0: drivers/net/wireless/intel/iwlwifi/iwl-debug.h:44:6: note: expected 'struct device *' but argument is of type 'struct device *' void __iwl_err(struct device *dev, bool rfkill_prefix, bool only_trace, ^~~~~~~~~ The easiest workaround is to just declare 'struct device' before its first use, rather than including the entire header file. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 21cb3222fe56 ("iwlwifi: decouple PCIe transport from mac80211") Acked-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-07-11iwlwifi: mvm: bump MAX firmware API for mvm devicesLuciano Coelho3-5/+5
The driver is now ready to load the new firmware versions. Signed-off-by: Luca Coelho <[email protected]>
2016-07-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo3-6/+22
This is to fix some conflicts in iwlwifi. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c drivers/net/wireless/intel/iwlwifi/mvm/scan.c
2016-07-08Merge tag 'iwlwifi-next-for-kalle-2016-07-06' of ↵Kalle Valo50-727/+2094
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work on DQA continued * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) * general cleanups * general bugfixes
2016-07-06mac80211: Add support for beacon report radio measurementAvraham Stern2-9/+34
Add the following to support beacon report radio measurement with the measurement mode field set to passive or active: 1. Propagate the required scan duration to the device 2. Report the scan start time (in terms of TSF) 3. Report each BSS's detection time (also in terms of TSF) TSF times refer to the BSS that the interface that requested the scan is connected to. Signed-off-by: Assaf Krauss <[email protected]> Signed-off-by: Avraham Stern <[email protected]> [changed ath9k/10k, at76c59x-usb, iwlegacy, wl1251 and wlcore to match the new API] Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2016-07-06iwlwifi: move iwl_drv to be shared across transportsSara Sharon3-11/+7
All transports has this structure. By moving it to be shared, we can get rid of casting to the specific transport in probe and remove. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: centralize SCD status loggingSara Sharon3-73/+47
Centralize the logging of SCD status. The motivation is that for a000 devices we will have new SCD HW, but this code was duplicate anyway, so it is a proper cleanup. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support v4 of the TX power commandLuca Coelho4-13/+36
Add support for the v4 version of the TX power command. Just add a new version and do the same sizing tricks that were done when support for v3 was introduced. This patch doesn't support the new functionality introduced, but makes the driver work with the new size of the command. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: load FW chunk for a000 devicesSara Sharon2-11/+75
Update the firmware load flow for TFH hardware. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: initialize a000 device's TFD tableSara Sharon4-8/+65
For a000 device the FH was replaced by the TFH. This is the first patch in a series introducing the changes stemming from this change. This patch initializes the TFQ queue table with the new 64 bit register and the relevant TFH configuration registers. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: centralize 64 bit HW registers writeSara Sharon4-16/+74
Move the write_prph_64 of pcie to be transport agnostic. Add direct write as well, as it is needed for a000 HW. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: generalize and increase the size of scratchbufSara Sharon2-58/+54
Currently the scratch buffer is set to 16 bytes and indicates the size of the bi-directional DMA. However, next HW generation will perform additional offloading, and will write the result in the key location of the TX command, so the size of the bi-directional consistent memory should grow accordingly - increase it to 40. Generalize the code to get rid of now irrelevant scratch references. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: track rxb statusSara Sharon2-1/+11
In MQ environment and new architecture in early stages we may encounter DMA issues. Track RXB status and bail out in case we receive index to an RXB that was not mapped and handed over to HW. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: fix a race in firmware loading flowEmmanuel Grumbach3-17/+28
Upon firmware load interrupt (FH_TX), the ISR re-enables the firmware load interrupt only to avoid races with other flows as described in the commit below. When the firmware is completely loaded, the thread that is loading the firmware will enable all the interrupts to make sure that the driver gets the ALIVE interrupt. The problem with that is that the thread that is loading the firmware is actually racing against the ISR and we can get to the following situation: CPU0 CPU1 iwl_pcie_load_given_ucode ... iwl_pcie_load_firmware_chunk wait_for_interrupt <interrupt> ISR handles CSR_INT_BIT_FH_TX ISR wakes up the thread on CPU0 /* enable all the interrupts * to get the ALIVE interrupt */ iwl_enable_interrupts ISR re-enables CSR_INT_BIT_FH_TX only /* start the firmware */ iwl_write32(trans, CSR_RESET, 0); BUG! ALIVE interrupt will never arrive since it has been masked by CPU1. In order to fix that, change the ISR to first check if STATUS_INT_ENABLED is set. If so, re-enable all the interrupts. If STATUS_INT_ENABLED is clear, then we can check what specific interrupt happened and re-enable only that specific interrupt (RFKILL or FH_TX). All the credit for the analysis goes to Kirtika who did the actual debugging work. Cc: <[email protected]> [4.5+] Fixes: a6bd005fe92 ("iwlwifi: pcie: fix RF-Kill vs. firmware load race") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: decouple PCIe transport from mac80211Johannes Berg8-25/+37
The PCIe transport needs to store two pointers in each TX SKB, and currently assumes mac80211's ieee80211_tx_info is present in the CB to do that. In order to remove that assumption, have the opmodes pass in the offset to where the pointers can be stored in the CB and use the offset in the PCIe code. To make the disentanglement complete, remove mac80211.h includes from everywhere in the generic iwlwifi code. This required adding an include of cfg80211.h in one place. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: tracing: decouple from mac80211Johannes Berg1-3/+22
In order to be able to properly record SKBs that didn't come through mac80211, don't rely on the IEEE80211_TX_CTRL_PORT_CTRL_PROTO flag but instead check for ETH_P_PAE directly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: store cipher scheme independent of mac80211Johannes Berg4-19/+20
In order to reduce reliance on mac80211 structs in the core iwlwifi code, store the cipher schemes in the format given by the firmware and convert it later, rather than storing it in the mac80211 format. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: free RX reorder buffer on restartSara Sharon1-3/+4
Restart flow zeroes the rx_ba_sessions counter. Mac80211 asks driver to tear down of the session only afterwards, and as a result driver didn't free the data. Fix it. Signed-off-by: Sara Sharon <[email protected]> Fixes: 10b2b2019d81 ("iwlwifi: mvm: add infrastructure for tracking BA session in driver") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: add RX aggregation printsSara Sharon2-2/+11
Add some prints to track BAID assignment. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support dqa-mode scd queue redirectionLiad Kaufman1-5/+110
Make sure that in DQA mode, the SCD's configuration of a queue is redirected to the lower AC of the streams of the queue. Make sure that this queue is redirected to the lowest AC when adding a new RA/TID to an existing queue. If it isn't - redirect the queue. Also, as redirection revealed a bug in the marking of a shared queue, this patch contains a small fix to make sure a shared queue maintains the appropriate "shared queue marking". Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support tdls in dqa modeLiad Kaufman2-13/+26
Support TDLS when working in DQA mode. This is done mainly by NOT doing any special things for TDLS, as the queues are dynamically created anyway, so no need to allocate them ahead of time. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: don't use vid 0Sara Sharon1-4/+7
In cases of hardware or DMA error, the vid read from a zeroed location will be 0, and we will access the rxb at index 0 in the global table, while it may be NULL or owned by hardware. Invalidate vid 0 in order to detect the situation and bail out. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: unmap the paging memory before freeing itEmmanuel Grumbach1-4/+8
This led to a DMA splat. Fixes: a6c4fb4441f4 ("iwlwifi: mvm: Add FW paging mechanism for the UMAC on PCI") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: remove iwl_ht_params.smps_modeJohannes Berg2-8/+3
This struct member is never set, so remove it. Since this is the last thing that needs mac80211.h, also change the includes to no longer use mac80211.h Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix the channel inhibition table for Channel 14Emmanuel Grumbach1-1/+1
The value for Channel 14 was wrong. Fix it. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix coex related commentsEmmanuel Grumbach1-2/+2
Those comments were wrong, fix them. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: write the correct internal TXF indexGolan Ben-Ami1-1/+2
The TX fifos are arranged consecutively in the SMEM, beginning with the regular fifos, and tailed by the internal fifos. In the current code, while trying to read the internal fifos, we read the fifos beginning with the index zero. By doing this we actually re-read the regular fifos. In order to read the internal fifos, start the reading index from the number of regular fifos configured by the fw. Signed-off-by: Golan Ben-Ami <[email protected]> Fixes: 39654cb3a6a2 ("iwlwifi: don't access a nonexistent register upon assert") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: fix access to scratch bufferSara Sharon1-2/+2
This fixes a pretty ancient bug that hasn't manifested itself until now. The scratchbuf for command queue is allocated only for 32 slots but is accessed with the queue write pointer - which can be up to 256. Since the scratch buf size was 16 and there are up to 256 TFDs we never passed a page boundary when accessing the scratch buffer, but when attempting to increase the size of the scratch buffer a panic was quick to follow when trying to access the address resulted in a page boundary. Signed-off-by: Sara Sharon <[email protected]> Fixes: 38c0f334b359 ("iwlwifi: use coherent DMA memory for command header") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: Enable MSI mode when using MSI interruptsIdo Yariv2-1/+6
On some of the chipsets MSI & INTA interrupts are disabled by default in the HW registers, and need to be explicitly enabled to be used. In case MSI-X isn't used, make sure MSI mode is enabled by setting the relevant HW register. Signed-off-by: Ido Yariv <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: read SAR BIOS table from ACPILuca Coelho1-0/+173
Read the SAR BIOS table from the ACPI and parse it into the iwl_mvm_sar_table structure. If the table is enabled, send it to the firmware via REDUCE_TX_POWER_CMD. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: cleanup the coex codeEmmanuel Grumbach3-231/+0
We removed support for old API for coexistence, but we forgot to remove defines and variable that are not needed anymore. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: checksum IPv6 fragmented packetSara Sharon1-15/+6
Our HW does not support checksum of fragmented packets. Fix code accordingly to checksum those packets in the driver. Signed-off-by: Sara Sharon <[email protected]> Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlmvm: mvm: set correct state in smart-fifo configurationstriebit1-1/+1
Currently the state sent in SF configuration is always FULL_ON. This commit sets the correct state (e.g. INIT_OFF when station is not associated). Fixes: commit f4a3ee493e69 ("iwlwifi: mvm: Always enable the smart FIFO") Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: pcie: enable interrupts before releasing the NIC's CPUEmmanuel Grumbach1-1/+4
The NIC's CPU gets started after the firmware has been written to its memory. The first thing it does is to send an interrupt to let the driver know that it is running. In order to get that interrupt, the driver needs to make sure it is not masked. Of course, the interrupt needs to be enabled in the driver before the CPU starts to run. I mistakenly inversed those two steps leading to races which prevented the driver from getting the alive interrupt from the firmware. Fix that. Cc: <[email protected]> [4.5+] Fixes: a6bd005fe92 ("iwlwifi: pcie: fix RF-Kill vs. firmware load race") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: Add a000 HW family supportHaim Dreyfuss4-1/+136
Add a000 family configuration to iwl-cfg struct Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support new statistics notificationSara Sharon6-6/+56
For 9000 family we will get extended statistics notification with averaged data for RSSI, TCM and rogue AP detection. Support it. Future patches will added the required algorithms. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>