> + atomic_inc(&bss->users); > + atomic_inc(&bss->users); ? That was just allocated, shouldn't it just be atomic_set() then? And why two anyway? > @@ -3622,15 +3790,27 @@ ieee80211_sta_scan_result(struct net_device *dev, > > memset(&iwe, 0, sizeof(iwe)); > iwe.cmd = SIOCGIWESSID; > - iwe.u.data.length = bss->ssid_len; > - iwe.u.data.flags = 1; > - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, > - bss->ssid); > + if (bss->mesh_cfg) { > +#ifdef CONFIG_MAC80211_MESH > + iwe.u.data.length = bss->mesh_id_len; > + iwe.u.data.flags = 1; > + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, > + bss->mesh_id); Ok so you're using the ESSID as the mesh ID, > - if (bss->capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)) { > + if (bss->capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS > + || bss->mesh_cfg)) { That seems to be parenthesized wrongly? > memset(&iwe, 0, sizeof(iwe)); > iwe.cmd = SIOCGIWMODE; > - if (bss->capability & WLAN_CAPABILITY_ESS) > + if (bss->mesh_cfg) > + iwe.u.mode = IW_MODE_MESH; If you say wireless-tools are fine with this that's great. > + memset(&iwe, 0, sizeof(iwe)); > + iwe.cmd = IWEVCUSTOM; > + sprintf(buf, "Mesh network (version %d)\n" > + "\t\t\tPath Selection Protocol ID: 0x%02X%02X%02X%02X\n" > + "\t\t\tPath Selection Metric ID: 0x%02X%02X%02X%02X\n" > + "\t\t\tCongestion Control Mode ID: 0x%02X%02X%02X%02X\n" > + "\t\t\tChannel Precedence: 0x%02X%02X%02X%02X", Maybe we should add separate items for this to make it easier to parse them? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part