Commit b0477013 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: reduce indentation level in a few places

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 156369fa
...@@ -480,27 +480,25 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, ...@@ -480,27 +480,25 @@ 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 if ((tid->state & AGGR_CLEANUP) || !retry) {
/*
* cleanup in progress, just fail
* the un-acked sub-frames
*/
txfail = 1;
} else if (flush) {
txpending = 1;
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
if (txok || !an->sleeping)
ath_tx_set_retry(sc, txq, bf->bf_mpdu,
retries);
txpending = 1;
} else { } else {
if ((tid->state & AGGR_CLEANUP) || !retry) { txfail = 1;
/* txfail_cnt++;
* cleanup in progress, just fail bar_index = max_t(int, bar_index,
* the un-acked sub-frames ATH_BA_INDEX(seq_first, seqno));
*/
txfail = 1;
} else if (flush) {
txpending = 1;
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
if (txok || !an->sleeping)
ath_tx_set_retry(sc, txq, bf->bf_mpdu,
retries);
txpending = 1;
} else {
txfail = 1;
txfail_cnt++;
bar_index = max_t(int, bar_index,
ATH_BA_INDEX(seq_first, seqno));
}
} }
/* /*
...@@ -531,32 +529,29 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, ...@@ -531,32 +529,29 @@ 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);
/* /*
* Update tx baw and complete the * Update tx baw and complete the
* frame with failed status if we * frame with failed status if we
* run out of tx buf. * run out of tx buf.
*/ */
if (!tbf) { if (!tbf) {
spin_lock_bh(&txq->axq_lock); spin_lock_bh(&txq->axq_lock);
ath_tx_update_baw(sc, tid, seqno); ath_tx_update_baw(sc, tid, seqno);
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, seqno));
ATH_BA_INDEX(seq_first, break;
seqno));
break;
}
fi->bf = tbf;
} }
fi->bf = tbf;
} }
/* /*
...@@ -644,24 +639,26 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf, ...@@ -644,24 +639,26 @@ 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].flags & IEEE80211_TX_RC_MCS)) {
legacy = 1;
break;
}
if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
modeidx = MCS_HT40;
else
modeidx = MCS_HT20;
if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI) if (!rates[i].count)
modeidx++; continue;
frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx]; if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
max_4ms_framelen = min(max_4ms_framelen, frmlen); legacy = 1;
break;
} }
if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
modeidx = MCS_HT40;
else
modeidx = MCS_HT20;
if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
modeidx++;
frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
max_4ms_framelen = min(max_4ms_framelen, frmlen);
} }
/* /*
...@@ -1587,11 +1584,9 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) ...@@ -1587,11 +1584,9 @@ 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 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment