Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
phy_common.h File Reference
#include <linux/types.h>
#include <linux/nl80211.h>

Go to the source code of this file.

Data Structures

struct  b43_c32
 
struct  b43_phy_operations
 
struct  b43_phy
 

Macros

#define CORDIC_CONVERT(value)
 
#define B43_PHYROUTE   0x0C00 /* PHY register routing bits mask */
 
#define B43_PHYROUTE_BASE   0x0000 /* Base registers */
 
#define B43_PHYROUTE_OFDM_GPHY   0x0400 /* OFDM register routing for G-PHYs */
 
#define B43_PHYROUTE_EXT_GPHY   0x0800 /* Extended G-PHY registers */
 
#define B43_PHYROUTE_N_BMODE   0x0C00 /* N-PHY BMODE registers */
 
#define B43_PHY_CCK(reg)   ((reg) | B43_PHYROUTE_BASE)
 
#define B43_PHY_N(reg)   ((reg) | B43_PHYROUTE_BASE)
 
#define B43_PHY_N_BMODE(reg)   ((reg) | B43_PHYROUTE_N_BMODE)
 
#define B43_PHY_OFDM(reg)   ((reg) | B43_PHYROUTE_OFDM_GPHY)
 
#define B43_PHY_EXTG(reg)   ((reg) | B43_PHYROUTE_EXT_GPHY)
 
#define B43_PHYVER_ANALOG   0xF000
 
#define B43_PHYVER_ANALOG_SHIFT   12
 
#define B43_PHYVER_TYPE   0x0F00
 
#define B43_PHYVER_TYPE_SHIFT   8
 
#define B43_PHYVER_VERSION   0x00FF
 
#define B43_MAX_WRITES_IN_ROW   24
 
#define b43_radio_read16   b43_radio_read /* DEPRECATED */
 
#define b43_radio_write16   b43_radio_write /* DEPRECATED */
 
#define B43_DEFAULT_CHANNEL   UINT_MAX
 

Enumerations

enum  b43_interference_mitigation { B43_INTERFMODE_NONE, B43_INTERFMODE_NONWLAN, B43_INTERFMODE_MANUALWLAN, B43_INTERFMODE_AUTOWLAN }
 
enum  {
  B43_ANTENNA0 = 0, B43_ANTENNA1 = 1, B43_ANTENNA_AUTO0 = 2, B43_ANTENNA_AUTO1 = 3,
  B43_ANTENNA2 = 4, B43_ANTENNA3 = 8, B43_ANTENNA_AUTO = B43_ANTENNA_AUTO0, B43_ANTENNA_DEFAULT = B43_ANTENNA_AUTO
}
 
enum  b43_txpwr_result { B43_TXPWR_RES_NEED_ADJUST, B43_TXPWR_RES_DONE }
 
enum  b43_phy_txpower_check_flags { B43_TXPWR_IGNORE_TIME = (1 << 0), B43_TXPWR_IGNORE_TSSI = (1 << 1) }
 

Functions

int b43_phy_allocate (struct b43_wldev *dev)
 
void b43_phy_free (struct b43_wldev *dev)
 
int b43_phy_init (struct b43_wldev *dev)
 
void b43_phy_exit (struct b43_wldev *dev)
 
bool b43_has_hardware_pctl (struct b43_wldev *dev)
 
u16 b43_phy_read (struct b43_wldev *dev, u16 reg)
 
void b43_phy_write (struct b43_wldev *dev, u16 reg, u16 value)
 
void b43_phy_copy (struct b43_wldev *dev, u16 destreg, u16 srcreg)
 
void b43_phy_mask (struct b43_wldev *dev, u16 offset, u16 mask)
 
void b43_phy_set (struct b43_wldev *dev, u16 offset, u16 set)
 
