aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
Commit message (Collapse)AuthorAge
...
* | iwlwifi: pcie: track interrupt mask in SWEmmanuel Grumbach2013-12-17
| | | | | | | | | | | | | | | | | | | | | | | | Track the interrupt mask in software, making it exactly what is configured in the interrupt mask register in the hardware. This allows not to access the register from the interrupt handler. This was the case for ICT interrupt already, but not for non-ICT interrupt. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: pcie: clean up ICT allocation codeEmmanuel Grumbach2013-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since iwl_trans_pcie_alloc_ict is called in the PCIe allocation code, we always set CSR_INT_BIT_RX_PERIODIC. Move that bit to the default list of interrupts we enable and simplify the code. Also use dma_zalloc_ and avoid to memset the memory afterwards. trans_pcie->ict_index is 0 since trans_pcie has just been kzalloced, remove the redundant assignment. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: trans: clear FW_ERROR status in common codeArik Nemtsov2013-12-17
| | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | iwlwifi: pcie: remove minor dead codeMichal Nazarewicz2013-12-09
| | | | | | | | | | | | | | | | | | inta is checked to be zero in a IRQ_NONE branch so afterwards it cannot be zero as it is never modified. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> [reword the patch title and fix comment] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: mvm: a few more SKUs for 7260 and 3160Emmanuel Grumbach2013-12-09
| | | | | | | | | | | | | | These devices are not sold as discrete modules but are rather soldered down to the board. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: pcie: remove useless condition testJohannes Berg2013-12-09
| | | | | | | | | | | | | | | | | | | | After wait_event_timeout(), the condition must still be true if it returns >0, in fact almost the last thing in it is checking the condition again. It's therefore not useful to check yet again in our code, clean it up. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | iwlwifi: remove TX_CMD id from transport layerEmmanuel Grumbach2013-12-09
|/ | | | | | | | | | | The transport layer doesn't need to know the TX_CMD id. It can be set by the op_mode. The transport layer still needs to know the layout of the Tx command because of alignment issues and because of the scratch pointer. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: stop sending commands to dead firmwareAlexander Bondar2013-11-25
| | | | | | | | | | | If we call ieee80211_hw_restart, it means that the firmware is in bad condition and will be reset soon. Since the firmware will be reset, there is no good reason to keep sending host commands. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: add new HW - 7265 seriesOren Givon2013-11-25
| | | | | | | Add new HW IDs and configurations for 7265 series. Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160Emmanuel Grumbach2013-11-25
| | | | | | | | | | | | | | | | | | | | | | We changed the timeout for the interrupt coealescing for calibration, but that wasn't effective since we changed that value back before loading the firmware. Since calibrations are notification from firmware and not Rx packets, this doesn't change anyway - the firmware will fire an interrupt straight away regardless of the interrupt coalescing value. Also, a HW issue has been discovered in 7000 devices series. The work around is to disable the new interrupt coalescing timeout feature - do this by setting bit 31 in CSR_INT_COALESCING. This has been fixed in 7265 which means that we can't rely on the device family and must have a hint in the iwl_cfg structure. Cc: stable@vger.kernel.org [3.10+] Fixes: 99cd47142399 ("iwlwifi: add 7000 series device configuration") Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* Merge branch 'for-john' of ↵John W. Linville2013-11-05
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * iwlwifi: pcie: move warning message into warningJohannes Berg2013-10-29
| | | | | | | | | | | | | | | | | | Having a WARN_ON() followed by a printed message is less useful than having the message in the warning so move the message. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* | Merge branch 'master' of ↵John W. Linville2013-11-04
|\ \ | |/ |/| | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/pcie/drv.c
| * Merge branch 'for-john' of ↵John W. Linville2013-10-18
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
| | * iwlwifi: pcie: poke device when commands don't complete quicklyJohannes Berg2013-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain corner cases in the firmware implementation, powersave transitions can cause the firmware to miss the fact that commands were added to the queue/FIFO and thus never processes them. Since the commands really are in the queue, try to poke the firmware in such cases (by grabbing NIC access, which wakes up the NIC) so it notices the new command and processes it. Reviewed-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: fix merge damageJohannes Berg2013-10-07
| |/ | | | | | | | | | | | | | | The merge b35c8097 seems to have lost commit eabc4ac5d, put the code back. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * iwlwifi: pcie: add SKUs for 6000, 6005 and 6235 seriesEmmanuel Grumbach2013-10-02
| | | | | | | | | | | | | | | | Add some new PCI IDs to the table for 6000, 6005 and 6235 series. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * iwlwifi: pcie: add new SKUs for 7000 & 3160 NIC seriesMatti Gottlieb2013-10-02
| | | | | | | | | | | | | | | | | | Add some new PCI IDs to the table for 7000 & 3160 series Cc: stable@vger.kernel.org Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * iwlwifi: pcie: don't reset the TX queue counterEmmanuel Grumbach2013-10-02
| | | | | | | | | | | | | | | | | | | | | | | | A few NICs can get into trouble if we reset the TX queue counters in certain very rare situation. To be on the safe side, simply avoid to reset the TX queue counter. This is relevant for non-AMPDU queues only since on AMPDU we have no choice - we must start the TX queue at the right index. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: support Signed firmware image and Dual CPUsEran Harary2013-10-11
| | | | | | | | | | | | | | | | | | | | | | | | Support Signed firmware based on code signing system (CSS) protocol and dual CPUs download, the code recognize if there are more than one CPU and if we need to operate the signed protocol according to the ucode binary image Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: Support 7265 devicesEran Harary2013-10-11
| | | | | | | | | | | | | | | | 7265 is a very similar device to 7260, so just add the definitions based on 7260 for it. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge remote-tracking branch 'wireless-next/master' into HEADJohannes Berg2013-10-11
|\ \
| * | iwlwifi: pcie: fix merge damageJohannes Berg2013-10-02
| |/ | | | | | | | | | | | | | | The merge b35c8097 seems to have lost commit eabc4ac5d, put the code back. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: pcie: restart the driver when a command times outEmmanuel Grumbach2013-10-11
| | | | | | | | | | | | | | | | | | | | This should really not happen. If it does, restarting is the only way to recover since the driver and the firmware might very well be out of sync. Moreover, iwl_op_mode_nic_error will print data that might help debugging. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wireless: iwlwifi: remove unnecessary pci_set_drvdata()Jingoo Han2013-10-02
| | | | | | | | | | | | | | | | | | The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: pcie: dump_stack upon timeout of SYNC cmdEmmanuel Grumbach2013-10-02
| | | | | | | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: pcie: clean RFKILL interrupt in AMPGEmmanuel Grumbach2013-10-02
|/ | | | | | | | | | Newer firmware don't clean the RFKILL interrupt in APMG, do it in driver instead. If we forget to do so, we can't send HCMD to firmware while the NIC is in RFKILL state. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Merge branch 'master' of ↵John W. Linville2013-08-28
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c net/mac80211/ibss.c
| * Revert "iwlwifi: pcie: clear RFKILL interrupt in AMPG"Guy Cohen2013-08-06
| | | | | | | | | | | | | | | | | | | | | | This reverts commit a53ee0a308b16e392e0219c585b10f329345766b. This fix causes a worse HW Error when entering RF-Kill. Signed-off-by: Guy Cohen <guy.cohen@intel.com> Signed-off-by: Dor Shaish <dor.shaish@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * iwlwifi: pcie: disable L1 Active after pci_enable_deviceEmmanuel Grumbach2013-07-31
| | | | | | | | | | | | | | | | | | | | | | As Arjan pointed out, we mustn't do anything related to PCI configuration until the device is properly enabled with pci_enable_device(). Cc: stable@vger.kernel.org Reported-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'for-john' of ↵John W. Linville2013-08-16
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * | iwlwifi: return -ENOMEM instead of NULL when OOM in iwl_drv_start()Luciano Coelho2013-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of iwl_drv_start() are probe functions. If a probe function returns 0, it means it succeeded. So if NULL was returned by iwl_drv_start(), it would be considered as a success. Fix this by returning -ENOMEM if the driver struct allocation fails in iwl_drv_start(). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: returning positive instead of negativeDan Carpenter2013-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a missing '-' character here so we return positive 'ENOMEM' instead of negative. The caller doesn't care. All non-zero returns are translated to '-ENOMEM' in iwl_pcie_nic_init(). This is just a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: don't swallow error codes in iwl_trans_pcie_alloc()Luciano Coelho2013-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iwl_trans_pcie_alloc() function doesn't pass up error codes returned from functions it calls, swallowing them and returning NULL in all failure cases. The caller checks if the return value is NULL and returns -ENOMEM. This is not correct, because in certain cases the failure was not due to an OOM situation. To fix this, modify the iwl_trans_pcie_alloc() function to use ERR_PTR() to return error codes and clean up the error handling code a bit. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: Remove duplicate code from pcie irq handlersIdo Yariv2013-08-09
| | | | | | | | | | | | | | | | | | | | | Instead of having the same code sequentially, fall-through. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: Refactor iwl_rxq_spaceIdo Yariv2013-08-09
| | | | | | | | | | | | | | | | | | | | | | | | Simplify iwl_rxq_space to improve readability and reduce the ambiguity spares to a single element. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: Refactor iwl_queue_spaceIdo Yariv2013-08-09
| | | | | | | | | | | | | | | | | | | | | | | | Reduce the ambiguity spares to a single element if the window size is not smaller than the queue size. If smaller, no spares are required at all. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | Merge branch 'for-john' of ↵John W. Linville2013-08-09
|\| | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * | iwlwifi: remove transport suspend/resume indirectionJohannes Berg2013-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no reason for the transport to call itself through indirect function pointers, inline the (little) code there is and remove the indirection completely. Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: some little cleanupsEliad Peller2013-08-06
| | | | | | | | | | | | | | | | | | | | | | | | do some little cleanups in tx.c - eliminate duplicate checks, use locally cached fields and predefined macros. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: fix some documentation typosEliad Peller2013-08-06
| | | | | | | | | | | | | | | | | | | | | Fix some typos. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * | iwlwifi: pcie: fix resume when no opmode is presentJohannes Berg2013-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no opmode is present during suspend/resume (i.e. if the iwldvm or iwlmvm isn't loaded) the driver crashes during resume, trying to call the rfkill notification. Avoid that, and also don't enable the rfkill interrupt in this case (to avoid crashing trying to handle the interrupt later.) Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | Merge branch 'master' of ↵John W. Linville2013-08-09
|\ \ \ | |/ / |/| / | |/ git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * iwlwifi: pcie: clear RFKILL interrupt in AMPGEmmanuel Grumbach2013-07-26
| | | | | | | | | | | | | | | | | | If we forget to do so, we can't send HCMD to firmware while the NIC is in RFKILL state. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * iwlwifi: pcie: reset the NIC before the bring upEmmanuel Grumbach2013-07-26
| | | | | | | | | | | | | | | | | | | | | | This allows to clean all kinds of bad state it might be in. This solves situation where HW RFkill was switched while the NIC was offline. Until now, we relied on the firmware to do clean the interrupt, but new firmwares don't do that any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * iwlwifi: add DELL SKU for 5150 HMCEmmanuel Grumbach2013-07-22
| | | | | | | | | | | | | | | | | | | | This SKU was missing in the list of supported devices https://bugzilla.kernel.org/show_bug.cgi?id=60577 Cc: <stable@vger.kernel.org> [all versions] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>