3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:19:34 +01:00

wiphy: add OweDisable driver quirk

Some drivers like brcmfmac don't support OWE but from userspace its
not possible to query this information. Rather than completely
blacklist brcmfmac we can allow the user to configure this and
disable OWE in IWD.
This commit is contained in:
James Prestwood 2024-10-23 11:29:09 -07:00 committed by Denis Kenzior
parent 4a04d41409
commit e98a76aefb
2 changed files with 16 additions and 1 deletions

View File

@ -72,6 +72,7 @@ enum driver_flag {
DEFAULT_IF = 0x1, DEFAULT_IF = 0x1,
FORCE_PAE = 0x2, FORCE_PAE = 0x2,
POWER_SAVE_DISABLE = 0x4, POWER_SAVE_DISABLE = 0x4,
OWE_DISABLE = 0x8,
}; };
struct driver_flag_name { struct driver_flag_name {
@ -103,6 +104,7 @@ static const struct driver_flag_name driver_flag_names[] = {
{ "DefaultInterface", DEFAULT_IF }, { "DefaultInterface", DEFAULT_IF },
{ "ForcePae", FORCE_PAE }, { "ForcePae", FORCE_PAE },
{ "PowerSaveDisable", POWER_SAVE_DISABLE }, { "PowerSaveDisable", POWER_SAVE_DISABLE },
{ "OweDisable", OWE_DISABLE },
}; };
struct wiphy { struct wiphy {
@ -342,7 +344,8 @@ wpa2_personal:
if (info->akm_suites & IE_RSN_AKM_SUITE_PSK) if (info->akm_suites & IE_RSN_AKM_SUITE_PSK)
return IE_RSN_AKM_SUITE_PSK; return IE_RSN_AKM_SUITE_PSK;
} else if (security == SECURITY_NONE) { } else if (security == SECURITY_NONE) {
if (info->akm_suites & IE_RSN_AKM_SUITE_OWE) if (info->akm_suites & IE_RSN_AKM_SUITE_OWE &&
!wiphy_owe_disabled(wiphy))
return IE_RSN_AKM_SUITE_OWE; return IE_RSN_AKM_SUITE_OWE;
} }
@ -719,6 +722,14 @@ bool wiphy_power_save_disabled(struct wiphy *wiphy)
return false; return false;
} }
bool wiphy_owe_disabled(struct wiphy *wiphy)
{
if (wiphy->driver_flags & OWE_DISABLE)
return true;
return false;
}
const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy, const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy,
uint32_t iftype) uint32_t iftype)
{ {
@ -1348,6 +1359,9 @@ static void wiphy_print_basic_info(struct wiphy *wiphy)
if (wiphy->driver_flags & POWER_SAVE_DISABLE) if (wiphy->driver_flags & POWER_SAVE_DISABLE)
flags = l_strv_append(flags, "PowerSaveDisable"); flags = l_strv_append(flags, "PowerSaveDisable");
if (wiphy->driver_flags & OWE_DISABLE)
flags = l_strv_append(flags, "OweDisable");
joined = l_strjoinv(flags, ' '); joined = l_strjoinv(flags, ' ');
l_info("\tDriver Flags: %s", joined); l_info("\tDriver Flags: %s", joined);

View File

@ -134,6 +134,7 @@ const char *wiphy_get_name(struct wiphy *wiphy);
bool wiphy_uses_default_if(struct wiphy *wiphy); bool wiphy_uses_default_if(struct wiphy *wiphy);
bool wiphy_control_port_enabled(struct wiphy *wiphy); bool wiphy_control_port_enabled(struct wiphy *wiphy);
bool wiphy_power_save_disabled(struct wiphy *wiphy); bool wiphy_power_save_disabled(struct wiphy *wiphy);
bool wiphy_owe_disabled(struct wiphy *wiphy);
const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy, const uint8_t *wiphy_get_extended_capabilities(struct wiphy *wiphy,
uint32_t iftype); uint32_t iftype);
const uint8_t *wiphy_get_rm_enabled_capabilities(struct wiphy *wiphy); const uint8_t *wiphy_get_rm_enabled_capabilities(struct wiphy *wiphy);