Skip to content

Commit

Permalink
staging: brcm80211: remove typedefs that were flagged by checkpatch
Browse files Browse the repository at this point in the history
The previous patch resulted in checkpatch to complain about 'new'
typedefs that were relocated to another include file. This commits
removes those typedef structures.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Mar 1, 2011
1 parent 4557566 commit 12bacc1
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 98 deletions.
22 changes: 11 additions & 11 deletions drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,23 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
}
wlc->hw->wlc = wlc;

wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit,
(sizeof(wlc_hwband_t) * MAXBANDS));
wlc->hw->bandstate[0] = wlc_calloc(osh, unit,
(sizeof(struct wlc_hwband) * MAXBANDS));
if (wlc->hw->bandstate[0] == NULL) {
*err = 1006;
goto fail;
} else {
int i;

for (i = 1; i < MAXBANDS; i++) {
wlc->hw->bandstate[i] = (wlc_hwband_t *)
wlc->hw->bandstate[i] = (struct wlc_hwband *)
((unsigned long)wlc->hw->bandstate[0] +
(sizeof(wlc_hwband_t) * i));
(sizeof(struct wlc_hwband) * i));
}
}

wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit,
sizeof(modulecb_t) * WLC_MAXMODULES);
wlc->modulecb = wlc_calloc(osh, unit,
sizeof(struct modulecb) * WLC_MAXMODULES);
if (wlc->modulecb == NULL) {
*err = 1009;
goto fail;
Expand All @@ -240,8 +240,8 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
}
wlc_bsscfg_ID_assign(wlc, wlc->cfg);

wlc->pkt_callback = (pkt_cb_t *)wlc_calloc(osh, unit,
(sizeof(pkt_cb_t) * (wlc->pub->tunables->maxpktcb + 1)));
wlc->pkt_callback = wlc_calloc(osh, unit,
(sizeof(struct pkt_cb) * (wlc->pub->tunables->maxpktcb + 1)));
if (wlc->pkt_callback == NULL) {
*err = 1013;
goto fail;
Expand All @@ -261,14 +261,14 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
}
}

wlc->protection = (wlc_protection_t *)wlc_calloc(osh, unit,
sizeof(wlc_protection_t));
wlc->protection = wlc_calloc(osh, unit,
sizeof(struct wlc_protection));
if (wlc->protection == NULL) {
*err = 1016;
goto fail;
}

wlc->stf = (wlc_stf_t *)wlc_calloc(osh, unit, sizeof(wlc_stf_t));
wlc->stf = wlc_calloc(osh, unit, sizeof(struct wlc_stf));
if (wlc->stf == NULL) {
*err = 1017;
goto fail;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ wlc_ampdu_agg(struct ampdu_info *ampdu, struct scb *scb, struct sk_buff *p,
}

int BCMFASTPATH
wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
struct sk_buff **pdu, int prec)
{
struct wlc_info *wlc;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

extern struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc);
extern void wlc_ampdu_detach(struct ampdu_info *ampdu);
extern int wlc_sendampdu(struct ampdu_info *ampdu, wlc_txq_info_t *qi,
extern int wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
struct sk_buff **aggp, int prec);
extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ static void wlc_bmac_info_init(struct wlc_hw_info *wlc_hw)
int wlc_bmac_detach(struct wlc_info *wlc)
{
uint i;
wlc_hwband_t *band;
struct wlc_hwband *band;
struct wlc_hw_info *wlc_hw = wlc->hw;
int callbacks;

Expand Down Expand Up @@ -1397,7 +1397,7 @@ wlc_bmac_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask, u16 val,
M_HOST_FLAGS1, M_HOST_FLAGS2, M_HOST_FLAGS3, M_HOST_FLAGS4,
M_HOST_FLAGS5
};
wlc_hwband_t *band;
struct wlc_hwband *band;

ASSERT((val & ~mask) == 0);
ASSERT(idx < MHFMAX);
Expand Down Expand Up @@ -1445,7 +1445,7 @@ wlc_bmac_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask, u16 val,

