summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-fh.h
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: pcie: New RBD allocation modelSara Sharon2015-08-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a preperation for multiple RX queues change the RBD allocation model. The new model includes a background allocator. The allocator is called by the interrupt handler when there are two released buffers by the queue, and the allocator starts allocating eight pages per request. When the queue has released 8 pages it tries claiming the request. If the pages are not ready - it keeps claiming. This new model should make sure that RBDs are always available across the multiple queues. The RBDs are transferred between the allocator and the queue. The queue moves the free RBDs upon freeing them to the allocator. The allocator moves them back to the queue's possession when the request is claimed. The allocator has an initial pool to make sure there are always RBDs available for the request completion. Release of the buffers at exit is done per pools - the allocator frees its own initial pool and the queue frees its own pool. Existing code refactor - -Queue's initial pool is the size of the queue only as the allocation of the new buffers no longer uses this pool. -Removal of replenish background work, and replenish calls in the interrupt handler and restock(). -The replenish() and the rxq used_list are used only during initialization. -Moved page allocation to a new function for code reuse. New code - Allocator code - new structure and functions. Interrupt handler uses the allocator functions for replenishing buffers. Reuse of the restock() method. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* Revert "iwlwifi: pcie: New RBD allocation model"Emmanuel Grumbach2015-07-121-0/+6
| | | | | | | | | | This reverts commit 5f17570354f91275b0a37a4da33d29a2ab57d32e. This patch introduced a high latency in buffer allocation under extreme load. This latency caused a firmwre crash. The same scenario works fine with this patch reverted. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: pcie: New RBD allocation modelSara Sharon2015-06-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a preperation for multiple RX queues change the RBD allocation model. The new model includes a background allocator. The allocator is called by the interrupt handler when there are two released buffers by the queue, and the allocator starts allocating eight pages per request. When the queue has released 8 pages it tries claiming the request. If the pages are not ready - it keeps claiming. This new model should make sure that RBDs are always available across the multiple queues. The RBDs are transferred between the allocator and the queue. The queue moves the free RBDs upon freeing them to the allocator. The allocator moves them back to the queue's possession when the request is claimed. The allocator has an initial pool to make sure there are always RBDs available for the request completion. Release of the buffers at exit is done per pools - the allocator frees its own initial pool and the queue frees its own pool. Existing code refactor - -Queue's initial pool is the size of the queue only as the allocation of the new buffers no longer uses this pool. -Removal of replenish background work, and replenish calls in the interrupt handler and restock(). -The replenish() and the rxq used_list are used only during initialization. -Moved page allocation to a new function for code reuse. New code - Allocator code - new structure and functions. Interrupt handler uses the allocator functions for replenishing buffers. Reuse of the restock() method. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: fix spelling errorsSara Sharon2015-04-021-1/+1
| | | | | | | | | 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: limit fw chunk sizes given to fhLiad Kaufman2014-12-141-0/+1
| | | | | | | | | | New FW has chunks that are larger than the size limit of the FH's DMA. To make sure we don't crash it - actively limit the max size of each chunk. 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: Update Copyright to 2014Emmanuel Grumbach2013-12-311-2/+2
| | | | | | Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
* iwlwifi: a few fixes in licenseEmmanuel Grumbach2013-03-061-1/+1
| | | | | | | | | | 7000.c was released as GPL only by mistake: it should be dual licensed - GPL / BSD. The file that contains the license in the kernel is COPYING and not LICENSE.GPL. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: add 7000 series device configurationJohannes Berg2013-01-301-0/+1
| | | | | | | Add configuration and detection code for the new 7000 series, with 7260 and 3160 devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: update copyrightJohannes Berg2013-01-241-2/+2
| | | | | | | Update Copyright notices to 2013. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: enable communication with WoWLAN firmwareJohannes Berg2013-01-161-0/+4
| | | | | | | | | | | On resuming, the opmode may have to be able to talk to the WoWLAN/D3 firmware in order to query it about its status and wakeup reasons. To do that, the opmode has to call the new d3_resume() transport API which will set up the device for command communcation. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: update the RB_TIMEOUT to 0x11Emmanuel Grumbach2012-11-191-1/+1
| | | | | | | | This will allow to reduce slightly the number of interrupts without sacrificing too much the latency in the Rx path. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: print more info when a queue is stuckEmmanuel Grumbach2012-06-131-0/+2
| | | | | | | | Print some more info from the SCD's SRAM and dump the TRB from the FH. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* iwlwifi: fix hardware queue programmingJohannes Berg2012-04-241-5/+19
| | | | | | | | | | | | | | | | | | | | | | Newer devices have 20 (5000 series) or 30 (6000 series) hardware queues, rather than the 16 that 4965 had. This was added to the driver a long time ago, but improperly: the queue registers for the higher queues aren't just continuations of the registers for the first 16 queues, they are in other places. Therefore, the hardware would lock up when trying to activate queue 16 or above and the device would have to be restarted. Thanks goes to Emmanuel who identified this and told me how the queue programming should be done. Note that we don't use queues 20 and higher today and doing so needs more work than this. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: update CopyrightWey-Yi Guy2012-01-241-2/+2
| | | | | | | Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: add missing includesEmmanuel Grumbach2011-08-291-0/+2
| | | | | | | | | | a few h files weren't self contained. Fix that. Move iwl_dma_ptr to transport layer since it is not used by the upper layer any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: iwl-dev.h doesn't include iwl-fh.h any moreEmmanuel Grumbach2011-08-291-6/+12
| | | | | | | | | | Since iwl-fh.h contains transport related data, it shouldn't be included by the upper layer. Only the transport layer and iwl-agn-ucode.c includes it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: remove the indirection for the dma channel numWey-Yi Guy2011-07-111-1/+1
| | | | | | | Not needed since the driver split. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2011-04-251-20/+18
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/rt2x00/rt2x00queue.c drivers/net/wireless/rt2x00/rt2x00queue.h
| * iwlagn: more cleanup to remove unused referenceWey-Yi Guy2011-04-081-18/+17
| | | | | | | | | | | | More cleanup code, no functional changes Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * iwlagn: remove unused 3945 defineWey-Yi Guy2011-04-081-2/+1
| | | | | | | | | | | | 3945 no longer apply Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | Merge branch 'master' of ↵John W. Linville2011-04-121-2/+2
|\ \ | |/ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/ath/ar9170/main.c drivers/net/wireless/ath/ar9170/phy.c drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
| * iwlagn: change Copyright to 2011Wey-Yi Guy2011-04-071-2/+2
| | | | | | | | | | Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Fix common misspellingsLucas De Marchi2011-03-311-1/+1
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Merge branch 'master' of ↵John W. Linville2010-07-131-6/+1
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/wl12xx/wl1271_cmd.h
| * iwlagn: fix the bit mask of a FH register in stop Tx DMA flowEmmanuel Grumbach2010-07-091-6/+1
| | | | | | | | | | | | | | | | | | | | | | When we stop the Tx DMA channels, we poll bits 16:31 in FH_TSSR_RX_STATUS_REG. From 4965 and up, only the bits 16:26 are legal. Bits 27:31 are not used and are always unset. Polling them will lead to fail on timeout but since the timeout is quite small, the stall was not felt. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | drivers/net: use __packed annotationEric Dumazet2010-06-031-3/+3
|/ | | | | | | | | cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iwlwifi: update copyright year to 2010Reinette Chatre2010-01-191-2/+2
| | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: display flowhandler register when sw error or on-demandWey-Yi Guy2010-01-191-0/+19
| | | | | | | | | | | | Flowhandler handle the communication between driver and uCode, when any uCode error happen, we also like to know what is the status of the flowhandler; it can help to debug flowhandler related problem. Also adding debugfs file to dump current value of flowhandler registers. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: update copyright year to 2009Reinette Chatre2009-01-291-2/+2
| | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: use hw_params.rx_buf_sizeWinkler, Tomas2009-01-291-0/+15
| | | | | | | | | | This patch makes 3945 use of hw_params.rx_buf_size instead of IWL_RX_BUF_SIZE. It also renames IWL_RX_BUF_SIZE to IWL_RX_BUF_SIZE_3K and moves rx buffer defines into iwl-fh.h. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: remove double defined 3945 tfd structuresWinkler, Tomas2009-01-291-12/+0
| | | | | | | | | This patch removes doubly defined struct iwl3945_tfd_frame_data and struct iwl3945_tfd_frame. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: sync tx queue data structure with iwlagnSamuel Ortiz2009-01-291-0/+11
| | | | | | | | | | | We are now using the iwl_tx_queue for iwl3945. To reach that goal, we included the 3945 specific tfd frame structure to iwl_tx_queue. This has no effect on the current iwlagn code. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: use iwl_rb_statusWinkler, Tomas2009-01-291-0/+1
| | | | | | | | | | This patch makes use of iwl_rb_status also in 3945. The structure for 3945 is not the same but since only closed_rb_num filed is used in both cases there is no reason to duplicate it. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlifi: remove twice defined SINGLE_FRAME RX FH MASKWinkler, Tomas2008-12-121-3/+0
| | | | | | | | | | | This patch removes second definition of FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME in iwl-fh.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: change email contact informationWinkler, Tomas2008-12-121-1/+1
| | | | | | | | | | This patch replaces personal emails with hopefully always valid Intel Linux Wireless, which will be routed to a current maintainer Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: TX update chicken bitsWinkler, Tomas2008-11-261-0/+5
| | | | | | | | | | This instructs FH to increment the retry count of a packet when it is brought from the memory to TX-FIFO to save transactions during aggregation flow. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: iwl-fh.h cleanupTomas Winkler2008-11-251-24/+17
| | | | | | | | | | This patch fix value of upper FH register bound plus it reorders and groups registers in more readable way Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: some fh document fix and cleanupZhu, Yi2008-11-251-5/+4
| | | | | | | | | | This patch cleans up some flow handler related document. It also removes some blank lines. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: use Rx single frame mode (one Rx frame per RB)Zhu, Yi2008-11-211-0/+2
| | | | | | | | | | | | The RCSR default value for single frame mode is off (a RB contains more than one frames). But the driver assumes single frame mode apparently. This patch enables single frame mode for the hardware. It also adds a BUG_ON to make sure the allocated skb satisfies the hardware alignment requirement and removes a useless check. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: revamp tx scheduler byte count tables handlingTomas Winkler2008-11-211-0/+65
| | | | | | | | | | | | This moves byte count tables to tx domain removing completely ambivalent shared data. Changes handling of allocation byte count tables and keep warm consistent memory Moves general tx scheduler definitions from iwl-4956-hw.h to iwl-fh.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move rx queue read pointer into rxqWinkler, Tomas2008-11-211-0/+16
| | | | | | | | | | | This patch moves rx status/read registers into iwl_rx_queue structures. This solution is more memory hungry but is more structured and provides needed RX/TX separation Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: reorganize flow handler bitologyWinkler, Tomas2008-11-101-23/+29
| | | | | | | | | This patch cleans up FH bits and adds missing register values that will be used later in TX initialization rewrite Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: refactor tx byte count table usageTomas Winkler2008-10-311-0/+5
| | | | | | | | | | | | | | This patch drops unreadable usage of IWL_SET/GET_BITS16 in byte count tables handling This patch also cleans a bit the byte count table code and adds WARN_ON traps on invalid values This patch is pure cleanup, no functional changes. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: protect headers from double inclusionTomas Winkler2008-10-311-0/+3
| | | | | | | | | This patch protects iwl-csr.h and iwl-fh.h from double inclusion by ifndef define endif idiom Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: refactor rx register initializationWinkler, Tomas2008-09-301-4/+5
| | | | | | | | | | The patch adds HW bug W/A FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY so that we can enable again interrupt coalescing. It also uses named constants for open code. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix 64bit platform firmware loadingTomas Winkler2008-09-021-0/+1
| | | | | | | | | | This patch fixes loading firmware from memory above 32bit. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Marcel Holtmann <holtmann@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move Flow Handlers define to iwl-fh.hEmmanuel Grumbach2008-05-071-0/+391
This patch moves Flow Handlers define to a new file iwl-fh.h Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud