aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-csr.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-03-09iwlwifi: pcie: enable LP XTAL to reduce power consumptionAlexander Bondar1-0/+38
1. Enable LP XTAL to avoid HW bug where device may consume much power if FW is not loaded after device reset. LP XTAL is disabled by default after device HW reset. Configure device's "persistence" mode to avoid resetting XTAL again when SHRD_HW_RST occurs in S3. 2. Add methods to access SHR (shared block memory space) directly from PCI bus w/o need to power up MAC HW. Shared internal registers (e.g. SHR_APMG_GP1, SHR_APMG_XTAL_CFG)can be accessed directly from PCI bus through SHR arbiter even when MAC HW is powered down. This is possible due to indirect read/write via HEEP_CTRL_WRD_PCIEX_CTRL (0xEC) and HEEP_CTRL_WRD_PCIEX_DATA (0xF4) registers. Use iwl_write32()/iwl_read32() family to access these registers. The MAC HW need not be powered up so no "grab inc access" is required. For example, to read from SHR_APMG_GP1 register (0x1DC), first, write to the control register: HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register) HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 2 (read access) second, read from the data register HEEP_CTRL_WRD_PCIEX_DATA[31:0]. To write the register, first, write to the data register HEEP_CTRL_WRD_PCIEX_DATA[31:0] and then: HEEP_CTRL_WRD_PCIEX_CTRL[15:0] = 0x1DC (offset of the SHR_APMG_GP1 register) HEEP_CTRL_WRD_PCIEX_CTRL[29:28] = 3 (write access) Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-02-03iwlwifi: pcie: fix secure section / dual cpu firmware loadingEran Harary1-32/+0
Also handle the bypass mode in which the second CPU doesn't interfere. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-31iwlwifi: Update Copyright to 2014Emmanuel Grumbach1-2/+2
Happy new year! Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2013-12-17iwlwifi: pcie: clean up ICT allocation codeEmmanuel Grumbach1-1/+2
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>
2013-11-25iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160Emmanuel Grumbach1-4/+1
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>
2013-10-11iwlwifi: support Signed firmware image and Dual CPUsEran Harary1-0/+32
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>
2013-05-29iwlwifi: mvm: add thermal throttling and CT killEytan Lifshitz1-0/+19
In order to avoid NIC destruction due to high temperature, CT kill will power down the NIC. To avoid this, thermal throttling will decrease throughput to prevent the NIC from reaching the temperature at which CT kill is performed. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-06iwlwifi: a few fixes in licenseEmmanuel Grumbach1-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>
2013-01-24iwlwifi: update copyrightJohannes Berg1-2/+2
Update Copyright notices to 2013. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-03iwlwifi: fix spelling and value in LED registers.Eytan Lifshitz1-2/+2
Fix typo in the macro name and the wrong value. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06iwlwifi: configure the SKU in the HWEmmanuel Grumbach1-6/+6
This was missing. Fix the mask of the REV_TYPE on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06iwlwifi: fix rf configurationEmmanuel Grumbach1-2/+14
Johannes noticed this was completely messed up. We got confused between masks and bit position. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-04-16iwlwifi: added HBUS_TARG_TEST_REGAmit Beka1-0/+3
This register is used to enable some debug mechanisms. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-01-24iwlwifi: update CopyrightWey-Yi Guy1-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>
2011-11-08iwlwifi: HW rev for 105 and 135 seriesWey-Yi Guy1-2/+2
Set the HW rev. for both 105 and 135 series Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14iwlagn: iwl-trans.c can't dereference iwl_priv any moreEmmanuel Grumbach1-0/+18
This reaches encapsulation for this file. In order to reach this: * move priv->valid_context to iwl_shared * move the last_rejected initialization to the upper layer * define a wrapper iwl_nic_config in the upper layer that calls to cfg->lib->ops->nic_config 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>
2011-07-21iwlagn: implement WoWLANJohannes Berg1-0/+1
Implement WoWLAN support in iwlagn. The device supports a number of wakeup triggers and can do GTK rekeying when asleep (if HW crypto is used). Unfortunately, we need to disconnect from the AP after resume since we can't yet get all the info out of the wowlan uCode to stay connected safely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-07iwlagn: change Copyright to 2011Wey-Yi Guy1-2/+2
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-25iwlagn: remove reference to 3945 and 4965Wey-Yi Guy1-31/+8
After driver split, remove the unused reference to 3945 and 4965 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: add IQ inversion support for 2000 series devicesWey-Yi Guy1-0/+2
The I/Q swapping is extremely important and should be dealt with extra care. It will affects OFDM and CCK differently. For 6000/6005/6030 series devices, the I/Q were swapped, and for 2000 series devices, it is in non-swapped status (but its swapped with respected to 6000/6005/6030). so the CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER register need to be set to support the correct behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-21iwlwifi: add hw rev for 2000 series devicesWey-Yi Guy1-2/+7
2000 series device has different HW rev, add it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-21iwlwifi: remove g2 from csr hw revWey-Yi Guy1-2/+3
Remove refernce of g2 and use offical number for hw rev. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-15iwlagn: enable shadow registerWey-Yi Guy1-0/+2
For 6000 series devices and up, enable automatic update MAC's register for better power usage in PSP mode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28iwlagn: set CSR register for 6050g2 devicesShanyu Zhao1-1/+2
For 6050g2 devices driver needs to set a special bit to CSR register so that uCode can do things correctly in calibration routines. Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-07-09iwlwifi: enable 6050 series Gen2 devicesShanyu Zhao1-0/+1
To enable 6050 series Gen 2 devices: 1) new PCI_IDs are added; 2) new EEPROM version and calibration version numbers defined; 3) new hardware REV number defined; Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-04-16iwlwifi: add hw revision for 6000g2 NICWey-Yi Guy1-0/+1
Add hardware revision for 6000g2 series of NIC Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-19iwlwifi: indicate calib version for 6050 seriesAbhijeet Kolekar1-1/+1
Indicate calibration version to uCode Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-19iwlwifi: update copyright year to 2010Reinette Chatre1-2/+2
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-12-21iwlwifi: power up all devices for EEPROM readReinette Chatre1-5/+3
Recent commits "iwlwifi: remove power-wasting calls to apm_ops.init()" and "iwlagn: power up device before initializing EEPROM" had the goal of reducing device power consumption from the time the module is loaded until the interface is brought up and the device's power saving mechanisms kick in. The idea is that once the module is loaded there is no need for the device to consume power until the interface is brought up. With the current solution the device is only powered up during EEPROM read, and then so also only if the EEPROM type is OTP. We have found that on certain platforms even non-OTP devices require power to be up during EEPROM read. On these platforms the driver never loads and the system log contains the following: iwlagn 0000:03:00.0: MAC is in deep sleep!. CSR_GP_CNTRL = 0x080403D8 We thus now power up all devices during EEPROM read. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-23iwlagn: Use iwl_write8() for CSR_INT_COALESCING registerBen Cahill1-2/+2
CSR_INT_COALESCING previously had only one, but now has two single-byte fields. With only one single-byte field (lowest order byte) it was okay to write via iwl_write32(), but now with two, an iwl_write32() to the lower order field clobbers the other field (odd-address CSR_INT_PERIODIC_REG, offset 0x5), and an iwl_write32() to CSR_INT_PERIODIC_REG could clobber the lowest byte of the next-higher register (CSR_INT, offset 0x8). Fortunately, no bad side effects have been produced by the iwl_write32() usage, due to order of execution (low order byte was always written before higher order byte), and the fact that writing "0" to the low byte of the next higher register has no effect (only action is when writing "1"s). Nonetheless, this cleans up the accesses so no bad side effects might occur in the future, if execution order changes, or more bit fields get added to CSR_INT_COALESCING. Add some comments regarding periodic interrupt usage. Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-18iwlwifi: Add comments about CSR registersBen Cahill1-27/+150
Also regroup CSR_EEPROM and CSR_OTP bit field definitions. Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27iwlwifi: set auto clock gate disable bit for 6x00/6x50 seriesWey-Yi Guy1-2/+4
For 6x00 and 6x50 series NIC with OTP shadow RAM, set auto clock gate disable bit when initializing OTP access. 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>
2009-10-27iwlwifi: show current power save status reported by uCodeWey-Yi Guy1-0/+5
Power save request is sent from driver to uCode, but there is no indication from uCode about the current device power save state. Reading GP_CNTRL register bit 25:24 to show the current power save status 00: no power save 01: MAC power down 10: PHY power down 11: Error The uCode could switch in and out of power save mode in the order of once per 100-300 ms in many cases. The reading here should just be used for reference on the current uCode power save status. Do not confuse this reading with the PowerSave set by driver and mac80211. 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>
2009-10-07iwlwifi: validate the signature for EEPROM and OTPWey-Yi Guy1-1/+6
Both 1000 & 6000 series NICs contain on-chip OTP memory that replaces the off-chip EEPROM memory. The nature of OTP means there is a limited number of times a particular board can go through the factory flow and be (re)calibrated. As a consequence there will be some boards that contain EEPROM memory because OTP blocks were full. In the signature validation routine, iwlwifi needs to make sure "select bit" and "EEPROM/OTP signature" agree on the type of NVM to be used to configure the system. 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>
2009-08-04iwlwifi: Distinguish power amplifier for 6000 seriesWey-Yi Guy1-1/+9
For 6x00 2x2 NIC, two types of Power Amplifier are available. In order for uCode to apply correct tx power, driver needs to program the CSR_GP_DRIVER_REG register and let uCode know the type of PA. If driver do not program CSR_GP_DRIVER_REG register (default to 0), then it is uCode's decision for tx power 2x2 Hybrid card: use both internal and external PA 2x2 IPA(Internal Power Amplifier) card: internal PA only 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>
2009-05-22iwlagn: co-exist with AMTMohamed Abbas1-3/+3
Enable using iwlwifi driver in AMT system. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22iwlcore: Add support for periodic RX interruptMohamed Abbas1-1/+4
Periodic RX interrupt needed with ICT interrupt to prevent RX race. Sending RX interrupt require many steps to be done in the the device: 1- write interrupt to current index in ICT table. 2- dma RX frame. 3- update RX shared data to indicate last write index. 4- send interrupt. This could lead to RX race, driver could receive RX interrupt but the shared data changes does not reflect that. this could lead to RX race, RX periodic will solve this race Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22iwlcore: support ICT interruptMohamed Abbas1-0/+6
Add ICT interrupt handler support, ICT should improve CPU utilization since it does not require target read which is very expensive. This interrupt handler only added to 5000 cards and newer. Device will write interrupts to ICT shared table to inform driver about its interrupts. These patches will not touch 3945 and 4965 interrupt handlers and tasklet. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-22iwlwifi: support NVM access (EEPROM/OTP)Wey-Yi Guy1-0/+5
Two type of NVM available for devices 1000, 6000 and after, adding support to read OTP lower blocks if OTP is used instead of EEPROM. 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>
2009-04-21iwlwifi: fix EEPROM validation mask to include OTP only devicesJay Sternberg1-1/+1
Fix the bug where some revisions of 6000 series hardware cannot be used. Later versions of 6000 series have the EEPROM replaced by OTP. For these devices to be used we need to expand valid EEPROM mask. Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-03-16iwlwifi: correct device name for 1000 seriesJay Sternberg1-1/+1
device name was changed from 100 to 1000 Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09iwlwifi: add new HW_REV_TYPEs for Intel WiFi Link 100, 6000 and 6050 SeriesJay Sternberg1-0/+3
simply add definitions for the HW_REV_TYPEs for the new devices. Signed-off-by: Jay Sternberg <jay.e.sternberg@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29iwlwifi: update copyright year to 2009Reinette Chatre1-2/+2
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-12-12iwlwifi: use iwl_poll_direct_bit in EEPROM readingZhu, Yi1-0/+2
The patch replaces the current reading EEPROM loop iterations with iwl_poll_direct_bit(). It also fixes some comment error. 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>
2008-12-12iwlwifi: change email contact informationWinkler, Tomas1-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>
2008-10-31iwlwifi: protect headers from double inclusionTomas Winkler1-1/+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>
2008-09-30iwlwifi: refactor rx register initializationWinkler, Tomas1-1/+1
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>
2008-08-04iwlwifi: HW bug fixesTomas Winkler1-1/+9
This patch adds few HW bug fixes. 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>
2008-06-03iwlwifi: setup correctly L1 L0S pi link valuesTomas Winkler1-1/+5
This patch setups L1 L0S pci link values. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07iwlwifi-5000: Add HW REV of 5000 HW familyTomas Winkler1-0/+5
This patch adds values fo CSR_HW_REV for 5000 HW family Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>