hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/wireless/ath/ath5k/base.c
....@@ -837,7 +837,6 @@
837837
838838 txq->link = &ds->ds_link;
839839 ath5k_hw_start_tx_dma(ah, txq->qnum);
840
- mmiowb();
841840 spin_unlock_bh(&txq->lock);
842841
843842 return 0;
....@@ -1099,7 +1098,7 @@
10991098 /**
11001099 * ath5k_drain_tx_buffs - Empty tx buffers
11011100 *
1102
- * @ah The &struct ath5k_hw
1101
+ * @ah: The &struct ath5k_hw
11031102 *
11041103 * Empty tx buffers from all queues in preparation
11051104 * of a reset or during shutdown.
....@@ -1537,12 +1536,12 @@
15371536 }
15381537
15391538 static void
1540
-ath5k_tasklet_rx(unsigned long data)
1539
+ath5k_tasklet_rx(struct tasklet_struct *t)
15411540 {
15421541 struct ath5k_rx_status rs = {};
15431542 struct sk_buff *skb, *next_skb;
15441543 dma_addr_t next_skb_addr;
1545
- struct ath5k_hw *ah = (void *)data;
1544
+ struct ath5k_hw *ah = from_tasklet(ah, t, rxtq);
15461545 struct ath_common *common = ath5k_hw_common(ah);
15471546 struct ath5k_buf *bf;
15481547 struct ath5k_desc *ds;
....@@ -1785,10 +1784,10 @@
17851784 }
17861785
17871786 static void
1788
-ath5k_tasklet_tx(unsigned long data)
1787
+ath5k_tasklet_tx(struct tasklet_struct *t)
17891788 {
17901789 int i;
1791
- struct ath5k_hw *ah = (void *)data;
1790
+ struct ath5k_hw *ah = from_tasklet(ah, t, txtq);
17921791
17931792 for (i = 0; i < AR5K_NUM_TX_QUEUES; i++)
17941793 if (ah->txqs[i].setup && (ah->ah_txq_isr_txok_all & BIT(i)))
....@@ -2174,13 +2173,12 @@
21742173 }
21752174
21762175 ath5k_hw_set_imr(ah, ah->imask);
2177
- mmiowb();
21782176 spin_unlock_bh(&ah->block);
21792177 }
21802178
2181
-static void ath5k_tasklet_beacon(unsigned long data)
2179
+static void ath5k_tasklet_beacon(struct tasklet_struct *t)
21822180 {
2183
- struct ath5k_hw *ah = (struct ath5k_hw *) data;
2181
+ struct ath5k_hw *ah = from_tasklet(ah, t, beacontq);
21842182
21852183 /*
21862184 * Software beacon alert--time to send a beacon.
....@@ -2449,9 +2447,9 @@
24492447
24502448
24512449 static void
2452
-ath5k_tasklet_ani(unsigned long data)
2450
+ath5k_tasklet_ani(struct tasklet_struct *t)
24532451 {
2454
- struct ath5k_hw *ah = (void *)data;
2452
+ struct ath5k_hw *ah = from_tasklet(ah, t, ani_tasklet);
24552453
24562454 ah->ah_cal_mask |= AR5K_CALIBRATION_ANI;
24572455 ath5k_ani_calibration(ah);
....@@ -2779,7 +2777,6 @@
27792777
27802778 ret = 0;
27812779 done:
2782
- mmiowb();
27832780 mutex_unlock(&ah->lock);
27842781
27852782 set_bit(ATH_STAT_STARTED, ah->status);
....@@ -2839,7 +2836,6 @@
28392836 "putting device to sleep\n");
28402837 }
28412838
2842
- mmiowb();
28432839 mutex_unlock(&ah->lock);
28442840
28452841 ath5k_stop_tasklets(ah);
....@@ -3073,10 +3069,10 @@
30733069 hw->queues = 1;
30743070 }
30753071
3076
- tasklet_init(&ah->rxtq, ath5k_tasklet_rx, (unsigned long)ah);
3077
- tasklet_init(&ah->txtq, ath5k_tasklet_tx, (unsigned long)ah);
3078
- tasklet_init(&ah->beacontq, ath5k_tasklet_beacon, (unsigned long)ah);
3079
- tasklet_init(&ah->ani_tasklet, ath5k_tasklet_ani, (unsigned long)ah);
3072
+ tasklet_setup(&ah->rxtq, ath5k_tasklet_rx);
3073
+ tasklet_setup(&ah->txtq, ath5k_tasklet_tx);
3074
+ tasklet_setup(&ah->beacontq, ath5k_tasklet_beacon);
3075
+ tasklet_setup(&ah->ani_tasklet, ath5k_tasklet_ani);
30803076
30813077 INIT_WORK(&ah->reset_work, ath5k_reset_work);
30823078 INIT_WORK(&ah->calib_work, ath5k_calibrate_work);