Commit 4f5d4c4d authored by Luis Carlos Cobo's avatar Luis Carlos Cobo Committed by John W. Linville

mac80211: breakdown mesh network attributes in different extra fields for wext

Signed-off-by: default avatarLuis Carlos Cobo <luisca@cozybit.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3b091cd4
...@@ -3976,18 +3976,35 @@ ieee80211_sta_scan_result(struct net_device *dev, ...@@ -3976,18 +3976,35 @@ ieee80211_sta_scan_result(struct net_device *dev,
if (bss_mesh_cfg(bss)) { if (bss_mesh_cfg(bss)) {
char *buf; char *buf;
u8 *cfg = bss_mesh_cfg(bss); u8 *cfg = bss_mesh_cfg(bss);
buf = kmalloc(200, GFP_ATOMIC); buf = kmalloc(50, GFP_ATOMIC);
if (buf) { if (buf) {
memset(&iwe, 0, sizeof(iwe)); memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM; iwe.cmd = IWEVCUSTOM;
sprintf(buf, "Mesh network (version %d)\n" sprintf(buf, "Mesh network (version %d)", cfg[0]);
"\t\t\tPath Selection Protocol ID: 0x%02X%02X%02X%02X\n" iwe.u.data.length = strlen(buf);
"\t\t\tPath Selection Metric ID: 0x%02X%02X%02X%02X\n" current_ev = iwe_stream_add_point(current_ev, end_buf,
"\t\t\tCongestion Control Mode ID: 0x%02X%02X%02X%02X\n" &iwe, buf);
"\t\t\tChannel Precedence: 0x%02X%02X%02X%02X", sprintf(buf, "Path Selection Protocol ID: "
cfg[0], cfg[1], cfg[2], cfg[3], cfg[4], cfg[5], cfg[6], "0x%02X%02X%02X%02X", cfg[1], cfg[2], cfg[3],
cfg[7], cfg[8], cfg[9], cfg[10], cfg[11], cfg[12], cfg[4]);
cfg[13], cfg[14], cfg[15], cfg[16]); iwe.u.data.length = strlen(buf);
current_ev = iwe_stream_add_point(current_ev, end_buf,
&iwe, buf);
sprintf(buf, "Path Selection Metric ID: "
"0x%02X%02X%02X%02X", cfg[5], cfg[6], cfg[7],
cfg[8]);
iwe.u.data.length = strlen(buf);
current_ev = iwe_stream_add_point(current_ev, end_buf,
&iwe, buf);
sprintf(buf, "Congestion Control Mode ID: "
"0x%02X%02X%02X%02X", cfg[9], cfg[10],
cfg[11], cfg[12]);
iwe.u.data.length = strlen(buf);
current_ev = iwe_stream_add_point(current_ev, end_buf,
&iwe, buf);
sprintf(buf, "Channel Precedence: "
"0x%02X%02X%02X%02X", cfg[13], cfg[14],
cfg[15], cfg[16]);
iwe.u.data.length = strlen(buf); iwe.u.data.length = strlen(buf);
current_ev = iwe_stream_add_point(current_ev, end_buf, current_ev = iwe_stream_add_point(current_ev, end_buf,
&iwe, buf); &iwe, buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment