diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
commit | 616ad8c44281c0c6711a72b560e01ec335ff27e0 (patch) | |
tree | 0a20453ffedb09db6fb41a0c2208ccc2c7751d3a /net/mac80211/mlme.c | |
parent | 99809963c99e1ed868d9ebeb4a5e7ee1cbe0309f (diff) | |
parent | b380b0d4f7dffcc235c0facefa537d4655619101 (diff) |
Merge branch 'linus' into x86/defconfig
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 54 |
1 files changed, 13 insertions, 41 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e1d11c9b6729..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( | |||
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 | } | 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; |
@@ -2103,6 +2073,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2103 | rcu_read_unlock(); | 2073 | rcu_read_unlock(); |
2104 | return; | 2074 | return; |
2105 | } | 2075 | } |
2076 | /* update new sta with its last rx activity */ | ||
2077 | sta->last_rx = jiffies; | ||
2106 | } | 2078 | } |
2107 | 2079 | ||
2108 | /* | 2080 | /* |
@@ -2866,7 +2838,7 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
2866 | jiffies); | 2838 | jiffies); |
2867 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 2839 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
2868 | if (beacon_timestamp > rx_timestamp) { | 2840 | if (beacon_timestamp > rx_timestamp) { |
2869 | #ifndef CONFIG_MAC80211_IBSS_DEBUG | 2841 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
2870 | printk(KERN_DEBUG "%s: beacon TSF higher than " | 2842 | printk(KERN_DEBUG "%s: beacon TSF higher than " |
2871 | "local TSF - IBSS merge with BSSID %s\n", | 2843 | "local TSF - IBSS merge with BSSID %s\n", |
2872 | dev->name, print_mac(mac, mgmt->bssid)); | 2844 | dev->name, print_mac(mac, mgmt->bssid)); |