diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9002_mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_mac.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c index 669cb3747208..2a93519f4bdf 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c | |||
@@ -381,16 +381,27 @@ static int ar9002_hw_proc_txdesc(struct ath_hw *ah, void *ds, | |||
381 | ts->evm1 = ads->AR_TxEVM1; | 381 | ts->evm1 = ads->AR_TxEVM1; |
382 | ts->evm2 = ads->AR_TxEVM2; | 382 | ts->evm2 = ads->AR_TxEVM2; |
383 | 383 | ||
384 | status = ACCESS_ONCE(ads->ds_ctl4); | ||
385 | ts->duration[0] = MS(status, AR_PacketDur0); | ||
386 | ts->duration[1] = MS(status, AR_PacketDur1); | ||
387 | status = ACCESS_ONCE(ads->ds_ctl5); | ||
388 | ts->duration[2] = MS(status, AR_PacketDur2); | ||
389 | ts->duration[3] = MS(status, AR_PacketDur3); | ||
390 | |||
391 | return 0; | 384 | return 0; |
392 | } | 385 | } |
393 | 386 | ||
387 | static int ar9002_hw_get_duration(struct ath_hw *ah, const void *ds, int index) | ||
388 | { | ||
389 | struct ar5416_desc *ads = AR5416DESC(ds); | ||
390 | |||
391 | switch (index) { | ||
392 | case 0: | ||
393 | return MS(ACCESS_ONCE(ads->ds_ctl4), AR_PacketDur0); | ||
394 | case 1: | ||
395 | return MS(ACCESS_ONCE(ads->ds_ctl4), AR_PacketDur1); | ||
396 | case 2: | ||
397 | return MS(ACCESS_ONCE(ads->ds_ctl5), AR_PacketDur2); | ||
398 | case 3: | ||
399 | return MS(ACCESS_ONCE(ads->ds_ctl5), AR_PacketDur3); | ||
400 | default: | ||
401 | return -1; | ||
402 | } | ||
403 | } | ||
404 | |||
394 | void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, | 405 | void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, |
395 | u32 size, u32 flags) | 406 | u32 size, u32 flags) |
396 | { | 407 | { |
@@ -413,4 +424,5 @@ void ar9002_hw_attach_mac_ops(struct ath_hw *ah) | |||
413 | ops->get_isr = ar9002_hw_get_isr; | 424 | ops->get_isr = ar9002_hw_get_isr; |
414 | ops->set_txdesc = ar9002_set_txdesc; | 425 | ops->set_txdesc = ar9002_set_txdesc; |
415 | ops->proc_txdesc = ar9002_hw_proc_txdesc; | 426 | ops->proc_txdesc = ar9002_hw_proc_txdesc; |
427 | ops->get_duration = ar9002_hw_get_duration; | ||
416 | } | 428 | } |