staging: brcm80211: replaced typedef antsel_info_t by struct antsel_info
authorRoland Vossen <rvossen@broadcom.com>
Tue, 7 Dec 2010 16:45:40 +0000 (17:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 8 Dec 2010 22:27:47 +0000 (14:27 -0800)
Code cleanup.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/sys/wlc_antsel.c
drivers/staging/brcm80211/sys/wlc_antsel.h
drivers/staging/brcm80211/sys/wlc_mac80211.h
drivers/staging/brcm80211/sys/wlc_types.h

index 9533b568730254108ac4dd231ecb1df7bbcd53a1..aaf9985a1995e09d3033c7c68f5fd57eb1465df2 100644 (file)
 #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;
index 763986dd226e7c68c401b6eef4659bf261254083..ba38a2aedbd91be608a1d9800c876cdc1fac00b9 100644 (file)
 
 #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_ */
index 1d5149ee12079dfbf864bd342aa331c7e7b28823..2ad37f612f00bb59ccd340b96de808762d5a7800 100644 (file)
@@ -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 */
index 9634a66582ac28f5d7075c294404a19d0c88495d..284e7c350c811e45119c727eff964715ef651243 100644 (file)
@@ -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;