FreeBSD/src bcf1d8esys/compat/linuxkpi/common/include/linux skbuff.h, sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11/skb: add extra information for skb alloc failures

rtw88 seems to have an skb leak still.

Add a WARN_ONCE to __skb_queue_purge() just to make sure there is no
glitch due to missing locking.

Also add a rolling error reporting for skb allocation failures in
LinuxKPI to gather some more information if possible about queue
states.

This is a corrected version of what was initially part of D48474.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+16-1sys/compat/linuxkpi/common/src/linux_80211.c
+2-0sys/compat/linuxkpi/common/include/linux/skbuff.h
+18-12 files

FreeBSD/src d2407a2sys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: ieee80211_vif_usable_links()

ieee80211_vif_usable_links() shows up in TODO() tracking.
Turns out the return (1) is likely wrong and should be 0 given we do
not support MLD yet.  For now return the valid_links bitmap and leave
an IMPROVE as likely not all of the valid ones will be useable.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+2-2sys/compat/linuxkpi/common/include/net/mac80211.h
+2-21 files

FreeBSD/src a7c19b8sys/compat/linuxkpi/common/include/net cfg80211.h, sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI; 802.11: start implementing cfg80211_calculate_bitrate()

For now we only return the legacy rate and have two TODOs for HT and
VHT which still need to be implemented as needed.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+30-0sys/compat/linuxkpi/common/src/linux_80211.c
+3-3sys/compat/linuxkpi/common/include/net/cfg80211.h
+33-32 files

FreeBSD/src 470aaf4sys/compat/linuxkpi/common/include/linux ieee80211.h nl80211.h, sys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: make struct ieee80211_tx_info a bit more packed

Given I was looking at the struct make it more packed at the beginning
at least.  In fact it did not shrink but the tx_time_est got expanded.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+4-4sys/compat/linuxkpi/common/include/net/mac80211.h
+1-1sys/compat/linuxkpi/common/include/linux/ieee80211.h
+1-1sys/compat/linuxkpi/common/include/linux/nl80211.h
+6-63 files

FreeBSD/src 49010basys/compat/linuxkpi/common/include/linux ieee80211.h, sys/compat/linuxkpi/common/include/net mac80211.h cfg80211.h

LinuxKPI: 802.11: fill in a lot more RX status fields

Convert a lot more LinuxKPI rx_status fields to net80211 rx_stats
bits for as much as we can see fit.  Factor the entire logic out
into its own function as it got quite long.

Now only net80211 needs to start using more of these values and
report them.

Also fix some related fields and struct definitions in LinuxKPI.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+157-39sys/compat/linuxkpi/common/src/linux_80211.c
+6-4sys/compat/linuxkpi/common/include/net/mac80211.h
+4-5sys/compat/linuxkpi/common/include/net/cfg80211.h
+3-1sys/compat/linuxkpi/common/include/linux/ieee80211.h
+170-494 files

FreeBSD/src 3f85055sys/kern subr_pctrie.c

pctrie: Fix size of printed value in KASSERT

The value 'index' in a pctrie iterator cannot be written
with "%lx" on a 32-bit machine.  Use '%jx' after a uintmax_t cast instead.

Reported by:    bz
Fixes:  bba883df5e88d0fb1133b23c05db5501dd321ad8
DeltaFile
+2-1sys/kern/subr_pctrie.c
+2-11 files

FreeBSD/src 3afc0bfsys/net80211 ieee80211_crypto_ccmp.c

net80211: crypto: ccmp: fix more hardware offload bits

Add the missing IEEE80211_RX_F_DECRYPTED and IEEE80211_RX_F_MMIC_STRIP
(really just MIC_STRIP) checks to make hwaccel offload work.
This makes rtw8x drivers pass RX packets again at least with LinuxKPI
if HW_CRYPTO support is enabled.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D49030
DeltaFile
+13-0sys/net80211/ieee80211_crypto_ccmp.c
+13-01 files

FreeBSD/src ec6185csys/compat/linuxkpi/common/src linux_80211.c, sys/net80211 ieee80211_crypto_ccmp.c _ieee80211.h

net80211/crypto: LinuxKPI/802.11: introduce IEEE80211_RX_F_PN_VALIDATED

There are cases when we see "rx seq# violation (CCMP)".

Historically these were AHDEMO/IBBS cases (IEEE80211_KEY_NOREPLAY,
see 5d766a09daab2).

