History log of /freebsd/sys/compat/linuxkpi/common/src/linux_80211.c (Results 1 – 25 of 127)
Revision Date Author Comments
# ecb2e5f9 11-Jan-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI; 802.11 initalize ic_vht_cap.supp_mcs

Given the channel struct has an extra bool we cannot assign the
information 1:1 to net80211. While the caps where assigned the
suppoerted mcs sets wer

LinuxKPI; 802.11 initalize ic_vht_cap.supp_mcs

Given the channel struct has an extra bool we cannot assign the
information 1:1 to net80211. While the caps where assigned the
suppoerted mcs sets were not. Fix that.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# f1aeb5d8 07-Jan-2025 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: add a print mask for ieee80211_rx_status_flags bits

Add a print mask for use with %b to aid debugging. It is a lot easier
to read names than numbers.

Sponsored by: The FreeBSD Fo

LinuxKPI: 802.11: add a print mask for ieee80211_rx_status_flags bits

Add a print mask for use with %b to aid debugging. It is a lot easier
to read names than numbers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 2372f8cc 20-Dec-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI 802.11 / rtw88: make packets flow again

In 886653492945f we added checks for packets to only go out if the
station is known to the firmware (amongst others) as there are
implications in dri

LinuxKPI 802.11 / rtw88: make packets flow again

In 886653492945f we added checks for packets to only go out if the
station is known to the firmware (amongst others) as there are
implications in drivers.
Unfortunately rtw88 does not support the mac80211 (*sta_state)() KPI
but only the fallback (*sta_add/remove)() in which case the station is
only added to firmware when going from AUTH to ASSOC. That means we
had no chance to get authenticated anymore.

The problem has existed since June in main and stable/14 but only now
was noticed in December with 14.2-R which makes me wonder.

I am still not entirely sure what implications the missing checks have
on all the other drivers using (*sta_state)() (or if they were really
needed in first place beyond txq_ready) but I have run a few days of
iwlwifi with this without extra trouble but I was not always able to
reproduce problems in the past. Also people are occasionally still
reporting the original "Invalid TXQ" error which indicates there is
another lingering case somewhere.

For the moment make rtw88 work again and expose the change to a wider
audience.

PR: 283142, 274382
Fixes: 886653492945f (make sure we can send DISASSOC or DEAUTH frames)
Tested by: imb protected-networks.net, oleg.nauman gmail.com
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48161

show more ...


# 92690579 13-Dec-2024 Mark Johnston <markj@FreeBSD.org>

linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth()

PR: 283015
Reviewed by: bz
MFC after: 1 week
Fixes: 0936c648ad0e ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Differential Revision

linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth()

PR: 283015
Reviewed by: bz
MFC after: 1 week
Fixes: 0936c648ad0e ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Differential Revision: https://reviews.freebsd.org/D47949

show more ...


# 943a19c6 01-Dec-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: make HT compile again

Bring in changes missed during the last driver updates to make HT
compile when enabled.

Sponsored by: The FreeBSD Foundation
Fixes: 7b43f4d064195
MFC after:

LinuxKPI: 802.11: make HT compile again

Bring in changes missed during the last driver updates to make HT
compile when enabled.

Sponsored by: The FreeBSD Foundation
Fixes: 7b43f4d064195
MFC after: 3 days

show more ...


# 57609cb2 12-Nov-2024 Justin Hibbits <jhibbits@FreeBSD.org>

LinuxKPI: Use IfAPI to get LLADDR

Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D47525


# edab5a28 08-Nov-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: improve lladdr change to not use ifnet internals

The changes from 4aff4048 were based on net80211 which is still using
if_private.h details. Adjust the code to no longer depend on

LinuxKPI: 802.11: improve lladdr change to not use ifnet internals

The changes from 4aff4048 were based on net80211 which is still using
if_private.h details. Adjust the code to no longer depend on internal
details of ifnet. We also switch the "check"-functionn from if_init to
if_transmit which we can query. Given we do have a per-vif eventhandler
we could do without that check but would still need to check
if_getflags() for IFF_UP.

Sponsored by: The FreeBSD Foundation
Reported by: jhibbits
Fixes: 4aff4048
MFC after: 3 days
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D47490

show more ...


# 310743c4 27-Jan-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: improvements to (*ampdu_action)() callers

Annotate lkpi_ic_recv_action(), lkpi_ic_send_action(), and
lkpi_ic_ampdu_enable() with HT specifc debug logging as we only hook
them up cu

