FreeBSD/src af01ffbsys/compat/linuxkpi/common/include/linux gfp.h

linuxkpi: Define `GFP_KERNEL_ACCOUNT` flag

This flag combines `GFP_KERNEL` and `__GFP_ACCOUNT`. The latter is also
defined in this commit. It is defined as a no-op flag as it is not
implemented.

The DRM generic code started to use it in Linux 6.12.x.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56587
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/gfp.h
+2-01 files

FreeBSD/src fb7df70tools/build/mk OptionalObsoleteFiles.inc

Remove all of /usr/tests/share/examples/... when MK_EXAMPLES == no

- Remove the generated files (`file1`).
- Remove the top-level example `Kyuafile`.

MFC after:      1 week
DeltaFile
+4-0tools/build/mk/OptionalObsoleteFiles.inc
+4-01 files

FreeBSD/src d1c800b. UPDATING, sys/sys param.h

UPDATING: Bump __FreeBSD_version to 1500508

Bump __FreeBSD_version to 1500508 for LinuxKPI to be able to track
changes to eventfd, changes for DRM 6.11, changes of LinuxKPI 802.11
based on Linux v7.0.

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0UPDATING
+1-1sys/sys/param.h
+6-12 files

FreeBSD/src eb82fb1sys README.md

sys/README: update README.md

Add missing directories and fix alphabetical ordering

Signed-off-by:  Minsoo Choo <minsoo at minsoo.io>
Sponsored by:   FreeBSD Foundation
Reviewed by:    imp, mhorne, pouria
Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2146
DeltaFile
+19-2sys/README.md
+19-21 files

FreeBSD/src b9495bdtools/build/mk OptionalObsoleteFiles.inc

Preen/update list for share/examples/sound under `MK_EXAMPLES`

- Update sources to match current installed files list. This involved
  adding and removing some example files.
- Sort the list alphabetically so it'll be easier to spot future updates.

MFC after:      1 week
DeltaFile
+7-3tools/build/mk/OptionalObsoleteFiles.inc
+7-31 files

FreeBSD/src dd8d3aesys/modules/ath12k Makefile

ath12k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Handle the file changes and the extra wifi7/ subdirectory.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 5cfadb6633128dccc32b1e4f84386ad705adc721)
DeltaFile
+12-3sys/modules/ath12k/Makefile
+12-31 files

FreeBSD/src 8696cc8sys/contrib/dev/rtw89 core.c

rtw89: fix mismerge

Due to FreeBSD-specific code it seems a code update was not applied
to the FreeBSD part during the v6.17 driver update.
Add the missing lines.

Sponsored by:   The FreeBSD Foundation
Fixes:          b35044b38f74c

(cherry picked from commit adb16cd389c3456cbd538b658c3c0af5145dde91)
DeltaFile
+2-0sys/contrib/dev/rtw89/core.c
+2-01 files

FreeBSD/src bbfa2e7sys/contrib/dev/athk/ath12k dp_mon.c dp_rx.c, sys/contrib/dev/athk/ath12k/wifi7 dp_mon.c hal_desc.h

ath12k: update Atheros/QCA's ath12k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 60bac4d6438b6bcb3d7b439684211d05396d90ce)
DeltaFile
+103-3,414sys/contrib/dev/athk/ath12k/dp_mon.c
+257-3,253sys/contrib/dev/athk/ath12k/dp_rx.c
+3,385-0sys/contrib/dev/athk/ath12k/wifi7/dp_mon.c
+0-3,045sys/contrib/dev/athk/ath12k/hal_desc.h
+2,742-0sys/contrib/dev/athk/ath12k/wifi7/hal_desc.h
+256-2,061sys/contrib/dev/athk/ath12k/hal.c
+6,743-11,77386 files not shown
+28,207-23,80192 files

FreeBSD/src cb309eesys/modules/ath11k Makefile

ath11k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Add optional support for the new cfr (channel frequency response)
file/option.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 20cf11812ac722852322f2f2994698d7a5fa8dc6)
DeltaFile
+7-1sys/modules/ath11k/Makefile
+7-11 files

