diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/join.c')
| -rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 9d7c0e6c4fc7..37f873bb342f 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
| @@ -1422,13 +1422,19 @@ static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv, u8 *mac) | |||
| 1422 | */ | 1422 | */ |
| 1423 | int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) | 1423 | int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) |
| 1424 | { | 1424 | { |
| 1425 | int ret = 0; | ||
| 1426 | |||
| 1425 | if (!priv->media_connected) | 1427 | if (!priv->media_connected) |
| 1426 | return 0; | 1428 | return 0; |
| 1427 | 1429 | ||
| 1428 | switch (priv->bss_mode) { | 1430 | switch (priv->bss_mode) { |
| 1429 | case NL80211_IFTYPE_STATION: | 1431 | case NL80211_IFTYPE_STATION: |
| 1430 | case NL80211_IFTYPE_P2P_CLIENT: | 1432 | case NL80211_IFTYPE_P2P_CLIENT: |
| 1431 | return mwifiex_deauthenticate_infra(priv, mac); | 1433 | ret = mwifiex_deauthenticate_infra(priv, mac); |
| 1434 | if (ret) | ||
| 1435 | cfg80211_disconnected(priv->netdev, 0, NULL, 0, | ||
| 1436 | GFP_KERNEL); | ||
| 1437 | break; | ||
| 1432 | case NL80211_IFTYPE_ADHOC: | 1438 | case NL80211_IFTYPE_ADHOC: |
| 1433 | return mwifiex_send_cmd_sync(priv, | 1439 | return mwifiex_send_cmd_sync(priv, |
| 1434 | HostCmd_CMD_802_11_AD_HOC_STOP, | 1440 | HostCmd_CMD_802_11_AD_HOC_STOP, |
| @@ -1440,7 +1446,7 @@ int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) | |||
| 1440 | break; | 1446 | break; |
| 1441 | } | 1447 | } |
| 1442 | 1448 | ||
| 1443 | return 0; | 1449 | return ret; |
| 1444 | } | 1450 | } |
| 1445 | EXPORT_SYMBOL_GPL(mwifiex_deauthenticate); | 1451 | EXPORT_SYMBOL_GPL(mwifiex_deauthenticate); |
| 1446 | 1452 | ||
