I'm surprised nobody complained about these before. What a waste. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- net/mac80211/mlme.c | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) --- everything.orig/net/mac80211/mlme.c 2008-09-06 19:39:35.000000000 +0200 +++ everything/net/mac80211/mlme.c 2008-09-06 19:41:16.000000000 +0200 @@ -3776,6 +3776,7 @@ ieee80211_sta_scan_result(struct ieee802 char *current_ev, char *end_buf) { struct iw_event iwe; + char *buf; if (time_after(jiffies, bss->last_update + IEEE80211_SCAN_RESULT_EXPIRE)) @@ -3850,7 +3851,7 @@ ieee80211_sta_scan_result(struct ieee802 ieee80211_sta_add_scan_ies(info, bss, ¤t_ev, end_buf); - if (bss && bss->supp_rates_len > 0) { + if (bss->supp_rates_len > 0) { /* display all supported rates in readable format */ char *p = current_ev + iwe_stream_lcp_len(info); int i; @@ -3869,30 +3870,25 @@ ieee80211_sta_scan_result(struct ieee802 current_ev = p; } - if (bss) { - char *buf; - buf = kmalloc(30, GFP_ATOMIC); - if (buf) { - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, "tsf=%016llx", (unsigned long long)(bss->timestamp)); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(info, current_ev, - end_buf, - &iwe, buf); - memset(&iwe, 0, sizeof(iwe)); - iwe.cmd = IWEVCUSTOM; - sprintf(buf, " Last beacon: %dms ago", - jiffies_to_msecs(jiffies - bss->last_update)); - iwe.u.data.length = strlen(buf); - current_ev = iwe_stream_add_point(info, current_ev, - end_buf, &iwe, buf); - kfree(buf); - } + buf = kmalloc(30, GFP_ATOMIC); + if (buf) { + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVCUSTOM; + sprintf(buf, "tsf=%016llx", (unsigned long long)(bss->timestamp)); + iwe.u.data.length = strlen(buf); + current_ev = iwe_stream_add_point(info, current_ev, end_buf, + &iwe, buf); + memset(&iwe, 0, sizeof(iwe)); + iwe.cmd = IWEVCUSTOM; + sprintf(buf, " Last beacon: %dms ago", + jiffies_to_msecs(jiffies - bss->last_update)); + iwe.u.data.length = strlen(buf); + current_ev = iwe_stream_add_point(info, current_ev, + end_buf, &iwe, buf); + kfree(buf); } if (bss_mesh_cfg(bss)) { - char *buf; u8 *cfg = bss_mesh_cfg(bss); buf = kmalloc(50, GFP_ATOMIC); if (buf) { -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html