Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
phy_hal.h File Reference
#include <brcmu_utils.h>
#include <brcmu_wifi.h>
#include <phy_shim.h>

Go to the source code of this file.

Data Structures

struct  txpwr_limits
struct  tx_power
struct  tx_inst_power
struct  brcms_chanvec
struct  shared_phy_params


#define IDCODE_VER_MASK   0x0000000f
#define IDCODE_VER_SHIFT   0
#define IDCODE_MFG_MASK   0x00000fff
#define IDCODE_MFG_SHIFT   0
#define IDCODE_ID_MASK   0x0ffff000
#define IDCODE_ID_SHIFT   12
#define IDCODE_REV_MASK   0xf0000000
#define IDCODE_REV_SHIFT   28
#define NORADIO_ID   0xe4f5
#define NORADIO_IDCODE   0x4e4f5246
#define BCM2055_ID   0x2055
#define BCM2055_IDCODE   0x02055000
#define BCM2055A0_IDCODE   0x1205517f
#define BCM2056_ID   0x2056
#define BCM2056_IDCODE   0x02056000
#define BCM2056A0_IDCODE   0x1205617f
#define BCM2057_ID   0x2057
#define BCM2057_IDCODE   0x02057000
#define BCM2057A0_IDCODE   0x1205717f
#define BCM2064_ID   0x2064
#define BCM2064_IDCODE   0x02064000
#define BCM2064A0_IDCODE   0x0206417f
#define PHY_TPC_HW_OFF   false
#define PHY_TPC_HW_ON   true
#define PHY_PERICAL_UP_BSS   6
#define PHY_PERICAL_CHAN   7
#define PHY_FULLCAL   8
#define PHY_HOLD_FOR_ASSOC   1
#define PHY_HOLD_FOR_SCAN   2
#define PHY_HOLD_FOR_RM   4
#define PHY_HOLD_FOR_PLT   8
#define PHY_HOLD_FOR_MUTE   16
#define PHY_HOLD_FOR_NOT_ASSOC   0x20
#define PHY_MUTE_ALL   0xffffffff
#define PHY_NOISE_FIXED_VAL   (-95)
#define PHY_NOISE_FIXED_VAL_NPHY   (-92)
#define PHY_MODE_CAL   0x0002
#define PHY_MODE_NOISEM   0x0004
#define BRCMS_TXPWR_MAX   (127) /* ~32 dBm = 1,500 mW */
#define BRCMS_RSSI_INVALID   0 /* invalid RSSI value */


