|
|
288eb79 |
From f6b129527ca15bae29ffb9417ddaa1c9d99ffc5d Mon Sep 17 00:00:00 2001
|
|
|
288eb79 |
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
|
|
|
288eb79 |
Date: Tue, 15 Oct 2013 19:04:54 +0000
|
|
|
288eb79 |
Subject: iwlwifi: dvm: don't override mac80211's queue setting
|
|
|
288eb79 |
|
|
|
288eb79 |
Since we set IEEE80211_HW_QUEUE_CONTROL, we can let
|
|
|
288eb79 |
mac80211 do the queue assignement and don't need to
|
|
|
288eb79 |
override its decisions.
|
|
|
288eb79 |
While reassiging the same values is harmless of course,
|
|
|
288eb79 |
it triggered a WARNING when iwlwifi and mac80211 came
|
|
|
288eb79 |
to different conclusions. This happened when mac80211 set
|
|
|
288eb79 |
IEEE80211_TX_CTL_SEND_AFTER_DTIM, but didn't route the
|
|
|
288eb79 |
packet to the cab_queue because no stations were asleep.
|
|
|
288eb79 |
|
|
|
288eb79 |
iwlwifi should not override mac80211's decicions for
|
|
|
288eb79 |
offchannel packets and packets to be sent after DTIM,
|
|
|
288eb79 |
but it should override mac80211's decision for AMPDUs
|
|
|
288eb79 |
since we have a special queue for them. So for AMPDU,
|
|
|
288eb79 |
we still override info->hw_queue by the AMPDU queue.
|
|
|
288eb79 |
|
|
|
288eb79 |
This avoids:
|
|
|
288eb79 |
------------[ cut here ]------------
|
|
|
288eb79 |
WARNING: CPU: 0 PID: 2531 at drivers/net/wireless/iwlwifi/dvm/tx.c:456 iwlagn_tx_skb+0x6c5/0x883()
|
|
|
288eb79 |
Modules linked in:
|
|
|
288eb79 |
CPU: 0 PID: 2531 Comm: hostapd Not tainted 3.12.0-rc5+ #1
|
|
|
288eb79 |
Hardware name: /D53427RKE, BIOS RKPPT10H.86A.0017.2013.0425.1251 04/25/2013
|
|
|
288eb79 |
0000000000000000 0000000000000009 ffffffff8189aa62 0000000000000000
|
|
|
288eb79 |
ffffffff8105a4f2 ffff880058339a48 ffffffff815f8a04 0000000000000000
|
|
|
288eb79 |
ffff8800560097b0 0000000000000208 0000000000000000 ffff8800561a9e5e
|
|
|
288eb79 |
Call Trace:
|
|
|
288eb79 |
[<ffffffff8189aa62>] ? dump_stack+0x41/0x51
|
|
|
288eb79 |
[<ffffffff8105a4f2>] ? warn_slowpath_common+0x78/0x90
|
|
|
288eb79 |
[<ffffffff815f8a04>] ? iwlagn_tx_skb+0x6c5/0x883
|
|
|
288eb79 |
[<ffffffff815f8a04>] ? iwlagn_tx_skb+0x6c5/0x883
|
|
|
288eb79 |
[<ffffffff818a0040>] ? put_cred+0x15/0x15
|
|
|
288eb79 |
[<ffffffff815f6db4>] ? iwlagn_mac_tx+0x19/0x2f
|
|
|
288eb79 |
[<ffffffff8186cc45>] ? __ieee80211_tx+0x226/0x29b
|
|
|
288eb79 |
[<ffffffff8186e6bd>] ? ieee80211_tx+0xa6/0xb5
|
|
|
288eb79 |
[<ffffffff8186e98b>] ? ieee80211_monitor_start_xmit+0x1e9/0x204
|
|
|
288eb79 |
[<ffffffff8171ce5f>] ? dev_hard_start_xmit+0x271/0x3ec
|
|
|
288eb79 |
[<ffffffff817351ac>] ? sch_direct_xmit+0x66/0x164
|
|
|
288eb79 |
[<ffffffff8171d1bf>] ? dev_queue_xmit+0x1e5/0x3c8
|
|
|
288eb79 |
[<ffffffff817fac5a>] ? packet_sendmsg+0xac5/0xb3d
|
|
|
288eb79 |
[<ffffffff81709a09>] ? sock_sendmsg+0x37/0x52
|
|
|
288eb79 |
[<ffffffff810f9e0c>] ? __do_fault+0x338/0x36b
|
|
|
288eb79 |
[<ffffffff81713820>] ? verify_iovec+0x44/0x94
|
|
|
288eb79 |
[<ffffffff81709e63>] ? ___sys_sendmsg+0x1f1/0x283
|
|
|
288eb79 |
[<ffffffff81140a73>] ? __inode_wait_for_writeback+0x67/0xae
|
|
|
288eb79 |
[<ffffffff8111735e>] ? __cache_free.isra.46+0x178/0x187
|
|
|
288eb79 |
[<ffffffff811173b1>] ? kmem_cache_free+0x44/0x84
|
|
|
288eb79 |
[<ffffffff81132c22>] ? dentry_kill+0x13d/0x149
|
|
|
288eb79 |
[<ffffffff81132f6f>] ? dput+0xe5/0xef
|
|
|
288eb79 |
[<ffffffff81136e04>] ? fget_light+0x2e/0x7c
|
|
|
288eb79 |
[<ffffffff8170ae62>] ? __sys_sendmsg+0x39/0x57
|
|
|
288eb79 |
[<ffffffff818a7e39>] ? system_call_fastpath+0x16/0x1b
|
|
|
288eb79 |
---[ end trace 1b3eb79359c1d1e6 ]---
|
|
|
288eb79 |
|
|
|
288eb79 |
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
|
|
|
288eb79 |
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
|
|
|
288eb79 |
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
|
288eb79 |
---
|
|
|
288eb79 |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
|
|
|
288eb79 |
index da442b8..1fef524 100644
|
|
|
288eb79 |
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
|
|
|
288eb79 |
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
|
|
|
288eb79 |
@@ -433,27 +433,19 @@ int iwlagn_tx_skb(struct iwl_priv *priv,
|
|
|
288eb79 |
/* Copy MAC header from skb into command buffer */
|
|
|
288eb79 |
memcpy(tx_cmd->hdr, hdr, hdr_len);
|
|
|
288eb79 |
|
|
|
288eb79 |
+ txq_id = info->hw_queue;
|
|
|
288eb79 |
+
|
|
|
288eb79 |
if (is_agg)
|
|
|
288eb79 |
txq_id = priv->tid_data[sta_id][tid].agg.txq_id;
|
|
|
288eb79 |
else if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) {
|
|
|
288eb79 |
/*
|
|
|
288eb79 |
- * Send this frame after DTIM -- there's a special queue
|
|
|
288eb79 |
- * reserved for this for contexts that support AP mode.
|
|
|
288eb79 |
- */
|
|
|
288eb79 |
- txq_id = ctx->mcast_queue;
|
|
|
288eb79 |
-
|
|
|
288eb79 |
- /*
|
|
|
288eb79 |
* The microcode will clear the more data
|
|
|
288eb79 |
* bit in the last frame it transmits.
|
|
|
288eb79 |
*/
|
|
|
288eb79 |
hdr->frame_control |=
|
|
|
288eb79 |
cpu_to_le16(IEEE80211_FCTL_MOREDATA);
|
|
|
288eb79 |
- } else if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
|
|
|
288eb79 |
- txq_id = IWL_AUX_QUEUE;
|
|
|
288eb79 |
- else
|
|
|
288eb79 |
- txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)];
|
|
|
288eb79 |
+ }
|
|
|
288eb79 |
|
|
|
288eb79 |
- WARN_ON_ONCE(!is_agg && txq_id != info->hw_queue);
|
|
|
288eb79 |
WARN_ON_ONCE(is_agg &&
|
|
|
288eb79 |
priv->queue_to_mac80211[txq_id] != info->hw_queue);
|
|
|
288eb79 |
|
|
|
288eb79 |
--
|
|
|
288eb79 |
cgit v0.9.2
|