aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-09-15 14:46:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-19 15:58:26 -0400
commit17a68dd7bc25b3671d54b3b371df9b5baf985b20 (patch)
treeda9653ce80b71fda5017f5c7e9a73be7a74c5430
parentd2c71c20789189cd01978efcbdd61231f5929eaf (diff)
iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME
The way we check if there is host command that should be reclaimed is way too complicated. We should have a clear indication from the fw. The fw is expected to set the SEQ_RX_FRAME bit if the frame was originated by the fw which indicates to the driver that there is no host command to free. Somehow, there seem to have been buggy fw out there, hence the very old comment. This code checks if we have still buggy fw out there. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
index 126e5a4cc401..2308177232c0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
@@ -398,6 +398,7 @@ static void iwl_rx_handle(struct iwl_trans *trans)
398 398
399 while (i != r) { 399 while (i != r) {
400 int len; 400 int len;
401 u16 txq_id, sequence;
401 402
402 rxb = rxq->queue[i]; 403 rxb = rxq->queue[i];
403 404
@@ -437,6 +438,17 @@ static void iwl_rx_handle(struct iwl_trans *trans)
437 (pkt->hdr.cmd != STATISTICS_NOTIFICATION) && 438 (pkt->hdr.cmd != STATISTICS_NOTIFICATION) &&
438 (pkt->hdr.cmd != REPLY_TX); 439 (pkt->hdr.cmd != REPLY_TX);
439 440
441 sequence = le16_to_cpu(pkt->hdr.sequence);
442 txq_id = SEQ_TO_QUEUE(le16_to_cpu(pkt->hdr.sequence));
443
444 /* warn if this is cmd response / notification and the uCode
445 * didn't set the SEQ_RX_FRAME for a frame that is
446 * uCode-originated*/
447 WARN(txq_id == trans->shrd->cmd_queue && reclaim == false &&
448 (!(pkt->hdr.sequence & SEQ_RX_FRAME)),
449 "reclaim is false, SEQ_RX_FRAME unset: %s\n",
450 get_cmd_string(pkt->hdr.cmd));
451
440 iwl_rx_dispatch(priv(trans), rxb); 452 iwl_rx_dispatch(priv(trans), rxb);
441 453
442 /* 454 /*