mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
wiphy: add fils_hint to wiphy_can_connect
A prior commit refactored the AKM selection in wiphy.c. This ended up breaking FILS tests due to the hard coding of a false fils_hint in wiphy_select_akm. Since our FILS tests only advertise FILS AKMs wiphy_can_connect would return false for these networks. Similar to wiphy_select_akm, add a fils hint parameter to wiphy_can_connect and pass that down directly to wiphy_select_akm.
This commit is contained in:
parent
bba47527d3
commit
9d9c516596
@ -768,6 +768,7 @@ struct scan_bss *network_bss_select(struct network *network,
|
|||||||
struct wiphy *wiphy = station_get_wiphy(network->station);
|
struct wiphy *wiphy = station_get_wiphy(network->station);
|
||||||
const struct l_queue_entry *bss_entry;
|
const struct l_queue_entry *bss_entry;
|
||||||
struct scan_bss *candidate = NULL;
|
struct scan_bss *candidate = NULL;
|
||||||
|
bool fils_hint = network_has_erp_identity(network);
|
||||||
|
|
||||||
for (bss_entry = l_queue_get_entries(bss_list); bss_entry;
|
for (bss_entry = l_queue_get_entries(bss_list); bss_entry;
|
||||||
bss_entry = bss_entry->next) {
|
bss_entry = bss_entry->next) {
|
||||||
@ -776,7 +777,7 @@ struct scan_bss *network_bss_select(struct network *network,
|
|||||||
switch (network_get_security(network)) {
|
switch (network_get_security(network)) {
|
||||||
case SECURITY_PSK:
|
case SECURITY_PSK:
|
||||||
case SECURITY_8021X:
|
case SECURITY_8021X:
|
||||||
if (!wiphy_can_connect(wiphy, bss))
|
if (!wiphy_can_connect(wiphy, bss, fils_hint))
|
||||||
continue;
|
continue;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case SECURITY_NONE:
|
case SECURITY_NONE:
|
||||||
|
@ -1890,6 +1890,7 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,
|
|||||||
uint16_t mdid;
|
uint16_t mdid;
|
||||||
enum security orig_security, security;
|
enum security orig_security, security;
|
||||||
bool seen = false;
|
bool seen = false;
|
||||||
|
bool fils_hint = network_has_erp_identity(network);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
station_roam_failed(station);
|
station_roam_failed(station);
|
||||||
@ -1946,7 +1947,7 @@ static bool station_roam_scan_notify(int err, struct l_queue *bss_list,
|
|||||||
|
|
||||||
seen = true;
|
seen = true;
|
||||||
|
|
||||||
if (!wiphy_can_connect(station->wiphy, bss))
|
if (!wiphy_can_connect(station->wiphy, bss, fils_hint))
|
||||||
goto next;
|
goto next;
|
||||||
|
|
||||||
if (blacklist_contains_bss(bss->addr))
|
if (blacklist_contains_bss(bss->addr))
|
||||||
|
@ -397,7 +397,8 @@ const struct scan_freq_set *wiphy_get_supported_freqs(
|
|||||||
return wiphy->supported_freqs;
|
return wiphy->supported_freqs;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss)
|
bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss,
|
||||||
|
bool fils_hint)
|
||||||
{
|
{
|
||||||
struct ie_rsn_info rsn_info;
|
struct ie_rsn_info rsn_info;
|
||||||
int r;
|
int r;
|
||||||
@ -416,7 +417,7 @@ bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss)
|
|||||||
rsn_info.group_management_cipher))
|
rsn_info.group_management_cipher))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return wiphy_select_akm(wiphy, bss, false);
|
return wiphy_select_akm(wiphy, bss, fils_hint);
|
||||||
} else if (r != -ENOENT)
|
} else if (r != -ENOENT)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -78,7 +78,8 @@ const char *wiphy_get_path(struct wiphy *wiphy);
|
|||||||
uint32_t wiphy_get_supported_bands(struct wiphy *wiphy);
|
uint32_t wiphy_get_supported_bands(struct wiphy *wiphy);
|
||||||
const struct scan_freq_set *wiphy_get_supported_freqs(
|
const struct scan_freq_set *wiphy_get_supported_freqs(
|
||||||
const struct wiphy *wiphy);
|
const struct wiphy *wiphy);
|
||||||
bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss);
|
bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss,
|
||||||
|
bool fils_hint);
|
||||||
bool wiphy_supports_cmds_auth_assoc(struct wiphy *wiphy);
|
bool wiphy_supports_cmds_auth_assoc(struct wiphy *wiphy);
|
||||||
bool wiphy_can_randomize_mac_addr(struct wiphy *wiphy);
|
bool wiphy_can_randomize_mac_addr(struct wiphy *wiphy);
|
||||||
bool wiphy_rrm_capable(struct wiphy *wiphy);
|
bool wiphy_rrm_capable(struct wiphy *wiphy);
|
||||||
|
Loading…
Reference in New Issue
Block a user