diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-05 15:38:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-06 18:12:56 -0400 |
commit | 74af025073461b9ebe82771e48a5b8596c3cf75c (patch) | |
tree | 825ea044380e8a200b0ac7729871db0b9b8702f1 | |
parent | 8ec8ebaeceedf3a845f9e23885f26d0d00eefeb7 (diff) |
wireless: restore revert lost to merge damage
Restore revert "mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM",
originally reverted in commit bf7394ccc13fe291d9258f01113b4c61214ddeae.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/mlme.c | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e859a0ab6162..edc339d649c4 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -650,20 +650,51 @@ static void ieee80211_sta_send_apinfo(struct ieee80211_sub_if_data *sdata, | |||
650 | static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata, | 650 | static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata, |
651 | struct ieee80211_if_sta *ifsta) | 651 | struct ieee80211_if_sta *ifsta) |
652 | { | 652 | { |
653 | char *buf; | ||
654 | size_t len; | ||
655 | int i; | ||
653 | union iwreq_data wrqu; | 656 | union iwreq_data wrqu; |
654 | 657 | ||
658 | if (!ifsta->assocreq_ies && !ifsta->assocresp_ies) | ||
659 | return; | ||
660 | |||
661 | buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len + | ||
662 | ifsta->assocresp_ies_len), GFP_KERNEL); | ||
663 | if (!buf) | ||
664 | return; | ||
665 | |||
666 | len = sprintf(buf, "ASSOCINFO("); | ||
655 | if (ifsta->assocreq_ies) { | 667 | if (ifsta->assocreq_ies) { |
656 | memset(&wrqu, 0, sizeof(wrqu)); | 668 | len += sprintf(buf + len, "ReqIEs="); |
657 | wrqu.data.length = ifsta->assocreq_ies_len; | 669 | for (i = 0; i < ifsta->assocreq_ies_len; i++) { |
658 | wireless_send_event(sdata->dev, IWEVASSOCREQIE, &wrqu, | 670 | len += sprintf(buf + len, "%02x", |
659 | ifsta->assocreq_ies); | 671 | ifsta->assocreq_ies[i]); |
672 | } | ||
660 | } | 673 | } |
661 | if (ifsta->assocresp_ies) { | 674 | if (ifsta->assocresp_ies) { |
662 | memset(&wrqu, 0, sizeof(wrqu)); | 675 | if (ifsta->assocreq_ies) |
663 | wrqu.data.length = ifsta->assocresp_ies_len; | 676 | len += sprintf(buf + len, " "); |
664 | wireless_send_event(sdata->dev, IWEVASSOCRESPIE, &wrqu, | 677 | len += sprintf(buf + len, "RespIEs="); |
665 | ifsta->assocresp_ies); | 678 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { |
679 | len += sprintf(buf + len, "%02x", | ||
680 | ifsta->assocresp_ies[i]); | ||
681 | } | ||
666 | } | 682 | } |
683 | len += sprintf(buf + len, ")"); | ||
684 | |||
685 | if (len > IW_CUSTOM_MAX) { | ||
686 | len = sprintf(buf, "ASSOCRESPIE="); | ||
687 | for (i = 0; i < ifsta->assocresp_ies_len; i++) { | ||
688 | len += sprintf(buf + len, "%02x", | ||
689 | ifsta->assocresp_ies[i]); | ||
690 | } | ||
691 | } | ||
692 | |||
693 | memset(&wrqu, 0, sizeof(wrqu)); | ||
694 | wrqu.data.length = len; | ||
695 | wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf); | ||
696 | |||
697 | kfree(buf); | ||
667 | } | 698 | } |
668 | 699 | ||
669 | 700 | ||