summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-john' of ↵John W. Linville2013-11-051-5/+4
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * iwlwifi: pcie: move warning message into warningJohannes Berg2013-10-291-5/+4
| | | | | | | | | | | | | | | | | | 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-042-5/+70
|\ \ | |/ |/| | | | | | | | | 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-181-5/+26
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
| | * iwlwifi: pcie: poke device when commands don't complete quicklyJohannes Berg2013-10-111-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-4/+4
| |/ | | | | | | | | | | | | | | 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-021-0/+10
| | | | | | | | | | | | | | | | 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-021-0/+32
| | | | | | | | | | | | | | | | | | 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-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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-111-4/+120
| | | | | | | | | | | | | | | | | | | | | | | | 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-111-1/+4
| | | | | | | | | | | | | | | | 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-111-4/+4
|\ \
| * | iwlwifi: pcie: fix merge damageJohannes Berg2013-10-021-4/+4
| |/ | | | | | | | | | | | | | | 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-111-1/+3
| | | | | | | | | | | | | | | | | | | | 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-021-3/+0
| | | | | | | | | | | | | | | | | | 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-021-0/+1
| | | | | | | | | | 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-021-0/+3
|/ | | | | | | | | | 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-281-8/+0
|\ | | | | | | | | | | | | | | 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-061-8/+0
| | | | | | | | | | | | | | | | | | | | | | 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-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | 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-164-52/+61
|\ \ | | | | | | | | | 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-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-16/+8
| | | | | | | | | | | | | | | | | | | | | 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-091-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-091-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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-093-39/+19
|\ \ \ | |/ / | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * | iwlwifi: remove transport suspend/resume indirectionJohannes Berg2013-08-062-32/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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-061-3/+3
| | | | | | | | | | | | | | | | | | | | | 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-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-093-0/+14
|\ \ \ | |/ / |/| / | |/ git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * iwlwifi: pcie: clear RFKILL interrupt in AMPGEmmanuel Grumbach2013-07-261-0/+8
| | | | | | | | | | | | | | | | | | 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-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | 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-221-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | iwlwifi: mvm: add high temperature SKU thermal throttling parametersEytan Lifshitz2013-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | When the NIC is expected to operate in high temperature, it is advisable to put more aggresive thermal throttling parameters, in order to prevent CT-kill. Signed-off-by: eytan lifshitz <eytan.lifshitz@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: pcie: make unused queue warning more readableJohannes Berg2013-07-161-3/+2
| | | | | | | | | | | | | | | | Use the return value of WARN_ONCE() and add a message with the queue ID that's getting used. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: pcie: don't disable L1 for newest NICsEmmanuel Grumbach2013-07-161-4/+10
| | | | | | | | | | | | | | | | In newest NICs (7000 family and up), L1 is supported, so avoid to disable it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* | iwlwifi: remove forward debugfs function declarationsJohannes Berg2013-07-161-14/+0
| | | | | | | | | | | | | | | | | | There's no need to have 'forward' debugfs function declarations as part of the macros because the macros are always used after the static functions are defined already, so remove them. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* | iwlwifi: move dump_fh into common codeInbal Hacohen2013-07-163-68/+2
|/ | | | | | | | | This means it can be shared for different transport layers in the future. Signed-off-by: Inbal Hacohen <Inbal.Hacohen@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* Merge remote-tracking branch 'wireless-next/master' into iwlwifi-nextJohannes Berg2013-06-251-0/+13
|\
| * Merge branch 'for-john' of ↵John W. Linville2013-06-181-0/+13
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
| | * iwlwifi: pcie: wake the queue if stopped when being unmappedEmmanuel Grumbach2013-06-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the queue is unmapped while it was so loaded that mac80211's was stopped, we need to wake the queue after having freed all the packets in the queue. Not doing so can result in weird stuff like: * run lots of traffic (mac80211's queue gets stopped) * RFKILL * de-assert RFKILL * no traffic 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: fix race in queue unmappingEmmanuel Grumbach2013-06-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a queue is disabled, it frees all its entries. Later, the op_mode might still get notifications from the firmware that triggers to free entries in the tx queue. The transport should be prepared for these races and know to ignore reclaim calls on queues that have been disabled and whose entries have been freed. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | iwlwifi: always use 'trans_pcie' nameJohannes Berg2013-06-251-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | A few places use 'pcie_trans' which is a bit non-standard, use 'trans_pcie' there as well. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | iwlwifi: always use 'rxq' as RX queue struct nameJohannes Berg2013-06-251-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | A few places use just 'q', use 'rxq' there like all other places. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | iwlwifi: pcie: rework RX buffer list init and freeingJohannes Berg2013-06-251-17/+26
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCIe code has an array of buffer descriptors (RXBs) that have pages and DMA mappings attached. In regular use, the array isn't used and the buffers are either on the hardware receive queue or the rx_free/rx_used lists for recycling. Occasionally, during module unload, we'd see a warning from this: WARNING: at lib/list_debug.c:32 __list_add+0x91/0xa0() list_add corruption. prev->next should be next (c31c98cc), but was c31c80bc. (prev=c31c80bc). Pid: 519, comm: rmmod Tainted: G W O 3.4.24-dev #3 Call Trace: [<c10335b2>] warn_slowpath_common+0x72/0xa0 [<c1033683>] warn_slowpath_fmt+0x33/0x40 [<c12e31d1>] __list_add+0x91/0xa0 [<fdf2083c>] iwl_pcie_rxq_free_rbs+0xcc/0xe0 [iwlwifi] [<fdf21b3f>] iwl_pcie_rx_free+0x3f/0x210 [iwlwifi] [<fdf2dd7a>] iwl_trans_pcie_free+0x2a/0x90 [iwlwifi] The reason for this seems to be that in iwl_pcie_rxq_free_rbs() we use the array to free all buffers (the hardware receive queue isn't in use any more at this point). The function also adds all buffers to rx_used because it's also used during initialisation (when no freeing happens.) This can cause the warning because it may add entries to the list that are already on it. Luckily, this is harmless because it can only happen when the entire data structure is freed anyway, since during init both lists are initialized from scratch. Disentangle this code and treat init and free separately. During init we just need to put them onto the list after freeing all buffers (for switching between 4k/8k buffers); during free no list manipulations are necessary at all. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: create opmode/device dependenciesJohannes Berg2013-06-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The older devices (pre-7000/3000 series) all only work with the DVM opmode due to firmware availability, while newer ones will only work with the MVM opmode for the same reason. When building a driver that only has one of MVM or DVM, there's no reason to build the device support and have the PCIe IDs for all devices since they can't be used anyway, so avoid that. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | iwlwifi: reduce debug ifdefs using the optimiserJohannes Berg2013-06-131-26/+10
| | | | | | | | | | | | | | | | | | | | | | Instead of using #ifdef CONFIG_IWLWIFI_DEBUG, remove the iwlwifi_mod_params.debug_level variable completely and make iwl_have_debug_level() always return false in the non-debug case. This way, the optimiser will elide all code for it automatically without having to add #ifdefs. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud