ath9k: reduce indentation level in a few places
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
156369faa3
commit
b047701383
@@ -480,8 +480,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
} else if (!isaggr && txok) {
|
} else if (!isaggr && txok) {
|
||||||
/* transmit completion */
|
/* transmit completion */
|
||||||
acked_cnt++;
|
acked_cnt++;
|
||||||
} else {
|
} else if ((tid->state & AGGR_CLEANUP) || !retry) {
|
||||||
if ((tid->state & AGGR_CLEANUP) || !retry) {
|
|
||||||
/*
|
/*
|
||||||
* cleanup in progress, just fail
|
* cleanup in progress, just fail
|
||||||
* the un-acked sub-frames
|
* the un-acked sub-frames
|
||||||
@@ -501,7 +500,6 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
bar_index = max_t(int, bar_index,
|
bar_index = max_t(int, bar_index,
|
||||||
ATH_BA_INDEX(seq_first, seqno));
|
ATH_BA_INDEX(seq_first, seqno));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure the last desc is reclaimed if it
|
* Make sure the last desc is reclaimed if it
|
||||||
@@ -531,8 +529,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
!txfail);
|
!txfail);
|
||||||
} else {
|
} else {
|
||||||
/* retry the un-acked ones */
|
/* retry the un-acked ones */
|
||||||
if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
|
if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
|
||||||
if (bf->bf_next == NULL && bf_last->bf_stale) {
|
bf->bf_next == NULL && bf_last->bf_stale) {
|
||||||
struct ath_buf *tbf;
|
struct ath_buf *tbf;
|
||||||
|
|
||||||
tbf = ath_clone_txbuf(sc, bf_last);
|
tbf = ath_clone_txbuf(sc, bf_last);
|
||||||
@@ -547,17 +545,14 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
spin_unlock_bh(&txq->axq_lock);
|
spin_unlock_bh(&txq->axq_lock);
|
||||||
|
|
||||||
ath_tx_complete_buf(sc, bf, txq,
|
ath_tx_complete_buf(sc, bf, txq,
|
||||||
&bf_head,
|
&bf_head, ts, 0);
|
||||||
ts, 0);
|
|
||||||
bar_index = max_t(int, bar_index,
|
bar_index = max_t(int, bar_index,
|
||||||
ATH_BA_INDEX(seq_first,
|
ATH_BA_INDEX(seq_first, seqno));
|
||||||
seqno));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fi->bf = tbf;
|
fi->bf = tbf;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Put this buffer to the temporary pending
|
* Put this buffer to the temporary pending
|
||||||
@@ -644,8 +639,11 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
|
|||||||
max_4ms_framelen = ATH_AMPDU_LIMIT_MAX;
|
max_4ms_framelen = ATH_AMPDU_LIMIT_MAX;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
if (rates[i].count) {
|
|
||||||
int modeidx;
|
int modeidx;
|
||||||
|
|
||||||
|
if (!rates[i].count)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
|
if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
|
||||||
legacy = 1;
|
legacy = 1;
|
||||||
break;
|
break;
|
||||||
@@ -662,7 +660,6 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
|
|||||||
frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
|
frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
|
||||||
max_4ms_framelen = min(max_4ms_framelen, frmlen);
|
max_4ms_framelen = min(max_4ms_framelen, frmlen);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* limit aggregate size by the minimum rate if rate selected is
|
* limit aggregate size by the minimum rate if rate selected is
|
||||||
@@ -1587,12 +1584,10 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!list_empty(&ac->tid_q)) {
|
if (!list_empty(&ac->tid_q) && !ac->sched) {
|
||||||
if (!ac->sched) {
|
|
||||||
ac->sched = true;
|
ac->sched = true;
|
||||||
list_add_tail(&ac->list, &txq->axq_acq);
|
list_add_tail(&ac->list, &txq->axq_acq);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ac == last_ac ||
|
if (ac == last_ac ||
|
||||||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
|
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
|
||||||
|
Reference in New Issue
Block a user