Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159177
b: refs/heads/master
c: b68518f
h: refs/heads/master
i:
  159175: be62224
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Jul 24, 2009
1 parent 0b64c67 commit 5119cb2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 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: 3409ff7711bcf70390d5ba8ebde5d913b5266a45
refs/heads/master: b68518fcbc6e0fe8c06a218cd2b92f62f3730cf9
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/iwmc3200wifi/iwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ struct iwm_priv {
struct work_struct reset_worker;
struct mutex mutex;

u8 *req_ie;
int req_ie_len;
u8 *resp_ie;
int resp_ie_len;

char private[0] __attribute__((__aligned__(NETDEV_ALIGN)));
};

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/iwmc3200wifi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,13 @@ void iwm_link_off(struct iwm_priv *iwm)
memset(wstats, 0, sizeof(struct iw_statistics));
wstats->qual.updated = IW_QUAL_ALL_INVALID;

kfree(iwm->req_ie);
iwm->req_ie = NULL;
iwm->req_ie_len = 0;
kfree(iwm->resp_ie);
iwm->resp_ie = NULL;
iwm->resp_ie_len = 0;

del_timer_sync(&iwm->watchdog);
}

Expand Down
36 changes: 23 additions & 13 deletions trunk/drivers/net/wireless/iwmc3200wifi/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,

cfg80211_connect_result(iwm_to_ndev(iwm),
complete->bssid,
NULL, 0, NULL, 0,
iwm->req_ie, iwm->req_ie_len,
iwm->resp_ie, iwm->resp_ie_len,
WLAN_STATUS_SUCCESS, GFP_KERNEL);
break;
case UMAC_ASSOC_COMPLETE_FAILURE:
Expand Down Expand Up @@ -771,37 +772,46 @@ static int iwm_mlme_mgt_frame(struct iwm_priv *iwm, u8 *buf,
unsigned long buf_size, struct iwm_wifi_cmd *cmd)
{
struct iwm_umac_notif_mgt_frame *mgt_frame =
(struct iwm_umac_notif_mgt_frame *)buf;
(struct iwm_umac_notif_mgt_frame *)buf;
struct ieee80211_mgmt *mgt = (struct ieee80211_mgmt *)mgt_frame->frame;
u8 *ie;
unsigned int event;
union iwreq_data wrqu;

IWM_HEXDUMP(iwm, DBG, MLME, "MGT: ", mgt_frame->frame,
le16_to_cpu(mgt_frame->len));

if (ieee80211_is_assoc_req(mgt->frame_control)) {
ie = mgt->u.assoc_req.variable;;
event = IWEVASSOCREQIE;
iwm->req_ie_len =
le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
kfree(iwm->req_ie);
iwm->req_ie = kmemdup(mgt->u.assoc_req.variable,
iwm->req_ie_len, GFP_KERNEL);
} else if (ieee80211_is_reassoc_req(mgt->frame_control)) {
ie = mgt->u.reassoc_req.variable;;
event = IWEVASSOCREQIE;
iwm->req_ie_len =
le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
kfree(iwm->req_ie);
iwm->req_ie = kmemdup(mgt->u.reassoc_req.variable,
iwm->req_ie_len, GFP_KERNEL);
} else if (ieee80211_is_assoc_resp(mgt->frame_control)) {
ie = mgt->u.assoc_resp.variable;;
event = IWEVASSOCRESPIE;
iwm->resp_ie_len =
le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
kfree(iwm->resp_ie);
iwm->resp_ie = kmemdup(mgt->u.assoc_resp.variable,
iwm->resp_ie_len, GFP_KERNEL);
} else if (ieee80211_is_reassoc_resp(mgt->frame_control)) {
ie = mgt->u.reassoc_resp.variable;;
event = IWEVASSOCRESPIE;
iwm->resp_ie_len =
le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
kfree(iwm->resp_ie);
iwm->resp_ie = kmemdup(mgt->u.reassoc_resp.variable,
iwm->resp_ie_len, GFP_KERNEL);
} else {
IWM_ERR(iwm, "Unsupported management frame");
return 0;
}

wrqu.data.length = le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);

IWM_HEXDUMP(iwm, DBG, MLME, "EVT: ", ie, wrqu.data.length);
wireless_send_event(iwm_to_ndev(iwm), event, &wrqu, ie);

return 0;
}

Expand Down

0 comments on commit 5119cb2

Please sign in to comment.