Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351956
b: refs/heads/master
c: 7532c7d
h: refs/heads/master
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Jan 22, 2013
1 parent 408d2b1 commit adbe432
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 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: 84e9e8ebd369679a958200a8baca96aafb2393bb
refs/heads/master: 7532c7d0138a4984eb0c8b12b9c310cf8a6d6977
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/mwifiex/fw.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ enum P2P_MODES {
#define HOST_SLEEP_CFG_GPIO_DEF 0xff
#define HOST_SLEEP_CFG_GAP_DEF 0

#define MWIFIEX_TIMEOUT_FOR_AP_RESP 0xfffc
#define MWIFIEX_STATUS_CODE_AUTH_TIMEOUT 2

#define CMD_F_HOSTCMD (1 << 0)
#define CMD_F_CANCELED (1 << 1)

Expand Down
20 changes: 15 additions & 5 deletions trunk/drivers/net/wireless/mwifiex/join.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,23 +615,33 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
struct ieee_types_assoc_rsp *assoc_rsp;
struct mwifiex_bssdescriptor *bss_desc;
u8 enable_data = true;
u16 cap_info, status_code;

assoc_rsp = (struct ieee_types_assoc_rsp *) &resp->params;

cap_info = le16_to_cpu(assoc_rsp->cap_info_bitmap);
status_code = le16_to_cpu(assoc_rsp->status_code);

priv->assoc_rsp_size = min(le16_to_cpu(resp->size) - S_DS_GEN,
sizeof(priv->assoc_rsp_buf));

memcpy(priv->assoc_rsp_buf, &resp->params, priv->assoc_rsp_size);

if (le16_to_cpu(assoc_rsp->status_code)) {
if (status_code) {
priv->adapter->dbg.num_cmd_assoc_failure++;
dev_err(priv->adapter->dev,
"ASSOC_RESP: failed, status code=%d err=%#x a_id=%#x\n",
le16_to_cpu(assoc_rsp->status_code),
le16_to_cpu(assoc_rsp->cap_info_bitmap),
le16_to_cpu(assoc_rsp->a_id));
status_code, cap_info, le16_to_cpu(assoc_rsp->a_id));

if (cap_info == MWIFIEX_TIMEOUT_FOR_AP_RESP) {
if (status_code == MWIFIEX_STATUS_CODE_AUTH_TIMEOUT)
ret = WLAN_STATUS_AUTH_TIMEOUT;
else
ret = WLAN_STATUS_UNSPECIFIED_FAILURE;
} else {
ret = status_code;
}

ret = le16_to_cpu(assoc_rsp->status_code);
goto done;
}

Expand Down

0 comments on commit adbe432

Please sign in to comment.