mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-11-04 04:18:07 +00:00 
			
		
		
		
	Compare commits
	
		
			12 Commits
		
	
	
		
			v2.9.0-rc3
			...
			v2.9.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ce441c5b1b | ||
| 
						 | 
					f8f9c6d469 | ||
| 
						 | 
					690d7655a0 | ||
| 
						 | 
					85ff703e2f | ||
| 
						 | 
					52c39cd3bf | ||
| 
						 | 
					ebd7c79e65 | ||
| 
						 | 
					b3493bcf55 | ||
| 
						 | 
					2b767fb84f | ||
| 
						 | 
					560e9f326d | ||
| 
						 | 
					3da1530926 | ||
| 
						 | 
					abcf6dd1fd | ||
| 
						 | 
					2bcedafe0d | 
@@ -190,6 +190,7 @@ ath11k-macs)
 | 
			
		||||
		;;
 | 
			
		||||
	yuncore,ax840|\
 | 
			
		||||
	edgecore,eap102|\
 | 
			
		||||
	edgecore,eap104|\
 | 
			
		||||
	edgecore,eap106|\
 | 
			
		||||
	indio,um-310ax-v1|\
 | 
			
		||||
	indio,um-510axp-v1|\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
mac=$(cat /etc/board.json | jsonfilter -e '@["network-device"]["'$DEVICENAME'"]'.macaddr)
 | 
			
		||||
mac=$(cat /etc/board.json | jsonfilter -e '@["network_device"]["'$DEVICENAME'"]'.macaddr)
 | 
			
		||||
[ -n "$mac" ] && ip link set $DEVICENAME address $mac
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ PKG_NAME:=qca-nss-clients
 | 
			
		||||
PKG_SOURCE_PROTO:=git
 | 
			
		||||
PKG_BRANCH:=master
 | 
			
		||||
PKG_RELEASE:=2
 | 
			
		||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-clients/
 | 
			
		||||
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-clients
 | 
			
		||||
PKG_MIRROR_HASH:=802bf8b2dac8da0549e108b873afd982d127370c07d6574ece71f902eafe7698
 | 
			
		||||
PKG_VERSION:=153998d70fdba508a59a28c13a606032cbf32686
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
include $(TOPDIR)/rules.mk
 | 
			
		||||
 | 
			
		||||
PKG_NAME:=mcu
 | 
			
		||||
PKG_VERSION:=2023-03-12
 | 
			
		||||
PKG_VERSION:=2023-03-22
 | 
			
		||||
PKG_RELEASE=1
 | 
			
		||||
 | 
			
		||||
PKG_LICENSE:=GPL-2.0
 | 
			
		||||
 
 | 
			
		||||