struct shared_phywlc_phy_shared_attach (struct shared_phy_params *shp)
struct brcms_phy_pubwlc_phy_attach (struct shared_phy *sh, struct bcma_device *d11core, int bandtype, struct wiphy *wiphy)
void wlc_phy_detach (struct brcms_phy_pub *ppi)
bool wlc_phy_get_phyversion (struct brcms_phy_pub *pih, u16 *phytype, u16 *phyrev, u16 *radioid, u16 *radiover)
bool wlc_phy_get_encore (struct brcms_phy_pub *pih)
u32 wlc_phy_get_coreflags (struct brcms_phy_pub *pih)
void wlc_phy_hw_clk_state_upd (struct brcms_phy_pub *ppi, bool newstate)
void wlc_phy_hw_state_upd (struct brcms_phy_pub *ppi, bool newstate)
void wlc_phy_init (struct brcms_phy_pub *ppi, u16 chanspec)
void wlc_phy_watchdog (struct brcms_phy_pub *ppi)
int wlc_phy_down (struct brcms_phy_pub *ppi)
u32 wlc_phy_clk_bwbits (struct brcms_phy_pub *pih)
void wlc_phy_cal_init (struct brcms_phy_pub *ppi)
void wlc_phy_antsel_init (struct brcms_phy_pub *ppi, bool lut_init)
void wlc_phy_chanspec_set (struct brcms_phy_pub *ppi, u16 chanspec)
u16 wlc_phy_chanspec_get (struct brcms_phy_pub *ppi)
void wlc_phy_chanspec_radio_set (struct brcms_phy_pub *ppi, u16 newch)
u16 wlc_phy_bw_state_get (struct brcms_phy_pub *ppi)
void wlc_phy_bw_state_set (struct brcms_phy_pub *ppi, u16 bw)
int wlc_phy_rssi_compute (struct brcms_phy_pub *pih, struct d11rxhdr *rxh)
void wlc_phy_por_inform (struct brcms_phy_pub *ppi)
void wlc_phy_noise_sample_intr (struct brcms_phy_pub *ppi)
bool wlc_phy_bist_check_phy (struct brcms_phy_pub *ppi)
void wlc_phy_set_deaf (struct brcms_phy_pub *ppi, bool user_flag)
void wlc_phy_switch_radio (struct brcms_phy_pub *ppi, bool on)
void wlc_phy_anacore (struct brcms_phy_pub *ppi, bool on)
void wlc_phy_BSSinit (struct brcms_phy_pub *ppi, bool bonlyap, int rssi)
void wlc_phy_chanspec_ch14_widefilter_set (struct brcms_phy_pub *ppi, bool wide_filter)
void wlc_phy_chanspec_band_validch (struct brcms_phy_pub *ppi, uint band, struct brcms_chanvec *channels)
u16 wlc_phy_chanspec_band_firstch (struct brcms_phy_pub *ppi, uint band)
void wlc_phy_txpower_sromlimit (struct brcms_phy_pub *ppi, uint chan, u8 *_min_, u8 *_max_, int rate)
void wlc_phy_txpower_sromlimit_max_get (struct brcms_phy_pub *ppi, uint chan, u8 *_max_, u8 *_min_)
void wlc_phy_txpower_boardlimit_band (struct brcms_phy_pub *ppi, uint band, s32 *, s32 *, u32 *)
void wlc_phy_txpower_limit_set (struct brcms_phy_pub *ppi, struct txpwr_limits *, u16 chanspec)
int wlc_phy_txpower_get (struct brcms_phy_pub *ppi, uint *qdbm, bool *override)
int wlc_phy_txpower_set (struct brcms_phy_pub *ppi, uint qdbm, bool override)
void wlc_phy_txpower_target_set (struct brcms_phy_pub *ppi, struct txpwr_limits *)
bool wlc_phy_txpower_hw_ctrl_get (struct brcms_phy_pub *ppi)
void wlc_phy_txpower_hw_ctrl_set (struct brcms_phy_pub *ppi, bool hwpwrctrl)
u8 wlc_phy_txpower_get_target_min (struct brcms_phy_pub *ppi)
u8 wlc_phy_txpower_get_target_max (struct brcms_phy_pub *ppi)
bool wlc_phy_txpower_ipa_ison (struct brcms_phy_pub *pih)
void wlc_phy_stf_chain_init (struct brcms_phy_pub *pih, u8 txchain, u8 rxchain)
void wlc_phy_stf_chain_set (struct brcms_phy_pub *pih, u8 txchain, u8 rxchain)
void wlc_phy_stf_chain_get (struct brcms_phy_pub *pih, u8 *txchain, u8 *rxchain)
u8 wlc_phy_stf_chain_active_get (struct brcms_phy_pub *pih)
s8 wlc_phy_stf_ssmode_get (struct brcms_phy_pub *pih, u16 chanspec)
void wlc_phy_ldpc_override_set (struct brcms_phy_pub *ppi, bool val)
void wlc_phy_cal_perical (struct brcms_phy_pub *ppi, u8 reason)
void wlc_phy_noise_sample_request_external (struct brcms_phy_pub *ppi)
void wlc_phy_edcrs_lock (struct brcms_phy_pub *pih, bool lock)
void wlc_phy_cal_papd_recal (struct brcms_phy_pub *ppi)
void wlc_phy_ant_rxdiv_set (struct brcms_phy_pub *ppi, u8 val)
void wlc_phy_clear_tssi (struct brcms_phy_pub *ppi)
void wlc_phy_hold_upd (struct brcms_phy_pub *ppi, u32 id, bool val)
void wlc_phy_mute_upd (struct brcms_phy_pub *ppi, bool val, u32 flags)
void wlc_phy_antsel_type_set (struct brcms_phy_pub *ppi, u8 antsel_type)
void wlc_phy_txpower_get_current (struct brcms_phy_pub *ppi, struct tx_power *power, uint channel)
void wlc_phy_initcal_enable (struct brcms_phy_pub *pih, bool initcal)
bool wlc_phy_test_ison (struct brcms_phy_pub *ppi)
void wlc_phy_txpwr_percent_set (struct brcms_phy_pub *ppi, u8 txpwr_percent)
void wlc_phy_ofdm_rateset_war (struct brcms_phy_pub *pih, bool war)
void wlc_phy_bf_preempt_enable (struct brcms_phy_pub *pih, bool bf_preempt)
void wlc_phy_machwcap_set (struct brcms_phy_pub *ppi, u32 machwcap)
void wlc_phy_runbist_config (struct brcms_phy_pub *ppi, bool start_end)
void wlc_phy_freqtrack_start (struct brcms_phy_pub *ppi)
void wlc_phy_freqtrack_end (struct brcms_phy_pub *ppi)
const u8wlc_phy_get_ofdm_rate_lookup (void)
s8 wlc_phy_get_tx_power_offset_by_mcs (struct brcms_phy_pub *ppi, u8 mcs_offset)
s8 wlc_phy_get_tx_power_offset (struct brcms_phy_pub *ppi, u8 tbl_offset)