FreeBSD/src 0bd21f7sys/contrib/dev/broadcom/brcm80211/brcmfmac cfg80211.c pcie.c, sys/contrib/dev/broadcom/brcm80211/brcmsmac main.c

brcm80211: update Broadcom wireless brcmsmac and brcmfmac drivers

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 117d9331fedeb5c5657a796423c4f7b311f40770)
DeltaFile
+14-15sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c
+13-14sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c
+5-10sys/contrib/dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+7-8sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c
+6-7sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c
+6-6sys/contrib/dev/broadcom/brcm80211/brcmfmac/msgbuf.c
+51-6027 files not shown
+106-11233 files

FreeBSD/src 8696b3asys/modules/brcm80211/brcmfmac Makefile, sys/modules/brcm80211/brcmutil Makefile

brcm80211: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 634a48f3673ff8af9848846a6bff1a8c068d205d)
DeltaFile
+1-1sys/modules/brcm80211/brcmutil/Makefile
+1-1sys/modules/brcm80211/brcmfmac/Makefile
+2-22 files

FreeBSD/src 24c9bc6sys/contrib/dev/athk/ath11k cfr.c cfr.h

ath11k: update Atheros/QCA's ath11k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 4ed5b949d5e25456124a4d280d27e9719f90e9be)
DeltaFile
+1,022-0sys/contrib/dev/athk/ath11k/cfr.c
+308-0sys/contrib/dev/athk/ath11k/cfr.h
+154-13sys/contrib/dev/athk/ath11k/wmi.c
+141-1sys/contrib/dev/athk/ath11k/debugfs_sta.c
+96-12sys/contrib/dev/athk/ath11k/core.c
+94-3sys/contrib/dev/athk/ath11k/wmi.h
+1,815-2921 files not shown
+1,999-11027 files

FreeBSD/src e38e480sys/modules/ath10k Makefile, sys/modules/athk_common Makefile

athk_common / ath10k: update module Makefiles for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 4546eb0c27f22236be8179616e1f0a3e88ddfbbe)
DeltaFile
+1-1sys/modules/ath10k/Makefile
+1-1sys/modules/athk_common/Makefile
+2-22 files

FreeBSD/src 4208012sys/contrib/dev/athk/ath10k snoc.c wmi.c

ath10k: update Atheros/QCA's ath10k driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 02b46313fd1461338703a1e02c667b8dbcc36237)
DeltaFile
+50-3sys/contrib/dev/athk/ath10k/snoc.c
+16-16sys/contrib/dev/athk/ath10k/wmi.c
+4-8sys/contrib/dev/athk/ath10k/ce.c
+5-5sys/contrib/dev/athk/ath10k/wmi-tlv.c
+4-6sys/contrib/dev/athk/ath10k/mac.c
+5-5sys/contrib/dev/athk/ath10k/qmi.c
+84-436 files not shown
+100-5112 files

FreeBSD/src 05a1575sys/modules/mt76 Makefile.inc

mt76: update module Makefile for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 1c50cb1d75625bea2ba928697ea1cbafa29dd245)
DeltaFile
+1-1sys/modules/mt76/Makefile.inc
+1-11 files

FreeBSD/src 3b03525sys/contrib/dev/athk dfs_pri_detector.c dfs_pattern_detector.c

ath-common: update common Atheros/QCA code

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ff18554fd6e616f5d965322be477dc406a2906bc)
DeltaFile
+3-3sys/contrib/dev/athk/dfs_pri_detector.c
+2-2sys/contrib/dev/athk/dfs_pattern_detector.c
+5-52 files

FreeBSD/src 8089103sys/contrib/dev/mediatek/mt76 scan.c agg-rx.c, sys/contrib/dev/mediatek/mt76/mt7615 mac.c mt7615.h

mt76: update Mediatek's mt76 driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 63a40b65c9be74193bb07a76fd66c249bd562eae)
DeltaFile
+1-3sys/contrib/dev/mediatek/mt76/scan.c
+1-1sys/contrib/dev/mediatek/mt76/agg-rx.c
+1-1sys/contrib/dev/mediatek/mt76/mt7615/mac.c
+1-1sys/contrib/dev/mediatek/mt76/mt7996/main.c
+1-1sys/contrib/dev/mediatek/mt76/mt7996/mcu.c
+1-0sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h
+6-73 files not shown
+9-79 files

