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.

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)

Details

Provenance
bzAuthored on Dec 12 2023, 1:59 AM
Parents
rG4a646242c37f: wpa: ctrl_iface set sendbuf size
Branches
Unknown
Tags
Unknown