Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
antsel.c File Reference
#include <linux/slab.h>
#include <net/mac80211.h>
#include "types.h"
#include "main.h"
#include "phy_shim.h"
#include "antsel.h"

Go to the source code of this file.

Macros

#define ANT_SELCFG_AUTO   0x80 /* bit indicates antenna sel AUTO */
 
#define ANT_SELCFG_MASK   0x33 /* antenna configuration mask */
 
#define ANT_SELCFG_TX_UNICAST   0 /* unicast tx antenna configuration */
 
#define ANT_SELCFG_RX_UNICAST   1 /* unicast rx antenna configuration */
 
#define ANT_SELCFG_TX_DEF   2 /* default tx antenna configuration */
 
#define ANT_SELCFG_RX_DEF   3 /* default rx antenna configuration */
 
#define BRCMS_ANTSEL_11N_0(ant)   ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf)
 
#define BRCMS_ANTSEL_11N_1(ant)   (((ant) & ANT_SELCFG_MASK) & 0xf)
 
#define BRCMS_ANTIDX_11N(ant)
 
#define BRCMS_ANT_ISAUTO_11N(ant)   (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO)
 
#define BRCMS_ANTSEL_11N(ant)   ((ant) & ANT_SELCFG_MASK)
 
#define ANT_SELCFG_DEF_2x2   0x01 /* default antenna configuration */
 
#define ANT_SELCFG_NUM_2x3   3
 
#define ANT_SELCFG_DEF_2x3   0x01 /* default antenna configuration */
 
#define ANT_SELCFG_NUM_2x4   4
 
#define ANT_SELCFG_DEF_2x4   0x02 /* default antenna configuration */
 

Functions

struct antsel_infobrcms_c_antsel_attach (struct brcms_c_info *wlc)
 
void brcms_c_antsel_detach (struct antsel_info *asi)
 
void brcms_c_antsel_init (struct antsel_info *asi)
 
void brcms_c_antsel_antcfg_get (struct antsel_info *asi, bool usedef, bool sel, u8 antselid, u8 fbantselid, u8 *antcfg, u8 *fbantcfg)
 
u8 brcms_c_antsel_antsel2id (struct antsel_info *asi, u16 antsel)
 

Macro Definition Documentation

#define ANT_SELCFG_AUTO   0x80 /* bit indicates antenna sel AUTO */

Definition at line 25 of file antsel.c.

#define ANT_SELCFG_DEF_2x2   0x01 /* default antenna configuration */

Definition at line 42 of file antsel.c.

#define ANT_SELCFG_DEF_2x3   0x01 /* default antenna configuration */

Definition at line 46 of file antsel.c.

#define ANT_SELCFG_DEF_2x4   0x02 /* default antenna configuration */

Definition at line 50 of file antsel.c.

#define ANT_SELCFG_MASK   0x33 /* antenna configuration mask */

Definition at line 26 of file antsel.c.

#define ANT_SELCFG_NUM_2x3   3

Definition at line 45 of file antsel.c.

#define ANT_SELCFG_NUM_2x4   4

Definition at line 49 of file antsel.c.

#define ANT_SELCFG_RX_DEF   3 /* default rx antenna configuration */

Definition at line 30 of file antsel.c.

#define ANT_SELCFG_RX_UNICAST   1 /* unicast rx antenna configuration */

Definition at line 28 of file antsel.c.

#define ANT_SELCFG_TX_DEF   2 /* default tx antenna configuration */

Definition at line 29 of file antsel.c.

#define ANT_SELCFG_TX_UNICAST   0 /* unicast tx antenna configuration */

Definition at line 27 of file antsel.c.

#define BRCMS_ANT_ISAUTO_11N (   ant)    (((ant) & ANT_SELCFG_AUTO) == ANT_SELCFG_AUTO)

Definition at line 37 of file antsel.c.

#define BRCMS_ANTIDX_11N (   ant)
Value:
(((BRCMS_ANTSEL_11N_0(ant)) << 2) +\

Definition at line 35 of file antsel.c.

#define BRCMS_ANTSEL_11N (   ant)    ((ant) & ANT_SELCFG_MASK)

Definition at line 38 of file antsel.c.

#define BRCMS_ANTSEL_11N_0 (   ant)    ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf)

Definition at line 33 of file antsel.c.

#define BRCMS_ANTSEL_11N_1 (   ant)    (((ant) & ANT_SELCFG_MASK) & 0xf)

Definition at line 34 of file antsel.c.

Function Documentation

void brcms_c_antsel_antcfg_get ( struct antsel_info asi,
bool  usedef,
bool  sel,
u8  antselid,
u8  fbantselid,
u8 antcfg,
u8 fbantcfg 
)

Definition at line 259 of file antsel.c.

u8 brcms_c_antsel_antsel2id ( struct antsel_info asi,
u16  antsel 
)

Definition at line 291 of file antsel.c.

struct antsel_info* brcms_c_antsel_attach ( struct brcms_c_info wlc)
read

Definition at line 108 of file antsel.c.

void brcms_c_antsel_detach ( struct antsel_info asi)

Definition at line 169 of file antsel.c.

void brcms_c_antsel_init ( struct antsel_info asi)

Definition at line 232 of file antsel.c.