LinuxKPI: 802.11: rework MC/configure_filter

(*prepare_multicast)(), for the drivers we support, is iwlwifi(4)-specific.
If it is not available do not let us stop from calling (*configure_filter)()
at least as well.
In addition to the interface setting mc_all_multi, if we have no way to
prepare the multicast filter list this way, set FIF_ALLMULTI for now.
This seems to help some with rtw89 but does not help me with other drivers
yet to get IPv6 link-local (e.g., ff02::1%wlan0) going.
This should also help in case we are scanning and are setting
FIF_BCN_PRBRESP_PROMISC .  We should go and review the full FIF_ list and
start adding conditional support for the other options too.

Sponsored by:	The FreeBSD Foundation
PR:		281982
MFC after:	3 days
This commit is contained in:
Bjoern A. Zeeb
2025-12-14 20:07:13 +00:00
parent fa259d156d
commit f943454bfb
2 changed files with 2 additions and 11 deletions
+2 -8
View File
@@ -1874,10 +1874,6 @@ lkpi_update_mcast_filter(struct ieee80211com *ic)
lhw = ic->ic_softc;
if (lhw->ops->prepare_multicast == NULL ||
lhw->ops->configure_filter == NULL)
return;
LKPI_80211_LHW_SCAN_LOCK(lhw);
scanning = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0;
LKPI_80211_LHW_SCAN_UNLOCK(lhw);
@@ -1887,7 +1883,8 @@ lkpi_update_mcast_filter(struct ieee80211com *ic)
flags = 0;
if (scanning)
flags |= FIF_BCN_PRBRESP_PROMISC;
if (lhw->mc_all_multi)
/* The latter condition may not be as expected but seems wise. */
if (lhw->mc_all_multi || lhw->ops->prepare_multicast == NULL)
flags |= FIF_ALLMULTI;
hw = LHW_TO_HW(lhw);
@@ -4246,9 +4243,6 @@ lkpi_ic_update_mcast(struct ieee80211com *ic)
struct lkpi_hw *lhw;
lhw = ic->ic_softc;
if (lhw->ops->prepare_multicast == NULL ||
lhw->ops->configure_filter == NULL)
return;
LKPI_80211_LHW_MC_LOCK(lhw);
/* Cleanup anything on the current list. */
@@ -310,9 +310,6 @@ lkpi_80211_mo_configure_filter(struct ieee80211_hw *hw, unsigned int changed_fla
if (lhw->ops->configure_filter == NULL)
return;
if (mc_ptr == 0)
return;
LKPI_80211_TRACE_MO("hw %p changed_flags %#x total_flags %p mc_ptr %ju", hw, changed_flags, total_flags, (uintmax_t)mc_ptr);
lhw->ops->configure_filter(hw, changed_flags, total_flags, mc_ptr);
}