Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-20 09:27:50 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-20 09:27:54 +0100
commitf2a7fe0ec10967c78563d975dc1f0a91a5077706 (patch)
tree74fb481bbb4c347ad062903604d124afa2323bc1
parent2673f1e2e840156937ec78c57c29684adea36ec8 (diff)
mac80211: Restore vif beacon interval if start ap fails
(bsc#1051510).
-rw-r--r--patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch72
-rw-r--r--series.conf1
2 files changed, 73 insertions, 0 deletions
diff --git a/patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch b/patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch
new file mode 100644
index 0000000000..49eb304aaa
--- /dev/null
+++ b/patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch
@@ -0,0 +1,72 @@
+From 83e37e0bdd1470bbe6612250b745ad39b1a7b130 Mon Sep 17 00:00:00 2001
+From: Rakesh Pillai <pillair@codeaurora.org>
+Date: Fri, 15 Feb 2019 14:16:02 +0530
+Subject: [PATCH] mac80211: Restore vif beacon interval if start ap fails
+Git-commit: 83e37e0bdd1470bbe6612250b745ad39b1a7b130
+Patch-mainline: v5.0
+References: bsc#1051510
+
+The starting of AP interface can fail due to invalid
+beacon interval, which does not match the minimum gcd
+requirement set by the wifi driver. In such case, the
+beacon interval of that interface gets updated with
+that invalid beacon interval.
+
+The next time that interface is brought up in AP mode,
+an interface combination check is performed and the
+beacon interval is taken from the previously set value.
+
+In a case where an invalid beacon interval, i.e. a beacon
+interval value which does not satisfy the minimum gcd criteria
+set by the driver, is set, all the subsequent trials to
+bring that interface in AP mode will fail, even if the
+subsequent trials have a valid beacon interval.
+
+To avoid this, in case of a failure in bringing up an
+interface in AP mode due to interface combination error,
+the interface beacon interval which is stored in bss
+conf, needs to be restored with the last working value
+of beacon interval.
+
+Tested on ath10k using WCN3990.
+
+Cc: stable@vger.kernel.org
+Fixes: 0c317a02ca98 ("cfg80211: support virtual interfaces with different beacon intervals")
+Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/mac80211/cfg.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -884,6 +884,7 @@ static int ieee80211_start_ap(struct wip
+ BSS_CHANGED_P2P_PS |
+ BSS_CHANGED_TXPOWER;
+ int err;
++ int prev_beacon_int;
+
+ old = sdata_dereference(sdata->u.ap.beacon, sdata);
+ if (old)
+@@ -906,6 +907,7 @@ static int ieee80211_start_ap(struct wip
+
+ sdata->needed_rx_chains = sdata->local->rx_chains;
+
++ prev_beacon_int = sdata->vif.bss_conf.beacon_int;
+ sdata->vif.bss_conf.beacon_int = params->beacon_interval;
+
+ mutex_lock(&local->mtx);
+@@ -914,8 +916,10 @@ static int ieee80211_start_ap(struct wip
+ if (!err)
+ ieee80211_vif_copy_chanctx_to_vlans(sdata, false);
+ mutex_unlock(&local->mtx);
+- if (err)
++ if (err) {
++ sdata->vif.bss_conf.beacon_int = prev_beacon_int;
+ return err;
++ }
+
+ /*
+ * Apply control port protocol, this allows us to
diff --git a/series.conf b/series.conf
index ce7c4649d4..f740eabfb2 100644
--- a/series.conf
+++ b/series.conf
@@ -20370,6 +20370,7 @@
patches.drivers/floppy-check_events-callback-should-not-return-a-neg.patch
patches.drivers/i2c-cadence-Fix-the-hold-bit-setting.patch
patches.drivers/i2c-bcm2835-Clear-current-buffer-pointers-and-counts.patch
+ patches.fixes/mac80211-Restore-vif-beacon-interval-if-start-ap-fai.patch
# git://linuxtv.org/media_tree.git
patches.fixes/0001-media-usb-pwc-Don-t-use-coherent-DMA-buffers-for-ISO.patch