With iwlwifi(4) doing RSS for newer chipsets and us not having any idea
about multiple rx-queues (passed all the way through) leads to the same
problem.  An easy way to trigger this is doing an IPv6 all-nodes echo
request.  With a sufficient amount of nodes answering the answers will
be hashed to different queues and re-ordering will likely take place
as queues get released individually.
However crypto validation is already done in fw/driver for these cases
and we need to carry the state forward.  Add IEEE80211_RX_F_PN_VALIDATED
to indicate that the checks were done passing the information from driver
through LinuxKPI to net80211.
LinuxKPI enforces that a frame was indeed decrypted; otherwise the flag
would be invalid.

    [8 lines not shown]
DeltaFile
+15-1sys/compat/linuxkpi/common/src/linux_80211.c
+13-3sys/net80211/ieee80211_crypto_ccmp.c
+1-0sys/net80211/_ieee80211.h
+29-43 files

FreeBSD/src bba883dsys/kern subr_pctrie.c, sys/sys pctrie.h

pctrie: iter_remove check from panic to KASSERT

pctrie_iter_remove checks to see if the thing the iterator points to
is actually there, and panics if it is not. This panic would likely
indicate the same iterator had been used for removal twice, without
advancing the iterator in-between. This test takes a bit of time, and
as it indicates a programmer error rather than some external
condition, it is better handled as a KASSERT. This means with KASSERTs
disabled, a wee bit of time is saved.

Reviewed by:    alc, markj
Differential Revision:  https://reviews.freebsd.org/D49015
DeltaFile
+19-22sys/kern/subr_pctrie.c
+2-5sys/sys/pctrie.h
+21-272 files

FreeBSD/src 19f202fsys/dev/sdhci sdhci_fdt_rockchip.c

sdhci: Fixes for sdhci_fdt_rockchip.c

This change fixes a couple of issues in the Rockchip SDHCI driver:
 - Fix a panic caused by sdhci_fdt_rockchip_attach not populating the
   softc's dev variable before initializing clocks
 - Fix a bug where sdhci_fdt_rockchip_set_clock fails to call
   sdhci_fdt_set_clock

Fixes:  e17e33f997d6
Reported by:    Alonso Cárdenas Márquez (acardenas at bsd-peru.org)
DeltaFile
+6-7sys/dev/sdhci/sdhci_fdt_rockchip.c
+6-71 files

FreeBSD/src b6490ad. ObsoleteFiles.inc

ObsoleteFiles.inc: Remove test debug file from wrong dir

Reported by:    des
Reviewed by:    des, emaste
Approved by:    emaste (mentor)
Fixes:  88d448ec815c ("mk: Move vm stack test debug symbols")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D48991

(cherry picked from commit e159dcc37e6f538d3d61ea3b2d08b052cf0e0ced)
DeltaFile
+1-0ObsoleteFiles.inc
+1-01 files

FreeBSD/src 24d3fd3. ObsoleteFiles.inc

ObsoleteFiles.inc: Remove test debug file from wrong dir

Reported by:    des
Reviewed by:    des, emaste
Approved by:    emaste (mentor)
Fixes:  88d448ec815c ("mk: Move vm stack test debug symbols")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D48991

(cherry picked from commit e159dcc37e6f538d3d61ea3b2d08b052cf0e0ced)
DeltaFile
+1-0ObsoleteFiles.inc
+1-01 files

FreeBSD/src a063692sys/dev/igc igc_defines.h

igc: Remove unused register IGC_RXD_SPC_VLAN_MASK

We don't use legacy receive descriptors and masking out the vlan ID
isn't necessary since the tag is in the standard format, so remove it.

(cherry picked from commit 124b7722aad7d4cf12d96c030659aef78175aa9c)
DeltaFile
+0-1sys/dev/igc/igc_defines.h
+0-11 files

FreeBSD/src e812e4dsys/dev/e1000 em_txrx.c e1000_defines.h

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
format, so there's no reason to discard PCP/DEI.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

Sponsored by:   Stormshield (author)
Differential Revision:  https://reviews.freebsd.org/D48987

(cherry picked from commit 4b29599fbbe33b75b7b58cfc5deea7a881e9a10e)
DeltaFile
+1-2sys/dev/e1000/em_txrx.c
+0-1sys/dev/e1000/e1000_defines.h
+1-32 files

FreeBSD/src b26592dsys/dev/ixgbe ixgbe_phy.c if_ix.c