LinuxKPI: 802.11: improvements to (*ampdu_action)() callers

Annotate lkpi_ic_recv_action(), lkpi_ic_send_action(), and
lkpi_ic_ampdu_enable() with HT specifc debug logging as we only hook
them up currently for debug tracing but later should not need them
anymore.

Start the implementation for lkpi_ic_addba_request(),
lkpi_ic_addba_response(), and lkpi_ic_addba_stop().

Improve the implementation of lkpi_ic_ampdu_rx_start() and
lkpi_ic_ampdu_rx_stop().

Sponsored by: The FreeBSD Foundation (commit)
MFC after: 3 days

show more ...


# 86bc7259 27-Jan-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)()

If a LinuxkPI base wireless driver does not support the (*ampdu_action)()
ieee80211_ops function for offloading parts to fi

LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)()

If a LinuxkPI base wireless driver does not support the (*ampdu_action)()
ieee80211_ops function for offloading parts to firmware there is no
reason for us to hook into the net80211 callbacks either but simply
to let software (net80211) handle this.

Sponsored by: The FreeBSD Foundation (commit)
MFC after: 3 days

show more ...


# 7b43f4d0 28-Oct-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89

Bring in the LinuxKPI 802.11 compat bits which are altering
the mac80211 KPI.

* In struct ieee80211_bss_conf chandef -> chanreq.
* V

LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89

Bring in the LinuxKPI 802.11 compat bits which are altering
the mac80211 KPI.

* In struct ieee80211_bss_conf chandef -> chanreq.
* Various struct ieee80211_ops gained a link_id arguemnt,
stop gained a suspend flag.
* Various functions gained a link_id argument.
* ieee80211_tx_status() was renamed to ieee80211_tx_status_skb()

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# ac1d519c 28-Oct-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89

Bring ing the LinuxKPI 802.11 compat bits which are not altering
the mac80211 ops KPI.

* Add various functions for drvier updates.
*

LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89

Bring ing the LinuxKPI 802.11 compat bits which are not altering
the mac80211 ops KPI.

* Add various functions for drvier updates.
* Add functions (some compat code to I assume cleanup some
mac80211 ops) emulating chanctx changes doing (*config) updates.
* Adjust structs and defines.
* Deal with an enum growing more than 32 bits in printf.
* Add a mtx to struct wiphy which is exposed to the drivers.
Handle initialization and destruction for now.
* Implementation of wiphy_work and wiphy_delayed_work.
* Set was_assoc for deassoc/deauth in prep_tx_info.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 41b746e0 10-Oct-2024 Austin Shafer <ashafer@badland.io>

LinuxKPI: 802.11: fix ieee80211_schedule_txq() to avoid rtw89 panic

rtw89 TX path was faulting in linuxkpi_ieee80211_next_txq() due to a
"double scheduling" check in linuxkpI_ieee80211_schedule_txq(

LinuxKPI: 802.11: fix ieee80211_schedule_txq() to avoid rtw89 panic

rtw89 TX path was faulting in linuxkpi_ieee80211_next_txq() due to a
"double scheduling" check in linuxkpI_ieee80211_schedule_txq() being
incorrect:
the next pointer may be NULL there if the element is the last in the
tailq, so correctly check tqe_prev. Without the fix we may have queued
the same element to the tailq twice, and because it was the last element
and had a NULL tqe_next, that NULL value would get propogated into
another node's tqe_prev on removal, and other such nastiness.

With this rtw89 no longer panics.

Reviewed by: bz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47006

show more ...


# f5a58c2d 06-Sep-2024 Mikhail Pchelin <misha@FreeBSD.org>

linux80211: fix default deflink.rx_nss

Native Linux implementation sets this as a maximum between 1 and
ht/vht/eht rx SS'es, FreeBSD does the same, but uses 0 as a minimum,
which leads setting it to

linux80211: fix default deflink.rx_nss

Native Linux implementation sets this as a maximum between 1 and
ht/vht/eht rx SS'es, FreeBSD does the same, but uses 0 as a minimum,
which leads setting it to 0 if we're not in ht/vht case.

This 0 was breaking rtw89 driver, when it was trying to determine
SS number by subtracting 1 from rx_nss and passing the value to the
hardware.

After this patch rtw89 association and simple ping work reliably,
but more work is needed to make the driver robust with heavy traffic
(iperf3) and being long idle.

Reviewed by: bz
Approved by: bz
Sponsored by: Future Crew LLC
Differential Revision: https://reviews.freebsd.org/D46528

show more ...


# 7bcb1228 03-Sep-2024 Zhenlei Huang <zlei@FreeBSD.org>

LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK)

