]> 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>
Tue, 19 Dec 2023 00:50:49 +0000 (00:50 +0000)
commiteac3646fcdd445297cade756630335e23e92ea13
tree96dfb25271ebe84b33a312c59edd7e7d5c48f13f
parentacd5638e268a6706f6b7ad84947a8425e8d51ef7
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.

Sponsored by: The FreeBSD Foundation
PR: 274178, 275710
Tested by: cc
MFC after: 3 days
sys/compat/linuxkpi/common/include/net/mac80211.h
sys/compat/linuxkpi/common/src/linux_80211.c
sys/compat/linuxkpi/common/src/linux_80211.h