From 9d899621bc784af194c0beff9588a01d571ec175 Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Sat, 2 Sep 2023 23:01:19 +0000 Subject: [PATCH 2/3] Fix compilation on 6.1 kernel Changes are based on https://github.com/fifteenhex/xradio/commit/005f28cfe9e20b7f2dfd9d32d38ee97060dc707f.patch --- drivers/net/wireless/xradio/ap.c | 4 ++++ drivers/net/wireless/xradio/wsm.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/wireless/xradio/ap.c b/drivers/net/wireless/xradio/ap.c index 17eb5132ee84..d4ec6c88d7b3 100644 --- a/drivers/net/wireless/xradio/ap.c +++ b/drivers/net/wireless/xradio/ap.c @@ -1145,7 +1145,11 @@ static int xradio_upload_null(struct xradio_vif *priv) .rate = 0xFF, }; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif, 0, false); +#else frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false); +#endif if (WARN_ON(!frame.skb)) return -ENOMEM; diff --git a/drivers/net/wireless/xradio/wsm.c b/drivers/net/wireless/xradio/wsm.c index 3bf8bfde5b89..5961acec786a 100644 --- a/drivers/net/wireless/xradio/wsm.c +++ b/drivers/net/wireless/xradio/wsm.c @@ -2616,7 +2616,11 @@ static int xradio_get_prio_queue(struct xradio_vif *priv, edca = &priv->edca.params[i]; score = ((edca->aifns + edca->cwMin) << 16) + (edca->cwMax - edca->cwMin) * +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) + (get_random_u32() & 0xFFFF); +#else (prandom_u32() & 0xFFFF); +#endif if (score < best && (winner < 0 || i != 3)) { best = score; winner = i; -- 2.34.1