Skip to content

Commit

Permalink
staging: brcm80211: replaced wlc_ by brcms_c_, part 2
Browse files Browse the repository at this point in the history
Code cleanup. Function renaming. Triggered by feedback comment from John
Linville, just like the other function renames that preceded this patch.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent f52a0ad commit 1c4c54b
Show file tree
Hide file tree
Showing 8 changed files with 364 additions and 346 deletions.
38 changes: 19 additions & 19 deletions drivers/staging/brcm80211/brcmsmac/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
#include "main.h"
#include "alloc.h"

static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit);
static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
static struct wlc_pub *wlc_pub_malloc(uint unit,
static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit);
static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
static struct wlc_pub *brcms_c_pub_malloc(uint unit,
uint *err, uint devid);
static void wlc_pub_mfree(struct wlc_pub *pub);
static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid);
static void brcms_c_pub_mfree(struct wlc_pub *pub);
static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid);

static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid)
{
tunables->ntxd = NTXD;
tunables->nrxd = NRXD;
Expand All @@ -45,7 +45,7 @@ static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
tunables->txsbnd = TXSBND;
}

static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)
{
struct wlc_pub *pub;

Expand All @@ -62,7 +62,7 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
}

/* need to init the tunables now */
wlc_tunables_init(pub->tunables, devid);
brcms_c_tunables_init(pub->tunables, devid);

pub->multicast = kzalloc(ETH_ALEN * MAXMULTILIST, GFP_ATOMIC);
if (pub->multicast == NULL) {
Expand All @@ -73,11 +73,11 @@ static struct wlc_pub *wlc_pub_malloc(uint unit, uint *err, uint devid)
return pub;

fail:
wlc_pub_mfree(pub);
brcms_c_pub_mfree(pub);
return NULL;
}

static void wlc_pub_mfree(struct wlc_pub *pub)
static void brcms_c_pub_mfree(struct wlc_pub *pub)
{
if (pub == NULL)
return;
Expand All @@ -87,7 +87,7 @@ static void wlc_pub_mfree(struct wlc_pub *pub)
kfree(pub);
}

static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)
{
struct brcms_c_bsscfg *cfg;

Expand All @@ -102,11 +102,11 @@ static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
return cfg;

fail:
wlc_bsscfg_mfree(cfg);
brcms_c_bsscfg_mfree(cfg);
return NULL;
}

static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
{
if (cfg == NULL)
return;
Expand All @@ -116,7 +116,7 @@ static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
kfree(cfg);
}

static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc,
static void brcms_c_bsscfg_ID_assign(struct brcms_c_info *wlc,
struct brcms_c_bsscfg *bsscfg)
{
bsscfg->ID = wlc->next_bsscfg_ID;
Expand All @@ -137,7 +137,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
}

/* allocate struct brcms_c_pub state structure */
wlc->pub = wlc_pub_malloc(unit, err, devid);
wlc->pub = brcms_c_pub_malloc(unit, err, devid);
if (wlc->pub == NULL) {
*err = 1003;
goto fail;
Expand Down Expand Up @@ -181,12 +181,12 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
goto fail;
}

wlc->cfg = wlc_bsscfg_malloc(unit);
wlc->cfg = brcms_c_bsscfg_malloc(unit);
if (wlc->cfg == NULL) {
*err = 1011;
goto fail;
}
wlc_bsscfg_ID_assign(wlc, wlc->cfg);
brcms_c_bsscfg_ID_assign(wlc, wlc->cfg);

wlc->wsec_def_keys[0] =
kzalloc(sizeof(wsec_key_t) * WLC_DEFAULT_KEYS, GFP_ATOMIC);
Expand Down Expand Up @@ -255,8 +255,8 @@ void brcms_c_detach_mfree(struct brcms_c_info *wlc)
if (wlc == NULL)
return;

wlc_bsscfg_mfree(wlc->cfg);
wlc_pub_mfree(wlc->pub);
brcms_c_bsscfg_mfree(wlc->cfg);
brcms_c_pub_mfree(wlc->pub);
kfree(wlc->modulecb);
kfree(wlc->default_bss);
kfree(wlc->wsec_def_keys[0]);
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmsmac/ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,15 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,

if (err) {
if (err == -EBUSY) {
wiphy_err(wiphy, "wl%d: wlc_sendampdu: "
wiphy_err(wiphy, "wl%d: sendampdu: "
"prep_xdu retry; seq 0x%x\n",
wlc->pub->unit, seq);
*pdu = p;
break;
}

/* error in the packet; reject it */
wiphy_err(wiphy, "wl%d: wlc_sendampdu: prep_xdu "
wiphy_err(wiphy, "wl%d: sendampdu: prep_xdu "
"rejected; seq 0x%x\n", wlc->pub->unit, seq);
*pdu = NULL;
break;
Expand Down
Loading

0 comments on commit 1c4c54b

Please sign in to comment.