From 288eb79a53ec43ae2037de5c93b325f0c2af6c78 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Nov 04 2013 13:49:43 +0000 Subject: Add patch to fix iwlwifi queue settings backtrace (rhbz 1025769) --- diff --git a/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch b/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch new file mode 100644 index 0000000..ce5f00b --- /dev/null +++ b/iwlwifi-dvm-dont-override-mac80211-queue-setting.patch @@ -0,0 +1,98 @@ +From f6b129527ca15bae29ffb9417ddaa1c9d99ffc5d Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Tue, 15 Oct 2013 19:04:54 +0000 +Subject: iwlwifi: dvm: don't override mac80211's queue setting + +Since we set IEEE80211_HW_QUEUE_CONTROL, we can let +mac80211 do the queue assignement and don't need to +override its decisions. +While reassiging the same values is harmless of course, +it triggered a WARNING when iwlwifi and mac80211 came +to different conclusions. This happened when mac80211 set +IEEE80211_TX_CTL_SEND_AFTER_DTIM, but didn't route the +packet to the cab_queue because no stations were asleep. + +iwlwifi should not override mac80211's decicions for +offchannel packets and packets to be sent after DTIM, +but it should override mac80211's decision for AMPDUs +since we have a special queue for them. So for AMPDU, +we still override info->hw_queue by the AMPDU queue. + +This avoids: +------------[ cut here ]------------ +WARNING: CPU: 0 PID: 2531 at drivers/net/wireless/iwlwifi/dvm/tx.c:456 iwlagn_tx_skb+0x6c5/0x883() +Modules linked in: +CPU: 0 PID: 2531 Comm: hostapd Not tainted 3.12.0-rc5+ #1 +Hardware name: /D53427RKE, BIOS RKPPT10H.86A.0017.2013.0425.1251 04/25/2013 + 0000000000000000 0000000000000009 ffffffff8189aa62 0000000000000000 + ffffffff8105a4f2 ffff880058339a48 ffffffff815f8a04 0000000000000000 + ffff8800560097b0 0000000000000208 0000000000000000 ffff8800561a9e5e +Call Trace: + [] ? dump_stack+0x41/0x51 + [] ? warn_slowpath_common+0x78/0x90 + [] ? iwlagn_tx_skb+0x6c5/0x883 + [] ? iwlagn_tx_skb+0x6c5/0x883 + [] ? put_cred+0x15/0x15 + [] ? iwlagn_mac_tx+0x19/0x2f + [] ? __ieee80211_tx+0x226/0x29b + [] ? ieee80211_tx+0xa6/0xb5 + [] ? ieee80211_monitor_start_xmit+0x1e9/0x204 + [] ? dev_hard_start_xmit+0x271/0x3ec + [] ? sch_direct_xmit+0x66/0x164 + [] ? dev_queue_xmit+0x1e5/0x3c8 + [] ? packet_sendmsg+0xac5/0xb3d + [] ? sock_sendmsg+0x37/0x52 + [] ? __do_fault+0x338/0x36b + [] ? verify_iovec+0x44/0x94 + [] ? ___sys_sendmsg+0x1f1/0x283 + [] ? __inode_wait_for_writeback+0x67/0xae + [] ? __cache_free.isra.46+0x178/0x187 + [] ? kmem_cache_free+0x44/0x84 + [] ? dentry_kill+0x13d/0x149 + [] ? dput+0xe5/0xef + [] ? fget_light+0x2e/0x7c + [] ? __sys_sendmsg+0x39/0x57 + [] ? system_call_fastpath+0x16/0x1b +---[ end trace 1b3eb79359c1d1e6 ]--- + +Reported-by: Sander Eikelenboom +Reviewed-by: Johannes Berg +Signed-off-by: Johannes Berg +--- +diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c +index da442b8..1fef524 100644 +--- a/drivers/net/wireless/iwlwifi/dvm/tx.c ++++ b/drivers/net/wireless/iwlwifi/dvm/tx.c +@@ -433,27 +433,19 @@ int iwlagn_tx_skb(struct iwl_priv *priv, + /* Copy MAC header from skb into command buffer */ + memcpy(tx_cmd->hdr, hdr, hdr_len); + ++ txq_id = info->hw_queue; ++ + if (is_agg) + txq_id = priv->tid_data[sta_id][tid].agg.txq_id; + else if (info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { + /* +- * Send this frame after DTIM -- there's a special queue +- * reserved for this for contexts that support AP mode. +- */ +- txq_id = ctx->mcast_queue; +- +- /* + * The microcode will clear the more data + * bit in the last frame it transmits. + */ + hdr->frame_control |= + cpu_to_le16(IEEE80211_FCTL_MOREDATA); +- } else if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) +- txq_id = IWL_AUX_QUEUE; +- else +- txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)]; ++ } + +- WARN_ON_ONCE(!is_agg && txq_id != info->hw_queue); + WARN_ON_ONCE(is_agg && + priv->queue_to_mac80211[txq_id] != info->hw_queue); + +-- +cgit v0.9.2 diff --git a/kernel.spec b/kernel.spec index a00c5a2..70e9ffc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -799,6 +799,9 @@ Patch25139: net-flow_dissector-fail-on-evil-iph-ihl.patch Patch25140: 0001-Revert-epoll-use-freezable-blocking-call.patch Patch25141: 0001-Revert-select-use-freezable-blocking-call.patch +#rhbz 1025769 +Patch25142: iwlwifi-dvm-dont-override-mac80211-queue-setting.patch + # END OF PATCH DEFINITIONS %endif @@ -1535,6 +1538,9 @@ ApplyPatch net-flow_dissector-fail-on-evil-iph-ihl.patch ApplyPatch 0001-Revert-epoll-use-freezable-blocking-call.patch ApplyPatch 0001-Revert-select-use-freezable-blocking-call.patch +#rhbz 1025769 +ApplyPatch iwlwifi-dvm-dont-override-mac80211-queue-setting.patch + # END OF PATCH APPLICATIONS %endif @@ -2376,7 +2382,10 @@ fi # ||----w | # || || %changelog -* Mon Nov 04 2013 Justin M. Forbes - 3.11.7-100 +* Mon Nov 04 2013 Josh Boyer - 3.11.7-100 +- Add patch to fix iwlwifi queue settings backtrace (rhbz 1025769) + +* Mon Nov 04 2013 Justin M. Forbes - Linux v3.11.7 * Fri Nov 01 2013 Josh Boyer - 3.11.6-101