Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111630
b: refs/heads/master
c: ee96d6e
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 11, 2008
1 parent 2879bac commit 483fe09
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 491775a50787b9fbb09b5735be3d111c65935f5c
refs/heads/master: ee96d6ef82cc29421569b7cb7f7c7ee90168ec50
40 changes: 18 additions & 22 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3822,6 +3822,7 @@ ieee80211_sta_scan_result(struct ieee80211_local *local,
char *current_ev, char *end_buf)
{
struct iw_event iwe;
char *buf;

if (time_after(jiffies,
bss->last_update + IEEE80211_SCAN_RESULT_EXPIRE))
Expand Down Expand Up @@ -3896,7 +3897,7 @@ ieee80211_sta_scan_result(struct ieee80211_local *local,

ieee80211_sta_add_scan_ies(info, bss, &current_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;
Expand All @@ -3915,30 +3916,25 @@ ieee80211_sta_scan_result(struct ieee80211_local *local,
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) {
Expand Down

0 comments on commit 483fe09

Please sign in to comment.