mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
mac80211: add loongarch64 and kernle 6.6 support
This commit is contained in:
parent
f1803bc468
commit
c24837295d
@ -0,0 +1,113 @@
|
||||
--- a/net/wireless/sysfs.c
|
||||
+++ b/net/wireless/sysfs.c
|
||||
@@ -165,12 +165,21 @@
|
||||
#define WIPHY_PM_OPS NULL
|
||||
#endif
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
+static const void *wiphy_namespace(const struct device *d)
|
||||
+{
|
||||
+ struct wiphy *wiphy = container_of(d, struct wiphy, dev);
|
||||
+
|
||||
+ return wiphy_net(wiphy);
|
||||
+}
|
||||
+#else
|
||||
static const void *wiphy_namespace(struct device *d)
|
||||
{
|
||||
struct wiphy *wiphy = container_of(d, struct wiphy, dev);
|
||||
|
||||
return wiphy_net(wiphy);
|
||||
}
|
||||
+#endif
|
||||
|
||||
struct class ieee80211_class = {
|
||||
.name = "ieee80211",
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -16175,8 +16175,14 @@
|
||||
#undef SELECTOR
|
||||
};
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
+static int nl80211_pre_doit(const struct genl_split_ops *ops,
|
||||
+ struct sk_buff *skb,
|
||||
+ struct genl_info *info)
|
||||
+#else
|
||||
static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
|
||||
struct genl_info *info)
|
||||
+#endif
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = NULL;
|
||||
struct wireless_dev *wdev = NULL;
|
||||
@@ -16276,8 +16282,14 @@
|
||||
return err;
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
+static void nl80211_post_doit(const struct genl_split_ops *ops,
|
||||
+ struct sk_buff *skb,
|
||||
+ struct genl_info *info)
|
||||
+#else
|
||||
static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
|
||||
struct genl_info *info)
|
||||
+#endif
|
||||
{
|
||||
u32 internal_flags = nl80211_internal_flags[ops->internal_flags];
|
||||
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <asm/unaligned.h>
|
||||
#include <net/fq_impl.h>
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
+#include <net/gso.h>
|
||||
+#endif
|
||||
+
|
||||
#include "ieee80211_i.h"
|
||||
#include "driver-ops.h"
|
||||
#include "led.h"
|
||||
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
|
||||
@@ -10,6 +10,10 @@
|
||||
#include <net/ip.h>
|
||||
#include <net/ipv6.h>
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
|
||||
+#include <net/gso.h>
|
||||
+#endif
|
||||
+
|
||||
#include "iwl-trans.h"
|
||||
#include "iwl-eeprom-parse.h"
|
||||
#include "mvm.h"
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -1468,6 +1468,7 @@
|
||||
RX_ENC_HT,
|
||||
RX_ENC_VHT,
|
||||
RX_ENC_HE,
|
||||
+ RX_ENC_EHT,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1530,8 +1531,18 @@
|
||||
u32 flag;
|
||||
u16 freq: 13, freq_offset: 1;
|
||||
u8 enc_flags;
|
||||
- u8 encoding:2, bw:3, he_ru:3;
|
||||
- u8 he_gi:2, he_dcm:1;
|
||||
+ u8 encoding:3, bw:4;
|
||||
+ union {
|
||||
+ struct {
|
||||
+ u8 he_ru:3;
|
||||
+ u8 he_gi:2;
|
||||
+ u8 he_dcm:1;
|
||||
+ };
|
||||
+ struct {
|
||||
+ u8 ru:4;
|
||||
+ u8 gi:2;
|
||||
+ } eht;
|
||||
+ };
|
||||
u8 rate_idx;
|
||||
u8 nss;
|
||||
u8 rx_flags;
|
@ -141,7 +141,7 @@ ifneq ($(LOCAL_TYPE),hostapd)
|
||||
endif
|
||||
endif
|
||||
|
||||
DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
|
||||
DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +kmod-cfg80211
|
||||
|
||||
|
||||
define Package/hostapd/Default
|
||||
|
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
||||
ARCH:=loongarch64
|
||||
BOARD:=loongarch64
|
||||
BOARDNAME:=Loongson LoongArch
|
||||
FEATURES:=audio display ext4 pcie boot-part rootfs-part rtc usb targz
|
||||
FEATURES:=audio display squashfs ext4 pcie boot-part rootfs-part rtc usb targz
|
||||
|
||||
KERNEL_PATCHVER:=6.6
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user