aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 15:38:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 15:38:09 -0400
commitbf7394ccc13fe291d9258f01113b4c61214ddeae (patch)
tree0ed848f769bf5117fd96f03ffdc3bf0ec8a8e2b2 /net
parentb380b0d4f7dffcc235c0facefa537d4655619101 (diff)
Revert "mac80211: Use IWEVASSOCREQIE instead of IWEVCUSTOM"
This reverts commit 087d833e5a9f67ba933cb32eaf5a2279c1a5b47c, which was reported to break wireless at least in some combinations with 32bit user space and a 64bit kernel. Alex Williamnson bisected it to this commit. Reported-and-bisected-by: Alex Williamson <alex.williamson@hp.com> Acked-by: John W. Linville <linville@tuxdriver.com> Cc: David Miller <davem@davemloft.net> Cc: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c48
1 files changed, 39 insertions, 9 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9bb68c6a8f4..902cac1bd24 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -478,21 +478,51 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info(
478static void ieee80211_sta_send_associnfo(struct net_device *dev, 478static 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;
481 union iwreq_data wrqu; 484 union iwreq_data wrqu;
482 485
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(");
483 if (ifsta->assocreq_ies) { 495 if (ifsta->assocreq_ies) {
484 memset(&wrqu, 0, sizeof(wrqu)); 496 len += sprintf(buf + len, "ReqIEs=");
485 wrqu.data.length = ifsta->assocreq_ies_len; 497 for (i = 0; i < ifsta->assocreq_ies_len; i++) {
486 wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, 498 len += sprintf(buf + len, "%02x",
487 ifsta->assocreq_ies); 499 ifsta->assocreq_ies[i]);
500 }
488 } 501 }
489
490 if (ifsta->assocresp_ies) { 502 if (ifsta->assocresp_ies) {
491 memset(&wrqu, 0, sizeof(wrqu)); 503 if (ifsta->assocreq_ies)
492 wrqu.data.length = ifsta->assocresp_ies_len; 504 len += sprintf(buf + len, " ");
493 wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, 505 len += sprintf(buf + len, "RespIEs=");
494 ifsta->assocresp_ies); 506 for (i = 0; i < ifsta->assocresp_ies_len; i++) {
507 len += sprintf(buf + len, "%02x",
508 ifsta->assocresp_ies[i]);
509 }
510 }
511 len += sprintf(buf + len, ")");
512
513 if (len > IW_CUSTOM_MAX) {
514 len = sprintf(buf, "ASSOCRESPIE=");
515 for (i = 0; i < ifsta->assocresp_ies_len; i++) {
516 len += sprintf(buf + len, "%02x",
517 ifsta->assocresp_ies[i]);
518 }
495 } 519 }
520
521 memset(&wrqu, 0, sizeof(wrqu));
522 wrqu.data.length = len;
523 wireless_send_event(dev, IWEVCUSTOM, &wrqu, buf);
524
525 kfree(buf);
496} 526}
497 527
498 528