From: Greg Kroah-Hartman Date: Wed, 30 Jan 2013 09:36:25 +0000 (+0100) Subject: 3.7-stable patches X-Git-Tag: v3.0.62~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4916cecd3eb6ca9b8a2bd508655599efa0b62a7c;p=thirdparty%2Fkernel%2Fstable-queue.git 3.7-stable patches added patches: brcmsmac-handle-packet-drop-during-transmit-correctly.patch brcmsmac-increase-timer-reference-count-for-new-timers-only.patch drm-i915-disable-asyncflip-performance-optimisations.patch drm-i915-dump-uts_release-into-the-error_state.patch drm-i915-gfx_mode-flush-tlb-invalidate-mode-must-be-1-for-scanline-waits.patch iwlegacy-fix-ibss-cleanup.patch mwifiex-fix-typo-in-pcie-adapter-null-check.patch mwifiex-update-config_bands-during-infra-association.patch s390-thp-implement-pmdp_set_wrprotect.patch --- diff --git a/queue-3.7/brcmsmac-handle-packet-drop-during-transmit-correctly.patch b/queue-3.7/brcmsmac-handle-packet-drop-during-transmit-correctly.patch new file mode 100644 index 00000000000..5e65381555e --- /dev/null +++ b/queue-3.7/brcmsmac-handle-packet-drop-during-transmit-correctly.patch @@ -0,0 +1,108 @@ +From c4dea35e34f5f46e1701156153a09cce429d1ea9 Mon Sep 17 00:00:00 2001 +From: Piotr Haber +Date: Wed, 28 Nov 2012 21:44:05 +0100 +Subject: brcmsmac: handle packet drop during transmit correctly + +From: Piotr Haber + +commit c4dea35e34f5f46e1701156153a09cce429d1ea9 upstream. + +The .tx() callback function can drop packets when there is no +space in the DMA fifo. Propagate that information to caller +and make sure the freed sk_buff reference is not accessed. + +Reviewed-by: Arend van Spriel +Reviewed-by: Pieter-Paul Giesberts +Signed-off-by: Piotr Haber +Signed-off-by: Arend van Spriel +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 4 ++-- + drivers/net/wireless/brcm80211/brcmsmac/main.c | 14 +++++++++----- + drivers/net/wireless/brcm80211/brcmsmac/main.h | 2 +- + drivers/net/wireless/brcm80211/brcmsmac/pub.h | 2 +- + 4 files changed, 13 insertions(+), 9 deletions(-) + +--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +@@ -280,8 +280,8 @@ static void brcms_ops_tx(struct ieee8021 + kfree_skb(skb); + goto done; + } +- brcms_c_sendpkt_mac80211(wl->wlc, skb, hw); +- tx_info->rate_driver_data[0] = control->sta; ++ if (brcms_c_sendpkt_mac80211(wl->wlc, skb, hw)) ++ tx_info->rate_driver_data[0] = control->sta; + done: + spin_unlock_bh(&wl->lock); + } +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +@@ -6095,7 +6095,7 @@ static bool brcms_c_prec_enq(struct brcm + return brcms_c_prec_enq_head(wlc, q, pkt, prec, false); + } + +-void brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb, ++bool brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb, + struct sk_buff *sdu, uint prec) + { + struct brcms_txq_info *qi = wlc->pkt_queue; /* Check me */ +@@ -6110,7 +6110,9 @@ void brcms_c_txq_enq(struct brcms_c_info + * packet flooding from mac80211 stack + */ + brcmu_pkt_buf_free_skb(sdu); ++ return false; + } ++ return true; + } + + /* +@@ -7273,7 +7275,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_ + return 0; + } + +-void brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu, ++bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, struct sk_buff *sdu, + struct ieee80211_hw *hw) + { + u8 prio; +@@ -7288,10 +7290,12 @@ void brcms_c_sendpkt_mac80211(struct brc + prio = ieee80211_is_data(d11_header->frame_control) ? sdu->priority : + MAXPRIO; + fifo = prio2fifo[prio]; +- if (brcms_c_d11hdrs_mac80211(wlc, hw, sdu, scb, 0, 1, fifo, 0)) +- return; +- brcms_c_txq_enq(wlc, scb, sdu, BRCMS_PRIO_TO_PREC(prio)); ++ brcms_c_d11hdrs_mac80211(wlc, hw, sdu, scb, 0, 1, fifo, 0); ++ if (!brcms_c_txq_enq(wlc, scb, sdu, BRCMS_PRIO_TO_PREC(prio))) ++ return false; + brcms_c_send_q(wlc); ++ ++ return true; + } + + void brcms_c_send_q(struct brcms_c_info *wlc) +--- a/drivers/net/wireless/brcm80211/brcmsmac/main.h ++++ b/drivers/net/wireless/brcm80211/brcmsmac/main.h +@@ -642,7 +642,7 @@ extern void brcms_c_txfifo(struct brcms_ + bool commit, s8 txpktpend); + extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo, + s8 txpktpend); +-extern void brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb, ++extern bool brcms_c_txq_enq(struct brcms_c_info *wlc, struct scb *scb, + struct sk_buff *sdu, uint prec); + extern void brcms_c_print_txstatus(struct tx_status *txs); + extern int brcms_b_xmtfifo_sz_get(struct brcms_hardware *wlc_hw, uint fifo, +--- a/drivers/net/wireless/brcm80211/brcmsmac/pub.h ++++ b/drivers/net/wireless/brcm80211/brcmsmac/pub.h +@@ -321,7 +321,7 @@ extern void brcms_c_intrsrestore(struct + extern bool brcms_c_intrsupd(struct brcms_c_info *wlc); + extern bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc); + extern bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded); +-extern void brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, ++extern bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc, + struct sk_buff *sdu, + struct ieee80211_hw *hw); + extern bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid); diff --git a/queue-3.7/brcmsmac-increase-timer-reference-count-for-new-timers-only.patch b/queue-3.7/brcmsmac-increase-timer-reference-count-for-new-timers-only.patch new file mode 100644 index 00000000000..1878eaf7a11 --- /dev/null +++ b/queue-3.7/brcmsmac-increase-timer-reference-count-for-new-timers-only.patch @@ -0,0 +1,41 @@ +From a1fe52801a992e590cdaee2fb47a94bac9b5da90 Mon Sep 17 00:00:00 2001 +From: Piotr Haber +Date: Thu, 10 Jan 2013 11:20:48 +0100 +Subject: brcmsmac: increase timer reference count for new timers only + +From: Piotr Haber + +commit a1fe52801a992e590cdaee2fb47a94bac9b5da90 upstream. + +On hardware reintialization reference count of +already existing timers would be increased again. +This leads to problems on module unloading. + +Reviewed-by: Pieter-Paul Giesberts +Reviewed-by: Hante Meuleman +Reviewed-by: Arend van Spriel +Signed-off-by: Piotr Haber +Signed-off-by: Arend van Spriel +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c ++++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +@@ -1401,9 +1401,10 @@ void brcms_add_timer(struct brcms_timer + #endif + t->ms = ms; + t->periodic = (bool) periodic; +- t->set = true; +- +- atomic_inc(&t->wl->callbacks); ++ if (!t->set) { ++ t->set = true; ++ atomic_inc(&t->wl->callbacks); ++ } + + ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); + } diff --git a/queue-3.7/drm-i915-disable-asyncflip-performance-optimisations.patch b/queue-3.7/drm-i915-disable-asyncflip-performance-optimisations.patch new file mode 100644 index 00000000000..597fe456c69 --- /dev/null +++ b/queue-3.7/drm-i915-disable-asyncflip-performance-optimisations.patch @@ -0,0 +1,65 @@ +From 1c8c38c588ea91f8deeae21284840459d1bb58e3 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 20 Jan 2013 16:11:20 +0000 +Subject: drm/i915: Disable AsyncFlip performance optimisations + +From: Chris Wilson + +commit 1c8c38c588ea91f8deeae21284840459d1bb58e3 upstream. + +This is a required workarounds for all products, especially on gen6+ +where it causes the command streamer to fail to parse instructions +following a WAIT_FOR_EVENT. We use WAIT_FOR_EVENT for synchronising +between the GPU and the display engines, and so this bit being unset may +cause hangs. + +References: https://bugzilla.kernel.org/show_bug.cgi?id=52311 +Signed-off-by: Chris Wilson +Reviewed-by: Imre Deak +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_reg.h | 1 + + drivers/gpu/drm/i915/intel_ringbuffer.c | 19 +++++++++++++------ + 2 files changed, 14 insertions(+), 6 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -527,6 +527,7 @@ + #define MI_MODE 0x0209c + # define VS_TIMER_DISPATCH (1 << 6) + # define MI_FLUSH_ENABLE (1 << 12) ++# define ASYNC_FLIP_PERF_DISABLE (1 << 14) + + #define GEN6_GT_MODE 0x20d0 + #define GEN6_GT_MODE_HI (1 << 9) +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -505,13 +505,20 @@ static int init_render_ring(struct intel + struct drm_i915_private *dev_priv = dev->dev_private; + int ret = init_ring_common(ring); + +- if (INTEL_INFO(dev)->gen > 3) { ++ if (INTEL_INFO(dev)->gen > 3) + I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(VS_TIMER_DISPATCH)); +- if (IS_GEN7(dev)) +- I915_WRITE(GFX_MODE_GEN7, +- _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) | +- _MASKED_BIT_ENABLE(GFX_REPLAY_MODE)); +- } ++ ++ /* We need to disable the AsyncFlip performance optimisations in order ++ * to use MI_WAIT_FOR_EVENT within the CS. It should already be ++ * programmed to '1' on all products. ++ */ ++ if (INTEL_INFO(dev)->gen >= 6) ++ I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(ASYNC_FLIP_PERF_DISABLE)); ++ ++ if (IS_GEN7(dev)) ++ I915_WRITE(GFX_MODE_GEN7, ++ _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) | ++ _MASKED_BIT_ENABLE(GFX_REPLAY_MODE)); + + if (INTEL_INFO(dev)->gen >= 5) { + ret = init_pipe_control(ring); diff --git a/queue-3.7/drm-i915-dump-uts_release-into-the-error_state.patch b/queue-3.7/drm-i915-dump-uts_release-into-the-error_state.patch new file mode 100644 index 00000000000..5486bf4c886 --- /dev/null +++ b/queue-3.7/drm-i915-dump-uts_release-into-the-error_state.patch @@ -0,0 +1,38 @@ +From 4518f611ba21ba165ea3714055938a8984a44ff9 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Wed, 23 Jan 2013 16:16:35 +0100 +Subject: drm/i915: dump UTS_RELEASE into the error_state + +From: Daniel Vetter + +commit 4518f611ba21ba165ea3714055938a8984a44ff9 upstream. + +Useful for statistics or on overflowing bug reports to keep things all +lined up. + +Reviewed-by: Chris Wilson +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_debugfs.c ++++ b/drivers/gpu/drm/i915/i915_debugfs.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include "intel_drv.h" + #include "intel_ringbuffer.h" +@@ -687,6 +688,7 @@ static int i915_error_state(struct seq_f + + seq_printf(m, "Time: %ld s %ld us\n", error->time.tv_sec, + error->time.tv_usec); ++ seq_printf(m, "Kernel: " UTS_RELEASE); + seq_printf(m, "PCI ID: 0x%04x\n", dev->pci_device); + seq_printf(m, "EIR: 0x%08x\n", error->eir); + seq_printf(m, "IER: 0x%08x\n", error->ier); diff --git a/queue-3.7/drm-i915-gfx_mode-flush-tlb-invalidate-mode-must-be-1-for-scanline-waits.patch b/queue-3.7/drm-i915-gfx_mode-flush-tlb-invalidate-mode-must-be-1-for-scanline-waits.patch new file mode 100644 index 00000000000..1fee568a21e --- /dev/null +++ b/queue-3.7/drm-i915-gfx_mode-flush-tlb-invalidate-mode-must-be-1-for-scanline-waits.patch @@ -0,0 +1,40 @@ +From f05bb0c7b624252a5e768287e340e8e45df96e42 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Sun, 20 Jan 2013 16:33:32 +0000 +Subject: drm/i915: GFX_MODE Flush TLB Invalidate Mode must be '1' for scanline waits + +From: Chris Wilson + +commit f05bb0c7b624252a5e768287e340e8e45df96e42 upstream. + +On SNB, if bit 13 of GFX_MODE, Flush TLB Invalidate Mode, is not set to 1, +the hardware can not program the scanline values. Those scanline values +then control when the signal is sent from the display engine to the render +ring for MI_WAIT_FOR_EVENTs. Note setting this bit means that TLB +invalidations must be performed explicitly through the appropriate bits +being set in PIPE_CONTROL. + +References: https://bugzilla.kernel.org/show_bug.cgi?id=52311 +Signed-off-by: Chris Wilson +Reviewed-by: Ben Widawsky +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_ringbuffer.c ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c +@@ -515,6 +515,11 @@ static int init_render_ring(struct intel + if (INTEL_INFO(dev)->gen >= 6) + I915_WRITE(MI_MODE, _MASKED_BIT_ENABLE(ASYNC_FLIP_PERF_DISABLE)); + ++ /* Required for the hardware to program scanline values for waiting */ ++ if (INTEL_INFO(dev)->gen == 6) ++ I915_WRITE(GFX_MODE, ++ _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS)); ++ + if (IS_GEN7(dev)) + I915_WRITE(GFX_MODE_GEN7, + _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) | diff --git a/queue-3.7/iwlegacy-fix-ibss-cleanup.patch b/queue-3.7/iwlegacy-fix-ibss-cleanup.patch new file mode 100644 index 00000000000..4f6195b8aac --- /dev/null +++ b/queue-3.7/iwlegacy-fix-ibss-cleanup.patch @@ -0,0 +1,105 @@ +From fa4cffcba9e13798ed7c6b8526b91b1631ecb53e Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Wed, 16 Jan 2013 11:45:15 +0100 +Subject: iwlegacy: fix IBSS cleanup + +From: Stanislaw Gruszka + +commit fa4cffcba9e13798ed7c6b8526b91b1631ecb53e upstream. + +We do not correctly change interface type when switching from +IBSS mode to STA mode, that results in microcode errors. + +Resolves: +https://bugzilla.redhat.com/show_bug.cgi?id=886946 + +Reported-by: Jaroslav Skarvada +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlegacy/common.c | 35 +++++++++++++-------------------- + 1 file changed, 14 insertions(+), 21 deletions(-) + +--- a/drivers/net/wireless/iwlegacy/common.c ++++ b/drivers/net/wireless/iwlegacy/common.c +@@ -3957,17 +3957,21 @@ il_connection_init_rx_config(struct il_p + + memset(&il->staging, 0, sizeof(il->staging)); + +- if (!il->vif) { ++ switch (il->iw_mode) { ++ case NL80211_IFTYPE_UNSPECIFIED: + il->staging.dev_type = RXON_DEV_TYPE_ESS; +- } else if (il->vif->type == NL80211_IFTYPE_STATION) { ++ break; ++ case NL80211_IFTYPE_STATION: + il->staging.dev_type = RXON_DEV_TYPE_ESS; + il->staging.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; +- } else if (il->vif->type == NL80211_IFTYPE_ADHOC) { ++ break; ++ case NL80211_IFTYPE_ADHOC: + il->staging.dev_type = RXON_DEV_TYPE_IBSS; + il->staging.flags = RXON_FLG_SHORT_PREAMBLE_MSK; + il->staging.filter_flags = + RXON_FILTER_BCON_AWARE_MSK | RXON_FILTER_ACCEPT_GRP_MSK; +- } else { ++ break; ++ default: + IL_ERR("Unsupported interface type %d\n", il->vif->type); + return; + } +@@ -4550,8 +4554,7 @@ out: + EXPORT_SYMBOL(il_mac_add_interface); + + static void +-il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, +- bool mode_change) ++il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif) + { + lockdep_assert_held(&il->mutex); + +@@ -4560,9 +4563,7 @@ il_teardown_interface(struct il_priv *il + il_force_scan_end(il); + } + +- if (!mode_change) +- il_set_mode(il); +- ++ il_set_mode(il); + } + + void +@@ -4575,8 +4576,8 @@ il_mac_remove_interface(struct ieee80211 + + WARN_ON(il->vif != vif); + il->vif = NULL; +- +- il_teardown_interface(il, vif, false); ++ il->iw_mode = NL80211_IFTYPE_UNSPECIFIED; ++ il_teardown_interface(il, vif); + memset(il->bssid, 0, ETH_ALEN); + + D_MAC80211("leave\n"); +@@ -4685,18 +4686,10 @@ il_mac_change_interface(struct ieee80211 + } + + /* success */ +- il_teardown_interface(il, vif, true); + vif->type = newtype; + vif->p2p = false; +- err = il_set_mode(il); +- WARN_ON(err); +- /* +- * We've switched internally, but submitting to the +- * device may have failed for some reason. Mask this +- * error, because otherwise mac80211 will not switch +- * (and set the interface type back) and we'll be +- * out of sync with it. +- */ ++ il->iw_mode = newtype; ++ il_teardown_interface(il, vif); + err = 0; + + out: diff --git a/queue-3.7/mwifiex-fix-typo-in-pcie-adapter-null-check.patch b/queue-3.7/mwifiex-fix-typo-in-pcie-adapter-null-check.patch new file mode 100644 index 00000000000..22474e3f82a --- /dev/null +++ b/queue-3.7/mwifiex-fix-typo-in-pcie-adapter-null-check.patch @@ -0,0 +1,33 @@ +From 83f0c6d1f502bd75bb4a9e31e8d64e59c6894ad1 Mon Sep 17 00:00:00 2001 +From: Avinash Patil +Date: Mon, 21 Jan 2013 21:04:10 -0800 +Subject: mwifiex: fix typo in PCIe adapter NULL check + +From: Avinash Patil + +commit 83f0c6d1f502bd75bb4a9e31e8d64e59c6894ad1 upstream. + +Add missing "!" as we are supposed to check "!card->adapter" +in PCIe suspend handler. + +Signed-off-by: Avinash Patil +Signed-off-by: Bing Zhao +Reviewed-by: Sergey V. +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/mwifiex/pcie.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/mwifiex/pcie.c ++++ b/drivers/net/wireless/mwifiex/pcie.c +@@ -161,7 +161,7 @@ static int mwifiex_pcie_suspend(struct p + + if (pdev) { + card = (struct pcie_service_card *) pci_get_drvdata(pdev); +- if (!card || card->adapter) { ++ if (!card || !card->adapter) { + pr_err("Card or adapter structure is not valid\n"); + return 0; + } diff --git a/queue-3.7/mwifiex-update-config_bands-during-infra-association.patch b/queue-3.7/mwifiex-update-config_bands-during-infra-association.patch new file mode 100644 index 00000000000..ce3846651f7 --- /dev/null +++ b/queue-3.7/mwifiex-update-config_bands-during-infra-association.patch @@ -0,0 +1,85 @@ +From d7b9c5204e9c6810a20d509ee47bc70419096e59 Mon Sep 17 00:00:00 2001 +From: Amitkumar Karwar +Date: Tue, 8 Jan 2013 17:53:10 -0800 +Subject: mwifiex: update config_bands during infra association + +From: Amitkumar Karwar + +commit d7b9c5204e9c6810a20d509ee47bc70419096e59 upstream. + +Currently "adapter->config_bands" is updated during infra +association only if channel is provided by user in "iw connect" +command. config_bands is used while preparing association +request to calculate supported rates by intersecting our rates +with the rates advertised by AP. + +There is corner case in which we include zero rates in +supported rates TLV based on previous IBSS network history, +which leads to association failure. + +This patch fixes the problem by correctly updating config_bands. + +Signed-off-by: Amitkumar Karwar +Signed-off-by: Bing Zhao +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/mwifiex/cfg80211.c | 15 +-------------- + drivers/net/wireless/mwifiex/sta_ioctl.c | 14 ++++++++++++++ + 2 files changed, 15 insertions(+), 14 deletions(-) + +--- a/drivers/net/wireless/mwifiex/cfg80211.c ++++ b/drivers/net/wireless/mwifiex/cfg80211.c +@@ -1462,7 +1462,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_pr + struct cfg80211_ssid req_ssid; + int ret, auth_type = 0; + struct cfg80211_bss *bss = NULL; +- u8 is_scanning_required = 0, config_bands = 0; ++ u8 is_scanning_required = 0; + + memset(&req_ssid, 0, sizeof(struct cfg80211_ssid)); + +@@ -1481,19 +1481,6 @@ mwifiex_cfg80211_assoc(struct mwifiex_pr + /* disconnect before try to associate */ + mwifiex_deauthenticate(priv, NULL); + +- if (channel) { +- if (mode == NL80211_IFTYPE_STATION) { +- if (channel->band == IEEE80211_BAND_2GHZ) +- config_bands = BAND_B | BAND_G | BAND_GN; +- else +- config_bands = BAND_A | BAND_AN; +- +- if (!((config_bands | priv->adapter->fw_bands) & +- ~priv->adapter->fw_bands)) +- priv->adapter->config_bands = config_bands; +- } +- } +- + /* As this is new association, clear locally stored + * keys and security related flags */ + priv->sec_info.wpa_enabled = false; +--- a/drivers/net/wireless/mwifiex/sta_ioctl.c ++++ b/drivers/net/wireless/mwifiex/sta_ioctl.c +@@ -265,6 +265,20 @@ int mwifiex_bss_start(struct mwifiex_pri + if (ret) + goto done; + ++ if (bss_desc) { ++ u8 config_bands = 0; ++ ++ if (mwifiex_band_to_radio_type((u8) bss_desc->bss_band) ++ == HostCmd_SCAN_RADIO_TYPE_BG) ++ config_bands = BAND_B | BAND_G | BAND_GN; ++ else ++ config_bands = BAND_A | BAND_AN; ++ ++ if (!((config_bands | adapter->fw_bands) & ++ ~adapter->fw_bands)) ++ adapter->config_bands = config_bands; ++ } ++ + ret = mwifiex_check_network_compatibility(priv, bss_desc); + if (ret) + goto done; diff --git a/queue-3.7/s390-thp-implement-pmdp_set_wrprotect.patch b/queue-3.7/s390-thp-implement-pmdp_set_wrprotect.patch new file mode 100644 index 00000000000..8e132539249 --- /dev/null +++ b/queue-3.7/s390-thp-implement-pmdp_set_wrprotect.patch @@ -0,0 +1,47 @@ +From be3286507dab888d4aad9f91fd6ff5202b24cd5b Mon Sep 17 00:00:00 2001 +From: Gerald Schaefer +Date: Mon, 21 Jan 2013 16:48:07 +0100 +Subject: s390/thp: implement pmdp_set_wrprotect() + +From: Gerald Schaefer + +commit be3286507dab888d4aad9f91fd6ff5202b24cd5b upstream. + +On s390, an architecture-specific implementation of the function +pmdp_set_wrprotect() is missing and the generic version is currently +being used. The generic version does not flush the tlb as it would be +needed on s390 when modifying an active pmd, which can lead to subtle +tlb errors on s390 when using transparent hugepages. + +This patch adds an s390-specific implementation of pmdp_set_wrprotect() +including the missing tlb flush. + +Signed-off-by: Gerald Schaefer +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/s390/include/asm/pgtable.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/arch/s390/include/asm/pgtable.h ++++ b/arch/s390/include/asm/pgtable.h +@@ -1365,6 +1365,18 @@ static inline void pmdp_invalidate(struc + __pmd_idte(address, pmdp); + } + ++#define __HAVE_ARCH_PMDP_SET_WRPROTECT ++static inline void pmdp_set_wrprotect(struct mm_struct *mm, ++ unsigned long address, pmd_t *pmdp) ++{ ++ pmd_t pmd = *pmdp; ++ ++ if (pmd_write(pmd)) { ++ __pmd_idte(address, pmdp); ++ set_pmd_at(mm, address, pmdp, pmd_wrprotect(pmd)); ++ } ++} ++ + static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) + { + pmd_t __pmd; diff --git a/queue-3.7/series b/queue-3.7/series index 0bdc3348c60..1eebfd9fc3e 100644 --- a/queue-3.7/series +++ b/queue-3.7/series @@ -19,3 +19,12 @@ drm-radeon-fix-cursor-corruption-on-dce6-and-newer.patch radeon_display-use-pointer-return-error-codes.patch iommu-amd-family15h-model10-1fh-erratum-746-workaround.patch xfs-fix-possible-use-after-free-with-aio.patch +s390-thp-implement-pmdp_set_wrprotect.patch +drm-i915-disable-asyncflip-performance-optimisations.patch +drm-i915-gfx_mode-flush-tlb-invalidate-mode-must-be-1-for-scanline-waits.patch +drm-i915-dump-uts_release-into-the-error_state.patch +mwifiex-update-config_bands-during-infra-association.patch +mwifiex-fix-typo-in-pcie-adapter-null-check.patch +iwlegacy-fix-ibss-cleanup.patch +brcmsmac-increase-timer-reference-count-for-new-timers-only.patch +brcmsmac-handle-packet-drop-during-transmit-correctly.patch