summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/recv.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-10-29 10:13:59 +0530
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:14:55 -0500
commitc51701632c8becdf0ffedb96d9cedc1149f2183a (patch)
tree82bdd4a52c3cb2b089f2d5e8802459093663c82b /drivers/net/wireless/ath9k/recv.c
parentb5aa9bf9460f9e97f2c10940b029d75c6557ad7c (diff)
downloadblackbird-op-linux-c51701632c8becdf0ffedb96d9cedc1149f2183a.tar.gz
blackbird-op-linux-c51701632c8becdf0ffedb96d9cedc1149f2183a.zip
ath9k: Simplify node attach/detach routines
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/recv.c')
-rw-r--r--drivers/net/wireless/ath9k/recv.c81
1 files changed, 38 insertions, 43 deletions
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c
index 6b4006ed4e01..27d6a981a106 100644
--- a/drivers/net/wireless/ath9k/recv.c
+++ b/drivers/net/wireless/ath9k/recv.c
@@ -1200,61 +1200,56 @@ void ath_rx_aggr_teardown(struct ath_softc *sc, struct ath_node *an, u8 tid)
void ath_rx_node_init(struct ath_softc *sc, struct ath_node *an)
{
- if (sc->sc_flags & SC_OP_RXAGGR) {
- struct ath_arx_tid *rxtid;
- int tidno;
-
- /* Init per tid rx state */
- for (tidno = 0, rxtid = &an->an_aggr.rx.tid[tidno];
- tidno < WME_NUM_TID;
- tidno++, rxtid++) {
- rxtid->an = an;
- rxtid->seq_reset = 1;
- rxtid->seq_next = 0;
- rxtid->baw_size = WME_MAX_BA;
- rxtid->baw_head = rxtid->baw_tail = 0;
+ struct ath_arx_tid *rxtid;
+ int tidno;
+
+ /* Init per tid rx state */
+ for (tidno = 0, rxtid = &an->an_aggr.rx.tid[tidno];
+ tidno < WME_NUM_TID;
+ tidno++, rxtid++) {
+ rxtid->an = an;
+ rxtid->seq_reset = 1;
+ rxtid->seq_next = 0;
+ rxtid->baw_size = WME_MAX_BA;
+ rxtid->baw_head = rxtid->baw_tail = 0;
- /*
- * Ensure the buffer pointer is null at this point
- * (needs to be allocated when addba is received)
- */
+ /*
+ * Ensure the buffer pointer is null at this point
+ * (needs to be allocated when addba is received)
+ */
- rxtid->rxbuf = NULL;
- setup_timer(&rxtid->timer, ath_rx_timer,
- (unsigned long)rxtid);
- spin_lock_init(&rxtid->tidlock);
+ rxtid->rxbuf = NULL;
+ setup_timer(&rxtid->timer, ath_rx_timer,
+ (unsigned long)rxtid);
+ spin_lock_init(&rxtid->tidlock);
- /* ADDBA state */
- rxtid->addba_exchangecomplete = 0;
- }
+ /* ADDBA state */
+ rxtid->addba_exchangecomplete = 0;
}
}
-void ath_rx_node_free(struct ath_softc *sc, struct ath_node *an)
+void ath_rx_node_cleanup(struct ath_softc *sc, struct ath_node *an)
{
- if (sc->sc_flags & SC_OP_RXAGGR) {
- struct ath_arx_tid *rxtid;
- int tidno, i;
+ struct ath_arx_tid *rxtid;
+ int tidno, i;
- /* Init per tid rx state */
- for (tidno = 0, rxtid = &an->an_aggr.rx.tid[tidno];
- tidno < WME_NUM_TID;
- tidno++, rxtid++) {
+ /* Init per tid rx state */
+ for (tidno = 0, rxtid = &an->an_aggr.rx.tid[tidno];
+ tidno < WME_NUM_TID;
+ tidno++, rxtid++) {
- if (!rxtid->addba_exchangecomplete)
- continue;
+ if (!rxtid->addba_exchangecomplete)
+ continue;
- /* must cancel timer first */
- del_timer_sync(&rxtid->timer);
+ /* must cancel timer first */
+ del_timer_sync(&rxtid->timer);
- /* drop any pending sub-frames */
- ath_rx_flush_tid(sc, rxtid, 1);
+ /* drop any pending sub-frames */
+ ath_rx_flush_tid(sc, rxtid, 1);
- for (i = 0; i < ATH_TID_MAX_BUFS; i++)
- ASSERT(rxtid->rxbuf[i].rx_wbuf == NULL);
+ for (i = 0; i < ATH_TID_MAX_BUFS; i++)
+ ASSERT(rxtid->rxbuf[i].rx_wbuf == NULL);
- rxtid->addba_exchangecomplete = 0;
- }
+ rxtid->addba_exchangecomplete = 0;
}
-
}
OpenPOWER on IntegriCloud