.. | .. |
---|
837 | 837 | |
---|
838 | 838 | txq->link = &ds->ds_link; |
---|
839 | 839 | ath5k_hw_start_tx_dma(ah, txq->qnum); |
---|
840 | | - mmiowb(); |
---|
841 | 840 | spin_unlock_bh(&txq->lock); |
---|
842 | 841 | |
---|
843 | 842 | return 0; |
---|
.. | .. |
---|
1099 | 1098 | /** |
---|
1100 | 1099 | * ath5k_drain_tx_buffs - Empty tx buffers |
---|
1101 | 1100 | * |
---|
1102 | | - * @ah The &struct ath5k_hw |
---|
| 1101 | + * @ah: The &struct ath5k_hw |
---|
1103 | 1102 | * |
---|
1104 | 1103 | * Empty tx buffers from all queues in preparation |
---|
1105 | 1104 | * of a reset or during shutdown. |
---|
.. | .. |
---|
1537 | 1536 | } |
---|
1538 | 1537 | |
---|
1539 | 1538 | static void |
---|
1540 | | -ath5k_tasklet_rx(unsigned long data) |
---|
| 1539 | +ath5k_tasklet_rx(struct tasklet_struct *t) |
---|
1541 | 1540 | { |
---|
1542 | 1541 | struct ath5k_rx_status rs = {}; |
---|
1543 | 1542 | struct sk_buff *skb, *next_skb; |
---|
1544 | 1543 | dma_addr_t next_skb_addr; |
---|
1545 | | - struct ath5k_hw *ah = (void *)data; |
---|
| 1544 | + struct ath5k_hw *ah = from_tasklet(ah, t, rxtq); |
---|
1546 | 1545 | struct ath_common *common = ath5k_hw_common(ah); |
---|
1547 | 1546 | struct ath5k_buf *bf; |
---|
1548 | 1547 | struct ath5k_desc *ds; |
---|
.. | .. |
---|
1785 | 1784 | } |
---|
1786 | 1785 | |
---|
1787 | 1786 | static void |
---|
1788 | | -ath5k_tasklet_tx(unsigned long data) |
---|
| 1787 | +ath5k_tasklet_tx(struct tasklet_struct *t) |
---|
1789 | 1788 | { |
---|
1790 | 1789 | int i; |
---|
1791 | | - struct ath5k_hw *ah = (void *)data; |
---|
| 1790 | + struct ath5k_hw *ah = from_tasklet(ah, t, txtq); |
---|
1792 | 1791 | |
---|
1793 | 1792 | for (i = 0; i < AR5K_NUM_TX_QUEUES; i++) |
---|
1794 | 1793 | if (ah->txqs[i].setup && (ah->ah_txq_isr_txok_all & BIT(i))) |
---|
.. | .. |
---|
2174 | 2173 | } |
---|
2175 | 2174 | |
---|
2176 | 2175 | ath5k_hw_set_imr(ah, ah->imask); |
---|
2177 | | - mmiowb(); |
---|
2178 | 2176 | spin_unlock_bh(&ah->block); |
---|
2179 | 2177 | } |
---|
2180 | 2178 | |
---|
2181 | | -static void ath5k_tasklet_beacon(unsigned long data) |
---|
| 2179 | +static void ath5k_tasklet_beacon(struct tasklet_struct *t) |
---|
2182 | 2180 | { |
---|
2183 | | - struct ath5k_hw *ah = (struct ath5k_hw *) data; |
---|
| 2181 | + struct ath5k_hw *ah = from_tasklet(ah, t, beacontq); |
---|
2184 | 2182 | |
---|
2185 | 2183 | /* |
---|
2186 | 2184 | * Software beacon alert--time to send a beacon. |
---|
.. | .. |
---|
2449 | 2447 | |
---|
2450 | 2448 | |
---|
2451 | 2449 | static void |
---|
2452 | | -ath5k_tasklet_ani(unsigned long data) |
---|
| 2450 | +ath5k_tasklet_ani(struct tasklet_struct *t) |
---|
2453 | 2451 | { |
---|
2454 | | - struct ath5k_hw *ah = (void *)data; |
---|
| 2452 | + struct ath5k_hw *ah = from_tasklet(ah, t, ani_tasklet); |
---|
2455 | 2453 | |
---|
2456 | 2454 | ah->ah_cal_mask |= AR5K_CALIBRATION_ANI; |
---|
2457 | 2455 | ath5k_ani_calibration(ah); |
---|
.. | .. |
---|
2779 | 2777 | |
---|
2780 | 2778 | ret = 0; |
---|
2781 | 2779 | done: |
---|
2782 | | - mmiowb(); |
---|
2783 | 2780 | mutex_unlock(&ah->lock); |
---|
2784 | 2781 | |
---|
2785 | 2782 | set_bit(ATH_STAT_STARTED, ah->status); |
---|
.. | .. |
---|
2839 | 2836 | "putting device to sleep\n"); |
---|
2840 | 2837 | } |
---|
2841 | 2838 | |
---|
2842 | | - mmiowb(); |
---|
2843 | 2839 | mutex_unlock(&ah->lock); |
---|
2844 | 2840 | |
---|
2845 | 2841 | ath5k_stop_tasklets(ah); |
---|
.. | .. |
---|
3073 | 3069 | hw->queues = 1; |
---|
3074 | 3070 | } |
---|
3075 | 3071 | |
---|
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); |
---|
3080 | 3076 | |
---|
3081 | 3077 | INIT_WORK(&ah->reset_work, ath5k_reset_work); |
---|
3082 | 3078 | INIT_WORK(&ah->calib_work, ath5k_calibrate_work); |
---|