mwifiex: update cfg80211 with correct reason code when connection is lost
authorAmitkumar Karwar <akarwar@marvell.com>
Sat, 6 Oct 2012 03:21:43 +0000 (20:21 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Oct 2012 19:06:03 +0000 (15:06 -0400)
commit8cc1d52390f53c6dd46ae71e29ea000634a17e3a
tree71f8855235d3ae8b8bd5e6e6c5637b3d132ee3e4
parent06975884280976ba215ad0766bee1a69df612434
mwifiex: update cfg80211 with correct reason code when connection is lost

Driver gets LINK_LOST, DEAUTHENTICATED and DISASSOCIATED events
from firmware when connection is lost in different scenarios.
Currently we are using common code WLAN_REASON_DEAUTH_LEAVING
for these cases.

This patch adds support to parse an actual reason code from
firmware event body and send it to cfg80211.
WLAN_REASON_DEAUTH_LEAVING code is used if deauth is initiated
by our device.

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>
drivers/net/wireless/mwifiex/join.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/sta_cmdresp.c
drivers/net/wireless/mwifiex/sta_event.c