Macro Definition Documentation

#define BCM2055_ID   0x2055

Definition at line 40 of file phy_hal.h.

#define BCM2055_IDCODE   0x02055000

Definition at line 41 of file phy_hal.h.

#define BCM2055A0_IDCODE   0x1205517f

Definition at line 42 of file phy_hal.h.

#define BCM2056_ID   0x2056

Definition at line 44 of file phy_hal.h.

#define BCM2056_IDCODE   0x02056000

Definition at line 45 of file phy_hal.h.

#define BCM2056A0_IDCODE   0x1205617f

Definition at line 46 of file phy_hal.h.

#define BCM2057_ID   0x2057

Definition at line 48 of file phy_hal.h.

#define BCM2057_IDCODE   0x02057000

Definition at line 49 of file phy_hal.h.

#define BCM2057A0_IDCODE   0x1205717f

Definition at line 50 of file phy_hal.h.

#define BCM2064_ID   0x2064

Definition at line 52 of file phy_hal.h.

#define BCM2064_IDCODE   0x02064000

Definition at line 53 of file phy_hal.h.

#define BCM2064A0_IDCODE   0x0206417f

Definition at line 54 of file phy_hal.h.


Definition at line 97 of file phy_hal.h.


Definition at line 99 of file phy_hal.h.


Definition at line 100 of file phy_hal.h.


Definition at line 101 of file phy_hal.h.


Definition at line 102 of file phy_hal.h.


Definition at line 98 of file phy_hal.h.

#define BRCMS_RSSI_INVALID   0 /* invalid RSSI value */

Definition at line 104 of file phy_hal.h.


Definition at line 90 of file phy_hal.h.

#define BRCMS_TXPWR_MAX   (127) /* ~32 dBm = 1,500 mW */

Definition at line 95 of file phy_hal.h.

#define IDCODE_ID_MASK   0x0ffff000

Definition at line 32 of file phy_hal.h.

#define IDCODE_ID_SHIFT   12

Definition at line 33 of file phy_hal.h.

#define IDCODE_MFG_MASK   0x00000fff

Definition at line 30 of file phy_hal.h.

#define IDCODE_MFG_SHIFT   0

Definition at line 31 of file phy_hal.h.

#define IDCODE_REV_MASK   0xf0000000

Definition at line 34 of file phy_hal.h.

#define IDCODE_REV_SHIFT   28

Definition at line 35 of file phy_hal.h.

#define IDCODE_VER_MASK   0x0000000f

Definition at line 28 of file phy_hal.h.

#define IDCODE_VER_SHIFT   0

Definition at line 29 of file phy_hal.h.

#define NORADIO_ID   0xe4f5

Definition at line 37 of file phy_hal.h.

#define NORADIO_IDCODE   0x4e4f5246

Definition at line 38 of file phy_hal.h.

#define PHY_FULLCAL   8

Definition at line 66 of file phy_hal.h.

#define PHY_HOLD_FOR_ASSOC   1

Definition at line 73 of file phy_hal.h.

#define PHY_HOLD_FOR_MUTE   16

Definition at line 77 of file phy_hal.h.

