Defines | Functions
phy.c File Reference
#include <linux/delay.h>
#include "ath5k.h"
#include "reg.h"
#include "base.h"
#include "rfbuffer.h"
#include "rfgain.h"
Include dependency graph for linux_ks/hwi/ath5k_raw/module/phy.c:

Go to the source code of this file.

Defines

#define _ATH5K_PHY

Functions

bool ath5k_channel_ok (struct ath5k_hw *ah, u16 freq, unsigned int flags)
static void ath5k_combine_linear_pcdac_curves (struct ath5k_hw *ah, s16 *table_min, s16 *table_max, u8 pdcurves)
static void ath5k_combine_pwr_to_pdadc_curves (struct ath5k_hw *ah, s16 *pwr_min, s16 *pwr_max, u8 pdcurves)
static void ath5k_create_power_curve (s16 pmin, s16 pmax, const s16 *pwr, const u8 *vpd, u8 num_points, u8 *vpd_table, u8 type)
static void ath5k_fill_pwr_to_pcdac_table (struct ath5k_hw *ah, s16 *table_min, s16 *table_max)
static void ath5k_get_chan_pcal_surrounding_piers (struct ath5k_hw *ah, struct ieee80211_channel *channel, struct ath5k_chan_pcal_info **pcinfo_l, struct ath5k_chan_pcal_info **pcinfo_r)
static s16 ath5k_get_interpolated_value (s16 target, s16 x_left, s16 x_right, s16 y_left, s16 y_right)
static s16 ath5k_get_linear_pcdac_min (const u8 *stepL, const u8 *stepR, const s16 *pwrL, const s16 *pwrR)
static void ath5k_get_rate_pcal_data (struct ath5k_hw *ah, struct ieee80211_channel *channel, struct ath5k_rate_pcal_info *rates)
void ath5k_hw_calibration_poll (struct ath5k_hw *ah)
bool ath5k_hw_chan_has_spur_noise (struct ath5k_hw *ah, struct ieee80211_channel *channel)
int ath5k_hw_channel (struct ath5k_hw *ah, struct ieee80211_channel *channel)
enum ath5k_rfgain ath5k_hw_gainf_calibrate (struct ath5k_hw *ah)
unsigned int ath5k_hw_get_def_antenna (struct ath5k_hw *ah)
int ath5k_hw_noise_floor_calibration (struct ath5k_hw *ah, short freq)
int ath5k_hw_phy_calibrate (struct ath5k_hw *ah, struct ieee80211_channel *channel)
int ath5k_hw_phy_disable (struct ath5k_hw *ah)
u16 ath5k_hw_radio_revision (struct ath5k_hw *ah, unsigned int chan)
static void ath5k_hw_request_rfgain_probe (struct ath5k_hw *ah)
static int ath5k_hw_rf2425_channel (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static int ath5k_hw_rf5110_calibrate (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static u32 ath5k_hw_rf5110_chan2athchan (struct ieee80211_channel *channel)
static int ath5k_hw_rf5110_channel (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static int ath5k_hw_rf5111_chan2athchan (unsigned int ieee, struct ath5k_athchan_2ghz *athchan)
static int ath5k_hw_rf5111_channel (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static int ath5k_hw_rf5112_channel (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static int ath5k_hw_rf511x_calibrate (struct ath5k_hw *ah, struct ieee80211_channel *channel)
static bool ath5k_hw_rf_check_gainf_readback (struct ath5k_hw *ah)
static s8 ath5k_hw_rf_gainf_adjust (struct ath5k_hw *ah)
static u32 ath5k_hw_rf_gainf_corr (struct ath5k_hw *ah)
static unsigned int ath5k_hw_rfb_op (struct ath5k_hw *ah, const struct ath5k_rf_reg *rf_regs, u32 val, u8 reg_id, bool set)
int ath5k_hw_rfgain_init (struct ath5k_hw *ah, unsigned int freq)
int ath5k_hw_rfgain_opt_init (struct ath5k_hw *ah)
int ath5k_hw_rfregs_init (struct ath5k_hw *ah, struct ieee80211_channel *channel, unsigned int mode)
void ath5k_hw_set_antenna_mode (struct ath5k_hw *ah, u8 ant_mode)
void ath5k_hw_set_def_antenna (struct ath5k_hw *ah, u8 ant)
static void ath5k_hw_set_fast_div (struct ath5k_hw *ah, u8 ee_mode, bool enable)
void ath5k_hw_set_spur_mitigation_filter (struct ath5k_hw *ah, struct ieee80211_channel *channel)
int ath5k_hw_set_txpower_limit (struct ath5k_hw *ah, u8 txpower)
int ath5k_hw_txpower (struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 ee_mode, u8 txpower)
static int ath5k_setup_channel_powertable (struct ath5k_hw *ah, struct ieee80211_channel *channel, u8 ee_mode, u8 type)
static void ath5k_setup_pcdac_table (struct ath5k_hw *ah)
static void ath5k_setup_pwr_to_pdadc_table (struct ath5k_hw *ah, u8 pdcurves, u8 *pdg_to_idx)
static void ath5k_setup_rate_powertable (struct ath5k_hw *ah, u16 max_pwr, struct ath5k_rate_pcal_info *rate_info, u8 ee_mode)

Define Documentation

#define _ATH5K_PHY

Definition at line 23 of file linux_ks/hwi/ath5k_raw/module/phy.c.


Function Documentation

bool ath5k_channel_ok ( struct ath5k_hw ah,
u16  freq,
unsigned int  flags 
)

Definition at line 830 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_combine_linear_pcdac_curves ( struct ath5k_hw ah,
s16 table_min,
s16 table_max,
u8  pdcurves 
) [static]

Definition at line 2329 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_combine_pwr_to_pdadc_curves ( struct ath5k_hw ah,
s16 pwr_min,
s16 pwr_max,
u8  pdcurves 
) [static]

Definition at line 2466 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_create_power_curve ( s16  pmin,
s16  pmax,
const s16 pwr,
const u8 vpd,
u8  num_points,
u8 vpd_table,
u8  type 
) [static]

Definition at line 1980 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_fill_pwr_to_pcdac_table ( struct ath5k_hw ah,
s16 table_min,
s16 table_max 
) [static]

Definition at line 2283 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_get_chan_pcal_surrounding_piers ( struct ath5k_hw ah,
struct ieee80211_channel channel,
struct ath5k_chan_pcal_info **  pcinfo_l,
struct ath5k_chan_pcal_info **  pcinfo_r 
) [static]

Definition at line 2032 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static s16 ath5k_get_interpolated_value ( s16  target,
s16  x_left,
s16  x_right,
s16  y_left,
s16  y_right 
) [static]

Definition at line 1891 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static s16 ath5k_get_linear_pcdac_min ( const u8 stepL,
const u8 stepR,
const s16 pwrL,
const s16 pwrR 
) [static]

Definition at line 1924 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_get_rate_pcal_data ( struct ath5k_hw ah,
struct ieee80211_channel channel,
struct ath5k_rate_pcal_info rates 
) [static]

Definition at line 2112 of file linux_ks/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_calibration_poll ( struct ath5k_hw ah)

Definition at line 1108 of file linux_ks/hwi/ath5k_raw/module/phy.c.

bool ath5k_hw_chan_has_spur_noise ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1391 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1051 of file linux_ks/hwi/ath5k_raw/module/phy.c.

Definition at line 377 of file linux_ks/hwi/ath5k_raw/module/phy.c.

unsigned int ath5k_hw_get_def_antenna ( struct ath5k_hw ah)

Definition at line 1708 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_noise_floor_calibration ( struct ath5k_hw ah,
short  freq 
)

ath5k_hw_noise_floor_calibration - perform PHY noise floor calibration

: struct ath5k_hw pointer we are operating on : the channel frequency, just used for error logging

This function performs a noise floor calibration of the PHY and waits for it to complete. Then the noise floor value is compared to some maximum noise floor we consider valid.

Note that this is different from what the madwifi HAL does: it reads the noise floor and afterwards initiates the calibration. Since the noise floor calibration can take some time to finish, depending on the current channel use, that avoids the occasional timeout warnings we are seeing now.

See the following link for an Atheros patent on noise floor calibration: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL \ &p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&r=1&f=G&l=50&s1=7245893.PN.&OS=PN/7

XXX: Since during noise floor calibration antennas are detached according to the patent, we should stop tx queues here.

Definition at line 1153 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_phy_calibrate ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1374 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_phy_disable ( struct ath5k_hw ah)

Definition at line 1638 of file linux_ks/hwi/ath5k_raw/module/phy.c.

u16 ath5k_hw_radio_revision ( struct ath5k_hw ah,
unsigned int  chan 
)

Definition at line 1650 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_hw_request_rfgain_probe ( struct ath5k_hw ah) [static]

Definition at line 176 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf2425_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 1012 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf5110_calibrate ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 1205 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static u32 ath5k_hw_rf5110_chan2athchan ( struct ieee80211_channel channel) [static]

Definition at line 848 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf5110_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 868 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf5111_chan2athchan ( unsigned int  ieee,
struct ath5k_athchan_2ghz athchan 
) [static]

Definition at line 887 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf5111_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 916 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf5112_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 964 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_hw_rf511x_calibrate ( struct ath5k_hw ah,
struct ieee80211_channel channel 
) [static]

Definition at line 1305 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static bool ath5k_hw_rf_check_gainf_readback ( struct ath5k_hw ah) [static]

Definition at line 253 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static s8 ath5k_hw_rf_gainf_adjust ( struct ath5k_hw ah) [static]

Definition at line 307 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static u32 ath5k_hw_rf_gainf_corr ( struct ath5k_hw ah) [static]

Definition at line 196 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static unsigned int ath5k_hw_rfb_op ( struct ath5k_hw ah,
const struct ath5k_rf_reg rf_regs,
u32  val,
u8  reg_id,
bool  set 
) [static]

Definition at line 36 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_rfgain_init ( struct ath5k_hw ah,
unsigned int  freq 
)

Definition at line 442 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_rfgain_opt_init ( struct ath5k_hw ah)

Definition at line 143 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_rfregs_init ( struct ath5k_hw ah,
struct ieee80211_channel channel,
unsigned int  mode 
)

Definition at line 504 of file linux_ks/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_antenna_mode ( struct ath5k_hw ah,
u8  ant_mode 
)

Definition at line 1763 of file linux_ks/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_def_antenna ( struct ath5k_hw ah,
u8  ant 
)

Definition at line 1700 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_hw_set_fast_div ( struct ath5k_hw ah,
u8  ee_mode,
bool  enable 
) [static]

Definition at line 1722 of file linux_ks/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_spur_mitigation_filter ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1412 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_set_txpower_limit ( struct ath5k_hw ah,
u8  txpower 
)

Definition at line 3045 of file linux_ks/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_txpower ( struct ath5k_hw ah,
struct ieee80211_channel channel,
u8  ee_mode,
u8  txpower 
)

Definition at line 2946 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static int ath5k_setup_channel_powertable ( struct ath5k_hw ah,
struct ieee80211_channel channel,
u8  ee_mode,
u8  type 
) [static]

Definition at line 2651 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_setup_pcdac_table ( struct ath5k_hw ah) [static]

Definition at line 2437 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_setup_pwr_to_pdadc_table ( struct ath5k_hw ah,
u8  pdcurves,
u8 pdg_to_idx 
) [static]

Definition at line 2586 of file linux_ks/hwi/ath5k_raw/module/phy.c.

static void ath5k_setup_rate_powertable ( struct ath5k_hw ah,
u16  max_pwr,
struct ath5k_rate_pcal_info rate_info,
u8  ee_mode 
) [static]

Definition at line 2873 of file linux_ks/hwi/ath5k_raw/module/phy.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:13