aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-27 07:29:50 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-27 07:29:50 -0400
commit6c36810a731a422535d838cdb440f332c1d91017 (patch)
treeec8c129bbd7b1277cb947621a930ef7dce03d943 /net/mac80211/mlme.c
parentdf69471290cbec7714f6d1fabd14f4e41219cee1 (diff)
parent576fdeaef631976c3afcb1d78ef196051282611d (diff)
Merge branch 'no-iwlwifi' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c52
1 files changed, 11 insertions, 41 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1e97fb9fb34b..9bb68c6a8f44 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(
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;
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 } 488 }
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 }
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
@@ -813,7 +783,7 @@ static void ieee80211_send_assoc(struct net_device *dev,
813 } 783 }
814 } 784 }
815 785
816 if (count == 8) { 786 if (rates_len > count) {
817 pos = skb_put(skb, rates_len - count + 2); 787 pos = skb_put(skb, rates_len - count + 2);
818 *pos++ = WLAN_EID_EXT_SUPP_RATES; 788 *pos++ = WLAN_EID_EXT_SUPP_RATES;
819 *pos++ = rates_len - count; 789 *pos++ = rates_len - count;
@@ -2868,7 +2838,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
2868 jiffies); 2838 jiffies);
2869#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 2839#endif /* CONFIG_MAC80211_IBSS_DEBUG */
2870 if (beacon_timestamp > rx_timestamp) { 2840 if (beacon_timestamp > rx_timestamp) {
2871#ifndef CONFIG_MAC80211_IBSS_DEBUG 2841#ifdef CONFIG_MAC80211_IBSS_DEBUG
2872 printk(KERN_DEBUG "%s: beacon TSF higher than " 2842 printk(KERN_DEBUG "%s: beacon TSF higher than "
2873 "local TSF - IBSS merge with BSSID %s\n", 2843 "local TSF - IBSS merge with BSSID %s\n",
2874 dev->name, print_mac(mac, mgmt->bssid)); 2844 dev->name, print_mac(mac, mgmt->bssid));