History log of /freebsd/sys/compat/linuxkpi/common/src/linux_80211.c (Results 251 – 275 of 497)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# ade774b1 15-Apr-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: implement ieee80211_probereq_get()

Implement ieee80211_probereq_get() needed by Realtek drivers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days


Revision tags: vendor/NetBSD/libedit/2022-04-11, vendor/openssh/9.0p1
# 170acccf 08-Apr-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: further fix RSSI calculations

60970a328e280b25b05f1d9a9de1ef91af573c4a did one half of the job
of making rssi relative to nf and numbers for radiotap were fine.
net80211 internally

LinuxKPI: 802.11: further fix RSSI calculations

60970a328e280b25b05f1d9a9de1ef91af573c4a did one half of the job
of making rssi relative to nf and numbers for radiotap were fine.
net80211 internally works with .5 dBm units thus we need to apply a
* 2 to the value we pass in to c_rssi; leave a comment explaining.

Note: it is only ifconfig in user space which re-adjust it for printing
or contrib/wpa for calculations. Other applications getting values
from kernel also have to apply the maths.

In collaboration with: J.R. Oldroyd (fbsd opal.com)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


Revision tags: vendor/NetBSD/bmake/20220330
# 60970a32 01-Apr-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix RSSI (and NF)

As in 4a22cd6c4e5f4fc4a38aa7400742d4005c5ae3de nf and rss should be
signed and not unsigned. Change the types in the header and while
here change a magic number

LinuxKPI: 802.11: fix RSSI (and NF)

As in 4a22cd6c4e5f4fc4a38aa7400742d4005c5ae3de nf and rss should be
signed and not unsigned. Change the types in the header and while
here change a magic number to a define as done elsewhere (value does
not change).

When calculating c_rssi we need to make it relative so subtract nf.
And while here improve the debug output.

This will hopefully fix ifconfig wlanN list scan S:N output which
tools use to chose a BSSID and help net80211 internal calculations.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


Revision tags: vendor/acpica/20220331
# 86220d3c 31-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix compat code for i386

Compiling another driver on i386 revealed two problems:
- ieee80211_tx_info.status.status_driver_data space needs to be
calculated. While a pointer is 3

LinuxKPI: 802.11: fix compat code for i386

Compiling another driver on i386 revealed two problems:
- ieee80211_tx_info.status.status_driver_data space needs to be
calculated. While a pointer is 32bit vm_paddr_t is 64 bit on i386
so we didn't fit more than one of these in but needed more space.
- the arguments to ieee80211_txq_get_depth() are expected to
unsigned long and not uint64_t.

No user noticable changes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


Revision tags: vendor/zlib/1.2.12, vendor/llvm-project/llvmorg-14.0.0-2-g3f43d803382d, vendor/heimdal/7.7.0, vendor/expat/2.4.7
# 9d9ba2b7 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: cleanup debugging

Cleanup some debugging. Rename the global variable to be less
generic. Hide all debugging behind #ifdef for now and turn off.
Rename the debugging sysctl so we

LinuxKPI: 802.11: cleanup debugging

Cleanup some debugging. Rename the global variable to be less
generic. Hide all debugging behind #ifdef for now and turn off.
Rename the debugging sysctl so we can start adding more to the
subtree.

There is a need to change that wildly grown infrastructure into
something more homogenic soon but this should do for 13.1.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 196cfd0b 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: improve hw_scan fallback to sw_scan

Extending what was started in d3ef7fb459ff924911e5276db0c04b13cd8074d9,
when a driver signals that hw_scan is not possible and expects a sw_scan

LinuxKPI: 802.11: improve hw_scan fallback to sw_scan

Extending what was started in d3ef7fb459ff924911e5276db0c04b13cd8074d9,
when a driver signals that hw_scan is not possible and expects a sw_scan
to be preformed we triggered a sw_scan towards the driver but did not
let net80211 know.
Cancel the initial scan towards net80211. If we we defer to sw_scan
then clear IEEE80211_FEXT_SCAN_OFFLOAD so net80211 will send probe
requests, and actively start a new scan with net80211.
This may have to be further refined in the future but seems to work
for the moment.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 321735f4 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: remove special handling for (*ic_scan_curchan)

Remove the originally disabling of (*ic_scan_curchan), which for iwlwifi
was not needed. The condition always only was approximate.