ixgbe: Add support for 1000BASE-BX SFP modules

Add support for 1Gbit BiDi modules

Signed-off-by:  Tore Amundsen <tore at amundsen.org>
Relnotes:       yes
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1518

(cherry picked from commit 89d4096950c4db748e39758c941cfb708c2ff808)
DeltaFile
+19-4sys/dev/ixgbe/ixgbe_phy.c
+4-1sys/dev/ixgbe/if_ix.c
+3-1sys/dev/ixgbe/ixgbe_82599.c
+2-0sys/dev/ixgbe/ixgbe_phy.h
+2-0sys/dev/ixgbe/ixgbe_type.h
+30-65 files

FreeBSD/src 07e712esys/dev/igc igc_defines.h

igc: Remove unused register IGC_RXD_SPC_VLAN_MASK

We don't use legacy receive descriptors and masking out the vlan ID
isn't necessary since the tag is in the standard format, so remove it.

(cherry picked from commit 124b7722aad7d4cf12d96c030659aef78175aa9c)
DeltaFile
+0-1sys/dev/igc/igc_defines.h
+0-11 files

FreeBSD/src ecbef36sys/dev/e1000 em_txrx.c e1000_defines.h

e1000: Fix vlan PCP/DEI on lem(4)

The vlan PCP and CFI/DEI were discarded when receiving vlan tagged
packets on lem(4) interfaces with vlanhwtag.

According to the 82540 SDM[1] (pg. 24), vlan tag is in the standard
format, so there's no reason to discard PCP/DEI.

[1]: http://iommu.com/datasheets/ethernet/controllers-nics/intel/e1000/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf

Sponsored by:   Stormshield (author)
Differential Revision:  https://reviews.freebsd.org/D48987

(cherry picked from commit 4b29599fbbe33b75b7b58cfc5deea7a881e9a10e)
DeltaFile
+1-2sys/dev/e1000/em_txrx.c
+0-1sys/dev/e1000/e1000_defines.h
+1-32 files

FreeBSD/src c34817dsys/dev/ixgbe ixgbe_phy.c if_ix.c

ixgbe: Add support for 1000BASE-BX SFP modules

Add support for 1Gbit BiDi modules

Signed-off-by:  Tore Amundsen <tore at amundsen.org>
Relnotes:       yes
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1518

(cherry picked from commit 89d4096950c4db748e39758c941cfb708c2ff808)
DeltaFile
+19-4sys/dev/ixgbe/ixgbe_phy.c
+4-1sys/dev/ixgbe/if_ix.c
+3-1sys/dev/ixgbe/ixgbe_82599.c
+2-0sys/dev/ixgbe/ixgbe_phy.h
+2-0sys/dev/ixgbe/ixgbe_type.h
+30-65 files

FreeBSD/src 5778cbdsys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: implement various VHT helper functions

Implement ieee80211_rate_set_vht(), ieee80211_rate_get_vht_{mcs,nss}(),
and ieee80211_get_vht_max_nss().

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+118-18sys/compat/linuxkpi/common/include/net/mac80211.h
+118-181 files

FreeBSD/src c272abcsys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: adjust the hw_scan channel list

Until net80211 will grow proper scan offload with the various options
needed and will allow switching the scan engine try to improve the
situation if we are doing a hw_scan and the device supports
SINGLE_SCAN_ON_ALL_BANDS.  In that case create the channel list from
our device information of supported channels rather than from the
net80211 scan list.  Filter out currently unsupported bands.

While the general "scan EBUSY" problem remains at least in my local
testing I am seeing a lot more 2 and 5 GHz band results rather than
being stuck on a single band (as was also often the case with iwm for
me in the past).

Tested by:      rene (previous version)
MFC after:      3 days
DeltaFile
+50-11sys/compat/linuxkpi/common/src/linux_80211.c
+50-111 files

FreeBSD/src 0f10a33sys/dev/etherswitch/ar40xx ar40xx_phy.c

ar40xx: fix to compile/run under the new ifnet rules

Locally tested:

* IPQ4018, Asus router, w/ ethernet driver

Differential Revision:  https://reviews.freebsd.org/D49025
Reviewed by:    imp, zlei
DeltaFile
+4-4sys/dev/etherswitch/ar40xx/ar40xx_phy.c
+4-41 files

FreeBSD/src fa462b8sys/vm vm_object.c

vm_object: drop pointless assignment

