Commit 299f8a46 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced typedef antsel_info_t by struct antsel_info

Code cleanup.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0e493474
......@@ -63,10 +63,11 @@
#define ANT_SELCFG_DEF_2x4 0x02 /* default antenna configuration */
/* static functions */
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel);
static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id);
static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg);
static void wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel);
static u8 wlc_antsel_id2antcfg(struct antsel_info *asi, u8 id);
static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg);
static void wlc_antsel_init_cfg(struct antsel_info *asi,
wlc_antselcfg_t *antsel,
bool auto_sel);
const u16 mimo_2x4_div_antselpat_tbl[] = {
......@@ -93,12 +94,13 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */
};
antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh,
struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
struct osl_info *osh,
wlc_pub_t *pub,
struct wlc_hw_info *wlc_hw) {
antsel_info_t *asi;
struct antsel_info *asi;
asi = kzalloc(sizeof(antsel_info_t), GFP_ATOMIC);
asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC);
if (!asi) {
WL_ERROR(("wl%d: wlc_antsel_attach: out of mem\n", pub->unit));
return NULL;
......@@ -157,7 +159,7 @@ antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh,
return asi;
}
void wlc_antsel_detach(antsel_info_t *asi)
void wlc_antsel_detach(struct antsel_info *asi)
{
if (!asi)
return;
......@@ -165,7 +167,7 @@ void wlc_antsel_detach(antsel_info_t *asi)
kfree(asi);
}
void wlc_antsel_init(antsel_info_t *asi)
void wlc_antsel_init(struct antsel_info *asi)
{
if ((asi->antsel_type == ANTSEL_2x3) ||
(asi->antsel_type == ANTSEL_2x4))
......@@ -174,7 +176,7 @@ void wlc_antsel_init(antsel_info_t *asi)
/* boardlevel antenna selection: init antenna selection structure */
static void
wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
wlc_antsel_init_cfg(struct antsel_info *asi, wlc_antselcfg_t *antsel,
bool auto_sel)
{
if (asi->antsel_type == ANTSEL_2x3) {
......@@ -205,7 +207,7 @@ wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
}
void BCMFASTPATH
wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef, bool sel,
u8 antselid, u8 fbantselid, u8 *antcfg,
u8 *fbantcfg)
{
......@@ -237,7 +239,7 @@ wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
}
/* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */
u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel)
u8 wlc_antsel_antsel2id(struct antsel_info *asi, u16 antsel)
{
u8 antselid = 0;
......@@ -256,7 +258,7 @@ u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel)
}
/* boardlevel antenna selection: convert id to ant_cfg */
static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id)
static u8 wlc_antsel_id2antcfg(struct antsel_info *asi, u8 id)
{
u8 antcfg = ANT_SELCFG_DEF_2x2;
......@@ -275,7 +277,7 @@ static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id)
}
/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */
static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg)
static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
{
u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg));
u16 mimo_antsel = 0;
......@@ -295,7 +297,7 @@ static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg)
}
/* boardlevel antenna selection: ucode interface control */
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel)
static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
{
struct wlc_info *wlc = asi->wlc;
u8 ant_cfg;
......
......@@ -16,14 +16,15 @@
#ifndef _wlc_antsel_h_
#define _wlc_antsel_h_
extern antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc,
extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
struct osl_info *osh,
wlc_pub_t *pub,
struct wlc_hw_info *wlc_hw);
extern void wlc_antsel_detach(antsel_info_t *asi);
extern void wlc_antsel_init(antsel_info_t *asi);
extern void wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
extern void wlc_antsel_detach(struct antsel_info *asi);
extern void wlc_antsel_init(struct antsel_info *asi);
extern void wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef,
bool sel,
u8 id, u8 fbid, u8 *antcfg,
u8 *fbantcfg);
extern u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel);
extern u8 wlc_antsel_antsel2id(struct antsel_info *asi, u16 antsel);
#endif /* _wlc_antsel_h_ */
......@@ -487,7 +487,10 @@ struct wlc_hw_info {
u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
*/
u32 antsel_avail; /* put antsel_info_t here if more info is needed */
u32 antsel_avail; /*
* put struct antsel_info here if more info is
* needed
*/
};
/* TX Queue information
......@@ -549,7 +552,7 @@ struct wlc_info {
struct ampdu_info *ampdu; /* ampdu module handler */
antsel_info_t *asi; /* antsel module handler */
struct antsel_info *asi; /* antsel module handler */
wlc_cm_info_t *cmi; /* channel manager module handler */
void *btparam; /* bus type specific cookie */
......
......@@ -25,7 +25,7 @@ struct wlc_if;
typedef struct wl_if wl_if_t;
struct ampdu_info;
struct wlc_ap_info;
typedef struct antsel_info antsel_info_t;
struct antsel_info;
typedef struct bmac_pmq bmac_pmq_t;
struct d11init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment