diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/join.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 82e63cee1e97..7b0858af8f5d 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -1180,16 +1180,18 @@ int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv, | |||
1180 | struct mwifiex_adapter *adapter = priv->adapter; | 1180 | struct mwifiex_adapter *adapter = priv->adapter; |
1181 | struct host_cmd_ds_802_11_ad_hoc_result *adhoc_result; | 1181 | struct host_cmd_ds_802_11_ad_hoc_result *adhoc_result; |
1182 | struct mwifiex_bssdescriptor *bss_desc; | 1182 | struct mwifiex_bssdescriptor *bss_desc; |
1183 | u16 reason_code; | ||
1183 | 1184 | ||
1184 | adhoc_result = &resp->params.adhoc_result; | 1185 | adhoc_result = &resp->params.adhoc_result; |
1185 | 1186 | ||
1186 | bss_desc = priv->attempted_bss_desc; | 1187 | bss_desc = priv->attempted_bss_desc; |
1187 | 1188 | ||
1188 | /* Join result code 0 --> SUCCESS */ | 1189 | /* Join result code 0 --> SUCCESS */ |
1189 | if (le16_to_cpu(resp->result)) { | 1190 | reason_code = le16_to_cpu(resp->result); |
1191 | if (reason_code) { | ||
1190 | dev_err(priv->adapter->dev, "ADHOC_RESP: failed\n"); | 1192 | dev_err(priv->adapter->dev, "ADHOC_RESP: failed\n"); |
1191 | if (priv->media_connected) | 1193 | if (priv->media_connected) |
1192 | mwifiex_reset_connect_state(priv); | 1194 | mwifiex_reset_connect_state(priv, reason_code); |
1193 | 1195 | ||
1194 | memset(&priv->curr_bss_params.bss_descriptor, | 1196 | memset(&priv->curr_bss_params.bss_descriptor, |
1195 | 0x00, sizeof(struct mwifiex_bssdescriptor)); | 1197 | 0x00, sizeof(struct mwifiex_bssdescriptor)); |