Commit Graph

57 Commits

Author SHA1 Message Date
John Crispin
9767157b8b opensync: only set dfs options for 5G and 5GU
Previously anything !wifi0 was assumed to be DFS capable.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
322d5130e7 opensync: add ec430 to tip.sh
On the ec420, the wifi devices names were not updated yet.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
da2a0dcd31 opensync: set vid to 1 inside the state table
we will get a table constraint violation otherwise.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
dbcae12a79 opensync: add ct-fwcfg and tip-data for tplink APs
* make sure the correct fwcfg is present
* set the correct tip data in /etc/config/system

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
c0e19653fc opensync: preserve certificates during sysupgrade
Make sure that sysupgrade carries the certificates over to the new firmware.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
d75651171f batman: backport latest version
the 19.07 version of batman breaks with v5.7 backports.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
Yashvardhan
1f5b46b51e Opensync: fix sysupgrade
The current script was using the wrong upgrade file and incorrectly deleted
$TMPDIR after it was done.

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2020-07-29 14:17:39 +02:00
Arif Alam
61bb9aee32 opensync: add noise floor reporting
- Add noise floor reporting to survey stats
- Fix survey stats

Signed-off-by: Arif Alam <arif.alam@connectus.ai>
2020-07-29 14:17:39 +02:00
John Crispin
a98b0eac77 ecw5211: make the board use the unified opensync target
Drop the vendor specific target. Also fix ct-fwcfg for this board.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
def5a919f0 opensync: disable hapd notifications
These were only added to test the ubus API. We dont really need them.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
4f67ca0e4b opensync: fix license headers
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
1b168a811e opensync: add kernel crash detection
This feature makes use of the crashlog driver in the kernel. If we experience
an oops, the kernel will store the stack trace inside /sys/kernel/debug/crashlog.
OpenSync will then add an entry to the Alarms table. The could can then retrieve
the crashlog via the Command_config table.

A crash can be simulated with
   echo c > /proc/sysrq-trigger

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
50f26d1b20 opensync: move default cloud keys in wlan-ap-keys
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
43405aab0a opensync: cleanup the unified build target
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
43573f67e8 opensync: stop and disable the webserver
Once the AP connected to the cloud for the first time we wait 5 minutes.
Once that period is over we stop and disable the webserver. It is only
intended for initial WAN bringup during deployment.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-29 14:17:39 +02:00
John Crispin
5801193ec0 wlan-ap-config: set hostname
Use OpenAp-${eth0_mac:6} as default hostname.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-24 09:43:28 +02:00
Yashvardhan
7215d000d9 opensync: Support FW upgrade from a tar package
- Added support to upgrade firmware from a URL to a FW tar/tar.gz package
 - Checksum validation using sha256sum
 - Some error handling
 - Added support to share the firmware tar name to the gateway

Signed-off-by: Yashvardhan <yashvardhan@netexperience.com>
2020-07-24 09:08:32 +02:00
John Crispin
3affbc1cad QualComm/AX: add Hawkeye and Cypress support
This series is based on
* 2020-07-10 ipq6018-ilq-11-0_qca_oem-034672b0676c37b1f4519e5720e18e95fe6236ef

Add support for
* qsdk kernel/v4.4
* qsdk ethernet subsystem
* v5.7 ath11k backport + QualComm staging patches (wlan_ap_1.0)
* ath11k-firmware
* hostapd/iw/...

Feature support
* full boot, system detection
* sysupgrade to nand
* HE support via latest hostapd
* driver support for usb, crypto, hwmon, cpufreq, ...

Missing
* NSS/HW flow offloading - FW blob is not redistributable

Using the qsdk v4.4 is an intermediate solution while the vanilla is being
tested. Vanilla kernel is almost on feature par. Work has already started
to upstream the ethernet and switch drivers. Once complete the target will
be fully upstream.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-23 18:54:03 +02:00
John Crispin
7690787c9f opensync: add command manager
This allows us to trigger remote commands, such as tcpdump.
Also allow configuring NTP and remote syslog.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-23 18:54:03 +02:00
John Crispin
866b4b7eae wlan-ap-config: move all config/uvi-defaults scripts into the same package
When adding a new baord we had to edit files all over the tree. After this patch
they are all located in the same folder.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-23 17:10:56 +02:00
John Crispin
d33b6face5 wlan-ap-config: add ath10k fwcfg files
These files get loaded by the FW and allow us to tweak the internal settings.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-23 17:10:56 +02:00
Arif Alam
f237d4104e opensync: add interface name mappings for ECW5410, ECW5211, and AP2220
Signed-off-by: Arif Alam <arif.alam@connectus.ai>
2020-07-22 14:58:04 +02:00
John Crispin
d03fe7228a opensync: fixed rate-limit
The current code was reporting invalid state back to the cloud incase
rate-limit was not actually enabled.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-22 14:58:04 +02:00
Ammad Rehmat
49b7d42203 opensync: enable 802.11v provisioning
This patch enables the required hapd options based on the btm column.

Signed-off-by: Ammad Rehmat <ammad.rehmat@connectus.ai>
2020-07-22 14:58:04 +02:00
John Crispin
1bab63de00 opensync: add command manager
This adds 2 new tables
* CommandConfig
* CommandState