LinuxKPI: 802.11: remove special handling for (*ic_scan_curchan)

Remove the originally disabling of (*ic_scan_curchan), which for iwlwifi
was not needed. The condition always only was approximate.

A set IEEE80211_FEXT_SCAN_OFFLOAD will still prevent net80211 from sending
probe_reqs if handled by driver/firmware.
ic_scan_curchan will re-arm the timer to switch channels for drivers which
need it (e.g., rtw88, but that again is a NOP for iwlwifi).

So enabling ic_scan_curchan should not have further side effects for iwlwifi
but allow other drivers to work better.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 768dd32a 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: check IEEE80211_FEXT_SCAN_OFFLOAD on vap

When checking for IEEE80211_FEXT_SCAN_OFFLOAD, do so on the vap rather
than ic. This brings us in line with what net80211 does.

Sponsored

LinuxKPI: 802.11: check IEEE80211_FEXT_SCAN_OFFLOAD on vap

When checking for IEEE80211_FEXT_SCAN_OFFLOAD, do so on the vap rather
than ic. This brings us in line with what net80211 does.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# b2cf3c21 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: make lkpi_ic_set_channel() unconditional

For (*config)() based drivers not using chanctx we need to use
ic_set_channel() to switch channels. So far this was disabled
based on scan

LinuxKPI: 802.11: make lkpi_ic_set_channel() unconditional

For (*config)() based drivers not using chanctx we need to use
ic_set_channel() to switch channels. So far this was disabled
based on scanning flags (as swscan is one of the initial use cases
for this function). Now make it only dependent on (*config)()
for the moment to save us the work if (*config)() is not supported.

For iwlwifi (*config)() is a NOP so no functional changes there
but for other drivers such as rtw88 this will allow us to scan and
set the channel (which helps to receive on channels other than 1).

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 4a07abde 24-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: use cfg80211_chandef_create()

Rather than manually setting up a chandef and then effectively forcing
a memcpy, use cfg80211_chandef_create() to do the work for us entirely.
This wo

LinuxKPI: 802.11: use cfg80211_chandef_create()

Rather than manually setting up a chandef and then effectively forcing
a memcpy, use cfg80211_chandef_create() to do the work for us entirely.
This works here as we do not store the resulting chandef separately
for other use.

While here remove a duplicate assignment in cfg80211_chandef_create().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 67674c1c 23-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: fix lkpi_lsta_dump() debugging

Fix two last-minute changes of d9f59799fc3e7940c47aa674c25994e640eae45e:
(1) for consitency name the debugging function lkpi_lsta_dump()
(2) pass in

LinuxKPI: 802.11: fix lkpi_lsta_dump() debugging

Fix two last-minute changes of d9f59799fc3e7940c47aa674c25994e640eae45e:
(1) for consitency name the debugging function lkpi_lsta_dump()
(2) pass in the original node (ni) rather than taking it from the lsta
to avoid problems realted to bss_update as mentioned in the above
commit.

No functional changes for users.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
X-MFC with: d9f59799fc3e7940c47aa674c25994e640eae45e

show more ...


# d9f59799 22-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: rework sta state machine compatibility

Rework the state machine parts for various reasons:
(1) to add sta tracing to be able to better follow ni and lsta state
(2) factor out/imple

LinuxKPI: 802.11: rework sta state machine compatibility

Rework the state machine parts for various reasons:
(1) to add sta tracing to be able to better follow ni and lsta state
(2) factor out/implement lkpi_lsta_remove() to unlink the lsta and
free the ni reference.
(3) avoid calling lkpi_disassoc() when you would think you should as
changing BSS_CHANGED_ASSOC setting vif->bss_conf.assoc to false
triggers a sta removal from firmware in iwlwifi which then triggers
follow-up errors. I do not understand why they use flags and state
and ?? in parallel (too many options and ways to do things?).
(4) when "roaming" (or being disassoc/deauth) from an AP both net80211
and apparently so mac80211 re-start with a new node/sta. This
results in us losing one or the other state in the compat layer
or not updating firmware appropriately. To resolve this make use
of (a) the newly introduced (*iv_update_bss)() and (b) always tear
a station down to "State 1" (INIT/SCAN/pre-AUTH) and only if needed
re-create the new one (if we go to AUTH).
A slightly earlier version has survived a night of wpa_supplicant
and hostapd fighting each other over disassoc and deauth and
re-associating/authorizing.

