mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
improve siflower starget
This commit is contained in:
parent
f6abe74dca
commit
1b6431ad5e
@ -1,15 +1,15 @@
|
||||
From 350821edddad89fd53f9dcc99504b9cd645d2373 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Thu, 27 May 2021 15:53:56 +0800
|
||||
From 17a81861cb8199a86fb7141d9c1101dda470ab09 Mon Sep 17 00:00:00 2001
|
||||
From: Yejiang Luo <luoyejiang@gl-inet.com>
|
||||
Date: Thu, 10 Jun 2021 14:21:37 +0800
|
||||
Subject: [PATCH] fix: use openwrt18.06 feeds
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
Signed-off-by: Yejiang Luo <luoyejiang@gl-inet.com>
|
||||
---
|
||||
openwrt-18.06/feeds.conf.default | 14 +++++---------
|
||||
1 file changed, 5 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/openwrt-18.06/feeds.conf.default b/openwrt-18.06/feeds.conf.default
|
||||
index da6c665..4d2c147 100644
|
||||
index da6c665..3bb472e 100644
|
||||
--- a/openwrt-18.06/feeds.conf.default
|
||||
+++ b/openwrt-18.06/feeds.conf.default
|
||||
@@ -1,9 +1,5 @@
|
||||
@ -22,7 +22,7 @@ index da6c665..4d2c147 100644
|
||||
-#src-git management https://github.com/openwrt-management/packages.git
|
||||
-#src-git oldpackages http://git.openwrt.org/packages.git
|
||||
-#src-link custom /usr/src/openwrt/custom-feed
|
||||
+src-git gli_pub https://github.com/gl-inet/gli-pub.git
|
||||
+src-git gl https://github.com/gl-inet/gl-feeds.git;18.06
|
||||
+src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5
|
||||
+src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913
|
||||
+src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 9d67fc4c5fcc2944b8778a9adfe631b5284fe64f Mon Sep 17 00:00:00 2001
|
||||
From: Yejiang Luo <luoyejiang@gl-inet.com>
|
||||
Date: Tue, 1 Jun 2021 14:08:12 +0800
|
||||
Subject: [PATCH] remove unuse
|
||||
|
||||
Signed-off-by: Yejiang Luo <luoyejiang@gl-inet.com>
|
||||
---
|
||||
openwrt-18.06/include/version.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/openwrt-18.06/include/version.mk b/openwrt-18.06/include/version.mk
|
||||
index c4abf9b..0b386b6 100644
|
||||
--- a/openwrt-18.06/include/version.mk
|
||||
+++ b/openwrt-18.06/include/version.mk
|
||||
@@ -94,7 +94,7 @@ endef
|
||||
#'
|
||||
|
||||
# add siwifi software version
|
||||
-include $(TOPDIR)/include/siwifi_version.mk
|
||||
+#include $(TOPDIR)/include/siwifi_version.mk
|
||||
|
||||
VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
|
||||
-e 's,%V,$(call sed_escape,$(VERSION_NUMBER)),g' \
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,354 +0,0 @@
|
||||
From e930db9f4d15cb9f56796161f075c68fe07bb085 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Thu, 27 May 2021 15:10:26 +0800
|
||||
Subject: [PATCH] fix: modify the Siflower SDK according to the features of
|
||||
Glinet
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
openwrt-18.06/Config.in | 2 +
|
||||
openwrt-18.06/config/Config-glinet.in | 150 +++++++++++++++++++++
|
||||
.../package/base-files/files/bin/config_generate | 4 +-
|
||||
openwrt-18.06/package/base-files/files/etc/shadow | 2 +-
|
||||
.../mac80211/files/lib/netifd/wireless/mac80211.sh | 11 +-
|
||||
.../kernel/mac80211/files/lib/wifi/mac80211.sh | 20 +--
|
||||
.../network/config/firewall/files/firewall.config | 9 --
|
||||
.../network/config/netifd/files/etc/init.d/network | 1 -
|
||||
8 files changed, 173 insertions(+), 26 deletions(-)
|
||||
create mode 100755 openwrt-18.06/config/Config-glinet.in
|
||||
|
||||
diff --git a/openwrt-18.06/Config.in b/openwrt-18.06/Config.in
|
||||
index d30c048..39c92fe 100644
|
||||
--- a/openwrt-18.06/Config.in
|
||||
+++ b/openwrt-18.06/Config.in
|
||||
@@ -23,6 +23,8 @@ source "config/Config-build.in"
|
||||
|
||||
source "config/Config-devel.in"
|
||||
|
||||
+source "config/Config-glinet.in"
|
||||
+
|
||||
source "toolchain/Config.in"
|
||||
|
||||
source "target/imagebuilder/Config.in"
|
||||
diff --git a/openwrt-18.06/config/Config-glinet.in b/openwrt-18.06/config/Config-glinet.in
|
||||
new file mode 100755
|
||||
index 0000000..5eeeecc
|
||||
--- /dev/null
|
||||
+++ b/openwrt-18.06/config/Config-glinet.in
|
||||
@@ -0,0 +1,150 @@
|
||||
+# Copyright (C) 2017-2018 OpenWrt.org
|
||||
+#
|
||||
+# This is free software, licensed under the GNU General Public License v2.
|
||||
+# See /LICENSE for more information.
|
||||
+#
|
||||
+
|
||||
+menu "GL.iNet packages choice shortcut"
|
||||
+
|
||||
+ config GLINET_BASIC_PACKAGES
|
||||
+ bool "Select basic packages"
|
||||
+ select PACKAGE_fcgi
|
||||
+ select BUSYBOX_CUSTOM
|
||||
+ select BUSYBOX_CONFIG_UNICODE_SUPPORT
|
||||
+ select BUSYBOX_CONFIG_UNICODE_COMBINING_WCHARS
|
||||
+ select BUSYBOX_CONFIG_UNICODE_WIDE_WCHARS
|
||||
+ select BUSYBOX_CONFIG_UNICODE_BIDI_SUPPORT
|
||||
+ select BUSYBOX_CONFIG_UNICODE_NEUTRAL_TABLE
|
||||
+ select BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
|
||||
+ select BUSYBOX_CONFIG_FEATURE_WGET_TIMEOUT
|
||||
+ select BUSYBOX_CONFIG_FUSER
|
||||
+ select BUSYBOX_CONFIG_IPCRM
|
||||
+ select BUSYBOX_CONFIG_IPCS
|
||||
+ select BUSYBOX_CONFIG_FEATURE_FLOAT_SLEEP
|
||||
+ select BUSYBOX_CONFIG_USLEEP
|
||||
+ select BUSYBOX_CONFIG_NC_SERVER
|
||||
+ select BUSYBOX_CONFIG_NC_EXTRA
|
||||
+ select BUSYBOX_CONFIG_NC_110_COMPAT
|
||||
+ select BUSYBOX_CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY
|
||||
+ select BUSYBOX_CONFIG_TIMEOUT
|
||||
+ select BUSYBOX_CONFIG_FLOAT_DURATION
|
||||
+ select PACKAGE_lighttpd
|
||||
+ select PACKAGE_lighttpd-mod-access
|
||||
+ select PACKAGE_lighttpd-mod-cgi
|
||||
+ select PACKAGE_lighttpd-mod-expire
|
||||
+ select PACKAGE_lighttpd-mod-fastcgi
|
||||
+ select PACKAGE_lighttpd-mod-proxy
|
||||
+ select PACKAGE_bridge
|
||||
+ select PACKAGE_mwan3
|
||||
+ select PACKAGE_ip
|
||||
+ select PACKAGE_dnsmasq
|
||||
+ select PACKAGE_kmod-nls-cp437
|
||||
+ select PACKAGE_kmod-nls-iso8859-1
|
||||
+ select PACKAGE_kmod-nls-utf8
|
||||
+ select PACKAGE_kmod-nf-nathelper-extra
|
||||
+ select PACKAGE_libcares
|
||||
+ select CONFIG_NETFILTER_XT_MATCH_U32
|
||||
+ select CONFIG_NET_SCH_CBQ
|
||||
+ select CONFIG_NET_CLS
|
||||
+ select CONFIG_NET_CLS_FLOW
|
||||
+ select CONFIG_NET_SCH_INGRESS
|
||||
+ select CONFIG_NET_CLS_U32
|
||||
+ select CONFIG_NET_SCH_SFQ
|
||||
+ select CONFIG_NET_SCH_PRIO
|
||||
+ select CONFIG_NET_SCH_MULTIQ
|
||||
+ help
|
||||
+ Choose basic packages and various Busybox options.
|
||||
+
|
||||
+ menu "Select VPN"
|
||||
+ config GLINET_OPENVPN
|
||||
+ bool "Support OpenVPN"
|
||||
+ select PACKAGE_openvpn-openssl
|
||||
+ select OPENVPN_openssl_ENABLE_IPROUTE2
|
||||
+ select OPENVPN_openssl_ENABLE_MANAGEMENT
|
||||
+ select OPENVPN_openssl_ENABLE_X509_ALT_USERNAME
|
||||
+ select PACKAGE_libopenssl
|
||||
+ help
|
||||
+ Choose packages to support openvpn.
|
||||
+
|
||||
+ config GLINET_WIREGUARD
|
||||
+ bool "Support WireGuard"
|
||||
+ select PACKAGE_wireguard
|
||||
+ select PACKAGE_luci-proto-wireguard
|
||||
+ help
|
||||
+ Choose packages to support wireguard.
|
||||
+
|
||||
+ config GLINET_SHADOWSOCKS
|
||||
+ bool "Support Shadowsocks"
|
||||
+ select PACKAGE_shadowsocks-libev
|
||||
+ select PACKAGE_shadowsocks-libev-server
|
||||
+ select PACKAGE_luci-app-shadowsocks
|
||||
+ help
|
||||
+ Choose packages to support shadowsocks.
|
||||
+
|
||||
+ config GLINET_L2TP
|
||||
+ bool "Support L2TP/IPsec"
|
||||
+ select PACKAGE_ppp-mod-pptp
|
||||
+ select PACKAGE_xl2tpd
|
||||
+ help
|
||||
+ Choose packages to support PPTP and L2TP/IPsec.
|
||||
+ endmenu
|
||||
+
|
||||
+ config GLINET_STORAGE
|
||||
+ bool "Support storage"
|
||||
+ select PACKAGE_blkid
|
||||
+ select PACKAGE_kmod-fs-ext4
|
||||
+ select PACKAGE_kmod-fs-ntfs
|
||||
+ select PACKAGE_kmod-fs-vfat
|
||||
+ select PACKAGE_kmod-fs-ext4
|
||||
+ select PACKAGE_kmod-fs-exfat
|
||||
+ select PACKAGE_ntfs-3g
|
||||
+ select PACKAGE_kmod-usb-storage
|
||||
+ select PACKAGE_samba36-server
|
||||
+ help
|
||||
+ Choose packages to support USB storage.
|
||||
+
|
||||
+ config GLINET_USB
|
||||
+ bool "Support USB"
|
||||
+ select PACKAGE_kmod-usb-uhci
|
||||
+ select PACKAGE_kmod-usb2
|
||||
+ select PACKAGE_kmod-usb-ohci
|
||||
+ select PACKAGE_kmod-rt2800-usb
|
||||
+ select PACKAGE_wwan
|
||||
+ select PACKAGE_kmod-usb-serial
|
||||
+ select PACKAGE_kmod-usb-serial-cp210x
|
||||
+ select PACKAGE_kmod-usb-serial-option
|
||||
+ select PACKAGE_kmod-usb-serial-wwan
|
||||
+ select PACKAGE_kmod-usb-serial-sierrawireless
|
||||
+ select PACKAGE_usb-modeswitch
|
||||
+ select PACKAGE_kmod-mppe
|
||||
+ select PACKAGE_kmod-usb-net
|
||||
+ select PACKAGE_kmod-usb-net-cdc-ether
|
||||
+ select PACKAGE_kmod-usb-net-rndis
|
||||
+ select PACKAGE_kmod-usb-net-qmi-wwan
|
||||
+ select PACKAGE_uqmi
|
||||
+ select PACKAGE_kmod-usb-net-ipheth
|
||||
+ select PACKAGE_libusbmuxd
|
||||
+ select PACKAGE_libimobiledevice
|
||||
+ select PACKAGE_usbmuxd
|
||||
+ help
|
||||
+ Choose packages to support USB related.
|
||||
+
|
||||
+ config GLINET_WEBCAM
|
||||
+ bool "Support webcam"
|
||||
+ select MJPG_STREAMER_INPUT_UVC
|
||||
+ select MJPG_STREAMER_OUTPUT_HTTP
|
||||
+ select PACKAGE_mjpg-streamer
|
||||
+ select PACKAGE_kmod-video-core
|
||||
+ select PACKAGE_kmod-video-uvc
|
||||
+ select PACKAGE_kmod-video-gspca-core
|
||||
+ select PACKAGE_kmod-video-gspca-zc3xx
|
||||
+ select PACKAGE_kmod-video-gspca-sonixb
|
||||
+ select PACKAGE_kmod-video-gspca-sonixj
|
||||
+ help
|
||||
+ Choose packages to support webcam.
|
||||
+
|
||||
+ config GLINET_RTC
|
||||
+ bool "Support rtc"
|
||||
+ select RTC_SUPPORT
|
||||
+endmenu
|
||||
+
|
||||
diff --git a/openwrt-18.06/package/base-files/files/bin/config_generate b/openwrt-18.06/package/base-files/files/bin/config_generate
|
||||
index 9de0c3a..f2bee1f 100755
|
||||
--- a/openwrt-18.06/package/base-files/files/bin/config_generate
|
||||
+++ b/openwrt-18.06/package/base-files/files/bin/config_generate
|
||||
@@ -89,7 +89,7 @@ generate_network() {
|
||||
uci -q batch <<-EOF
|
||||
set network.$1.type='bridge'
|
||||
set network.$1.proto='static'
|
||||
- set network.$1.ipaddr='192.168.4.1'
|
||||
+ set network.$1.ipaddr='192.168.8.1'
|
||||
set network.$1.netmask='255.255.255.0'
|
||||
set network.$1.ip6assign='60'
|
||||
EOF
|
||||
@@ -145,7 +145,7 @@ generate_network() {
|
||||
static)
|
||||
local ipad
|
||||
case "$1" in
|
||||
- lan) ipad=${ipaddr:-"192.168.4.1"} ;;
|
||||
+ lan) ipad=${ipaddr:-"192.168.8.1"} ;;
|
||||
*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;;
|
||||
esac
|
||||
|
||||
diff --git a/openwrt-18.06/package/base-files/files/etc/shadow b/openwrt-18.06/package/base-files/files/etc/shadow
|
||||
index 8f87824..21c26e6 100644
|
||||
--- a/openwrt-18.06/package/base-files/files/etc/shadow
|
||||
+++ b/openwrt-18.06/package/base-files/files/etc/shadow
|
||||
@@ -1,4 +1,4 @@
|
||||
-root:$1$wEehtjxj$YBu4quNfVUjzfv8p/PBo5.:0:0:99999:7:::
|
||||
+root::0:0:99999:7:::
|
||||
daemon:*:0:0:99999:7:::
|
||||
ftp:*:0:0:99999:7:::
|
||||
network:*:0:0:99999:7:::
|
||||
diff --git a/openwrt-18.06/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/openwrt-18.06/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
index 1f8868b..2a4a12e 100755
|
||||
--- a/openwrt-18.06/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
+++ b/openwrt-18.06/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
. /lib/netifd/netifd-wireless.sh
|
||||
. /lib/netifd/hostapd.sh
|
||||
+. /lib/functions/system.sh
|
||||
|
||||
init_wireless_driver "$@"
|
||||
|
||||
@@ -398,18 +399,18 @@ mac80211_generate_mac() {
|
||||
local oIFS="$IFS"; IFS=":"; set -- $ref; IFS="$oIFS"
|
||||
|
||||
macidx=$(($id + 2))
|
||||
- [ "$mask" = "ff:ff:ff:ff:ff:ff" ] && {
|
||||
+# [ "$mask" = "ff:ff:ff:ff:ff:ff" ] && {
|
||||
# modified by robert
|
||||
# for if mask is FF:FF:FF:FF:FF:FF, the previous logic will generate a wrong mac-address
|
||||
- printf "%s:%s:%s:%s:%s:%02x" $1 $2 $3 $4 $5 $(( 0x$6 ^ $id ))
|
||||
- return
|
||||
- }
|
||||
+# printf "%s:%s:%s:%s:%s:%02x" $1 $2 $3 $4 $5 $(( 0x$6 ^ $id ))
|
||||
+# return
|
||||
+# }
|
||||
|
||||
[ "$((0x$mask1))" -gt 0 ] && {
|
||||
b1="0x$1"
|
||||
[ "$id" -gt 0 ] && \
|
||||
b1=$(($b1 ^ ((($id - 1) << 2) | 0x2)))
|
||||
- printf "%02x:%s:%s:%s:%s:%s" $b1 $2 $3 $4 $5 $6
|
||||
+ printf "%02x:%s:%s:%s:%s:%s" $(($b1%256)) $2 $3 $4 $5 $6
|
||||
return
|
||||
}
|
||||
|
||||
diff --git a/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
index a8e53f6..dcb0a8c 100755
|
||||
--- a/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
+++ b/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
@@ -67,7 +67,8 @@ detect_mac80211() {
|
||||
devidx=$(($devidx + 1))
|
||||
done
|
||||
|
||||
- for _dev in /sys/class/ieee80211/*; do
|
||||
+ for _dev in `ls /sys/class/ieee80211/ -r`; do
|
||||
+ _dev="/sys/class/ieee80211/$_dev"
|
||||
[ -e "$_dev" ] || continue
|
||||
|
||||
dev="${_dev##*/}"
|
||||
@@ -80,19 +81,19 @@ detect_mac80211() {
|
||||
channel="1"
|
||||
htmode=""
|
||||
ht_capab=""
|
||||
- ssidprefix="-2.4G"
|
||||
+ ssidprefix=""
|
||||
noscan="0"
|
||||
band="2.4G"
|
||||
htcodex="0"
|
||||
txpower="20"
|
||||
|
||||
|
||||
- iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT20
|
||||
+ iw phy "$dev" info | grep -q 'Capabilities:' && htmode=HT40
|
||||
|
||||
iw phy "$dev" info | grep -q '5180 MHz' && {
|
||||
mode_band="a"
|
||||
channel="161"
|
||||
- ssidprefix=""
|
||||
+ ssidprefix="-5G"
|
||||
band="5G"
|
||||
txpower="25"
|
||||
iw phy "$dev" info | grep -q 'VHT Capabilities' && htmode="VHT80"
|
||||
@@ -117,8 +118,11 @@ detect_mac80211() {
|
||||
[ -f "/sys/devices/factory-read/countryid" ] && {
|
||||
country=`cat /sys/devices/factory-read/countryid`
|
||||
}
|
||||
- ssid=SiWiFi-`cat /sys/class/ieee80211/${dev}/macaddress | cut -c 13- | sed 's/://g'`$ssidprefix
|
||||
- ssid_lease=SiWiFi-租赁-$ssidprefix`cat /sys/class/ieee80211/${dev}/macaddress | cut -c 13- | sed 's/://g'`
|
||||
+ #ssid=SiWiFi-`cat /sys/class/ieee80211/${dev}/macaddress | cut -c 13- | sed 's/://g'`$ssidprefix
|
||||
+ #ssid_lease=SiWiFi-租赁-$ssidprefix`cat /sys/class/ieee80211/${dev}/macaddress | cut -c 13- | sed 's/://g'`
|
||||
+
|
||||
+ ssid=OpenWrt$ssidprefix
|
||||
+ ssid_lease=OpenWrt-lease$ssidprefix
|
||||
if [ ! -n "$country" ]; then
|
||||
country='CN'
|
||||
fi
|
||||
@@ -131,9 +135,9 @@ detect_mac80211() {
|
||||
set wireless.radio${devidx}=wifi-device
|
||||
set wireless.radio${devidx}.type=mac80211
|
||||
set wireless.radio${devidx}.country=${country}
|
||||
- set wireless.radio${devidx}.txpower_lvl=${txpower_lvl}
|
||||
set wireless.radio${devidx}.txpower=${txpower}
|
||||
- set wireless.radio${devidx}.channel=${channel}
|
||||
+ set wireless.radio${devidx}.txpower_max=${txpower}
|
||||
+ set wireless.radio${devidx}.channel=auto
|
||||
set wireless.radio${devidx}.band=${band}
|
||||
set wireless.radio${devidx}.hwmode=11${mode_band}
|
||||
set wireless.radio${devidx}.noscan=${noscan}
|
||||
diff --git a/openwrt-18.06/package/network/config/firewall/files/firewall.config b/openwrt-18.06/package/network/config/firewall/files/firewall.config
|
||||
index d6e311c..584ed85 100644
|
||||
--- a/openwrt-18.06/package/network/config/firewall/files/firewall.config
|
||||
+++ b/openwrt-18.06/package/network/config/firewall/files/firewall.config
|
||||
@@ -16,15 +16,6 @@ config zone
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
- option name wwan
|
||||
- list network 'wwan'
|
||||
- option input REJECT
|
||||
- option output ACCEPT
|
||||
- option forward REJECT
|
||||
- option masq 1
|
||||
- option mtu_fix 1
|
||||
-
|
||||
-config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
diff --git a/openwrt-18.06/package/network/config/netifd/files/etc/init.d/network b/openwrt-18.06/package/network/config/netifd/files/etc/init.d/network
|
||||
index ce41a59..25fd478 100755
|
||||
--- a/openwrt-18.06/package/network/config/netifd/files/etc/init.d/network
|
||||
+++ b/openwrt-18.06/package/network/config/netifd/files/etc/init.d/network
|
||||
@@ -14,7 +14,6 @@ init_switch() {
|
||||
|
||||
start_service() {
|
||||
local lanip=$(uci get network.lan.ipaddr)
|
||||
- echo ${lanip} siwifi.cn > /etc/hosts
|
||||
|
||||
init_switch
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,490 +0,0 @@
|
||||
From b48c134f4e3457ac3eba414f81166825152ddcb2 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Thu, 27 May 2021 15:53:17 +0800
|
||||
Subject: [PATCH] fix: add iwinfo patch
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
.../iwinfo/patches/000-add_rtwifi_support.patch | 224 +++++++++++++++++++++
|
||||
.../001-add-htmodelist-for-scan-results.patch | 203 +++++++++++++++++++
|
||||
.../iwinfo/patches/002-fix-station-mode-scan.patch | 27 +++
|
||||
3 files changed, 454 insertions(+)
|
||||
create mode 100644 openwrt-18.06/package/network/utils/iwinfo/patches/000-add_rtwifi_support.patch
|
||||
create mode 100755 openwrt-18.06/package/network/utils/iwinfo/patches/001-add-htmodelist-for-scan-results.patch
|
||||
create mode 100644 openwrt-18.06/package/network/utils/iwinfo/patches/002-fix-station-mode-scan.patch
|
||||
|
||||
diff --git a/openwrt-18.06/package/network/utils/iwinfo/patches/000-add_rtwifi_support.patch b/openwrt-18.06/package/network/utils/iwinfo/patches/000-add_rtwifi_support.patch
|
||||
new file mode 100644
|
||||
index 0000000..e061f7d
|
||||
--- /dev/null
|
||||
+++ b/openwrt-18.06/package/network/utils/iwinfo/patches/000-add_rtwifi_support.patch
|
||||
@@ -0,0 +1,224 @@
|
||||
+--- a/Makefile
|
||||
++++ b/Makefile
|
||||
+@@ -14,6 +14,10 @@ IWINFO_CLI = iwinfo
|
||||
+ IWINFO_CLI_LDFLAGS = $(LDFLAGS) -L. -liwinfo
|
||||
+ IWINFO_CLI_OBJ = iwinfo_cli.o
|
||||
+
|
||||
++ifneq ($(filter rt,$(IWINFO_BACKENDS)),)
|
||||
++ IWINFO_CFLAGS += -DUSE_RTWIFI
|
||||
++ IWINFO_LIB_OBJ += iwinfo_rt_scan.o
|
||||
++endif
|
||||
+
|
||||
+ ifneq ($(filter wl,$(IWINFO_BACKENDS)),)
|
||||
+ IWINFO_CFLAGS += -DUSE_WL
|
||||
+--- a/iwinfo_cli.c
|
||||
++++ b/iwinfo_cli.c
|
||||
+@@ -111,7 +111,11 @@ static char * format_signal(int sig)
|
||||
+ if (!sig)
|
||||
+ snprintf(buf, sizeof(buf), "unknown");
|
||||
+ else
|
||||
++#ifdef USE_RTWIFI
|
||||
++ snprintf(buf, sizeof(buf), "%d %", sig);
|
||||
++#else
|
||||
+ snprintf(buf, sizeof(buf), "%d dBm", sig);
|
||||
++#endif
|
||||
+
|
||||
+ return buf;
|
||||
+ }
|
||||
+@@ -600,7 +604,11 @@ static void print_scanlist(const struct
|
||||
+ IWINFO_OPMODE_NAMES[e->mode],
|
||||
+ format_channel(e->channel));
|
||||
+ printf(" Signal: %s Quality: %s/%s\n",
|
||||
++#ifdef USE_RTWIFI
|
||||
++ format_signal(e->signal),
|
||||
++#else
|
||||
+ format_signal(e->signal - 0x100),
|
||||
++#endif
|
||||
+ format_quality(e->quality),
|
||||
+ format_quality_max(e->quality_max));
|
||||
+ printf(" Encryption: %s\n\n",
|
||||
+--- /dev/null
|
||||
++++ b/iwinfo_rt_scan.c
|
||||
+@@ -0,0 +1,157 @@
|
||||
++#include "iwinfo.h"
|
||||
++#include "iwinfo_wext.h"
|
||||
++
|
||||
++struct survey_table
|
||||
++{
|
||||
++ char channel[4];
|
||||
++ char ssid[33];
|
||||
++ char len[4];
|
||||
++ char bssid[20];
|
||||
++ char security[23];
|
||||
++ char *crypto;
|
||||
++ char signal[9];
|
||||
++};
|
||||
++
|
||||
++struct survey_table st[64];
|
||||
++int survey_count = 0;
|
||||
++
|
||||
++#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
|
||||
++void iwpriv(const char *name, const char *key, const char *val)
|
||||
++{
|
||||
++ int socket_id;
|
||||
++ struct iwreq wrq;
|
||||
++ char data[64];
|
||||
++ snprintf(data, 64, "%s=%s", key, val);
|
||||
++ socket_id = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
++ strcpy(wrq.ifr_ifrn.ifrn_name, name);
|
||||
++ wrq.u.data.length = strlen(data);
|
||||
++ wrq.u.data.pointer = data;
|
||||
++ wrq.u.data.flags = 0;
|
||||
++ ioctl(socket_id, RTPRIV_IOCTL_SET, &wrq);
|
||||
++ close(socket_id);
|
||||
++}
|
||||
++
|
||||
++static void next_field(char **line, char *output, int n) {
|
||||
++ char *l = *line;
|
||||
++ int i;
|
||||
++
|
||||
++ memcpy(output, *line, n);
|
||||
++ *line = &l[n];
|
||||
++
|
||||
++ for (i = n - 1; i > 0; i--) {
|
||||
++ if (output[i] != ' ')
|
||||
++ break;
|
||||
++ output[i] = '\0';
|
||||
++ }
|
||||
++}
|
||||
++
|
||||
++#define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
|
||||
++void wifi_site_survey(const char *ifname, char* essid, int print)
|
||||
++{
|
||||
++ char *s = malloc(IW_SCAN_MAX_DATA);
|
||||
++ int ret;
|
||||
++ int socket_id;
|
||||
++ struct iwreq wrq;
|
||||
++ char *line, *start;
|
||||
++ iwpriv(ifname, "SiteSurvey", (essid ? essid : ""));
|
||||
++ sleep(5);
|
||||
++ memset(s, 0x00, IW_SCAN_MAX_DATA);
|
||||
++ strcpy(wrq.ifr_name, ifname);
|
||||
++ wrq.u.data.length = IW_SCAN_MAX_DATA;
|
||||
++ wrq.u.data.pointer = s;
|
||||
++ wrq.u.data.flags = 0;
|
||||
++ socket_id = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
++ ret = ioctl(socket_id, RTPRIV_IOCTL_GSITESURVEY, &wrq);
|
||||
++ close(socket_id);
|
||||
++ if(ret != 0)
|
||||
++ goto out;
|
||||
++ if(wrq.u.data.length < 1)
|
||||
++ goto out;
|
||||
++ /* ioctl result starts with a newline, for some reason */
|
||||
++ start = s;
|
||||
++ while (*start == '\n')
|
||||
++ start++;
|
||||
++ line = strtok((char *)start, "\n");
|
||||
++ line = strtok(NULL, "\n");
|
||||
++ survey_count = 0;
|
||||
++ while(line && (survey_count < 64)) {
|
||||
++ memset(&st[survey_count], 0, sizeof(st[survey_count]));
|
||||
++
|
||||
++ next_field(&line, st[survey_count].channel, sizeof(st->channel));
|
||||
++ next_field(&line, st[survey_count].ssid, sizeof(st->ssid));
|
||||
++ next_field(&line, st[survey_count].len, sizeof(st->len));
|
||||
++ next_field(&line, st[survey_count].bssid, sizeof(st->bssid));
|
||||
++ next_field(&line, st[survey_count].security, sizeof(st->security));
|
||||
++ st[survey_count].crypto = strstr(st[survey_count].security, "/");
|
||||
++ if (st[survey_count].crypto) {
|
||||
++ *st[survey_count].crypto = '\0';
|
||||
++ st[survey_count].crypto++;
|
||||
++ if (print) printf("%s|%s|%s|%s\n",
|
||||
++ st[survey_count].channel, st[survey_count].ssid, st[survey_count].bssid, st[survey_count].security);
|
||||
++ }
|
||||
++ next_field(&line, st[survey_count].signal, sizeof(st->signal));
|
||||
++ line = strtok(NULL, "\n");
|
||||
++
|
||||
++ /* skip hidden ssid */
|
||||
++ if (!strcmp(st[survey_count].len, "0")) {
|
||||
++ continue;
|
||||
++ }
|
||||
++ survey_count++;
|
||||
++ }
|
||||
++ if (survey_count == 0 && !print)
|
||||
++ printf("No results");
|
||||
++out:
|
||||
++ free(s);
|
||||
++}
|
||||
++
|
||||
++/*struct survey_table
|
||||
++{
|
||||
++ char channel[4];
|
||||
++ char ssid[33];
|
||||
++ char bssid[20];
|
||||
++ char security[23];
|
||||
++ char *crypto;
|
||||
++};
|
||||
++*/
|
||||
++
|
||||
++int rt_get_scanlist(const char *ifname, char *buf, int *len)
|
||||
++{
|
||||
++ struct iwinfo_scanlist_entry *e = (struct iwinfo_scanlist_entry *) buf;
|
||||
++ int i = 0;
|
||||
++
|
||||
++ survey_count = 0;
|
||||
++
|
||||
++ wifi_site_survey(ifname, NULL, 0);
|
||||
++
|
||||
++ for (i = 0; i < survey_count; i++) {
|
||||
++ int j;
|
||||
++ for (j = 0; j < 6; j++) {
|
||||
++ e[i].mac[j] = (uint8_t) strtoul(&st[i].bssid[j * 3], NULL, 16);
|
||||
++ }
|
||||
++ strcpy(e[i].ssid, st[i].ssid);
|
||||
++ e[i].channel = atoi(st[i].channel);
|
||||
++ e[i].mode = IWINFO_OPMODE_MASTER;
|
||||
++ e[i].signal = atoi(st[i].signal);
|
||||
++ e[i].quality = atoi(st[i].signal);
|
||||
++ e[i].quality_max = 100;
|
||||
++ memset(&e[i].crypto, 0, sizeof(struct iwinfo_crypto_entry));
|
||||
++ if (strstr(st[i].security, "WPA")) {
|
||||
++ e[i].crypto.enabled = 1;
|
||||
++ e[i].crypto.auth_suites |= IWINFO_KMGMT_PSK;
|
||||
++ }
|
||||
++ if (!st[i].crypto)
|
||||
++ continue;
|
||||
++ if (strstr(st[i].crypto, "TKIP"))
|
||||
++ e[i].crypto.group_ciphers |= IWINFO_CIPHER_TKIP;
|
||||
++ if (strstr(st[i].crypto, "AES"))
|
||||
++ e[i].crypto.group_ciphers |= IWINFO_CIPHER_AESOCB;
|
||||
++ if (strstr(st[i].security, "WPA2"))
|
||||
++ e[i].crypto.wpa_version = 2;
|
||||
++ else if (strstr(st[i].security, "WPA"))
|
||||
++ e[i].crypto.wpa_version = 1;
|
||||
++ }
|
||||
++ *len = survey_count * sizeof(struct iwinfo_scanlist_entry);
|
||||
++
|
||||
++ return 0;
|
||||
++}
|
||||
++
|
||||
+--- a/iwinfo_wext.c
|
||||
++++ b/iwinfo_wext.c
|
||||
+@@ -556,7 +556,11 @@ const struct iwinfo_ops wext_ops = {
|
||||
+ .phyname = wext_get_phyname,
|
||||
+ .assoclist = wext_get_assoclist,
|
||||
+ .txpwrlist = wext_get_txpwrlist,
|
||||
++#ifdef USE_RTWIFI
|
||||
++ .scanlist = rt_get_scanlist,
|
||||
++#else
|
||||
+ .scanlist = wext_get_scanlist,
|
||||
++#endif
|
||||
+ .freqlist = wext_get_freqlist,
|
||||
+ .countrylist = wext_get_countrylist,
|
||||
+ .close = wext_close
|
||||
+--- a/iwinfo_wext.h
|
||||
++++ b/iwinfo_wext.h
|
||||
+@@ -379,4 +379,8 @@ static const unsigned int standard_event
|
||||
+
|
||||
+ int wext_get_scanlist(const char *ifname, char *buf, int *len);
|
||||
+
|
||||
++#ifdef USE_RTWIFI
|
||||
++int rt_get_scanlist(const char *ifname, char *buf, int *len);
|
||||
++#endif
|
||||
++
|
||||
+ #endif
|
||||
diff --git a/openwrt-18.06/package/network/utils/iwinfo/patches/001-add-htmodelist-for-scan-results.patch b/openwrt-18.06/package/network/utils/iwinfo/patches/001-add-htmodelist-for-scan-results.patch
|
||||
new file mode 100755
|
||||
index 0000000..b7a7c10
|
||||
--- /dev/null
|
||||
+++ b/openwrt-18.06/package/network/utils/iwinfo/patches/001-add-htmodelist-for-scan-results.patch
|
||||
@@ -0,0 +1,203 @@
|
||||
+From patchwork Mon Jul 16 07:48:54 2018
|
||||
+Content-Type: text/plain; charset="utf-8"
|
||||
+MIME-Version: 1.0
|
||||
+Content-Transfer-Encoding: 7bit
|
||||
+Subject: [OpenWrt-Devel,1/2] add htmodelist for scan results
|
||||
+X-Patchwork-Submitter: Yury Shvedov <yshvedov@wimarksystems.com>
|
||||
+X-Patchwork-Id: 944171
|
||||
+X-Patchwork-Delegate: jow@openwrt.org
|
||||
+Message-Id: <20180716074854.11321-1-yshvedov@wimarksystems.com>
|
||||
+To: Jo-Philipp Wich <jo@mein.io>
|
||||
+Cc: openwrt-devel@lists.openwrt.org
|
||||
+Date: Mon, 16 Jul 2018 10:48:54 +0300
|
||||
+From: Yury Shvedov <yshvedov@wimarksystems.com>
|
||||
+List-Id: <openwrt-devel.lists.openwrt.org>
|
||||
+
|
||||
+The knowledge about HT and VHT modes could be useful for user experience.
|
||||
+So grab it via nl80211 and make it available in both C and LUA APIs,
|
||||
+and show htmodelist on CLI scan results.
|
||||
+
|
||||
+Signed-off-by: Yury Shvedov <yshvedov@wimarksystems.com>
|
||||
+---
|
||||
+ include/iwinfo.h | 1 +
|
||||
+ iwinfo_cli.c | 13 ++++++--
|
||||
+ iwinfo_lua.c | 14 ++++++++-
|
||||
+ iwinfo_nl80211.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
+ 4 files changed, 102 insertions(+), 3 deletions(-)
|
||||
+
|
||||
+diff --git a/include/iwinfo.h b/include/iwinfo.h
|
||||
+index 929f697..b3f5470 100644
|
||||
+--- a/include/iwinfo.h
|
||||
++++ b/include/iwinfo.h
|
||||
+@@ -154,6 +154,7 @@ struct iwinfo_scanlist_entry {
|
||||
+ uint8_t signal;
|
||||
+ uint8_t quality;
|
||||
+ uint8_t quality_max;
|
||||
++ uint16_t htmodelist;
|
||||
+ struct iwinfo_crypto_entry crypto;
|
||||
+ };
|
||||
+
|
||||
+diff --git a/iwinfo_cli.c b/iwinfo_cli.c
|
||||
+index 49c9035..0429fbc 100644
|
||||
+--- a/iwinfo_cli.c
|
||||
++++ b/iwinfo_cli.c
|
||||
+@@ -572,7 +572,7 @@ static void print_info(const struct iwinfo_ops *iw, const char *ifname)
|
||||
+
|
||||
+ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
|
||||
+ {
|
||||
+- int i, x, len;
|
||||
++ int i, h, x, len;
|
||||
+ char buf[IWINFO_BUFSIZE];
|
||||
+ struct iwinfo_scanlist_entry *e;
|
||||
+
|
||||
+@@ -603,8 +603,17 @@ static void print_scanlist(const struct iwinfo_ops *iw, const char *ifname)
|
||||
+ format_signal(e->signal - 0x100),
|
||||
+ format_quality(e->quality),
|
||||
+ format_quality_max(e->quality_max));
|
||||
+- printf(" Encryption: %s\n\n",
|
||||
++ printf(" Encryption: %s\n",
|
||||
+ format_encryption(&e->crypto));
|
||||
++ if (e->htmodelist)
|
||||
++ {
|
||||
++ printf(" HT Capabilities: ");
|
||||
++ for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
|
||||
++ if (e->htmodelist & (1 << h))
|
||||
++ printf("%s ", IWINFO_HTMODE_NAMES[h]);
|
||||
++ printf("\n");
|
||||
++ }
|
||||
++ printf("\n");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+diff --git a/iwinfo_lua.c b/iwinfo_lua.c
|
||||
+index eebab8e..303fd08 100644
|
||||
+--- a/iwinfo_lua.c
|
||||
++++ b/iwinfo_lua.c
|
||||
+@@ -378,7 +378,7 @@ static int iwinfo_L_txpwrlist(lua_State *L, int (*func)(const char *, char *, in
|
||||
+ /* Wrapper for scan list */
|
||||
+ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int *))
|
||||
+ {
|
||||
+- int i, x, len = 0;
|
||||
++ int i, x, h, len = 0;
|
||||
+ char rv[IWINFO_BUFSIZE];
|
||||
+ char macstr[18];
|
||||
+ const char *ifname = luaL_checkstring(L, 1);
|
||||
+@@ -432,6 +432,18 @@ static int iwinfo_L_scanlist(lua_State *L, int (*func)(const char *, char *, int
|
||||
+ iwinfo_L_cryptotable(L, &e->crypto);
|
||||
+ lua_setfield(L, -2, "encryption");
|
||||
+
|
||||
++ /* HT Modes */
|
||||
++ if (e->htmodelist)
|
||||
++ {
|
||||
++ lua_newtable(L);
|
||||
++ for (h = 0; h < ARRAY_SIZE(IWINFO_HTMODE_NAMES); h++)
|
||||
++ {
|
||||
++ lua_pushboolean(L, e->htmodelist & (1 << h));
|
||||
++ lua_setfield(L, -2, IWINFO_HTMODE_NAMES[h]);
|
||||
++ }
|
||||
++ lua_setfield(L, -2, "htmodelist");
|
||||
++ }
|
||||
++
|
||||
+ lua_rawseti(L, -2, x);
|
||||
+ }
|
||||
+ }
|
||||
+diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
|
||||
+index ecd2d6a..542ac7d 100644
|
||||
+--- a/iwinfo_nl80211.c
|
||||
++++ b/iwinfo_nl80211.c
|
||||
+@@ -1980,6 +1980,71 @@ struct nl80211_scanlist {
|
||||
+ int len;
|
||||
+ };
|
||||
+
|
||||
++static void nl80211_parse_ht_capa(struct iwinfo_scanlist_entry *e,
|
||||
++ unsigned char *ie,
|
||||
++ int len)
|
||||
++{
|
||||
++ int capa;
|
||||
++ if (len < 2)
|
||||
++ return;
|
||||
++ e->htmodelist |= IWINFO_HTMODE_HT20;
|
||||
++ capa = ie[0] | (ie[8] << 8);
|
||||
++ if (capa & (1 << 1))
|
||||
++ {
|
||||
++ e->htmodelist |= IWINFO_HTMODE_HT40;
|
||||
++ if (e->htmodelist & IWINFO_HTMODE_VHT20)
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT40;
|
||||
++ }
|
||||
++}
|
||||
++static void nl80211_parse_vht_capa(struct iwinfo_scanlist_entry *e,
|
||||
++ unsigned char *ie,
|
||||
++ int len)
|
||||
++{
|
||||
++ int capa;
|
||||
++ if (len < 4)
|
||||
++ return;
|
||||
++ capa = ie[0] | (ie[1] << 8) | (ie[2] << 16) | (ie[3] << 24);
|
||||
++
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT20;
|
||||
++ if (e->htmodelist & IWINFO_HTMODE_HT40)
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT40;
|
||||
++
|
||||
++ switch ((capa >> 2) & 3) {
|
||||
++ /*case 0: neither 160 nor 80+80 */
|
||||
++ case 1:
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT160;
|
||||
++ break;
|
||||
++ case 2:
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT80_80;
|
||||
++ break;
|
||||
++ }
|
||||
++}
|
||||
++static void nl80211_parse_vht_oper(struct iwinfo_scanlist_entry *e,
|
||||
++ unsigned char *ie,
|
||||
++ int len)
|
||||
++{
|
||||
++ int chanwidth;
|
||||
++ if (len < 1)
|
||||
++ return;
|
||||
++ chanwidth = ie[0];
|
||||
++
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT20;
|
||||
++ if (e->htmodelist & IWINFO_HTMODE_HT40)
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT40;
|
||||
++
|
||||
++ switch (chanwidth) {
|
||||
++ /*case 0: 20 or 40 MHz */
|
||||
++ case 1:
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT80;
|
||||
++ break;
|
||||
++ case 2:
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT160;
|
||||
++ break;
|
||||
++ case 3:
|
||||
++ e->htmodelist |= IWINFO_HTMODE_VHT80_80;
|
||||
++ break;
|
||||
++ }
|
||||
++}
|
||||
+
|
||||
+ static void nl80211_get_scanlist_ie(struct nlattr **bss,
|
||||
+ struct iwinfo_scanlist_entry *e)
|
||||
+@@ -1999,11 +2064,23 @@ static void nl80211_get_scanlist_ie(struct nlattr **bss,
|
||||
+ e->ssid[len] = 0;
|
||||
+ break;
|
||||
+
|
||||
++ case 45: /* HT Capabilities */
|
||||
++ nl80211_parse_ht_capa(e, ie + 2, ie[1]);
|
||||
++ break;
|
||||
++
|
||||
+ case 48: /* RSN */
|
||||
+ iwinfo_parse_rsn(&e->crypto, ie + 2, ie[1],
|
||||
+ IWINFO_CIPHER_CCMP, IWINFO_KMGMT_8021x);
|
||||
+ break;
|
||||
+
|
||||
++ case 191: /* VHT Capabilities */
|
||||
++ nl80211_parse_vht_capa(e, ie + 2, ie[1]);
|
||||
++ break;
|
||||
++
|
||||
++ case 192: /* VHT Operation */
|
||||
++ nl80211_parse_vht_oper(e, ie + 2, ie[1]);
|
||||
++ break;
|
||||
++
|
||||
+ case 221: /* Vendor */
|
||||
+ if (ie[1] >= 4 && !memcmp(ie + 2, ms_oui, 3) && ie[5] == 1)
|
||||
+ iwinfo_parse_rsn(&e->crypto, ie + 6, ie[1] - 4,
|
||||
diff --git a/openwrt-18.06/package/network/utils/iwinfo/patches/002-fix-station-mode-scan.patch b/openwrt-18.06/package/network/utils/iwinfo/patches/002-fix-station-mode-scan.patch
|
||||
new file mode 100644
|
||||
index 0000000..1374a74
|
||||
--- /dev/null
|
||||
+++ b/openwrt-18.06/package/network/utils/iwinfo/patches/002-fix-station-mode-scan.patch
|
||||
@@ -0,0 +1,27 @@
|
||||
+--- a/iwinfo_nl80211.c
|
||||
++++ b/iwinfo_nl80211.c
|
||||
+@@ -2535,10 +2535,10 @@ static int nl80211_get_scanlist(const ch
|
||||
+ }
|
||||
+
|
||||
+ /* WPA supplicant */
|
||||
+- if (!nl80211_get_scanlist_wpactl(ifname, buf, len))
|
||||
++ /*if (!nl80211_get_scanlist_wpactl(ifname, buf, len))
|
||||
+ {
|
||||
+ return 0;
|
||||
+- }
|
||||
++ }*/
|
||||
+
|
||||
+ /* station / ad-hoc / monitor scan */
|
||||
+ else if (!nl80211_get_mode(ifname, &mode) &&
|
||||
+--- a/iwinfo_cli.c
|
||||
++++ b/iwinfo_cli.c
|
||||
+@@ -621,6 +621,9 @@ static void print_scanlist(const struct
|
||||
+ printf("%s ", IWINFO_HTMODE_NAMES[h]);
|
||||
+ printf("\n");
|
||||
+ }
|
||||
++ else{
|
||||
++ printf(" HT Capabilities: UNKNOW \n");
|
||||
++ }
|
||||
+ printf("\n");
|
||||
+ }
|
||||
+ }
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From e354c30628944571d5e801bea70b848930837b54 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Thu, 27 May 2021 16:32:21 +0800
|
||||
Subject: [PATCH] fix: ip-full compile error
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
openwrt-18.06/package/network/utils/iproute2/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/openwrt-18.06/package/network/utils/iproute2/Makefile b/openwrt-18.06/package/network/utils/iproute2/Makefile
|
||||
index c79d751..e9cfdd9 100644
|
||||
--- a/openwrt-18.06/package/network/utils/iproute2/Makefile
|
||||
+++ b/openwrt-18.06/package/network/utils/iproute2/Makefile
|
||||
@@ -47,7 +47,7 @@ $(call Package/iproute2/Default)
|
||||
VARIANT:=full
|
||||
PROVIDES:=ip
|
||||
ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full
|
||||
- DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl
|
||||
+ DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libcap
|
||||
endef
|
||||
|
||||
define Package/tc
|
||||
--
|
||||
2.7.4
|
||||
|
||||
Loading…
Reference in New Issue
Block a user