]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: 802.11: more TXQ implementation and locking
authorBjoern A. Zeeb <bz@FreeBSD.org>
Tue, 12 Dec 2023 01:59:17 +0000 (01:59 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 19 Feb 2024 16:06:43 +0000 (16:06 +0000)
commit804a4c1c7b8fe00a6924fa5e4ae27a487bdc2337
treef2d37d667a72e3bd0a77c6d59488ea2e9d196dfb
parent4a646242c37f59d18cadb0ef0bb92860846d2db8
LinuxKPI: 802.11: more TXQ implementation and locking

Implement ieee80211_handle_wake_tx_queue() and ieee80211_tx_dequeue_ni()
while looking at the code.  They are needed by various wireless drivers.

Introduce an ltxq lock and protect the skbq by that.
This prevents panics due to a race between a driver upcall and
the net80211 tx downcall.  While the former should be rcu protected we
cannot rely on that.
It remains questionable if we need to protect further fields there
(with a different lock?).

Also introduce a txq_mtx on the lhw which needs to be further deployed
but we need to come up with a good strategy to not end up with 7 different
locks.

Approved by: re (cperciva)
Sponsored by: The FreeBSD Foundation
PR: 274178, 275710
Tested by: cc

(cherry picked from commit eac3646fcdd445297cade756630335e23e92ea13)
(cherry picked from commit 3df959638baa60c1c88e9ac66289502f99ad8418)
sys/compat/linuxkpi/common/include/net/mac80211.h
sys/compat/linuxkpi/common/src/linux_80211.c
sys/compat/linuxkpi/common/src/linux_80211.h