armbian_build/patch/misc/wireless-xradio-5.19.patch
Gunjan Gupta 46e756540e xradio: fix compilation for 6.1+
Also added some cleanup fixes to silence some of the compiler warnings,
fixes for issues during inserting and removing xradio module and fixes
for possible data corruption on vmmaped stack.

All of these fixes were taken from https://github.com/fifteenhex/xradio
2023-09-04 14:37:10 +02:00

35 lines
1.4 KiB
Diff

From 986953136919131542184ea9f01aa76b0f089d3d Mon Sep 17 00:00:00 2001
From: root <Gunjan Gupta>
Date: Sun, 3 Sep 2023 00:18:53 +0000
Subject: [PATCH] Fix compilation on 5.19 kernel
Changes are from
https://github.com/fifteenhex/xradio/commit/e64ac79f417f85cadfa795c53b4591fd4aaf0f72.patch
---
drivers/net/wireless/xradio/ap.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/xradio/ap.c b/drivers/net/wireless/xradio/ap.c
index d047544fbf7e..f803f58ce10c 100644
--- a/drivers/net/wireless/xradio/ap.c
+++ b/drivers/net/wireless/xradio/ap.c
@@ -492,9 +492,15 @@ void xradio_bss_info_changed(struct ieee80211_hw *dev,
/* TODO:COMBO:Change this once
* mac80211 changes are available */
BUG_ON(!hw_priv->channel);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)
+ hw_priv->ht_oper.ht_cap = sta->deflink.ht_cap;
+ priv->bss_params.operationalRateSet =__cpu_to_le32(
+ xradio_rate_mask_to_wsm(hw_priv, sta->deflink.supp_rates[hw_priv->channel->band]));
+#else
hw_priv->ht_oper.ht_cap = sta->ht_cap;
priv->bss_params.operationalRateSet =__cpu_to_le32(
xradio_rate_mask_to_wsm(hw_priv, sta->supp_rates[hw_priv->channel->band]));
+#endif
/* TODO by Icenowy: I think this may lead to some problems. */
// hw_priv->ht_oper.channel_type = info->channel_type;
hw_priv->ht_oper.operation_mode = info->ht_operation_mode;
--
2.34.1