From 929c8d007dfed9bd88227e912a312d563f0590ea Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Tue, 24 Mar 2026 14:32:46 -0500 Subject: [PATCH] migrate linux-ptl-audio package to linux-ptl to include audio and wifi in one package Signed-off-by: Spencer Bull --- ...tions-Fix-confusing-cleanup.h-syntax.patch | 0 ...Add-ASoC-jack-hookup-in-class-driver.patch | 0 ...e-use-of-system_wq-with-system_dfl_w.patch | 0 ...-Add-SDCA-IRQ-enable-disable-helpers.patch | 0 ...DCA-Add-basic-system-suspend-support.patch | 0 ...ck-to-serialise-the-Function-initial.patch | 0 ...SDCA-Tidy-up-some-memory-allocations.patch | 0 ..._DIRECT_COMPLETE-flag-to-class-drive.patch | 0 ...SoC-SDCA-Rearrange-FDL-file-messages.patch | 0 ...gmap-defaults-for-specification-defi.patch | 0 ...values-user-can-write-to-Selected-Mo.patch | 0 ...LL-pointer-dereference-in-sdca_jack_.patch | 0 ...d-correctly-set-wifi-generation-data.patch | 201 ++++++++++++++++++ .../{linux-ptl-audio => linux-ptl}/PKGBUILD | 12 +- .../config.x86_64 | 0 15 files changed, 208 insertions(+), 5 deletions(-) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0001-ASoC-SDCA-functions-Fix-confusing-cleanup.h-syntax.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0002-ASoC-SDCA-Add-ASoC-jack-hookup-in-class-driver.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0003-ASoC-SDCA-Replace-use-of-system_wq-with-system_dfl_w.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0004-ASoC-SDCA-Add-SDCA-IRQ-enable-disable-helpers.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0005-ASoC-SDCA-Add-basic-system-suspend-support.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0007-ASoC-SDCA-Add-lock-to-serialise-the-Function-initial.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0008-ASoC-SDCA-Tidy-up-some-memory-allocations.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0010-ASoC-SDCA-Add-NO_DIRECT_COMPLETE-flag-to-class-drive.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0012-ASoC-SDCA-Rearrange-FDL-file-messages.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch (100%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch (100%) create mode 100644 pkgbuilds/edge/linux-ptl/0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/PKGBUILD (96%) rename pkgbuilds/edge/{linux-ptl-audio => linux-ptl}/config.x86_64 (100%) diff --git a/pkgbuilds/edge/linux-ptl-audio/0001-ASoC-SDCA-functions-Fix-confusing-cleanup.h-syntax.patch b/pkgbuilds/edge/linux-ptl/0001-ASoC-SDCA-functions-Fix-confusing-cleanup.h-syntax.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0001-ASoC-SDCA-functions-Fix-confusing-cleanup.h-syntax.patch rename to pkgbuilds/edge/linux-ptl/0001-ASoC-SDCA-functions-Fix-confusing-cleanup.h-syntax.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0002-ASoC-SDCA-Add-ASoC-jack-hookup-in-class-driver.patch b/pkgbuilds/edge/linux-ptl/0002-ASoC-SDCA-Add-ASoC-jack-hookup-in-class-driver.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0002-ASoC-SDCA-Add-ASoC-jack-hookup-in-class-driver.patch rename to pkgbuilds/edge/linux-ptl/0002-ASoC-SDCA-Add-ASoC-jack-hookup-in-class-driver.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0003-ASoC-SDCA-Replace-use-of-system_wq-with-system_dfl_w.patch b/pkgbuilds/edge/linux-ptl/0003-ASoC-SDCA-Replace-use-of-system_wq-with-system_dfl_w.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0003-ASoC-SDCA-Replace-use-of-system_wq-with-system_dfl_w.patch rename to pkgbuilds/edge/linux-ptl/0003-ASoC-SDCA-Replace-use-of-system_wq-with-system_dfl_w.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0004-ASoC-SDCA-Add-SDCA-IRQ-enable-disable-helpers.patch b/pkgbuilds/edge/linux-ptl/0004-ASoC-SDCA-Add-SDCA-IRQ-enable-disable-helpers.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0004-ASoC-SDCA-Add-SDCA-IRQ-enable-disable-helpers.patch rename to pkgbuilds/edge/linux-ptl/0004-ASoC-SDCA-Add-SDCA-IRQ-enable-disable-helpers.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0005-ASoC-SDCA-Add-basic-system-suspend-support.patch b/pkgbuilds/edge/linux-ptl/0005-ASoC-SDCA-Add-basic-system-suspend-support.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0005-ASoC-SDCA-Add-basic-system-suspend-support.patch rename to pkgbuilds/edge/linux-ptl/0005-ASoC-SDCA-Add-basic-system-suspend-support.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0007-ASoC-SDCA-Add-lock-to-serialise-the-Function-initial.patch b/pkgbuilds/edge/linux-ptl/0007-ASoC-SDCA-Add-lock-to-serialise-the-Function-initial.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0007-ASoC-SDCA-Add-lock-to-serialise-the-Function-initial.patch rename to pkgbuilds/edge/linux-ptl/0007-ASoC-SDCA-Add-lock-to-serialise-the-Function-initial.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0008-ASoC-SDCA-Tidy-up-some-memory-allocations.patch b/pkgbuilds/edge/linux-ptl/0008-ASoC-SDCA-Tidy-up-some-memory-allocations.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0008-ASoC-SDCA-Tidy-up-some-memory-allocations.patch rename to pkgbuilds/edge/linux-ptl/0008-ASoC-SDCA-Tidy-up-some-memory-allocations.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0010-ASoC-SDCA-Add-NO_DIRECT_COMPLETE-flag-to-class-drive.patch b/pkgbuilds/edge/linux-ptl/0010-ASoC-SDCA-Add-NO_DIRECT_COMPLETE-flag-to-class-drive.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0010-ASoC-SDCA-Add-NO_DIRECT_COMPLETE-flag-to-class-drive.patch rename to pkgbuilds/edge/linux-ptl/0010-ASoC-SDCA-Add-NO_DIRECT_COMPLETE-flag-to-class-drive.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0012-ASoC-SDCA-Rearrange-FDL-file-messages.patch b/pkgbuilds/edge/linux-ptl/0012-ASoC-SDCA-Rearrange-FDL-file-messages.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0012-ASoC-SDCA-Rearrange-FDL-file-messages.patch rename to pkgbuilds/edge/linux-ptl/0012-ASoC-SDCA-Rearrange-FDL-file-messages.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch b/pkgbuilds/edge/linux-ptl/0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch rename to pkgbuilds/edge/linux-ptl/0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch b/pkgbuilds/edge/linux-ptl/0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch rename to pkgbuilds/edge/linux-ptl/0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch diff --git a/pkgbuilds/edge/linux-ptl-audio/0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch b/pkgbuilds/edge/linux-ptl/0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch rename to pkgbuilds/edge/linux-ptl/0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch diff --git a/pkgbuilds/edge/linux-ptl/0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch b/pkgbuilds/edge/linux-ptl/0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch new file mode 100644 index 0000000..e9b1912 --- /dev/null +++ b/pkgbuilds/edge/linux-ptl/0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch @@ -0,0 +1,201 @@ +From ddaa85feeb15783cf8b4a1a673303f8affb9b155 Mon Sep 17 00:00:00 2001 +From: Johannes Berg +Date: Thu, 19 Mar 2026 11:09:24 +0200 +Subject: wifi: iwlwifi: mld: correctly set wifi generation data + +In each MAC context, the firmware expects the wifi generation +data, i.e. whether or not HE/EHT (and in the future UHR) is +enabled on that MAC. + +However, this is currently handled wrong in two ways: + - EHT is only enabled when the interface is also an MLD, but + we currently allow (despite the spec) connecting with EHT + but without MLO. + - when HE or EHT are used by TDLS peers, the firmware needs + to have them enabled regardless of the AP + +Fix this by iterating setting up the data depending on the +interface type: + - for AP, just set it according to the BSS configuration + - for monitor, set it according to HW capabilities + - otherwise, particularly for client, iterate all stations + and then their links on the interface in question and set + according to their capabilities, this handles the AP and + TDLS peers. Re-calculate this whenever a TDLS station is + marked associated or removed so that it's kept updated, + for the AP it's already updated on assoc/disassoc. + +Signed-off-by: Johannes Berg +Signed-off-by: Miri Korenblit +Link: https://patch.msgid.link/20260319110722.404713b22177.Ic972b5e557d011a5438f8f97c1e793cc829e2ea9@changeid +--- + drivers/net/wireless/intel/iwlwifi/mld/iface.c | 101 +++++++++++++++------- + drivers/net/wireless/intel/iwlwifi/mld/mac80211.c | 19 ++++ + 2 files changed, 88 insertions(+), 32 deletions(-) + +diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c +index 29df747c893801..9215fc7e2eca70 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c ++++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c +@@ -111,14 +111,75 @@ static bool iwl_mld_is_nic_ack_enabled(struct iwl_mld *mld, + IEEE80211_HE_MAC_CAP2_ACK_EN); + } + +-static void iwl_mld_set_he_support(struct iwl_mld *mld, +- struct ieee80211_vif *vif, +- struct iwl_mac_config_cmd *cmd) ++struct iwl_mld_mac_wifi_gen_sta_iter_data { ++ struct ieee80211_vif *vif; ++ struct iwl_mac_wifi_gen_support *support; ++}; ++ ++static void iwl_mld_mac_wifi_gen_sta_iter(void *_data, ++ struct ieee80211_sta *sta) + { +- if (vif->type == NL80211_IFTYPE_AP) +- cmd->wifi_gen.he_ap_support = 1; +- else +- cmd->wifi_gen.he_support = 1; ++ struct iwl_mld_sta *mld_sta = iwl_mld_sta_from_mac80211(sta); ++ struct iwl_mld_mac_wifi_gen_sta_iter_data *data = _data; ++ struct ieee80211_link_sta *link_sta; ++ unsigned int link_id; ++ ++ if (mld_sta->vif != data->vif) ++ return; ++ ++ for_each_sta_active_link(data->vif, sta, link_sta, link_id) { ++ if (link_sta->he_cap.has_he) ++ data->support->he_support = 1; ++ if (link_sta->eht_cap.has_eht) ++ data->support->eht_support = 1; ++ } ++} ++ ++static void iwl_mld_set_wifi_gen(struct iwl_mld *mld, ++ struct ieee80211_vif *vif, ++ struct iwl_mac_wifi_gen_support *support) ++{ ++ struct iwl_mld_mac_wifi_gen_sta_iter_data sta_iter_data = { ++ .vif = vif, ++ .support = support, ++ }; ++ struct ieee80211_bss_conf *link_conf; ++ unsigned int link_id; ++ ++ switch (vif->type) { ++ case NL80211_IFTYPE_MONITOR: ++ /* for sniffer, set to HW capabilities */ ++ support->he_support = 1; ++ support->eht_support = mld->trans->cfg->eht_supported; ++ break; ++ case NL80211_IFTYPE_AP: ++ /* for AP set according to the link configs */ ++ for_each_vif_active_link(vif, link_conf, link_id) { ++ support->he_ap_support |= link_conf->he_support; ++ support->eht_support |= link_conf->eht_support; ++ } ++ break; ++ default: ++ /* ++ * If we have MLO enabled, then the firmware needs to enable ++ * address translation for the station(s) we add. That depends ++ * on having EHT enabled in firmware, which in turn depends on ++ * mac80211 in the iteration below. ++ * However, mac80211 doesn't enable capabilities on the AP STA ++ * until it has parsed the association response successfully, ++ * so set EHT (and HE as a pre-requisite for EHT) when the vif ++ * is an MLD. ++ */ ++ if (ieee80211_vif_is_mld(vif)) { ++ support->he_support = 1; ++ support->eht_support = 1; ++ } ++ ++ ieee80211_iterate_stations_mtx(mld->hw, ++ iwl_mld_mac_wifi_gen_sta_iter, ++ &sta_iter_data); ++ break; ++ } + } + + /* fill the common part for all interface types */ +@@ -128,8 +189,6 @@ static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld, + u32 action) + { + struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif); +- struct ieee80211_bss_conf *link_conf; +- unsigned int link_id; + + lockdep_assert_wiphy(mld->wiphy); + +@@ -147,29 +206,7 @@ static void iwl_mld_mac_cmd_fill_common(struct iwl_mld *mld, + cmd->nic_not_ack_enabled = + cpu_to_le32(!iwl_mld_is_nic_ack_enabled(mld, vif)); + +- /* If we have MLO enabled, then the firmware needs to enable +- * address translation for the station(s) we add. That depends +- * on having EHT enabled in firmware, which in turn depends on +- * mac80211 in the code below. +- * However, mac80211 doesn't enable HE/EHT until it has parsed +- * the association response successfully, so just skip all that +- * and enable both when we have MLO. +- */ +- if (ieee80211_vif_is_mld(vif)) { +- iwl_mld_set_he_support(mld, vif, cmd); +- cmd->wifi_gen.eht_support = 1; +- return; +- } +- +- for_each_vif_active_link(vif, link_conf, link_id) { +- if (!link_conf->he_support) +- continue; +- +- iwl_mld_set_he_support(mld, vif, cmd); +- +- /* EHT, if supported, was already set above */ +- break; +- } ++ iwl_mld_set_wifi_gen(mld, vif, &cmd->wifi_gen); + } + + static void iwl_mld_fill_mac_cmd_sta(struct iwl_mld *mld, +diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +index 0c53d6bd96514c..71a9a72c9ac0ed 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c ++++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +@@ -1761,6 +1761,16 @@ static int iwl_mld_move_sta_state_up(struct iwl_mld *mld, + + if (vif->type == NL80211_IFTYPE_STATION) + iwl_mld_link_set_2mhz_block(mld, vif, sta); ++ ++ if (sta->tdls) { ++ /* ++ * update MAC since wifi generation flags may change, ++ * we also update MAC on association to the AP via the ++ * vif assoc change ++ */ ++ iwl_mld_mac_fw_action(mld, vif, FW_CTXT_ACTION_MODIFY); ++ } ++ + /* Now the link_sta's capabilities are set, update the FW */ + iwl_mld_config_tlc(mld, vif, sta); + +@@ -1873,6 +1883,15 @@ static int iwl_mld_move_sta_state_down(struct iwl_mld *mld, + /* just removed last TDLS STA, so enable PM */ + iwl_mld_update_mac_power(mld, vif, false); + } ++ ++ if (sta->tdls) { ++ /* ++ * update MAC since wifi generation flags may change, ++ * we also update MAC on disassociation to the AP via ++ * the vif assoc change ++ */ ++ iwl_mld_mac_fw_action(mld, vif, FW_CTXT_ACTION_MODIFY); ++ } + } else { + return -EINVAL; + } +-- +cgit 1.2.3-korg diff --git a/pkgbuilds/edge/linux-ptl-audio/PKGBUILD b/pkgbuilds/edge/linux-ptl/PKGBUILD similarity index 96% rename from pkgbuilds/edge/linux-ptl-audio/PKGBUILD rename to pkgbuilds/edge/linux-ptl/PKGBUILD index 7ce53d2..208998f 100644 --- a/pkgbuilds/edge/linux-ptl-audio/PKGBUILD +++ b/pkgbuilds/edge/linux-ptl/PKGBUILD @@ -1,10 +1,10 @@ -# Maintainer: Intel PTL Audio Enablement +# Maintainer: Gaggory Tsai Spencer Bull # Based on Arch Linux linux package by Jan Alexander Steffens (heftig) -pkgbase=linux-ptl-audio +pkgbase=linux-ptl pkgver=6.19.9.arch1 pkgrel=1 -pkgdesc='Linux with Panther Lake SDCA audio backports' +pkgdesc='Linux with Panther Lake hardware backports (SDCA audio, WiFi 7)' url='https://github.com/archlinux/linux' arch=( x86_64 @@ -42,6 +42,7 @@ source=( 0013-ASoC-SDCA-Add-regmap-defaults-for-specification-defi.patch 0014-ASoC-SDCA-Limit-values-user-can-write-to-Selected-Mo.patch 0017-ASoC-SDCA-Fix-NULL-pointer-dereference-in-sdca_jack_.patch + 0018-wifi-iwlwifi-mld-correctly-set-wifi-generation-data.patch ) source_x86_64=(config.x86_64) validpgpkeys=( @@ -54,7 +55,7 @@ b2sums=('6be41037c5b18e9a8d1c58fdd613e37bb5c841b7f43baf95516f3dda461adc6eb20da03 'edc6d11f32f16a53e520b53b52be690d192c0a64153419cbba65e4a2c0f426ce76ab2c10dbddd7f82f2c407c071039b05018796cf2b8ba501d46e3a259146ced' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP' 'SKIP' 'SKIP' 'SKIP') + 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') b2sums_x86_64=('cab93bd983d92e2fc6047bfaa3fc3b52fbd23272aef4aaa10500ac0ac26847c1bbdfdb13a6f64ad7689166109b99a078580bf43a02aaf9f2be0ae8885a87ffc8') # https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc @@ -63,7 +64,7 @@ sha256sums=('c16068a3af12e3943dee3b1eef57ca70229c069128bfa1184fb3f48b219d55bf' 'dacb94dc3be57fc442995a3d3d1519775d3f6877a4e2fec437223d95e318f04b' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' - 'SKIP' 'SKIP' 'SKIP' 'SKIP') + 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase @@ -107,6 +108,7 @@ _package() { coreutils initramfs kmod + sof-firmware ) optdepends=( "$pkgbase-headers: headers and scripts for building modules" diff --git a/pkgbuilds/edge/linux-ptl-audio/config.x86_64 b/pkgbuilds/edge/linux-ptl/config.x86_64 similarity index 100% rename from pkgbuilds/edge/linux-ptl-audio/config.x86_64 rename to pkgbuilds/edge/linux-ptl/config.x86_64