diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-11-25 07:42:25 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-28 09:34:27 -0500 |
commit | 52e2a99eee77cc4a47e183eb7f5102301a31e282 (patch) | |
tree | eaaa0795fee04da8408f4c4220fca378a50cdb23 | |
parent | eea54c8ec971d4759c541dba351477dafc39ce54 (diff) |
iwlwifi: read the Rx write pointer only once
The FH (DMA engine) tells the driver the index of the last
ready (closed) Rx buffer. This data is in closed_rb_num.
If we read this data several times we may get inconsistencies
between the code and the debug prints which can make it
harder to debug issues here.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index c81b9782d2a4..787b9ca6af9f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -698,7 +698,7 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans) | |||
698 | 698 | ||
699 | /* uCode's read index (stored in shared DRAM) indicates the last Rx | 699 | /* uCode's read index (stored in shared DRAM) indicates the last Rx |
700 | * buffer that the driver may process (last buffer filled by ucode). */ | 700 | * buffer that the driver may process (last buffer filled by ucode). */ |
701 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; | 701 | r = le16_to_cpu(ACCESS_ONCE(rxq->rb_stts->closed_rb_num)) & 0x0FFF; |
702 | i = rxq->read; | 702 | i = rxq->read; |
703 | 703 | ||
704 | /* Rx interrupt, but nothing sent from uCode */ | 704 | /* Rx interrupt, but nothing sent from uCode */ |