blob: c281714082e3c3d0cb0a83cee9f7a4544d3735df [file] [log] [blame]
developer98f3c3c2022-11-10 22:41:59 +08001diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
developer9ead8ed2022-11-21 18:47:15 +08002index ec35bf6..d507de9 100644
developer98f3c3c2022-11-10 22:41:59 +08003--- a/package/kernel/mac80211/Makefile
4+++ b/package/kernel/mac80211/Makefile
5@@ -19,6 +19,7 @@ PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
6 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
7 PKG_BUILD_PARALLEL:=1
developer293afb52022-11-14 10:25:04 +08008
developer98f3c3c2022-11-10 22:41:59 +08009+SOURCE_PATH:=./src
10 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
developer293afb52022-11-14 10:25:04 +080011
developer98f3c3c2022-11-10 22:41:59 +080012 PKG_DRIVERS = \
developer9ead8ed2022-11-21 18:47:15 +080013@@ -71,6 +72,10 @@ config-y:= \
14 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
24@@ -296,6 +301,8 @@ define Build/Prepare
developer293afb52022-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 \
developer8ac97122022-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
developer9ead8ed2022-11-21 18:47:15 +080034index ed28052..a055005 100644
developer8ac97122022-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
developer5f5952d2022-10-20 15:08:25 +080037@@ -144,9 +144,6 @@ mac80211_hostapd_setup_base() {
38 json_get_values ht_capab_list ht_capab
developer8ac97122022-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-
developerd3c708b2022-07-06 00:44:05 +080044 [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power"
developer8ac97122022-03-02 14:09:32 +080045
developerd3c708b2022-07-06 00:44:05 +080046 set_default noscan 0
developerd3c708b2022-07-06 00:44:05 +080047diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
developer9ead8ed2022-11-21 18:47:15 +080048index 3ecd932..438bf92 100644
developer92f0d542022-06-24 13:09:16 +080049--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
50+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
developer5f5952d2022-10-20 15:08:25 +080051@@ -120,6 +120,13 @@ get_band_defaults() {
developer92f0d542022-06-24 13:09:16 +080052 mode_band="$band"
53 channel="$chan"
54 htmode="$mode"
55+ if [ "$band" = "6g" ]
56+ then
57+ encryption=sae
58+ key=12345678
59+ else
60+ encryption=none
61+ fi
62 done
63 }
64
developer5f5952d2022-10-20 15:08:25 +080065@@ -162,6 +169,8 @@ detect_mac80211() {
developer92f0d542022-06-24 13:09:16 +080066 channel=""
67 htmode=""
68 ht_capab=""
69+ encryption=""
70+ key=""
71
72 get_band_defaults "$dev"
73
developer5f5952d2022-10-20 15:08:25 +080074@@ -206,8 +215,12 @@ detect_mac80211() {
75 set wireless.default_${name}.network=lan
76 set wireless.default_${name}.mode=ap
77 set wireless.default_${name}.ssid=OpenWrt
78- set wireless.default_${name}.encryption=none
79+ set wireless.default_${name}.encryption=${encryption}
80+
developer92f0d542022-06-24 13:09:16 +080081 EOF
82+ [ -n "$key" ] && {
developer5f5952d2022-10-20 15:08:25 +080083+ uci -q set wireless.default_${name}.key=${key}
developer92f0d542022-06-24 13:09:16 +080084+ }
85 uci -q commit wireless
developer5f5952d2022-10-20 15:08:25 +080086 done
87 }
developer8ac97122022-03-02 14:09:32 +080088--
developer9ead8ed2022-11-21 18:47:15 +0800892.36.1
developer8ac97122022-03-02 14:09:32 +080090