@@ -47,13 +47,19 @@ mcu_hotplug_setup() {
 | 
			
		||||
	[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
	mcu_fw_check_and_update "$uart"
 | 
			
		||||
	[ $? -ne 0 ] && return 1
 | 
			
		||||
	rc="$?"
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "1" ] && return 1
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "0" ] && {
 | 
			
		||||
		fw_type="$(uci -q get "mcu.${SECT}.firmware" | awk -F '__' '{print $2}')"
 | 
			
		||||
		[ -n "$fw_type" ] || return 0
 | 
			
		||||
 | 
			
		||||
		[ -x "${MCU_HS_DIR}/${fw_type}.sh" ] && \
 | 
			
		||||
			"${MCU_HS_DIR}/${fw_type}.sh" "$SECT"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# We are looking for ttyACM with specific product name and USB VID:PID
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,16 @@ mcu_setup_uart() {
 | 
			
		||||
	[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
	mcu_fw_check_and_update "$uart" "$baud" "$flow"
 | 
			
		||||
	rc="$?"
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "1" ] && return 1
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "2" ] && {
 | 
			
		||||
		sleep 1
 | 
			
		||||
 | 
			
		||||
		mcu_req "boot" "$uart" "$baud" "$flow"
 | 
			
		||||
		[ $? -ne 0 ] && return 1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fw_type="$(uci -q get "mcu.${SECT}.firmware" | awk -F '__' '{print $2}')"
 | 
			
		||||
	[ -n "$fw_type" ] || return 0
 | 
			
		||||
@@ -141,18 +150,20 @@ mcu_setup_usb() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mcu_fw_check_and_update "$uart"
 | 
			
		||||
	[ $? -ne 0 ] && {
 | 
			
		||||
	rc="$?"
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "1" ] && {
 | 
			
		||||
		mcu_enable_pin_set "$gpio_path" "$gpio_off"
 | 
			
		||||
 | 
			
		||||
		flock -u 9
 | 
			
		||||
		return 1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[ "$rc" = "0" ] && {
 | 
			
		||||
		fw_type="$(uci -q get "mcu.${SECT}.firmware" | awk -F '__' '{print $2}')"
 | 
			
		||||
	[ -n "$fw_type" ] || return 0
 | 
			
		||||
 | 
			
		||||
	[ -x "${MCU_HS_DIR}/${fw_type}.sh" ] && \
 | 
			
		||||
		[ -n "$fw_type" -a -x "${MCU_HS_DIR}/${fw_type}.sh" ] && \
 | 
			
		||||
			"${MCU_HS_DIR}/${fw_type}.sh" "$SECT"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	flock -u 9
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -289,6 +289,10 @@ mcu_sn_check_and_update() {
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Returns:
 | 
			
		||||
# 0 if MCU was requested to boot firmware
 | 
			
		||||
# 1 on error
 | 
			
		||||
# 2 if MCU was requested to reset
 | 
			
		||||
mcu_fw_check_and_update() {
 | 
			
		||||
	local uart="$1"
 | 
			
		||||
	local baud="$2"
 | 
			
		||||
@@ -385,11 +389,13 @@ mcu_fw_check_and_update() {
 | 
			
		||||
 | 
			
		||||
			mcu_req "boot" "$uart" "$baud" "$flow"
 | 
			
		||||
			[ $? -ne 0 ] && return 1
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
			return 0
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return 1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Do we have target firmware installed in the first slot?
 | 
			
		||||
	[ "$firmware" = "$slot0_fw" -a "$slot0_sha" = "$fw0_sha" ] && {
 | 
			
		||||
		mcu_logi "found matching firmware installed in slot '0'"
 | 
			
		||||
@@ -401,6 +407,8 @@ mcu_fw_check_and_update() {
 | 
			
		||||
			# Changing active slots requires MCU reset at the moment
 | 
			
		||||
			mcu_req "reset" "$uart" "$baud" "$flow"
 | 
			
		||||
			[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
			return 2
 | 
			
		||||
		else
 | 
			
		||||
			mcu_req "boot" "$uart" "$baud" "$flow"
 | 
			
		||||
			[ $? -ne 0 ] && return 1
 | 
			
		||||
@@ -411,15 +419,15 @@ mcu_fw_check_and_update() {
 | 
			
		||||
 | 
			
		||||
	mcu_logi "no matching firmware found in slot '0'"
 | 
			
		||||
 | 
			
		||||
	# Upload and boot firmware on single-slot device
 | 
			
		||||
	# Upload firmware and reset on single-slot device
 | 
			
		||||
	[ "$fw_slots" = "1" ] && {
 | 
			
		||||
		mcu_fw_upload "$board" "0" "$firmware" "$uart" "$baud" "$flow"
 | 
			
		||||
		[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
		mcu_req "boot" "$uart" "$baud" "$flow"
 | 
			
		||||
		mcu_req "reset" "$uart" "$baud" "$flow"
 | 
			
		||||
		[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
		return 0
 | 
			
		||||
		return 2
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	# Do we have target firmware installed in the second slot?
 | 
			
		||||
@@ -433,6 +441,8 @@ mcu_fw_check_and_update() {
 | 
			
		||||
			# Changing active slots requires MCU reset at the moment
 | 
			
		||||
			mcu_req "reset" "$uart" "$baud" "$flow"
 | 
			
		||||
			[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
			return 2
 | 
			
		||||
		else
 | 
			
		||||
			mcu_req "boot" "$uart" "$baud" "$flow"
 | 
			
		||||
			[ $? -ne 0 ] && return 1
 | 
			
		||||
@@ -461,7 +471,7 @@ mcu_fw_check_and_update() {
 | 
			
		||||
	mcu_req "reset" "$uart" "$baud" "$flow"
 | 
			
		||||
	[ $? -ne 0 ] && return 1
 | 
			
		||||
 | 
			
		||||
	return 0
 | 
			
		||||
	return 2
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
mcu_add_uci_config() {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ add_rate() {
 | 
			
		||||
	config_get ssid "$cfg" ssid
 | 
			
		||||
	config_get ingress "$cfg" ingress
 | 
			
		||||
	config_get egress "$cfg" egress
 | 
			
		||||
	ubus call ratelimit defaults_set '{"name": "'$ssid'", "rate_ingress": "'$ingress'mbit", "rate_egress": "'$egress'mbit" }'
 | 
			
		||||
	ubus call ratelimit defaults_set "{\"name\": \"$ssid\", \"rate_ingress\": \""$ingress"mbit\", \"rate_egress\": \""$egress"mbit\" }"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
reload_service() {
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ let pending_events = [];
 | 
			
		||||
function config_load() {
 | 
			
		||||
	uci.load('event');
 | 
			
		||||
	config = uci.get_all('event');
 | 
			
		||||
	wan_ports = config.config?.wan_ports || [ 'eth0' ];
 | 
			
		||||
	wan_ports = config.config?.wan_port || [ 'eth0' ];
 | 
			
		||||
 | 
			
		||||
	if (config.wifi?.filter == '*')
 | 
			
		||||
		config.wifi.filter = [ 'probe', 'auth', 'assoc', 'disassoc', 'deauth', 'local-deauth', 'inactive-deauth', 'key-mismatch', 'beacon-report', 'radar-detected' ];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user