diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mlme.c | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1e97fb9fb34b..09a56e24b799 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -478,51 +478,21 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info( | |||
478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, | 478 | static void ieee80211_sta_send_associnfo(struct net_device *dev, |
479 | struct ieee80211_if_sta *ifsta) | 479 | struct ieee80211_if_sta *ifsta) |
480 | { | 480 | { |
481 | char *buf; | ||
482 | size_t len; | ||
483 | int i; | ||
484 | union iwreq_data wrqu; | 481 | union iwreq_data wrqu; |
485 | 482 | ||
486 | if (!ifsta->assocreq_ies && !ifsta->assocresp_ies) | ||
487 | return; | ||
488 | |||
489 | buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + | ||
490 | ifsta->assocresp_ies_len), GFP_KERNEL); | ||
491 | if (!buf) | ||
492 | return; | ||
493 | |||
494 | len = sprintf(buf, "ASSOCINFO("); | ||
495 | if (ifsta->assocreq_ies) { | 483 | if (ifsta->assocreq_ies) { |
496 | len += sprintf(buf + len, "ReqIEs="); | 484 | memset(&wrqu, 0, sizeof(wrqu)); |
497 | for (i = 0; i < ifsta->assocreq_ies_len; i++) { | 485 | wrqu.data.length = ifsta->assocreq_ies_len; |
498 | len += sprintf(buf + len, "%02x", | 486 | wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, |
499 | ifsta->assocreq_ies[i]); | 487 | ifsta->assocreq_ies); |
500 | } | ||
501 | } | ||
502 | if (ifsta->assocresp_ies) { | ||
503 | if (ifsta->assocreq_ies) | ||
504 | len += sprintf(buf + len, " "); | ||
505 | len += sprintf(buf + len, "RespIEs="); | ||
506 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | ||
507 | len += sprintf(buf + len, "%02x", | ||
508 | ifsta->assocresp_ies[i]); | ||
509 | } | ||
510 | } | 488 | } |
511 | len += sprintf(buf + len, ")"); | ||
512 | 489 | ||
513 | if (len > IW_CUSTOM_MAX) { | 490 | if (ifsta->assocresp_ies) { |
514 | len = sprintf(buf, "ASSOCRESPIE="); | 491 | memset(&wrqu, 0, sizeof(wrqu)); |
515 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | 492 | wrqu.data.length = ifsta->assocresp_ies_len; |
516 | len += sprintf(buf + len, "%02x", | 493 | wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, |
517 | ifsta->assocresp_ies[i]); | 494 | ifsta->assocresp_ies); |
518 | } | ||
519 | } | 495 | } |
520 | |||
521 | memset(&wrqu, 0, sizeof(wrqu)); | ||
522 | wrqu.data.length = len; | ||
523 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); | ||
524 | |||
525 | kfree(buf); | ||
526 | } | 496 | } |
527 | 497 | ||
528 | 498 | ||