]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mwifiex: fix corner case association failure
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 23 Feb 2016 13:16:17 +0000 (05:16 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:05:54 +0000 (00:05 +0200)
commit a6139b6271f9f95377fe3486aed6120c9142779b upstream.

This patch corrects the error case in association path by returning
-1. Earlier "media_connected" used to remain on in this error case
causing failure for further association attempts.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Fixes: b887664d882ee4 ('mwifiex: channel switch handling for station')
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mwifiex/sta_ioctl.c

index 536c14aa71f39cb0e4f73417429fca55258af5ed..c73470569e6d25624a4401a7039af0bd06fb5a7b 100644 (file)
@@ -308,6 +308,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
                        dev_err(adapter->dev,
                                "Attempt to reconnect on csa closed chan(%d)\n",
                                bss_desc->channel);
+                       ret = -1;
                        goto done;
                }