From 0b71873abbf9484e35c698ea4622f3cb54c82737 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 5 Aug 2013 10:31:59 +0800 Subject: [PATCH] 3.4-stable patches added patches: acpi-battery-fix-parsing-_bix-return-value.patch ath9k_htc-do-some-initial-hardware-configuration.patch ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch mac80211-fix-duplicate-retransmission-detection.patch mwifiex-add-missing-endian-conversion.patch nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch rt2x00-fix-stop-queue.patch --- ...attery-fix-parsing-_bix-return-value.patch | 49 ++++++++++++ ...-some-initial-hardware-configuration.patch | 38 ++++++++++ ...tx-hang-issue-with-lldpad-on-82598eb.patch | 37 ++++++++++ ...x-duplicate-retransmission-detection.patch | 51 +++++++++++++ ...wifiex-add-missing-endian-conversion.patch | 34 +++++++++ ...tus-and-testmode-reporting-for-netns.patch | 53 +++++++++++++ queue-3.4/rt2x00-fix-stop-queue.patch | 74 +++++++++++++++++++ queue-3.4/series | 7 ++ 8 files changed, 343 insertions(+) create mode 100644 queue-3.4/acpi-battery-fix-parsing-_bix-return-value.patch create mode 100644 queue-3.4/ath9k_htc-do-some-initial-hardware-configuration.patch create mode 100644 queue-3.4/ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch create mode 100644 queue-3.4/mac80211-fix-duplicate-retransmission-detection.patch create mode 100644 queue-3.4/mwifiex-add-missing-endian-conversion.patch create mode 100644 queue-3.4/nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch create mode 100644 queue-3.4/rt2x00-fix-stop-queue.patch diff --git a/queue-3.4/acpi-battery-fix-parsing-_bix-return-value.patch b/queue-3.4/acpi-battery-fix-parsing-_bix-return-value.patch new file mode 100644 index 00000000000..ada043ed706 --- /dev/null +++ b/queue-3.4/acpi-battery-fix-parsing-_bix-return-value.patch @@ -0,0 +1,49 @@ +From 016d5baad04269e8559332df05f89bd95b52d6ad Mon Sep 17 00:00:00 2001 +From: Lan Tianyu +Date: Tue, 30 Jul 2013 14:00:42 +0200 +Subject: ACPI / battery: Fix parsing _BIX return value + +From: Lan Tianyu + +commit 016d5baad04269e8559332df05f89bd95b52d6ad upstream. + +The _BIX method returns extended battery info as a package. +According the ACPI spec (ACPI 5, Section 10.2.2.2), the first member +of that package should be "Revision". However, the current ACPI +battery driver treats the first member as "Power Unit" which should +be the second member. This causes the result of _BIX return data +parsing to be incorrect. + +Fix this by adding a new member called 'revision' to struct +acpi_battery and adding the offsetof() information on it to +extended_info_offsets[] as the first row. + +[rjw: Changelog] +Reported-and-tested-by: Jan Hoffmann +References: http://bugzilla.kernel.org/show_bug.cgi?id=60519 +Signed-off-by: Lan Tianyu +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/battery.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/acpi/battery.c ++++ b/drivers/acpi/battery.c +@@ -117,6 +117,7 @@ struct acpi_battery { + struct acpi_device *device; + struct notifier_block pm_nb; + unsigned long update_time; ++ int revision; + int rate_now; + int capacity_now; + int voltage_now; +@@ -350,6 +351,7 @@ static struct acpi_offsets info_offsets[ + }; + + static struct acpi_offsets extended_info_offsets[] = { ++ {offsetof(struct acpi_battery, revision), 0}, + {offsetof(struct acpi_battery, power_unit), 0}, + {offsetof(struct acpi_battery, design_capacity), 0}, + {offsetof(struct acpi_battery, full_charge_capacity), 0}, diff --git a/queue-3.4/ath9k_htc-do-some-initial-hardware-configuration.patch b/queue-3.4/ath9k_htc-do-some-initial-hardware-configuration.patch new file mode 100644 index 00000000000..0206117a590 --- /dev/null +++ b/queue-3.4/ath9k_htc-do-some-initial-hardware-configuration.patch @@ -0,0 +1,38 @@ +From dc2a87f519a4d8cb376ab54f22b6b98a943b51ce Mon Sep 17 00:00:00 2001 +From: Oleksij Rempel +Date: Fri, 19 Jul 2013 20:16:17 +0200 +Subject: ath9k_htc: do some initial hardware configuration + +From: Oleksij Rempel + +commit dc2a87f519a4d8cb376ab54f22b6b98a943b51ce upstream. + +Currently we configure harwdare and clock, only after +interface start. In this case, if we reload module or +reboot PC without configuring adapter, firmware will freeze. +There is no software way to reset adpter. + +This patch add initial configuration and set it in +disabled state, to avoid this freeze. Behaviour of this patch +should be similar to: ifconfig wlan0 up; ifconfig wlan0 down. + +Bug: https://github.com/qca/open-ath9k-htc-firmware/issues/1 +Tested-by: Bo Shi +Signed-off-by: Oleksij Rempel +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/htc_drv_init.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c ++++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c +@@ -821,6 +821,7 @@ static int ath9k_init_device(struct ath9 + if (error != 0) + goto err_rx; + ++ ath9k_hw_disable(priv->ah); + #ifdef CONFIG_MAC80211_LEDS + /* must be initialized before ieee80211_register_hw */ + priv->led_cdev.default_trigger = ieee80211_create_tpt_led_trigger(priv->hw, diff --git a/queue-3.4/ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch b/queue-3.4/ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch new file mode 100644 index 00000000000..65091022dfe --- /dev/null +++ b/queue-3.4/ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch @@ -0,0 +1,37 @@ +From 1eb9ac14c34a948bf1538bfb9034e8ab29099a64 Mon Sep 17 00:00:00 2001 +From: Jacob Keller +Date: Fri, 26 Jul 2013 05:46:35 -0700 +Subject: ixgbe: Fix Tx Hang issue with lldpad on 82598EB + +From: Jacob Keller + +commit 1eb9ac14c34a948bf1538bfb9034e8ab29099a64 upstream. + +This patch fixes an issue with the 82598EB device, where lldpad is causing Tx +Hangs on the card as soon as it attempts to configure DCB for the device. The +adapter will continually Tx hang and reset in a loop. + +Signed-off-by: Jacob Keller +Tested-by: Phil Schmitt +Tested-by: Jack Morgan +Signed-off-by: Jeff Kirsher +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c ++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82598.c +@@ -108,9 +108,8 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_825 + + /* Enable arbiter */ + reg &= ~IXGBE_DPMCS_ARBDIS; +- /* Enable DFP and Recycle mode */ +- reg |= (IXGBE_DPMCS_TDPAC | IXGBE_DPMCS_TRM); + reg |= IXGBE_DPMCS_TSOEF; ++ + /* Configure Max TSO packet size 34KB including payload and headers */ + reg |= (0x4 << IXGBE_DPMCS_MTSOS_SHIFT); + diff --git a/queue-3.4/mac80211-fix-duplicate-retransmission-detection.patch b/queue-3.4/mac80211-fix-duplicate-retransmission-detection.patch new file mode 100644 index 00000000000..b8b752ed955 --- /dev/null +++ b/queue-3.4/mac80211-fix-duplicate-retransmission-detection.patch @@ -0,0 +1,51 @@ +From 6b0f32745dcfba01d7be33acd1b40306c7a914c6 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Thu, 11 Jul 2013 22:33:26 +0200 +Subject: mac80211: fix duplicate retransmission detection + +From: Johannes Berg + +commit 6b0f32745dcfba01d7be33acd1b40306c7a914c6 upstream. + +The duplicate retransmission detection code in mac80211 +erroneously attempts to do the check for every frame, +even frames that don't have a sequence control field or +that don't use it (QoS-Null frames.) + +This is problematic because it causes the code to access +data beyond the end of the SKB and depending on the data +there will drop packets erroneously. + +Correct the code to not do duplicate detection for such +frames. + +I found this error while testing AP powersave, it lead +to retransmitted PS-Poll frames being dropped entirely +as the data beyond the end of the SKB was always zero. + +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + net/mac80211/rx.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -831,8 +831,14 @@ ieee80211_rx_h_check(struct ieee80211_rx + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; + struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); + +- /* Drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.2.9) */ +- if (rx->sta && !is_multicast_ether_addr(hdr->addr1)) { ++ /* ++ * Drop duplicate 802.11 retransmissions ++ * (IEEE 802.11-2012: 9.3.2.10 "Duplicate detection and recovery") ++ */ ++ if (rx->skb->len >= 24 && rx->sta && ++ !ieee80211_is_ctl(hdr->frame_control) && ++ !ieee80211_is_qos_nullfunc(hdr->frame_control) && ++ !is_multicast_ether_addr(hdr->addr1)) { + if (unlikely(ieee80211_has_retry(hdr->frame_control) && + rx->sta->last_seq_ctrl[rx->seqno_idx] == + hdr->seq_ctrl)) { diff --git a/queue-3.4/mwifiex-add-missing-endian-conversion.patch b/queue-3.4/mwifiex-add-missing-endian-conversion.patch new file mode 100644 index 00000000000..72223697f1f --- /dev/null +++ b/queue-3.4/mwifiex-add-missing-endian-conversion.patch @@ -0,0 +1,34 @@ +From 83e612f632c3897be29ef02e0472f6d63e258378 Mon Sep 17 00:00:00 2001 +From: Tomasz Moń +Date: Tue, 23 Jul 2013 07:42:49 +0200 +Subject: mwifiex: Add missing endian conversion. + +From: Tomasz Moń + +commit 83e612f632c3897be29ef02e0472f6d63e258378 upstream. + +Both type and pkt_len variables are in host endian and these should be in +Little Endian in the payload. + +Signed-off-by: Tomasz Moń +Acked-by: Bing Zhao +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/mwifiex/sdio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/mwifiex/sdio.c ++++ b/drivers/net/wireless/mwifiex/sdio.c +@@ -1449,8 +1449,8 @@ static int mwifiex_sdio_host_to_card(str + /* Allocate buffer and copy payload */ + blk_size = MWIFIEX_SDIO_BLOCK_SIZE; + buf_block_len = (pkt_len + blk_size - 1) / blk_size; +- *(u16 *) &payload[0] = (u16) pkt_len; +- *(u16 *) &payload[2] = type; ++ *(__le16 *)&payload[0] = cpu_to_le16((u16)pkt_len); ++ *(__le16 *)&payload[2] = cpu_to_le16(type); + + /* + * This is SDIO specific header diff --git a/queue-3.4/nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch b/queue-3.4/nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch new file mode 100644 index 00000000000..7bac624ae55 --- /dev/null +++ b/queue-3.4/nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch @@ -0,0 +1,53 @@ +From a0ec570f4f69c4cb700d743a915096c2c8f56a99 Mon Sep 17 00:00:00 2001 +From: Michal Kazior +Date: Tue, 25 Jun 2013 09:17:17 +0200 +Subject: nl80211: fix mgmt tx status and testmode reporting for netns + +From: Michal Kazior + +commit a0ec570f4f69c4cb700d743a915096c2c8f56a99 upstream. + +These two events were sent to the default network +namespace. + +This caused AP mode in a non-default netns to not +work correctly. Mgmt tx status was multicasted to +a different (default) netns instead of the one the +AP was in. + +Signed-off-by: Michal Kazior +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/nl80211.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -5081,12 +5081,14 @@ EXPORT_SYMBOL(cfg80211_testmode_alloc_ev + + void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp) + { ++ struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0]; + void *hdr = ((void **)skb->cb)[1]; + struct nlattr *data = ((void **)skb->cb)[2]; + + nla_nest_end(skb, data); + genlmsg_end(skb, hdr); +- genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp); ++ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), skb, 0, ++ nl80211_testmode_mcgrp.id, gfp); + } + EXPORT_SYMBOL(cfg80211_testmode_event); + #endif +@@ -7768,7 +7770,8 @@ void nl80211_send_mgmt_tx_status(struct + + genlmsg_end(msg, hdr); + +- genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp); ++ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0, ++ nl80211_mlme_mcgrp.id, gfp); + return; + + nla_put_failure: diff --git a/queue-3.4/rt2x00-fix-stop-queue.patch b/queue-3.4/rt2x00-fix-stop-queue.patch new file mode 100644 index 00000000000..c4c467ed09e --- /dev/null +++ b/queue-3.4/rt2x00-fix-stop-queue.patch @@ -0,0 +1,74 @@ +From e2288b66fe7ff0288382b2af671b4da558b44472 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Sun, 28 Jul 2013 13:17:22 +0200 +Subject: rt2x00: fix stop queue + +From: Stanislaw Gruszka + +commit e2288b66fe7ff0288382b2af671b4da558b44472 upstream. + +Since we clear QUEUE_STARTED in rt2x00queue_stop_queue(), following +call to rt2x00queue_pause_queue() reduce to noop, i.e we do not +stop queue in mac80211. + +To fix that introduce rt2x00queue_pause_queue_nocheck() function, +which will stop queue in mac80211 directly. + +Note that rt2x00_start_queue() explicitly set QUEUE_PAUSED bit. + +Note also that reordering operations i.e. first call to +rt2x00queue_pause_queue() and then clear QUEUE_STARTED bit, will race +with rt2x00queue_unpause_queue(), so calling ieee80211_stop_queue() +directly is the only available solution to fix the problem without +major rework. + +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/rt2x00/rt2x00queue.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +--- a/drivers/net/wireless/rt2x00/rt2x00queue.c ++++ b/drivers/net/wireless/rt2x00/rt2x00queue.c +@@ -856,13 +856,8 @@ void rt2x00queue_index_inc(struct queue_ + spin_unlock_irqrestore(&queue->index_lock, irqflags); + } + +-void rt2x00queue_pause_queue(struct data_queue *queue) ++void rt2x00queue_pause_queue_nocheck(struct data_queue *queue) + { +- if (!test_bit(DEVICE_STATE_PRESENT, &queue->rt2x00dev->flags) || +- !test_bit(QUEUE_STARTED, &queue->flags) || +- test_and_set_bit(QUEUE_PAUSED, &queue->flags)) +- return; +- + switch (queue->qid) { + case QID_AC_VO: + case QID_AC_VI: +@@ -878,6 +873,15 @@ void rt2x00queue_pause_queue(struct data + break; + } + } ++void rt2x00queue_pause_queue(struct data_queue *queue) ++{ ++ if (!test_bit(DEVICE_STATE_PRESENT, &queue->rt2x00dev->flags) || ++ !test_bit(QUEUE_STARTED, &queue->flags) || ++ test_and_set_bit(QUEUE_PAUSED, &queue->flags)) ++ return; ++ ++ rt2x00queue_pause_queue_nocheck(queue); ++} + EXPORT_SYMBOL_GPL(rt2x00queue_pause_queue); + + void rt2x00queue_unpause_queue(struct data_queue *queue) +@@ -939,7 +943,7 @@ void rt2x00queue_stop_queue(struct data_ + return; + } + +- rt2x00queue_pause_queue(queue); ++ rt2x00queue_pause_queue_nocheck(queue); + + queue->rt2x00dev->ops->lib->stop_queue(queue); + diff --git a/queue-3.4/series b/queue-3.4/series index 8f0ba0797fd..7e2eda98d8a 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -3,3 +3,10 @@ serial-mxs-auart-fix-race-condition-in-interrupt-handler.patch serial-mxs-auart-increase-time-to-wait-for-transmitter-to-become-idle.patch dma-pl330-fix-cyclic-transfers.patch atl1c-fix-misuse-of-netdev_alloc_skb-in-refilling-rx-ring.patch +ath9k_htc-do-some-initial-hardware-configuration.patch +nl80211-fix-mgmt-tx-status-and-testmode-reporting-for-netns.patch +mac80211-fix-duplicate-retransmission-detection.patch +ixgbe-fix-tx-hang-issue-with-lldpad-on-82598eb.patch +rt2x00-fix-stop-queue.patch +mwifiex-add-missing-endian-conversion.patch +acpi-battery-fix-parsing-_bix-return-value.patch -- 2.47.3