History log of /freebsd/sys/compat/linuxkpi/common/src/linux_80211.c (Results 26 – 50 of 111)
Revision Date Author Comments
# dbf76919 30-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: improve lkpi_ic_vap_delete()

Changing the order of cleanup in lkpi_ic_vap_delete() will avoid
firmware crashes or a direct panic as observed as ieee80211_vap_detach()
will do most

LinuxKPI: 802.11: improve lkpi_ic_vap_delete()

Changing the order of cleanup in lkpi_ic_vap_delete() will avoid
firmware crashes or a direct panic as observed as ieee80211_vap_detach()
will do most cleanup for us and get us into the correct state.

The solution is not fully developed yet and one may not be able
to create a new vap (lkpi_ic_vap_create may fail with error 17)
afterwards. It is supposed to be a step towards more stability
for now.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 269842

show more ...


# 16e688b2 30-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix problem removing sta

Move the call to lkpi_disassoc() before the state change to
IEEE80211_STA_NOTEXIST which will remove the sta (from firmware).
Based on a comment it seems t

LinuxKPI: 802.11: fix problem removing sta

Move the call to lkpi_disassoc() before the state change to
IEEE80211_STA_NOTEXIST which will remove the sta (from firmware).
Based on a comment it seems that originally we had to do it the
other way round.
iwlwifi(4) has a check and will silently not remove the sta from
the firmware when vif->cfg.assoc is still set (see iwl_mvm_sta_del()).
This leads to the LinuxKPI 802.11 code thinking the sta is gone as
downward state changes by the mac80211 op (*sta_state)() may not fail.
Once we try to assoc with a newly added station later, iwlwifi firmware
will run into an assert having two ap_sta set on the same vif.
We can observe that problem in iwlwifi(4) having __le32 sta_id = 1
instead of sta_id = 0 in iwl_mvm_sta_cfg_cmd{} on the HCMD.

This should fix one of the most seen problems with iwlwifi(4), e.g.,
when running service netif restart wlan0 or
service wpa_supplicant restart wlan0.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 673d62fc 25-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fill regulatory_hint() with some life

Start implementing regulatory_hint() using a .c file based allocation
helper function so we could change structures in the future with
better

LinuxKPI: 802.11: fill regulatory_hint() with some life

Start implementing regulatory_hint() using a .c file based allocation
helper function so we could change structures in the future with
better chances to keep compatibility.
This sets wiphy->regd needed by various LinuxKPI based WiFi drivers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# c5e25798 25-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct

Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to
keep local state as well. In first instance that is add

LiunxKPI: 802.11: move ieee80211_chanctx_conf into lkpi private struct

Factor out ieee80211_chanctx_conf into struct lkpi_chanctx in order to
keep local state as well. In first instance that is added_to_drv
only. For now we stay single-chanctx only but this paves the path
to make it a list.
Use the new information to implement ieee80211_iter_chan_contexts_atomic().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# fb3c249e 24-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping

tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi,
which leads to a symbol clash in NetBSD. Rename our local LinuxKPI

LinuxKPI: 802.11: avoid symbol clash on UP to AC mapping

tid_to_mac80211_ac is an exported symbol in and likely based on iwlwifi,
which leads to a symbol clash in NetBSD. Rename our local LinuxKPI copy
to a better name and add a comment where to find a copy of the mapping
table.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reported by: Phil Nelson (phil netbsd org)

show more ...


# 6ffb7bd4 21-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: setup a default link[0] and adjust related needs

Setup more link_conf/deflink fields for vif/sta as are needed to allow
us to work with the KPI bits in a non-MLO configuration.
In

LinuxKPI: 802.11: setup a default link[0] and adjust related needs

Setup more link_conf/deflink fields for vif/sta as are needed to allow
us to work with the KPI bits in a non-MLO configuration.
In lkpi_sta_scan_to_auth() set the bss_conf values before calling into
the driver for chanctx setup/updates as certain values (e.g., beacon_int)
need to be set before; we still call the MO function for the updates
after to keep the expected workflow.
Deal with the (to be dealt with otherwise later) net80211 ni swaps and
update the addresses on the deflink as well as otherwise firmware will
hit asserts or things will not work (e.g. indicating the peer is us).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# a6042e17 21-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: inialize tx queue params

When adding a VAP (vif) initialize its tx queue parameters calling
mo_conf_tx().
I could not spot net80211 providing some of the values needed before
havin

LinuxKPI: 802.11: inialize tx queue params