As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove
unneeded NULL check.

MFC after: 1 week
Differential Revision:

LinuxKPI: 802.11: Stop checking for failures from malloc(M_WAITOK)

As a consequence lkpi_ieee80211_ifalloc() now does not fail. Remove
unneeded NULL check.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45852

show more ...


# 4aff4048 25-Jul-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: support manual lladdr changes

Allow a user to change the "ether" address by ifconfig while a VAP is
not UP. Compared to net80211 (given we have no callback) we register
an eventha

LinuxKPI: 802.11: support manual lladdr changes

Allow a user to change the "ether" address by ifconfig while a VAP is
not UP. Compared to net80211 (given we have no callback) we register
an eventhandler per-vif (a global one would force us to use hacks to
derive if a vap is indeed also a lkpi_80211 vif).

Sponsored by: The FreeBSD Foundation
PR: 277356
Tested by: lwhsu
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D46121

show more ...


# bd206a6f 06-Jun-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: consistently spell TRACE-RX: as such

We have TRACE in one place and TRACE-RX in another. Spell it
"TRACE-RX: %s: ..." everywhere. Helps with pattern matching.

Sponsored by: The

LinuxKPI: 802.11: consistently spell TRACE-RX: as such

We have TRACE in one place and TRACE-RX in another. Spell it
"TRACE-RX: %s: ..." everywhere. Helps with pattern matching.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45818

show more ...


# 88665349 06-Jun-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames

The "Invalid TXQ" error from iwlwifi seems to be triggered by a
frame being sent for a sta which is no longer known to the driver/fw

LinuxKPI: 802.11: make sure we can send DISASSOC or DEAUTH frames

The "Invalid TXQ" error from iwlwifi seems to be triggered by a
frame being sent for a sta which is no longer known to the driver/fw.

While we make sure to trigger the sending of the frame in net80211
early enough (by calling (*iv_newstate)() early on rather than at
the end), TX in LinuxKPI is run in a deferred task. When we drop the
net80211 ic lock again and re-acquire the LHW lock the packet may not
yet have made it to the driver.
Work around this between the (ic and lhw) locks by making sure
(a) no new packets get queued after we return from (*iv_newstate)(),
and (b) the TX task has run or gets cancelled and we manually push
any remaining packets out (or let lsta_free() clean them up).
The disabled packet queuing now also needs to be re-enabled in
scan_to_auth() in case an lsta is staying in service or gets re-used.

Also make sure that any following lkpi_wake_tx_queues() calls no
longer ignore queues which have not seen a prior dequeue.
This former workaround "feature" (ltxq->seen_dequeue) should be
fully garbage collected in a later change on its own.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 274382
Tested by: emaste, lwhsu, thj, rkoberman at gmail.com
Accepted by: adrian
Differential Revision: https://reviews.freebsd.org/D45508

show more ...


# 105b9df2 18-Feb-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)()

We have to unlock the net80211 ic lock in order to be able to call
sleepable downcalls to the driver/firmware; a 2nd thread ma

LinuxKPI: 802.11: close race lkpi_sta_scan_to_auth()/(*iv_update_bss)()

We have to unlock the net80211 ic lock in order to be able to call
sleepable downcalls to the driver/firmware; a 2nd thread may go through
net80211::join1() and (*iv_update_bss)() after we checked and unlocked.
Re-check status at the end of the function under the ic lock so that we
do not accidentally set lvif_bss_synched to true again despite it no
longer being true.

This should fix a race where we lost the (*iv_update_bss)() state
during startup where one SCAN->AUTH is followed by a (then) AUTH->AUTH
and lkpi_sta_a_to_a() did the wrong thing.

Once we re-consider net80211 state and allowing a second join
on a different node or iv_bss update without previously tearing down
the older node we can likely undo a lot of these extra checks and
workarounds.

Sponsored by: The FreeBSD Foundation (updated version)
Tested by: emaste (on and off)
MFC after: 3 days
Reviewd by: cc
Differential Revision: https://reviews.freebsd.org/D43967

show more ...


# 58246901 06-Jun-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx()

The logic following this new assignment in some cases may not set lsta
but the later tracing is checking for it to be != NULL.
Wit

