package/mt76: upgrade to 2022-09-06
support mt7621 ap mode
This commit is contained in:
parent
95929f1e97
commit
4394f72161
@ -1,16 +1,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mt76
|
||||
PKG_RELEASE=4
|
||||
PKG_RELEASE=5
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-12-03
|
||||
PKG_SOURCE_VERSION:=678071ef70297b7264661c356ddb3c8cf7f3c87b
|
||||
PKG_MIRROR_HASH:=b1f8613f7c65ca6a893f83ed9efc3f7ce72b9b4904fd11b89264f57f4f2a3b5e
|
||||
PKG_SOURCE_DATE:=2022-09-06
|
||||
PKG_SOURCE_VERSION:=d70546462b7b51ebc2bcdd5c534fdf3465be62a4
|
||||
PKG_MIRROR_HASH:=3d6b68d70a78c0072ed10ab2548344b6b3a70ad99e4edc258fafa16886f4abf9
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_USE_NINJA:=0
|
||||
@ -221,22 +221,42 @@ endef
|
||||
define KernelPackage/mt7915e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7915e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7915e)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7916-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
DEPENDS+=+kmod-mt7915e
|
||||
TITLE:=MediaTek MT7916 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-firmware
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921 firmware
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-common
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7615 wireless driver common code
|
||||
HIDDEN:=1
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac
|
||||
DEPENDS+=+kmod-mt76-connac +kmod-mt7921-firmware +@DRIVER_11AX_SUPPORT
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921-common.ko
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921u
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921U wireless driver
|
||||
DEPENDS+=+kmod-mt76-usb +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921u.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7921u)
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921s
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921s wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-mt76-sdio +kmod-mt7921-common
|
||||
TITLE:=MediaTek MT7921S wireless driver
|
||||
DEPENDS+=+kmod-mt76-sdio +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921s.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7921s)
|
||||
endef
|
||||
@ -244,7 +264,7 @@ endef
|
||||
define KernelPackage/mt7921e
|
||||
$(KernelPackage/mt76-default)
|
||||
TITLE:=MediaTek MT7921e wireless driver
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-mt7921-common
|
||||
DEPENDS+=@PCI_SUPPORT +kmod-mt7921-common
|
||||
FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921e.ko
|
||||
AUTOLOAD:=$(call AutoProbe,mt7921e)
|
||||
endef
|
||||
@ -338,6 +358,9 @@ endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921-common
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921u
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921U=m
|
||||
endif
|
||||
ifdef CONFIG_PACKAGE_kmod-mt7921s
|
||||
PKG_MAKE_FLAGS += CONFIG_MT7921S=m
|
||||
endif
|
||||
@ -438,7 +461,16 @@ define KernelPackage/mt7915e/install
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921e/install
|
||||
define KernelPackage/mt7916-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
|
||||
$(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
|
||||
$(1)/lib/firmware/mediatek
|
||||
endef
|
||||
|
||||
define KernelPackage/mt7921-firmware/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/mediatek
|
||||
cp \
|
||||
$(PKG_BUILD_DIR)/firmware/WIFI_MT7961_patch_mcu_1_2_hdr.bin \
|
||||
@ -473,7 +505,10 @@ $(eval $(call KernelPackage,mt7663-usb-sdio))
|
||||
$(eval $(call KernelPackage,mt7663u))
|
||||
$(eval $(call KernelPackage,mt7663s))
|
||||
$(eval $(call KernelPackage,mt7915e))
|
||||
$(eval $(call KernelPackage,mt7916-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-firmware))
|
||||
$(eval $(call KernelPackage,mt7921-common))
|
||||
$(eval $(call KernelPackage,mt7921u))
|
||||
$(eval $(call KernelPackage,mt7921s))
|
||||
$(eval $(call KernelPackage,mt7921e))
|
||||
$(eval $(call KernelPackage,mt76))
|
||||
|
||||
103
package/kernel/mt76/patches/201-backport-for-old-nl80211.patch
Normal file
103
package/kernel/mt76/patches/201-backport-for-old-nl80211.patch
Normal file
@ -0,0 +1,103 @@
|
||||
This patch just for compatible with old package/mac80211, should be deleted on package/mac80211 upgraded
|
||||
Index: b/mt7915/init.c
|
||||
===================================================================
|
||||
--- a/mt7915/init.c
|
||||
+++ b/mt7915/init.c
|
||||
@@ -322,7 +322,6 @@ static void
|
||||
mt7915_init_wiphy(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct mt7915_phy *phy = mt7915_hw_phy(hw);
|
||||
- struct mt76_dev *mdev = &phy->dev->mt76;
|
||||
struct wiphy *wiphy = hw->wiphy;
|
||||
struct mt7915_dev *dev = phy->dev;
|
||||
|
||||
@@ -343,7 +342,6 @@ mt7915_init_wiphy(struct ieee80211_hw *h
|
||||
wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
|
||||
wiphy->reg_notifier = mt7915_regd_notifier;
|
||||
wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
- wiphy->mbssid_max_interfaces = 16;
|
||||
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BSS_COLOR);
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
|
||||
@@ -354,11 +352,6 @@ mt7915_init_wiphy(struct ieee80211_hw *h
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
|
||||
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_FILS_DISCOVERY);
|
||||
|
||||
- if (!mdev->dev->of_node ||
|
||||
- !of_property_read_bool(mdev->dev->of_node,
|
||||
- "mediatek,disable-radar-background"))
|
||||
- wiphy_ext_feature_set(wiphy,
|
||||
- NL80211_EXT_FEATURE_RADAR_BACKGROUND);
|
||||
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
ieee80211_hw_set(hw, SUPPORTS_TX_ENCAP_OFFLOAD);
|
||||
Index: b/mt76_connac_mcu.c
|
||||
===================================================================
|
||||
--- a/mt76_connac_mcu.c
|
||||
+++ b/mt76_connac_mcu.c
|
||||
@@ -2686,9 +2686,8 @@ int mt76_connac_mcu_bss_basic_tlv(struct
|
||||
case NL80211_IFTYPE_AP:
|
||||
if (ieee80211_hw_check(phy->hw, SUPPORTS_MULTI_BSSID)) {
|
||||
u8 bssid_id = vif->bss_conf.bssid_indicator;
|
||||
- struct wiphy *wiphy = phy->hw->wiphy;
|
||||
|
||||
- if (bssid_id > ilog2(wiphy->mbssid_max_interfaces))
|
||||
+ if (bssid_id > 4)
|
||||
return -EINVAL;
|
||||
|
||||
bss->non_tx_bssid = vif->bss_conf.bssid_index;
|
||||
Index: b/mt7915/main.c
|
||||
===================================================================
|
||||
--- a/mt7915/main.c
|
||||
+++ b/mt7915/main.c
|
||||
@@ -1468,7 +1468,6 @@ const struct ieee80211_ops mt7915_ops =
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
.sta_add_debugfs = mt7915_sta_add_debugfs,
|
||||
#endif
|
||||
- .set_radar_background = mt7915_set_radar_background,
|
||||
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
||||
.net_fill_forward_path = mt7915_net_fill_forward_path,
|
||||
#endif
|
||||
Index: b/mt7915/mcu.c
|
||||
===================================================================
|
||||
--- a/mt7915/mcu.c
|
||||
+++ b/mt7915/mcu.c
|
||||
@@ -265,12 +265,7 @@ mt7915_mcu_rx_radar_detected(struct mt79
|
||||
if ((r->band_idx && !dev->phy.band_idx) && dev->mt76.phys[MT_BAND1])
|
||||
mphy = dev->mt76.phys[MT_BAND1];
|
||||
|
||||
- if (r->band_idx == MT_RX_SEL2)
|
||||
- cfg80211_background_radar_event(mphy->hw->wiphy,
|
||||
- &dev->rdd2_chandef,
|
||||
- GFP_ATOMIC);
|
||||
- else
|
||||
- ieee80211_radar_detected(mphy->hw);
|
||||
+ ieee80211_radar_detected(mphy->hw);
|
||||
dev->hw_pattern++;
|
||||
}
|
||||
|
||||
@@ -1726,6 +1721,7 @@ mt7915_mcu_beacon_cntdwn(struct ieee8021
|
||||
info->cnt = skb->data[offs->cntdwn_counter_offs[0]];
|
||||
}
|
||||
|
||||
+#if 0
|
||||
static void
|
||||
mt7915_mcu_beacon_mbss(struct sk_buff *rskb, struct sk_buff *skb,
|
||||
struct ieee80211_vif *vif, struct bss_info_bcn *bcn,
|
||||
@@ -1781,6 +1777,8 @@ mt7915_mcu_beacon_mbss(struct sk_buff *r
|
||||
}
|
||||
}
|
||||
|
||||
+#endif
|
||||
+
|
||||
static void
|
||||
mt7915_mcu_beacon_cont(struct mt7915_dev *dev, struct ieee80211_vif *vif,
|
||||
struct sk_buff *rskb, struct sk_buff *skb,
|
||||
@@ -2007,7 +2005,6 @@ int mt7915_mcu_add_beacon(struct ieee802
|
||||
mt7915_mcu_beacon_check_caps(phy, vif, skb);
|
||||
|
||||
mt7915_mcu_beacon_cntdwn(vif, rskb, skb, bcn, &offs);
|
||||
- mt7915_mcu_beacon_mbss(rskb, skb, vif, bcn, &offs);
|
||||
mt7915_mcu_beacon_cont(dev, vif, rskb, skb, bcn, &offs);
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user