From: Rajkumar Manoharan Date: Fri, 29 Jul 2011 12:08:16 +0000 (+0530) Subject: ath9k_hw: Optimize rx descriptor processing for AR9003 X-Git-Tag: firefly_0821_release~3680^2~4273^2~254^2~345 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cca1fe1aedefede896b3ff2cc1a2493fa0d0035c;p=firefly-linux-kernel-4.4.55.git ath9k_hw: Optimize rx descriptor processing for AR9003 No need to process RxDone and ds_info status again in case valid rx status is given. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 8ff0b88a29b9..1aadc4757e67 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -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;