hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/wireless/ath/ath9k/main.c
....@@ -203,7 +203,7 @@
203203 void ath_restart_work(struct ath_softc *sc)
204204 {
205205 ieee80211_queue_delayed_work(sc->hw, &sc->hw_check_work,
206
- ATH_HW_CHECK_POLL_INT);
206
+ msecs_to_jiffies(ATH_HW_CHECK_POLL_INT));
207207
208208 if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9330(sc->sc_ah))
209209 ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work,
....@@ -850,7 +850,7 @@
850850 static bool ath9k_txq_has_key(struct ath_softc *sc, u32 keyix)
851851 {
852852 struct ath_hw *ah = sc->sc_ah;
853
- int i;
853
+ int i, j;
854854 struct ath_txq *txq;
855855 bool key_in_use = false;
856856
....@@ -868,8 +868,9 @@
868868 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
869869 int idx = txq->txq_tailidx;
870870
871
- while (!key_in_use &&
872
- !list_empty(&txq->txq_fifo[idx])) {
871
+ for (j = 0; !key_in_use &&
872
+ !list_empty(&txq->txq_fifo[idx]) &&
873
+ j < ATH_TXFIFO_DEPTH; j++) {
873874 key_in_use = ath9k_txq_list_has_key(
874875 &txq->txq_fifo[idx], keyix);
875876 INCR(idx, ATH_TXFIFO_DEPTH);
....@@ -2243,7 +2244,7 @@
22432244 }
22442245
22452246 ieee80211_queue_delayed_work(hw, &sc->hw_check_work,
2246
- ATH_HW_CHECK_POLL_INT);
2247
+ msecs_to_jiffies(ATH_HW_CHECK_POLL_INT));
22472248 }
22482249
22492250 static bool ath9k_tx_frames_pending(struct ieee80211_hw *hw)