2013-01-03 14:42:33

by Johannes Berg

[permalink] [raw]
Subject: pull-request: iwlwifi 2013-01-03

John,

I have two fixes for iwlwifi: one to fix a lost return value that was
dropped in a previous patch and could cause "nobody cared" IRQ messages,
and one to work around a firmware issue.

Please pull.

Thanks,
johannes


The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565:

Linux 3.8-rc1 (2012-12-21 17:19:00 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john

for you to fetch changes up to f590dcec944552f9a4a61155810f3abd17d6465d:

iwlwifi: fix the reclaimed packet tracking upon flush queue (2013-01-03 15:31:15 +0100)

----------------------------------------------------------------
Emmanuel Grumbach (1):
iwlwifi: fix the reclaimed packet tracking upon flush queue

Johannes Berg (1):
iwlwifi: fix PCIe interrupt handle return value

drivers/net/wireless/iwlwifi/dvm/tx.c | 24 +++++++++++++++++-------
drivers/net/wireless/iwlwifi/pcie/rx.c | 1 +
2 files changed, 18 insertions(+), 7 deletions(-)


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2013-01-03 14:43:00

by Johannes Berg

[permalink] [raw]
Subject: [PATCH 1/2] iwlwifi: fix PCIe interrupt handle return value

From: Johannes Berg <[email protected]>

By accident, commit eb6476441bc2fecf6232a87d0313a85f8e3da7f4
("iwlwifi: protect use_ict with irq_lock") changed the return
value of the iwl_pcie_isr() function in case it handles an
interrupt -- it now returns IRQ_NONE instead of IRQ_HANDLED.

Put back the correct return value.

Cc: [email protected]
Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/pcie/rx.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c
index dad4c4a..8389cd3 100644
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -1166,6 +1166,7 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data)
else if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) &&
!trans_pcie->inta)
iwl_enable_interrupts(trans);
+ return IRQ_HANDLED;

none:
/* re-enable interrupts here since we don't have anything to service. */
--
1.8.0


2013-01-04 21:15:11

by John W. Linville

[permalink] [raw]
Subject: Re: pull-request: iwlwifi 2013-01-03

On Thu, Jan 03, 2013 at 03:42:53PM +0100, Johannes Berg wrote:
> John,
>
> I have two fixes for iwlwifi: one to fix a lost return value that was
> dropped in a previous patch and could cause "nobody cared" IRQ messages,
> and one to work around a firmware issue.
>
> Please pull.
>
> Thanks,
> johannes
>
>
> The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565:
>
> Linux 3.8-rc1 (2012-12-21 17:19:00 -0800)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john
>
> for you to fetch changes up to f590dcec944552f9a4a61155810f3abd17d6465d:
>
> iwlwifi: fix the reclaimed packet tracking upon flush queue (2013-01-03 15:31:15 +0100)

I'm pulling this, intending to forward it to Dave early next week.

--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2013-01-03 14:43:00

by Johannes Berg

[permalink] [raw]
Subject: [PATCH 2/2] iwlwifi: fix the reclaimed packet tracking upon flush queue

From: Emmanuel Grumbach <[email protected]>

There's a bug in the currently released firmware version,
the sequence control in the Tx response isn't updated in
all cases. Take it from the packet as a workaround.

Cc: [email protected]
Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/dvm/tx.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index da21328..a790599 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -1151,13 +1151,6 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
next_reclaimed = ssn;
}

- if (tid != IWL_TID_NON_QOS) {
- priv->tid_data[sta_id][tid].next_reclaimed =
- next_reclaimed;
- IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
- next_reclaimed);
- }
-
iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);

iwlagn_check_ratid_empty(priv, sta_id, tid);
@@ -1208,11 +1201,28 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
if (!is_agg)
iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1);

+ /*
+ * W/A for FW bug - the seq_ctl isn't updated when the
+ * queues are flushed. Fetch it from the packet itself
+ */
+ if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) {
+ next_reclaimed = le16_to_cpu(hdr->seq_ctrl);
+ next_reclaimed =
+ SEQ_TO_SN(next_reclaimed + 0x10);
+ }
+
is_offchannel_skb =
(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN);
freed++;
}

+ if (tid != IWL_TID_NON_QOS) {
+ priv->tid_data[sta_id][tid].next_reclaimed =
+ next_reclaimed;
+ IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
+ next_reclaimed);
+ }
+
WARN_ON(!is_agg && freed != 1);

/*
--
1.8.0