When adding a VAP (vif) initialize its tx queue parameters calling
mo_conf_tx().
I could not spot net80211 providing some of the values needed before
having a node so currrently we use hard-coded values with a comment
with a reference on how to properly calculate the values in the future
(e.g., in case of 11b or other cases).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 8d58a057 21-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start()

Driven by net80211 we may call mac80211 ops stop() and start() mostly
when toggling a first VAP. While this is FreeBSD behaviou

LinuxKPI: 802.11: change ic_parent() to not call mo_stop()/mo_start()

Driven by net80211 we may call mac80211 ops stop() and start() mostly
when toggling a first VAP. While this is FreeBSD behaviour the firmware
based LinuxKPI drivers seem to possibly clear state in the case of stop()
triggering further errors down the line.
We call mo_start() when starting the VAP and mo_stop() when destroying
it now only. In the future (e.g., in multi-VAP setups) we may need to
re-address some of this so keep the code under #ifdef.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 616e1330 21-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: adjust code to new structure layout

With past commits new structures were added. Now switch over some
bss_conf fields into vif->cfg where they got moved to and remove the
old fiel

LinuxKPI: 802.11: adjust code to new structure layout

With past commits new structures were added. Now switch over some
bss_conf fields into vif->cfg where they got moved to and remove the
old fields. This allows drivers to find the expected values in the
now expected places and work better.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 68541546 16-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions

In [1] we updated the KPI for various mac80211 ops functions to deal
with MLD code. Newer iwlwifi driver and firmware supports these
func

LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions

In [1] we updated the KPI for various mac80211 ops functions to deal
with MLD code. Newer iwlwifi driver and firmware supports these
functions so we need to pass non-dummy (0, NULL) arguments to them.
Start extending the internel MO functions by these arguments and
pass down values from LinuxKPI 802.11 code.
It is assumed that further work will be needed to have all the
right fields available to at least work in the lgeacy way of a
single link.

Sponsored by: The FreeBSD Foundation
Improves: 549198b1ab95 (update mac80211 KPI) [1]
MFC after: 3 days

show more ...


# f454a4a1 14-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix counting the number of supbands

While the main purpose was to assign an(y) early chandef with the
loop, later additions made use of it to also count supbands as well
as to init

LinuxKPI: 802.11: fix counting the number of supbands

While the main purpose was to assign an(y) early chandef with the
loop, later additions made use of it to also count supbands as well
as to initialise max_rates.
Due to the main goal we can exit the loop early and not properly
count and initialise supbands and max_rates.
Move the terminating condition into the loop and make it a continue
rather than ending the loop.

Fixes: d9945d7821b9b ("improve hw_scan")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# e1e90be0 14-Sep-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: make sure bssid for scans (probe_req) is set

In b0f73768220e9 we added bssid[] to struct cfg80211_scan_request
likely while working on mt76 and did not need it (yet) back then.
iwl

LinuxKPI: 802.11: make sure bssid for scans (probe_req) is set

In b0f73768220e9 we added bssid[] to struct cfg80211_scan_request
likely while working on mt76 and did not need it (yet) back then.
iwlwifi started to use the field in Linux f1fec51cda70f (April 2023).
Without it set firmware crashes when trying to send probe requests
((empty) SSID also given to hw_scan).
For now always set the field to the wildcard BSSID.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# adff403f 16-May-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: update compat code for updated drivers

