mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-29 09:32:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			60 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 4544419eb73082124fa63226b5f9bdf5625b06ce Mon Sep 17 00:00:00 2001
 | |
| From: John Crispin <john@phrozen.org>
 | |
| Date: Sun, 5 Dec 2021 10:43:34 +0100
 | |
| Subject: [PATCH 15/68] base-files: add wifi scanning radio support to
 | |
|  board_detect
 | |
| 
 | |
| Signed-off-by: John Crispin <john@phrozen.org>
 | |
| ---
 | |
|  package/base-files/files/bin/board_detect              |  1 +
 | |
|  package/base-files/files/lib/functions/uci-defaults.sh | 10 ++++++++++
 | |
|  package/base-files/files/sbin/wifi                     |  2 ++
 | |
|  3 files changed, 13 insertions(+)
 | |
| 
 | |
| diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect
 | |
| index 94f45bec53..86edc5be0c 100755
 | |
| --- a/package/base-files/files/bin/board_detect
 | |
| +++ b/package/base-files/files/bin/board_detect
 | |
| @@ -12,3 +12,4 @@ CFG=$1
 | |
|  }
 | |
|  
 | |
|  [ -s "$CFG" ] || return 1
 | |
| +wifi config
 | |
| diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
 | |
| index a37e8cf824..c831469a24 100644
 | |
| --- a/package/base-files/files/lib/functions/uci-defaults.sh
 | |
| +++ b/package/base-files/files/lib/functions/uci-defaults.sh
 | |
| @@ -634,6 +634,16 @@ ucidef_set_hostname() {
 | |
|  	json_select ..
 | |
|  }
 | |
|  
 | |
| +ucidef_set_wifi_scanning() {
 | |
| +	local path="$1"
 | |
| +
 | |
| +	json_select_object wifi
 | |
| +		json_select_object $path
 | |
| +			json_add_boolean scanning 1 
 | |
| +		json_select ..
 | |
| +	json_select ..
 | |
| +}
 | |
| +
 | |
|  ucidef_set_ntpserver() {
 | |
|  	local server
 | |
|  
 | |
| diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
 | |
| index a3d3206ee7..861feb72e6 100755
 | |
| --- a/package/base-files/files/sbin/wifi
 | |
| +++ b/package/base-files/files/sbin/wifi
 | |
| @@ -1,6 +1,8 @@
 | |
|  #!/bin/sh
 | |
|  # Copyright (C) 2006 OpenWrt.org
 | |
|  
 | |
| +[ -f /etc/board.json ] || exit 0
 | |
| +
 | |
|  . /lib/functions.sh
 | |
|  . /usr/share/libubox/jshn.sh
 | |
|  
 | |
| -- 
 | |
| 2.34.1
 | |
| 
 | 
