ath9k_hw: Optimize rx descriptor processing for AR9003
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Fri, 29 Jul 2011 12:08:16 +0000 (17:38 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Aug 2011 19:51:58 +0000 (15:51 -0400)
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>
drivers/net/wireless/ath/ath9k/ar9003_mac.c

index 8ff0b88..1aadc47 100644 (file)
@@ -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;