Lines 931-942
Link Here
|
931 |
iwe.cmd = SIOCGIWAP; |
931 |
iwe.cmd = SIOCGIWAP; |
932 |
iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
932 |
iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
933 |
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN); |
933 |
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN); |
934 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_ADDR_LEN); |
934 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_ADDR_LEN); |
935 |
|
935 |
|
936 |
iwe.u.data.length = dtoh32(bi->SSID_len); |
936 |
iwe.u.data.length = dtoh32(bi->SSID_len); |
937 |
iwe.cmd = SIOCGIWESSID; |
937 |
iwe.cmd = SIOCGIWESSID; |
938 |
iwe.u.data.flags = 1; |
938 |
iwe.u.data.flags = 1; |
939 |
event = iwe_stream_add_point(event, end, &iwe, bi->SSID); |
939 |
event = iwe_stream_add_point(info, event, end, &iwe, bi->SSID); |
940 |
|
940 |
|
941 |
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) { |
941 |
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) { |
942 |
iwe.cmd = SIOCGIWMODE; |
942 |
iwe.cmd = SIOCGIWMODE; |
Lines 944-950
Link Here
|
944 |
iwe.u.mode = IW_MODE_INFRA; |
944 |
iwe.u.mode = IW_MODE_INFRA; |
945 |
else |
945 |
else |
946 |
iwe.u.mode = IW_MODE_ADHOC; |
946 |
iwe.u.mode = IW_MODE_ADHOC; |
947 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_UINT_LEN); |
947 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_UINT_LEN); |
948 |
} |
948 |
} |
949 |
|
949 |
|
950 |
iwe.cmd = SIOCGIWFREQ; |
950 |
iwe.cmd = SIOCGIWFREQ; |
Lines 952-964
Link Here
|
952 |
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ? |
952 |
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ? |
953 |
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G); |
953 |
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G); |
954 |
iwe.u.freq.e = 6; |
954 |
iwe.u.freq.e = 6; |
955 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_FREQ_LEN); |
955 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_FREQ_LEN); |
956 |
|
956 |
|
957 |
iwe.cmd = IWEVQUAL; |
957 |
iwe.cmd = IWEVQUAL; |
958 |
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI)); |
958 |
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI)); |
959 |
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI); |
959 |
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI); |
960 |
iwe.u.qual.noise = 0x100 + bi->phy_noise; |
960 |
iwe.u.qual.noise = 0x100 + bi->phy_noise; |
961 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_QUAL_LEN); |
961 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_QUAL_LEN); |
962 |
|
962 |
|
963 |
#if WIRELESS_EXT > 17 |
963 |
#if WIRELESS_EXT > 17 |
964 |
|
964 |
|
Lines 970-976
Link Here
|
970 |
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) { |
970 |
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) { |
971 |
iwe.cmd = IWEVGENIE; |
971 |
iwe.cmd = IWEVGENIE; |
972 |
iwe.u.data.length = ie->len + 2; |
972 |
iwe.u.data.length = ie->len + 2; |
973 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
973 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
974 |
} |
974 |
} |
975 |
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
975 |
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
976 |
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { |
976 |
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { |
Lines 978-984
Link Here
|
978 |
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
978 |
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
979 |
iwe.cmd = IWEVGENIE; |
979 |
iwe.cmd = IWEVGENIE; |
980 |
iwe.u.data.length = ie->len + 2; |
980 |
iwe.u.data.length = ie->len + 2; |
981 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
981 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
982 |
break; |
982 |
break; |
983 |
} |
983 |
} |
984 |
} |
984 |
} |
Lines 989-995
Link Here
|
989 |
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
989 |
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
990 |
iwe.cmd = IWEVGENIE; |
990 |
iwe.cmd = IWEVGENIE; |
991 |
iwe.u.data.length = ie->len + 2; |
991 |
iwe.u.data.length = ie->len + 2; |
992 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
992 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
993 |
goto done; |
993 |
goto done; |
994 |
} |
994 |
} |
995 |
} |
995 |
} |
Lines 1003-1009
Link Here
|
1003 |
else |
1003 |
else |
1004 |
iwe.u.data.flags = IW_ENCODE_DISABLED; |
1004 |
iwe.u.data.flags = IW_ENCODE_DISABLED; |
1005 |
iwe.u.data.length = 0; |
1005 |
iwe.u.data.length = 0; |
1006 |
event = iwe_stream_add_point(event, end, &iwe, (char *)event); |
1006 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)event); |
1007 |
|
1007 |
|
1008 |
if (bi->rateset.count) { |
1008 |
if (bi->rateset.count) { |
1009 |
value = event + IW_EV_LCP_LEN; |
1009 |
value = event + IW_EV_LCP_LEN; |
Lines 1012-1018
Link Here
|
1012 |
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; |
1012 |
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; |
1013 |
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) { |
1013 |
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) { |
1014 |
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000; |
1014 |
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000; |
1015 |
value = iwe_stream_add_value(event, value, end, &iwe, |
1015 |
value = iwe_stream_add_value(info, event, value, end, &iwe, |
1016 |
IW_EV_PARAM_LEN); |
1016 |
IW_EV_PARAM_LEN); |
1017 |
} |
1017 |
} |
1018 |
event = value; |
1018 |
event = value; |