void b43_phy_maskset (struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
 
u16 b43_radio_read (struct b43_wldev *dev, u16 reg)
 
void b43_radio_write (struct b43_wldev *dev, u16 reg, u16 value)
 
void b43_radio_mask (struct b43_wldev *dev, u16 offset, u16 mask)
 
void b43_radio_set (struct b43_wldev *dev, u16 offset, u16 set)
 
void b43_radio_maskset (struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
 
bool b43_radio_wait_value (struct b43_wldev *dev, u16 offset, u16 mask, u16 value, int delay, int timeout)
 
void b43_radio_lock (struct b43_wldev *dev)
 
void b43_radio_unlock (struct b43_wldev *dev)
 
void b43_phy_lock (struct b43_wldev *dev)
 
void b43_phy_unlock (struct b43_wldev *dev)
 
int b43_switch_channel (struct b43_wldev *dev, unsigned int new_channel)
 
void b43_software_rfkill (struct b43_wldev *dev, bool blocked)
 
void b43_phy_txpower_check (struct b43_wldev *dev, unsigned int flags)
 
void b43_phy_txpower_adjust_work (struct work_struct *work)
 
int b43_phy_shm_tssi_read (struct b43_wldev *dev, u16 shm_offset)
 
void b43_phyop_switch_analog_generic (struct b43_wldev *dev, bool on)
 
bool b43_channel_type_is_40mhz (enum nl80211_channel_type channel_type)
 
void b43_phy_force_clock (struct b43_wldev *dev, bool force)
 
struct b43_c32 b43_cordic (int theta)
 

Macro Definition Documentation

#define B43_DEFAULT_CHANNEL   UINT_MAX

B43_DEFAULT_CHANNEL - Switch to the default channel.

Definition at line 400 of file phy_common.h.

#define B43_MAX_WRITES_IN_ROW   24

Definition at line 43 of file phy_common.h.

#define B43_PHY_CCK (   reg)    ((reg) | B43_PHYROUTE_BASE)

Definition at line 24 of file phy_common.h.

#define B43_PHY_EXTG (   reg)    ((reg) | B43_PHYROUTE_EXT_GPHY)

Definition at line 32 of file phy_common.h.

#define B43_PHY_N (   reg)    ((reg) | B43_PHYROUTE_BASE)

Definition at line 26 of file phy_common.h.

#define B43_PHY_N_BMODE (   reg)    ((reg) | B43_PHYROUTE_N_BMODE)

Definition at line 28 of file phy_common.h.

#define B43_PHY_OFDM (   reg)    ((reg) | B43_PHYROUTE_OFDM_GPHY)

Definition at line 30 of file phy_common.h.

#define B43_PHYROUTE   0x0C00 /* PHY register routing bits mask */

Definition at line 17 of file phy_common.h.

#define B43_PHYROUTE_BASE   0x0000 /* Base registers */

Definition at line 18 of file phy_common.h.

#define B43_PHYROUTE_EXT_GPHY   0x0800 /* Extended G-PHY registers */

Definition at line 20 of file phy_common.h.

#define B43_PHYROUTE_N_BMODE   0x0C00 /* N-PHY BMODE registers */

Definition at line 21 of file phy_common.h.

#define B43_PHYROUTE_OFDM_GPHY   0x0400 /* OFDM register routing for G-PHYs */

Definition at line 19 of file phy_common.h.

#define B43_PHYVER_ANALOG   0xF000

Definition at line 36 of file phy_common.h.

#define B43_PHYVER_ANALOG_SHIFT   12

Definition at line 37 of file phy_common.h.

#define B43_PHYVER_TYPE   0x0F00

Definition at line 38 of file phy_common.h.

#define B43_PHYVER_TYPE_SHIFT   8

Definition at line 39 of file phy_common.h.

#define B43_PHYVER_VERSION   0x00FF

Definition at line 40 of file phy_common.h.

#define b43_radio_read16   b43_radio_read /* DEPRECATED */

Definition at line 344 of file phy_common.h.

#define b43_radio_write16   b43_radio_write /* DEPRECATED */

Definition at line 350 of file phy_common.h.

#define CORDIC_CONVERT (   value)
Value:
(((value) >= 0) ? \
((((value) >> 15) + 1) >> 1) : \
-((((-(value)) >> 15) + 1) >> 1))

Definition at line 12 of file phy_common.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
B43_ANTENNA0 
B43_ANTENNA1 
B43_ANTENNA_AUTO0 
B43_ANTENNA_AUTO1 
B43_ANTENNA2 
B43_ANTENNA3 
B43_ANTENNA_AUTO 
B43_ANTENNA_DEFAULT 

Definition at line 61 of file phy_common.h.

enum b43_interference_mitigation - Interference Mitigation mode

: Disabled : Non-WLAN Interference Mitigation : WLAN Interference Mitigation : Automatic WLAN Interference Mitigation

Enumerator:
B43_INTERFMODE_NONE 
B43_INTERFMODE_NONWLAN 
B43_INTERFMODE_MANUALWLAN 
B43_INTERFMODE_AUTOWLAN 

Definition at line 53 of file phy_common.h.

enum b43_phy_txpower_check_flags - Flags for b43_phy_txpower_check()

: Ignore the schedule time and force-redo the check now. : Redo the recalculation, even if the average TSSI did not change.

Enumerator:
B43_TXPWR_IGNORE_TIME 
B43_TXPWR_IGNORE_TSSI 

Definition at line 425 of file phy_common.h.

enum b43_txpwr_result - Return value for the recalc_txpower PHY op.

: Values changed. Hardware adjustment is needed. : No more work to do. Everything is done.

Enumerator:
B43_TXPWR_RES_NEED_ADJUST 
B43_TXPWR_RES_DONE 

Definition at line 79 of file phy_common.h.

Function Documentation

bool b43_channel_type_is_40mhz ( enum nl80211_channel_type  channel_type)

Definition at line 460 of file phy_common.c.

struct b43_c32 b43_cordic ( int  theta)
read

Definition at line 499 of file phy_common.c.

bool b43_has_hardware_pctl ( struct b43_wldev dev)

b43_has_hardware_pctl - Hardware Power Control supported? Returns a boolean, whether hardware power control is supported.

Definition at line 133 of file phy_common.c.

int b43_phy_allocate ( struct b43_wldev dev)

b43_phy_allocate - Allocate PHY structs Allocate the PHY data structures, based on the current dev->phy.type

Definition at line 40 of file phy_common.c.

void b43_phy_copy ( struct b43_wldev dev,
u16  destreg,
u16  srcreg 
)

b43_phy_copy - copy contents of 16bit PHY register to another

Definition at line 275 of file phy_common.c.

void b43_phy_exit ( struct b43_wldev dev)

b43_phy_exit - Cleanup PHY

Definition at line 124 of file phy_common.c.

void b43_phy_force_clock ( struct b43_wldev dev,
bool  force 
)

Definition at line 467 of file phy_common.c.

void b43_phy_free ( struct b43_wldev dev)

b43_phy_free - Free PHY structs

Definition at line 85 of file phy_common.c.

int b43_phy_init ( struct b43_wldev dev)

b43_phy_init - Initialise the PHY

Definition at line 91 of file phy_common.c.

void b43_phy_lock ( struct b43_wldev dev)

b43_phy_lock - Lock firmware PHY register access

Definition at line 177 of file phy_common.c.

void b43_phy_mask ( struct b43_wldev dev,
u16  offset,
u16  mask 
)

b43_phy_mask - Mask a PHY register with a mask

Definition at line 282 of file phy_common.c.

void b43_phy_maskset ( struct b43_wldev dev,
u16  offset,
u16  mask,
u16  set 
)

b43_phy_maskset - Mask and OR a PHY register with a mask and bitmap

Definition at line 304 of file phy_common.c.

u16 b43_phy_read ( struct b43_wldev dev,
u16  reg 
)

b43_phy_read - 16bit PHY register read access

Definition at line 258 of file phy_common.c.

void b43_phy_set ( struct b43_wldev dev,
u16  offset,
u16  set 
)

b43_phy_set - OR a PHY register with a bitmap

Definition at line 293 of file phy_common.c.

int b43_phy_shm_tssi_read ( struct b43_wldev dev,
u16  shm_offset 
)

b43_phy_shm_tssi_read - Read the average of the last 4 TSSI from SHM.

: The SHM address to read the values from.

Returns the average of the 4 TSSI values, or a negative error code.

Definition at line 413 of file phy_common.c.

void b43_phy_txpower_adjust_work ( struct work_struct work)

b43_phy_txpower_adjust_work - TX power workqueue.

Workqueue for updating the TX power parameters in hardware.

Definition at line 369 of file phy_common.c.

void b43_phy_txpower_check ( struct b43_wldev dev,
unsigned int  flags 
)

b43_phy_txpower_check - Check TX power output.

Compare the current TX power output to the desired power emission and schedule an adjustment in case it mismatches.

: OR'ed enum b43_phy_txpower_check_flags flags. See the docs below.

Definition at line 384 of file phy_common.c.

void b43_phy_unlock ( struct b43_wldev dev)

b43_phy_unlock - Unlock firmware PHY register access

Definition at line 189 of file phy_common.c.

void b43_phy_write ( struct b43_wldev dev,
u16  reg,
u16  value 
)

b43_phy_write - 16bit PHY register write access

Definition at line 265 of file phy_common.c.

void b43_phyop_switch_analog_generic ( struct b43_wldev dev,
bool  on 
)

b43_phy_switch_analog_generic - Generic PHY operation for switching the Analog.

It does the switching based on the PHY0 core register. Do not call this directly. Only use it as a switch_analog callback for struct b43_phy_operations.

Definition at line 454 of file phy_common.c.

void b43_radio_lock ( struct b43_wldev dev)

b43_radio_lock - Lock firmware radio register access

Definition at line 142 of file phy_common.c.

void b43_radio_mask ( struct b43_wldev dev,
u16  offset,
u16  mask 
)

b43_radio_mask - Mask a 16bit radio register with a mask

Definition at line 225 of file phy_common.c.

void b43_radio_maskset ( struct b43_wldev dev,
u16  offset,
u16  mask,
u16  set 
)

b43_radio_maskset - Mask and OR a radio register with a mask and bitmap

Definition at line 237 of file phy_common.c.

u16 b43_radio_read ( struct b43_wldev dev,
u16  reg 
)

b43_radio_read - 16bit Radio register read access

Definition at line 213 of file phy_common.c.

void b43_radio_set ( struct b43_wldev dev,
u16  offset,
u16  set 
)

b43_radio_set - OR a 16bit radio register with a bitmap

Definition at line 231 of file phy_common.c.

void b43_radio_unlock ( struct b43_wldev dev)

b43_radio_unlock - Unlock firmware radio register access

Definition at line 160 of file phy_common.c.

bool b43_radio_wait_value ( struct b43_wldev dev,
u16  offset,
u16  mask,
u16  value,
int  delay,
int  timeout 
)

b43_radio_wait_value - Waits for a given value in masked register read

Definition at line 243 of file phy_common.c.

void b43_radio_write ( struct b43_wldev dev,
u16  reg,
u16  value 
)

b43_radio_write - 16bit Radio register write access

Definition at line 219 of file phy_common.c.

void b43_software_rfkill ( struct b43_wldev dev,
bool  blocked 
)

b43_software_rfkill - Turn the radio ON or OFF in software.

Definition at line 354 of file phy_common.c.

int b43_switch_channel ( struct b43_wldev dev,
unsigned int  new_channel 
)

b43_switch_channel - Switch to another channel

Definition at line 315 of file phy_common.c.