developer | 98f3c3c | 2022-11-10 22:41:59 +0800 | [diff] [blame] | 1 | diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 2 | index b7059fe6..62c13eb2 100644 |
developer | 98f3c3c | 2022-11-10 22:41:59 +0800 | [diff] [blame] | 3 | --- a/package/kernel/mac80211/Makefile |
| 4 | +++ b/package/kernel/mac80211/Makefile |
developer | b95b0fd | 2022-12-14 23:07:34 +0800 | [diff] [blame] | 5 | @@ -20,6 +20,7 @@ PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz |
developer | 98f3c3c | 2022-11-10 22:41:59 +0800 | [diff] [blame] | 6 | PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) |
| 7 | PKG_BUILD_PARALLEL:=1 |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 8 | |
developer | 98f3c3c | 2022-11-10 22:41:59 +0800 | [diff] [blame] | 9 | +SOURCE_PATH:=./src |
| 10 | PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 11 | |
developer | 98f3c3c | 2022-11-10 22:41:59 +0800 | [diff] [blame] | 12 | PKG_DRIVERS = \ |
developer | b95b0fd | 2022-12-14 23:07:34 +0800 | [diff] [blame] | 13 | @@ -72,6 +73,10 @@ config-y:= \ |
developer | 9ead8ed | 2022-11-21 18:47:15 +0800 | [diff] [blame] | 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 |
developer | b95b0fd | 2022-12-14 23:07:34 +0800 | [diff] [blame] | 24 | @@ -297,6 +302,8 @@ define Build/Prepare |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 25 | 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 \ |
developer | 8ac9712 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 33 | diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 34 | index 5aaba9af..ac23b3ae 100644 |
developer | 8ac9712 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 35 | --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
| 36 | +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 37 | @@ -144,9 +144,6 @@ mac80211_hostapd_setup_base() { |
| 38 | json_get_values ht_capab_list ht_capab |
developer | 8ac9712 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 39 | json_get_values channel_list channels |
| 40 | |
| 41 | - [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \ |
| 42 | - channel_list="$channel" |
| 43 | - |
developer | d3c708b | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 44 | [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power" |
developer | 8ac9712 | 2022-03-02 14:09:32 +0800 | [diff] [blame] | 45 | |
developer | d3c708b | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 46 | set_default noscan 0 |
developer | 5af1935 | 2022-12-07 16:29:19 +0800 | [diff] [blame] | 47 | @@ -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 | |
developer | 0d06176 | 2022-12-15 17:33:43 +0800 | [diff] [blame] | 59 | + set_default tx_burst 5.9 |
developer | 5af1935 | 2022-12-07 16:29:19 +0800 | [diff] [blame] | 60 | + |
| 61 | hostapd_prepare_device_config "$hostapd_conf_file" nl80211 |
| 62 | cat >> "$hostapd_conf_file" <<EOF |
| 63 | ${channel:+channel=$channel} |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 64 | @@ -517,7 +515,7 @@ mac80211_hostapd_setup_bss() { |
| 65 | append hostapd_cfg "wds_sta=1" "$N" |
| 66 | [ -n "$wds_bridge" ] && append hostapd_cfg "wds_bridge=$wds_bridge" "$N" |
| 67 | } |
| 68 | - [ "$staidx" -gt 0 -o "$start_disabled" -eq 1 ] && append hostapd_cfg "start_disabled=1" "$N" |
| 69 | + [ "$start_disabled" -eq 1 ] && append hostapd_cfg "start_disabled=1" "$N" |
| 70 | |
| 71 | cat >> /var/run/hostapd-$phy.conf <<EOF |
| 72 | $hostapd_cfg |
developer | b95b0fd | 2022-12-14 23:07:34 +0800 | [diff] [blame] | 73 | @@ -1058,6 +1056,9 @@ mac80211_setup_vif() { |
| 74 | |
| 75 | json_select .. |
| 76 | [ -n "$failed" ] || wireless_add_vif "$name" "$ifname" |
| 77 | + |
| 78 | + echo "Setup SMP Affinity" |
| 79 | + /sbin/smp-mt76.sh |
| 80 | } |
| 81 | |
| 82 | get_freq() { |
developer | d3c708b | 2022-07-06 00:44:05 +0800 | [diff] [blame] | 83 | diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 84 | index e24a2a63..10a3f8b4 100644 |
developer | 92f0d54 | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 85 | --- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
| 86 | +++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 87 | @@ -120,6 +120,13 @@ get_band_defaults() { |
developer | 92f0d54 | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 88 | mode_band="$band" |
| 89 | channel="$chan" |
| 90 | htmode="$mode" |
| 91 | + if [ "$band" = "6g" ] |
| 92 | + then |
| 93 | + encryption=sae |
| 94 | + key=12345678 |
| 95 | + else |
| 96 | + encryption=none |
| 97 | + fi |
| 98 | done |
| 99 | } |
| 100 | |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 101 | @@ -162,6 +169,8 @@ detect_mac80211() { |
developer | 92f0d54 | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 102 | channel="" |
| 103 | htmode="" |
| 104 | ht_capab="" |
| 105 | + encryption="" |
| 106 | + key="" |
| 107 | |
| 108 | get_band_defaults "$dev" |
| 109 | |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 110 | @@ -210,8 +219,12 @@ detect_mac80211() { |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 111 | set wireless.default_${name}.network=lan |
| 112 | set wireless.default_${name}.mode=ap |
| 113 | set wireless.default_${name}.ssid=OpenWrt |
| 114 | - set wireless.default_${name}.encryption=none |
| 115 | + set wireless.default_${name}.encryption=${encryption} |
| 116 | + |
developer | 92f0d54 | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 117 | EOF |
| 118 | + [ -n "$key" ] && { |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 119 | + uci -q set wireless.default_${name}.key=${key} |
developer | 92f0d54 | 2022-06-24 13:09:16 +0800 | [diff] [blame] | 120 | + } |
| 121 | uci -q commit wireless |
developer | 5f5952d | 2022-10-20 15:08:25 +0800 | [diff] [blame] | 122 | done |
| 123 | } |
developer | f16b916 | 2023-02-23 10:32:51 +0800 | [diff] [blame] | 124 | diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh |
developer | 8ce7856 | 2023-02-24 16:10:53 +0800 | [diff] [blame^] | 125 | index 8c233a4e..f2d4ad3d 100644 |
developer | f16b916 | 2023-02-23 10:32:51 +0800 | [diff] [blame] | 126 | --- a/package/network/services/hostapd/files/hostapd.sh |
| 127 | +++ b/package/network/services/hostapd/files/hostapd.sh |
| 128 | @@ -1573,6 +1573,11 @@ wpa_supplicant_add_network() { |
| 129 | append network_data "mcast_rate=$mc_rate" "$N$T" |
| 130 | } |
| 131 | |
| 132 | + if [ "$auth_type" = "sae" ]; then |
| 133 | + json_get_vars sae_pwe sae_pwe |
| 134 | + [ -n "$sae_pwe" ] && echo "sae_pwe=$sae_pwe" >> "$_config" |
| 135 | + fi |
| 136 | + |
| 137 | if [ "$key_mgmt" = "WPS" ]; then |
| 138 | echo "wps_cred_processing=1" >> "$_config" |
| 139 | else |