u16 wlc_bmac_mhf_get(struct wlc_hw_info *wlc_hw, u8 idx, int bands)
{
wlc_hwband_t *band;
struct wlc_hwband *band;
ASSERT(idx < MHFMAX);

switch (bands) {
Expand Down
96 changes: 47 additions & 49 deletions drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,12 @@ static int wlc_iovar_rangecheck(struct wlc_info *wlc, u32 val,
static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc);

/* send and receive */
static wlc_txq_info_t *wlc_txq_alloc(struct wlc_info *wlc,
struct osl_info *osh);
static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc,
struct osl_info *osh);
static void wlc_txq_free(struct wlc_info *wlc, struct osl_info *osh,
wlc_txq_info_t *qi);
static void wlc_txflowcontrol_signal(struct wlc_info *wlc, wlc_txq_info_t *qi,
struct wlc_txq_info *qi);
static void wlc_txflowcontrol_signal(struct wlc_info *wlc,
struct wlc_txq_info *qi,
bool on, int prio);
static void wlc_txflowcontrol_reset(struct wlc_info *wlc);
static u16 wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec,
Expand Down Expand Up @@ -1728,7 +1729,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
uint err = 0;
uint j;
struct wlc_pub *pub;
wlc_txq_info_t *qi;
struct wlc_txq_info *qi;
uint n_disabled;

WL_NONE("wl%d: %s: vendor 0x%x device 0x%x\n",
Expand Down Expand Up @@ -2170,7 +2171,7 @@ uint wlc_detach(struct wlc_info *wlc)

{
/* free dumpcb list */
dumpcb_t *prev, *ptr;
struct dumpcb_s *prev, *ptr;
prev = ptr = wlc->dumpcb_head;
while (ptr) {
ptr = prev->next;
Expand Down Expand Up @@ -2676,7 +2677,7 @@ uint wlc_down(struct wlc_info *wlc)
uint callbacks = 0;
int i;
bool dev_gone = false;
wlc_txq_info_t *qi;
struct wlc_txq_info *qi;

WL_TRACE("wl%d: %s:\n", wlc->pub->unit, __func__);

Expand Down Expand Up @@ -4346,7 +4347,7 @@ int wlc_module_unregister(struct wlc_pub *pub, const char *name, void *hdl)
for (i = 0; i < WLC_MAXMODULES; i++) {
if (!strcmp(wlc->modulecb[i].name, name) &&
(wlc->modulecb[i].hdl == hdl)) {
memset(&wlc->modulecb[i], 0, sizeof(modulecb_t));
memset(&wlc->modulecb[i], 0, sizeof(struct modulecb));
return 0;
}
}
Expand Down Expand Up @@ -5145,7 +5146,7 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
uint prec)
{
struct wlc_info *wlc = (struct wlc_info *) ctx;
wlc_txq_info_t *qi = wlc->active_queue; /* Check me */
struct wlc_txq_info *qi = wlc->active_queue; /* Check me */
struct pktq *q = &qi->q;
int prio;

Expand Down Expand Up @@ -5217,7 +5218,7 @@ wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
return 0;
}

void BCMFASTPATH wlc_send_q(struct wlc_info *wlc, wlc_txq_info_t *qi)
void BCMFASTPATH wlc_send_q(struct wlc_info *wlc, struct wlc_txq_info *qi)
{
struct sk_buff *pkt[DOT11_MAXNUMFRAGS];
int prec;
Expand Down Expand Up @@ -7001,22 +7002,18 @@ wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
return;
}

void wlc_bss_list_free(struct wlc_info *wlc, wlc_bss_list_t *bss_list)
void wlc_bss_list_free(struct wlc_info *wlc, struct wlc_bss_list *bss_list)
{
uint index;
wlc_bss_info_t *bi;

if (!bss_list) {
WL_ERROR("%s: Attempting to free NULL list\n", __func__);
return;
}
/* inspect all BSS descriptor */
for (index = 0; index < bss_list->count; index++) {
bi = bss_list->ptrs[index];
if (bi) {
kfree(bi);
bss_list->ptrs[index] = NULL;
}
kfree(bss_list->ptrs[index]);
bss_list->ptrs[index] = NULL;
}
bss_list->count = 0;
}
Expand Down Expand Up @@ -8322,7 +8319,8 @@ void wlc_ht_mimops_cap_update(struct wlc_info *wlc, u8 mimops_mode)

/* check for the particular priority flow control bit being set */
bool
wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, wlc_txq_info_t *q, int prio)
wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, struct wlc_txq_info *q,
int prio)
{
uint prio_mask;

Expand All @@ -8337,7 +8335,7 @@ wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, wlc_txq_info_t *q, int prio)
}

/* propogate the flow control to all interfaces using the given tx queue */
void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi,
void wlc_txflowcontrol(struct wlc_info *wlc, struct wlc_txq_info *qi,
bool on, int prio)
{
uint prio_bits;
Expand Down Expand Up @@ -8380,8 +8378,8 @@ void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi,
}

void
wlc_txflowcontrol_override(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
uint override)
wlc_txflowcontrol_override(struct wlc_info *wlc, struct wlc_txq_info *qi,
bool on, uint override)
{
uint prev_override;

Expand Down Expand Up @@ -8429,7 +8427,7 @@ wlc_txflowcontrol_override(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,

static void wlc_txflowcontrol_reset(struct wlc_info *wlc)
{
wlc_txq_info_t *qi;
struct wlc_txq_info *qi;

for (qi = wlc->tx_queues; qi != NULL; qi = qi->next) {
if (qi->stopped) {
Expand All @@ -8440,7 +8438,7 @@ static void wlc_txflowcontrol_reset(struct wlc_info *wlc)
}

static void
wlc_txflowcontrol_signal(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
wlc_txflowcontrol_signal(struct wlc_info *wlc, struct wlc_txq_info *qi, bool on,
int prio)
{
struct wlc_if *wlcif;
Expand All @@ -8451,40 +8449,40 @@ wlc_txflowcontrol_signal(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
}
}

static wlc_txq_info_t *wlc_txq_alloc(struct wlc_info *wlc, struct osl_info *osh)
static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc,
struct osl_info *osh)
{
wlc_txq_info_t *qi, *p;

qi = (wlc_txq_info_t *) wlc_calloc(osh, wlc->pub->unit,
sizeof(wlc_txq_info_t));
if (qi == NULL) {
return NULL;
}
struct wlc_txq_info *qi, *p;

/* Have enough room for control packets along with HI watermark */
/* Also, add room to txq for total psq packets if all the SCBs leave PS mode */
/* The watermark for flowcontrol to OS packets will remain the same */
pktq_init(&qi->q, WLC_PREC_COUNT,
(2 * wlc->pub->tunables->datahiwat) + PKTQ_LEN_DEFAULT +
wlc->pub->psq_pkts_total);

/* add this queue to the the global list */
p = wlc->tx_queues;
if (p == NULL) {
wlc->tx_queues = qi;
} else {
while (p->next != NULL)
p = p->next;
p->next = qi;
qi = wlc_calloc(osh, wlc->pub->unit, sizeof(struct wlc_txq_info));
if (qi != NULL) {
/*
* Have enough room for control packets along with HI watermark
* Also, add room to txq for total psq packets if all the SCBs
* leave PS mode. The watermark for flowcontrol to OS packets
* will remain the same
*/
pktq_init(&qi->q, WLC_PREC_COUNT,
(2 * wlc->pub->tunables->datahiwat) + PKTQ_LEN_DEFAULT
+ wlc->pub->psq_pkts_total);

/* add this queue to the the global list */
p = wlc->tx_queues;
if (p == NULL) {
wlc->tx_queues = qi;
} else {
while (p->next != NULL)
p = p->next;
p->next = qi;
}
}

return qi;
}

static void wlc_txq_free(struct wlc_info *wlc, struct osl_info *osh,
wlc_txq_info_t *qi)
struct wlc_txq_info *qi)
{
wlc_txq_info_t *p;
struct wlc_txq_info *p;

if (qi == NULL)
return;
Expand Down
Loading

0 comments on commit 12bacc1

Please sign in to comment.