Skip to content

Commit

Permalink
iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Sep 19, 2011
1 parent d2c71c2 commit 17a68dd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/net/wireless/iwlwifi/iwl-trans-rx-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ static void iwl_rx_handle(struct iwl_trans *trans)

while (i != r) {
int len;
u16 txq_id, sequence;

rxb = rxq->queue[i];

Expand Down Expand Up @@ -437,6 +438,17 @@ static void iwl_rx_handle(struct iwl_trans *trans)
(pkt->hdr.cmd != STATISTICS_NOTIFICATION) &&
(pkt->hdr.cmd != REPLY_TX);

sequence = le16_to_cpu(pkt->hdr.sequence);
txq_id = SEQ_TO_QUEUE(le16_to_cpu(pkt->hdr.sequence));

/* warn if this is cmd response / notification and the uCode
* didn't set the SEQ_RX_FRAME for a frame that is
* uCode-originated*/
WARN(txq_id == trans->shrd->cmd_queue && reclaim == false &&
(!(pkt->hdr.sequence & SEQ_RX_FRAME)),
"reclaim is false, SEQ_RX_FRAME unset: %s\n",
get_cmd_string(pkt->hdr.cmd));

iwl_rx_dispatch(priv(trans), rxb);

/*
Expand Down

0 comments on commit 17a68dd

Please sign in to comment.