summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
Commit message (Collapse)AuthorAge
* iwlwifi: avoid duplicate sw reset executions in the codeGolan Ben Ami2017-12-20
| | | | | | | | | | | Most of the sw resets in the code are done by one function, which writes to the relevant CSR. Use the common function to perform the only reset which was done separately, redundant to the common code. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: support internal debug data collection for new devicesGolan Ben Ami2017-12-20
| | | | | | | | | | | Support internal debug data collection on 9000 and newer devices. The method for finding the base and end address has changed on new HW's, so introduce a new version of debug destination tlv. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* Merge tag 'wireless-drivers-next-for-davem-2017-12-18' of ↵David S. Miller2017-12-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next The drivers/net/wireless/intel/iwlwifi/pcie/drv.c conflict was resolved using a diff provided by Kalle in his pull request. Kalle Valo says: ==================== wireless-drivers-next patches for 4.16 A bigger pull request this time, the most visible change being the new driver mt76. But there's also Kconfig refactoring in ath9k and ath10k, work beginning in iwlwifi to have rate scaling in firmware/hardware, wcn3990 support getting closer in ath10k and lots of smaller changes. mt76 * a new driver for MT76x2e, a 2x2 PCIe 802.11ac chipset by MediaTek ath10k * enable multiqueue support for all hw using mac80211 wake_tx_queue op * new Kconfig option ATH10K_SPECTRAL to save RAM * show tx stats on QCA9880 * new qcom,ath10k-calibration-variant DT entry * WMI layer support for wcn3990 ath9k * new Kconfig option ATH9K_COMMON_SPECTRAL to save RAM wcn36xx * hardware scan offload support wil6210 * run-time PM support when interface is down iwlwifi * initial work for rate-scaling offload * Support for new FW API version 36 * Rename the temporary hw name A000 to 22000 ssb * make SSB a menuconfig to ease disabling it all mwl8k * enable non-DFS 5G channels 149-165 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * iwlwifi: rename the temporary name of A000 to the official 22000Luca Coelho2017-11-28
| | | | | | | | | | | | | | | | The family name A000 was just a place-holder when we didn't know what the official name would be yet. Now we know that the family name is 22000, so rename all occurrences accordingly. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* | iwlwifi: mvm: enable RX offloading with TKIP and WEPDavid Spinadel2017-12-05
|/ | | | | | | | | | Set the flag that indicates that ICV was stripped on if this option was enabled in the HW. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: Add more call-sites for pcie reg dumperKirtika Ruchandani2017-11-03
| | | | | | | | | | | | | | Commit a6d24fad00d9 ("iwlwifi: pcie: dump registers when HW becomes inaccessible") added a function to dump pcie config registers and memory mapped registers on a failure. It is currently only accessible within trans.c. Add it to struct iwl_trans_ops, so that failure cases in other files can call it. While there, add a call to this function from iwl_pcie_load_firmware_chunk in pcie/tx.c, since this is a common failure case seen on some platforms. Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org> [modified the commit message slightly] Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove host assisted pagingEmmanuel Grumbach2017-11-03
| | | | | | | | | This was used for internal devices that are now deprecated. All the currently existing devices can do paging without any help from the host. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove dead code for internal devices onlyEmmanuel Grumbach2017-11-03
| | | | | | | | | We had a bunch of code that was relevant for internal devices only. Those devices are now being depreceated. Kill all the now unneeded code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove dflt_pwr_limit from the transportLuca Coelho2017-10-06
| | | | | | | | | | | | | The default power limit read from the SPLC method in ACPI doesn't have anything to do with the transport and is only used in the opmode, so we can remove it from the trans. Additionally, this value is only user when the opmode is starting, so we don't need to store it anywhere. Remove the dflt_pwr_limit element from the trans and move call to iwl_acpi_get_pwr_limit() call to mvm. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: trans: move ref/unref code to the common part of the transportLuca Coelho2017-10-06
| | | | | | | De-inline iwl_trans_ref/unref and move it to common transport code in preparation for more common code to come to these functions. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: reorganize firmware APIJohannes Berg2017-08-01
| | | | | | | | | | | | | | Apart from DVM, all firmware uses the same base API, and there's code outside iwlmvm that needs to interact with it. Reflect this in the source better and reorganize the firmware API to a new fw/api/ directory. While at it, split the already pretty large fw-api.h file into a number of smaller files, going from almost 3k lines in there to a maximum number of lines less than 1k. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: create new subdirectory for FW interactionJohannes Berg2017-06-29
| | | | | | | | | | There's a lot of mvm code that really should be more generic and part of the iwlwifi module. Start by making a place to keep such code - in the new "fw" subdirectory - and already move the firmware related header files there. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add a W/A for a scheduler hardware bugEmmanuel Grumbach2017-06-23
| | | | | | | | | | | | | | | | | | | | | | | | In case we need to move the scheduler write pointer by steps of 0x40, 0x80 or 0xc0, the scheduler gets stuck. This leads to hardware error interrupts with status: 0x5A5A5A5A or alike. In order to work around this, detect in the transport layer that we are going to hit this case and tell iwlmvm to increment the sequence number of the packets. This allows to keep the requirement that the WiFi sequence number is in sync with the index in the scheduler Tx queue and it also allows to avoid the problematic sequence. This means that from time to time, we will start a queue from ssn + 1, but that shouldn't be a problem since we don't switch to new queues for AMPDU now that we have DQA which allows to keep the same queue while toggling the AMPDU state. This bug has been fixed on 9000 devices and up. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: don't report RF-kill enabled while shutting downJohannes Berg2017-06-23
| | | | | | | | | | | | | | | | | | | | | | When toggling the RF-kill pin quickly in succession, the driver can get rather confused because it might be in the process of shutting down, expecting all commands to go through quickly due to rfkill, but the transport already thinks the device is accessible again, even though it previously shut it down. This leads to bugs, and I even observed a kernel panic. Avoid this by making the PCIe code only report that the radio is enabled again after the higher layers actually decided to shut it off. This also pulls out this common RF-kill checking code into a common function called by both transport generations and also moves it to the direct method - in the internal helper we don't really care about the RF-kill status anymore since we won't report it up until the stop anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove unnecessary code in iwl_trans_alloc_tx_cmdLuca Coelho2017-06-05
| | | | | | | | When we removed dev_cmd_headroom, the check for dev_cmd_ptr == NULL became unnecessary, since we just return dev_cmd_ptr anyway. Cleanup the function to avoid useless code. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: split firmware API from iwl-trans.hJohannes Berg2017-06-05
| | | | | | | | | In order to more clearly document which parts of this file are firmware API and which are something else, split the firmware API into a separate file to include here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: fix a kernel-doc tagJohannes Berg2017-06-05
| | | | | | | | The kernel-doc here is on an enum, so don't tag it as struct but correctly as enum instead, preventing an error. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: add wait for tx queue emptySara Sharon2017-06-02
| | | | | | | | | | Now that we have 512 queues, add a wait for single TX queue to gen2. This replaces gen1 wait_tx_queues_empty, which was limited to 32 queues. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: rename wait_for_tx_queues_emptySara Sharon2017-04-25
| | | | | | | | | | Rename current wait_tx_queue_empty to wait_tx_queues_empty since it waits for multiple queues (up to 32). Next patch will add a wait for single TX queue which is needed for gen2 to be scalable for 512. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: move to 512 queuesSara Sharon2017-04-25
| | | | | | | | Avoid using the old define since it will enlarge necessary structs for previous HW. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: move to TVQM modeSara Sharon2017-04-19
| | | | | | | | | | | | In TVQM firmware returns the value of the queue ID and code should accept it. The TX queue config API was changed. Move to new API. This has to be done in parallel in mvm and pcie. Do not move yet to 512 queues since there are some opens with enabling it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support moving to mgmt tidSara Sharon2017-04-19
| | | | | | | | | | For a000 FW moved to 15 as management TID. The change for us is fairly local - translate old TID to 15 when enabling and disabling a queue, and make sure to cover it also on TX responses. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: introduce a000 TX queues managementSara Sharon2017-04-19
| | | | | | | | | | | | | | | | | | In a000 devices the TX handling is different in a few ways: * Queues are allocated dynamically * DQA is enabled by default * Driver shouldn't access TFH registers - ucode configures it all in SCD_QUEUE_CFG command Support all this in a new API with op mode, where op mode sends the command, transport will allocate the queue dynamically, fill in DMA properties, send the command to FW and get the ID back. Current implementation only sets the new transport API and fills the DMA properties. Future patches will complete the other parts. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: remove unnecessary dev_cmd_headroom parameterLuca Coelho2017-04-11
| | | | | | | We don't need this parameter anymore, since we always pass 0 anyway. Remove it from the structure and from all the relevant functions. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* Revert "iwlwifi: introduce trans API to get byte count table"Sara Sharon2017-04-11
| | | | | | | | | This reverts commit 8aacf4b73fe8 ("iwlwifi: introduce trans API to get byte count table"). The commit is not needed as a better approach will be taken. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: move to wide ID for all commandsSara Sharon2016-09-19
| | | | | | | | Due to firmware design considerations, move to wide ID for all commands. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: introduce trans API to get byte count tableSara Sharon2016-09-16
| | | | | | | | | In future HW the byte count table address will be configured by ucode per queue. Add API to expose the byte count table to the opmode Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: introduce new tfd and tb formatsSara Sharon2016-09-15
| | | | | | | | | | | New hardware supports bigger TFDs and TBs. Introduce the new formats and adjust defines and code relying on old format. Changing the actual TFD allocation is trickier and deferred to the next patch. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: move iwl_drv to be shared across transportsSara Sharon2016-07-06
| | | | | | | | | 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 <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: decouple PCIe transport from mac80211Johannes Berg2016-07-06
| | | | | | | | | | | | | | | | | 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 <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: support dqa queue sharingLiad Kaufman2016-07-06
| | | | | | | | | | | | | | | | | | | | | | | Support DQA queue sharing when no free queue exists for allocation to a STA that already exists. This means that a single queue will serve more than a single TID (although the RA will be the same for all TIDs served). We try to choose the lowest AC possible, to ensure the shared queues have the lowest possible combined AC requirements. The queue to share is chosen only from the same RA's DATA queues as follows (in descending priority): 1. An AC_BE queue 2. Same AC queue 3. Highest AC queue that is lower than new AC 4. Any existing AC (there always is at least 1 DATA queue) If any aggregations existed for any of the TIDs of the shared queue - they are stopped (the FW is notified), but no delBA is sent. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: pcie: make sure packet arrived to destined queueSara Sharon2016-07-01
| | | | | | | | Add a warning in case packet didn't end up in the HW destined queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: mvm: update mpdu metadata APISara Sharon2016-07-01
| | | | | | | | | | | rx_phy notification is no longer sent in devices with multiple rx queues. All the needed data is now set in the metadata - update code accordingly to reflect all the features as in the previous RX path. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: allow combining different phy images with mac imagesHaim Dreyfuss2016-05-10
| | | | | | | | | | Currently there is one to one function between device id to it's ucode. The new generation devices allows to combine different phy and mac images. Now we have two different ucode images with the same device id. Read RF ID to identify phy image and overwrite it if needed. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: trans: fix iwl_trans_txq_scd_cfg.sta_id signLiad Kaufman2016-03-30
| | | | | | | | For some reason, this was defined as a signed variable. Make it unsigned. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: add pm_prepare and pm_complete opsLuca Coelho2016-02-27
| | | | | | | | With these ops, we can know when we are about to enter system suspend. This allows us to exit D0i3 state before entering suspend. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: various comments and code cleanupsEmmanuel Grumbach2016-02-01
| | | | | | | | No need to include net/ip6_checksum.h twice. Remove TODOs. Remove trailing space. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: Do not switch to D3 image on suspendMatti Gottlieb2016-02-01
| | | | | | | | | | | | | | | | Currently when the driver is configured with wowlan parameters, and enters D3 mode, the driver switches the FW image to D3, and when it exists suspend, it reloads the D0 image. If the firmware supports the consolidation of the D0 & D3 images there is no need to load the D3 image on suspend, and no need to reload the D0 image on resume. Do not switch images on suspend / resume, for firmwares that support consolidated images. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: add RTPM support when wifi is enabledLuciano Coelho2016-02-01
| | | | | | | | | | | | Enable runtime power management (RTPM) for PCIe devices and implement the corresponding functions to enable D0i3 mode when the device is idle. Additionally, remove some unnecessary #ifdef's because the RTPM code will not be called if runtime PM is not configured. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: constify the parameters of a few functions in fw-dbg.cEmmanuel Grumbach2016-01-07
| | | | | | | | The debug functions of fw-dbg.c don't really need to modify the trigger and the description they receive as a parameter. Constify the pointers. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: bail out in case of bad trans stateEliad Peller2015-12-21
| | | | | | | | | | | | In case of bad trans state (i.e. fw is not loaded) bail out immediately instead of calling the trans, which might not be fully initialized yet. Also add WARN_ON_ONCE to help debugging where the errorneous call is coming from. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove unused parameter from grab_nic_accessEmmanuel Grumbach2015-12-21
| | | | | | All the callers used silent = false. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: build an A-MSDU using TSO coreEmmanuel Grumbach2015-12-20
| | | | | | | | | | | | | | | | | | | | | | | | When the op_mode sends an skb whose payload is bigger than MSS, PCIe will create an A-MSDU out of it. PCIe assumes that the skb that is coming from the op_mode can fit in one A-MSDU. It is the op_mode's responsibility to make sure that this guarantee holds. Additional headers need to be built for the subframes. The TSO core code takes care of the IP / TCP headers and the driver takes care of the 802.11 subframe headers. These headers are stored on a per-cpu page that is re-used for all the packets handled on that same CPU. Each skb holds a reference to that page and releases the page when it is reclaimed. When the page gets full, it is released and a new one is allocated. Since any SKB that doesn't go through the fast-xmit path of mac80211 will be segmented, we can assume here that the packet is not WEP / TKIP and has a proper SNAP header. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: clear ieee80211_tx_info->driver_data in the op_modeEmmanuel Grumbach2015-12-20
| | | | | | | | The transport will need to use the info->driver_data pointers. Since the op_mode has this memory hot in cache, clear it there. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: allow to pretend to have Tx CSUM for debugEmmanuel Grumbach2015-12-20
| | | | | | | | | | Allow to configure the driver to pretend to have TX CSUM offload support. This will be useful to test the TSO flows that will come in further patches. This configuration is disabled by default. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: change the Intel Wireless email addressEmmanuel Grumbach2015-12-20
| | | | | | | ilw@linux.intel.com is not available anymore. linuxwifi@intel.com should be used instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variablesLuca Coelho2015-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The d0i3_mode variable is used to distinguish between transports that handle d0i3 entry during suspend by themselves (i.e. the slave transports) and those which rely on the op_mode layer to do it. The reason why the former do it by themselves is that they need to transition from d0i3 in runtime_suspend into d0i3 in system-wide suspend and this transition needs to happen before the op_mode's suspend flow is called. The wowlan_d0i3 element is also a bit confusing, because it just reflects the wowlan->any value for the trans to understand. This is a bit unclear in the code and not generic enough for future use. To make it clearer and to generalize the platform power mode settings, introduce two variables to indicate the platform power management modes used by the transport. Additionally, in order not to take too big a step in one patch, treat this new variables semantically in the same way as the old d0i3_mode element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to help with that. This commit also adds the foundation for a new concept where the firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from the platform PM mode we are in (i.e. runtime suspend or system-wide suspend). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: update host command messages to new formatSharon Dvir2015-12-13
| | | | | | | Host commands now have a group id, express this in printed messages. Signed-off-by: Sharon Dvir <sharon.dvir@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: uninline iwl_trans_send_cmdEmmanuel Grumbach2015-12-13
| | | | | | This function got too big to be inlined. Uninline it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: support a callback for ASYNC commandsEmmanuel Grumbach2015-12-13
| | | | | | | | | | This allows the op_mode to request from the transport to call a callback when an ASYNC commands is completed by the firmware. The same callback will be called for all the commands. Pass the command whose response triggers the callback as a parameter to the callback itself. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>