aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2012-05-01 22:53:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-15 17:27:27 -0400
commit99e126fdc04fb567567a6ec14317fae16a7a2de1 (patch)
tree93988a77879450ef597834104aeba89470883b99 /drivers/net/wireless/mwifiex
parent2a4ffa4c8934bd9a36c8354a4b87a529114baf62 (diff)
mwifiex: fix coding style issue in mwifiex_deauthenticate
Documentation/CodingStyle says "Do not unnecessarily use braces where a single statement will do." Use "switch/case", instead of "if/else_if/else", so that more cases can be added later. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/join.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 8a390982463e..aeb0b3fc4599 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1377,19 +1377,21 @@ static int mwifiex_deauthenticate_infra(struct mwifiex_private *priv, u8 *mac)
1377 */ 1377 */
1378int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac) 1378int mwifiex_deauthenticate(struct mwifiex_private *priv, u8 *mac)
1379{ 1379{
1380 int ret = 0; 1380 if (!priv->media_connected)
1381 return 0;
1381 1382
1382 if (priv->media_connected) { 1383 switch (priv->bss_mode) {
1383 if (priv->bss_mode == NL80211_IFTYPE_STATION) { 1384 case NL80211_IFTYPE_STATION:
1384 ret = mwifiex_deauthenticate_infra(priv, mac); 1385 return mwifiex_deauthenticate_infra(priv, mac);
1385 } else if (priv->bss_mode == NL80211_IFTYPE_ADHOC) { 1386 case NL80211_IFTYPE_ADHOC:
1386 ret = mwifiex_send_cmd_sync(priv, 1387 return mwifiex_send_cmd_sync(priv,
1387 HostCmd_CMD_802_11_AD_HOC_STOP, 1388 HostCmd_CMD_802_11_AD_HOC_STOP,
1388 HostCmd_ACT_GEN_SET, 0, NULL); 1389 HostCmd_ACT_GEN_SET, 0, NULL);
1389 } 1390 default:
1391 break;
1390 } 1392 }
1391 1393
1392 return ret; 1394 return 0;
1393} 1395}
1394EXPORT_SYMBOL_GPL(mwifiex_deauthenticate); 1396EXPORT_SYMBOL_GPL(mwifiex_deauthenticate);
1395 1397