While there update a few comments and typos and do a few minor auxiliary
changes which are hard or not worth to extract.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# fa8f007d 22-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: factor out dtim/tsf updates

Factor out dtim/tsf setting/updates into lkpi_update_dtim_tsf()
with tracing and add an extra update call.
This avoids some code duplication and puts ma

LinuxKPI: 802.11: factor out dtim/tsf updates

Factor out dtim/tsf setting/updates into lkpi_update_dtim_tsf()
with tracing and add an extra update call.
This avoids some code duplication and puts maintainance into a
single place.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 4f61ef8b 22-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: factor out lkpi_lsta_alloc() from lkpi_ic_node_alloc()

Split lkpi_ic_node_alloc() into two functions to make the code simpler
and to allow lkpi_lsta_alloc() to be re-used from anot

LinuxKPI: 802.11: factor out lkpi_lsta_alloc() from lkpi_ic_node_alloc()

Split lkpi_ic_node_alloc() into two functions to make the code simpler
and to allow lkpi_lsta_alloc() to be re-used from another part of the
code related to (*iv_update_bss)().

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# bb81db90 22-Mar-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: implement ieee80211_beacon_loss()

Implement ieee80211_beacon_loss() similar to
ieee80211_connection_loss() with different state handling.
While here leave a comment in connection_l

LinuxKPI: 802.11: implement ieee80211_beacon_loss()

Implement ieee80211_beacon_loss() similar to
ieee80211_connection_loss() with different state handling.
While here leave a comment in connection_loss() about the state
change argument.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


Revision tags: vendor/llvm-project/llvmorg-14.0.0-rc4-2-gadd3ab7f4c8a, vendor/tzdata/tzdata2022a, vendor/openssl/1.1.1n, vendor/bsddialog/0.2, vendor/libcxxrt/2022-03-09-fd484be8d1e94a1fcf6bc5c67e5c07b65ada19b6, vendor/bc/5.2.3, vendor/llvm-project/llvmorg-14.0.0-rc2-12-g09546e1b5103, vendor/expat/2.4.6, vendor/openssh/8.9p1, vendor/llvm-project/llvmorg-13.0.1-0-g75e33f71c2da, vendor/llvm-project/llvmorg-14.0.0-rc1-74-g4dc3cb8e3255, vendor/unbound/1.15.0
# c0cadd99 17-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 simplify beacon checks in rx path

In linuxkpi_ieee80211_rx() check if the frame is a beacon once upfront
and use the result for enhanced debugging and further checks.
This was done

LinuxKPI: 802.11 simplify beacon checks in rx path

In linuxkpi_ieee80211_rx() check if the frame is a beacon once upfront
and use the result for enhanced debugging and further checks.
This was done intially for rx_status->device_timestamp debugging.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# cc4e78d5 17-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 advertise full offload scanning based on hw_scan only

We disabled hw_scan for drivers not advertising SINGLE_SCAN_ON_ALL_BANDS.
Do not depend on this hw flag to set IEEE80211_FEXT_S

LinuxKPI: 802.11 advertise full offload scanning based on hw_scan only

We disabled hw_scan for drivers not advertising SINGLE_SCAN_ON_ALL_BANDS.
Do not depend on this hw flag to set IEEE80211_FEXT_SCAN_OFFLOAD for
net80211 as otherwise scanning will never work.
Long-term we probably want to re-think how we do/integrate hw_scan
better in net80211.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# 3d09d310 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: disable ic_headroom for the moment

