summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: avoid read/write operations if the bus is deadEliad Peller2015-10-251-0/+2
| | | | | | | | | | Recovery takes too much time if the bus is dead (each timeout is 2000ms, etc.). Explicitly skip fw dump in this case, as it will result in garbage data (and might take signifcant time) Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: transport: track number of allocated queuesJohannes Berg2015-10-051-0/+5
| | | | | | | | | As the transport will decide how many queues (and MSI-X vectors) to allocate, add a field to indicate that to the op-mode so it can size/allocate its own data structures appropriately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
* iwlwifi: make sure d3_suspend/resume ops existEliad Peller2015-08-161-1/+5
| | | | | | | | | | | | | | We added calls to d3_suspend/resume trans ops during the suspend/resume flow. However, the wrapper code didn't verify the trans ops were actually defined, resulting in panic when they were not (such as in the case of sdio trans) Fixes: 6dfb36c89dc2 ("iwlwifi: call d3_suspend/resume in d0i3 case as well") Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: Add FW paging mechanism for the UMAC on SDIOMatti Gottlieb2015-08-041-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Family 8000 products has 2 embedded processors, the first known as LMAC (lower MAC) and implements the functionality from previous products, the second one is known as UMAC (upper MAC) and is used mainly for driver offloads as well as new features. The UMAC is typically “less” real-time than the LMAC and is used for higher level controls. The UMAC's code/data size is estimated to be in the mega-byte arena, taking into account the code it needs to replace in the driver and the set of new features. In order to allow the UMAC to execute code that is bigger than its code memory, we allow the UMAC embedded processor to page out code pages on DRAM. When the device is slave on the bus(SDIO) the driver saves the UMAC's image pages in blocks of 32K in the DRAM and sends the layout of the pages to the FW. When the FW wants load / unload pages, it creates an interrupt, and the driver uploads / downloads the page to an address in the a specific address on the device's memory. The driver can support up to 1 MB of pages. Add paging mechanism for the UMAC on SDIO in order to allow the program to use a larger virtual space while using less physical memory on the device itself. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add the ability to trigger only monitor dumpsOren Givon2015-08-041-3/+6
| | | | | | | | | | | | | Change the FW debug trigger tlv to include a monitor only option. Setting this option to true will cause fw dump triggers to only collect monitor data and skip other dumps such as SMEM, SRAM, CSR, PRPH, etc. This option is used when accessing the different parts of the firmware memory is not wanted and can cause unwanted behavior like when debugging TX latency. Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: support frag SKBsJohannes Berg2015-08-041-0/+7
| | | | | | | | | | | | | Allow frag SKBs in PCIe and advertise the maximum number of frags to the opmode. As a fallback. linearize the SKB if it exceeds the maximum number of fragments. This allows using the hardware better (filling more TBs) and should improve performance when used by the opmode. Also adjust tracing to be able to deal with this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add wide firmware command support for notificationsSara Sharon2015-08-041-0/+3
| | | | | | | | Add support for extended command id in notification system. Extended command id header contains group id in addition to command id. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: return error if d0i3 was abortedEliad Peller2015-08-041-4/+6
| | | | | | | | | Allow the transport layer to return an error upon suspend. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: move existing UMAC commands to group 1Johannes Berg2015-08-041-0/+5
| | | | | | | | | | | | | | | Existing UMAC commands already use the long header, but are sent with group 0 and the long header inserted manually. Move them to the group 1 to take advantage of the header building in the low- level transport. Existing firmware ignores the group_id field (it's reserved) and the first firmware that really supports long command headers can parse all commands in both group 0 (with short header) and group 1 (with long header.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add wide firmware command infrastructure for TXAviya Erenfeld2015-08-041-5/+61
| | | | | | | | | | | | | | | | | | | As the firmware is slowly running out of command IDs and grouping of commands is desirable anyway, the firmware is extending the command header from 4 bytes to 8 bytes to introduce a group (in place of the former flags field, since that's always 0 on commands and thus can be easily used to distinguish between the two. In order to support this most easily in the driver widen the command command ID used in the command sending functions and encode the new values (group and version) in the ID. That way existing code doesn't have to be changed (since the higher bits are 0 automatically) and newer code can easily use the new ID generation function to create a value to use in place of just the command ID. Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove command header flags fieldJohannes Berg2015-08-041-5/+1
| | | | | | | | | | | | The 'flags' field really has been reserved in the firmware API for a very long time, probably since 4965. As a consequence, the field is always 0 and checking for a IWL_CMD_FAILED_MSK flag makes no sense. Rename the field to 'reserved', get rid of IWL_CMD_FAILED_MSK and all the code for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove command and return value from opmode RXJohannes Berg2015-08-041-3/+0
| | | | | | | | | With the previous patch series, no opmode continues using the command or handler_status (i.e. the return value from the RX) so it can be removed now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: re-enable interrupts on resumeEliad Peller2015-06-031-0/+2
| | | | | | | | | | On resume, all the interrupts are masked (CSR_INT_MASK is 0), and ict is disabled. Re-configure them both. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: refactor common transport alloc/init codeJohannes Berg2015-05-281-10/+10
| | | | | | | | | The transport modules all need to allocate memory and set up certain values. Refactor that code into a new common function to share it and to simplify the error handling. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: don't power off the device between INIT and OPER firmwaresEran Harary2015-04-281-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our device needs two different firmwares: the INIT firmware and the operational (OPER) firmware. The first one is run when the driver loads and it returns calibrations results as well as the NVM. The second one implements the WiFi protocol. If the wlan interface is not brought up, the device is put to low power state: no firmware will be running. When the interface is brought up, we would run the OPER firmware only and reuse the results of the run of the INIT firmware when the driver was loaded. This is changing with this patch. We now run the INIT firmware every time mac80211 calls start(). The penalty for that is minimal since the INIT firwmare run fast. I now also avoid to power down the device between the INIT and OPER firmware on certains buses. The motivation for this change is that there are components on the device (MFUART) that are triggered by the INIT firmware and need the device to be powered up in order to keep running. Powering the device down between the INIT and OPER firmware would stop these components and prevent them from running again since they are triggered by the INIT firmware only. The new flow allows this and also allows to trigger these components again when the interface is brought up after it has been brought down. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: fix spelling errorsSara Sharon2015-04-021-6/+6
| | | | | | | | | Fix spelling error across the driver. Modified only comments and prints. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: allow the op_mode to freeze the stuck queue timerEmmanuel Grumbach2015-03-121-0/+15
| | | | | | | | | | | | | | | | | | | | | This allows the op_mode to let the transport know that a queue is currently frozen and that its timer should be stopped. When the queue is unfrozen, its timer should be set to expire after the remainder of the timeout has elapsed. This can be used when stations go to sleep. When a station goes to sleep, the op_mode can freeze the timer so that the queue will never be considered as stuck. When the station wakes up, the queue will be unfrozen. This is meant to avoid false positives that would happen if a buggy station goes to sleep for a very long time. In case we have a dedicated queue for this station (BA agreement) and it goes to sleep for a very long time, the queue would rightfully be stopped during all that time. In this case, the stuck queue timer could fire and that would be a false positive. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: add framework for triggers for fw dumpEmmanuel Grumbach2015-03-021-1/+3
| | | | | | | | | | | | | | | | | | | Most of the time, the issues we want to debug with the firmware dump mechanism are transient. It is then very hard to stop the recording on time and get meaningful data. In order to solve this, I add here an infrastucture of triggers. The user will supply a list of triggers that will start / stop the recording. We have two types of triggers: start and stop. Start triggers can start a specific configuration. The stop triggers will be able to kick the collection of the data with the currently running configuration. These triggers are given to the driver by the .ucode file - just like the configuration. In the next patches, I'll add triggers in the code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: allow to define the stuck queue timer per queueEmmanuel Grumbach2015-02-011-13/+16
| | | | | | | | | | | | | Different queue can have different behavior. While it can be unacceptable for a certain queue to be stuck for 2 seconds (e.g. the command queue), it can happen that another queue will stay stuck for even longer (a queue servicing a power saving client in GO). The op_mode can even make the timeout be a function of the listen interval. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: tlv: add support for IWL_UCODE_TLV_SDIO_ADMA_ADDR TLVLiad Kaufman2014-12-281-0/+4
| | | | | | | | | | | | | | | | A new TLV supplies the ADMA address for SDIO mode, allowing the driver to configure the default base address to be this (as given in the FW), rather than hardcoding the values to use until the FW sends the ALIVE message. Use the value given by the FW in the IWL_UCODE_TLV_SDIO_ADMA_ADDR TLV for setting the default SDTM base address until the FW sends the ALIVE message. If it isn't given in the FW - use the current hardcoded values. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: support multiple d0i3 modesEliad Peller2014-12-281-0/+17
| | | | | | | | | | | | | Allow configuring additional d0i3 mode, in which the fw will be configured to enter d0i3 only on suspend (while keeping the wake_lock accounting as usual) The d0i3 mode to use will be determined by the underlying trans layer. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: config regs according to fw tlvLiad Kaufman2014-12-021-0/+7
| | | | | | | | | | | Sometimes there is a need to configure some registers for setting some FW properties, such as the FW monitor mode (internal/external). This patch supports setting this for PCIe mode. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: add suspend/resume opsEliad Peller2014-11-241-0/+14
| | | | | | | | | Add suspend/resume trans ops that will be called from mac80211's suspend/resume ops. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: port to devcoredump frameworkJohannes Berg2014-10-291-4/+0
| | | | | | | | | | | iwlwifi features a debug mechanism that allows to dump binary data which is helpful to debug the firmware. Until now, this data was made available for the userspace through debugfs. For this exact purpose, devcoredump was created. Move to the new infrastructure. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: configure the LTREmmanuel Grumbach2014-10-231-0/+2
| | | | | | | | | | | The LTR is the handshake between the device and the root complex about the latency allowed when the bus exits power save. This configuration was missing and this led to high latency in the link power up. The end user could experience high latency in the network because of this. Cc: <stable@vger.kernel.org> [3.10+] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm: remove unused static inline functionAvri Altman2014-09-141-6/+0
| | | | | | Signed-off-by: Avri Altman <avri.altman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: don't configure the set_active in SCD for dvmEmmanuel Grumbach2014-09-141-0/+2
| | | | | | | | This configuration is not needed for dvm, and it actually broke it. Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add Intel Mobile Communications copyrightJohannes Berg2014-09-031-0/+2
| | | | | | | | | | | | Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: make aggregation explicit for TX queue handlingJohannes Berg2014-09-031-0/+3
| | | | | | | | | | Currently a valid sta_id is assumed to mean that the queue is meant to also be aggregated, but that assumption will not be true in the future, so don't make it in the lower level but only in the inline wrapper. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: allow skipping scheduler hardware configJohannes Berg2014-09-031-12/+35
| | | | | | | | | | In a later patch, the hardware configuration will be moved to firmware. Prepare for this by allowing hardware configuration in the transport to be skipped by not passing a configuration on enable and passing configure_scd=false on disable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: refactor txq_enable argumentsJohannes Berg2014-09-031-4/+17
| | | | | | | | | | Instead of having all arguments passed to the function, add a struct to hold them and only pass some directly. This will make future work in this area cleaner. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: split fw-error-dump between transport and mvmEmmanuel Grumbach2014-07-221-9/+12
| | | | | | | | | | | The mvm op_mode won't allocate the buffer for the transport any more. The transport allocates its own buffer and mvm is in charge of splicing the buffers in the debugfs hook. This makes the repartition easier to handle. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: allow dynamic configuration of internal memoryEran Harary2014-05-141-0/+13
| | | | | | | | | New transport need to configure internal memory based on the data in the (enlarged) alive notification from the firmware. Add a transport API for this. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: remove CMD_SYNCEmmanuel Grumbach2014-05-131-5/+3
| | | | | | | | | CMD_SYNC is really 0 which is confusing: if (cmd.flags & CMD_SYNC) is always false. Fix this by simply removing its definition. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add missing trailing newlines to debug messagesJohannes Berg2014-05-111-5/+5
| | | | | | | | | All messages should have a trailing newline, add all the missing ones. Also make all messages constants, replacing the single one that pointlessly used a variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: mvm/pcie: capture last commands on firmware errorJohannes Berg2014-05-061-0/+19
| | | | | | | | When a firmware error occurs, capture the last 32 commands (which are still in memory) in the error dump debugfs file. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: allow to wait for a subset of the queuesEmmanuel Grumbach2014-04-131-5/+5
| | | | | | | | This will be used later to flush / wait for queues that are related to a specific vif. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: make various things constJohannes Berg2014-02-131-1/+1
| | | | | | | | | | There are a number of things in the .data section that should really be in .rodata, for example all ops structs and strings. Mark everything const that can be, leaving the .data section pretty much empty. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add very first D0i3 supportArik Nemtsov2014-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the bus is in D0i3, we can't send regular commands to the firmware. This means that we need to add a state to remember what is our d0i3 state and make sure that only d0i3 exit commands can be sent. Add flags to CMD_ flags and transport status for this purpose. Commands with CMD_HIGH_PRIO set are queued at the head of the command queue, behind other high priority commands. Commands with CMD_SEND_IN_IDLE set can be sent while the transport is idle (without taking rpm reference). Commands with CMD_MAKE_TRANS_IDLE set indicate that command completion should mark the transport as idle (and release the bus). Commands with CMD_WAKE_UP_TRANS set instruct the transport to exit from idle when this command is completed. The transport is marked as idle (STATUS_TRANS_IDLE) when the FW enters D0i3 state. This bit is cleared when it enters D0 state again. Process only commands with CMD_SEND_IN_IDLE flag while the transport is idle. Other enqueued commands will be processed only later, right after exiting D0i3. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add D0i3 references boiler plateEliad Peller2014-02-031-0/+19
| | | | | | | | | | | | | | | | | | | | | D0i3 is bus power saving feature. It involves the firmware - the driver needs to send a list of commands to the firmware before entering this state. Wake up from d0i3 also requires a few commands to the firmware. The trigger to enter D0i3 is an idle timeout that will be implemented later and will most probably rely on RUNTIME_PM infrastructure. In order to prevent entrance to D0i3 in critical flows, we implement here a reference infrastructure. When a ref is taken, we can't enter D0i3. PCIe does't support D0i3. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: retrieve and parse ACPI power limitationsIdo Yariv2014-02-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms may have power limitations on PCIe cards connected to specific root ports. This information is encoded as part of the ACPI tables, for instance: <snip> Name (SPLX, Package (0x02) { Zero, Package (0x03) { 0x07, 0x00000500, 0x80000000 } }) Method (SPLC, 0, Serialized) { Return (SPLX) } </snip> The structure returned contains the domain type, the default power limitation and the default time window (reserved for future use). Upon PCI probing, call the relevant ACPI method, parse the returned structure, and save the power limitation. Signed-off-by: Ido Yariv <idox.yariv@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add inline helper for packet lengthsJohannes Berg2014-01-131-0/+10
| | | | | | | | | | | | | Add an inline helper function for getting an RX packet's length or payload length and use it throughout the code (most of which I did using an spatch.) While at it, adjust some code, and remove a bogus comment from the dvm calibration code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: Update Copyright to 2014Emmanuel Grumbach2013-12-311-2/+2
| | | | | | Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: allow the op_mode to call stop_device whenever it wantsEmmanuel Grumbach2013-12-311-3/+4
| | | | | | | | | | | | Calling stop_device when start_fw wasn't called would issue: Stopping tx queues that aren't allocated... Also allow the op_mode to call stop_device and then to disable the Tx queues - in that case just silently ignore the disabling on the Tx queues, since the PRPH registers aren't reachable any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: turn set_pmi into an optional callbackArik Nemtsov2013-12-171-1/+2
| | | | | | | | It is not currently implemented for SDIO, and not required for other slave buses as well. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: clear FW_ERROR status in common codeArik Nemtsov2013-12-171-0/+1
| | | | | | | | | | | Clear the FW_ERROR status before the common start_fw transport code. Remove the transport specific clears. After these patches the FW_ERROR flag is only set and cleared by common transport code. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: prevent reprobe on repeated FW errors before restartArik Nemtsov2013-12-171-0/+11
| | | | | | | | | | | | | | In case a sync command timeouts or Tx is stuck while a FW error interrupt arrives, we might call iwl_op_mode_nic_error twice before a restart has been initiated. This will cause a reprobe. Unify calls to this function at the transport level and only call it on the first FW error in a given by checking the transport FW error flag. While at it, remove the privately defined iwl_nic_error from PCIE code and use the common callback instead. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: prevent tx and cmds during FW errorArik Nemtsov2013-12-171-0/+6
| | | | | | | | | | | Stop Tx and commands from arriving to the transport layer when a FW error has occurred. A HW recovery should take place before. Remove transport specific checks of the same nature (note that not all transports were protected). Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: use a unified transport statusArik Nemtsov2013-12-171-0/+20
| | | | | | | | | | The same bits are employed in all transport layers. Put the status field in the common transport layer. This allows us to employ them in common transport code. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: trans: divide stop_hw into stop_device/op_mode_leaveArik Nemtsov2013-12-171-13/+12
| | | | | | | | | | | | | | | | The stop_hw trans callback is not well defined. It is missing in many cleanup flows and the division of labor between stop_device/stop_hw is cumbersome. Remove stop_hw and use stop_device to perform both. Implement this for all current transports. PCIE needs some extra configuration the op-mode is leaving to configure RF kill. Expose this explicitly as a new op_mode_leave trans callback. Take the call to stop_device outside iwl_run_mvm_init_ucode, this makes more sense and WARN when we want to run the INIT firmware while it has run already. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
OpenPOWER on IntegriCloud