Linux Kernel
3.7.1
|
#include <linux/delay.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
#include "ath5k.h"
#include "reg.h"
#include "rfbuffer.h"
#include "rfgain.h"
#include "../regd.h"
Go to the source code of this file.
Macros | |
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
Functions | |
u16 | ath5k_hw_radio_revision (struct ath5k_hw *ah, enum ieee80211_band band) |
bool | ath5k_channel_ok (struct ath5k_hw *ah, struct ieee80211_channel *channel) |
bool | ath5k_hw_chan_has_spur_noise (struct ath5k_hw *ah, struct ieee80211_channel *channel) |
int | ath5k_hw_phy_disable (struct ath5k_hw *ah) |
int | ath5k_hw_rfgain_opt_init (struct ath5k_hw *ah) |
enum ath5k_rfgain | ath5k_hw_gainf_calibrate (struct ath5k_hw *ah) |
void | ath5k_hw_init_nfcal_hist (struct ath5k_hw *ah) |
void | ath5k_hw_update_noise_floor (struct ath5k_hw *ah) |
int | ath5k_hw_phy_calibrate (struct ath5k_hw *ah, struct ieee80211_channel *channel) |
void | ath5k_hw_set_antenna_switch (struct ath5k_hw *ah, u8 ee_mode) |
void | ath5k_hw_set_antenna_mode (struct ath5k_hw *ah, u8 ant_mode) |
int | ath5k_hw_set_txpower_limit (struct ath5k_hw *ah, u8 txpower) |
int | ath5k_hw_phy_init (struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 mode, bool fast) |
bool ath5k_channel_ok | ( | struct ath5k_hw * | ah, |
struct ieee80211_channel * | channel | ||
) |
ath5k_channel_ok() - Check if a channel is supported by the hw : The &struct ath5k_hw : The &struct ieee80211_channel
Note: We don't do any regulatory domain checks here, it's just a sanity check.
bool ath5k_hw_chan_has_spur_noise | ( | struct ath5k_hw * | ah, |
struct ieee80211_channel * | channel | ||
) |
ath5k_hw_chan_has_spur_noise() - Check if channel is sensitive to spur noise : The &struct ath5k_hw : The &struct ieee80211_channel
enum ath5k_rfgain ath5k_hw_gainf_calibrate | ( | struct ath5k_hw * | ah | ) |
ath5k_hw_gainf_calibrate() - Do a gain_F calibration : The &struct ath5k_hw
Main callback for thermal RF gain calibration engine Check for a new gain reading and schedule an adjustment if needed.
Returns one of enum ath5k_rfgain codes
ath5k_hw_init_nfcal_hist() - Initialize NF calibration history buffer : The &struct ath5k_hw
int ath5k_hw_phy_calibrate | ( | struct ath5k_hw * | ah, |
struct ieee80211_channel * | channel | ||
) |
ath5k_hw_phy_calibrate() - Perform a PHY calibration : The &struct ath5k_hw : The &struct ieee80211_channel
The main function we call from above to perform a short or full PHY calibration based on RF chip and current channel
u16 ath5k_hw_radio_revision | ( | struct ath5k_hw * | ah, |
enum ieee80211_band | band | ||
) |
DOC: PHY related functions
Here we handle the low-level functions related to baseband and analog frontend (RF) parts. This is by far the most complex part of the hw code so make sure you know what you are doing.
Here is a list of what this is all about:
Also have in mind we never got documentation for most of these functions, what we have comes mostly from Atheros's code, reverse engineering and patent docs/presentations etc. ath5k_hw_radio_revision() - Get the PHY Chip revision : The &struct ath5k_hw : One of enum ieee80211_band
Returns the revision number of a 2GHz, 5GHz or single chip radio.
DOC: RF Gain optimization
This code is used to optimize RF gain on different environments (temperature mostly) based on feedback from a power detector.
It's only used on RF5111 and RF5112, later RF chips seem to have auto adjustment on hw -notice they have a much smaller BANK 7 and no gain optimization ladder-.
For more infos check out this patent doc "http://www.freepatentsonline.com/7400691.html"
This paper describes power drops as seen on the receiver due to probe packets "http://www.cnri.dit.ie/publications/ICT08%20-%20Practical%20Issues %20of%20Power%20Control.pdf"
And this is the MadWiFi bug entry related to the above "http://madwifi-project.org/ticket/1659" with various measurements and diagrams ath5k_hw_rfgain_opt_init() - Initialize ah_gain during attach : The &struct ath5k_hw
ath5k_hw_set_antenna_mode() - Set antenna operating mode : The &struct ath5k_hw : One of enum ath5k_ant_mode