An assignment in collapse_scan() has become useless because, on every
path, another assignment to that variable overrides it before that
variable is read.  Another assignment can be avoided sometimes, so
move it down in the loop to where it's really necessary.

Reviewed by:    alc, markj
Differential Revision:  https://reviews.freebsd.org/D49017
DeltaFile
+2-5sys/vm/vm_object.c
+2-51 files

FreeBSD/src 9763fecsys/net80211 ieee80211_node.c

net80211: use IEEE80211_KEY_UNDEFINED() insetad of checking they keyix

For ieee80211_node_delucastkey() rather than checking the keyix to be
IEEE80211_KEYIX_NONE use the IEEE80211_KEY_UNDEFINED() macro (which
chekes the wk_cipher to be 'none').

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D48980
DeltaFile
+1-1sys/net80211/ieee80211_node.c
+1-11 files

FreeBSD/src d688c20sys/net80211 _ieee80211.h

net80211: crypto: enhance comment about IEEE80211_RX_F_MMIC_STRIP

net80211 crypto currently re-uses the M[ichael]MIC flag for MIC as well
at least in CCMP.  This is a bit confusing so at least try to improve
the comment that it becomes more obvious.
In the long-term we may want to just add a MIC flag as well?

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D48978
DeltaFile
+1-1sys/net80211/_ieee80211.h
+1-11 files

FreeBSD/src 7f31d95sys/net80211 ieee80211.h

net80211: rename \4 in IEEE80211_VHTCAP_BITS for clarity

Bits 2 and 3 (\3 and \4 of the %b flag mask) are the 'Supported Channel
Width Set' indicating VHT160 (B2) or VHT160 and VHT80P80 (B3) support.
Though longer rename \4 from CHAN80P80 to CHAN160+80P80 to not confuse
the reader that VHT160 might not be supported.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D48977
DeltaFile
+1-1sys/net80211/ieee80211.h
+1-11 files

FreeBSD/src 8f2e5b6sbin/ifconfig ifieee80211.c, sys/net80211 ieee80211_var.h

net80211/ifconfig: swap IEEE80211_FVHT_USEVHT160 and 80P80

ieee80211_setupcurchan() compares the flags in a greater than manner.
In this case VHT160 should be > VHT80P80 as it is preferable.
Swap the two flags and add a comment to note this.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D48976
DeltaFile
+6-2sys/net80211/ieee80211_var.h
+2-2sbin/ifconfig/ifieee80211.c
+8-42 files

FreeBSD/src 75fb66dsys/compat/linuxkpi/common/include/linux ieee80211.h, sys/compat/linuxkpi/common/include/net cfg80211.h

net80211 / LinuxKPI 802.11: add 802.11-2016 VHT Extended NSS BW defines

Add the mask and shift for the VHT Extended NSS BW Support field.
Document them in net80211 and further related bitmasks in LinuxKPI.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Reviewed by:    adrian
Differential Revision: https://reviews.freebsd.org/D48975
DeltaFile
+4-0sys/net80211/ieee80211.h
+2-1sys/compat/linuxkpi/common/include/linux/ieee80211.h
+2-1sys/compat/linuxkpi/common/include/net/cfg80211.h
+8-23 files

FreeBSD/src 89e3c2dsys/conf files, sys/dev/flash w25n.c w25nreg.h

flash: add w25n (nand flash) support

This adds read only support for the W25N series of flash parts.

Specifically starting with the W25N01GV, a 128MiB SPI NAND flash.

This doesn't currently support writing or erasing, as this requires
a NAND flash layer that we don't currently have.  There are also
plenty of other commands that aren't currently supported - notably
maintaining the on-chip flash translation layer, flash wear statistics,
etc.

But read support is fine enough for now; it at least allows for
reading the boot / config / calibration flash on my ASUS IPQ4018 based
router.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D48979
DeltaFile
+603-0sys/dev/flash/w25n.c
+85-0sys/dev/flash/w25nreg.h
+1-0sys/conf/files
+689-03 files

FreeBSD/src 4152ed2share/man/man5 style.mdoc.5

style.mdoc: fix list width alignment instructions

MFC after:      3 days
Reported by:    imp
Reviewed by:    mhorne, imp
Approved by:    mhorne (mentor)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1530
DeltaFile
+3-2share/man/man5/style.mdoc.5
+3-21 files

FreeBSD/src 091f30a. UPDATING

UPDATING: Add entry for commit 4517fbfd4251
DeltaFile
+5-0UPDATING
+5-01 files