mwifiex: handle association failure case correctly
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 2 Feb 2012 04:41:43 +0000 (20:41 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:23 +0000 (04:33 +0000)
commit0f855d47fb601f23ba8a70fb7d400a06a12df20c
treee465bc612ada257991a80cebe865e0e58e13e1e1
parent336c24e216b6463dc374b2ca8be47901aed5be3f
mwifiex: handle association failure case correctly

commit b7097eb75fa11c302dcdec83f1dbfa874e0af0d1 upstream.

Currently even if association is failed "iw link" shows some
information about connected BSS and "Tx timeout" error is seen in
dmesg log.

This patch fixes below issues in the code to handle assoc failure
case correctly.
1) "status" variable in mwifiex_wait_queue_complete() is not
correctly updated. Hence driver doesn't inform cfg80211 stack
about association failure.
2) During association network queues are stopped but carrier is
not cleared, which gives Tx timeout error in failure case

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mwifiex/sta_ioctl.c