Merge pull request #2768 from herbetom/add_gl-xe300
ath79-nand: add support for GL.iNet GL-XE300
This commit is contained in:
		
						commit
						9a4395d048
					
				@ -147,6 +147,7 @@ ath79-nand
 | 
			
		||||
 | 
			
		||||
  - GL-AR300M
 | 
			
		||||
  - GL-AR750S
 | 
			
		||||
  - GL-XE300
 | 
			
		||||
 | 
			
		||||
* Netgear
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -43,6 +43,10 @@ local function setup_ncm_qmi(devpath, control_type, delay)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if platform.match('ath79', 'nand', {
 | 
			
		||||
	'glinet,gl-xe300',
 | 
			
		||||
}) then
 | 
			
		||||
	setup_ncm_qmi('/dev/cdc-wdm0', 'qmi', 15)
 | 
			
		||||
elseif platform.match('ath79', 'nand', {
 | 
			
		||||
	'zte,mf281',
 | 
			
		||||
}) then
 | 
			
		||||
	setup_ncm_qmi('/dev/ttyACM0', 'ncm', 15)
 | 
			
		||||
 | 
			
		||||
@ -74,6 +74,7 @@ end
 | 
			
		||||
function M.is_cellular_device()
 | 
			
		||||
	if M.match('ath79', 'nand', {
 | 
			
		||||
		'zte,mf281',
 | 
			
		||||
		'glinet,gl-xe300',
 | 
			
		||||
	}) then
 | 
			
		||||
		return true
 | 
			
		||||
	elseif M.match('ipq40xx', 'generic', {
 | 
			
		||||
 | 
			
		||||
@ -3,18 +3,26 @@
 | 
			
		||||
START=96
 | 
			
		||||
 | 
			
		||||
start() {
 | 
			
		||||
	local custom_led
 | 
			
		||||
 | 
			
		||||
	/etc/init.d/led start
 | 
			
		||||
 | 
			
		||||
	. /etc/diag.sh
 | 
			
		||||
 | 
			
		||||
	get_status_led 2> /dev/null
 | 
			
		||||
 | 
			
		||||
	if [ -z $status_led ]; then
 | 
			
		||||
	if [ -z "$status_led" ]; then
 | 
			
		||||
		status_led="$running"
 | 
			
		||||
	fi
 | 
			
		||||
	if [ -z $status_led ]; then
 | 
			
		||||
 | 
			
		||||
	if [ -z "$status_led" ]; then
 | 
			
		||||
		status_led="$boot"
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	custom_led="$(lua -e 'print(require("gluon.setup-mode").get_status_led() or "")')"
 | 
			
		||||
	if [ -z "$status_led" ]; then
 | 
			
		||||
		status_led="$custom_led"
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	status_led_set_timer 1000 300
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,14 @@
 | 
			
		||||
local platform = require 'gluon.platform'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
local M = {}
 | 
			
		||||
 | 
			
		||||
function M.get_status_led()
 | 
			
		||||
	if platform.match('ath79', 'nand', {
 | 
			
		||||
		'glinet,gl-xe300',
 | 
			
		||||
	}) then
 | 
			
		||||
		return "green:wlan"
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
return M
 | 
			
		||||
@ -23,6 +23,9 @@ device('gl.inet-gl-ar750s-nor', 'glinet_gl-ar750s-nor', {
 | 
			
		||||
	packages = ATH10K_PACKAGES_QCA9887,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
device('gl.inet-gl-xe300', 'glinet_gl-xe300', {
 | 
			
		||||
	factory = false,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
-- Netgear
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user