Adjust and add structs, fields, functions to make more modern versions
of LinuxKPI based wireless drivers (based on wireless-testing (
wt-202

LinuxKPI: 802.11: update compat code for updated drivers

Adjust and add structs, fields, functions to make more modern versions
of LinuxKPI based wireless drivers (based on wireless-testing (
wt-2023-06-09, wt-2023-07-24, and later)) compile.

Some of these changes can only be applied once all drivers get
updated to not break the old versions currently in the tree.
Mark those changes with __FOR_LATER_DRV_UPDATE for now and flip the
switch at a later point.

Sponsored by: The FreeBSD Foundation
MFC after: 20 days

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# a5ae63ed 10-Jun-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: initialize txq

In 5a9a0d7803382321b5f9fff1deae5fb08463cf1a we omitted the initialization
of the per-hw txq settings. Fix this.

Sponsored by: The FreeBSD Foundation
MFC after: 10

LinuxKPI: 802.11: initialize txq

In 5a9a0d7803382321b5f9fff1deae5fb08463cf1a we omitted the initialization
of the per-hw txq settings. Fix this.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Fixes: 5a9a0d7803382321b5f9fff1deae5fb08463cf1a

show more ...


# 3206587a 10-Jun-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: improve scan handling

Under certain circumstances a hw_scan may be downgraded to a software
scan. Handle these situations better and make sure we free resources
in all cases once.

LinuxKPI: 802.11: improve scan handling

Under certain circumstances a hw_scan may be downgraded to a software
scan. Handle these situations better and make sure we free resources
in all cases once. [1]

Also leave a note about scanning all bands (or we would have to switch
bands manually).

In both cases hardware doing and driver saying seem not entirely
consistent for all and all firmware.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reported by: imp [1]

show more ...


# cfccc7f3 02-Apr-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: remove extra spaces

Remove two extra spaces. No functional change.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days


# 8ac540d3 31-Mar-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: adjust locking

Split up the lhw lock and the scan lock. The latter is a mtx
while the former changes from mtx to sx as mac80211 downcalls may
sleep (and the ic lock is not usable

LinuxKPI: 802.11: adjust locking

Split up the lhw lock and the scan lock. The latter is a mtx
while the former changes from mtx to sx as mac80211 downcalls may
sleep (and the ic lock is not usable in that case either and a larger
project to fix).
This will also enforce some lookups under lock (mostly scan) as well
as general protection for more compat code and avoid a possible
deadlock with one of the upcoming callbacks from driver into the
compat code.

Sponsored by: The FreeBSD Foundation
MFC after: 7 days

show more ...


# 3f0083c4 31-Mar-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: use ic_printf more consistently

Rather than printing ic_name ourselves (or not at all) use ic_printf()
as a common function from net80211 where possible.

Sponsored by: The FreeBSD

LinuxKPI: 802.11: use ic_printf more consistently

Rather than printing ic_name ourselves (or not at all) use ic_printf()
as a common function from net80211 where possible.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 3689f8ae 05-Mar-2023 Colin Percival <cperciva@FreeBSD.org>

linux_80211: Don't dequeue lsta if not queued

This fixes an instapanic when restarting wpa_supplicant on my laptop's
iwlwifi device. After this change, iwlwifi enters a nonfunctional
state if wpa_s

linux_80211: Don't dequeue lsta if not queued

This fixes an instapanic when restarting wpa_supplicant on my laptop's
iwlwifi device. After this change, iwlwifi enters a nonfunctional
state if wpa_supplicant is restarted, but "service netif restart wlan0"
is enough to get it working again.

releng/13.2 candidate.

Reviewed by: bz
MFC after: 3 days

show more ...


# 0cbcfa19 07-Feb-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: deal with stopped queues

Following 5a9a0d7803382321b5f9fff1deae5fb08463cf1a initialize the
queue values explicitly and deal with a stopped queue in
ieee80211_tx_dequeue().

Sponsor

LinuxKPI: 802.11: deal with stopped queues

Following 5a9a0d7803382321b5f9fff1deae5fb08463cf1a initialize the
queue values explicitly and deal with a stopped queue in
ieee80211_tx_dequeue().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# b0ddb44f 31-Jan-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix indent in lkpi_wake_tx_queues()

Fix indentation in lkpi_wake_tx_queues().
No functional changes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days


# 3dd98026 31-Jan-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: enhance lkpi_scan_ies_add() for HT and VHT

Add code (currently disabled by #ifdef) for HT and VHT to
lkpi_scan_ies_add(). Switch to a local variable for ic given
the new code also

LinuxKPI: 802.11: enhance lkpi_scan_ies_add() for HT and VHT

Add code (currently disabled by #ifdef) for HT and VHT to
lkpi_scan_ies_add(). Switch to a local variable for ic given
the new code also needs the value.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 5a9a0d78 31-Jan-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: basic implementation of *queue(s)/*txq*

Very basic implementations of ieee80211_{wake,stop}_queue[s],
as well as ieee80211_txq_schedule_start(), ieee80211_next_txq(),
and ieee80211

LinuxKPI: 802.11: basic implementation of *queue(s)/*txq*

Very basic implementations of ieee80211_{wake,stop}_queue[s],
as well as ieee80211_txq_schedule_start(), ieee80211_next_txq(),
and ieee80211_schedule_txq().
Various combinations of these are used by different wireless
drivers, incl. iwlwifi.

Sponsored by: The FreeBSD Foundation (parts of this work)
MFC after: 3 days

show more ...


# a8397571 31-Jan-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: implement ieee80211_tx_status_ext()

Add an implementation of ieee80211_tx_status_ext() extending the
internal linuxkpi_ieee80211_tx_status() implementation.

Sponsored by: The Free

LinuxKPI: 802.11: implement ieee80211_tx_status_ext()

Add an implementation of ieee80211_tx_status_ext() extending the
internal linuxkpi_ieee80211_tx_status() implementation.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


12345