LinuxKPI: 802.11: initalize lsta to NULL in linuxkpi_ieee80211_rx()

The logic following this new assignment in some cases may not set lsta
but the later tracing is checking for it to be != NULL.
With lsta not initialized that check may not hold up and later we would
dereference lsta->state and possibly panic.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D45507

show more ...


# 45bce6fa 18-Feb-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls

Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 t

LinuxKPI: 802.11: lock MO tx/wake_tx_queue() downcalls

Lock the two TX MO downcalls into driver/firmware in
lkpi_80211_txq_tx_one() to make sure they cannot happen in the
middle of other (net80211 triggered) updates calling down into
the driver/firmware.

Sponsored by: The FreeBSD Foundation (commit)
MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43966

show more ...


# d1af434d 13-May-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: rename chanctx_conf for consistency

We used to call the struct ieee80211_chanctx_conf variable "conf"
in some places but that becomes confusing with bss_conf and other
"conf" bits.

LinuxKPI: 802.11: rename chanctx_conf for consistency

We used to call the struct ieee80211_chanctx_conf variable "conf"
in some places but that becomes confusing with bss_conf and other
"conf" bits. On the vif it is already called chanctx_conf thus also
rename it on the internal struct lkpi_chanctx and for our variables
in the implementation.

This should not have any external visibility.
No functional changes intended.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45185

show more ...


# 5a4d2461 22-May-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes

While the previous order worked well for iwlwifi 22000 and later chipsets
(AXxxx, BE200), earlier chipsets had trouble and r

LinuxKPI: 802.11: change teardown order to avoid iwlwifi firmware crashes

While the previous order worked well for iwlwifi 22000 and later chipsets
(AXxxx, BE200), earlier chipsets had trouble and ran into firmware crashes.
Change the teardown order to avoid these problems. The inline comments
in lkpi_sta_run_to_init() (and lkpi_disassoc()) try to document the new
order and also the old problems we were seeing (too early sta removal or
silent non-removal) leading to follow-up problems.

There is a possible further problem still lingering but a lot harder to
trigger (see comment in review) and likely related to some other doings
so we'll track it separately.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 275255
Tested with: AX210, 8265 (bz); 9260 (Bakul Shah)
Differential Revision: https://reviews.freebsd.org/D45293

show more ...


# 1665ef97 16-Feb-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: disable early queue wakeup workaround; better classify

We used to call lkpi_wake_tx_queues() for all queues early on in order
to make sure they are ready. Turns out whatever logic

LinuxKPI: 802.11: disable early queue wakeup workaround; better classify

We used to call lkpi_wake_tx_queues() for all queues early on in order
to make sure they are ready. Turns out whatever logic in iwlwifi
startup is working correctly these days under LinuxKPI so this is no
longer needed. As the comment indicated the "workaround" did not
always work. Disable it for now.

The second part of the improvement is to properly classify Non-QOS
non-data frames (mgmt and ctl frames for now, unless we have to be
even more careful in the future about certain sub-types) as TID 7/VO.
Contrary to net80211 we must not promote PAE frames.

PR: 274382
MFC after: 3 day
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43944

show more ...


# ac867c20 18-Feb-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()

Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We

LinuxKPI: 802.11: remove unneeded re-lookup in lkpi_80211_txq_tx_one()

Given we are passed the lsta in as a function argument there is no
need to re-lookup the sta by ni and possibly not find it.
We know the sta and ni from the lsta and whether it is uploaded to
firmware or not we can check directly from the local lsta flag.

MFC after: 3 days
Reviewed by: cc
Differential Revision: https://reviews.freebsd.org/D43965

show more ...


# 906521f8 05-Mar-2024 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM

In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites
to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP

LinuxKPI: 802.11: return proper value for IEEE80211_CRYPTO_AES_CCM

In case of LKPI_80211_HW_CRYPTO we convert from LinuxKPI cipher_suites
to net80211 ic_cryptocaps fields. For WLAN_CIPHER_SUITE_CCMP we
accidentally returned the bit number instead of the shifted value
which leads to ieee80211_crypto_newkey() setting IEEE80211_KEY_SWCRYPT,
which in turned lead to us trying to decode the frame again despite
HW had already done it. This was found out of a discussion in D43634.

MFC after: 3 days
Reviewed by: cc, adrian
Differential Revision: https://reviews.freebsd.org/D44208

show more ...


123456