FreeBSD/src f08c029sys/modules/iwlwifi Makefile

iwlwifi: update module Makefile for v7.0 driver version

Add the new file for nan in the mld subdriver.

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 9ed3331fb5822b93313edae42cc529eb25e1a6cc)
DeltaFile
+2-2sys/modules/iwlwifi/Makefile
+2-21 files

FreeBSD/src 47263c1sys/modules/rtw89 Makefile

rtw89: update module Makefile for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 3780e6f9db01cc4f7d53d67ed1fc992a8f64c53f)
DeltaFile
+1-1sys/modules/rtw89/Makefile
+1-11 files

FreeBSD/src 7ffebcdsys/contrib/dev/rtw89 fw.c reg.h

rtw89: update Realtek's rtw89 driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 422e9c5d878e14ec16bb89ef6df65d964d5ce2f1)
DeltaFile
+1,097-90sys/contrib/dev/rtw89/fw.c
+924-10sys/contrib/dev/rtw89/reg.h
+650-46sys/contrib/dev/rtw89/mac_be.c
+543-20sys/contrib/dev/rtw89/phy_be.c
+446-73sys/contrib/dev/rtw89/fw.h
+384-56sys/contrib/dev/rtw89/phy.c
+4,044-29538 files not shown
+5,680-54044 files

FreeBSD/src bcdf750sys/contrib/dev/rtw88 main.c phy.c

rtw88: update Realtek's rtw88 driver

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 41b641cc0537d1288cc05332bb4c5de3dcb12589)
DeltaFile
+37-17sys/contrib/dev/rtw88/main.c
+20-0sys/contrib/dev/rtw88/phy.c
+2-4sys/contrib/dev/rtw88/sdio.c
+3-2sys/contrib/dev/rtw88/usb.c
+2-2sys/contrib/dev/rtw88/util.c
+2-1sys/contrib/dev/rtw88/rtw8822b.c
+66-2610 files not shown
+78-3416 files

FreeBSD/src f45e343sys/contrib/dev/iwlwifi/fw regulatory.c, sys/contrib/dev/iwlwifi/fw/api mac-cfg.h

iwlwifi: update Intel's mvm/mld drivers

This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
028ef9c96e96197026887c0f092424679298aae8 ( tag: v7.0 ).

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit b2bd08185e4984c70179c195f712cef5a136d21b)
DeltaFile
+299-0sys/contrib/dev/iwlwifi/mld/nan.c
+4-202sys/contrib/dev/iwlwifi/fw/regulatory.c
+201-4sys/contrib/dev/iwlwifi/mvm/fw.c
+11-192sys/contrib/dev/iwlwifi/mvm/mld-mac80211.c
+152-7sys/contrib/dev/iwlwifi/fw/api/mac-cfg.h
+137-5sys/contrib/dev/iwlwifi/mld/rx.c
+804-41074 files not shown
+1,831-1,10380 files

FreeBSD/src 7410ff2sys/modules/rtw88 Makefile

rtw88: update module Makefile for v7.0 driver version

Update LINUXKPI_VERSION to reflect that the driver is based on
Linux v7.0.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 90383181aae908d2c696f8d66c19645011b4c388)
DeltaFile
+1-1sys/modules/rtw88/Makefile
+1-11 files

FreeBSD/src 1cd5840sys/compat/linuxkpi/common/include/net cfg80211.h mac80211.h

LinuxKPI: 802.11: add struct/fields and functions for v7.0

Add 802.11 struct fields and functions support for Linux v7.0 based
wireless drivers (at least iwlwifi, rtw88, rtw89).

While here cleanup some other bits.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 25e776a5438005db59c6d474b5d47c42d2a341b9)
DeltaFile
+9-4sys/compat/linuxkpi/common/include/net/cfg80211.h
+11-1sys/compat/linuxkpi/common/include/net/mac80211.h
+20-52 files

FreeBSD/src f8d147dsys/compat/linuxkpi/common/include/net cfg80211.h mac80211.h

