aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom.h
Commit message (Collapse)AuthorAgeFilesLines
* Backport ath from 3.4 kernelWolfgang Wiedmeyer2017-01-211-10/+8
| | | | | | | net/wireless and mac80211 are already backported from a 3.4 kernel, so it makes sense to also get ath from 3.4 (3.4.113). Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* ath9k: Drag the driver to the year 2011Sujith Manoharan2011-05-191-1/+1
| | | | | | | The Times They Are a-Changin'. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix instable target power control b/w CCK/OFDMRajkumar Manoharan2011-04-121-1/+5
| | | | | | | | | | | | | | | | | | | | | The problem is that when the attenuation is increased, the rate will start to drop from MCS7 -> MCS6, and finally will see MCS1 -> CCK_11Mbps. When the rate is changed b/w CCK and OFDM, it will use register desired_scale to calculate how much tx gain need to change. The output power with the same tx gain for CCK and OFDM modulated signals are different. This difference is constant for AR9280 but not AR9285/AR9271. It has different PA architecture a constant. So it should be calibrated against this PA characteristic. The driver has to read the calibrated values from EEPROM and set the tx power registers accordingly. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Offload USB eeprom reading to targetSujith Manoharan2011-01-191-0/+2
| | | | | | | | | For USB devices, reading the EEPROM data can be offloaded to the target. Use multiple register reads to take advantage of this feature to reduce initialization time. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Fix warning on device removalSujith Manoharan2010-12-221-2/+0
| | | | | | | | | | | | | The commit "ath9k_hw: warn if we cannot change the power to the chip" introduced a new warning to indicate chip powerup failures, but this is not required for devices that have been removed. Handle USB device removal properly by checking for unplugged status. For PCI devices, this warning will still be seen when the card is pulled out, not sure how to check for card removal. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: remove antenna configuration eeprom ops and variablesFelix Fietkau2010-12-131-4/+0
| | | | | | | | | | | | AR9280 based hardware with 3 antennas and slow antenna diversity has not been seen in the wild and ath9k does not support that form of antenna diversity, so remove the EEPROM ops for it. These EEPROM ops are currently only used for setting the AR_PHY_SWITCH_COM register, which is being done in the EEPROM specific file already. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: merge ath9k_hw_get_gain_boundaries_pdadcs between eeprom_def.c and ↵Felix Fietkau2010-12-131-0/+8
| | | | | | | eeprom_4k.c Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: clean up duplicate and unnused eeprom related definesFelix Fietkau2010-12-131-35/+10
| | | | | | | | | | AR*_MAX_RATE_POWER => MAX_RATE_POWER AR*_EEPROM_MODAL_SPURS => AR_EEPROM_MODAL_SPURS AR*_OPFLAGS_* => AR5416_OPFLAGS_* ... Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2010-12-021-13/+14
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
| * ath9k_hw: fix more bitfield related endian issuesFelix Fietkau2010-12-021-4/+10
| | | | | | | | | | | | | | | | | | A few LNA control related flags were also specified as a bitfields, however for some strange reason they were written in big-endian order this time. Fix this by using flags instead. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_hw: fix endian issues with CTLs on AR9003Felix Fietkau2010-12-021-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Parsing data using bitfields is messy, because it makes endian handling much harder. AR9002 and earlier got it right, AR9003 got it wrong. This might lead to either using too high or too low tx power values, depending on frequency and eeprom settings. Fix it by getting rid of the CTL related bitfields entirely and use masks instead. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k: Add support for Adaptive Power ManagementMohammed Shafi Shajakhan2010-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is to mitigate the problem of certain 3 stream chips that exceed the PCIe power requirements.An EEPROM flag controls which chips have APM enabled which is basically read from miscellaneous configuration element of the EEPROM header. This workaround will reduce power consumption by using 2 Tx chains for Single and Double stream rates (5 GHz only).All self generated frames (regardless of rate) are sent on 2 chains when this feature is enabled(Chip Limitation). Cc: Paul Shaw <paul.shaw@atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Tested-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpowerFelix Fietkau2010-11-151-1/+2
|/ | | | | | | | | ath9k_hw_set_txpowerlimit gets an extra boolean parameter that - if set - causes the rate txpower table and the regulatory limit to be calculated and stored, without changing hardware registers. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: simplify revision checks for AR9287Felix Fietkau2010-09-271-1/+1
| | | | | | | | Since AR9287 v1.0 was never sold (and the initvals removed), its revision checks can be simplified similar to AR9280 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2010-09-241-1/+1
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 Conflicts: drivers/net/wireless/ath/ath5k/base.c net/mac80211/main.c
| * ath9k_hw: fix parsing of HT40 5 GHz CTLsLuis R. Rodriguez2010-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 5 GHz CTL indexes were not being read for all hardware devices due to the masking out through the CTL_MODE_M mask being one bit too short. Without this the calibrated regulatory maximum values were not being picked up when devices operate on 5 GHz in HT40 mode. The final output power used for Atheros devices is the minimum between the calibrated CTL values and what CRDA provides. Cc: stable@kernel.org [2.6.27+] Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: remove warning in ath9k_hw_def_get_num_ant_configRajkumar Manoharan2010-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | This patch fixes following warning drivers/net/wireless/ath/ath9k/eeprom_def.c: In function 'ath9k_hw_def_get_num_ant_config' drivers/net/wireless/ath/ath9k/eeprom_def.c:1425:47: warning: comparison between 'enum ath9k_hal_freq_band' and 'enum ieee80211_band' Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ath9k_hw: Add capability flag for Antenna diversity and combining featureVasanthakumar Thiagarajan2010-09-071-0/+2
|/ | | | | | | This is enabled only for ar9285. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: load proper firmware for device ID 7015Rajkumar Manoharan2010-08-131-0/+1
| | | | | | | | This patch handles the firmware loading properly for device ID 7015. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix antenna diversity on AR9285Felix Fietkau2010-07-121-1/+1
| | | | | | | | | | | | | On AR9285, the antenna switch configuration register uses more than just 16 bits. Because of an arbitrary mask applied to the EEPROM value that stores this configuration, diversity was broken in some cases, leading to a significant degradation in signal strength. Fix this by changing the callback to return a 32 bit value and remove the arbitrary mask. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: add support for parsing PA predistortion related EEPROM fieldsFelix Fietkau2010-06-141-1/+2
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Cleanup TX power calculation for AR9287Sujith2010-06-031-0/+1
| | | | | | | | | | | | | | * Add a few comments, and move the updation of max_power_level to a helper routine. This is also done by non-4K based chipsets, this will be fixed in a separate patch. * Remove two WARs which are required for old AR5416 chipsets, and are not needed for AR9287. * Fix indentation and make things readable. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Optimize ath9k_hw_ar9287_set_board_valuesSujith2010-06-031-0/+1
| | | | | | | | | | | | | | | Rather than doing a series of RMWs, calculate the value to be written to the register in question and do a single REGWRITE. This improves bringup time. This depends on the analog_shiftreg configuration option, which is currently buggy. For AP mode, a delay of 100us has to be the default. For station mode, this knob has to be enabled on a per-case basis, though it is a little unclear on when to enable a delay. This can be fixed later though. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: update EEPROM data structure for AR9280Felix Fietkau2010-04-271-1/+2
| | | | | | | Adds read access for the 5 GHz fast clock flag Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Implement AR9003 eeprom callbacksSenthil Balasubramanian2010-04-161-2/+9
| | | | | | Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: restore mac address reading logicLuis R. Rodriguez2010-04-161-1/+0
| | | | | | | | | | | | | | | | | | Once upon a time the AR_EEPROM_MAC macro was added to let us add a random attribute to the three 4-bytes of MAC addresses entries we read from the EEPROM. This was good while a random high-enough value was used which did not conflict with any of the already existing enum eeprom_param values. With AR9003 support the enums overlap and it means we either increment the random offset or just restore the reading logic to match what the HAL has. I choose to do the later to synchronize the logic on both code bases. This should fix reading the MAC address from the EEPROM on AR9003 hardware. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: rename eep_AR9287_ops to eep_ar9287_opsLuis R. Rodriguez2010-04-161-1/+1
| | | | | | Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: complete AR9003 calibrationLuis R. Rodriguez2010-04-161-0/+1
| | | | | | | | | | This goes with some new shiny TX IQ calibration that AR9003 hardware family supports. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: the eep_map is used only for AR9280 PCI card ini fixupSenthil Balasubramanian2010-04-161-7/+0
| | | | | | | | | We can reorganize the code in such a way that eep_map can be removed, which makes the code more clearer. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix bugs in handling TX powerSenthil Balasubramanian2009-10-071-2/+3
| | | | | | | | | | | * Get power table offset from the EEPROM instead of using a hardcoded value of -5 if the EEPROM rev is >= 21. * Add support in the 4k eeprom code for tx power offset in case we have a 4k AR9280 implementation. * Fix tx power accuracy at high powers. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Advertise midband for AR5416 devicesSenthil Balasubramanian2009-10-071-0/+1
| | | | | | | | This has to be done if the EEPROM supports FCC Midband capability. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* atheros: move bus ops to ath_commonLuis R. Rodriguez2009-10-071-1/+2
| | | | | | | | This is the last part to make ath9k hw code core driver agnostic. I believe ath9k_htc can now use use the hw code unmodified. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Clean antenna configuration for 4K EEPROM chipsSujith2009-08-141-6/+27
| | | | | | | | This patch revamps the antenna configuration mechanism for 4K chips. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Split eeprom.c into manageable piecesSujith2009-08-141-1/+30
| | | | | | | | Add eeprom_def.c, eeprom_4k.c and eeprom_9287.c This improves maintainability. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Try to fix whitespace damageSujith2009-08-141-99/+94
| | | | | Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove _t postfix for ar9287_eeprom structureLuis R. Rodriguez2009-08-041-1/+1
| | | | | | | | We don't use typdefs on ath9k, remove that _t. Cc: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: describe hw initialization betterLuis R. Rodriguez2009-08-041-1/+1
| | | | | | | | | | During initialization ath9k tends to use "attach" to when we initialize hardware due to the fact we used to attach a "HAL". The notion of a HAL is long gone, so lets just be clear on what we are doing. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add support for AR9287 based chipsets.Vivek Natarajan2009-07-271-1/+162
| | | | | Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cleanup ineffective return valuesVasanthakumar Thiagarajan2009-05-111-1/+1
| | | | | | | | This patch makes the return type of some of the functions void as those functions always return true Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: clean up includesJohannes Berg2009-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Trying to separate header files into net/wireless.h and net/cfg80211.h has been a source of confusion. Remove net/wireless.h (because there also is the linux/wireless.h) and subsume everything into net/cfg80211.h -- except the definitions for regulatory structures which get moved to a new header net/regulatory.h. The "new" net/cfg80211.h is now divided into sections. There are no real changes in this patch but code shuffling and some very minor documentation fixes. I have also, to make things reflect reality, put in a copyright line for Luis to net/regulatory.h since that is probably exclusively written by him but was formerly in a file that only had my copyright line. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* atheros: put atheros wireless drivers into ath/Luis R. Rodriguez2009-04-221-0/+509
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>