Skip to content

Commit

Permalink
ath9k_hw: Optimize rx descriptor processing for AR9003
Browse files Browse the repository at this point in the history
No need to process RxDone and ds_info status again in case
valid rx status is given.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Aug 9, 2011
1 parent 0f9dc29 commit cca1fe1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/net/wireless/ath/ath9k/ar9003_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,17 +531,18 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,

/* TODO: byte swap on big endian for ar9300_10 */

if ((rxsp->status11 & AR_RxDone) == 0)
return -EINPROGRESS;
if (!rxs) {
if ((rxsp->status11 & AR_RxDone) == 0)
return -EINPROGRESS;

if (MS(rxsp->ds_info, AR_DescId) != 0x168c)
return -EINVAL;
if (MS(rxsp->ds_info, AR_DescId) != 0x168c)
return -EINVAL;

if ((rxsp->ds_info & (AR_TxRxDesc | AR_CtrlStat)) != 0)
return -EINPROGRESS;
if ((rxsp->ds_info & (AR_TxRxDesc | AR_CtrlStat)) != 0)
return -EINPROGRESS;

if (!rxs)
return 0;
}

rxs->rs_status = 0;
rxs->rs_flags = 0;
Expand Down

0 comments on commit cca1fe1

Please sign in to comment.