git: ae8c3b6509c6 - main - LinuxKPI: 802.11: optimize mo_bss_info_changed

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 11 Apr 2025 21:26:25 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=ae8c3b6509c66d03cb68dc6f8bbad43acbc8c977

commit ae8c3b6509c66d03cb68dc6f8bbad43acbc8c977
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-04-10 15:10:38 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-04-11 21:26:05 +0000

    LinuxKPI: 802.11: optimize mo_bss_info_changed
    
    In case we are not announcing any changes there is no need to do a
    downcall into the driver.  Catch that with an early return.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/src/linux_80211_macops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
index 336b8a1e9ce2..d7bd26a3d0e3 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
@@ -553,6 +553,9 @@ lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vi
 	    lhw->ops->bss_info_changed == NULL)
 		return;
 
+	if (changed == 0)
+		return;
+
 	LKPI_80211_TRACE_MO("hw %p vif %p conf %p changed %#jx", hw, vif, conf, (uintmax_t)changed);
 	if (lhw->ops->link_info_changed != NULL)
 		lhw->ops->link_info_changed(hw, vif, conf, changed);