mwifiex: fix corner case association failure
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 23 Feb 2016 13:16:17 +0000 (05:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 May 2016 09:21:10 +0000 (11:21 +0200)
commitc94897e820a85375c4cb7447ac429f6d1550b331
treeef92fdceeb2bd1d5138d21fde7c692e2c8a9c157
parent5dd660ee0ebedf9aea7bbf7360584668af3cecce
mwifiex: fix corner case association failure

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mwifiex/sta_ioctl.c