This allows us to remotely trigger, tcpdump, remote syslog, ...

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-22 14:58:04 +02:00
John Crispin
43444774f0 opensync: extend ubus API
We need to be able to pass a different ev_loop context.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-22 14:58:04 +02:00
John Crispin
bd28d088fc lldpd: select package and configure it
This patch makes sure lldpd is installed and comes up with the correct
configuration.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-22 14:58:04 +02:00
Chaitanya Kiran Godavarthi
fb4c7dc852 nft-ssid-ratelimit: Add new package nft-ssid-ratelimit
Add new package which has scripts for ssid client ratelimiting.
Adds rules for ssid ratelimiting and client ratimiting based on
'wireless' config file options 'drate'(ssid dl), 'urate'(ssid ul),
'cdrate'(client dl), and 'curate' (client ul).

Signed-off-by: Chaitanya Kiran Godavarthi <chaitanya.kiran@connectus.ai>
2020-07-22 14:58:04 +02:00
Chaitanya Kiran Godavarthi
f7e637467f opensync: Addd hotplug script for ratelimiting
Add hotplug script for rate limiting to occur
when a wifi interface comes up.

Signed-off-by: Chaitanya Kiran Godavarthi <chaitanya.kiran@connectus.ai>
2020-07-22 14:58:04 +02:00
Chaitanya Kiran Godavarthi
b103acbf6e opensync: Add ssid client rate limiting
-Add custom options row in Wifi_VIF_Config/State
-Add ssid-ratelimiting parameters:
	ssid_ratelimit_en: Enable/disable ssid rate limiting
	ssid_ul_limit: ssid upload limit in kbytes/sec
	ssid_dl_limit: ssid download limit in kbytes/sec
	client_ul_limit: client upload limit in kbytes/sec
	client_dl_limit: client download limit in kbytes/sec

Signed-off-by: Chaitanya Kiran Godavarthi <chaitanya.kiran@connectus.ai>
2020-07-22 14:58:04 +02:00
John Crispin
22f43634f3 opensync: add a unified build target
With this patch applied we do not need build variants anymore.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-22 14:58:04 +02:00
John Crispin
56c199f589 opensync: dont use the @wan syntax
The @ syntax reference the L3 device. This means a child interface will not
be brought up if the underlying parent is still pending.

This can be seen if we have br-wan and br-wan.100. Both have proto dhcp.
The vlan interface wont come up until the wan interface has an IP.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-20 13:04:43 +02:00
John Crispin
61c71fb7a3 opensync: only update vif state when the vap is up
Check of the vap exists before updating it. Reading life data will
otherwise fail.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-20 13:04:33 +02:00
John Crispin
0e6ce72ac7 opensync: fix wan6
With wan having become a bridge we need to update the wan6 ifname to @wan.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-16 19:30:44 +02:00
Nagendrababu Bonkuri
93ed4b9532 opensync: Resolving radios turn-off problem when supplying the maclist for allow/deny
Signed-off-by: Nagendrababu Bonkuri <nagendrababu.bonkuri@connectus.ai>
2020-07-16 16:18:34 +02:00
John Crispin
55f5fb7232 opensync: make factory reset and reboot work
We can now trigger remote reboot and factory reset using the firmware
upgrade code. Simply sending the URL "reboot" or "factory" is enough.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
Nagendrababu Bonkuri
dfa02dbdde opensync: add maclist support
Allow sending down macfilters from the cloud.

Signed-off-by: Nagendrababu Bonkuri <nagendrababu.bonkuri@connectus.ai>
2020-07-15 18:03:17 +02:00
John Crispin
a34d844742 opensync: add vlan support
When we bring up a VLAN we need to add several sections to make openwrt
aware of the new vlan network.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
John Crispin
2255d34fe2 opensync: turn wan into a bridge and enable vlan_filtering
We want wan and lan to be a bridge with vlan_filtering enabled.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
John Crispin
54546f51ba opensync: extend the uci helper
The VLAN support requires us to create and delete sections.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
John Crispin
bf054a6485 wpad-basic: disable wpad-basic
Explicitly turn of the package inside the wlan-ap profile.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
John Crispin
0ed40af0ff opensync: sysupgrade should preserve configuration
The plume code passed the -n option which does not preserve config over
sysupgrade to the new system.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-15 18:03:17 +02:00
Nagendrababu Bonkuri
6592530ab1 opensync: enhance/fix client stats support
* add missing fields
* send delta and not absolute values

Signed-off-by: Nagendrababu Bonkuri <nagendrababu.bonkuri@netexperience.com>
2020-07-15 18:03:17 +02:00
John Crispin
8dd5935707 hostapd: disable wpad-mini/basic
We require the eap version of the package. Default_packages was leaking in
the the wrong variant. Rather than patching every target we just make the
variant non available.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-14 09:19:27 +02:00
John Crispin
4345d8f69f opensync: add statistics elements to header files
These missing declarations were breaking the stats module.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 15:02:19 +02:00
John Crispin
7831ce8899 ath10k-ct-firmware: update to latest .19 builds
Update names and hashes to latest version 19.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 11:57:22 +02:00
John Crispin
289760f62e opensync: add support for writing list options
Extend the blob_to_uci helper to allow writing lists to uci files.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 11:57:22 +02:00
John Crispin
6a401b74ab mac80211: disable dynamic wifi reload
This is a new feature from OpenWrt HEAD that breaks when using APVLAN.
Disable it while we test.

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 11:57:22 +02:00
John Crispin
d8091386bf opensync: update to 2.0.5.0
Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 11:57:22 +02:00
John Crispin
a46024e64e python3-markupsafe: add package
This package is required by opensync-2.0.5.0

Signed-off-by: John Crispin <john@phrozen.org>
2020-07-10 11:57:21 +02:00