There is a problem with some drivers, such as rtw88, asking for more
headroom than we currently can handle throughout the stack (we have
other le

LinuxKPI: 802.11: disable ic_headroom for the moment

There is a problem with some drivers, such as rtw88, asking for more
headroom than we currently can handle throughout the stack (we have
other legacy wireless driver in the tree with similar problems).
This may trigger an assertion in the TCP syncache where we are checking
for a reply to fit in MHLEN.
While for the moment we still copy data from mbufs to skbs,
we can simply disable the extra headroom request in ic_headroom and
deal with it ourselves (which we already did anyway).
Leave a link to the thread on freebsd-transport detailing more of the
problem so we can find it again and solve it here or there.

MFC after: 3 days

show more ...


# 61a68e50 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 enahnce linuxkpi_ieee80211_iterate_interfaces()

Add support for IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER in
linuxkpi_ieee80211_iterate_interfaces() needed by a driver.

MFC after: 3

LinuxKPI: 802.11 enahnce linuxkpi_ieee80211_iterate_interfaces()

Add support for IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER in
linuxkpi_ieee80211_iterate_interfaces() needed by a driver.

MFC after: 3 days

show more ...


# c5b96b3e 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 assign an(y) early chandef

The Realtek driver assumes an early chandef to be set. At the time
of linuxkpi_ieee80211_ifattach() we do not really know one yet so
try to find the firs

LinuxKPI: 802.11 assign an(y) early chandef

The Realtek driver assumes an early chandef to be set. At the time
of linuxkpi_ieee80211_ifattach() we do not really know one yet so
try to find the first one which is available and set that.
This prevents a NULL-deref panic.

MFC after: 3 days

show more ...


# 652e22d3 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: defer workq allocation until we have a name

Turned out all the workq's taskqueues were named "wlanNA" if you had
more then one card in a machine as by the time we called wiphy_name

LinuxKPI: 802.11: defer workq allocation until we have a name

Turned out all the workq's taskqueues were named "wlanNA" if you had
more then one card in a machine as by the time we called wiphy_name()
the device name was not set yet and we returned the fallback.

Move the alloc_ordered_workqueue() from linuxkpi_ieee80211_alloc_hw()
to linuxkpi_ieee80211_ifattach() at which time the device name has
to be set to give us a unique name.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


# d3ef7fb4 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 scan update

Realtek's rtw88 is returning a hard-coded 1 in case they cannot
hw_scan (fw not advertising it). In that case if we want any scan
to run we need to fall-back to sw scan

LinuxKPI: 802.11 scan update

Realtek's rtw88 is returning a hard-coded 1 in case they cannot
hw_scan (fw not advertising it). In that case if we want any scan
to run we need to fall-back to sw scan. Start dealing with this.
Long-term we probably need to keep internal state.

MFC after: 3 days

show more ...


# 6baea331 16-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: skbuff updates

Various updates to skbuff for new/updated drivers and some housekeeping:
- update types and struct members, add new (stub) functions
- improve freeing of frags.
- fix an iss

LinuxKPI: skbuff updates

Various updates to skbuff for new/updated drivers and some housekeeping:
- update types and struct members, add new (stub) functions
- improve freeing of frags.
- fix an issue with sleeping during alloc for dev_alloc_skb().
- Adjust a KASSERT for skb_reserve() which apparently can be called
multiple times if no data was put into the skb yet.
- move the sysctl from linux_8022.c (which may be in a different module)
to linux_skbuff.c so in case we turn debugging on we do not run into
unresolved symbols. Rename the sysctl variable to be less conflicting
and update debugging macros along with that; also add IMPROVE().
- add DDB support to show an skbuff.
- adjust comments/whitespace.

No functional changes intended for iwlwifi.

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

show more ...


# 2e183d99 15-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11 header updates and add/adjust source dependencies.

This update is for more/newer versions of drivers:
- add and properly place more structs, enums, defines needed by drivers.
- corr

LinuxKPI: 802.11 header updates and add/adjust source dependencies.

This update is for more/newer versions of drivers:
- add and properly place more structs, enums, defines needed by drivers.
- correct types of struct fields.
- make various function arguments const.
- move REG_RULE() macro to its own file regulatory.h and
use macros for calculations.
- add linuxkpi_ieee80211_get_channel() implementation.
- change linuxkpi_ieee80211_ifattach() to return int for error checking.

No intended functional changes for iwlwifi.

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

show more ...


# cee56e77 14-Feb-2022 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: 802.11: get rid of lkpi_ic_getradiocaps warnings

Users are seeing warnings about 2 channels (1 per band)
triggered by an ioctl from wpa_supplicant usually:
lkpi_ic_getradiocaps: Adding ch

LinuxKPI: 802.11: get rid of lkpi_ic_getradiocaps warnings

Users are seeing warnings about 2 channels (1 per band)
triggered by an ioctl from wpa_supplicant usually:
lkpi_ic_getradiocaps: Adding chan ... returned error 55
This was an early FAQ.

Check the current number of channels against maxchans and the return
code from net80211. In case net80211 reports that we reached the limit
do not print the warning and do not try to add further channels.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

show more ...


1...<<11121314151617181920