#define PHY_HOLD_FOR_NOT_ASSOC   0x20

Definition at line 78 of file phy_hal.h.

#define PHY_HOLD_FOR_PLT   8

Definition at line 76 of file phy_hal.h.

#define PHY_HOLD_FOR_RM   4

Definition at line 75 of file phy_hal.h.

#define PHY_HOLD_FOR_SCAN   2

Definition at line 74 of file phy_hal.h.

#define PHY_MODE_CAL   0x0002

Definition at line 87 of file phy_hal.h.

#define PHY_MODE_NOISEM   0x0004

Definition at line 88 of file phy_hal.h.

#define PHY_MUTE_ALL   0xffffffff

Definition at line 81 of file phy_hal.h.


Definition at line 80 of file phy_hal.h.

#define PHY_NOISE_FIXED_VAL   (-95)

Definition at line 83 of file phy_hal.h.


Definition at line 85 of file phy_hal.h.

#define PHY_NOISE_FIXED_VAL_NPHY   (-92)

Definition at line 84 of file phy_hal.h.

#define PHY_PERICAL_CHAN   7

Definition at line 65 of file phy_hal.h.


Definition at line 68 of file phy_hal.h.


Definition at line 59 of file phy_hal.h.


Definition at line 62 of file phy_hal.h.


Definition at line 71 of file phy_hal.h.


Definition at line 70 of file phy_hal.h.


Definition at line 61 of file phy_hal.h.


Definition at line 69 of file phy_hal.h.


Definition at line 63 of file phy_hal.h.

#define PHY_PERICAL_UP_BSS   6

Definition at line 64 of file phy_hal.h.


Definition at line 60 of file phy_hal.h.

#define PHY_TPC_HW_OFF   false

Definition at line 56 of file phy_hal.h.

#define PHY_TPC_HW_ON   true

Definition at line 57 of file phy_hal.h.

Function Documentation

