Lines 943-954
Link Here
|
943 |
iwe.cmd = SIOCGIWAP; |
943 |
iwe.cmd = SIOCGIWAP; |
944 |
iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
944 |
iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
945 |
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN); |
945 |
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN); |
946 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_ADDR_LEN); |
946 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_ADDR_LEN); |
947 |
|
947 |
|
948 |
iwe.u.data.length = dtoh32(bi->SSID_len); |
948 |
iwe.u.data.length = dtoh32(bi->SSID_len); |
949 |
iwe.cmd = SIOCGIWESSID; |
949 |
iwe.cmd = SIOCGIWESSID; |
950 |
iwe.u.data.flags = 1; |
950 |
iwe.u.data.flags = 1; |
951 |
event = iwe_stream_add_point(event, end, &iwe, bi->SSID); |
951 |
event = iwe_stream_add_point(info, event, end, &iwe, bi->SSID); |
952 |
|
952 |
|
953 |
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) { |
953 |
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) { |
954 |
iwe.cmd = SIOCGIWMODE; |
954 |
iwe.cmd = SIOCGIWMODE; |
Lines 956-962
Link Here
|
956 |
iwe.u.mode = IW_MODE_INFRA; |
956 |
iwe.u.mode = IW_MODE_INFRA; |
957 |
else |
957 |
else |
958 |
iwe.u.mode = IW_MODE_ADHOC; |
958 |
iwe.u.mode = IW_MODE_ADHOC; |
959 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_UINT_LEN); |
959 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_UINT_LEN); |
960 |
} |
960 |
} |
961 |
|
961 |
|
962 |
iwe.cmd = SIOCGIWFREQ; |
962 |
iwe.cmd = SIOCGIWFREQ; |
Lines 964-976
Link Here
|
964 |
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ? |
964 |
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ? |
965 |
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G); |
965 |
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G); |
966 |
iwe.u.freq.e = 6; |
966 |
iwe.u.freq.e = 6; |
967 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_FREQ_LEN); |
967 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_FREQ_LEN); |
968 |
|
968 |
|
969 |
iwe.cmd = IWEVQUAL; |
969 |
iwe.cmd = IWEVQUAL; |
970 |
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI)); |
970 |
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI)); |
971 |
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI); |
971 |
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI); |
972 |
iwe.u.qual.noise = 0x100 + bi->phy_noise; |
972 |
iwe.u.qual.noise = 0x100 + bi->phy_noise; |
973 |
event = iwe_stream_add_event(event, end, &iwe, IW_EV_QUAL_LEN); |
973 |
event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_QUAL_LEN); |
974 |
|
974 |
|
975 |
#if WIRELESS_EXT > 17 |
975 |
#if WIRELESS_EXT > 17 |
976 |
|
976 |
|
Lines 982-988
Link Here
|
982 |
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) { |
982 |
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) { |
983 |
iwe.cmd = IWEVGENIE; |
983 |
iwe.cmd = IWEVGENIE; |
984 |
iwe.u.data.length = ie->len + 2; |
984 |
iwe.u.data.length = ie->len + 2; |
985 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
985 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
986 |
} |
986 |
} |
987 |
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
987 |
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t); |
988 |
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { |
988 |
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) { |
Lines 990-996
Link Here
|
990 |
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
990 |
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
991 |
iwe.cmd = IWEVGENIE; |
991 |
iwe.cmd = IWEVGENIE; |
992 |
iwe.u.data.length = ie->len + 2; |
992 |
iwe.u.data.length = ie->len + 2; |
993 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
993 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
994 |
break; |
994 |
break; |
995 |
} |
995 |
} |
996 |
} |
996 |
} |
Lines 1001-1007
Link Here
|
1001 |
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
1001 |
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) { |
1002 |
iwe.cmd = IWEVGENIE; |
1002 |
iwe.cmd = IWEVGENIE; |
1003 |
iwe.u.data.length = ie->len + 2; |
1003 |
iwe.u.data.length = ie->len + 2; |
1004 |
event = iwe_stream_add_point(event, end, &iwe, (char *)ie); |
1004 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie); |
1005 |
goto done; |
1005 |
goto done; |
1006 |
} |
1006 |
} |
1007 |
} |
1007 |
} |
Lines 1015-1021
Link Here
|
1015 |
else |
1015 |
else |
1016 |
iwe.u.data.flags = IW_ENCODE_DISABLED; |
1016 |
iwe.u.data.flags = IW_ENCODE_DISABLED; |
1017 |
iwe.u.data.length = 0; |
1017 |
iwe.u.data.length = 0; |
1018 |
event = iwe_stream_add_point(event, end, &iwe, (char *)event); |
1018 |
event = iwe_stream_add_point(info, event, end, &iwe, (char *)event); |
1019 |
|
1019 |
|
1020 |
if (bi->rateset.count) { |
1020 |
if (bi->rateset.count) { |
1021 |
value = event + IW_EV_LCP_LEN; |
1021 |
value = event + IW_EV_LCP_LEN; |
Lines 1024-1030
Link Here
|
1024 |
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; |
1024 |
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; |
1025 |
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) { |
1025 |
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) { |
1026 |
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000; |
1026 |
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000; |
1027 |
value = iwe_stream_add_value(event, value, end, &iwe, |
1027 |
value = iwe_stream_add_value(info, event, value, end, &iwe, |
1028 |
IW_EV_PARAM_LEN); |
1028 |
IW_EV_PARAM_LEN); |
1029 |
} |
1029 |
} |
1030 |
event = value; |
1030 |
event = value; |