git: 69b6c4a6ec66 - main - LinuxKPI: 802.11: fix for_each_sta_active_link()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 May 2024 22:13:15 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=69b6c4a6ec6654978628ccd48edce46f00ac3e96 commit 69b6c4a6ec6654978628ccd48edce46f00ac3e96 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-05-21 21:58:47 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-05-21 22:12:00 +0000 LinuxKPI: 802.11: fix for_each_sta_active_link() Likely a c&p error from for_each_vif_active_link() to for_each_sta_active_link(). We are checking the nitems on the vif instead of the sta in this macro. Function wise there is no difference as the arrays are the same size but for correctness fix this. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index fc9d7829dae3..6a477ae5c32a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1253,7 +1253,7 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) (_link = rcu_dereference((_vif)->link_conf[_linkid])) ) #define for_each_sta_active_link(_vif, _sta, _linksta, _linkid) \ - for (_linkid = 0; _linkid < nitems((_vif)->link_conf); _linkid++) \ + for (_linkid = 0; _linkid < nitems((_sta)->link); _linkid++) \ if ( ((_vif)->active_links == 0 /* no MLO */ || \ ((_vif)->active_links & BIT(_linkid)) != 0) && \ (_linksta = link_sta_dereference_protected((_sta), (_linkid))) )