3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-19 01:42:33 +01:00

wiphy: add driver quirk for disabling multicast rx (and helper)

This driver quirk and associated helper API lets other modules both
check if multicast RX is supported, and if its been disabled via
the driver quirk setting.
This commit is contained in:
James Prestwood 2024-11-25 07:06:21 -08:00 committed by Denis Kenzior
parent c6932efa30
commit 887d8c8fe8
2 changed files with 14 additions and 4 deletions

View File

@ -73,6 +73,7 @@ enum driver_flag {
FORCE_PAE = 0x2, FORCE_PAE = 0x2,
POWER_SAVE_DISABLE = 0x4, POWER_SAVE_DISABLE = 0x4,
OWE_DISABLE = 0x8, OWE_DISABLE = 0x8,
MULTICAST_RX_DISABLE = 0x10,
}; };
struct driver_flag_name { struct driver_flag_name {
@ -101,10 +102,11 @@ static const struct driver_info driver_infos[] = {
}; };
static const struct driver_flag_name driver_flag_names[] = { 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 }, { "OweDisable", OWE_DISABLE },
{ "MulticastRxDisable", MULTICAST_RX_DISABLE }
}; };
struct wiphy { struct wiphy {
@ -949,6 +951,13 @@ bool wiphy_supports_cmd_offchannel(const struct wiphy *wiphy)
return wiphy->supports_cmd_offchannel; return wiphy->supports_cmd_offchannel;
} }
bool wiphy_supports_multicast_rx(const struct wiphy *wiphy)
{
return wiphy_has_ext_feature(wiphy,
NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS) &&
!(wiphy->driver_flags & MULTICAST_RX_DISABLE);
}
const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy, const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy,
enum band_freq band, enum band_freq band,
size_t *size) size_t *size)

View File

@ -143,6 +143,7 @@ void wiphy_get_reg_domain_country(struct wiphy *wiphy, char *out);
bool wiphy_country_is_unknown(struct wiphy *wiphy); bool wiphy_country_is_unknown(struct wiphy *wiphy);
bool wiphy_supports_uapsd(const struct wiphy *wiphy); bool wiphy_supports_uapsd(const struct wiphy *wiphy);
bool wiphy_supports_cmd_offchannel(const struct wiphy *wiphy); bool wiphy_supports_cmd_offchannel(const struct wiphy *wiphy);
bool wiphy_supports_multicast_rx(const struct wiphy *wiphy);
const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy, const uint8_t *wiphy_get_ht_capabilities(const struct wiphy *wiphy,
enum band_freq band, enum band_freq band,