From 776ca662614e559253f997462da8b96d5854faec Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 26 Jul 2016 08:25:51 +0200 Subject: [PATCH] ath9k: fix warning in client mode (GH#195) Signed-off-by: Felix Fietkau --- ...fix-client-mode-beacon-configuration.patch | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/kernel/mac80211/patches/333-ath9k-fix-client-mode-beacon-configuration.patch diff --git a/package/kernel/mac80211/patches/333-ath9k-fix-client-mode-beacon-configuration.patch b/package/kernel/mac80211/patches/333-ath9k-fix-client-mode-beacon-configuration.patch new file mode 100644 index 0000000000..d008ceb706 --- /dev/null +++ b/package/kernel/mac80211/patches/333-ath9k-fix-client-mode-beacon-configuration.patch @@ -0,0 +1,69 @@ +From: Felix Fietkau +Date: Tue, 26 Jul 2016 08:05:10 +0200 +Subject: [PATCH] ath9k: fix client mode beacon configuration + +For pure station mode, iter_data.primary_beacon_vif was used and passed +to ath_beacon_config, but not set to the station vif. +This was causing the following warning: + +[ 100.310919] ------------[ cut here ]------------ +[ 100.315683] WARNING: CPU: 0 PID: 7 at compat-wireless-2016-06-20/drivers/net/wireless/ath/ath9k/beacon.c:642 ath9k_calculate_summary_state+0x250/0x60c [ath9k]() +[ 100.402028] CPU: 0 PID: 7 Comm: kworker/u2:1 Tainted: G W 4.4.15 #5 +[ 100.409676] Workqueue: phy0 ieee80211_ibss_leave [mac80211] +[ 100.415351] Stack : 8736e98c 870b4b20 87a25b54 800a6800 8782a080 80400d63 8039b96c 00000007 +[ 100.415351] 803c5edc 87875914 80400000 800a47cc 87a25b54 800a6800 803a0fd8 80400000 +[ 100.415351] 00000003 87875914 80400000 80094ae0 87a25b54 8787594c 00000000 801ef308 +[ 100.415351] 803ffe70 801ef300 87193d58 87b3a400 87b3ad00 70687930 00000000 00000000 +[ 100.415351] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 +[ 100.415351] ... +[ 100.451703] Call Trace: +[ 100.454235] [<800a6800>] vprintk_default+0x24/0x30 +[ 100.459110] [<800a47cc>] printk+0x2c/0x38 +[ 100.463190] [<800a6800>] vprintk_default+0x24/0x30 +[ 100.468072] [<80094ae0>] print_worker_info+0x148/0x174 +[ 100.473378] [<801ef308>] serial8250_console_putchar+0x0/0x44 +[ 100.479122] [<801ef300>] wait_for_xmitr+0xc4/0xcc +[ 100.484014] [<87193d58>] ieee80211_ibss_leave+0xb90/0x1900 [mac80211] +[ 100.490590] [<80081604>] warn_slowpath_common+0xa0/0xd0 +[ 100.495922] [<801a359c>] dump_stack+0x14/0x28 +[ 100.500350] [<80071a00>] show_stack+0x50/0x84 +[ 100.504784] [<80081604>] warn_slowpath_common+0xa0/0xd0 +[ 100.510106] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k] +[ 100.517105] [<800816b8>] warn_slowpath_null+0x18/0x24 +[ 100.522256] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k] +[ 100.529273] [<87025418>] ath9k_set_txpower+0x148/0x498 [ath9k] +[ 100.535302] [<871d2c64>] cleanup_module+0xa74/0xd4c [mac80211] +[ 100.541237] [<801ef308>] serial8250_console_putchar+0x0/0x44 +[ 100.547042] [<800a5d18>] wake_up_klogd+0x54/0x68 +[ 100.551730] [<800a6650>] vprintk_emit+0x404/0x43c +[ 100.556623] [<871b9db8>] ieee80211_sta_rx_notify+0x258/0x32c [mac80211] +[ 100.563475] [<871ba6a4>] ieee80211_sta_rx_queued_mgmt+0x63c/0x734 [mac80211] +[ 100.570693] [<871aa49c>] ieee80211_tx_prepare_skb+0x210/0x230 [mac80211] +[ 100.577609] [<800af5d4>] mod_timer+0x15c/0x190 +[ 100.582220] [<871ba8b8>] ieee80211_sta_work+0xfc/0xe1c [mac80211] +[ 100.588539] [<871940b4>] ieee80211_ibss_leave+0xeec/0x1900 [mac80211] +[ 100.595122] [<8009ec84>] dequeue_task_fair+0x44/0x130 +[ 100.600281] [<80092a34>] process_one_work+0x1f8/0x334 +[ 100.605454] [<80093830>] worker_thread+0x2b4/0x408 +[ 100.610317] [<8009357c>] worker_thread+0x0/0x408 +[ 100.615019] [<8009357c>] worker_thread+0x0/0x408 +[ 100.619705] [<80097b68>] kthread+0xdc/0xe8 +[ 100.623886] [<80097a8c>] kthread+0x0/0xe8 +[ 100.627961] [<80060878>] ret_from_kernel_thread+0x14/0x1c +[ 100.633448] +[ 100.634956] ---[ end trace aafbe57e9ae6862f ]--- + +Fixes: cfda2d8e2314 ("ath9k: Fix beacon configuration for addition/removal of interfaces") +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -1154,6 +1154,7 @@ void ath9k_calculate_summary_state(struc + bool changed = (iter_data.primary_sta != ctx->primary_sta); + + if (iter_data.primary_sta) { ++ iter_data.primary_beacon_vif = iter_data.primary_sta; + iter_data.beacons = true; + ath9k_set_assoc_state(sc, iter_data.primary_sta, + changed); -- 2.30.2