local ATH10K_PACKAGES_IPQ40XX = {
	'kmod-ath10k',
	'-kmod-ath10k-ct',
	'-kmod-ath10k-ct-smallbuffers',
	'ath10k-firmware-qca4019',
	'-ath10k-firmware-qca4019-ct',
}
local ATH10K_PACKAGES_IPQ40XX_QCA9888 = {
	'kmod-ath10k',
	'-kmod-ath10k-ct',
	'-kmod-ath10k-ct-smallbuffers',
	'ath10k-firmware-qca4019',
	'-ath10k-firmware-qca4019-ct',
	'ath10k-firmware-qca9888',
	'-ath10k-firmware-qca9888-ct',
}


defaults {
	packages = ATH10K_PACKAGES_IPQ40XX,
}


-- Aruba

device('aruba-ap-303', 'aruba_ap-303', {
	factory = false,
	aliases = {'aruba-instant-on-ap11'},
})

device('aruba-ap-303h', 'aruba_ap-303h', {
	factory = false,
	aliases = {'aruba-instant-on-ap11d'},
})

device('aruba-ap-365', 'aruba_ap-365', {
	factory = false,
	aliases = {'aruba-instant-on-ap17'},
})


-- AVM

device('avm-fritz-box-4040', 'avm_fritzbox-4040', {
	factory = false,
	extra_images = {
		{'-squashfs-eva', '-bootloader', '.bin'},
	},
})

device('avm-fritz-box-7530', 'avm_fritzbox-7530', {
	factory = false,
	aliases = {'avm-fritz-box-7520'},
	packages = {
		-- same as ATH10K_PACKAGES_IPQ40XX
		'kmod-ath10k',
		'-kmod-ath10k-ct',
		'-kmod-ath10k-ct-smallbuffers',
		'ath10k-firmware-qca4019',
		'-ath10k-firmware-qca4019-ct',

		-- VDSL modem
		'-kmod-ltq-vdsl-vr11',
		'-kmod-ltq-vdsl-vr11-mei',
		'-ltq-vdsl-vr11-app',
		'-ltq-dsl-base',
		'-kmod-atm',
		'-linux-atm',
	},
})

device('avm-fritz-repeater-1200', 'avm_fritzrepeater-1200', {
	factory = false,
})


-- GL.iNet

device('gl.inet-gl-ap1300', 'glinet_gl-ap1300', {
	factory_ext = '.ubi',
})

device('gl.inet-gl-b1300', 'glinet_gl-b1300', {
	factory = false,
})


-- Linksys

device('linksys-ea6350v3', 'linksys_ea6350v3')


-- Meraki

device('meraki-mr33-access-point', 'meraki_mr33', {
	packages = {
		-- radio0 is monitoring radio - removed for now
		-- the -ct firmware does not have working mesh
		'-ath10k-firmware-qca9887-ct',
		'-ath10k-board-qca9887',
	},
	factory = false,
	broken = true,
	-- case must be opened to install
	-- the board also bricks the SoC on newer bootloader-versions which is irreversible
	-- third radio not yet working
})


-- NETGEAR

device('netgear-ex6100v2', 'netgear_ex6100v2', {
	factory_ext = '.img',
})

device('netgear-ex6150v2', 'netgear_ex6150v2', {
	factory_ext = '.img',
})


-- OpenMesh

device('openmesh-a42', 'openmesh_a42')

device('openmesh-a62', 'openmesh_a62', {
	packages = ATH10K_PACKAGES_IPQ40XX_QCA9888,
})


-- Plasma Cloud

device('plasma-cloud-pa1200', 'plasmacloud_pa1200')

device('plasma-cloud-pa2200', 'plasmacloud_pa2200', {
	packages = ATH10K_PACKAGES_IPQ40XX_QCA9888,
})


-- ZTE

device('zte-mf289f', 'zte_mf289f', {
	broken = true,	-- case must be opened to install
	factory = false,
})


-- Zyxel

device('zyxel-nbg6617', 'zyxel_nbg6617')


-- 8devices

device('8devices-jalapeno', '8dev_jalapeno', {
	factory_ext = '.ubi',
})
