blob: 9f946f30c28bdf7e2477cde5b8aa6d63028db4a2 [file] [log] [blame]
developerce9e5092022-11-10 22:41:59 +08001diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
developerf0de14b2022-12-14 23:07:34 +08002index 58f07e1..e9a0dd3 100644
developerce9e5092022-11-10 22:41:59 +08003--- a/package/kernel/mac80211/Makefile
4+++ b/package/kernel/mac80211/Makefile
developerf0de14b2022-12-14 23:07:34 +08005@@ -20,6 +20,7 @@ PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
developerce9e5092022-11-10 22:41:59 +08006 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
7 PKG_BUILD_PARALLEL:=1
developer356ecec2022-11-14 10:25:04 +08008
developerce9e5092022-11-10 22:41:59 +08009+SOURCE_PATH:=./src
10 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
developer356ecec2022-11-14 10:25:04 +080011
developerce9e5092022-11-10 22:41:59 +080012 PKG_DRIVERS = \
developerf0de14b2022-12-14 23:07:34 +080013@@ -72,6 +73,10 @@ config-y:= \
developer6ec8e342022-11-21 18:47:15 +080014 WLAN_VENDOR_ST \
15 WLAN_VENDOR_TI \
16 WLAN_VENDOR_ZYDAS \
17+ MAC80211_DEBUG_MENU \
18+ MAC80211_MLME_DEBUG \
19+ MAC80211_STA_DEBUG \
20+ MAC80211_HT_DEBUG \
21
22 config-$(call config_package,cfg80211) += CFG80211
23 config-$(CONFIG_PACKAGE_CFG80211_TESTMODE) += NL80211_TESTMODE
developerf0de14b2022-12-14 23:07:34 +080024@@ -297,6 +302,8 @@ define Build/Prepare
developer356ecec2022-11-14 10:25:04 +080025 mkdir -p $(PKG_BUILD_DIR)
26 $(PKG_UNPACK)
27 $(Build/Patch)
28+ $(CP) $(SOURCE_PATH)/net $(PKG_BUILD_DIR) 2>/dev/null || :
29+ $(CP) $(SOURCE_PATH)/include $(PKG_BUILD_DIR) 2>/dev/null || :
30 rm -rf \
31 $(PKG_BUILD_DIR)/include/linux/ssb \
32 $(PKG_BUILD_DIR)/include/linux/bcma \
developer20d67712022-03-02 14:09:32 +080033diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
developerf0de14b2022-12-14 23:07:34 +080034index 0a7f787..4bae0bc 100644
developer20d67712022-03-02 14:09:32 +080035--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
36+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
developer8d77be32022-10-20 15:08:25 +080037@@ -144,9 +144,6 @@ mac80211_hostapd_setup_base() {
38 json_get_values ht_capab_list ht_capab
developer20d67712022-03-02 14:09:32 +080039 json_get_values channel_list channels
40
41- [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \
42- channel_list="$channel"
43-
developer9b3248d2022-07-06 00:44:05 +080044 [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
developer20d67712022-03-02 14:09:32 +080045
developer9b3248d2022-07-06 00:44:05 +080046 set_default noscan 0
developer8b04dfd2022-12-07 16:29:19 +080047@@ -315,7 +312,6 @@ mac80211_hostapd_setup_base() {
48 vht_link_adapt:3 \
49 vht160:2
50
51- set_default tx_burst 2.0
52 append base_cfg "ieee80211ac=1" "$N"
53 vht_cap=0
54 for cap in $(iw phy "$phy" info | awk -F "[()]" '/VHT Capabilities/ { print $2 }'); do
55@@ -484,6 +480,8 @@ mac80211_hostapd_setup_base() {
56 append base_cfg "he_mu_edca_ac_vo_timer=255" "$N"
57 fi
58
developer9851a292022-12-15 17:33:43 +080059+ set_default tx_burst 5.9
developer8b04dfd2022-12-07 16:29:19 +080060+
61 hostapd_prepare_device_config "$hostapd_conf_file" nl80211
62 cat >> "$hostapd_conf_file" <<EOF
63 ${channel:+channel=$channel}
developerf0de14b2022-12-14 23:07:34 +080064@@ -1058,6 +1056,9 @@ mac80211_setup_vif() {
65
66 json_select ..
67 [ -n "$failed" ] || wireless_add_vif "$name" "$ifname"
68+
69+ echo "Setup SMP Affinity"
70+ /sbin/smp-mt76.sh
71 }
72
73 get_freq() {
developer9b3248d2022-07-06 00:44:05 +080074diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
developerf0de14b2022-12-14 23:07:34 +080075index 3ecd932..438bf92 100644
developere2597ba2022-06-24 13:09:16 +080076--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
77+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
developer8d77be32022-10-20 15:08:25 +080078@@ -120,6 +120,13 @@ get_band_defaults() {
developere2597ba2022-06-24 13:09:16 +080079 mode_band="$band"
80 channel="$chan"
81 htmode="$mode"
82+ if [ "$band" = "6g" ]
83+ then
84+ encryption=sae
85+ key=12345678
86+ else
87+ encryption=none
88+ fi
89 done
90 }
91
developer8d77be32022-10-20 15:08:25 +080092@@ -162,6 +169,8 @@ detect_mac80211() {
developere2597ba2022-06-24 13:09:16 +080093 channel=""
94 htmode=""
95 ht_capab=""
96+ encryption=""
97+ key=""
98
99 get_band_defaults "$dev"
100
developer8d77be32022-10-20 15:08:25 +0800101@@ -206,8 +215,12 @@ detect_mac80211() {
102 set wireless.default_${name}.network=lan
103 set wireless.default_${name}.mode=ap
104 set wireless.default_${name}.ssid=OpenWrt
105- set wireless.default_${name}.encryption=none
106+ set wireless.default_${name}.encryption=${encryption}
107+
developere2597ba2022-06-24 13:09:16 +0800108 EOF
109+ [ -n "$key" ] && {
developer8d77be32022-10-20 15:08:25 +0800110+ uci -q set wireless.default_${name}.key=${key}
developere2597ba2022-06-24 13:09:16 +0800111+ }
112 uci -q commit wireless
developer8d77be32022-10-20 15:08:25 +0800113 done
114 }
developerf0de14b2022-12-14 23:07:34 +0800115--
1162.36.1
117