diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-07-11 13:35:31 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-07-13 14:58:24 +0000 |
| commit | c6e70c68d2ce5cfbcace251ef6ed2f1eae912a74 (patch) | |
| tree | 62a7231dd3faaa193012eebd10d00132d11b9b75 | |
| parent | 66b25ddf9125b2f3707e0f22b01b47bdff463fa7 (diff) | |
LinuxKPI: 802.11: lkpi_80211_txq_tx_one() only pass sta if added to drv
If we are doing a direct (*tx) downcall, only pass sta as meta data
if it was added to the driver (via the state machine). This prevents
us passing a sta not known to the driver leading to possible follow-up
complications/errors. This will usually happen if (a) we are doing
software scanning, or (b) if net80211 decides to change the ni from
under us and sends a packet with the new ni.
Adjust a debug statement before to also have the added_to_drv field
in it to ease debugging.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
| -rw-r--r-- | sys/compat/linuxkpi/common/src/linux_80211.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 2e7ce4d4148f..ffce2fe48e10 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6224,13 +6224,14 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) ops_tx: #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_TX) - printf("%s:%d mo_tx :: lsta %p sta %p ni %p %6D skb %p " - "TX ac %d prio %u qmap %u\n", - __func__, __LINE__, lsta, sta, ni, ni->ni_macaddr, ":", - skb, ac, skb->priority, skb->qmap); + printf("%s:%d mo_tx :: lsta %p { added_to_drv %d } sta %p " + "ni %p %6D skb %p TX ac %d prio %u qmap %u\n", + __func__, __LINE__, lsta, lsta->added_to_drv, sta, + ni, ni->ni_macaddr, ":", skb, ac, skb->priority, skb->qmap); #endif memset(&control, 0, sizeof(control)); - control.sta = sta; + if (lsta->added_to_drv) + control.sta = sta; wiphy_lock(hw->wiphy); lkpi_80211_mo_tx(hw, &control, skb); lsta->frms_tx++; |
