mesh: Show [MESH] flag in print_bss_info()
This was previously done for SCAN_RESULTS, but the BSS control interface
command did not show a similar flag. In addition, change "WPA2" to "RSN"
for mesh BSS to be consistent with the SCAN_RESULTS output.
Commit 638d945679
('mesh: Show [MESH] flag
in scan results') did similar changes for SCAN_RESULTS.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
c04a67deb0
commit
4a45dc1921
1 changed files with 13 additions and 2 deletions
|
@ -4185,7 +4185,7 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
size_t i;
|
size_t i;
|
||||||
int ret;
|
int ret;
|
||||||
char *pos, *end;
|
char *pos, *end;
|
||||||
const u8 *ie, *ie2, *osen_ie;
|
const u8 *ie, *ie2, *osen_ie, *mesh;
|
||||||
|
|
||||||
pos = buf;
|
pos = buf;
|
||||||
end = buf + buflen;
|
end = buf + buflen;
|
||||||
|
@ -4294,13 +4294,16 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
return 0;
|
return 0;
|
||||||
pos += ret;
|
pos += ret;
|
||||||
|
|
||||||
|
mesh = wpa_bss_get_ie(bss, WLAN_EID_MESH_ID);
|
||||||
|
|
||||||
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
|
||||||
if (ie)
|
if (ie)
|
||||||
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie,
|
pos = wpa_supplicant_ie_txt(pos, end, "WPA", ie,
|
||||||
2 + ie[1]);
|
2 + ie[1]);
|
||||||
ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
ie2 = wpa_bss_get_ie(bss, WLAN_EID_RSN);
|
||||||
if (ie2)
|
if (ie2)
|
||||||
pos = wpa_supplicant_ie_txt(pos, end, "WPA2", ie2,
|
pos = wpa_supplicant_ie_txt(pos, end,
|
||||||
|
mesh ? "RSN" : "WPA2", ie2,
|
||||||
2 + ie2[1]);
|
2 + ie2[1]);
|
||||||
osen_ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
osen_ie = wpa_bss_get_vendor_ie(bss, OSEN_IE_VENDOR_TYPE);
|
||||||
if (osen_ie)
|
if (osen_ie)
|
||||||
|
@ -4314,6 +4317,14 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
return 0;
|
return 0;
|
||||||
pos += ret;
|
pos += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mesh) {
|
||||||
|
ret = os_snprintf(pos, end - pos, "[MESH]");
|
||||||
|
if (os_snprintf_error(end - pos, ret))
|
||||||
|
return 0;
|
||||||
|
pos += ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (bss_is_dmg(bss)) {
|
if (bss_is_dmg(bss)) {
|
||||||
const char *s;
|
const char *s;
|
||||||
ret = os_snprintf(pos, end - pos, "[DMG]");
|
ret = os_snprintf(pos, end - pos, "[DMG]");
|
||||||
|
|
Loading…
Reference in a new issue