mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From cc885ed1dcebcdb063167888e79845328ed60703 Mon Sep 17 00:00:00 2001
|
|
From: W_Y_CPP <383152993@qq.com>
|
|
Date: Wed, 22 Feb 2023 21:57:39 +0900
|
|
Subject: [PATCH] fix build with kernel 6.1
|
|
|
|
---
|
|
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
|
|
index e6001a5..b4e222c 100644
|
|
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
|
|
@@ -1099,7 +1099,11 @@ static void iwl_mvm_mac_ctxt_cmd_fill_ap(struct iwl_mvm *mvm,
|
|
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);
|
|
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
|
|
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
|
|
@@ -1097,9 +1097,13 @@ static int _iwl_pcie_rx_init(struct iwl_trans *trans)
|
|
|
|
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, NAPI_POLL_WEIGHT);
|
|
+#else
|
|
+ netif_napi_add_weight(&trans_pcie->napi_dev, &rxq->napi,
|
|
+ poll, NAPI_POLL_WEIGHT);
|
|
+#endif
|
|
napi_enable(&rxq->napi);
|
|
}
|
|
|
|
--
|
|
2.17.1
|
|
|