* [PATCH 2/4] wiphy: add driver quirk for disabling multicast rx (and helper)
2024-11-25 15:06 [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature James Prestwood
@ 2024-11-25 15:06 ` James Prestwood
2024-11-25 15:06 ` [PATCH 3/4] dpp: use wiphy_supports_multicast_rx James Prestwood
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2024-11-25 15:06 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
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.
---
src/wiphy.c | 17 +++++++++++++----
src/wiphy.h | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/wiphy.c b/src/wiphy.c
index ecc345e9..5e958d65 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -73,6 +73,7 @@ enum driver_flag {
FORCE_PAE = 0x2,
POWER_SAVE_DISABLE = 0x4,
OWE_DISABLE = 0x8,
+ MULTICAST_RX_DISABLE = 0x10,
};
struct driver_flag_name {
@@ -101,10 +102,11 @@ static const struct driver_info driver_infos[] = {
};
static const struct driver_flag_name driver_flag_names[] = {
- { "DefaultInterface", DEFAULT_IF },
- { "ForcePae", FORCE_PAE },
- { "PowerSaveDisable", POWER_SAVE_DISABLE },
- { "OweDisable", OWE_DISABLE },
+ { "DefaultInterface", DEFAULT_IF },
+ { "ForcePae", FORCE_PAE },
+ { "PowerSaveDisable", POWER_SAVE_DISABLE },
+ { "OweDisable", OWE_DISABLE },
+ { "MulticastRxDisable", MULTICAST_RX_DISABLE }
};
struct wiphy {
@@ -949,6 +951,13 @@ bool wiphy_supports_cmd_offchannel(const struct wiphy *wiphy)
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,
enum band_freq band,
size_t *size)
diff --git a/src/wiphy.h b/src/wiphy.h
index c527c79d..9fcbdcd2 100644
--- a/src/wiphy.h
+++ b/src/wiphy.h
@@ -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_supports_uapsd(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,
enum band_freq band,
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/4] dpp: use wiphy_supports_multicast_rx
2024-11-25 15:06 [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature James Prestwood
2024-11-25 15:06 ` [PATCH 2/4] wiphy: add driver quirk for disabling multicast rx (and helper) James Prestwood
@ 2024-11-25 15:06 ` James Prestwood
2024-11-25 15:06 ` [PATCH 4/4] doc: document [DriverQuirks].MulticastRxDisable James Prestwood
2024-11-25 17:48 ` [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2024-11-25 15:06 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
The ath10k driver has shown some performance issues, specifically
packet loss, when frame watches are registered with the multicast
RX flag set. This is relevant for DPP which registers for these
when DPP starts (if the driver supports it). This has only been
observed when there are large groups of clients all using the same
wifi channel so its unlikely to be much of an issue for those using
IWD/ath10k and DPP unless you run large deployments of clients.
But for large deployments with IWD/ath10k we need a way to disable
the multicast RX registrations. Now, with the addition of
wiphy_supports_multicast_rx we can both check that the driver
supports this as well as if its been disabled by the driver quirk.
---
src/dpp.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/dpp.c b/src/dpp.c
index 95c11f00..ac56e55d 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -3739,9 +3739,8 @@ static void dpp_create(struct netdev *netdev)
dpp->key_len = l_ecc_curve_get_scalar_bytes(dpp->curve);
dpp->nonce_len = dpp_nonce_len_from_key_len(dpp->key_len);
dpp->max_roc = wiphy_get_max_roc_duration(wiphy_find_by_wdev(wdev_id));
- dpp->mcast_support = wiphy_has_ext_feature(
- wiphy_find_by_wdev(dpp->wdev_id),
- NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
+ dpp->mcast_support = wiphy_supports_multicast_rx(
+ wiphy_find_by_wdev(dpp->wdev_id));
l_ecdh_generate_key_pair(dpp->curve, &dpp->boot_private,
&dpp->boot_public);
@@ -4106,7 +4105,7 @@ static struct l_dbus_message *dpp_start_configurator_common(
} else
dpp->current_freq = bss->frequency;
- dpp_add_frame_watches(dpp, responder);
+ dpp_add_frame_watches(dpp, responder && dpp->mcast_support);
dpp->uri = dpp_generate_uri(dpp->own_asn1, dpp->own_asn1_len, 2,
netdev_get_address(dpp->netdev),
@@ -4535,7 +4534,7 @@ static struct l_dbus_message *dpp_start_pkex_configurator(struct dpp_sm *dpp,
dpp->config = dpp_configuration_new(network_get_settings(network),
network_get_ssid(network),
hs->akm_suite);
- dpp_add_frame_watches(dpp, true);
+ dpp_add_frame_watches(dpp, dpp->mcast_support);
dpp_reset_protocol_timer(dpp, DPP_PKEX_PROTO_TIMEOUT);
dpp_property_changed_notify(dpp);
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] doc: document [DriverQuirks].MulticastRxDisable
2024-11-25 15:06 [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature James Prestwood
2024-11-25 15:06 ` [PATCH 2/4] wiphy: add driver quirk for disabling multicast rx (and helper) James Prestwood
2024-11-25 15:06 ` [PATCH 3/4] dpp: use wiphy_supports_multicast_rx James Prestwood
@ 2024-11-25 15:06 ` James Prestwood
2024-11-25 17:48 ` [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: James Prestwood @ 2024-11-25 15:06 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
---
src/iwd.config.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/iwd.config.rst b/src/iwd.config.rst
index 1cb4b05d..c031b8dc 100644
--- a/src/iwd.config.rst
+++ b/src/iwd.config.rst
@@ -454,6 +454,12 @@ are buggy or just don't behave similar enough to the majority of other drivers.
If a driver in user matches one in this list power save will be disabled.
+ * - MulticastRxDisable
+ - Values: comma-separated list of drivers or glob matches
+
+ If a driver in use matches one in this list, multicast RX will be
+ disabled.
+
SEE ALSO
========
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature
2024-11-25 15:06 [PATCH 1/4] wiphy: make "wiphy" const in wiphy_has_ext_feature James Prestwood
` (2 preceding siblings ...)
2024-11-25 15:06 ` [PATCH 4/4] doc: document [DriverQuirks].MulticastRxDisable James Prestwood
@ 2024-11-25 17:48 ` Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2024-11-25 17:48 UTC (permalink / raw)
To: James Prestwood, iwd
Hi James,
On 11/25/24 9:06 AM, James Prestwood wrote:
> ---
> src/wiphy.c | 2 +-
> src/wiphy.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
All applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread