summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-helpers.h
Commit message (Collapse)AuthorAgeFilesLines
* iwlagn: move iwl_enable_rfkill_int and kill iwl-helpers.hEmmanuel Grumbach2011-10-141-44/+0
| | | | | | | | | Move iwl_enable_rfkill_int to iwl-core.h, and remove the empty iwl-helpers.h 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: move iwl_beacon_time_mask_XXX near to usageEmmanuel Grumbach2011-10-141-28/+0
| | | | | | | | | Since iwl_beacon_time_mask_[high,low] are used in iwl-core.c only, move them to there. 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: clean up of transport layerEmmanuel Grumbach2011-09-141-23/+0
| | | | | | | | | | | | | | Move a few declarations needed by the transport layer to iwl-shared.h Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport header file. Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since these structs are used in the API to the transport layer. Move get_cmd_string to the upper layer with a declaration in iwl-shared.h. 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: move the stop / wake queue logic to transport layerEmmanuel Grumbach2011-08-291-61/+0
| | | | | | | | | | priv->mac80211_registered and priv->hw needed to move to shared. stop_queue API was added in order to allow the upper layer to stop the SW queues for regulatory purposes. 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: move the mapping ac to queue / fifo to transportEmmanuel Grumbach2011-08-291-13/+0
| | | | | | | | | | | | | | | | This mapping is transport related. This allows us to remove the notion of tx queue from the tx path in the upper layer. iwl_wake_any_queue moved to transport layer since it needs to access these mappings. The TX API is nicer now: int (*tx)(struct iwl_trans *trans, struct sk_buff *skb, struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id); 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: all function iwl-io.c receive iwl_busEmmanuel Grumbach2011-08-291-1/+1
| | | | | | | | Which means that iwl-io.c doesn't need to include iwl-dev.h 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: reclaim the packets in transport layerEmmanuel Grumbach2011-08-291-0/+6
| | | | | | | | | | | | | | The reclaim flow is really transport related. Define a simple API to allow the upper layer to request from the transport layer to reclaim packets until an index written in the Tx response / BA notification. The transport layer prepares a list of the packets that are being freed and passes this list to the upper layer. Between the two layers, the CB of the skb is used to pass a pointer to the context (BSS / PAN) in which the skb was sent. 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: move ISR related data to transport layerEmmanuel Grumbach2011-08-291-21/+0
| | | | | | | | | | | Since the ISR is entirely in the transport layer, its data should be in the pcie specific region. Change sync_irq to first disable and then synchronize the IRQ. iwl_isr and iwl_isr_ict now receive iwl_trans. 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: priv->status moves to iwl_sharedEmmanuel Grumbach2011-08-291-2/+2
| | | | | | | | Since it is used by all the layers, it needs to move to iwl_shared. 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>
* iwlwifi: fix stop/wake queue hacksKalle Valo2011-06-201-0/+9
| | | | | | | | The hacks break once mac80211-compat.h is taken into use. Fix it by adding an ifdef check. Signed-off-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: combine firmware code/dataJohannes Berg2011-04-221-24/+0
| | | | | | | | | | | | | On new hardware, ucode images always come in pairs: code and data. Therefore, combine the variables into an appropriate struct and use that when both code and data are needed. Also, combine allocation and copying so that we have less code in total. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: fix radar frame rejectionGaren Tamrazian2011-04-081-0/+13
| | | | | | | | | | | | | | | | | | The microcode may sometimes reject TX frames when on a radar channel even after we associated as it clears information during association and needs to receive a new beacon before allowing that channel again. This manifests itself as a TX status value of TX_STATUS_FAIL_PASSIVE_NO_RX. So in this case, stop the corresponding queue and give the frame back to mac80211 for retransmission. We start the queue again when a beacon from the AP is received which will make the regulatory enforcement in the device allow transmitting again. Signed-off-by: Garen Tamrazian <garenx.tamrazian@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: change Copyright to 2011Wey-Yi Guy2011-04-071-1/+1
| | | | | 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-01-051-0/+6
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| * iwlagn: enable only rfkill interrupt when device is downStanislaw Gruszka2011-01-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 6cd0b1cb872b3bf9fc5de4536404206ab74bafdd "iwlagn: fix hw-rfkill while the interface is down", we enable interrupts when device is not ready to receive them. However hardware, when it is in some inconsistent state, can generate other than rfkill interrupts and crash the system. I can reproduce crash with "kernel BUG at drivers/net/wireless/iwlwifi/iwl-agn.c:1010!" message, when forcing firmware restarts. To fix only enable rfkill interrupt when down device and after probe. I checked patch on laptop with 5100 device, rfkill change is still passed to user space when device is down. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Cc: stable@kernel.org Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'wireless-next-2.6' of ↵John W. Linville2010-11-221-21/+15
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
| * | iwlwifi: always build swq_id as virtual queue IDJohannes Berg2010-11-161-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we used the swq_id's mechanism to have AC and HW queue different only for aggregation queues. To be able to fix a bug with iPAN simply always build the swq_id as ac | (hwq << 2) and remove the flag bit. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
| * | iwlwifi: pass txq to wake/stop queueJohannes Berg2010-11-161-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | Instead of passing the txq->swq_id, pass the txq struct directly to make sure that in the future nobody will pass an invalid number. Only three places actually change from using the txq_id or the skb's queue_mapping to now using txq->swq_id as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* | iwlwifi: kill elapsed_jiffiesStanislaw Gruszka2010-11-161-9/+0
|/ | | | | | | | Subtract of jiffies is fine even if one variable overwrap. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove iwl_check_bitsJohannes Berg2010-10-071-5/+0
| | | | | | | | | The function is used exactly once, and the caller doesn't even need the special check, it can be simplified to a simple bit check. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: beacon format related helper functionWey-Yi Guy2010-06-051-0/+22
| | | | | | | | | | | | | Move the ucode beacon formation related helper function from 3945 to iwlcore, so both _3945 and _agn devices can utilize those functions. When driver pass the beacon related timing information to uCode in both spectrum measurement and channel switch commands, the beacon timing parameter require in uCode beacon format; those helper functions will do the conversation from uSec to the correct uCode format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
* iwlwifi: don't crash on firmware file missing infoJohannes Berg2010-05-131-0/+5
| | | | | | | | | | If a firmware file misses one of the required instruction or data pieces, the driver currently crashes. Let it gracefully refuse that firmware file instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
* iwlagn: move ICT code into separate fileJohannes Berg2010-03-091-0/+3
| | | | | | | | | | | | All the ICT ISR code is iwlagn specific, and doesn't need to be in iwlcore. So create a new iwl-agn.h header file that will hold agn specific function declarations etc., and move the ICT code into a new iwl-agn-ict.c file that is linked into iwlagn. This also gets rid of exporting those symbols. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
* iwlwifi: use dma_alloc_coherentStanislaw Gruszka2010-02-111-3/+4
| | | | | | | | Change pci_alloc_consistent() to dma_alloc_coherent() so we can use GFP_KERNEL flag. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
* iwlwifi: update copyright year to 2010Reinette Chatre2010-01-191-1/+1
| | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: change iwl_enable/disable_interrupts to "inline"Wey-Yi Guy2009-07-241-0/+21
| | | | | | | | | iwl_enable_interrupts is being called inside the interrupt, change from function call to inline 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>
* mac80211/iwlwifi: move virtual A-MDPU queue bookkeeping to iwlwifiJohannes Berg2009-03-271-0/+52
| | | | | | | | | | | | | | | | | | This patch removes all the virtual A-MPDU-queue bookkeeping from mac80211. Curiously, iwlwifi already does its own bookkeeping, so it doesn't require much changes except where it needs to handle starting and stopping the queues in mac80211. To handle the queue stop/wake properly, we rewrite the software queue number for aggregation frames and internally to iwlwifi keep track of the queues that map into the same AC queue, and only talk to mac80211 about the AC queue. The implementation requires calling two new functions, iwl_stop_queue and iwl_wake_queue instead of the mac80211 counterparts. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Reinette Chattre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: update copyright year to 2009Reinette Chatre2009-01-291-1/+1
| | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove includes of iwl-helpers.h where not neededTomas Winkler2008-12-121-2/+0
| | | | | | | | | This patch removes includes of iwl-helpers.h where not needed Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Samuel Ortiz <sameo@linux.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: refactor tx byte count table usageTomas Winkler2008-10-311-102/+0
| | | | | | | | | | | | | | 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: fix TX cmd dma unmappingTomas Winkler2008-10-311-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This patch: 1. fixes command DMA unmapping, this might be visible only on platforms where DMA unmapping is no noop such as PPC64 (not tested) 2. attaches correctly high memory part of the host command buffer 3. changes structure of TFD TB instead of describing transmit buffer (TB) tuple it describes single TB and makes code more readable on price of one unaligned access 4. eliminates using of IWL_GET/SET_BITs for TFD handling 5. renames TFD structures to mach the HW spec 6. reduces iwl_tx_info size by reserving first TB to the host command This patch should not have any visible effect on x86 32 This patch is rework of iwlwifi: fix DMA code and bugs from Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Cc: Johannes Berg <johannes@sipsolutions.net> Reviewed-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>
* mac80211: add helpers for frame control testingHarvey Harrison2008-06-141-109/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A few general categories: 1) ieee80211_has_* tests if particular fctl bits are set, the helpers are de in the same order as the fctl defines: A combined _has_a4 was also added to test when both FROMDS and TODS are set. 2) ieee80211_is_* is meant to test whether the frame control is of a certain ftype - data, mgmt, ctl, and two special helpers _is_data_qos, _is_data_pres which also test a subset of the stype space. When testing for a particular stype applicable only to one ftype, functions like ieee80211_is_ack have been added. Note that the ftype is also being checked in these helpers. They have been added for all mgmt and ctl stypes in the same order as the STYPE defines. 3) ieee80211_get_* is meant to take a struct ieee80211_hdr * and returns a pointer to somewhere in the struct, see get_SA, get_DA, get_qos_ctl. The intel wireless drivers had helpers that used this namespace, convert the all to use the new helpers and remove the byteshifting as they were defined in cpu-order rather than little-endian. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove unused flagTomas Winkler2008-06-141-2/+0
| | | | | | | | This patch removes IEEE80211_CHAN_W_RADAR_DETECT flag. 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: move txq_ctx_stop into iwl-tx.cTomas Winkler2008-06-031-0/+2
| | | | | | | This patch moves txq_ctx_stop into iwl-tx.c iwlcore module. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: refactor ieee80211_get_qos_ctrlTomas Winkler2008-05-211-0/+19
| | | | | | | | This patch refactors ieee80211_get_qos_ctrl function and its usage in iwlwifi drivers. Function is moved as inline into iwl-helpers.h. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: update copyright yearReinette Chatre2008-03-131-1/+1
| | | | | | | | Also fix a copy and paste error in header of iwl-core.c. This file is not dual licensed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: queue functions cleanupTomas Winkler2008-03-071-0/+20
| | | | | | | | | | | | | This patch moves 1. iwl_queue_inc_wrap and int iwl_queue_dec_wrap into iwl-helpers.h these two functions are identical to common for both iwl3956 and iwl4965 2. renames x2_queue_used to iwl3945_x2_queue_used 3. exports iwl3945_queue_space out of iwl3964-base.c 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: remove ieee80211 types from iwl-helpers.hTomas Winkler2008-02-011-3/+0
| | | | | | | | | This patch removes IEEE80211_STYPE_BACK_REQ and IEEE80211_STYPE_BACK defines from iwl-helpers.h. These are already defined in include/linux/ieee80211.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: correct math in elapsed_jiffiesEric Sandeen2008-01-311-2/+2
| | | | | | | | | | | | | w/o the first change: if end == start you get MAX_JIFFY_OFFSET which isn't what you want... For the latter I think to be technically correct you need the +1 to account for the jiffy between MAX_JIFFY_OFFSET and 0 (hmm w/ the 2nd change the first isn't strictly needed... ah well) Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* iwlwifi: move uCode helper functions to iwl-helpers.hTomas Winkler2008-01-281-0/+18
| | | | | | | | | This patch adds iwl_free_fw_desc ucode helper function. It also moves ucode helper functions to iwl-helpers.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>
* iwlwifi: move iwl4965_get_dma_hi_address function to iwl-helpers.hTomas Winkler2008-01-281-0/+5
| | | | | | | | | | This patch moves iwl4965_get_dma_hi_address function to iwl-headers.h as iwl_get_dma_hi_address. This function will be used in more chipsets than only 4965. 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]: add iwlwifi wireless driversZhu Yi2007-10-101-0/+255
This patch adds the mac80211 based wireless drivers for the Intel PRO/Wireless 3945ABG/BG Network Connection and Intel Wireless WiFi Link AGN (4965) adapters. [ Move driver into it's own directory -DaveM ] Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud