Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236218
b: refs/heads/master
c: 228a00f
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Mar 3, 2011
1 parent 81f0a05 commit 7d5bd6d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 42 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5508d82488694e3d427345d624687a3fa9fb9a88
refs/heads/master: 228a00f8dcd34fdead86c8b4d31552e69ab9b9e4
5 changes: 1 addition & 4 deletions trunk/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,6 @@ module_exit(wl_module_exit);
static void wl_free(struct wl_info *wl)
{
struct wl_timer *t, *next;
struct osl_info *osh;

ASSERT(wl);
/* free ucode data */
Expand Down Expand Up @@ -1389,8 +1388,6 @@ static void wl_free(struct wl_info *wl)
kfree(t);
}

osh = wl->osh;

/*
* unregister_netdev() calls get_stats() which may read chip registers
* so we cannot unmap the chip registers until after calling unregister_netdev() .
Expand All @@ -1402,7 +1399,7 @@ static void wl_free(struct wl_info *wl)
wl->regsva = NULL;


osl_detach(osh);
osl_detach(wl->osh);
}

/*
Expand Down
50 changes: 13 additions & 37 deletions trunk/drivers/staging/brcm80211/brcmsmac/wlc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@ 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 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,
static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc);
static void wlc_txq_free(struct wlc_info *wlc,
struct wlc_txq_info *qi);
static void wlc_txflowcontrol_signal(struct wlc_info *wlc,
struct wlc_txq_info *qi,
Expand All @@ -282,7 +281,7 @@ static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp);
static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp);
static u16 wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type, uint next_frag_len);
static void wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh,
static void wlc_recvctl(struct wlc_info *wlc,
d11rxhdr_t *rxh, struct sk_buff *p);
static uint wlc_calc_frame_len(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type, uint dur);
Expand Down Expand Up @@ -327,12 +326,9 @@ void wlc_get_rcmta(struct wlc_info *wlc, int idx, u8 *addr)
{
d11regs_t *regs = wlc->regs;
u32 v32;
struct osl_info *osh;

WL_TRACE("wl%d: %s\n", WLCWLUNIT(wlc), __func__);

osh = wlc->osh;

W_REG(&regs->objaddr, (OBJADDR_RCMTA_SEL | (idx * 2)));
(void)R_REG(&regs->objaddr);
v32 = R_REG(&regs->objdata);
Expand Down Expand Up @@ -1935,7 +1931,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
*/

/* allocate our initial queue */
qi = wlc_txq_alloc(wlc, osh);
qi = wlc_txq_alloc(wlc);
if (qi == NULL) {
WL_ERROR("wl%d: %s: failed to malloc tx queue\n",
unit, __func__);
Expand Down Expand Up @@ -2189,9 +2185,8 @@ uint wlc_detach(struct wlc_info *wlc)
/* Detach from iovar manager */
wlc_module_unregister(wlc->pub, "wlc_iovars", wlc);

while (wlc->tx_queues != NULL) {
wlc_txq_free(wlc, wlc->osh, wlc->tx_queues);
}
while (wlc->tx_queues != NULL)
wlc_txq_free(wlc, wlc->tx_queues);

/*
* consistency check: wlc_module_register/wlc_module_unregister calls
Expand Down Expand Up @@ -3081,7 +3076,6 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
uint band;
rw_reg_t *r;
wlc_bsscfg_t *bsscfg;
struct osl_info *osh;
wlc_bss_info_t *current_bss;

/* update bsscfg pointer */
Expand Down Expand Up @@ -3121,7 +3115,6 @@ _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,

bcmerror = 0;
regs = wlc->regs;
osh = wlc->osh;

/* A few commands don't need any arguments; all the others do. */
switch (cmd) {
Expand Down Expand Up @@ -5729,7 +5722,6 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
struct ieee80211_hdr *h;
d11txh_t *txh;
u8 *plcp, plcp_fallback[D11_PHY_HDR_LEN];
struct osl_info *osh;
int len, phylen, rts_phylen;
u16 frameid, mch, phyctl, xfts, mainrates;
u16 seq = 0, mcl = 0, status = 0;
Expand Down Expand Up @@ -5764,8 +5756,6 @@ wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,

ASSERT(queue < NFIFO);

osh = wlc->osh;

/* locate 802.11 MAC header */
h = (struct ieee80211_hdr *)(p->data);
qos = ieee80211_is_data_qos(h->frame_control);
Expand Down Expand Up @@ -6574,7 +6564,6 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
d11txh_t *txh;
struct scb *scb = NULL;
bool free_pdu;
struct osl_info *osh;
int tx_rts, tx_frame_count, tx_rts_count;
uint totlen, supr_status;
bool lastframe;
Expand All @@ -6601,7 +6590,6 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
return false;
}

osh = wlc->osh;
queue = txs->frameid & TXFID_QUEUE_MASK;
ASSERT(queue < NFIFO);
if (queue >= NFIFO) {
Expand Down Expand Up @@ -6724,7 +6712,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
fatal:
ASSERT(0);
if (p)
pkt_buf_free_skb(osh, p, true);
pkt_buf_free_skb(wlc->osh, p, true);

return true;

Expand Down Expand Up @@ -6961,8 +6949,7 @@ prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
}

static void
wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
struct sk_buff *p)
wlc_recvctl(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p)
{
int len_mpdu;
struct ieee80211_rx_status rx_status;
Expand Down Expand Up @@ -6992,7 +6979,7 @@ wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p);