LinuxKPI: 802.11: Add structures and functions for NAN support

In Linux v7.0 iwlwifi(4) started to add support for Wi-Fi Aware(tm)
also known as Neighbor Awareness Networking (NAN).

Add structures and fields for this as needed so far to keep the driver
compiling.  net80211 has no support for it as a new mode.

We may consider a dedicated header file for these parts in the future
depending on how much more is to come.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit a0112b013f93a47489051fed54ea48c077e59de4)
DeltaFile
+66-0sys/compat/linuxkpi/common/include/net/cfg80211.h
+11-0sys/compat/linuxkpi/common/include/net/mac80211.h
+77-02 files

FreeBSD/src edbcacasys/compat/linuxkpi/common/include/linux device.h

LinuxKPI: implement devm_kmemdup_array()

Implement devm_kmemdup_array() using devm_kmemdup() in order to
prepare for Linux v7.0 based drivers.

Sponsored by:   The FreeBSD Foundation
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56396

(cherry picked from commit f1834d03af617a93993056bb902082452673f89f)
DeltaFile
+7-0sys/compat/linuxkpi/common/include/linux/device.h
+7-01 files

FreeBSD/src 342a373sys/compat/linuxkpi/common/include/linux ieee80211.h

LinuxKPI: 802.11: set IEEE80211_MIN_ACTION_SIZE according to struct

IEEE80211_MIN_ACTION_SIZE came up in the mt76 vendor subtree merge
as one of the non-mechanical changes which made me look.
Rather than (incorrectly) hand counting the offset from the beginning
of a frame, use the offset from the beginning of struct ieee80211_mgmt.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit f252ce00898d17f4892534934b8097cd7ccb9e26)
DeltaFile
+2-2sys/compat/linuxkpi/common/include/linux/ieee80211.h
+2-21 files

FreeBSD/src e6f1460sys/compat/linuxkpi/common/include/linux slab.h

LinuxKPI: add kmalloc_obj[s], kzalloc_obj[s], and kzalloc_flex

Drivers in Linux v7.0 seem to have changed to the new allocation
macros using a sweep.  Add the ones I encountered with wireless
drivers so far.  They all take an optional argument for a gfp_t,
which default_gfp() deals with.

The plural version "objs" takes an extra nitems argument in addition
to the size.  We use size_mul() to possibly detect overflows.

The "flex" version uses an extra variable to track the variable sized
array allocations and if supported by the compiler will use
__builtin_counted_by_ref() to properly track bounds.

Sponsored by:   The FreeBSD Foundation
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56395

(cherry picked from commit c72ac6af086962d236f4712761abacac0c62b48e)
DeltaFile
+23-1sys/compat/linuxkpi/common/include/linux/slab.h
+23-11 files

FreeBSD/src 3548ab7sys/compat/linuxkpi/common/include/linux overflow.h

LinuxKPI: sync overflow.h from Linux v7.0

overflow.h was imported directly from Linux in 3208d4ad2b8320a.
Update the file to the newer version as needed for v7.0 driver updates.

Sponsored by:   The FreeBSD Foundation
Obtained from:  git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
                028ef9c96e96197026887c0f092424679298aae8 (tag: v7.0)
Reviewed by:    emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D56394

(cherry picked from commit d2c85255d4fca37ec9774f85f867f8fc89a51269)
DeltaFile
+130-14sys/compat/linuxkpi/common/include/linux/overflow.h
+130-141 files

FreeBSD/src d73d777sys/compat/linuxkpi/common/include/linux gfp.h

LinuxKPI: add default_gfp()

Various new allocation macros can take an optional gfp_t argument.
If the argument is not given we need to set the GFP_KERNEL default.
While this is only internally used and I initialy called it differently,
should this spread elsewhere having the same name as in Linux will be
good.

Sponsored by:   The FreeBSD Foundaton
Reviewed by:    dumbbell
Differential Revision: https://reviews.freebsd.org/D56392

(cherry picked from commit 35b90c21f48056e85b70dbbe2209b6c3a4927315)
DeltaFile
+3-0sys/compat/linuxkpi/common/include/linux/gfp.h
+3-01 files