Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109479
b: refs/heads/master
c: bf7394c
h: refs/heads/master
i:
  109477: a3f45c6
  109475: 8c995d7
  109471: fe5a172
v: v3
  • Loading branch information
Linus Torvalds committed Sep 5, 2008
1 parent c8794e1 commit 1b3c4a9
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 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: b380b0d4f7dffcc235c0facefa537d4655619101
refs/heads/master: bf7394ccc13fe291d9258f01113b4c61214ddeae
48 changes: 39 additions & 9 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,21 +478,51 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info(
static void ieee80211_sta_send_associnfo(struct net_device *dev,
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(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(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 1b3c4a9

Please sign in to comment.