aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-30 02:06:00 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-30 02:06:00 -0400
commitb171e19ed08c8ba832e5325fadf1be493f56665d (patch)
tree017208f9fcc4ef2cc3fe5cc3f262d2455eda9f61 /net/mac80211/mlme.c
parent143b11c03cd42f2284efe5128afc057d8fc86c78 (diff)
parent7c19a3d280297d43ef5ff7c6b205dc208a16d3d1 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/mac80211/mlme.c
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 e088b440aafa..7d53382f1a5b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -500,51 +500,21 @@ int ieee80211_ht_addt_info_ie_to_ht_bss_info(
500static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata, 500static void ieee80211_sta_send_associnfo(struct ieee80211_sub_if_data *sdata,
501 struct ieee80211_if_sta *ifsta) 501 struct ieee80211_if_sta *ifsta)
502{ 502{
503 char *buf;
504 size_t len;
505 int i;
506 union iwreq_data wrqu; 503 union iwreq_data wrqu;
507 504
508 if (!ifsta->assocreq_ies && !ifsta->assocresp_ies)
509 return;
510
511 buf = kmalloc(50 + 2 * (ifsta->assocreq_ies_len +
512 ifsta->assocresp_ies_len), GFP_KERNEL);
513 if (!buf)
514 return;
515
516 len = sprintf(buf, "ASSOCINFO(");
517 if (ifsta->assocreq_ies) { 505 if (ifsta->assocreq_ies) {
518 len += sprintf(buf + len, "ReqIEs="); 506 memset(&wrqu, 0, sizeof(wrqu));
519 for (i = 0; i < ifsta->assocreq_ies_len; i++) { 507 wrqu.data.length = ifsta->assocreq_ies_len;
520 len += sprintf(buf + len, "%02x", 508 wireless_send_event(sdata->dev, IWEVASSOCREQIE, &wrqu,
521 ifsta->assocreq_ies[i]); 509 ifsta->assocreq_ies);
522 }
523 } 510 }
524 if (ifsta->assocresp_ies) {
525 if (ifsta->assocreq_ies)
526 len += sprintf(buf + len, " ");
527 len += sprintf(buf + len, "RespIEs=");
528 for (i = 0; i < ifsta->assocresp_ies_len; i++) {
529 len += sprintf(buf + len, "%02x",
530 ifsta->assocresp_ies[i]);
531 }
532 }
533 len += sprintf(buf + len, ")");
534 511
535 if (len > IW_CUSTOM_MAX) { 512 if (ifsta->assocresp_ies) {
536 len = sprintf(buf, "ASSOCRESPIE="); 513 memset(&wrqu, 0, sizeof(wrqu));
537 for (i = 0; i < ifsta->assocresp_ies_len; i++) { 514 wrqu.data.length = ifsta->assocresp_ies_len;
538 len += sprintf(buf + len, "%02x", 515 wireless_send_event(sdata->dev, IWEVASSOCRESPIE, &wrqu,
539 ifsta->assocresp_ies[i]); 516 ifsta->assocresp_ies);
540 }
541 } 517 }
542
543 memset(&wrqu, 0, sizeof(wrqu));
544 wrqu.data.length = len;
545 wireless_send_event(sdata->dev, IWEVCUSTOM, &wrqu, buf);
546
547 kfree(buf);
548} 518}
549 519
550 520
@@ -864,7 +834,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
864 } 834 }
865 } 835 }
866 836
867 if (count == 8) { 837 if (rates_len > count) {
868 pos = skb_put(skb, rates_len - count + 2); 838 pos = skb_put(skb, rates_len - count + 2);
869 *pos++ = WLAN_EID_EXT_SUPP_RATES; 839 *pos++ = WLAN_EID_EXT_SUPP_RATES;
870 *pos++ = rates_len - count; 840 *pos++ = rates_len - count;
@@ -2788,7 +2758,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
2788 jiffies); 2758 jiffies);
2789#endif /* CONFIG_MAC80211_IBSS_DEBUG */ 2759#endif /* CONFIG_MAC80211_IBSS_DEBUG */
2790 if (beacon_timestamp > rx_timestamp) { 2760 if (beacon_timestamp > rx_timestamp) {
2791#ifndef CONFIG_MAC80211_IBSS_DEBUG 2761#ifdef CONFIG_MAC80211_IBSS_DEBUG
2792 printk(KERN_DEBUG "%s: beacon TSF higher than " 2762 printk(KERN_DEBUG "%s: beacon TSF higher than "
2793 "local TSF - IBSS merge with BSSID %s\n", 2763 "local TSF - IBSS merge with BSSID %s\n",
2794 sdata->dev->name, print_mac(mac, mgmt->bssid)); 2764 sdata->dev->name, print_mac(mac, mgmt->bssid));