Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249595
b: refs/heads/master
c: 87bff6a
h: refs/heads/master
i:
  249593: 16e16ec
  249591: 8d5ce0f
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed May 11, 2011
1 parent 7ea77a3 commit c8b1b26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 82 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: b33f0e282f5e728456412ef63d36521538932fc5
refs/heads/master: 87bff6a306e8979f7f2491e365e1b9f9e7cccb46
85 changes: 8 additions & 77 deletions trunk/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ struct ampdu_info {

};

/* used for plushing ampdu packets */
struct cb_del_ampdu_pars {
struct ieee80211_sta *sta;
u16 tid;
};

#define AMPDU_CLEANUPFLAG_RX (0x1)
#define AMPDU_CLEANUPFLAG_TX (0x2)

Expand All @@ -133,9 +139,6 @@ static void wlc_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f);
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
scb_ampdu_t *scb_ampdu,
u8 tid, bool override);
static void ampdu_cleanup_tid_ini(struct ampdu_info *ampdu,
scb_ampdu_t *scb_ampdu,
u8 tid, bool force);
static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur);
static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb);
static void scb_ampdu_update_config_all(struct ampdu_info *ampdu);
Expand Down Expand Up @@ -220,24 +223,6 @@ void wlc_ampdu_detach(struct ampdu_info *ampdu)
kfree(ampdu);
}

void scb_ampdu_cleanup(struct ampdu_info *ampdu, struct scb *scb)
{
scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
u8 tid;

BCMMSG(ampdu->wlc->wiphy, "enter\n");
for (tid = 0; tid < AMPDU_MAX_SCB_TID; tid++) {
ampdu_cleanup_tid_ini(ampdu, scb_ampdu, tid, false);
}
}

/* reset the ampdu state machine so that it can gracefully handle packets that were
* freed from the dma and tx queues during reinit
*/
void wlc_ampdu_reset(struct ampdu_info *ampdu)
{
}

static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
{
scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
Expand Down Expand Up @@ -266,7 +251,7 @@ static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
mcs2ampdu_table[FFPLD_MAX_MCS]);
}

void scb_ampdu_update_config_all(struct ampdu_info *ampdu)
static void scb_ampdu_update_config_all(struct ampdu_info *ampdu)
{
scb_ampdu_update_config(ampdu, ampdu->wlc->pub->global_scb);
}
Expand Down Expand Up @@ -911,7 +896,7 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
}

void
static void
rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs)
{
Expand Down Expand Up @@ -1131,26 +1116,6 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
wlc_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
}

static void
ampdu_cleanup_tid_ini(struct ampdu_info *ampdu, scb_ampdu_t *scb_ampdu, u8 tid,
bool force)
{
scb_ampdu_tid_ini_t *ini;
ini = SCB_AMPDU_INI(scb_ampdu, tid);
if (!ini)
return;

BCMMSG(ampdu->wlc->wiphy, "wl%d: tid %d\n", ampdu->wlc->pub->unit, tid);

if (ini->tx_in_transit && !force)
return;

scb_ampdu = SCB_AMPDU_CUBBY(ampdu, ini->scb);

/* free all buffered tx packets */
bcm_pktq_pflush(&scb_ampdu->txq, ini->tid, true, NULL, 0);
}

/* initialize the initiator code for tid */
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
scb_ampdu_t *scb_ampdu,
Expand Down Expand Up @@ -1226,35 +1191,6 @@ static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur)
}
}

u8 BCMFASTPATH
wlc_ampdu_null_delim_cnt(struct ampdu_info *ampdu, struct scb *scb,
ratespec_t rspec, int phylen)
{
scb_ampdu_t *scb_ampdu;
int bytes, cnt, tmp;
u8 tx_density;

scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
if (scb_ampdu->mpdu_density == 0)
return 0;

/* RSPEC2RATE is in kbps units ==> ~RSPEC2RATE/2^13 is in bytes/usec
density x is in 2^(x-4) usec
==> # of bytes needed for req density = rate/2^(17-x)
==> # of null delimiters = ceil(ceil(rate/2^(17-x)) - phylen)/4)
*/

tx_density = scb_ampdu->mpdu_density;
tmp = 1 << (17 - tx_density);
bytes = CEIL(RSPEC2RATE(rspec), tmp);

if (bytes > phylen) {
cnt = CEIL(bytes - phylen, AMPDU_DELIMITER_LEN);
return (u8) cnt;
} else
return 0;
}

void wlc_ampdu_macaddr_upd(struct wlc_info *wlc)
{
char template[T_RAM_ACCESS_SZ * 2];
Expand Down Expand Up @@ -1286,11 +1222,6 @@ void wlc_ampdu_shm_upd(struct ampdu_info *ampdu)
}
}

struct cb_del_ampdu_pars {
struct ieee80211_sta *sta;
u16 tid;
};

/*
* callback function that helps flushing ampdu packets from a priority queue
*/
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ 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);
extern void wlc_ampdu_reset(struct ampdu_info *ampdu);
extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);
extern u8 wlc_ampdu_null_delim_cnt(struct ampdu_info *ampdu, struct scb *scb,
ratespec_t rspec, int phylen);

#endif /* _wlc_ampdu_h_ */
1 change: 0 additions & 1 deletion trunk/drivers/staging/brcm80211/brcmsmac/wlc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ void wlc_reset(struct wlc_info *wlc)
sizeof(macstat_t));

wlc_bmac_reset(wlc->hw);
wlc_ampdu_reset(wlc->ampdu);
wlc->txretried = 0;

}
Expand Down

0 comments on commit c8b1b26

Please sign in to comment.