Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306659
b: refs/heads/master
c: 99e126f
h: refs/heads/master
i:
  306657: 0fb6c24
  306655: ee34fea
v: v3
  • Loading branch information
Bing Zhao authored and John W. Linville committed May 15, 2012
1 parent 133755c commit f523cc9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a4ffa4c8934bd9a36c8354a4b87a529114baf62
refs/heads/master: 99e126fdc04fb567567a6ec14317fae16a7a2de1
22 changes: 12 additions & 10 deletions trunk/drivers/net/wireless/mwifiex/join.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,19 +1377,21 @@ static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv, u8 *mac)
*/
int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac)
{
int ret = 0;
if (!priv->media_connected)
return 0;

if (priv->media_connected) {
if (priv->bss_mode == NL80211_IFTYPE_STATION) {
ret = mwifiex_deauthenticate_infra(priv, mac);
} else if (priv->bss_mode == NL80211_IFTYPE_ADHOC) {
ret = mwifiex_send_cmd_sync(priv,
HostCmd_CMD_802_11_AD_HOC_STOP,
HostCmd_ACT_GEN_SET, 0, NULL);
}
switch (priv->bss_mode) {
case NL80211_IFTYPE_STATION:
return mwifiex_deauthenticate_infra(priv, mac);
case NL80211_IFTYPE_ADHOC:
return mwifiex_send_cmd_sync(priv,
HostCmd_CMD_802_11_AD_HOC_STOP,
HostCmd_ACT_GEN_SET, 0, NULL);
default:
break;
}

return ret;
return 0;
}
EXPORT_SYMBOL_GPL(mwifiex_deauthenticate);

Expand Down

0 comments on commit f523cc9

Please sign in to comment.