Defines | Functions
phy.c File Reference
#include <time.h>
#include <misc/timespec_operations.h>
#include "ath5k.h"
#include "reg.h"
#include "base.h"
#include "rfbuffer.h"
#include "rfgain.h"
Include dependency graph for MaRTE_OS/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 54 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.


Function Documentation

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

Definition at line 861 of file MaRTE_OS/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 2360 of file MaRTE_OS/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 2497 of file MaRTE_OS/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 2011 of file MaRTE_OS/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 2314 of file MaRTE_OS/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 2063 of file MaRTE_OS/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 1922 of file MaRTE_OS/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 1955 of file MaRTE_OS/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 2143 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_calibration_poll ( struct ath5k_hw ah)

Definition at line 1139 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

bool ath5k_hw_chan_has_spur_noise ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1422 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_channel ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1082 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

Definition at line 408 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

unsigned int ath5k_hw_get_def_antenna ( struct ath5k_hw ah)

Definition at line 1739 of file MaRTE_OS/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 1184 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_phy_calibrate ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1405 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_phy_disable ( struct ath5k_hw ah)

Definition at line 1669 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

u16 ath5k_hw_radio_revision ( struct ath5k_hw ah,
unsigned int  chan 
)

Definition at line 1681 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static void ath5k_hw_request_rfgain_probe ( struct ath5k_hw ah) [static]

Definition at line 207 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 1043 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 1236 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static u32 ath5k_hw_rf5110_chan2athchan ( struct ieee80211_channel channel) [static]

Definition at line 879 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 899 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 918 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 947 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 995 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

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

Definition at line 1336 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static bool ath5k_hw_rf_check_gainf_readback ( struct ath5k_hw ah) [static]

Definition at line 284 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static s8 ath5k_hw_rf_gainf_adjust ( struct ath5k_hw ah) [static]

Definition at line 338 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static u32 ath5k_hw_rf_gainf_corr ( struct ath5k_hw ah) [static]

Definition at line 227 of file MaRTE_OS/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 67 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_rfgain_init ( struct ath5k_hw ah,
unsigned int  freq 
)

Definition at line 473 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_rfgain_opt_init ( struct ath5k_hw ah)

Definition at line 174 of file MaRTE_OS/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 535 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_antenna_mode ( struct ath5k_hw ah,
u8  ant_mode 
)

Definition at line 1794 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_def_antenna ( struct ath5k_hw ah,
u8  ant 
)

Definition at line 1731 of file MaRTE_OS/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 1753 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

void ath5k_hw_set_spur_mitigation_filter ( struct ath5k_hw ah,
struct ieee80211_channel channel 
)

Definition at line 1443 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

int ath5k_hw_set_txpower_limit ( struct ath5k_hw ah,
u8  txpower 
)

Definition at line 3076 of file MaRTE_OS/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 2977 of file MaRTE_OS/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 2682 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.

static void ath5k_setup_pcdac_table ( struct ath5k_hw ah) [static]

Definition at line 2468 of file MaRTE_OS/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 2617 of file MaRTE_OS/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 2904 of file MaRTE_OS/hwi/ath5k_raw/module/phy.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Fri Jan 3 2014 12:07:57