wlc->pub->_cnt->ieee_rx++;
osh->pktalloced--;
wlc->osh->pktalloced--;
return;
}

Expand Down Expand Up @@ -7022,14 +7009,11 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
{
d11rxhdr_t *rxh;
struct ieee80211_hdr *h;
struct osl_info *osh;
uint len;
bool is_amsdu;

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

osh = wlc->osh;

/* frame starts with rxhdr */
rxh = (d11rxhdr_t *) (p->data);

Expand Down Expand Up @@ -7108,11 +7092,11 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
goto toss;
}

wlc_recvctl(wlc, osh, rxh, p);
wlc_recvctl(wlc, rxh, p);
return;

toss:
pkt_buf_free_skb(osh, p, false);
pkt_buf_free_skb(wlc->osh, p, false);
}

/* calculate frame duration for Mixed-mode L-SIG spoofing, return
Expand Down Expand Up @@ -7739,9 +7723,6 @@ void wlc_bss_update_beacon(struct wlc_info *wlc, wlc_bsscfg_t *cfg)
u16 bcn[BCN_TMPL_LEN / 2];
u32 both_valid = MCMD_BCN0VLD | MCMD_BCN1VLD;
d11regs_t *regs = wlc->regs;
struct osl_info *osh = NULL;

osh = wlc->osh;

/* Check if both templates are in use, if so sched. an interrupt
* that will call back into this routine
Expand Down Expand Up @@ -7861,14 +7842,11 @@ wlc_bss_update_probe_resp(struct wlc_info *wlc, wlc_bsscfg_t *cfg, bool suspend)
/* prepares pdu for transmission. returns BCM error codes */
int wlc_prep_pdu(struct wlc_info *wlc, struct sk_buff *pdu, uint *fifop)
{
struct osl_info *osh;
uint fifo;
d11txh_t *txh;
struct ieee80211_hdr *h;
struct scb *scb;

osh = wlc->osh;

ASSERT(pdu);
txh = (d11txh_t *) (pdu->data);
ASSERT(txh);
Expand Down Expand Up @@ -8439,8 +8417,7 @@ wlc_txflowcontrol_signal(struct wlc_info *wlc, struct wlc_txq_info *qi, bool on,
}
}

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

Expand Down Expand Up @@ -8469,8 +8446,7 @@ static struct wlc_txq_info *wlc_txq_alloc(struct wlc_info *wlc,
return qi;
}

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

Expand Down

0 comments on commit 7d5bd6d

Please sign in to comment.