void wlc_phy_anacore ( struct brcms_phy_pub ppi,
bool  on 

Definition at line 642 of file phy_cmn.c.

void wlc_phy_ant_rxdiv_set ( struct brcms_phy_pub ppi,
u8  val 

Definition at line 2160 of file phy_cmn.c.

void wlc_phy_antsel_init ( struct brcms_phy_pub ppi,
bool  lut_init 

Definition at line 21345 of file phy_n.c.

void wlc_phy_antsel_type_set ( struct brcms_phy_pub ppi,
u8  antsel_type 

Definition at line 2146 of file phy_cmn.c.

struct brcms_phy_pub* wlc_phy_attach ( struct shared_phy sh,
struct bcma_device d11core,
int  bandtype,
struct wiphy wiphy 

Definition at line 434 of file phy_cmn.c.

void wlc_phy_bf_preempt_enable ( struct brcms_phy_pub pih,
bool  bf_preempt 

Definition at line 1898 of file phy_cmn.c.

bool wlc_phy_bist_check_phy ( struct brcms_phy_pub ppi)

Definition at line 14122 of file phy_n.c.

void wlc_phy_BSSinit ( struct brcms_phy_pub ppi,
bool  bonlyap,
int  rssi 

Definition at line 2661 of file phy_cmn.c.

u16 wlc_phy_bw_state_get ( struct brcms_phy_pub ppi)

Definition at line 1155 of file phy_cmn.c.

void wlc_phy_bw_state_set ( struct brcms_phy_pub ppi,
u16  bw 

Definition at line 1162 of file phy_cmn.c.

void wlc_phy_cal_init ( struct brcms_phy_pub ppi)

Definition at line 804 of file phy_cmn.c.

void wlc_phy_cal_papd_recal ( struct brcms_phy_pub ppi)
void wlc_phy_cal_perical ( struct brcms_phy_pub ppi,
u8  reason 

Definition at line 2718 of file phy_cmn.c.

u16 wlc_phy_chanspec_band_firstch ( struct brcms_phy_pub ppi,
uint  band 

Definition at line 1273 of file phy_cmn.c.

void wlc_phy_chanspec_band_validch ( struct brcms_phy_pub ppi,
uint  band,
struct brcms_chanvec channels 

Definition at line 1251 of file phy_cmn.c.

void wlc_phy_chanspec_ch14_widefilter_set ( struct brcms_phy_pub ppi,
bool  wide_filter 

Definition at line 1231 of file phy_cmn.c.

u16 wlc_phy_chanspec_get ( struct brcms_phy_pub ppi)

Definition at line 1176 of file phy_cmn.c.

void wlc_phy_chanspec_radio_set ( struct brcms_phy_pub ppi,
u16  newch 

Definition at line 1169 of file phy_cmn.c.

void wlc_phy_chanspec_set ( struct brcms_phy_pub ppi,
u16  chanspec 

Definition at line 1183 of file phy_cmn.c.

void wlc_phy_clear_tssi ( struct brcms_phy_pub ppi)

Definition at line 1102 of file phy_cmn.c.

u32 wlc_phy_clk_bwbits ( struct brcms_phy_pub pih)

Definition at line 679 of file phy_cmn.c.

void wlc_phy_detach ( struct brcms_phy_pub ppi)

Definition at line 592 of file phy_cmn.c.

int wlc_phy_down ( struct brcms_phy_pub ppi)

Definition at line 822 of file phy_cmn.c.

void wlc_phy_edcrs_lock ( struct brcms_phy_pub pih,
bool  lock 

Definition at line 711 of file phy_cmn.c.

void wlc_phy_freqtrack_end ( struct brcms_phy_pub ppi)

Definition at line 2585 of file phy_cmn.c.

void wlc_phy_freqtrack_start ( struct brcms_phy_pub ppi)

Definition at line 2580 of file phy_cmn.c.

u32 wlc_phy_get_coreflags ( struct brcms_phy_pub pih)

Definition at line 636 of file phy_cmn.c.

bool wlc_phy_get_encore ( struct brcms_phy_pub pih)

Definition at line 630 of file phy_cmn.c.

const u8* wlc_phy_get_ofdm_rate_lookup ( void  )

Definition at line 2896 of file phy_cmn.c.

bool wlc_phy_get_phyversion ( struct brcms_phy_pub pih,
u16 phytype,
u16 phyrev,
u16 radioid,
u16 radiover 

Definition at line 618 of file phy_cmn.c.

s8 wlc_phy_get_tx_power_offset ( struct brcms_phy_pub ppi,
u8  tbl_offset 
s8 wlc_phy_get_tx_power_offset_by_mcs ( struct brcms_phy_pub ppi,
u8  mcs_offset 
void wlc_phy_hold_upd ( struct brcms_phy_pub ppi,
u32  id,
bool  val 

Definition at line 1076 of file phy_cmn.c.

void wlc_phy_hw_clk_state_upd ( struct brcms_phy_pub ppi,
bool  newstate 

Definition at line 730 of file phy_cmn.c.

void wlc_phy_hw_state_upd ( struct brcms_phy_pub ppi,
bool  newstate 

Definition at line 740 of file phy_cmn.c.

void wlc_phy_init ( struct brcms_phy_pub ppi,
u16  chanspec 

Definition at line 750 of file phy_cmn.c.

void wlc_phy_initcal_enable ( struct brcms_phy_pub pih,
bool  initcal 

Definition at line 723 of file phy_cmn.c.

void wlc_phy_ldpc_override_set ( struct brcms_phy_pub ppi,
bool  val 

Definition at line 2941 of file phy_cmn.c.

void wlc_phy_machwcap_set ( struct brcms_phy_pub ppi,
u32  machwcap 

Definition at line 1829 of file phy_cmn.c.

void wlc_phy_mute_upd ( struct brcms_phy_pub ppi,
bool  val,
u32  flags 

Definition at line 1088 of file phy_cmn.c.

void wlc_phy_noise_sample_intr ( struct brcms_phy_pub ppi)

Definition at line 2293 of file phy_cmn.c.

void wlc_phy_noise_sample_request_external ( struct brcms_phy_pub ppi)

Definition at line 2473 of file phy_cmn.c.

void wlc_phy_ofdm_rateset_war ( struct brcms_phy_pub pih,
bool  war 

Definition at line 1891 of file phy_cmn.c.

void wlc_phy_por_inform ( struct brcms_phy_pub ppi)

Definition at line 704 of file phy_cmn.c.

int wlc_phy_rssi_compute ( struct brcms_phy_pub pih,
struct d11rxhdr rxh 

Definition at line 2538 of file phy_cmn.c.

void wlc_phy_runbist_config ( struct brcms_phy_pub ppi,
bool  start_end 

Definition at line 1836 of file phy_cmn.c.

void wlc_phy_set_deaf ( struct brcms_phy_pub ppi,
bool  user_flag 

Definition at line 2590 of file phy_cmn.c.

struct shared_phy* wlc_phy_shared_attach ( struct shared_phy_params shp)

Definition at line 369 of file phy_cmn.c.

u8 wlc_phy_stf_chain_active_get ( struct brcms_phy_pub pih)

Definition at line 2845 of file phy_cmn.c.

void wlc_phy_stf_chain_get ( struct brcms_phy_pub pih,
u8 txchain,
u8 rxchain 

Definition at line 2837 of file phy_cmn.c.

void wlc_phy_stf_chain_init ( struct brcms_phy_pub pih,
u8  txchain,
u8  rxchain 

Definition at line 2814 of file phy_cmn.c.

void wlc_phy_stf_chain_set ( struct brcms_phy_pub pih,
u8  txchain,
u8  rxchain 

Definition at line 2825 of file phy_cmn.c.

s8 wlc_phy_stf_ssmode_get ( struct brcms_phy_pub pih,
u16  chanspec 

Definition at line 2877 of file phy_cmn.c.

void wlc_phy_switch_radio ( struct brcms_phy_pub ppi,
bool  on 

Definition at line 1121 of file phy_cmn.c.

bool wlc_phy_test_ison ( struct brcms_phy_pub ppi)

Definition at line 2153 of file phy_cmn.c.

void wlc_phy_txpower_boardlimit_band ( struct brcms_phy_pub ppi,
uint  band,
s32 ,
s32 ,

Definition at line 1493 of file phy_cmn.c.

int wlc_phy_txpower_get ( struct brcms_phy_pub ppi,
uint qdbm,
bool override 

Definition at line 1317 of file phy_cmn.c.

void wlc_phy_txpower_get_current ( struct brcms_phy_pub ppi,
struct tx_power power,
uint  channel 

Definition at line 2047 of file phy_cmn.c.

u8 wlc_phy_txpower_get_target_max ( struct brcms_phy_pub ppi)

Definition at line 1506 of file phy_cmn.c.

u8 wlc_phy_txpower_get_target_min ( struct brcms_phy_pub ppi)

Definition at line 1499 of file phy_cmn.c.

bool wlc_phy_txpower_hw_ctrl_get ( struct brcms_phy_pub ppi)

Definition at line 1955 of file phy_cmn.c.

void wlc_phy_txpower_hw_ctrl_set ( struct brcms_phy_pub ppi,
bool  hwpwrctrl 

Definition at line 1965 of file phy_cmn.c.

bool wlc_phy_txpower_ipa_ison ( struct brcms_phy_pub pih)

Definition at line 2959 of file phy_cmn.c.

void wlc_phy_txpower_limit_set ( struct brcms_phy_pub ppi,
struct txpwr_limits ,
u16  chanspec 

Definition at line 1866 of file phy_cmn.c.

int wlc_phy_txpower_set ( struct brcms_phy_pub ppi,
uint  qdbm,
bool  override 

Definition at line 1377 of file phy_cmn.c.

void wlc_phy_txpower_sromlimit ( struct brcms_phy_pub ppi,
uint  chan,
u8 _min_,
u8 _max_,
int  rate 

Definition at line 1412 of file phy_cmn.c.

void wlc_phy_txpower_sromlimit_max_get ( struct brcms_phy_pub ppi,
uint  chan,
u8 _max_,
u8 _min_ 

Definition at line 1461 of file phy_cmn.c.

void wlc_phy_txpower_target_set ( struct brcms_phy_pub ppi,
struct txpwr_limits  

Definition at line 1327 of file phy_cmn.c.

void wlc_phy_txpwr_percent_set ( struct brcms_phy_pub ppi,
u8  txpwr_percent 

Definition at line 1822 of file phy_cmn.c.

void wlc_phy_watchdog ( struct brcms_phy_pub ppi)

Definition at line 2601 of file phy_cmn.c.