diff -Nru backport-iwlwifi-dkms-9904/debian/changelog backport-iwlwifi-dkms-9904/debian/changelog --- backport-iwlwifi-dkms-9904/debian/changelog 2022-10-24 18:19:51.000000000 +0000 +++ backport-iwlwifi-dkms-9904/debian/changelog 2023-01-24 17:15:13.000000000 +0000 @@ -1,3 +1,10 @@ +backport-iwlwifi-dkms (9904-0ubuntu3.2) lunar; urgency=medium + + * Support linux 6.1 (LP: #2003808): + - d/p/0020-support-linux-6.1.patch + + -- Andrea Righi Tue, 24 Jan 2023 17:15:13 +0000 + backport-iwlwifi-dkms (9904-0ubuntu3.1) kinetic-security; urgency=medium * SECURITY UPDATE: Multiple security issues diff -Nru backport-iwlwifi-dkms-9904/debian/patches/0020-support-linux-6.1.patch backport-iwlwifi-dkms-9904/debian/patches/0020-support-linux-6.1.patch --- backport-iwlwifi-dkms-9904/debian/patches/0020-support-linux-6.1.patch 1970-01-01 00:00:00.000000000 +0000 +++ backport-iwlwifi-dkms-9904/debian/patches/0020-support-linux-6.1.patch 2023-01-24 17:14:16.000000000 +0000 @@ -0,0 +1,105 @@ +From: Andrea Righi +Subject: support linux 6.1 ABI + +Index: backport-iwlwifi-dkms-9904/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +=================================================================== +--- backport-iwlwifi-dkms-9904.orig/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c ++++ backport-iwlwifi-dkms-9904/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +@@ -4,6 +4,7 @@ + * Copyright (C) 2013-2014 Intel Mobile Communications GmbH + * Copyright (C) 2015-2017 Intel Deutschland GmbH + */ ++#include + #include + #include + #include +@@ -1162,7 +1163,11 @@ static void iwl_mvm_mac_ctxt_cmd_fill_ap + iwl_mvm_mac_ap_iterator, &data); + + if (data.beacon_device_ts) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++ u32 rand = (get_random_u32() % (64 - 36)) + 36; ++#else + u32 rand = (prandom_u32() % (64 - 36)) + 36; ++#endif + mvmvif->ap_beacon_time = data.beacon_device_ts + + ieee80211_tu_to_usec(data.beacon_int * rand / + 100); +Index: backport-iwlwifi-dkms-9904/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +=================================================================== +--- backport-iwlwifi-dkms-9904.orig/drivers/net/wireless/intel/iwlwifi/pcie/rx.c ++++ backport-iwlwifi-dkms-9904/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +@@ -4,6 +4,7 @@ + * Copyright (C) 2013-2015 Intel Mobile Communications GmbH + * Copyright (C) 2016-2017 Intel Deutschland GmbH + */ ++#include + #include + #include + #include +@@ -1108,8 +1109,13 @@ static int _iwl_pcie_rx_init(struct iwl_ + if (trans_pcie->msix_enabled) + poll = iwl_pcie_napi_poll_msix; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++ netif_napi_add(&trans_pcie->napi_dev, &rxq->napi, ++ poll); ++#else + netif_napi_add(&trans_pcie->napi_dev, &rxq->napi, + poll, NAPI_POLL_WEIGHT); ++#endif + napi_enable(&rxq->napi); + } + } +Index: backport-iwlwifi-dkms-9904/net/mac80211/rc80211_minstrel_ht.c +=================================================================== +--- backport-iwlwifi-dkms-9904.orig/net/mac80211/rc80211_minstrel_ht.c ++++ backport-iwlwifi-dkms-9904/net/mac80211/rc80211_minstrel_ht.c +@@ -3,6 +3,7 @@ + * Copyright (C) 2010-2013 Felix Fietkau + * Copyright (C) 2019-2021 Intel Corporation + */ ++#include + #include + #include + #include +@@ -1906,7 +1907,11 @@ static void __init init_sample_table(voi + + memset(sample_table, 0xff, sizeof(sample_table)); + for (col = 0; col < SAMPLE_COLUMNS; col++) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++ get_random_bytes(rnd, sizeof(rnd)); ++#else + prandom_bytes(rnd, sizeof(rnd)); ++#endif + for (i = 0; i < MCS_GROUP_RATES; i++) { + new_idx = (i + rnd[i]) % MCS_GROUP_RATES; + while (sample_table[col][new_idx] != 0xff) +Index: backport-iwlwifi-dkms-9904/net/mac80211/rx.c +=================================================================== +--- backport-iwlwifi-dkms-9904.orig/net/mac80211/rx.c ++++ backport-iwlwifi-dkms-9904/net/mac80211/rx.c +@@ -49,7 +49,11 @@ static struct sk_buff *ieee80211_clean_s + + if (present_fcs_len) + __pskb_trim(skb, skb->len - present_fcs_len); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++ pskb_pull(skb, rtap_space); ++#else + __pskb_pull(skb, rtap_space); ++#endif + + hdr = (void *)skb->data; + fc = hdr->frame_control; +@@ -74,7 +78,11 @@ static struct sk_buff *ieee80211_clean_s + + memmove(skb->data + IEEE80211_HT_CTL_LEN, skb->data, + hdrlen - IEEE80211_HT_CTL_LEN); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,1,0) ++ pskb_pull(skb, IEEE80211_HT_CTL_LEN); ++#else + __pskb_pull(skb, IEEE80211_HT_CTL_LEN); ++#endif + + return skb; + } diff -Nru backport-iwlwifi-dkms-9904/debian/patches/series backport-iwlwifi-dkms-9904/debian/patches/series --- backport-iwlwifi-dkms-9904/debian/patches/series 2022-10-24 18:19:51.000000000 +0000 +++ backport-iwlwifi-dkms-9904/debian/patches/series 2023-01-24 17:14:06.000000000 +0000 @@ -16,3 +16,4 @@ 0007-UBUNTU-SAUCE-wifi-mac80211_hwsim-avoid-mac80211-warn.patch 0008-UBUNTU-SAUCE-wifi-mac80211-fix-crash-in-beacon-prote.patch 0009-UBUNTU-SAUCE-wifi-cfg80211-update-hidden-BSSes-to-av.patch +0020-support-linux-6.1.patch