HomeFreeBSD

LinuxKPI: 802.11: more TXQ implementation and locking

Description

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

(cherry picked from commit eac3646fcdd445297cade756630335e23e92ea13)

Details

Provenance
bzAuthored on Dec 12 2023, 1:59 AM
Parents
rG0f032804b6ec: bwn: remove unused ic_headroom
Branches
Unknown
Tags
Unknown