Skip to content

Commit

Permalink
wireless: restore revert lost to merge damage
Browse files Browse the repository at this point in the history
Restore revert "mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM",
originally reverted in commit bf7394c.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Linus Torvalds authored and John W. Linville committed Oct 6, 2008
1 parent 8ec8eba commit 74af025
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,20 +650,51 @@ static void ieee80211_sta_send_apinfo(struct ieee80211_sub_if_data *sdata,
static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata,
struct ieee80211_if_sta *ifsta)
{
char *buf;
size_t len;
int i;
union iwreq_data wrqu;

if (!ifsta->assocreq_ies && !ifsta->assocresp_ies)
return;

buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len +
ifsta->assocresp_ies_len), GFP_KERNEL);
if (!buf)
return;

len = sprintf(buf, "ASSOCINFO(");
if (ifsta->assocreq_ies) {
memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = ifsta->assocreq_ies_len;
wireless_send_event(sdata->dev, IWEVASSOCREQIE, &wrqu,
ifsta->assocreq_ies);
len += sprintf(buf + len, "ReqIEs=");
for (i = 0; i < ifsta->assocreq_ies_len; i++) {
len += sprintf(buf + len, "%02x",
ifsta->assocreq_ies[i]);
}
}
if (ifsta->assocresp_ies) {
memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = ifsta->assocresp_ies_len;
wireless_send_event(sdata->dev, IWEVASSOCRESPIE, &wrqu,
ifsta->assocresp_ies);
if (ifsta->assocreq_ies)
len += sprintf(buf + len, " ");
len += sprintf(buf + len, "RespIEs=");
for (i = 0; i < ifsta->assocresp_ies_len; i++) {
len += sprintf(buf + len, "%02x",
ifsta->assocresp_ies[i]);
}
}
len += sprintf(buf + len, ")");

if (len > IW_CUSTOM_MAX) {
len = sprintf(buf, "ASSOCRESPIE=");
for (i = 0; i < ifsta->assocresp_ies_len; i++) {
len += sprintf(buf + len, "%02x",
ifsta->assocresp_ies[i]);
}
}

memset(&wrqu, 0, sizeof(wrqu));
wrqu.data.length = len;
wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);

kfree(buf);
}


Expand Down

0 comments on commit 74af025

Please sign in to comment.