core/wifi: always set owe_transition_mode output in nm_wifi_utils_parse_ies()

... and rename output variable.
This commit is contained in:
Thomas Haller
2020-03-22 11:04:28 +01:00
parent 37e7fa38c2
commit 7ccd2bb35e
2 changed files with 5 additions and 4 deletions

View File

@@ -4355,13 +4355,14 @@ nm_wifi_utils_parse_ies (const guint8 *bytes,
gsize len,
guint32 *out_max_rate,
gboolean *out_metered,
gboolean *owe_transition_mode)
gboolean *out_owe_transition_mode)
{
guint8 id, elem_len;
guint32 m;
NM_SET_OUT (out_max_rate, 0);
NM_SET_OUT (out_metered, FALSE);
NM_SET_OUT (out_owe_transition_mode, FALSE);
while (len) {
if (len < 2)
@@ -4396,13 +4397,13 @@ nm_wifi_utils_parse_ies (const guint8 *bytes,
&& bytes[3] == 0x11) /* OUI type: Network cost */
*out_metered = (bytes[7] > 1); /* Cost level > 1 */
}
if ( owe_transition_mode
if ( out_owe_transition_mode
&& elem_len >= 10
&& bytes[0] == 0x50 /* OUI: WiFi Alliance */
&& bytes[1] == 0x6f
&& bytes[2] == 0x9a
&& bytes[3] == 0x1c) /* OUI type: OWE Transition Mode */
*owe_transition_mode = TRUE;
*out_owe_transition_mode = TRUE;
break;
}

View File

@@ -477,7 +477,7 @@ void nm_wifi_utils_parse_ies (const guint8 *bytes,
gsize len,
guint32 *out_max_rate,
gboolean *out_metered,
gboolean *owe_transition_mode);
gboolean *out_owe_transition_mode);
guint8 nm_wifi_utils_level_to_quality (int val);