Compare commits

...

36 Commits

Author SHA1 Message Date
Matthias Schiffer
9f1c00050c
docs, README: Gluon v2016.2.2 2016-12-18 23:15:12 +01:00
Matthias Schiffer
9bda217498
docs: add release notes for Gluon v2016.2.2 2016-12-17 03:56:42 +01:00
Matthias Schiffer
42035cafd8
docs: index: add TP-Link TL-WA801N/ND v3 to hardware list 2016-12-17 03:12:27 +01:00
Matthias Schiffer
1e0bc1b4f3
ar71xx-generic: update support list for CPE210/510/...
Fixes #975
2016-12-12 13:50:18 +01:00
Matthias Schiffer
a51f4e907f
docs: feature/roles: remove another outdated sentence 2016-12-07 11:47:33 +01:00
Matthias Schiffer
79edc73818
docs: feature/roles: update outdates site config docs 2016-12-07 11:47:13 +01:00
Matthias Schiffer
62f8a7e786
ar71xx: fix LEDs and sysupgrade support for TL-WA801ND v3, remove BROKEN 2016-12-06 19:02:59 +01:00
Sven Eckelmann
9ad10b59e2
openwrt: Remove extra soc check in ath79_gpio_output_select (#965)
The  assignment of the gpio_count and reg_base in ath79_gpio_output_select
takes care that only supported platforms can use ath79_gpio_output_select.
But the rebase of the patches after the last OpenWrt base update
accidentally added an extra check for the SoC which was missing support
soc_is_qca955x().

Boots on QCA955X devices which were using ath79_gpio_output_select stopped
with

    Kernel bug detected[#1]:
    [...]
    Call Trace:
    [<803e6174>] ath79_gpio_output_select+0x30/0xe8
    [<803ed590>] om5p_acv2_setup+0x24/0x200
    [<803e4dc0>] ath79_setup+0x28/0x38
    [<80069ac8>] do_one_initcall+0x148/0x1ec
    [<803e2cc4>] kernel_init_freeable+0x150/0x208
    [<80065218>] kernel_init+0x10/0x114
    [<80060878>] ret_from_kernel_thread+0x14/0x1c

Fixes: a22c1d5670 ("Update OpenWrt base")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2016-12-05 10:43:05 +01:00
Matthias Schiffer
185d3eb8c8
gluon-mesh-batman-adv-core: respondd: correctly detect lower interface types (#954)
Fixes #941
2016-12-03 13:22:48 +01:00
Matthias Schiffer
9dbe9f785d
gluon-next-node: fix ebtables rules without next_node.ip4 2016-11-30 15:30:21 +01:00
Sven Eckelmann
d54c9c5fb7 kernel: add at803x workaround for sgmii mode (#950)
Some (possibly broken) bootloaders incorrectly initialize the at8033 phy.
This breaks auto-negotation on these SGMII devices. The mode has therefore
to be set back in to a valid configuration by Linux.

Fixes #911
2016-11-29 15:30:02 +01:00
Matthias Schiffer
59deb2064d
gluon-core, gluon-setup-mode: fix WAN/LAN assignment on CPE210
The interfaces were accidentially switched when the CPE210 was separated
from the CPE510 code.
2016-11-22 20:02:36 +01:00
Matthias Schiffer
3f8672afb8
build: clean up postinst scripts after build
OpenWrt does this by default to save some space.
2016-11-22 18:32:22 +01:00
Matthias Schiffer
f9072a3641
build: fix setting of opkg tmpdir
Don't use system /tmp for build.
2016-11-22 18:32:19 +01:00
Matthias Schiffer
448ea1001e
docs: user/site: improve mcast_rate description 2016-11-16 18:24:45 +01:00
Matthias Schiffer
9c0a0898ea
ar71xx, ramips: reduce CPU load and flickering on devices using rsslieds
Fixes #897
2016-11-16 01:55:49 +01:00
Vieno Foo
3d568f377b
docs: fix typo in features/wlan-configuration 2016-11-15 22:46:49 +01:00
Matthias Schiffer
d43147a8e0
ath9k: fix ath9k_hw_gpio_get() to return 0 or 1 on success
Fixes the Ubiquiti UAP Outdoor+ HSR.
2016-11-15 19:30:18 +01:00
Andreas Ziegler
ec35c65d34
x86: add mmc drivers to generic and 64 subtargets 2016-11-14 22:40:07 +01:00
Andreas Ziegler
2592e98e82
x86-64: add pata drivers 2016-11-14 22:40:07 +01:00
Matthias Schiffer
85ddc089ef
ar71xx-generic: backport region code support for TP-Link TL-WR841ND v11 2016-11-11 03:46:45 +01:00
Matthias Schiffer
d472604a43
linux-firmware: switch back to git protocol from https for download
Using HTTPS breaks the download on Debian Wheezy. The switch was an
unintended side effect of the backport from LEDE.

Also, fix the commit message of the backport patch (mwlwifi is not updated
anymore since the last OpenWrt base upgrade).

Fixes #919
2016-11-10 03:31:57 +01:00
Kevin Olbrich
c47514c535 docs: user/site: fix typo (#924) 2016-11-08 23:19:50 +01:00
Matthias Schiffer
383af2adf0
docs, README: Gluon v2016.2.1 2016-11-08 17:10:53 +01:00
Matthias Schiffer
f4941e8815
docs: add v2016.2.1 release notes 2016-11-07 15:06:29 +01:00
Matthias Schiffer
2ed35dae12
ar71xx: fix syntax error in /etc/uci-defaults/01_leds 2016-11-05 04:36:47 +01:00
Matthias Schiffer
1c3d97889a
Update OpenWrt base 2016-11-02 17:37:24 +01:00
Brother-Lal
00fdc37301
gluon-status-page: add hint to enable JavaScript if it is disabled (#913) 2016-11-02 17:37:18 +01:00
Brother-Lal
f2a52c285c
fix error in statuspage if cookies are disabled (#912)
If cookies are disabled, the Statuspage only displays an empty ("Not connected")
This checks if the localStorage API is available and working and only uses it in this case
Also allows better backwards compatibility.
2016-11-02 17:37:14 +01:00
Matthias Schiffer
e857bbc5a3
ar71xx-generic: set region code for TL-WA901ND v4 and remove BROKEN
Tested-by: Jannis Pinter <jannis@pinterjann.is>
2016-11-02 17:36:53 +01:00
Matthias Schiffer
8af15f243c
ath9k: remove intermediate queueing patch
The downgraded version of ath9k was reported to cause issues with Windows
clients before. Remove the problematic patch.
2016-11-02 17:36:49 +01:00
Matthias Schiffer
296f0f4cf7
Downgrade mac80211 to LEDE 6c2651566cce8f5b3a3d3b976439dee2bac5e07e
In addition, the temperature compensation support patch is reverted.

It seems that newer mac80211 version are less stable, so we downgrade it
for now.
2016-11-02 17:36:46 +01:00
Matthias Schiffer
1819883d77
kernel: add fix for CVE-2016-7117
This probably doesn't affect Gluon as nothing is using recvmmsg, but it's
still a good idea to get this fixed ASAP.
2016-11-02 17:36:39 +01:00
Matthias Schiffer
a22c1d5670
Update OpenWrt base 2016-11-02 17:36:03 +01:00
Matthias Schiffer
a54e7654cd
mac80211: backport ath9k stability fix 2016-09-30 18:15:26 +02:00
Simon Joda Stößer
ea2abfb9ef
docs: fixed link to issue #414 in v2016.2 release notes (#895) 2016-09-30 16:03:24 +02:00
131 changed files with 11830 additions and 7274 deletions

View File

@ -379,7 +379,7 @@ BIN_DIR = $(PROFILE_BUILDDIR)/images
TARGET_DIR = $(PROFILE_BUILDDIR)/root
OPKG:= \
IPKG_TMP="$(TMP_DIR)/ipkgtmp" \
TMPDIR="$(TMP_DIR)" \
IPKG_INSTROOT="$(TARGET_DIR)" \
IPKG_CONF_DIR="$(TMP_DIR)" \
IPKG_OFFLINE_ROOT="$(TARGET_DIR)" \
@ -415,6 +415,7 @@ package_install: FORCE
+$(GLUONMAKE) enable_initscripts
rm -f $(TARGET_DIR)/usr/lib/opkg/lists/* $(TARGET_DIR)/tmp/opkg.lock
rm -f $(TARGET_DIR)/usr/lib/opkg/info/*.postinst*
# Remove opkg database when opkg is not intalled
if [ ! -x $(TARGET_DIR)/bin/opkg ]; then rm -rf $(TARGET_DIR)/usr/lib/opkg; fi

View File

@ -19,7 +19,7 @@ the future development of Gluon.
Please refrain from using the `master` branch for anything else but development purposes!
Use the most recent release instead. You can list all relaseses by running `git branch -a`
and switch to one by running `git checkout v2016.2 && make update`.
and switch to one by running `git checkout v2016.2.2 && make update`.
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
If you upgrade using random master commits the nodes *will break* eventually.

View File

@ -54,9 +54,9 @@ copyright = '2015-2016, Project Gluon'
# built documents.
#
# The short X.Y version.
version = '2016.2'
version = '2016.2.2'
# The full version, including alpha/beta/rc tags.
release = '2016.2'
release = '2016.2.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -2,7 +2,7 @@ Roles
=====
It is possible to define a set of roles you want to distinguish at backend side. One node can own one
role which it will announce via alfred inside the mesh. This will make it easier to differentiate
role which it will announce via alfred inside the mesh. This will make it easier to differentiate
nodes when parsing alfred data. E.g to count only **normal** nodes and not the gateways
or servers (nodemap). A lot of things are possible.
@ -11,18 +11,20 @@ For this the section ``roles`` in ``site.conf`` is needed::
roles = {
default = 'node',
list = {
node = 'Normal Node',
test = 'Test Node',
backbone = 'Backbone Node',
service = 'Service Node',
'node',
'test',
'backbone',
'service',
},
},
The strings to display in the LuCI interface are configured per language in the
``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
The value of ``default`` is the role every node will initially own. This value should be part of ``list`` as well.
If you want node owners to change the defined roles via config-mode you can add the package
``gluon-luci-node-role`` to your ``site.mk``. Then, you can select one of the defined roles from a dropdown list
where the right-handed value is the one which is displayed and the left-handed key the one which is configured into
the system.
``gluon-luci-node-role`` to your ``site.mk``.
The role is saved in ``gluon-node-info.system.role``. To change the role using command line do::

View File

@ -13,7 +13,7 @@ Upgrade behaviour
For each of these networks, the site configuration may define a `disabled` flag (by
default, all configured networks are enabled). This flag is merely a default setting,
on upgrades the existing setting is always retained (as this setting may have been changed
by the user). This means that is is not possible to enable or disable an existing network
by the user). This means that it is not possible to enable or disable an existing network
configurations during upgrades.
For the "mesh" and "ibss" networks, the default setting only has an effect if none

View File

@ -64,6 +64,8 @@ Releases
.. toctree::
:maxdepth: 1
releases/v2016.2.2
releases/v2016.2.1
releases/v2016.2
releases/v2016.1.6
releases/v2016.1.5
@ -169,11 +171,11 @@ ar71xx-generic
- TL-WA701N/ND (v1, v2)
- TL-WA750RE (v1)
- TL-WA7510N (v1)
- TL-WA801N/ND (v1, v2)
- TL-WA801N/ND (v1, v2, v3)
- TL-WA830RE (v1, v2)
- TL-WA850RE (v1)
- TL-WA860RE (v1)
- TL-WA901N/ND (v1, v2, v3)
- TL-WA901N/ND (v1, v2, v3, v4)
- TL-WDR3500 (v1)
- TL-WDR3600 (v1)
- TL-WDR4300 (v1)

View File

@ -0,0 +1,59 @@
Gluon 2016.2.1
==============
Added hardware support
~~~~~~~~~~~~~~~~~~~~~~
ar71xx-generic
^^^^^^^^^^^^^^
* TP-Link
- TL-WA901ND v4
Bugfixes
~~~~~~~~
* Make status page work with disabled cookies/local storage
(`#912 <https://github.com/freifunk-gluon/gluon/pull/912>`_)
* Update kernel to 3.18.44
Fixes CVE-2016-5195 and CVE-2016-7117. It is unlikely that these issues pose
a threat to usual Gluon setups, but installing additional packages may make a
system vulnerable. In any case, updating is highly recommended.
* Downgrade mac80211 to an earlier state
Unfortunately, a mac80211 update that was done shortly before the release of
Gluon v2016.2 (that seemed necessary to properly support ath10k devices) had
again caused severe ath9k stability issues that remained unreported until v2016.2
was out.
We have now reverted mac80211 to an earlier state that was reported to be very
stable (while keeping the ath10k-specific changes); in addition, some patches
that were reported to cause connection or performance issues with certain clients
have been reverted. While is it still not perfectly stable, is should be at least
as good as (and probably better than) the v2016.1.x release series.
Known Issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.
* Git HTTPS downloads from git.kernel.org fail on Debian Wheezy (`#919 <https://github.com/freifunk-gluon/gluon/issues/919>`_)
The GnuTLS version on Debian Wheezy is too old and can't establish a connection with
git.kernel.org anymore. A newer GnuTLS version is available in wheezy-backports, but
as there is no libcurl3-gnutls package linked against the new version, installing the
new version has no effect.

View File

@ -0,0 +1,78 @@
Gluon 2016.2.2
==============
Added hardware support
~~~~~~~~~~~~~~~~~~~~~~
ar71xx-generic
^^^^^^^^^^^^^^
* TP-Link
- CPE210/510 EU/US versions
- TL-WA801N/ND v3
- TL-WR841ND v11 EU/US versions
Bugfixes
~~~~~~~~
* Fix boot on certain QCA955x-based devices (e.g. OpenMesh OM5P AC v2) (`#965 <https://github.com/freifunk-gluon/gluon/pull/965>`_)
This issue was a regression in Gluon v2016.2.1.
* Build: Fix git downloads from git.kernel.org on Debian Wheezy (`#919 <https://github.com/freifunk-gluon/gluon/issues/919>`_)
We've switched back from HTTPS to the git protocol for now to avoid using
the old GnuTLS version of Debian Wheezy which can't establish a HTTPS connection
with git.kernel.org anymore.
This issue was a regression in Gluon v2016.2.
* Fix RX filter of Ubiquiti UAP Outdoor+ (`d43147a8e03d <https://github.com/freifunk-gluon/gluon/commit/d43147a8e03dd17bc27e4ab203736f2151f9db3d>`_)
This issue was a regression in Gluon v2016.2.
* Fix switched WAN/LAN interface assignment on CPE210 (`59deb2064d54 <https://github.com/freifunk-gluon/gluon/commit/59deb2064d54a37e27139b76a3b6064f5f10f364>`_)
This issue was a regression in Gluon v2016.2.
* Significantly reduce CPU load used by signal strength LEDs (`#897 <https://github.com/freifunk-gluon/gluon/issues/897>`_)
* Fix ethernet port of the Ubiquiti UAP AC Lite (`#911 <https://github.com/freifunk-gluon/gluon/issues/911>`_)
* Build: Don't use host ``/tmp`` directory (`f9072a36411b <https://github.com/freifunk-gluon/gluon/commit/f9072a36411b92089c697b2c0a564155bfe10bd1>`_)
Fixes build when ``/tmp`` is mounted with *noexec*.
* Fix mesh interface type respondd/alfred announcements when using VLANs over IBSS (`#941 <https://github.com/freifunk-gluon/gluon/issues/941>`_)
* Fix next-node ebtables rules without *next_node.ip4* (`9dbe9f785d2b <https://github.com/freifunk-gluon/gluon/commit/9dbe9f785d2b439c3ebdae365b808ebf42b3cf03>`_)
Gluon v2016.2 added support for using the next-node feature without specifying an IPv4
address. Some scripts had not been adjusted, making the next-node unreliable when
no IPv4 address was specified.
Other changes
~~~~~~~~~~~~~
* x86-generic and x86-64 images now have PATA and MMC support to allow using them
on various devices that were previously unsupported.
* Clean up opkg postinst scripts up on image generation
OpenWrt does this by default to save a little space.
Known Issues
~~~~~~~~~~~~
* Default TX power on many Ubiquiti devices is too high, correct offsets are unknown (`#94 <https://github.com/freifunk-gluon/gluon/issues/94>`_)
Reducing the TX power in the Advanced Settings is recommended.
* The MAC address of the WAN interface is modified even when Mesh-on-WAN is disabled (`#496 <https://github.com/freifunk-gluon/gluon/issues/496>`_)
This may lead to issues in environments where a fixed MAC address is expected (like VMware when promicious mode is disallowed).
* Inconsistent respondd API (`#522 <https://github.com/freifunk-gluon/gluon/issues/522>`_)
The current API is inconsistent and will be replaced eventually. The old API will still be supported for a while.

View File

@ -76,7 +76,7 @@ New features
the ``config_mode.owner.obligatory`` site.conf option
* The *node name* setting in the config mode is no longer restricted to valid DNS
hostnames, but allows any UTF-8 string (`#414 <https://github.com/freifunk-gluon/gluon/issues/#414>`_)
hostnames, but allows any UTF-8 string (`#414 <https://github.com/freifunk-gluon/gluon/issues/414>`_)
* Besides the hostname, public key, site config and primary MAC address, the contact
information can now be accessed from config mode site texts

View File

@ -1,4 +1,4 @@
-- This is an example site configuration for Gluon v2016.2
-- This is an example site configuration for Gluon v2016.2.2
--
-- Take a look at the documentation located at
-- http://gluon.readthedocs.org/ for details.

View File

@ -8,7 +8,7 @@ Gluon's releases are managed using `Git tags`_. If you are just getting
started with Gluon we recommend to use the latest stable release of Gluon.
Take a look at the `list of gluon releases`_ and notice the latest release,
e.g. *v2016.2*. Always get Gluon using git and don't try to download it
e.g. *v2016.2.2*. Always get Gluon using git and don't try to download it
as a Zip archive as the archive will be missing version information.
Please keep in mind that there is no "default Gluon" build; a site configuration
@ -42,7 +42,7 @@ Building the images
-------------------
To build Gluon, first check out the repository. Replace *RELEASE* with the
version you'd like to checkout, e.g. *v2016.2*.
version you'd like to checkout, e.g. *v2016.2.2*.
::

View File

@ -83,7 +83,7 @@ regdom \: optional
regdom = 'DE'
Setting ``regdom`` in mandatory if ``wifi24`` or ``wifi5`` is defined.
Setting ``regdom`` is mandatory if ``wifi24`` or ``wifi5`` is defined.
wifi24 \: optional
WLAN configuration for 2.4 GHz devices.
@ -115,7 +115,8 @@ wifi24 \: optional
An optional parameter ``vlan`` (integer) is supported.
Both ``mesh`` and ``ibss`` accept an optional ``mcast_rate`` (kbit/s) parameter for
setting the default multicast datarate.
setting the multicast bitrate. Increasing the default value of 1000 to something
like 12000 is recommended.
::
wifi24 = {
@ -282,7 +283,7 @@ roles \: optional
part of ``list``. If you want node owners to change the role via config mode add
the package ``gluon-luci-node-role`` to ``site.mk``.
The strings to display in the LuCI interface can be configured per language in the
The strings to display in the LuCI interface are configured per language in the
``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
::

View File

@ -1,7 +1,7 @@
GLUON_FEEDS='openwrt gluon routing luci'
OPENWRT_REPO=git://github.com/openwrt/openwrt.git
OPENWRT_COMMIT=e663db7bb1797740c4a29ac0fc96eda1b88f9e6e
OPENWRT_COMMIT=0f757bd2606971252f901ef3faf4dbd0086315f7
OPENWRT_BRANCH=chaos_calmer
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git

View File

@ -16,7 +16,7 @@ if not (sysconfig.lan_ifname or sysconfig.wan_ifname) then
local lan_ifname = uci:get('network', 'lan', 'ifname')
local wan_ifname = uci:get('network', 'wan', 'ifname')
if platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) then
if platform.match('ar71xx', 'generic', {'cpe210', 'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) then
lan_ifname, wan_ifname = wan_ifname, lan_ifname
end

View File

@ -121,9 +121,31 @@ static void mesh_add_subif(const char *ifname, struct json_object *wireless,
struct json_object *tunnel, struct json_object *other) {
struct json_object *address = gluonutil_wrap_and_free_string(gluonutil_get_interface_address(ifname));
if (interface_file_exists(ifname, "wireless"))
char lowername[IFNAMSIZ];
strncpy(lowername, ifname, sizeof(lowername)-1);
lowername[sizeof(lowername)-1] = 0;
const char *format = "/sys/class/net/%s/lower_*";
char pattern[strlen(format) + IFNAMSIZ];
/* In case of VLAN and bridge interfaces, we want the lower interface
* to determine the interface type (but not for the interface address) */
while (true) {
snprintf(pattern, sizeof(pattern), format, lowername);
size_t pattern_len = strlen(pattern);
glob_t lower;
if (glob(pattern, GLOB_NOSORT, NULL, &lower))
break;
strncpy(lowername, lower.gl_pathv[0] + pattern_len - 1, sizeof(lowername)-1);
globfree(&lower);
}
if (interface_file_exists(lowername, "wireless"))
json_object_array_add(wireless, address);
else if (interface_file_exists(ifname, "tun_flags"))
else if (interface_file_exists(lowername, "tun_flags"))
json_object_array_add(tunnel, address);
else
json_object_array_add(other, address);

View File

@ -1,18 +1,20 @@
local site = require 'gluon.site_config'
local next_node = site.next_node
rule('FORWARD --logical-in br-client -p ARP --arp-ip-src ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-in br-client -p ARP --arp-ip-dst ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -d ' .. next_node.mac .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -s ' .. next_node.mac .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
if next_node.ip4 then
rule('FORWARD --logical-in br-client -p ARP --arp-ip-src ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-in br-client -p ARP --arp-ip-dst ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-destination ' .. next_node.ip4 .. ' -j DROP')
rule('FORWARD --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -p IPv4 --ip-source ' .. next_node.ip4 .. ' -j DROP')
end
rule('FORWARD --logical-out br-client -o bat0 -p IPv6 --ip6-destination ' .. next_node.ip6 .. ' -j DROP')
rule('OUTPUT --logical-out br-client -o bat0 -p IPv6 --ip6-destination ' .. next_node.ip6 .. ' -j DROP')

View File

@ -9,7 +9,7 @@ if sysconfig.setup_ifname then
end
if
platform.match('ar71xx', 'generic', {'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) or
platform.match('ar71xx', 'generic', {'cpe210', 'cpe510', 'nanostation-m', 'nanostation-m-xw', 'unifi-outdoor-plus', 'uap-pro', 'unifiac-pro'}) or
platform.match('ar71xx', 'mikrotik')
then
sysconfig.setup_ifname = sysconfig.config_ifname or sysconfig.wan_ifname or sysconfig.lan_ifname

View File

@ -13,5 +13,6 @@
</script>
</head>
<body>
<noscript>Bitte Javascript aktivieren.</noscript>
</body>
</html>

View File

@ -83,7 +83,17 @@ require([ "bacon"
return a
}
if (localStorage.nodes)
var lsavailable = false
try {
localStorage.setItem("t", "t")
localStorage.removeItem("t")
lsavailable = true
} catch(e) {
lsavailable = false
}
if ( lsavailable && localStorage.nodes)
JSON.parse(localStorage.nodes).forEach(nodesBusIn.push)
nodesBus.map(".nodes").onValue(function (nodes) {
@ -92,7 +102,8 @@ require([ "bacon"
for (var k in nodes)
out.push(nodes[k])
localStorage.nodes = JSON.stringify(out)
if (lsavailable)
localStorage.nodes = JSON.stringify(out)
})
var bootstrap = Helper.getJSON(bootstrapUrl)

View File

@ -5,7 +5,7 @@ Subject: fix UBNT XM model detection
Signed-off-by: Neal Oakey <neal.oakey@bingo-ev.de>
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index dab4d2c..e7b3cd2 100755
index a9dca58..1985c88 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -64,6 +64,40 @@ wndr3700_board_detect() {
@ -49,7 +49,7 @@ index dab4d2c..e7b3cd2 100755
cybertan_get_hw_magic() {
local part
@@ -475,12 +509,14 @@ ar71xx_board_detect() {
@@ -478,12 +512,14 @@ ar71xx_board_detect() {
;;
*"Bullet M")
name="bullet-m"
@ -64,7 +64,7 @@ index dab4d2c..e7b3cd2 100755
;;
*"Nanostation M XW")
name="nanostation-m-xw"
@@ -667,6 +703,7 @@ ar71xx_board_detect() {
@@ -685,6 +721,7 @@ ar71xx_board_detect() {
;;
*"Rocket M")
name="rocket-m"

View File

@ -10,7 +10,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of r49105
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d025632..c5c1871 100755
index 762cd76..024e493 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -66,6 +66,10 @@ tplink_get_image_hwid() {
@ -24,7 +24,7 @@ index d025632..c5c1871 100755
tplink_get_image_boot_size() {
get_image "$@" | dd bs=4 count=1 skip=37 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
}
@@ -366,13 +370,17 @@ platform_check_image() {
@@ -373,13 +377,17 @@ platform_check_image() {
}
local hwid

View File

@ -11,7 +11,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of r49106
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index e7b3cd2..180a075 100755
index 1985c88..99c808c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -133,7 +133,7 @@ tplink_board_detect() {

View File

@ -12,7 +12,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of r49107
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 180a075..ddd6611 100755
index 99c808c..4780e2f 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -162,6 +162,10 @@ tplink_board_detect() {

View File

@ -11,7 +11,7 @@ Signed off by: Norbert Wegener <nw@wegener-net.de>
Backport of r47849
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 9a7acbd..d42ceef 100644
index a8073f2..0783381 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -476,6 +476,15 @@ define Device/tl-wr710n-v2

View File

@ -1,37 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 8 May 2016 15:53:14 +0200
Subject: tools: pkg-config: fix build with GCC 6
Fixes the following error:
gdate.c: In function g_date_strftime:
gdate.c:2497:7: error: format not a string literal, format string not checked [-Werror=format-nonliteral]
tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
^~~~~~
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
new file mode 100644
index 0000000..6849299
--- /dev/null
+++ b/tools/pkg-config/patches/001-glib-gdate-suppress-string-format-literal-warning.patch
@@ -0,0 +1,18 @@
+--- a/glib/glib/gdate.c
++++ b/glib/glib/gdate.c
+@@ -2439,6 +2439,9 @@ win32_strftime_helper (const GDate *d,
+ *
+ * Returns: number of characters written to the buffer, or 0 the buffer was too small
+ */
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wformat-nonliteral"
++
+ gsize
+ g_date_strftime (gchar *s,
+ gsize slen,
+@@ -2549,3 +2552,5 @@ g_date_strftime (gchar *s,
+ return retval;
+ #endif
+ }
++
++#pragma GCC diagnostic pop

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of OpenWrt r47363
diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
index b5c88e9..d3a14b2 100644
index 0da8142..2bb4286 100644
--- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
+++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
@@ -529,7 +529,7 @@

View File

@ -1,815 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 8 May 2016 22:06:51 +0200
Subject: tools: mkimage: sync include/linux/compiler*.h with u-boot master
Fixes build with GCC 6.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/tools/mkimage/patches/200-compiler-support.patch b/tools/mkimage/patches/200-compiler-support.patch
new file mode 100644
index 0000000..ca9c5b5
--- /dev/null
+++ b/tools/mkimage/patches/200-compiler-support.patch
@@ -0,0 +1,702 @@
+diff --git b/include/linux/compiler-gcc.h a/include/linux/compiler-gcc.h
+index e057bd2..22ab246 100644
+--- b/include/linux/compiler-gcc.h
++++ a/include/linux/compiler-gcc.h
+@@ -5,14 +5,28 @@
+ /*
+ * Common definitions for all gcc versions go here.
+ */
+-#define GCC_VERSION (__GNUC__ * 10000 \
+- + __GNUC_MINOR__ * 100 \
+- + __GNUC_PATCHLEVEL__)
+-
++#define GCC_VERSION (__GNUC__ * 10000 \
++ + __GNUC_MINOR__ * 100 \
++ + __GNUC_PATCHLEVEL__)
+
+ /* Optimization barrier */
++
+ /* The "volatile" is due to gcc bugs */
+ #define barrier() __asm__ __volatile__("": : :"memory")
++/*
++ * This version is i.e. to prevent dead stores elimination on @ptr
++ * where gcc and llvm may behave differently when otherwise using
++ * normal barrier(): while gcc behavior gets along with a normal
++ * barrier(), llvm needs an explicit input variable to be assumed
++ * clobbered. The issue is as follows: while the inline asm might
++ * access any memory it wants, the compiler could have fit all of
++ * @ptr into memory registers instead, and since @ptr never escaped
++ * from that, it proofed that the inline asm wasn't touching any of
++ * it. This version works well with both compilers, i.e. we're telling
++ * the compiler that the inline asm absolutely may see the contents
++ * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495
++ */
++#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory")
+
+ /*
+ * This macro obfuscates arithmetic on a variable address so that gcc
+@@ -32,58 +46,63 @@
+ * the inline assembly constraint from =g to =r, in this particular
+ * case either is valid.
+ */
+-#define RELOC_HIDE(ptr, off) \
+- ({ unsigned long __ptr; \
+- __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
+- (typeof(ptr)) (__ptr + (off)); })
++#define RELOC_HIDE(ptr, off) \
++({ \
++ unsigned long __ptr; \
++ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
++ (typeof(ptr)) (__ptr + (off)); \
++})
+
+ /* Make the optimizer believe the variable can be manipulated arbitrarily. */
+-#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
++#define OPTIMIZER_HIDE_VAR(var) \
++ __asm__ ("" : "=r" (var) : "0" (var))
+
+ #ifdef __CHECKER__
+-#define __must_be_array(arr) 0
++#define __must_be_array(a) 0
+ #else
+ /* &a[0] degrades to a pointer: a different type from an array */
+-#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
++#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
+ #endif
+
+ /*
+ * Force always-inline if the user requests it so via the .config,
+ * or if gcc is too old:
+ */
+-#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
++#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
+ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
+-# define inline inline __attribute__((always_inline)) notrace
+-# define __inline__ __inline__ __attribute__((always_inline)) notrace
+-# define __inline __inline __attribute__((always_inline)) notrace
++#define inline inline __attribute__((always_inline)) notrace
++#define __inline__ __inline__ __attribute__((always_inline)) notrace
++#define __inline __inline __attribute__((always_inline)) notrace
+ #else
+ /* A lot of inline functions can cause havoc with function tracing */
+-# define inline inline notrace
+-# define __inline__ __inline__ notrace
+-# define __inline __inline notrace
++#define inline inline notrace
++#define __inline__ __inline__ notrace
++#define __inline __inline notrace
+ #endif
+
+-#define __deprecated __attribute__((deprecated))
+-#ifndef __packed
+-#define __packed __attribute__((packed))
+-#endif
+-#ifndef __weak
+-#define __weak __attribute__((weak))
+-#endif
++#define __always_inline inline __attribute__((always_inline))
++#define noinline __attribute__((noinline))
++
++#define __deprecated __attribute__((deprecated))
++#define __packed __attribute__((packed))
++#define __weak __attribute__((weak))
++#define __alias(symbol) __attribute__((alias(#symbol)))
+
+ /*
+- * it doesn't make sense on ARM (currently the only user of __naked) to trace
+- * naked functions because then mcount is called without stack and frame pointer
+- * being set up and there is no chance to restore the lr register to the value
+- * before mcount was called.
++ * it doesn't make sense on ARM (currently the only user of __naked)
++ * to trace naked functions because then mcount is called without
++ * stack and frame pointer being set up and there is no chance to
++ * restore the lr register to the value before mcount was called.
++ *
++ * The asm() bodies of naked functions often depend on standard calling
++ * conventions, therefore they must be noinline and noclone.
+ *
+- * The asm() bodies of naked functions often depend on standard calling conventions,
+- * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
+- * this, so we must do so ourselves. See GCC PR44290.
++ * GCC 4.[56] currently fail to enforce this, so we must do so ourselves.
++ * See GCC PR44290.
+ */
+-#define __naked __attribute__((naked)) noinline __noclone notrace
++#define __naked __attribute__((naked)) noinline __noclone notrace
+
+-#define __noreturn __attribute__((noreturn))
++#define __noreturn __attribute__((noreturn))
+
+ /*
+ * From the GCC manual:
+@@ -95,34 +114,170 @@
+ * would be.
+ * [...]
+ */
+-#ifndef __pure
+-#define __pure __attribute__((pure))
++#define __pure __attribute__((pure))
++#define __aligned(x) __attribute__((aligned(x)))
++#define __printf(a, b) __attribute__((format(printf, a, b)))
++#define __scanf(a, b) __attribute__((format(scanf, a, b)))
++#define __attribute_const__ __attribute__((__const__))
++#define __maybe_unused __attribute__((unused))
++#define __always_unused __attribute__((unused))
++
++/* gcc version specific checks */
++
++#if GCC_VERSION < 30200
++# error Sorry, your compiler is too old - please upgrade it.
++#endif
++
++#if GCC_VERSION < 30300
++# define __used __attribute__((__unused__))
++#else
++# define __used __attribute__((__used__))
++#endif
++
++#ifdef CONFIG_GCOV_KERNEL
++# if GCC_VERSION < 30400
++# error "GCOV profiling support for gcc versions below 3.4 not included"
++# endif /* __GNUC_MINOR__ */
++#endif /* CONFIG_GCOV_KERNEL */
++
++#if GCC_VERSION >= 30400
++#define __must_check __attribute__((warn_unused_result))
++#endif
++
++#if GCC_VERSION >= 40000
++
++/* GCC 4.1.[01] miscompiles __weak */
++#ifdef __KERNEL__
++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101
++# error Your version of gcc miscompiles the __weak directive
++# endif
++#endif
++
++#define __used __attribute__((__used__))
++#define __compiler_offsetof(a, b) \
++ __builtin_offsetof(a, b)
++
++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
++#endif
++
++#if GCC_VERSION >= 40300
++/* Mark functions as cold. gcc will assume any path leading to a call
++ * to them will be unlikely. This means a lot of manual unlikely()s
++ * are unnecessary now for any paths leading to the usual suspects
++ * like BUG(), printk(), panic() etc. [but let's keep them for now for
++ * older compilers]
++ *
++ * Early snapshots of gcc 4.3 don't support this and we can't detect this
++ * in the preprocessor, but we can live with this because they're unreleased.
++ * Maketime probing would be overkill here.
++ *
++ * gcc also has a __attribute__((__hot__)) to move hot functions into
++ * a special section, but I don't see any sense in this right now in
++ * the kernel context
++ */
++#define __cold __attribute__((__cold__))
++
++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
++
++#ifndef __CHECKER__
++# define __compiletime_warning(message) __attribute__((warning(message)))
++# define __compiletime_error(message) __attribute__((error(message)))
++#endif /* __CHECKER__ */
++#endif /* GCC_VERSION >= 40300 */
++
++#if GCC_VERSION >= 40500
++/*
++ * Mark a position in code as unreachable. This can be used to
++ * suppress control flow warnings after asm blocks that transfer
++ * control elsewhere.
++ *
++ * Early snapshots of gcc 4.5 don't support this and we can't detect
++ * this in the preprocessor, but we can live with this because they're
++ * unreleased. Really, we need to have autoconf for the kernel.
++ */
++#define unreachable() __builtin_unreachable()
++
++/* Mark a function definition as prohibited from being cloned. */
++#define __noclone __attribute__((__noclone__))
++
++#endif /* GCC_VERSION >= 40500 */
++
++#if GCC_VERSION >= 40600
++/*
++ * When used with Link Time Optimization, gcc can optimize away C functions or
++ * variables which are referenced only from assembly code. __visible tells the
++ * optimizer that something else uses this function or variable, thus preventing
++ * this.
++ */
++#define __visible __attribute__((externally_visible))
+ #endif
+-#ifndef __aligned
+-#define __aligned(x) __attribute__((aligned(x)))
++
++
++#if GCC_VERSION >= 40900 && !defined(__CHECKER__)
++/*
++ * __assume_aligned(n, k): Tell the optimizer that the returned
++ * pointer can be assumed to be k modulo n. The second argument is
++ * optional (default 0), so we use a variadic macro to make the
++ * shorthand.
++ *
++ * Beware: Do not apply this to functions which may return
++ * ERR_PTRs. Also, it is probably unwise to apply it to functions
++ * returning extra information in the low bits (but in that case the
++ * compiler should see some alignment anyway, when the return value is
++ * massaged by 'flags = ptr & 3; ptr &= ~3;').
++ */
++#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__)))
+ #endif
+-#define __printf(a, b) __attribute__((format(printf, a, b)))
+-#define __scanf(a, b) __attribute__((format(scanf, a, b)))
+-#define noinline __attribute__((noinline))
+-#define __attribute_const__ __attribute__((__const__))
+-#define __maybe_unused __attribute__((unused))
+-#define __always_unused __attribute__((unused))
+
+-#define __gcc_header(x) #x
+-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
+-#define gcc_header(x) _gcc_header(x)
+-#include gcc_header(__GNUC__)
++/*
++ * GCC 'asm goto' miscompiles certain code sequences:
++ *
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
++ *
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
++ *
++ * (asm goto is automatically volatile - the naming reflects this.)
++ */
++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
++
++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
++#if GCC_VERSION >= 40400
++#define __HAVE_BUILTIN_BSWAP32__
++#define __HAVE_BUILTIN_BSWAP64__
++#endif
++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
++#define __HAVE_BUILTIN_BSWAP16__
++#endif
++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
++
++#if GCC_VERSION >= 50000
++#define KASAN_ABI_VERSION 4
++#elif GCC_VERSION >= 40902
++#define KASAN_ABI_VERSION 3
++#endif
++
++#if GCC_VERSION >= 40902
++/*
++ * Tell the compiler that address safety instrumentation (KASAN)
++ * should not be applied to that function.
++ * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
++ */
++#define __no_sanitize_address __attribute__((no_sanitize_address))
++#endif
++
++#endif /* gcc version >= 40000 specific checks */
+
+ #if !defined(__noclone)
+ #define __noclone /* not needed */
+ #endif
+
++#if !defined(__no_sanitize_address)
++#define __no_sanitize_address
++#endif
++
+ /*
+ * A trick to suppress uninitialized variable warning without generating any
+ * code
+ */
+ #define uninitialized_var(x) x = x
+-
+-#ifndef __always_inline
+-#define __always_inline inline __attribute__((always_inline))
+-#endif
+diff --git b/include/linux/compiler-gcc3.h a/include/linux/compiler-gcc3.h
+deleted file mode 100644
+index 7d89feb..0000000
+--- b/include/linux/compiler-gcc3.h
++++ /dev/null
+@@ -1,23 +0,0 @@
+-#ifndef __LINUX_COMPILER_H
+-#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
+-#endif
+-
+-#if GCC_VERSION < 30200
+-# error Sorry, your compiler is too old - please upgrade it.
+-#endif
+-
+-#if GCC_VERSION >= 30300
+-# define __used __attribute__((__used__))
+-#else
+-# define __used __attribute__((__unused__))
+-#endif
+-
+-#if GCC_VERSION >= 30400
+-#define __must_check __attribute__((warn_unused_result))
+-#endif
+-
+-#ifdef CONFIG_GCOV_KERNEL
+-# if GCC_VERSION < 30400
+-# error "GCOV profiling support for gcc versions below 3.4 not included"
+-# endif /* __GNUC_MINOR__ */
+-#endif /* CONFIG_GCOV_KERNEL */
+diff --git b/include/linux/compiler-gcc4.h a/include/linux/compiler-gcc4.h
+deleted file mode 100644
+index c982a09..0000000
+--- b/include/linux/compiler-gcc4.h
++++ /dev/null
+@@ -1,81 +0,0 @@
+-#ifndef __LINUX_COMPILER_H
+-#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead."
+-#endif
+-
+-#define __used __attribute__((__used__))
+-#define __must_check __attribute__((warn_unused_result))
+-#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
+-
+-#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
+-# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
+-#endif
+-
+-#if GCC_VERSION >= 40300
+-/* Mark functions as cold. gcc will assume any path leading to a call
+- to them will be unlikely. This means a lot of manual unlikely()s
+- are unnecessary now for any paths leading to the usual suspects
+- like BUG(), printk(), panic() etc. [but let's keep them for now for
+- older compilers]
+-
+- Early snapshots of gcc 4.3 don't support this and we can't detect this
+- in the preprocessor, but we can live with this because they're unreleased.
+- Maketime probing would be overkill here.
+-
+- gcc also has a __attribute__((__hot__)) to move hot functions into
+- a special section, but I don't see any sense in this right now in
+- the kernel context */
+-#define __cold __attribute__((__cold__))
+-
+-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
+-
+-#ifndef __CHECKER__
+-# define __compiletime_warning(message) __attribute__((warning(message)))
+-# define __compiletime_error(message) __attribute__((error(message)))
+-#endif /* __CHECKER__ */
+-#endif /* GCC_VERSION >= 40300 */
+-
+-#if GCC_VERSION >= 40500
+-/*
+- * Mark a position in code as unreachable. This can be used to
+- * suppress control flow warnings after asm blocks that transfer
+- * control elsewhere.
+- *
+- * Early snapshots of gcc 4.5 don't support this and we can't detect
+- * this in the preprocessor, but we can live with this because they're
+- * unreleased. Really, we need to have autoconf for the kernel.
+- */
+-#define unreachable() __builtin_unreachable()
+-
+-/* Mark a function definition as prohibited from being cloned. */
+-#define __noclone __attribute__((__noclone__))
+-
+-#endif /* GCC_VERSION >= 40500 */
+-
+-#if GCC_VERSION >= 40600
+-/*
+- * Tell the optimizer that something else uses this function or variable.
+- */
+-#define __visible __attribute__((externally_visible))
+-#endif
+-
+-/*
+- * GCC 'asm goto' miscompiles certain code sequences:
+- *
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
+- *
+- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
+- * Fixed in GCC 4.8.2 and later versions.
+- *
+- * (asm goto is automatically volatile - the naming reflects this.)
+- */
+-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
+-
+-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+-#if GCC_VERSION >= 40400
+-#define __HAVE_BUILTIN_BSWAP32__
+-#define __HAVE_BUILTIN_BSWAP64__
+-#endif
+-#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600)
+-#define __HAVE_BUILTIN_BSWAP16__
+-#endif
+-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
+diff --git b/include/linux/compiler-intel.h a/include/linux/compiler-intel.h
+index ba147a1..d4c7113 100644
+--- b/include/linux/compiler-intel.h
++++ a/include/linux/compiler-intel.h
+@@ -13,9 +13,14 @@
+ /* Intel ECC compiler doesn't support gcc specific asm stmts.
+ * It uses intrinsics to do the equivalent things.
+ */
++#undef barrier
++#undef barrier_data
+ #undef RELOC_HIDE
+ #undef OPTIMIZER_HIDE_VAR
+
++#define barrier() __memory_barrier()
++#define barrier_data(ptr) barrier()
++
+ #define RELOC_HIDE(ptr, off) \
+ ({ unsigned long __ptr; \
+ __ptr = (unsigned long) (ptr); \
+diff --git b/include/linux/compiler.h a/include/linux/compiler.h
+index d5ad7b1..020ad16 100644
+--- b/include/linux/compiler.h
++++ a/include/linux/compiler.h
+@@ -17,6 +17,7 @@
+ # define __release(x) __context__(x,-1)
+ # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
+ # define __percpu __attribute__((noderef, address_space(3)))
++# define __pmem __attribute__((noderef, address_space(5)))
+ #ifdef CONFIG_SPARSE_RCU_POINTER
+ # define __rcu __attribute__((noderef, address_space(4)))
+ #else
+@@ -42,6 +43,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
+ # define __cond_lock(x,c) (c)
+ # define __percpu
+ # define __rcu
++# define __pmem
+ #endif
+
+ /* Indirect macros required for expanded argument pasting, eg. __LINE__. */
+@@ -54,7 +56,11 @@ extern void __chk_io_ptr(const volatile void __iomem *);
+ #include <linux/compiler-gcc.h>
+ #endif
+
++#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
++#define notrace __attribute__((hotpatch(0,0)))
++#else
+ #define notrace __attribute__((no_instrument_function))
++#endif
+
+ /* Intel compiler defines __GNUC__. So we will overwrite implementations
+ * coming from above header files here
+@@ -138,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ */
+ #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
+ #define __trace_if(cond) \
+- if (__builtin_constant_p((cond)) ? !!(cond) : \
++ if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
+ ({ \
+ int ______r; \
+ static struct ftrace_branch_data \
+@@ -165,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ # define barrier() __memory_barrier()
+ #endif
+
++#ifndef barrier_data
++# define barrier_data(ptr) barrier()
++#endif
++
+ /* Unreachable code */
+ #ifndef unreachable
+ # define unreachable() do { } while (1)
+@@ -186,6 +196,126 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
+ #endif
+
++#include <linux/types.h>
++
++#define __READ_ONCE_SIZE \
++({ \
++ switch (size) { \
++ case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \
++ case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \
++ case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \
++ case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \
++ default: \
++ barrier(); \
++ __builtin_memcpy((void *)res, (const void *)p, size); \
++ barrier(); \
++ } \
++})
++
++static __always_inline
++void __read_once_size(const volatile void *p, void *res, int size)
++{
++ __READ_ONCE_SIZE;
++}
++
++#ifdef CONFIG_KASAN
++/*
++ * This function is not 'inline' because __no_sanitize_address confilcts
++ * with inlining. Attempt to inline it may cause a build failure.
++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
++ * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
++ */
++static __no_sanitize_address __maybe_unused
++void __read_once_size_nocheck(const volatile void *p, void *res, int size)
++{
++ __READ_ONCE_SIZE;
++}
++#else
++static __always_inline
++void __read_once_size_nocheck(const volatile void *p, void *res, int size)
++{
++ __READ_ONCE_SIZE;
++}
++#endif
++
++static __always_inline void __write_once_size(volatile void *p, void *res, int size)
++{
++ switch (size) {
++ case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
++ case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
++ case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
++ case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
++ default:
++ barrier();
++ __builtin_memcpy((void *)p, (const void *)res, size);
++ barrier();
++ }
++}
++
++/*
++ * Prevent the compiler from merging or refetching reads or writes. The
++ * compiler is also forbidden from reordering successive instances of
++ * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
++ * compiler is aware of some particular ordering. One way to make the
++ * compiler aware of ordering is to put the two invocations of READ_ONCE,
++ * WRITE_ONCE or ACCESS_ONCE() in different C statements.
++ *
++ * In contrast to ACCESS_ONCE these two macros will also work on aggregate
++ * data types like structs or unions. If the size of the accessed data
++ * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
++ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a
++ * compile-time warning.
++ *
++ * Their two major use cases are: (1) Mediating communication between
++ * process-level code and irq/NMI handlers, all running on the same CPU,
++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
++ * mutilate accesses that either do not require ordering or that interact
++ * with an explicit memory barrier or atomic instruction that provides the
++ * required ordering.
++ */
++
++#define __READ_ONCE(x, check) \
++({ \
++ union { typeof(x) __val; char __c[1]; } __u; \
++ if (check) \
++ __read_once_size(&(x), __u.__c, sizeof(x)); \
++ else \
++ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \
++ __u.__val; \
++})
++#define READ_ONCE(x) __READ_ONCE(x, 1)
++
++/*
++ * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need
++ * to hide memory access from KASAN.
++ */
++#define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0)
++
++#define WRITE_ONCE(x, val) \
++({ \
++ union { typeof(x) __val; char __c[1]; } __u = \
++ { .__val = (__force typeof(x)) (val) }; \
++ __write_once_size(&(x), __u.__c, sizeof(x)); \
++ __u.__val; \
++})
++
++/**
++ * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering
++ * @cond: boolean expression to wait for
++ *
++ * Equivalent to using smp_load_acquire() on the condition variable but employs
++ * the control dependency of the wait to reduce the barrier on many platforms.
++ *
++ * The control dependency provides a LOAD->STORE order, the additional RMB
++ * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order,
++ * aka. ACQUIRE.
++ */
++#define smp_cond_acquire(cond) do { \
++ while (!(cond)) \
++ cpu_relax(); \
++ smp_rmb(); /* ctrl + rmb := acquire */ \
++} while (0)
++
+ #endif /* __KERNEL__ */
+
+ #endif /* __ASSEMBLY__ */
+@@ -304,6 +434,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ #define __visible
+ #endif
+
++/*
++ * Assume alignment of return value.
++ */
++#ifndef __assume_aligned
++#define __assume_aligned(a, ...)
++#endif
++
++
+ /* Are two types/vars the same type (ignoring qualifiers)? */
+ #ifndef __same_type
+ # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
+@@ -311,7 +449,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+
+ /* Is this type a native word size -- useful for atomic operations */
+ #ifndef __native_word
+-# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
++# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
+ #endif
+
+ /* Compile time object size, -1 for unknown */
+@@ -373,12 +511,38 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+ * to make the compiler aware of ordering is to put the two invocations of
+ * ACCESS_ONCE() in different C statements.
+ *
+- * This macro does absolutely -nothing- to prevent the CPU from reordering,
+- * merging, or refetching absolutely anything at any time. Its main intended
+- * use is to mediate communication between process-level code and irq/NMI
+- * handlers, all running on the same CPU.
++ * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE
++ * on a union member will work as long as the size of the member matches the
++ * size of the union and the size is smaller than word size.
++ *
++ * The major use cases of ACCESS_ONCE used to be (1) Mediating communication
++ * between process-level code and irq/NMI handlers, all running on the same CPU,
++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise
++ * mutilate accesses that either do not require ordering or that interact
++ * with an explicit memory barrier or atomic instruction that provides the
++ * required ordering.
++ *
++ * If possible use READ_ONCE()/WRITE_ONCE() instead.
++ */
++#define __ACCESS_ONCE(x) ({ \
++ __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
++ (volatile typeof(x) *)&(x); })
++#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x))
++
++/**
++ * lockless_dereference() - safely load a pointer for later dereference
++ * @p: The pointer to load
++ *
++ * Similar to rcu_dereference(), but for situations where the pointed-to
++ * object's lifetime is managed by something other than RCU. That
++ * "something other" might be reference counting or simple immortality.
+ */
+-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
++#define lockless_dereference(p) \
++({ \
++ typeof(p) _________p1 = READ_ONCE(p); \
++ smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
++ (_________p1); \
++})
+
+ /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */
+ #ifdef CONFIG_KPROBES
diff --git a/tools/mkimage/patches/200-gcc5_compat.patch b/tools/mkimage/patches/200-gcc5_compat.patch
deleted file mode 100644
index 4d55f00..0000000
--- a/tools/mkimage/patches/200-gcc5_compat.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 478b02f1a7043b673565075ea5016376f3293b23 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede@redhat.com>
-Date: Sat, 7 Feb 2015 22:52:40 +0100
-Subject: [PATCH] Add linux/compiler-gcc5.h to fix builds with gcc5
-
-Add linux/compiler-gcc5/h from the kernel sources at:
-
-commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b
-Author: Steven Noonan <steven@uplinklabs.net>
-Date: Sat Oct 25 15:09:42 2014 -0700
-
- compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
-
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
----
- include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 65 insertions(+)
- create mode 100644 include/linux/compiler-gcc5.h
-
-diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
-new file mode 100644
-index 0000000..c8c5659
---- /dev/null
-+++ b/include/linux/compiler-gcc5.h
-@@ -0,0 +1,65 @@
-+#ifndef __LINUX_COMPILER_H
-+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
-+#endif
-+
-+#define __used __attribute__((__used__))
-+#define __must_check __attribute__((warn_unused_result))
-+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
-+
-+/* Mark functions as cold. gcc will assume any path leading to a call
-+ to them will be unlikely. This means a lot of manual unlikely()s
-+ are unnecessary now for any paths leading to the usual suspects
-+ like BUG(), printk(), panic() etc. [but let's keep them for now for
-+ older compilers]
-+
-+ Early snapshots of gcc 4.3 don't support this and we can't detect this
-+ in the preprocessor, but we can live with this because they're unreleased.
-+ Maketime probing would be overkill here.
-+
-+ gcc also has a __attribute__((__hot__)) to move hot functions into
-+ a special section, but I don't see any sense in this right now in
-+ the kernel context */
-+#define __cold __attribute__((__cold__))
-+
-+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
-+
-+#ifndef __CHECKER__
-+# define __compiletime_warning(message) __attribute__((warning(message)))
-+# define __compiletime_error(message) __attribute__((error(message)))
-+#endif /* __CHECKER__ */
-+
-+/*
-+ * Mark a position in code as unreachable. This can be used to
-+ * suppress control flow warnings after asm blocks that transfer
-+ * control elsewhere.
-+ *
-+ * Early snapshots of gcc 4.5 don't support this and we can't detect
-+ * this in the preprocessor, but we can live with this because they're
-+ * unreleased. Really, we need to have autoconf for the kernel.
-+ */
-+#define unreachable() __builtin_unreachable()
-+
-+/* Mark a function definition as prohibited from being cloned. */
-+#define __noclone __attribute__((__noclone__))
-+
-+/*
-+ * Tell the optimizer that something else uses this function or variable.
-+ */
-+#define __visible __attribute__((externally_visible))
-+
-+/*
-+ * GCC 'asm goto' miscompiles certain code sequences:
-+ *
-+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
-+ *
-+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
-+ *
-+ * (asm goto is automatically volatile - the naming reflects this.)
-+ */
-+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
-+
-+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
-+#define __HAVE_BUILTIN_BSWAP32__
-+#define __HAVE_BUILTIN_BSWAP64__
-+#define __HAVE_BUILTIN_BSWAP16__
-+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
---
-1.7.10.4
-

View File

@ -12,7 +12,7 @@ Signed-off-by: Roman Yeryomin <roman@advem.lv>
Backport of OpenWrt r47981
diff --git a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
index d3a14b2..61b8976 100644
index 2bb4286..61b8976 100644
--- a/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
+++ b/target/linux/ar71xx/patches-3.18/735-MIPS-ath79-add-support-for-QCA956x-SoC.patch
@@ -105,7 +105,7 @@
@ -327,7 +327,7 @@ index d3a14b2..61b8976 100644
/*
* SPI block
*/
-@@ -766,6 +868,19 @@
-@@ -774,6 +876,19 @@
+@@ -766,6 +875,19 @@
#define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
#define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
@ -336,7 +336,7 @@ index d3a14b2..61b8976 100644
#define AR71XX_GPIO_COUNT 16
#define AR7240_GPIO_COUNT 18
#define AR7241_GPIO_COUNT 20
-@@ -774,6 +889,7 @@
-@@ -782,6 +897,7 @@
+@@ -774,6 +896,7 @@
#define AR934X_GPIO_COUNT 23
#define QCA953X_GPIO_COUNT 18
@ -379,3 +379,37 @@ index d3a14b2..61b8976 100644
+}
+
extern void __iomem *ath79_ddr_base;
diff --git a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
index a36b8c3..44c9c62 100644
--- a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
+++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
@@ -9,8 +9,8 @@
+ soc_is_qca955x())
reg = AR71XX_GPIO_REG_FUNC;
else if (soc_is_ar934x() ||
- soc_is_qca953x() || soc_is_qca956x())
-@@ -185,15 +186,27 @@ void __init ath79_gpio_output_select(uns
+ soc_is_qca953x() ||
+@@ -187,15 +188,30 @@ void __init ath79_gpio_output_select(uns
{
void __iomem *base = ath79_gpio_base;
unsigned long flags;
@@ -19,7 +19,7 @@
+ unsigned long gpio_count;
u32 t, s;
-- BUG_ON(!soc_is_ar934x() && !soc_is_qca953x());
+- BUG_ON(!soc_is_ar934x() && !soc_is_qca953x() && !soc_is_qca956x());
+ if (soc_is_ar934x()) {
+ gpio_count = AR934X_GPIO_COUNT;
+ reg_base = AR934X_GPIO_REG_OUT_FUNC0;
@@ -29,6 +29,9 @@
+ } else if (soc_is_qca955x()) {
+ gpio_count = QCA955X_GPIO_COUNT;
+ reg_base = QCA955X_GPIO_REG_OUT_FUNC0;
++ } else if (soc_is_qca956x()) {
++ gpio_count = QCA956X_GPIO_COUNT;
++ reg_base = QCA956X_GPIO_REG_OUT_FUNC0;
+ } else {
+ BUG();
+ }

View File

@ -1,144 +0,0 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 9 May 2016 00:16:38 +0200
Subject: toolchain: gcc: fix build with GCC 6
At least for GCC 4.8, which is used by most targets.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch b/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch
new file mode 100644
index 0000000..c74f2aa
--- /dev/null
+++ b/toolchain/gcc/patches/4.8-linaro/030-gcc-6-compile.patch
@@ -0,0 +1,130 @@
+Upstream commit r233721
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index bd1c1d7..a0ea0d4 100644
+--- a/gcc/cp/Make-lang.in
++++ b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+ $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 05ca753..d9b16b8 100644
+--- a/gcc/cp/cfns.gperf
++++ b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+
+@@ -16,14 +18,6 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index c845ddf..65801d1 100644
+--- a/gcc/cp/cfns.h
++++ b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
+
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+ #endif
+
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+
+@@ -47,25 +47,18 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++ static inline unsigned int hash (const char *str, unsigned int len);
++public:
++ static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+ static const unsigned short asso_values[] =
+ {
+@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len)
+ return hval + asso_values[(unsigned char)str[len - 1]];
+ }
+
+-#ifdef __GNUC__
+-__inline
+-#ifdef __GNUC_STDC_INLINE__
+-__attribute__ ((__gnu_inline__))
+-#endif
+-#endif
+ const char *
+-libc_name_p (register const char *str, register unsigned int len)
++libc_name::libc_name_p (register const char *str, register unsigned int len)
+ {
+ enum
+ {
+diff --git a/gcc/cp/except.c b/gcc/cp/except.c
+index 221971a..32340f5 100644
+--- a/gcc/cp/except.c
++++ b/gcc/cp/except.c
+@@ -1030,7 +1030,8 @@ nothrow_libfn_p (const_tree fn)
+ unless the system headers are playing rename tricks, and if
+ they are, we don't want to be confused by them. */
+ id = DECL_NAME (fn);
+- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
++ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
++ IDENTIFIER_LENGTH (id));
+ }
+
+ /* Returns nonzero if an exception of type FROM will be caught by a
+--
+1.7.1
+

View File

@ -8,10 +8,10 @@ Signed-off-by: P.Wassi <p.wassi at gmx.at>
Backport of OpenWrt r48711
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 5a184cd..8c6ac9a 100644
index 486879f..3adc449 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -296,7 +296,8 @@ get_status_led() {
@@ -309,7 +309,8 @@ get_status_led() {
unifi)
status_led="ubnt:green:dome"
;;
@ -22,10 +22,10 @@ index 5a184cd..8c6ac9a 100644
;;
unifi-outdoor-plus)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b2e15bb..e4a1473 100755
index 032c671..a79376a 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -366,6 +366,7 @@ tl-wa901nd-v3 |\
@@ -369,6 +369,7 @@ tl-wa901nd-v3 |\
tl-wa901nd-v4 |\
tl-wr703n |\
tube2h |\
@ -34,10 +34,10 @@ index b2e15bb..e4a1473 100755
mynet-rext |\
wp543)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ddd6611..8670583 100755
index 4780e2f..0fd139c 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,6 +881,9 @@ ar71xx_board_detect() {
@@ -902,6 +902,9 @@ ar71xx_board_detect() {
*UniFi)
name="unifi"
;;
@ -48,10 +48,10 @@ index ddd6611..8670583 100755
name="uap-pro"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index c5c1871..4c43166 100755
index 024e493..fff1c3c 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -251,6 +251,7 @@ platform_check_image() {
@@ -252,6 +252,7 @@ platform_check_image() {
wlae-ag300n | \
nbg460n_550n_550nh | \
unifi | \
@ -60,10 +60,10 @@ index c5c1871..4c43166 100755
carambola2 | \
weio )
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index e2ff826..9a81911 100644
index e0d52d9..a068cc5 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -137,6 +137,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
@@ -141,6 +141,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y
CONFIG_ATH79_MACH_TL_WR941ND_V6=y
CONFIG_ATH79_MACH_TUBE2H=y
CONFIG_ATH79_MACH_UBNT=y
@ -71,7 +71,7 @@ index e2ff826..9a81911 100644
CONFIG_ATH79_MACH_UBNT_XM=y
CONFIG_ATH79_MACH_WEIO=y
CONFIG_ATH79_MACH_WHR_HP_G300N=y
@@ -320,7 +321,7 @@ CONFIG_SOC_AR933X=y
@@ -324,7 +325,7 @@ CONFIG_SOC_AR933X=y
CONFIG_SOC_AR934X=y
CONFIG_SOC_QCA953X=y
CONFIG_SOC_QCA955X=y
@ -218,7 +218,7 @@ index d8e24d0..94eff18 100644
NAME:=Ubiquiti UniFiAP Outdoor
PACKAGES:=
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index d42ceef..dd59f2d 100644
index 0783381..aaaf89a 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -740,6 +740,16 @@ define Device/oolite
@ -263,18 +263,18 @@ index 626d676..f62cf1a 100644
# CONFIG_ATH79_MACH_WLAE_AG300N is not set
# CONFIG_ATH79_MACH_WNDAP360 is not set
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index d6e786d..5a7a72c 100644
index 76aeb94..27dc73f 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,199 @@
+@@ -16,22 +16,200 @@
-@@ -16,22 +16,200 @@
+@@ -16,22 +16,201 @@
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -164,6 +164,7 @@
@@ -165,6 +165,7 @@
+ ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */
ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */
ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
@ -282,7 +282,7 @@ index d6e786d..5a7a72c 100644
ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */
+ ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */
ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */
@@ -1097,10 +1098,7 @@
@@ -1098,10 +1099,7 @@
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
@ -294,7 +294,7 @@ index d6e786d..5a7a72c 100644
+config ATH79_MACH_TL_WA7210N_V2
+ bool "TP-LINK TL-WA7210N v2 support"
+ select SOC_AR724X
@@ -1115,19 +1113,12 @@
@@ -1116,19 +1114,12 @@
+ bool "TP-LINK TL-WA830RE v2 support"
+ select SOC_AR934X
+ select ATH79_DEV_ETH
@ -319,7 +319,7 @@ index d6e786d..5a7a72c 100644
+config ATH79_MACH_TL_WA901ND
+ bool "TP-LINK TL-WA901ND/TL-WA7510N support"
+ select SOC_AR724X
@@ -1139,11 +1130,11 @@
@@ -1140,11 +1131,11 @@
+
+config ATH79_MACH_TL_WA901ND_V2
+ bool "TP-LINK TL-WA901ND v2 support"
@ -336,7 +336,7 @@ index d6e786d..5a7a72c 100644
+ select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_WDR3500
@@ -1154,34 +1145,13 @@
@@ -1155,34 +1146,13 @@
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
@ -376,7 +376,7 @@ index d6e786d..5a7a72c 100644
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
+ select ATH79_DEV_LEDS_GPIO
@@ -1189,8 +1159,8 @@
@@ -1190,8 +1160,8 @@
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
+
@ -387,7 +387,7 @@ index d6e786d..5a7a72c 100644
+ select SOC_AR933X
+ select ATH79_DEV_ETH
+ select ATH79_DEV_GPIO_BUTTONS
@@ -1198,7 +1168,28 @@
@@ -1199,7 +1169,28 @@
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_DEV_WMAC
@ -417,7 +417,7 @@ index d6e786d..5a7a72c 100644
+config ATH79_MACH_TL_WR741ND
+ bool "TP-LINK TL-WR741ND support"
+ select SOC_AR724X
@@ -1211,21 +1202,25 @@
@@ -1212,21 +1203,25 @@
+config ATH79_MACH_TL_WR741ND_V4
+ bool "TP-LINK TL-WR741ND v4/TL-MR3220 v2 support"
+ select SOC_AR933X
@ -455,7 +455,7 @@ index d6e786d..5a7a72c 100644
+ select ATH79_DEV_M25P80
+
+config ATH79_MACH_TL_WR841N_V8
@@ -1268,15 +1263,21 @@
@@ -1269,15 +1264,21 @@
+
+config ATH79_MACH_TL_WR1041N_V2
+ bool "TP-LINK TL-WR1041N v2 support"
@ -486,7 +486,7 @@ index d6e786d..5a7a72c 100644
+config ATH79_MACH_TL_WR1043ND
+ bool "TP-LINK TL-WR1043ND support"
+ select SOC_AR913X
@@ -1319,11 +1320,12 @@
@@ -1320,11 +1321,12 @@
+
+config ATH79_MACH_TEW_673GRU
+ bool "TRENDnet TEW-673GRU support"
@ -503,7 +503,7 @@ index d6e786d..5a7a72c 100644
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_USB
+ select ATH79_NVRAM
@@ -1361,10 +1363,20 @@
@@ -1362,10 +1364,20 @@
config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM/UniFi boards"
@ -525,7 +525,7 @@ index d6e786d..5a7a72c 100644
+config ATH79_MACH_WEIO
+ bool "WeIO board"
+ select SOC_AR933X
@@ -1468,7 +1480,7 @@
@@ -1469,7 +1481,7 @@
endmenu
config SOC_AR71XX
@ -534,7 +534,7 @@ index d6e786d..5a7a72c 100644
config ATH79_DEV_ETH
def_bool n
@@ -1480,7 +1492,7 @@
@@ -1481,7 +1493,7 @@
def_bool n
config ATH79_DEV_GPIO_BUTTONS
@ -543,7 +543,7 @@ index d6e786d..5a7a72c 100644
def_bool n
config ATH79_ROUTERBOOT
@@ -1494,7 +1506,7 @@
@@ -1495,7 +1507,7 @@
endif
--- a/arch/mips/ath79/Makefile
+++ b/arch/mips/ath79/Makefile
@ -552,7 +552,7 @@ index d6e786d..5a7a72c 100644
#
# Machines
#
@@ -1596,6 +1608,7 @@
@@ -1597,6 +1609,7 @@
+obj-$(CONFIG_ATH79_MACH_TL_WR720N_V3) += mach-tl-wr720n-v3.o
+obj-$(CONFIG_ATH79_MACH_TUBE2H) += mach-tube2h.o
+obj-$(CONFIG_ATH79_MACH_UBNT) += mach-ubnt.o

View File

@ -10,10 +10,10 @@ Signed-off-by: P.Wassi <p.wassi at gmx.at>
Backport of LEDE c855e70491fbd5d432915c4cbeb3b80f3a117e30
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 8c6ac9a..3d711ca 100644
index 3adc449..924c116 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -297,7 +297,7 @@ get_status_led() {
@@ -310,7 +310,7 @@ get_status_led() {
status_led="ubnt:green:dome"
;;
uap-pro | \
@ -23,10 +23,10 @@ index 8c6ac9a..3d711ca 100644
;;
unifi-outdoor-plus)
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index e6fcec8..fa8a2c8 100644
index ab7d93c..7777734 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -75,7 +75,7 @@ case "$FIRMWARE" in
@@ -81,7 +81,7 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
;;
@ -36,10 +36,10 @@ index e6fcec8..fa8a2c8 100644
;;
esac
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index e4a1473..0269e6d 100755
index a79376a..2007042 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -366,7 +366,7 @@ tl-wa901nd-v3 |\
@@ -369,7 +369,7 @@ tl-wa901nd-v3 |\
tl-wa901nd-v4 |\
tl-wr703n |\
tube2h |\
@ -49,10 +49,10 @@ index e4a1473..0269e6d 100755
mynet-rext |\
wp543)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 8670583..d3e6db9 100755
index 0fd139c..a8d8896 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -881,8 +881,8 @@ ar71xx_board_detect() {
@@ -902,8 +902,8 @@ ar71xx_board_detect() {
*UniFi)
name="unifi"
;;
@ -64,10 +64,10 @@ index 8670583..d3e6db9 100755
*"UniFi AP Pro")
name="uap-pro"
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 4c43166..a1b65b7 100755
index fff1c3c..90f961f 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -251,7 +251,7 @@ platform_check_image() {
@@ -252,7 +252,7 @@ platform_check_image() {
wlae-ag300n | \
nbg460n_550n_550nh | \
unifi | \
@ -143,7 +143,7 @@ index 94eff18..eac0240 100644
define Profile/UBNTUNIFIOUTDOOR
NAME:=Ubiquiti UniFiAP Outdoor
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index dd59f2d..3efa2e1 100644
index aaaf89a..42ffc69 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -741,14 +741,19 @@ endef
@ -170,10 +170,10 @@ index dd59f2d..3efa2e1 100644
rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index 5a7a72c..0ade403 100644
index 27dc73f..9a28f58 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -164,7 +164,7 @@
@@ -165,7 +165,7 @@
+ ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */
ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */
ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
@ -182,7 +182,7 @@ index 5a7a72c..0ade403 100644
ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */
+ ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */
ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */
@@ -1368,7 +1368,7 @@
@@ -1369,7 +1369,7 @@
Ubiquiti Networks XM (rev 1.0) board.
+config ATH79_MACH_UBNT_UNIFIAC

View File

@ -8,10 +8,10 @@ Signed-off-by: P.Wassi <p.wassi at gmx.at>
Backport of LEDE 8307c2fe686ded345c80318359d5b6679e581fa2
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 3d711ca..775aac6 100644
index 924c116..cb92349 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -297,7 +297,8 @@ get_status_led() {
@@ -310,7 +310,8 @@ get_status_led() {
status_led="ubnt:green:dome"
;;
uap-pro | \
@ -22,10 +22,10 @@ index 3d711ca..775aac6 100644
;;
unifi-outdoor-plus)
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index fa8a2c8..cde7aaf 100644
index 7777734..5eb20bb 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -75,7 +75,8 @@ case "$FIRMWARE" in
@@ -81,7 +81,8 @@ case "$FIRMWARE" in
ath10kcal_extract "ART" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
;;
@ -36,10 +36,10 @@ index fa8a2c8..cde7aaf 100644
;;
esac
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 0269e6d..0a23756 100755
index 2007042..b59844e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -398,6 +398,13 @@ wpj344)
@@ -401,6 +401,13 @@ wpj344)
ucidef_add_switch_vlan "switch0" "2" "0t 2"
;;
@ -54,10 +54,10 @@ index 0269e6d..0a23756 100755
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index d3e6db9..7fc951a 100755
index a8d8896..28f07b8 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -884,6 +884,9 @@ ar71xx_board_detect() {
@@ -905,6 +905,9 @@ ar71xx_board_detect() {
*"UniFi-AC-LITE")
name="unifiac-lite"
;;
@ -68,10 +68,10 @@ index d3e6db9..7fc951a 100755
name="uap-pro"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a1b65b7..0e9833d 100755
index 90f961f..0228f14 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -252,6 +252,7 @@ platform_check_image() {
@@ -253,6 +253,7 @@ platform_check_image() {
nbg460n_550n_550nh | \
unifi | \
unifiac-lite | \
@ -193,7 +193,7 @@ index eac0240..69b8398 100644
NAME:=Ubiquiti UniFiAP Outdoor
PACKAGES:=
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 3efa2e1..58118f2 100644
index 42ffc69..7c648f2 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -753,7 +753,13 @@ define Device/ubnt-unifiac-lite
@ -212,18 +212,18 @@ index 3efa2e1..58118f2 100644
rootfs_type=$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index 0ade403..dbd3fca 100644
index 9a28f58..debde6e 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,200 @@
+@@ -16,22 +16,201 @@
-@@ -16,22 +16,201 @@
+@@ -16,22 +16,202 @@
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -165,6 +165,7 @@
@@ -166,6 +166,7 @@
ATH79_MACH_UBNT_UAP_PRO, /* Ubiquiti UniFi AP Pro */
ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
+ ATH79_MACH_UBNT_UNIFIAC_LITE, /* Ubiquiti Unifi AC LITE/LR */
@ -231,7 +231,7 @@ index 0ade403..dbd3fca 100644
ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */
+ ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */
ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */
@@ -1363,12 +1364,12 @@
@@ -1364,12 +1365,12 @@
config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM/UniFi boards"
@ -246,7 +246,7 @@ index 0ade403..dbd3fca 100644
+ select SOC_QCA956X
+ select ATH79_DEV_AP9X_PCI if PCI
+ select ATH79_DEV_ETH
@@ -1376,6 +1377,7 @@
@@ -1377,6 +1378,7 @@
+ select ATH79_DEV_LEDS_GPIO
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
@ -254,7 +254,7 @@ index 0ade403..dbd3fca 100644
+
+config ATH79_MACH_WEIO
+ bool "WeIO board"
@@ -1480,7 +1482,7 @@
@@ -1481,7 +1483,7 @@
endmenu
config SOC_AR71XX
@ -263,7 +263,7 @@ index 0ade403..dbd3fca 100644
config ATH79_DEV_ETH
def_bool n
@@ -1492,7 +1494,7 @@
@@ -1493,7 +1495,7 @@
def_bool n
config ATH79_DEV_GPIO_BUTTONS

View File

@ -1,30 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Tue, 17 May 2016 16:38:29 +0200
Subject: ar71xx: Generate sysupgrade images for OpenMesh devices
Some OpenWrt based firmwares like Gluon expect that a sysupgrade image
exists when a device firmware can be updated via sysupgrade. This image
wasn't created until now because OpenMesh devices use the same image for
factory and sysupgrade flash. Copying the image from *factory.bin to
*sysupgrade.bin is therefore enough to make the sysupgrade functionality
visible.
Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Forwarded: https://patchwork.ozlabs.org/patch/624172/
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 58118f2..7aee0c8 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1877,6 +1877,9 @@ define Image/Build/OpenMesh
"$(BUILD_DIR)/fwupgrade.cfg-$(4)" "fwupgrade.cfg" \
"$(KDIR_TMP)/vmlinux-$(2).uImage" "kernel" \
"$(KDIR)/root.$(1)" "rootfs"
+ if [ -e "$(call factoryname,$(1),$(2))" ]; then \
+ cp "$(call factoryname,$(1),$(2))" "$(call sysupname,$(1),$(2))"; \
+ fi
endef

View File

@ -10,10 +10,10 @@ Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Backport of r49101
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 9a768cd..ae17853 100644
index f4d5234..b867796 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -590,6 +590,21 @@ wnr2000-v4)
@@ -600,6 +600,21 @@ wnr2000-v4)
ucidef_set_led_usbdev "usb" "USB" "netgear:amber:status" "1-1"
;;

View File

@ -1,202 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:10:43 +0000
Subject: ar71xx: add kernel support for the OpenMesh MR1750 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46926
Forwarded: https://patchwork.ozlabs.org/patch/624173/
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 9a81911..c5a3c9a 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -79,6 +79,7 @@ CONFIG_ATH79_MACH_JWAP003=y
CONFIG_ATH79_MACH_MC_MAC1200R=y
CONFIG_ATH79_MACH_MR16=y
CONFIG_ATH79_MACH_MR12=y
+CONFIG_ATH79_MACH_MR1750=y
CONFIG_ATH79_MACH_MR600=y
CONFIG_ATH79_MACH_MR900=y
CONFIG_ATH79_MACH_MYNET_N600=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
new file mode 100644
index 0000000..8ace02f
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
@@ -0,0 +1,129 @@
+/*
+ * MR1750 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012-2013 Marek Lindner <marek@open-mesh.com>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <linux/platform_device.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define MR1750_GPIO_LED_LAN 12
+#define MR1750_GPIO_LED_WLAN_2G 13
+#define MR1750_GPIO_LED_STATUS_GREEN 19
+#define MR1750_GPIO_LED_STATUS_RED 21
+#define MR1750_GPIO_LED_POWER 22
+#define MR1750_GPIO_LED_WLAN_5G 23
+
+#define MR1750_GPIO_BTN_RESET 17
+
+#define MR1750_KEYS_POLL_INTERVAL 20 /* msecs */
+#define MR1750_KEYS_DEBOUNCE_INTERVAL (3 * MR1750_KEYS_POLL_INTERVAL)
+
+#define MR1750_MAC0_OFFSET 0
+#define MR1750_WMAC_CALDATA_OFFSET 0x1000
+
+static struct gpio_led mr1750_leds_gpio[] __initdata = {
+ {
+ .name = "mr1750:blue:power",
+ .gpio = MR1750_GPIO_LED_POWER,
+ .active_low = 1,
+ },
+ {
+ .name = "mr1750:blue:wan",
+ .gpio = MR1750_GPIO_LED_LAN,
+ .active_low = 1,
+ },
+ {
+ .name = "mr1750:blue:wlan24",
+ .gpio = MR1750_GPIO_LED_WLAN_2G,
+ .active_low = 1,
+ },
+ {
+ .name = "mr1750:blue:wlan58",
+ .gpio = MR1750_GPIO_LED_WLAN_5G,
+ .active_low = 1,
+ },
+ {
+ .name = "mr1750:green:status",
+ .gpio = MR1750_GPIO_LED_STATUS_GREEN,
+ .active_low = 1,
+ },
+ {
+ .name = "mr1750:red:status",
+ .gpio = MR1750_GPIO_LED_STATUS_RED,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_keys_button mr1750_gpio_keys[] __initdata = {
+ {
+ .desc = "Reset button",
+ .type = EV_KEY,
+ .code = KEY_RESTART,
+ .debounce_interval = MR1750_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = MR1750_GPIO_BTN_RESET,
+ .active_low = 1,
+ },
+};
+
+static void __init mr1750_setup(void)
+{
+ u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
+ u8 mac[6];
+
+ ath79_eth0_pll_data.pll_1000 = 0xbe000101;
+ ath79_eth0_pll_data.pll_100 = 0x80000101;
+ ath79_eth0_pll_data.pll_10 = 0x80001313;
+
+ ath79_register_m25p80(NULL);
+
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(mr1750_leds_gpio),
+ mr1750_leds_gpio);
+ ath79_register_gpio_keys_polled(-1, MR1750_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(mr1750_gpio_keys),
+ mr1750_gpio_keys);
+
+ ath79_init_mac(mac, art + MR1750_MAC0_OFFSET, 1);
+ ath79_register_wmac(art + MR1750_WMAC_CALDATA_OFFSET, mac);
+ ath79_register_pci();
+
+ ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+ ath79_register_mdio(0, 0x0);
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, art + MR1750_MAC0_OFFSET, 0);
+
+ /* GMAC0 is connected to the RMGII interface */
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth0_data.phy_mask = BIT(5);
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+
+ ath79_register_eth(0);
+}
+
+MIPS_MACHINE(ATH79_MACH_MR1750, "MR1750", "OpenMesh MR1750", mr1750_setup);
diff --git a/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-mr1750-support.patch b/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-mr1750-support.patch
new file mode 100644
index 0000000..d802a12
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-mr1750-support.patch
@@ -0,0 +1,39 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -763,6 +763,16 @@ config ATH79_MACH_CAP4200AG
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
+
++config ATH79_MACH_MR1750
++ bool "OpenMesh MR1750 board support"
++ select SOC_QCA955X
++ select ATH79_DEV_AP9X_PCI if PCI
++ select ATH79_DEV_ETH
++ select ATH79_DEV_GPIO_BUTTONS
++ select ATH79_DEV_LEDS_GPIO
++ select ATH79_DEV_M25P80
++ select ATH79_DEV_WMAC
++
+ config ATH79_MACH_MR900
+ bool "OpenMesh MR900 board support"
+ select SOC_QCA955X
+--- a/arch/mips/ath79/Makefile
++++ b/arch/mips/ath79/Makefile
+@@ -80,6 +80,7 @@ obj-$(CONFIG_ATH79_MACH_HORNET_UB) += ma
+ obj-$(CONFIG_ATH79_MACH_MC_MAC1200R) += mach-mc-mac1200r.o
+ obj-$(CONFIG_ATH79_MACH_MR12) += mach-mr12.o
+ obj-$(CONFIG_ATH79_MACH_MR16) += mach-mr16.o
++obj-$(CONFIG_ATH79_MACH_MR1750) += mach-mr1750.o
+ obj-$(CONFIG_ATH79_MACH_MR600) += mach-mr600.o
+ obj-$(CONFIG_ATH79_MACH_MR900) += mach-mr900.o
+ obj-$(CONFIG_ATH79_MACH_MYNET_N600) += mach-mynet-n600.o
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -69,6 +69,7 @@ enum ath79_mach_type {
+ ATH79_MACH_HORNET_UB, /* ALFA Networks Hornet-UB */
+ ATH79_MACH_MR12, /* Cisco Meraki MR12 */
+ ATH79_MACH_MR16, /* Cisco Meraki MR16 */
++ ATH79_MACH_MR1750, /* OpenMesh MR1750 */
+ ATH79_MACH_MR600V2, /* OpenMesh MR600v2 */
+ ATH79_MACH_MR600, /* OpenMesh MR600 */
+ ATH79_MACH_MR900, /* OpenMesh MR900 */

View File

@ -9,10 +9,10 @@ https://raw.githubusercontent.com/domino-team/OpenWrt-patches/master/AR150%2C%20
(and fixed indentation in target/linux/ar71xx/base-files/lib/ar71xx.sh)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index ae17853..dc8b8d6 100644
index b867796..d81358d 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -181,6 +181,10 @@ dlan-pro-1200-ac)
@@ -188,6 +188,10 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
@ -24,10 +24,10 @@ index ae17853..dc8b8d6 100644
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 4066506..89a2184 100755
index b59844e..ac3deb8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -381,6 +381,7 @@ dir-505-a1)
@@ -383,6 +383,7 @@ dir-505-a1)
alfa-ap96 |\
alfa-nx |\
ap83 |\
@ -36,10 +36,10 @@ index 4066506..89a2184 100755
jwap003 |\
pb42 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index fbf76c8..db908f9 100755
index 28f07b8..3bd6aed 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -500,6 +500,9 @@ ar71xx_board_detect() {
@@ -503,6 +503,9 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
@ -50,10 +50,10 @@ index fbf76c8..db908f9 100755
name="epg5000"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 4a4c476..aeb4577 100755
index 0228f14..d816f21 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -215,6 +215,7 @@ platform_check_image() {
@@ -216,6 +216,7 @@ platform_check_image() {
dlan-pro-500-wp | \
dlan-pro-1200-ac | \
dragino2 | \
@ -62,10 +62,10 @@ index 4a4c476..aeb4577 100755
esr1750 | \
esr900 | \
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 514f7d5..0903ee9 100644
index a068cc5..d4d9273 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -69,6 +69,7 @@ CONFIG_ATH79_MACH_ESR1750=y
@@ -70,6 +70,7 @@ CONFIG_ATH79_MACH_ESR1750=y
CONFIG_ATH79_MACH_ESR900=y
CONFIG_ATH79_MACH_EW_DORIN=y
CONFIG_ATH79_MACH_F9K1115V2=y
@ -261,7 +261,7 @@ index 0000000..a6ad661
+
+$(eval $(call Profile,GL-AR150))
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 0cf1df1..b790610 100644
index 7c648f2..05eea0b 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -144,6 +144,14 @@ define Device/weio

View File

@ -1,67 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:01 +0000
Subject: ar71xx: add user-space support for the OpenMesh MR1750 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46927
Forwarded: https://patchwork.ozlabs.org/patch/624174/
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 775aac6..44d2ddf 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -143,6 +143,9 @@ get_status_led() {
mr600v2)
status_led="mr600:blue:power"
;;
+ mr1750)
+ status_led="mr1750:blue:power"
+ ;;
mr900 | \
mr900v2)
status_led="mr900:blue:power"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index a4b355a..c451124 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -239,6 +239,12 @@ mr600)
ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
;;
+mr1750)
+ ucidef_set_led_netdev "lan" "LAN" "mr1750:blue:wan" "eth0"
+ ucidef_set_led_wlan "wlan58" "WLAN58" "mr1750:blue:wlan58" "phy0tpt"
+ ucidef_set_led_wlan "wlan24" "WLAN24" "mr1750:blue:wlan24" "phy1tpt"
+ ;;
+
mr900 | \
mr900v2)
ucidef_set_led_netdev "lan" "LAN" "mr900:blue:wan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 0a23756..4066506 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -334,6 +334,7 @@ eap300v2 |\
eap7660d |\
el-mini |\
loco-m-xw |\
+mr1750 |\
mr600 |\
mr600v2 |\
mr900 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 7fc951a..587d029 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -562,6 +562,9 @@ ar71xx_board_detect() {
*MR600v2)
name="mr600v2"
;;
+ *MR1750)
+ name="mr1750"
+ ;;
*MR600)
name="mr600"
;;

View File

@ -1,32 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:18 +0000
Subject: scripts/om-fwupgradecfg-gen.sh: add support for the MR1750
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46928
Forwarded: https://patchwork.ozlabs.org/patch/624175/
diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index e132954..c790214 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -7,7 +7,7 @@
#
usage() {
- echo "Usage: $0 <OM2P|OM5P|MR600|MR900> <out file path> <kernel path> <rootfs path>"
+ echo "Usage: $0 <OM2P|OM5P|MR600|MR900|MR1750> <out file path> <kernel path> <rootfs path>"
rm -f $CFG_OUT
exit 1
}
@@ -26,7 +26,7 @@ case $CE_TYPE in
FLASH_BS=262144
MD5_SKIP_BLOCKS=1
;;
- OM5P|MR600|MR900)
+ OM5P|MR600|MR900|MR1750)
MAX_PART_SIZE=7808
KERNEL_FLASH_ADDR=0xb0000
FLASH_BS=65536

View File

@ -1,55 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:24 +0000
Subject: ar71xx: enable sysupgrade for the OpenMesh MR1750
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46929
Forwarded: https://patchwork.ozlabs.org/patch/624176/
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 547116e..9ca0f5b 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -72,6 +72,11 @@ platform_check_image_openmesh()
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
+ MR1750)
+ [ "$board" = "mr1750" ] && break
+ echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
+ return 1
+ ;;
MR600)
[ "$board" = "mr600" ] && break
[ "$board" = "mr600v2" ] && break
@@ -157,7 +162,7 @@ platform_do_upgrade_openmesh()
kernel_start_addr1=0x9f1c0000
kernel_start_addr2=0x9f8c0000
;;
- OM5P|MR600|MR900)
+ OM5P|MR600|MR900|MR1750)
block_size=$((64 * 1024))
total_size=7995392
kernel_start_addr1=0x9f0b0000
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 0e9833d..ac060ea 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -296,6 +296,7 @@ platform_check_image() {
return 0;
;;
+ mr1750 | \
mr600 | \
mr600v2 | \
mr900 | \
@@ -528,6 +529,7 @@ platform_do_upgrade() {
tew-673gru)
platform_do_upgrade_dir825b "$ARGV"
;;
+ mr1750 | \
mr600 | \
mr600v2 | \
mr900 | \

View File

@ -1,23 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:35 +0000
Subject: package/om-watchdog: add OpenMesh MR1750 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46930
Forwarded: https://patchwork.ozlabs.org/patch/624177/
diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init
index 135fef7..c792968 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -25,7 +25,7 @@ boot() {
"mr600v2")
service_start /sbin/om-watchdog 15
;;
- "mr900"|"mr900v2")
+ "mr900"|"mr900v2"|"mr1750")
service_start /sbin/om-watchdog 16
;;
esac

View File

@ -1,22 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:43 +0000
Subject: package/uboot-envtools: add OpenMesh MR1750 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46931
Forwarded: https://patchwork.ozlabs.org/patch/624178/
diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx
index ec8541c..ef00f17 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -21,6 +21,7 @@ carambola2 | \
eap300v2 | \
hornet-ub | \
hornet-ub-x2 | \
+mr1750 | \
mr600 | \
mr600v2 | \
mr900 | \

View File

@ -1,57 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:11:51 +0000
Subject: ar71xx: create profile and build image for the OpenMesh MR1750 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46932
Forwarded: https://patchwork.ozlabs.org/patch/624179/
diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk b/target/linux/ar71xx/generic/profiles/openmesh.mk
index 41b462e..06cf135 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -49,9 +49,20 @@ endef
$(eval $(call Profile,MR900))
+define Profile/MR1750
+ NAME:=OpenMesh MR1750
+ PACKAGES:=kmod-ath9k kmod-ath10k ath10k-firmware-qca988x
+endef
+
+define Profile/MR1750/Description
+ Package set optimized for the OpenMesh MR1750.
+endef
+
+$(eval $(call Profile,MR1750))
+
define Profile/OPENMESH
NAME:=OpenMesh products
- PACKAGES:=kmod-ath9k om-watchdog
+ PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog
endef
define Profile/OPENMESH/Description
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 7aee0c8..0ebb7dc 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2045,6 +2045,7 @@ $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5p,,,,OM5P))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR600,mr600,,,,MR600))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR900,mr900,,,,MR900))
+$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR1750,mr1750,,,,MR1750))
$(eval $(call SingleProfile,PB4X,128k,ALL0305,all0305,ALL0305,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,128k,EAP7660D,eap7660d,EAP7660D,ttyS0,115200))
@@ -2138,7 +2139,7 @@ $(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
$(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3))
$(eval $(call MultiProfile,AP136,AP136_010 AP136_020))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
-$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600 MR900))
+$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600 MR900 MR1750))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLMR3220,TLMR3220V1))
$(eval $(call MultiProfile,TLMR3420,TLMR3420V1))

View File

@ -1,47 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 16 Mar 2016 09:27:01 +0000
Subject: ar71xx: Extend the list of bits in QCA955X_GMAC_REG_ETH_CFG
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49027
Forwarded: https://patchwork.ozlabs.org/patch/624180/
diff --git a/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
index 8bf7658..797977f 100644
--- a/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
+++ b/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
@@ -207,7 +207,7 @@
#define AR934X_GPIO_REG_FUNC 0x6c
#define AR71XX_GPIO_COUNT 16
-@@ -560,4 +663,153 @@
+@@ -560,4 +663,170 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
@@ -358,6 +358,23 @@
+#define QCA955X_GMAC_REG_ETH_CFG 0x00
+
+#define QCA955X_ETH_CFG_RGMII_EN BIT(0)
++#define QCA955X_ETH_CFG_MII_GE0 BIT(1)
++#define QCA955X_ETH_CFG_GMII_GE0 BIT(2)
++#define QCA955X_ETH_CFG_MII_GE0_MASTER BIT(3)
++#define QCA955X_ETH_CFG_MII_GE0_SLAVE BIT(4)
++#define QCA955X_ETH_CFG_GE0_ERR_EN BIT(5)
+#define QCA955X_ETH_CFG_GE0_SGMII BIT(6)
++#define QCA955X_ETH_CFG_RMII_GE0 BIT(10)
++#define QCA955X_ETH_CFG_MII_CNTL_SPEED BIT(11)
++#define QCA955X_ETH_CFG_RMII_GE0_MASTER BIT(12)
++#define QCA955X_ETH_CFG_RXD_DELAY_MASK 0x3
++#define QCA955X_ETH_CFG_RXD_DELAY_SHIFT 14
++#define QCA955X_ETH_CFG_RDV_DELAY BIT(16)
++#define QCA955X_ETH_CFG_RDV_DELAY_MASK 0x3
++#define QCA955X_ETH_CFG_RDV_DELAY_SHIFT 16
++#define QCA955X_ETH_CFG_TXD_DELAY_MASK 0x3
++#define QCA955X_ETH_CFG_TXD_DELAY_SHIFT 18
++#define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3
++#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20
+
#endif /* __ASM_MACH_AR71XX_REGS_H */

View File

@ -1,49 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Tue, 7 Jul 2015 13:47:39 +0000
Subject: ar71xx: Use *_eth_cfg helper for Open Mesh MR900 boards
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46241
Forwarded: https://patchwork.ozlabs.org/patch/624181/
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
index fe3e1fa..9c3164d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
@@ -94,24 +94,6 @@ static struct gpio_keys_button mr900_gpio_keys[] __initdata = {
},
};
-
-static void __init mr900_gmac_setup(void)
-{
- void __iomem *base;
- u32 t;
-
- base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
-
- t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG);
-
- t &= ~(QCA955X_ETH_CFG_RGMII_EN | QCA955X_ETH_CFG_GE0_SGMII);
- t |= QCA955X_ETH_CFG_RGMII_EN;
-
- __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
-
- iounmap(base);
-}
-
static void __init mr900_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
@@ -141,8 +123,7 @@ static void __init mr900_setup(void)
}
pdata->use_eeprom = true;
- mr900_gmac_setup();
-
+ ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
ath79_register_mdio(0, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, art + MR900_MAC0_OFFSET, 0);

View File

@ -1,79 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Fri, 24 Jul 2015 09:10:00 +0000
Subject: ar71xx: Allow to use ath79_gpio_output_select on QCA955x
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46459
Forwarded: https://patchwork.ozlabs.org/patch/624182/
diff --git a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
new file mode 100644
index 0000000..e71b6e2
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
@@ -0,0 +1,63 @@
+--- a/arch/mips/ath79/gpio.c
++++ b/arch/mips/ath79/gpio.c
+@@ -187,15 +187,30 @@ void __init ath79_gpio_output_select(uns
+ {
+ void __iomem *base = ath79_gpio_base;
+ unsigned long flags;
+- unsigned int reg;
++ unsigned int reg, reg_base;
++ unsigned long gpio_count;
+ u32 t, s;
+
+- BUG_ON(!soc_is_ar934x() && !soc_is_qca953x() && !soc_is_qca956x());
++ if (soc_is_ar934x()) {
++ gpio_count = AR934X_GPIO_COUNT;
++ reg_base = AR934X_GPIO_REG_OUT_FUNC0;
++ } else if (soc_is_qca953x()) {
++ gpio_count = QCA953X_GPIO_COUNT;
++ reg_base = QCA953X_GPIO_REG_OUT_FUNC0;
++ } else if (soc_is_qca955x()) {
++ gpio_count = QCA955X_GPIO_COUNT;
++ reg_base = QCA955X_GPIO_REG_OUT_FUNC0;
++ } else if (soc_is_qca956x()) {
++ gpio_count = QCA956X_GPIO_COUNT;
++ reg_base = QCA956X_GPIO_REG_OUT_FUNC0;
++ } else {
++ BUG();
++ }
+
+- if (gpio >= AR934X_GPIO_COUNT)
++ if (gpio >= gpio_count)
+ return;
+
+- reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
++ reg = reg_base + 4 * (gpio / 4);
+ s = 8 * (gpio % 4);
+
+ spin_lock_irqsave(&ath79_gpio_lock, flags);
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -875,6 +875,14 @@
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
+ #define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
+
++#define QCA955X_GPIO_REG_OUT_FUNC0 0x2c
++#define QCA955X_GPIO_REG_OUT_FUNC1 0x30
++#define QCA955X_GPIO_REG_OUT_FUNC2 0x34
++#define QCA955X_GPIO_REG_OUT_FUNC3 0x38
++#define QCA955X_GPIO_REG_OUT_FUNC4 0x3c
++#define QCA955X_GPIO_REG_OUT_FUNC5 0x40
++#define QCA955X_GPIO_REG_FUNC 0x6c
++
+ #define QCA956X_GPIO_REG_OUT_FUNC0 0x2c
+ #define QCA956X_GPIO_REG_OUT_FUNC1 0x30
+ #define QCA956X_GPIO_REG_OUT_FUNC2 0x34
+@@ -1014,6 +1022,8 @@
+ #define AR934X_GPIO_OUT_EXT_LNA0 46
+ #define AR934X_GPIO_OUT_EXT_LNA1 47
+
++#define QCA955X_GPIO_OUT_GPIO 0
++
+ /*
+ * MII_CTRL block
+ */

View File

@ -1,32 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 23 Mar 2016 12:52:27 +0000
Subject: ar71xx: Add support for ath79_gpio_function_* on QCA955X
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49074
Forwarded: https://patchwork.ozlabs.org/patch/624183/
diff --git a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
index e71b6e2..0e87357 100644
--- a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
+++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
@@ -1,6 +1,16 @@
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
-@@ -187,15 +187,30 @@ void __init ath79_gpio_output_select(uns
+@@ -146,7 +146,8 @@ static void __iomem *ath79_gpio_get_func
+ if (soc_is_ar71xx() ||
+ soc_is_ar724x() ||
+ soc_is_ar913x() ||
+- soc_is_ar933x())
++ soc_is_ar933x() ||
++ soc_is_qca955x())
+ reg = AR71XX_GPIO_REG_FUNC;
+ else if (soc_is_ar934x() ||
+ soc_is_qca953x() ||
+@@ -187,15 +188,30 @@ void __init ath79_gpio_output_select(uns
{
void __iomem *base = ath79_gpio_base;
unsigned long flags;

View File

@ -1,159 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 23 Mar 2016 12:52:31 +0000
Subject: ar71xx: Add QCA955X GPIO mux and function definitions
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49075
Forwarded: https://patchwork.ozlabs.org/patch/624184/
diff --git a/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
index 797977f..0126f6a 100644
--- a/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
+++ b/target/linux/ar71xx/patches-3.18/601-MIPS-ath79-add-more-register-defines.patch
@@ -194,7 +194,7 @@
#define AR933X_BOOTSTRAP_REF_CLK_40 BIT(0)
#define AR934X_BOOTSTRAP_SW_OPTION8 BIT(23)
-@@ -529,6 +626,12 @@
+@@ -529,8 +626,22 @@
#define AR71XX_GPIO_REG_INT_ENABLE 0x24
#define AR71XX_GPIO_REG_FUNC 0x28
@@ -206,8 +206,18 @@
+#define AR934X_GPIO_REG_OUT_FUNC5 0x40
#define AR934X_GPIO_REG_FUNC 0x6c
++#define QCA955X_GPIO_REG_OUT_FUNC0 0x2c
++#define QCA955X_GPIO_REG_OUT_FUNC1 0x30
++#define QCA955X_GPIO_REG_OUT_FUNC2 0x34
++#define QCA955X_GPIO_REG_OUT_FUNC3 0x38
++#define QCA955X_GPIO_REG_OUT_FUNC4 0x3c
++#define QCA955X_GPIO_REG_OUT_FUNC5 0x40
++#define QCA955X_GPIO_REG_FUNC 0x6c
++
#define AR71XX_GPIO_COUNT 16
-@@ -560,4 +663,170 @@
+ #define AR7240_GPIO_COUNT 18
+ #define AR7241_GPIO_COUNT 20
+@@ -560,4 +671,235 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
@@ -288,6 +298,71 @@
+#define AR934X_GPIO_OUT_EXT_LNA0 46
+#define AR934X_GPIO_OUT_EXT_LNA1 47
+
++#define QCA955X_GPIO_FUNC_CLK_OBS7_EN BIT(9)
++#define QCA955X_GPIO_FUNC_CLK_OBS6_EN BIT(8)
++#define QCA955X_GPIO_FUNC_CLK_OBS5_EN BIT(7)
++#define QCA955X_GPIO_FUNC_CLK_OBS4_EN BIT(6)
++#define QCA955X_GPIO_FUNC_CLK_OBS3_EN BIT(5)
++#define QCA955X_GPIO_FUNC_CLK_OBS2_EN BIT(4)
++#define QCA955X_GPIO_FUNC_CLK_OBS1_EN BIT(3)
++#define QCA955X_GPIO_FUNC_JTAG_DISABLE BIT(1)
++
++#define QCA955X_GPIO_OUT_GPIO 0
++#define QCA955X_MII_EXT_MDI 1
++#define QCA955X_SLIC_DATA_OUT 3
++#define QCA955X_SLIC_PCM_FS 4
++#define QCA955X_SLIC_PCM_CLK 5
++#define QCA955X_SPI_CLK 8
++#define QCA955X_SPI_CS_0 9
++#define QCA955X_SPI_CS_1 10
++#define QCA955X_SPI_CS_2 11
++#define QCA955X_SPI_MISO 12
++#define QCA955X_I2S_CLK 13
++#define QCA955X_I2S_WS 14
++#define QCA955X_I2S_SD 15
++#define QCA955X_I2S_MCK 16
++#define QCA955X_SPDIF_OUT 17
++#define QCA955X_UART1_TD 18
++#define QCA955X_UART1_RTS 19
++#define QCA955X_UART1_RD 20
++#define QCA955X_UART1_CTS 21
++#define QCA955X_UART0_SOUT 22
++#define QCA955X_SPDIF2_OUT 23
++#define QCA955X_LED_SGMII_SPEED0 24
++#define QCA955X_LED_SGMII_SPEED1 25
++#define QCA955X_LED_SGMII_DUPLEX 26
++#define QCA955X_LED_SGMII_LINK_UP 27
++#define QCA955X_SGMII_SPEED0_INVERT 28
++#define QCA955X_SGMII_SPEED1_INVERT 29
++#define QCA955X_SGMII_DUPLEX_INVERT 30
++#define QCA955X_SGMII_LINK_UP_INVERT 31
++#define QCA955X_GE1_MII_MDO 32
++#define QCA955X_GE1_MII_MDC 33
++#define QCA955X_SWCOM2 38
++#define QCA955X_SWCOM3 39
++#define QCA955X_MAC2_GPIO 40
++#define QCA955X_MAC3_GPIO 41
++#define QCA955X_ATT_LED 42
++#define QCA955X_PWR_LED 43
++#define QCA955X_TX_FRAME 44
++#define QCA955X_RX_CLEAR_EXTERNAL 45
++#define QCA955X_LED_NETWORK_EN 46
++#define QCA955X_LED_POWER_EN 47
++#define QCA955X_WMAC_GLUE_WOW 68
++#define QCA955X_RX_CLEAR_EXTENSION 70
++#define QCA955X_CP_NAND_CS1 73
++#define QCA955X_USB_SUSPEND 74
++#define QCA955X_ETH_TX_ERR 75
++#define QCA955X_DDR_DQ_OE 76
++#define QCA955X_CLKREQ_N_EP 77
++#define QCA955X_CLKREQ_N_RC 78
++#define QCA955X_CLK_OBS0 79
++#define QCA955X_CLK_OBS1 80
++#define QCA955X_CLK_OBS2 81
++#define QCA955X_CLK_OBS3 82
++#define QCA955X_CLK_OBS4 83
++#define QCA955X_CLK_OBS5 84
++
+/*
+ * MII_CTRL block
+ */
diff --git a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
index 0e87357..8a54859 100644
--- a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
+++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch
@@ -37,37 +37,12 @@
+ }
- if (gpio >= AR934X_GPIO_COUNT)
+- return;
+ if (gpio >= gpio_count)
- return;
++ return;
- reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
+ reg = reg_base + 4 * (gpio / 4);
s = 8 * (gpio % 4);
spin_lock_irqsave(&ath79_gpio_lock, flags);
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -875,6 +875,14 @@
- #define QCA953X_GPIO_OUT_MUX_LED_LINK4 44
- #define QCA953X_GPIO_OUT_MUX_LED_LINK5 45
-
-+#define QCA955X_GPIO_REG_OUT_FUNC0 0x2c
-+#define QCA955X_GPIO_REG_OUT_FUNC1 0x30
-+#define QCA955X_GPIO_REG_OUT_FUNC2 0x34
-+#define QCA955X_GPIO_REG_OUT_FUNC3 0x38
-+#define QCA955X_GPIO_REG_OUT_FUNC4 0x3c
-+#define QCA955X_GPIO_REG_OUT_FUNC5 0x40
-+#define QCA955X_GPIO_REG_FUNC 0x6c
-+
- #define QCA956X_GPIO_REG_OUT_FUNC0 0x2c
- #define QCA956X_GPIO_REG_OUT_FUNC1 0x30
- #define QCA956X_GPIO_REG_OUT_FUNC2 0x34
-@@ -1014,6 +1022,8 @@
- #define AR934X_GPIO_OUT_EXT_LNA0 46
- #define AR934X_GPIO_OUT_EXT_LNA1 47
-
-+#define QCA955X_GPIO_OUT_GPIO 0
-+
- /*
- * MII_CTRL block
- */

View File

@ -1,78 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 16 Mar 2016 09:27:11 +0000
Subject: ar71xx: Use PHY fixups for Open Mesh MR900
The delays of PHY/MAC on the MR900 are done by u-boot and OpenWrt in
different ways. u-boot only modifies the ETH_CFG of the QCA955x based on
the link speed. But OpenWrt can only modify the PHY delays based on the
link speed.
This can lead to communication problems when u-boot initializes the ETH_CFG
for a specific link speed (e.g. 10BASE-T) but then OpenWrt the sets the PHY
delays to an incompatible value.
Instead reset the ETH_CFG delay bits of the QCA955x to a specific value and
only rely on the AT803x PHY settings.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49030
Forwarded: https://patchwork.ozlabs.org/patch/624185/
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
index 9c3164d..3634bf0 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
@@ -23,6 +23,7 @@
#include <linux/ath9k_platform.h>
#include <asm/mach-ath79/ar71xx_regs.h>
+#include <linux/platform_data/phy-at803x.h>
#include "common.h"
#include "dev-ap9x-pci.h"
@@ -94,15 +95,30 @@ static struct gpio_keys_button mr900_gpio_keys[] __initdata = {
},
};
+static struct at803x_platform_data mr900_at803x_data = {
+ .disable_smarteee = 1,
+ .enable_rgmii_rx_delay = 1,
+ .enable_rgmii_tx_delay = 0,
+ .fixup_rgmii_tx_delay = 1,
+};
+
+static struct mdio_board_info mr900_mdio0_info[] = {
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 5,
+ .platform_data = &mr900_at803x_data,
+ },
+};
+
static void __init mr900_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
u8 mac[6], pcie_mac[6];
struct ath9k_platform_data *pdata;
- ath79_eth0_pll_data.pll_1000 = 0xbe000101;
- ath79_eth0_pll_data.pll_100 = 0x80000101;
- ath79_eth0_pll_data.pll_10 = 0x80001313;
+ ath79_eth0_pll_data.pll_1000 = 0xae000000;
+ ath79_eth0_pll_data.pll_100 = 0xa0000101;
+ ath79_eth0_pll_data.pll_10 = 0xa0001313;
ath79_register_m25p80(NULL);
@@ -126,6 +142,9 @@ static void __init mr900_setup(void)
ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
ath79_register_mdio(0, 0x0);
+ mdiobus_register_board_info(mr900_mdio0_info,
+ ARRAY_SIZE(mr900_mdio0_info));
+
ath79_init_mac(ath79_eth0_data.mac_addr, art + MR900_MAC0_OFFSET, 0);
/* GMAC0 is connected to the RMGII interface */

View File

@ -14,11 +14,11 @@ Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
Backport of LEDE 0b45bec22c59cc6e6b2fa71dc9a88386c5587132
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index f182d60..c3aeffc 100644
index cb92349..2c5d6af 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -276,6 +276,7 @@ get_status_led() {
tl-wr841n-v8 | \
@@ -280,6 +280,7 @@ get_status_led() {
tl-wr841n-v11 | \
tl-wa830re-v2 | \
tl-wr842n-v2 | \
+ tl-wr842n-v3 | \
@ -26,10 +26,10 @@ index f182d60..c3aeffc 100644
tl-wr941nd-v5)
status_led="tp-link:green:system"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 032acc9..e118e0a 100644
index d81358d..14aa7bc 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -515,6 +515,16 @@ tl-wr842n-v2)
@@ -523,6 +523,16 @@ tl-wr842n-v2)
ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
;;
@ -47,22 +47,22 @@ index 032acc9..e118e0a 100644
tl-wa901nd-v3)
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b8ae576..3c428ba 100755
index ac3deb8..ca9c577 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -447,6 +447,7 @@ tl-wr741nd |\
tl-wr741nd-v4 |\
@@ -449,6 +449,7 @@ tl-wr741nd-v4 |\
tl-wr841n-v7 |\
tl-wr841n-v9 |\
tl-wr841n-v11 |\
+tl-wr842n-v3 |\
whr-g301n |\
whr-hp-g300n |\
whr-hp-gn |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5119b36..e4a617e 100755
index 3bd6aed..43ce7da 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -863,6 +863,9 @@ ar71xx_board_detect() {
@@ -869,6 +869,9 @@ ar71xx_board_detect() {
*"TL-WR842N/ND v2")
name="tl-wr842n-v2"
;;
@ -73,42 +73,41 @@ index 5119b36..e4a617e 100755
name="tl-wr941nd"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index f33419f..2a1abf3 100755
index d816f21..53284df 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -365,6 +365,7 @@ platform_check_image() {
tl-wr841n-v8 | \
@@ -367,6 +367,7 @@ platform_check_image() {
tl-wr841n-v9 | \
tl-wr841n-v11 | \
tl-wr842n-v2 | \
+ tl-wr842n-v3 | \
tl-wr941nd | \
tl-wr941nd-v5 | \
tl-wr941nd-v6 | \
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
index 3e5c2a2..0209603 100644
index 004f719..ebaed15 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
@@ -1,7 +1,8 @@
@@ -1,9 +1,16 @@
/*
- * TP-LINK TL-WR841N/ND v9
+ * TP-LINK TL-WR841N/ND v9/TL-WR842N/ND v3
+<<<<<<< HEAD
* TP-LINK TL-WR841N/ND v9/v11
*
* Copyright (C) 2014 Matthias Schiffer <mschiffer@universe-factory.net>
* Copyright (C) 2016 Cezary Jackiewicz <cezary@eko.one.pl>
* Copyright (C) 2016 Stijn Segers <francesco.borromini@gmail.com>
+=======
+ * TP-LINK TL-WR841N/ND v9/TL-WR842N/ND v3
+ *
+ * Copyright (C) 2014 Matthias Schiffer <mschiffer@universe-factory.net>
+ * Copyright (C) 2016 Cezary Jackiewicz <cezary@eko.one.pl>
+>>>>>>> ar71xx: add support for TP-LINK TL-WR842N/ND v3
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -19,6 +20,7 @@
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
+#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"
@@ -33,6 +35,20 @@
#define TL_WR841NV9_GPIO_BTN_RESET 12
#define TL_WR841NV9_GPIO_BTN_WIFI 17
@@ -49,6 +56,20 @@
#define TL_WR841NV11_GPIO_BTN_RESET 12
#define TL_WR841NV11_GPIO_BTN_WIFI 17
+#define TL_WR842NV3_GPIO_LED_SYSTEM 2
+#define TL_WR842NV3_GPIO_LED_WLAN 3
@ -127,8 +126,8 @@ index 3e5c2a2..0209603 100644
#define TL_WR841NV9_KEYS_POLL_INTERVAL 20 /* msecs */
#define TL_WR841NV9_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV9_KEYS_POLL_INTERVAL)
@@ -95,6 +111,68 @@ static struct gpio_keys_button tl_wr841n_v9_gpio_keys[] __initdata = {
}
@@ -151,6 +172,68 @@ static struct gpio_led tl_wr841n_v11_leds_gpio[] __initdata = {
},
};
+static struct gpio_led tl_wr842n_v3_leds_gpio[] __initdata = {
@ -193,13 +192,13 @@ index 3e5c2a2..0209603 100644
+ }
+};
+
static void __init tl_ap143_setup(void)
{
@@ -142,3 +220,20 @@ static void __init tl_wr841n_v9_setup(void)
u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
@@ -212,3 +295,20 @@ static void __init tl_wr841n_v11_setup(void)
MIPS_MACHINE(ATH79_MACH_TL_WR841N_V9, "TL-WR841N-v9", "TP-LINK TL-WR841N/ND v9",
tl_wr841n_v9_setup);
MIPS_MACHINE(ATH79_MACH_TL_WR841N_V11, "TL-WR841N-v11", "TP-LINK TL-WR841N/ND v11",
tl_wr841n_v11_setup);
+
+static void __init tl_wr842n_v3_setup(void)
+{
@ -218,7 +217,7 @@ index 3e5c2a2..0209603 100644
+MIPS_MACHINE(ATH79_MACH_TL_WR842N_V3, "TL-WR842N-v3", "TP-LINK TL-WR842N/ND v3",
+ tl_wr842n_v3_setup);
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index b790610..e074f8a 100644
index 05eea0b..d66bd25 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -607,6 +607,13 @@ define Device/tl-wr842n-v2
@ -245,26 +244,26 @@ index b790610..e074f8a 100644
define Device/tl-wr941nd-v5
$(Device/tplink-4mlzma)
diff --git a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
index dbd3fca..4a53355 100644
index debde6e..d4b417b 100644
--- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,201 @@
+@@ -16,22 +16,202 @@
-@@ -16,22 +16,202 @@
+@@ -16,22 +16,203 @@
enum ath79_mach_type {
ATH79_MACH_GENERIC = 0,
@@ -147,6 +147,7 @@
+ ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
@@ -148,6 +148,7 @@
+ ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
+ ATH79_MACH_TL_WR841N_V11, /* TP-LINK TL-WR841N/ND v11 */
+ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
++ ATH79_MACH_TL_WR842N_V3, /* TP-LINK TL-WR842N/ND v3 */
+ ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
+ ATH79_MACH_TL_WR941ND_V5, /* TP-LINK TL-WR941ND v5 */
+ ATH79_MACH_TL_WR941ND_V6, /* TP-LINK TL-WR941ND v6 */
@@ -284,7 +285,7 @@
@@ -285,7 +286,7 @@
config ATH79_MACH_AP121
bool "Atheros AP121 reference board"
select SOC_AR933X
@ -273,7 +272,7 @@ index dbd3fca..4a53355 100644
select ATH79_DEV_M25P80
select ATH79_DEV_USB
select ATH79_DEV_WMAC
@@ -1235,13 +1236,14 @@
@@ -1236,13 +1237,14 @@
+ select ATH79_DEV_WMAC
+
+config ATH79_MACH_TL_WR841N_V9
@ -295,7 +294,7 @@ index dbd3fca..4a53355 100644
+
+config ATH79_MACH_TL_WR941ND
+ bool "TP-LINK TL-WR941ND support"
@@ -1364,7 +1366,7 @@
@@ -1365,7 +1367,7 @@
config ATH79_MACH_UBNT_XM
bool "Ubiquiti Networks XM/UniFi boards"
@ -304,7 +303,7 @@ index dbd3fca..4a53355 100644
Say 'Y' here if you want your kernel to support the
Ubiquiti Networks XM (rev 1.0) board.
@@ -1482,7 +1484,7 @@
@@ -1483,7 +1485,7 @@
endmenu
config SOC_AR71XX
@ -313,7 +312,7 @@ index dbd3fca..4a53355 100644
config ATH79_DEV_ETH
def_bool n
@@ -1494,7 +1496,7 @@
@@ -1495,7 +1497,7 @@
def_bool n
config ATH79_DEV_GPIO_BUTTONS

View File

@ -1,77 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 16 Mar 2016 09:27:14 +0000
Subject: ar71xx: Use PHY fixups for Open Mesh MR1750
The delays of PHY/MAC on the MR1750 are done by u-boot and OpenWrt in
different ways. u-boot only modifies the ETH_CFG of the QCA955x based on
the link speed. But OpenWrt can only modify the PHY delays based on the
link speed.
This can lead to communication problems when u-boot initializes the ETH_CFG
for a specific link speed (e.g. 10BASE-T) but then OpenWrt the sets the PHY
delays to an incompatible value.
Instead reset the ETH_CFG delay bits of the QCA955x to a specific value and
only rely on the AT803x PHY settings.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49031
Forwarded: https://patchwork.ozlabs.org/patch/624186/
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
index 8ace02f..f9e45bd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
@@ -22,6 +22,7 @@
#include <linux/ar8216_platform.h>
#include <asm/mach-ath79/ar71xx_regs.h>
+#include <linux/platform_data/phy-at803x.h>
#include "common.h"
#include "dev-ap9x-pci.h"
@@ -92,14 +93,29 @@ static struct gpio_keys_button mr1750_gpio_keys[] __initdata = {
},
};
+static struct at803x_platform_data mr1750_at803x_data = {
+ .disable_smarteee = 1,
+ .enable_rgmii_rx_delay = 1,
+ .enable_rgmii_tx_delay = 0,
+ .fixup_rgmii_tx_delay = 1,
+};
+
+static struct mdio_board_info mr1750_mdio0_info[] = {
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 5,
+ .platform_data = &mr1750_at803x_data,
+ },
+};
+
static void __init mr1750_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
u8 mac[6];
- ath79_eth0_pll_data.pll_1000 = 0xbe000101;
- ath79_eth0_pll_data.pll_100 = 0x80000101;
- ath79_eth0_pll_data.pll_10 = 0x80001313;
+ ath79_eth0_pll_data.pll_1000 = 0xae000000;
+ ath79_eth0_pll_data.pll_100 = 0xa0000101;
+ ath79_eth0_pll_data.pll_10 = 0xa0001313;
ath79_register_m25p80(NULL);
@@ -116,6 +132,9 @@ static void __init mr1750_setup(void)
ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
ath79_register_mdio(0, 0x0);
+ mdiobus_register_board_info(mr1750_mdio0_info,
+ ARRAY_SIZE(mr1750_mdio0_info));
+
ath79_init_mac(ath79_eth0_data.mac_addr, art + MR1750_MAC0_OFFSET, 0);
/* GMAC0 is connected to the RMGII interface */

View File

@ -1,58 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 23 Mar 2016 12:52:09 +0000
Subject: ar71xx: Use private version of ath79_setup_qca955x_eth_cfg for MR900
The MR900 must unset some bits in ETH_CFG which were set by u-boot to work
correctly under OpenWrt. But the global function
ath79_setup_qca955x_eth_cfg will not unset all of them to increase the
backward compatiblity with older mach-* files. A private (simplified)
version for MR900 can be used instead.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49069
Forwarded: https://patchwork.ozlabs.org/patch/624187/
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
index 3634bf0..b439f58 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
@@ -110,6 +110,28 @@ static struct mdio_board_info mr900_mdio0_info[] = {
},
};
+static void __init mr900_setup_qca955x_eth_cfg(u32 mask,
+ unsigned int rxd,
+ unsigned int rxdv,
+ unsigned int txd,
+ unsigned int txe)
+{
+ void __iomem *base;
+ u32 t;
+
+ base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+ t = mask;
+ t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
+ t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
+ t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
+ t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
+
+ __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
+
+ iounmap(base);
+}
+
static void __init mr900_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
@@ -139,7 +161,7 @@ static void __init mr900_setup(void)
}
pdata->use_eeprom = true;
- ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+ mr900_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
ath79_register_mdio(0, 0x0);
mdiobus_register_board_info(mr900_mdio0_info,

View File

@ -1,58 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Wed, 23 Mar 2016 12:52:12 +0000
Subject: ar71xx: Use private version of ath79_setup_qca955x_eth_cfg for MR1750
The MR1750 must unset some bits in ETH_CFG which were set by u-boot to work
correctly under OpenWrt. But the global function
ath79_setup_qca955x_eth_cfg will not unset all of them to increase the
backward compatiblity with older mach-* files. A private (simplified)
version for MR1750 can be used instead.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49070
Forwarded: https://patchwork.ozlabs.org/patch/624188/
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
index f9e45bd..e3c04e7 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr1750.c
@@ -108,6 +108,28 @@ static struct mdio_board_info mr1750_mdio0_info[] = {
},
};
+static void __init mr1750_setup_qca955x_eth_cfg(u32 mask,
+ unsigned int rxd,
+ unsigned int rxdv,
+ unsigned int txd,
+ unsigned int txe)
+{
+ void __iomem *base;
+ u32 t;
+
+ base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+ t = mask;
+ t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
+ t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
+ t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
+ t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
+
+ __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
+
+ iounmap(base);
+}
+
static void __init mr1750_setup(void)
{
u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
@@ -129,7 +151,7 @@ static void __init mr1750_setup(void)
ath79_register_wmac(art + MR1750_WMAC_CALDATA_OFFSET, mac);
ath79_register_pci();
- ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+ mr1750_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
ath79_register_mdio(0, 0x0);
mdiobus_register_board_info(mr1750_mdio0_info,

View File

@ -9,7 +9,7 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of LEDE 500a67a167a256002f8ab05171f49dfb86b03260
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index beca73a..480cf93 100755
index 43ce7da..4bf484b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -107,6 +107,15 @@ cybertan_get_hw_magic() {

View File

@ -12,10 +12,10 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Backport of LEDE adbbfb7ff900c489e6be34b2ec2834172dff7943
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 9a0d7eb..7c18346 100644
index 14aa7bc..3d240fb 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -132,10 +132,6 @@ dhp-1565-a1)
@@ -139,10 +139,6 @@ dhp-1565-a1)
ucidef_set_led_switch "wan" "WAN" "d-link:green:planet" "switch0" "0x20"
;;

View File

@ -1,43 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Mon, 14 Sep 2015 20:10:10 +0000
Subject: scripts/om-fwupgradecfg-gen.sh: Fix u-boot image md5sum check
The u-boot on Open Mesh devices checks the whole transfered image against a
md5sum. This is stored inside the option filemd5sum inside the
fwupgrade.cfg. The bootloader will not check it when this setting is
missing and could therefore write invalid images to the flash.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r46925
Forwarded: https://patchwork.ozlabs.org/patch/624189/
diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index c790214..fab1582 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -48,6 +48,7 @@ ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); p
ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH")
ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS))
ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | md5sum); echo ${md5%% *})
+ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *})
ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS)))
ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE))
@@ -55,6 +56,7 @@ cat << EOF > $CFG_OUT
[vmlinux]
filename=kernel
md5sum=$KERNEL_MD5
+filemd5sum=$KERNEL_MD5
flashaddr=$KERNEL_FLASH_ADDR
checksize=0x0
cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv
@@ -63,6 +65,7 @@ cmd_fail=reset
[rootfs]
filename=rootfs
md5sum=$ROOTFS_MD5
+filemd5sum=$ROOTFS_MD5_FULL
flashaddr=$ROOTFS_FLASH_ADDR
checksize=$ROOTFS_CHECK_SIZE
cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv rootfs_size_1 $ROOTFS_PART_SIZE; saveenv

View File

@ -1,50 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:25:42 +0000
Subject: scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification
Future Open Mesh u-boot versions are changing the check of the image files
(vmlinux, rootfs) from md5 to sha256. Having both in them should be enough
to ensure backward and forward compatibility.
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49140
Forwarded: https://patchwork.ozlabs.org/patch/624190/
diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index fab1582..e208e6d 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -42,6 +42,7 @@ CHECK_BS=65536
KERNEL_SIZE=$(stat -c%s "$KERNEL_PATH")
KERNEL_MD5=$(md5=$(md5sum $KERNEL_PATH); echo ${md5%% *})
+KERNEL_SHA256=$(openssl dgst -sha256 $KERNEL_PATH | awk '{print $2}')
KERNEL_PART_SIZE=$(size=$(($KERNEL_SIZE / $FLASH_BS)); [ $(($size * $FLASH_BS)) -lt $KERNEL_SIZE ] && size=$(($size + 1)); echo $(($size * $FLASH_BS / 1024)))
ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); printf "0x%x" $addr)
@@ -49,6 +50,7 @@ ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH")
ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS))
ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | md5sum); echo ${md5%% *})
ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *})
+ROOTFS_SHA256_FULL=$(openssl dgst -sha256 $ROOTFS_PATH | awk '{print $2}')
ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS)))
ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE))
@@ -57,6 +59,7 @@ cat << EOF > $CFG_OUT
filename=kernel
md5sum=$KERNEL_MD5
filemd5sum=$KERNEL_MD5
+filesha256sum=$KERNEL_SHA256
flashaddr=$KERNEL_FLASH_ADDR
checksize=0x0
cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv
@@ -66,6 +69,7 @@ cmd_fail=reset
filename=rootfs
md5sum=$ROOTFS_MD5
filemd5sum=$ROOTFS_MD5_FULL
+filesha256sum=$ROOTFS_SHA256_FULL
flashaddr=$ROOTFS_FLASH_ADDR
checksize=$ROOTFS_CHECK_SIZE
cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv rootfs_size_1 $ROOTFS_PART_SIZE; saveenv

View File

@ -1,265 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:25:47 +0000
Subject: ar71xx: add kernel support for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49141
Forwarded: https://patchwork.ozlabs.org/patch/624191/
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index c5a3c9a..dd89357 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -91,6 +91,7 @@ CONFIG_ATH79_MACH_NBG460N=y
CONFIG_ATH79_MACH_NBG6716=y
CONFIG_ATH79_MACH_OM2P=y
CONFIG_ATH79_MACH_OM5P=y
+CONFIG_ATH79_MACH_OM5P_AC=y
CONFIG_ATH79_MACH_ONION_OMEGA=y
CONFIG_ATH79_MACH_PB42=y
CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c
new file mode 100644
index 0000000..f6974af
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c
@@ -0,0 +1,193 @@
+/*
+ * OpenMesh OM5P-AC support
+ *
+ * Copyright (C) 2013 Marek Lindner <marek@open-mesh.com>
+ * Copyright (C) 2014 Sven Eckelmann <sven@open-mesh.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c-gpio.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <asm/mach-ath79/ath79.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define OM5PAC_GPIO_LED_POWER 18
+#define OM5PAC_GPIO_LED_GREEN 21
+#define OM5PAC_GPIO_LED_RED 23
+#define OM5PAC_GPIO_LED_YELLOW 22
+#define OM5PAC_GPIO_LED_LAN 20
+#define OM5PAC_GPIO_LED_WAN 19
+#define OM5PAC_GPIO_I2C_SCL 12
+#define OM5PAC_GPIO_I2C_SDA 11
+
+#define OM5PAC_KEYS_POLL_INTERVAL 20 /* msecs */
+#define OM5PAC_KEYS_DEBOUNCE_INTERVAL (3 * OM5PAC_KEYS_POLL_INTERVAL)
+
+#define OM5PAC_WMAC_CALDATA_OFFSET 0x1000
+
+static struct gpio_led om5pac_leds_gpio[] __initdata = {
+ {
+ .name = "om5pac:blue:power",
+ .gpio = OM5PAC_GPIO_LED_POWER,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:red:wifi",
+ .gpio = OM5PAC_GPIO_LED_RED,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:yellow:wifi",
+ .gpio = OM5PAC_GPIO_LED_YELLOW,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:green:wifi",
+ .gpio = OM5PAC_GPIO_LED_GREEN,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:blue:lan",
+ .gpio = OM5PAC_GPIO_LED_LAN,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:blue:wan",
+ .gpio = OM5PAC_GPIO_LED_WAN,
+ .active_low = 1,
+ }
+};
+
+static struct flash_platform_data om5pac_flash_data = {
+ .type = "mx25l12805d",
+};
+
+static struct i2c_gpio_platform_data om5pac_i2c_device_platdata = {
+ .sda_pin = OM5PAC_GPIO_I2C_SDA,
+ .scl_pin = OM5PAC_GPIO_I2C_SCL,
+ .udelay = 10,
+ .sda_is_open_drain = 1,
+ .scl_is_open_drain = 1,
+};
+
+static struct platform_device om5pac_i2c_device = {
+ .name = "i2c-gpio",
+ .id = 0,
+ .dev = {
+ .platform_data = &om5pac_i2c_device_platdata,
+ },
+};
+
+static struct i2c_board_info om5pac_i2c_devs[] __initdata = {
+ {
+ I2C_BOARD_INFO("tmp423", 0x4c),
+ },
+};
+
+static struct at803x_platform_data om5pac_at803x_data = {
+ .disable_smarteee = 1,
+ .enable_rgmii_rx_delay = 1,
+ .enable_rgmii_tx_delay = 1,
+};
+
+static struct mdio_board_info om5pac_mdio0_info[] = {
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 1,
+ .platform_data = &om5pac_at803x_data,
+ },
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 2,
+ .platform_data = &om5pac_at803x_data,
+ },
+};
+
+static void __init om5p_ac_setup_qca955x_eth_cfg(u32 mask,
+ unsigned int rxd,
+ unsigned int rxdv,
+ unsigned int txd,
+ unsigned int txe)
+{
+ void __iomem *base;
+ u32 t;
+
+ base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+ t = mask;
+ t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
+ t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
+ t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
+ t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
+
+ __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
+
+ iounmap(base);
+}
+
+static void __init om5p_ac_setup(void)
+{
+ u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
+ u8 mac[6];
+
+ /* temperature sensor */
+ platform_device_register(&om5pac_i2c_device);
+ i2c_register_board_info(0, om5pac_i2c_devs,
+ ARRAY_SIZE(om5pac_i2c_devs));
+
+ ath79_gpio_output_select(OM5PAC_GPIO_LED_WAN, QCA955X_GPIO_OUT_GPIO);
+
+ ath79_register_m25p80(&om5pac_flash_data);
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(om5pac_leds_gpio),
+ om5pac_leds_gpio);
+
+ ath79_init_mac(mac, art, 0x02);
+ ath79_register_wmac(art + OM5PAC_WMAC_CALDATA_OFFSET, mac);
+
+ om5p_ac_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
+ ath79_register_mdio(0, 0x0);
+
+ mdiobus_register_board_info(om5pac_mdio0_info,
+ ARRAY_SIZE(om5pac_mdio0_info));
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, art, 0x00);
+ ath79_init_mac(ath79_eth1_data.mac_addr, art, 0x01);
+
+ /* GMAC0 is connected to the PHY1 */
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+ ath79_eth0_data.phy_mask = BIT(1);
+ ath79_eth0_pll_data.pll_1000 = 0x82000101;
+ ath79_eth0_pll_data.pll_100 = 0x80000101;
+ ath79_eth0_pll_data.pll_10 = 0x80001313;
+ ath79_register_eth(0);
+
+ /* GMAC1 is connected to MDIO1 in SGMII mode */
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+ ath79_eth1_data.mii_bus_dev = &ath79_mdio0_device.dev;
+ ath79_eth1_data.phy_mask = BIT(2);
+ ath79_eth1_pll_data.pll_1000 = 0x03000101;
+ ath79_eth1_pll_data.pll_100 = 0x80000101;
+ ath79_eth1_pll_data.pll_10 = 0x80001313;
+ ath79_eth1_data.speed = SPEED_1000;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
+ ath79_register_eth(1);
+
+ ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_OM5P_AC, "OM5P-AC", "OpenMesh OM5P AC", om5p_ac_setup);
diff --git a/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-om5pac-support.patch b/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-om5pac-support.patch
new file mode 100644
index 0000000..4accd03
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/815-MIPS-ath79-add-om5pac-support.patch
@@ -0,0 +1,38 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -799,6 +799,15 @@ config ATH79_MACH_OM5P
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
+
++config ATH79_MACH_OM5P_AC
++ bool "OpenMesh OM5P-AC board support"
++ select SOC_QCA955X
++ select ATH79_DEV_AP9X_PCI if PCI
++ select ATH79_DEV_ETH
++ select ATH79_DEV_LEDS_GPIO
++ select ATH79_DEV_M25P80
++ select ATH79_DEV_WMAC
++
+ config ATH79_MACH_ONION_OMEGA
+ bool "ONION OMEGA support"
+ select SOC_AR933X
+--- a/arch/mips/ath79/Makefile
++++ b/arch/mips/ath79/Makefile
+@@ -100,6 +100,7 @@ obj-$(CONFIG_ATH79_MACH_MZK_W300NH) += m
+ obj-$(CONFIG_ATH79_MACH_NBG460N) += mach-nbg460n.o
+ obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o
+ obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o
++obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o
+ obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o
+ obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o
+ obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -95,6 +95,7 @@ enum ath79_mach_type {
+ ATH79_MACH_OM2P_LC, /* OpenMesh OM2P-LC */
+ ATH79_MACH_OM2Pv2, /* OpenMesh OM2Pv2 */
+ ATH79_MACH_OM2P, /* OpenMesh OM2P */
++ ATH79_MACH_OM5P_AC, /* OpenMesh OM5P-AC */
+ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */
+ ATH79_MACH_OM5P, /* OpenMesh OM5P */
+ ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */

View File

@ -22,7 +22,7 @@ index b41f275..0f7a415 100644
ucidef_set_gpio_switch "poe_passthrough" "PoE Passthrough" "20"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 7c18346..0056520 100644
index 3d240fb..f1266d8 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -78,6 +78,7 @@ carambola2)
@ -34,10 +34,10 @@ index 7c18346..0056520 100644
ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index d5603d7..dd6ca98 100755
index ca9c577..6c3ecf5 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -71,6 +71,7 @@ bsb)
@@ -72,6 +72,7 @@ bsb)
ucidef_set_interface_wlan
;;
@ -46,7 +46,7 @@ index d5603d7..dd6ca98 100755
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 480cf93..47ddd56 100755
index 4bf484b..51102d6 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -447,7 +447,11 @@ ar71xx_board_detect() {
@ -63,10 +63,10 @@ index 480cf93..47ddd56 100755
tplink_pharos_board_detect
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index f50cd53..8594de6 100755
index 53284df..4003b21 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -264,6 +264,7 @@ platform_check_image() {
@@ -265,6 +265,7 @@ platform_check_image() {
return 0
;;
@ -126,10 +126,10 @@ index 5cb052a..74daf43 100644
+MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520",
cpe510_setup);
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index f99ea2b..33a2da5 100644
index d66bd25..75083f9 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2109,7 +2109,8 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR10
@@ -2111,7 +2111,8 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR10
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
@ -139,7 +139,7 @@ index f99ea2b..33a2da5 100644
$(eval $(call SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
$(eval $(call SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))
@@ -2173,6 +2174,7 @@ $(eval $(call MultiProfile,TLWR842,TLWR842V1))
@@ -2175,6 +2176,7 @@ $(eval $(call MultiProfile,TLWR842,TLWR842V1))
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2 TLWR1043V3))
$(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))

View File

@ -1,54 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:25:51 +0000
Subject: ar71xx: add user-space support for the OpenMesh OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49142
Forwarded: https://patchwork.ozlabs.org/patch/624192/
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 44d2ddf..a4051f2 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -178,6 +178,9 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
+ om5p-ac)
+ status_led="om5pac:blue:power"
+ ;;
onion-omega)
status_led="onion:amber:system"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index c451124..9a768cd 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -304,6 +304,11 @@ om5p-an)
ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
;;
+om5p-ac)
+ ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
+ ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
+ ;;
+
qihoo-c301)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 587d029..10b8048 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -616,6 +616,9 @@ ar71xx_board_detect() {
*"OM5P AN")
name="om5p-an"
;;
+ *"OM5P AC")
+ name="om5p-ac"
+ ;;
*"Onion Omega")
name="onion-omega"
;;

View File

@ -1,32 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:25:54 +0000
Subject: scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49143
Forwarded: https://patchwork.ozlabs.org/patch/624193/
diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh
index e208e6d..6c3b74c 100644
--- a/scripts/om-fwupgradecfg-gen.sh
+++ b/scripts/om-fwupgradecfg-gen.sh
@@ -7,7 +7,7 @@
#
usage() {
- echo "Usage: $0 <OM2P|OM5P|MR600|MR900|MR1750> <out file path> <kernel path> <rootfs path>"
+ echo "Usage: $0 <OM2P|OM5P|OM5PAC|MR600|MR900|MR1750> <out file path> <kernel path> <rootfs path>"
rm -f $CFG_OUT
exit 1
}
@@ -26,7 +26,7 @@ case $CE_TYPE in
FLASH_BS=262144
MD5_SKIP_BLOCKS=1
;;
- OM5P|MR600|MR900|MR1750)
+ OM5P|OM5PAC|MR600|MR900|MR1750)
MAX_PART_SIZE=7808
KERNEL_FLASH_ADDR=0xb0000
FLASH_BS=65536

View File

@ -12,10 +12,10 @@ Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Backport of LEDE 824147960569f2c1cd22140c9074c62c3df911a5
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 33a2da5..b288a1d 100644
index 75083f9..bb2bb94 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2109,7 +2109,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR10
@@ -2111,7 +2111,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR10
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))

View File

@ -1,59 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:25:57 +0000
Subject: ar71xx: enable sysupgrade for the OpenMesh OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49144
Forwarded: https://patchwork.ozlabs.org/patch/624194/
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 9ca0f5b..1cfead9 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -72,6 +72,11 @@ platform_check_image_openmesh()
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
+ OM5PAC)
+ [ "$board" = "om5p-ac" ] && break
+ echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
+ return 1
+ ;;
MR1750)
[ "$board" = "mr1750" ] && break
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
@@ -162,7 +167,7 @@ platform_do_upgrade_openmesh()
kernel_start_addr1=0x9f1c0000
kernel_start_addr2=0x9f8c0000
;;
- OM5P|MR600|MR900|MR1750)
+ OM5P|OM5PAC|MR600|MR900|MR1750)
block_size=$((64 * 1024))
total_size=7995392
kernel_start_addr1=0x9f0b0000
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index ac060ea..67c0661 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -307,7 +307,8 @@ platform_check_image() {
om2p-hsv2 | \
om2p-lc | \
om5p | \
- om5p-an)
+ om5p-an | \
+ om5p-ac)
platform_check_image_openmesh "$magic_long" "$1" && return 0
return 1
;;
@@ -540,7 +541,8 @@ platform_do_upgrade() {
om2p-hsv2 | \
om2p-lc | \
om5p | \
- om5p-an)
+ om5p-an | \
+ om5p-ac)
platform_do_upgrade_openmesh "$ARGV"
;;
unifi-outdoor-plus | \

View File

@ -7,10 +7,10 @@ Signed-off-by: Tiziano Bacocco <tizbac2@gmail.com>
Backport of OpenWrt r48705
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index dd6ca98..e6b129a 100755
index 6c3ecf5..027a671 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -376,6 +376,7 @@ wp543)
@@ -377,6 +377,7 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
@ -19,10 +19,10 @@ index dd6ca98..e6b129a 100755
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 47ddd56..7641e63 100755
index 51102d6..83be329 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -835,6 +835,9 @@ ar71xx_board_detect() {
@@ -838,6 +838,9 @@ ar71xx_board_detect() {
*"TL-WA801ND v2")
name="tl-wa801nd-v2"
;;
@ -33,10 +33,10 @@ index 47ddd56..7641e63 100755
name="tl-wa901nd"
;;
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index 0903ee9..c75833d 100644
index d4d9273..d7cbe2e 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -119,6 +119,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y
@@ -120,6 +120,7 @@ CONFIG_ATH79_MACH_TL_MR3020=y
CONFIG_ATH79_MACH_TL_MR3X20=y
CONFIG_ATH79_MACH_TL_WA701ND_V2=y
CONFIG_ATH79_MACH_TL_WA7210N_V2=y
@ -187,7 +187,7 @@ index 0000000..39cdb10
+MIPS_MACHINE(ATH79_MACH_TL_WA801ND_V3, "TL-WA801ND-v3", "TP-LINK TL-WA801ND v3",
+ tl_wa801n_v3_setup);
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index b288a1d..dfc0d71 100644
index bb2bb94..868a502 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -691,6 +691,13 @@ define Device/tl-wa801nd-v2

View File

@ -1,24 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:01 +0000
Subject: om-watchdog: add OpenMesh OM5P-AC support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49145
Forwarded: https://patchwork.ozlabs.org/patch/624195/
diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init
index c792968..8cec13b 100644
--- a/package/kernel/om-watchdog/files/om-watchdog.init
+++ b/package/kernel/om-watchdog/files/om-watchdog.init
@@ -22,6 +22,9 @@ boot() {
"om5p"|"om5p-an")
service_start /sbin/om-watchdog 11
;;
+ "om5p-ac")
+ service_start /sbin/om-watchdog 17
+ ;;
"mr600v2")
service_start /sbin/om-watchdog 15
;;

View File

@ -1,22 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:04 +0000
Subject: uboot-envtools: add OpenMesh OM5P-AC support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49146
Forwarded: https://patchwork.ozlabs.org/patch/624196/
diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx
index ef00f17..657b25f 100644
--- a/package/boot/uboot-envtools/files/ar71xx
+++ b/package/boot/uboot-envtools/files/ar71xx
@@ -28,6 +28,7 @@ mr900 | \
mr900v2 | \
nbg6716 | \
om5p-an | \
+om5p-ac | \
om5p | \
tube2h | \
wndr3700)

View File

@ -6,7 +6,7 @@ Generate flashable images for the Archer C7 v2 with current stock firmware
again.
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index dfc0d71..cbd8a49 100644
index 868a502..95f6d46 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -58,13 +58,14 @@ define Build/mktplinkfw

View File

@ -1,25 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:08 +0000
Subject: ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49147
Forwarded: https://patchwork.ozlabs.org/patch/624197/
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index cde7aaf..c1f4b85 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -96,6 +96,10 @@ case "$FIRMWARE" in
rb-911g-5hpacd)
ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116
;;
+ om5p-ac)
+ ath10kcal_extract "ART" 20480 2116
+ ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16)
+ ;;
esac
;;
*)

View File

@ -1,53 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:11 +0000
Subject: ar71xx: create profile and build image for the OpenMesh OM5P-AC board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49148
Forwarded: https://patchwork.ozlabs.org/patch/624198/
diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk b/target/linux/ar71xx/generic/profiles/openmesh.mk
index 06cf135..64aaa24 100644
--- a/target/linux/ar71xx/generic/profiles/openmesh.mk
+++ b/target/linux/ar71xx/generic/profiles/openmesh.mk
@@ -27,6 +27,17 @@ endef
$(eval $(call Profile,OM5P))
+define Profile/OM5PAC
+ NAME:=OpenMesh OM5P-AC
+ PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog ath10k-firmware-qca988x
+endef
+
+define Profile/OM5PAC/Description
+ Package set optimized for the OpenMesh OM5P-AC.
+endef
+
+$(eval $(call Profile,OM5PAC))
+
define Profile/MR600
NAME:=OpenMesh MR600
PACKAGES:=kmod-ath9k om-watchdog
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 0ebb7dc..0cf1df1 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -2043,6 +2043,7 @@ $(eval $(call SingleProfile,Netgear,64kraw,WPN824N,wpn824n,WPN824N,ttyS0,115200,
$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5p,,,,OM5P))
+$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5PAC,om5pac,,,,OM5PAC))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR600,mr600,,,,MR600))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR900,mr900,,,,MR900))
$(eval $(call SingleProfile,OpenMesh,squashfs-only,MR1750,mr1750,,,,MR1750))
@@ -2139,7 +2140,7 @@ $(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
$(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3))
$(eval $(call MultiProfile,AP136,AP136_010 AP136_020))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
-$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600 MR900 MR1750))
+$(eval $(call MultiProfile,OPENMESH,OM2P OM5P OM5PAC MR600 MR900 MR1750))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLMR3220,TLMR3220V1))
$(eval $(call MultiProfile,TLMR3420,TLMR3420V1))

View File

@ -1,289 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:15 +0000
Subject: ar71xx: add kernel support for the OpenMesh OM5P-ACv2 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49149
Forwarded: https://patchwork.ozlabs.org/patch/624199/
diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18
index dd89357..514f7d5 100644
--- a/target/linux/ar71xx/config-3.18
+++ b/target/linux/ar71xx/config-3.18
@@ -92,6 +92,7 @@ CONFIG_ATH79_MACH_NBG6716=y
CONFIG_ATH79_MACH_OM2P=y
CONFIG_ATH79_MACH_OM5P=y
CONFIG_ATH79_MACH_OM5P_AC=y
+CONFIG_ATH79_MACH_OM5P_ACv2=y
CONFIG_ATH79_MACH_ONION_OMEGA=y
CONFIG_ATH79_MACH_PB42=y
CONFIG_ATH79_MACH_PB44=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c
new file mode 100644
index 0000000..587ca32
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c
@@ -0,0 +1,216 @@
+/*
+ * OpenMesh OM5P-ACv2 support
+ *
+ * Copyright (C) 2013 Marek Lindner <marek@open-mesh.com>
+ * Copyright (C) 2014-2016 Sven Eckelmann <sven@open-mesh.com>
+ * Copyright (C) 2015 Open-Mesh - Jim Collar <jim.collar@eqware.net>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+#include <linux/mdio-gpio.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c-gpio.h>
+#include <linux/platform_data/phy-at803x.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <asm/mach-ath79/ath79.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define OM5PACV2_GPIO_LED_POWER 14
+#define OM5PACV2_GPIO_LED_GREEN 13
+#define OM5PACV2_GPIO_LED_RED 23
+#define OM5PACV2_GPIO_LED_YELLOW 15
+#define OM5PACV2_GPIO_BTN_RESET 1
+#define OM5PACV2_GPIO_I2C_SCL 18
+#define OM5PACV2_GPIO_I2C_SDA 19
+#define OM5PACV2_GPIO_PA_DCDC 2
+#define OM5PACV2_GPIO_PA_HIGH 16
+
+#define OM5PACV2_KEYS_POLL_INTERVAL 20 /* msecs */
+#define OM5PACV2_KEYS_DEBOUNCE_INTERVAL (3 * OM5PACV2_KEYS_POLL_INTERVAL)
+
+#define OM5PACV2_WMAC_CALDATA_OFFSET 0x1000
+
+static struct gpio_led om5pacv2_leds_gpio[] __initdata = {
+ {
+ .name = "om5pac:blue:power",
+ .gpio = OM5PACV2_GPIO_LED_POWER,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:red:wifi",
+ .gpio = OM5PACV2_GPIO_LED_RED,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:yellow:wifi",
+ .gpio = OM5PACV2_GPIO_LED_YELLOW,
+ .active_low = 1,
+ }, {
+ .name = "om5pac:green:wifi",
+ .gpio = OM5PACV2_GPIO_LED_GREEN,
+ .active_low = 1,
+ }
+};
+
+static struct gpio_keys_button om5pacv2_gpio_keys[] __initdata = {
+ {
+ .desc = "reset",
+ .type = EV_KEY,
+ .code = KEY_RESTART,
+ .debounce_interval = OM5PACV2_KEYS_DEBOUNCE_INTERVAL,
+ .gpio = OM5PACV2_GPIO_BTN_RESET,
+ .active_low = 1,
+ }
+};
+
+static struct i2c_gpio_platform_data om5pacv2_i2c_device_platdata = {
+ .sda_pin = OM5PACV2_GPIO_I2C_SDA,
+ .scl_pin = OM5PACV2_GPIO_I2C_SCL,
+ .udelay = 10,
+ .sda_is_open_drain = 1,
+ .scl_is_open_drain = 1,
+};
+
+static struct platform_device om5pacv2_i2c_device = {
+ .name = "i2c-gpio",
+ .id = 0,
+ .dev = {
+ .platform_data = &om5pacv2_i2c_device_platdata,
+ },
+};
+
+static struct i2c_board_info om5pacv2_i2c_devs[] __initdata = {
+ {
+ I2C_BOARD_INFO("tmp423", 0x4e),
+ },
+};
+
+static struct flash_platform_data om5pacv2_flash_data = {
+ .type = "mx25l12805d",
+};
+
+static struct at803x_platform_data om5pacv2_an_at803x_data = {
+ .disable_smarteee = 1,
+ .enable_rgmii_rx_delay = 1,
+ .enable_rgmii_tx_delay = 1,
+};
+
+static struct at803x_platform_data om5pacv2_an_at8031_data = {
+ .disable_smarteee = 1,
+ .enable_rgmii_rx_delay = 1,
+ .enable_rgmii_tx_delay = 1,
+};
+
+static struct mdio_board_info om5pacv2_an_mdio0_info[] = {
+ {
+ .bus_id = "ag71xx-mdio.0",
+ .phy_addr = 4,
+ .platform_data = &om5pacv2_an_at803x_data,
+ },
+ {
+ .bus_id = "ag71xx-mdio.1",
+ .phy_addr = 1,
+ .platform_data = &om5pacv2_an_at8031_data,
+ },
+};
+
+static void __init om5p_acv2_setup_qca955x_eth_cfg(u32 mask,
+ unsigned int rxd,
+ unsigned int rxdv,
+ unsigned int txd,
+ unsigned int txe)
+{
+ void __iomem *base;
+ u32 t;
+
+ base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
+
+ t = mask;
+ t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
+ t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
+ t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
+ t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
+
+ __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
+
+ iounmap(base);
+}
+
+static void __init om5p_acv2_setup(void)
+{
+ u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
+ u8 mac[6];
+
+ /* power amplifier high power, 4.2V at RFFM4203/4503 instead of 3.3 */
+ ath79_gpio_function_enable(QCA955X_GPIO_FUNC_JTAG_DISABLE);
+ ath79_gpio_output_select(OM5PACV2_GPIO_PA_DCDC, QCA955X_GPIO_OUT_GPIO);
+ ath79_gpio_output_select(OM5PACV2_GPIO_PA_HIGH, QCA955X_GPIO_OUT_GPIO);
+ gpio_request_one(OM5PACV2_GPIO_PA_DCDC, GPIOF_OUT_INIT_HIGH,
+ "PA DC/DC");
+ gpio_request_one(OM5PACV2_GPIO_PA_HIGH, GPIOF_OUT_INIT_HIGH, "PA HIGH");
+
+ /* temperature sensor */
+ platform_device_register(&om5pacv2_i2c_device);
+ i2c_register_board_info(0, om5pacv2_i2c_devs,
+ ARRAY_SIZE(om5pacv2_i2c_devs));
+
+ ath79_register_m25p80(&om5pacv2_flash_data);
+ ath79_register_leds_gpio(-1, ARRAY_SIZE(om5pacv2_leds_gpio),
+ om5pacv2_leds_gpio);
+ ath79_register_gpio_keys_polled(-1, OM5PACV2_KEYS_POLL_INTERVAL,
+ ARRAY_SIZE(om5pacv2_gpio_keys),
+ om5pacv2_gpio_keys);
+
+ ath79_init_mac(mac, art, 0x02);
+ ath79_register_wmac(art + OM5PACV2_WMAC_CALDATA_OFFSET, mac);
+
+ om5p_acv2_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 2, 2, 0, 0);
+ ath79_register_mdio(0, 0x0);
+ ath79_register_mdio(1, 0x0);
+
+ mdiobus_register_board_info(om5pacv2_an_mdio0_info,
+ ARRAY_SIZE(om5pacv2_an_mdio0_info));
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, art, 0x00);
+ ath79_init_mac(ath79_eth1_data.mac_addr, art, 0x01);
+
+ /* GMAC0 is connected to the PHY4 */
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+ ath79_eth0_data.phy_mask = BIT(4);
+ ath79_eth0_pll_data.pll_1000 = 0x82000101;
+ ath79_eth0_pll_data.pll_100 = 0x80000101;
+ ath79_eth0_pll_data.pll_10 = 0x80001313;
+ ath79_register_eth(0);
+
+ /* GMAC1 is connected to MDIO1 in SGMII mode */
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+ ath79_eth1_data.mii_bus_dev = &ath79_mdio1_device.dev;
+ ath79_eth1_data.phy_mask = BIT(1);
+ ath79_eth1_pll_data.pll_1000 = 0x03000101;
+ ath79_eth1_pll_data.pll_100 = 0x80000101;
+ ath79_eth1_pll_data.pll_10 = 0x80001313;
+ ath79_eth1_data.speed = SPEED_1000;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
+ ath79_register_eth(1);
+
+ ath79_register_pci();
+}
+
+MIPS_MACHINE(ATH79_MACH_OM5P_ACv2, "OM5P-ACv2", "OpenMesh OM5P ACv2", om5p_acv2_setup);
diff --git a/target/linux/ar71xx/patches-3.18/816-MIPS-ath79-add-om5pacv-support.patch b/target/linux/ar71xx/patches-3.18/816-MIPS-ath79-add-om5pacv-support.patch
new file mode 100644
index 0000000..fbbf171
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.18/816-MIPS-ath79-add-om5pacv-support.patch
@@ -0,0 +1,39 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -808,6 +808,16 @@ config ATH79_MACH_OM5P_AC
+ select ATH79_DEV_M25P80
+ select ATH79_DEV_WMAC
+
++config ATH79_MACH_OM5P_ACv2
++ bool "OpenMesh OM5P-ACv2 board support"
++ select SOC_QCA955X
++ select ATH79_DEV_AP9X_PCI if PCI
++ select ATH79_DEV_ETH
++ select ATH79_DEV_GPIO_BUTTONS
++ select ATH79_DEV_LEDS_GPIO
++ select ATH79_DEV_M25P80
++ select ATH79_DEV_WMAC
++
+ config ATH79_MACH_ONION_OMEGA
+ bool "ONION OMEGA support"
+ select SOC_AR933X
+--- a/arch/mips/ath79/Makefile
++++ b/arch/mips/ath79/Makefile
+@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_NBG460N) += mach
+ obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o
+ obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o
+ obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o
++obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o
+ obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o
+ obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o
+ obj-$(CONFIG_ATH79_MACH_PB44) += mach-pb44.o
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -96,6 +96,7 @@ enum ath79_mach_type {
+ ATH79_MACH_OM2Pv2, /* OpenMesh OM2Pv2 */
+ ATH79_MACH_OM2P, /* OpenMesh OM2P */
+ ATH79_MACH_OM5P_AC, /* OpenMesh OM5P-AC */
++ ATH79_MACH_OM5P_ACv2, /* OpenMesh OM5P-ACv2 */
+ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */
+ ATH79_MACH_OM5P, /* OpenMesh OM5P */
+ ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */

View File

@ -0,0 +1,124 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 11 Oct 2016 02:54:27 +0200
Subject: ath9k: revert temperature compensation support patch (FS#111)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Backport of LEDE 3e4d0e3e77dcf9b2116e5ed53f30e2bf53b1c6b7
diff --git a/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch b/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch
deleted file mode 100644
index cff32ad..0000000
--- a/package/kernel/mac80211/patches/328-ath9k_hw-implement-temperature-compensation-support-.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-Date: Mon, 11 Jul 2016 11:35:55 +0200
-Subject: [PATCH] ath9k_hw: implement temperature compensation support for
- AR9003+
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
-@@ -33,6 +33,7 @@ struct coeff {
-
- enum ar9003_cal_types {
- IQ_MISMATCH_CAL = BIT(0),
-+ TEMP_COMP_CAL = BIT(1),
- };
-
- static void ar9003_hw_setup_calibration(struct ath_hw *ah,
-@@ -58,6 +59,12 @@ static void ar9003_hw_setup_calibration(
- /* Kick-off cal */
- REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL);
- break;
-+ case TEMP_COMP_CAL:
-+ ath_dbg(common, CALIBRATE,
-+ "starting Temperature Compensation Calibration\n");
-+ REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_LOCAL);
-+ REG_SET_BIT(ah, AR_CH0_THERM, AR_CH0_THERM_START);
-+ break;
- default:
- ath_err(common, "Invalid calibration type\n");
- break;
-@@ -86,7 +93,8 @@ static bool ar9003_hw_per_calibration(st
- /*
- * Accumulate cal measures for active chains
- */
-- cur_caldata->calCollect(ah);
-+ if (cur_caldata->calCollect)
-+ cur_caldata->calCollect(ah);
- ah->cal_samples++;
-
- if (ah->cal_samples >= cur_caldata->calNumSamples) {
-@@ -99,7 +107,8 @@ static bool ar9003_hw_per_calibration(st
- /*
- * Process accumulated data
- */
-- cur_caldata->calPostProc(ah, numChains);
-+ if (cur_caldata->calPostProc)
-+ cur_caldata->calPostProc(ah, numChains);
-
- /* Calibration has finished. */
- caldata->CalValid |= cur_caldata->calType;
-@@ -314,9 +323,16 @@ static const struct ath9k_percal_data iq
- ar9003_hw_iqcalibrate
- };
-
-+static const struct ath9k_percal_data temp_cal_single_sample = {
-+ TEMP_COMP_CAL,
-+ MIN_CAL_SAMPLES,
-+ PER_MAX_LOG_COUNT,
-+};
-+
- static void ar9003_hw_init_cal_settings(struct ath_hw *ah)
- {
- ah->iq_caldata.calData = &iq_cal_single_sample;
-+ ah->temp_caldata.calData = &temp_cal_single_sample;
-
- if (AR_SREV_9300_20_OR_LATER(ah)) {
- ah->enabled_cals |= TX_IQ_CAL;
-@@ -324,7 +340,7 @@ static void ar9003_hw_init_cal_settings(
- ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
- }
-
-- ah->supp_cals = IQ_MISMATCH_CAL;
-+ ah->supp_cals = IQ_MISMATCH_CAL | TEMP_COMP_CAL;
- }
-
- #define OFF_UPPER_LT 24
-@@ -1383,6 +1399,9 @@ static void ar9003_hw_init_cal_common(st
- INIT_CAL(&ah->iq_caldata);
- INSERT_CAL(ah, &ah->iq_caldata);
-
-+ INIT_CAL(&ah->temp_caldata);
-+ INSERT_CAL(ah, &ah->temp_caldata);
-+
- /* Initialize current pointer to first element in list */
- ah->cal_list_curr = ah->cal_list;
-
---- a/drivers/net/wireless/ath/ath9k/hw.h
-+++ b/drivers/net/wireless/ath/ath9k/hw.h
-@@ -830,6 +830,7 @@ struct ath_hw {
- /* Calibration */
- u32 supp_cals;
- struct ath9k_cal_list iq_caldata;
-+ struct ath9k_cal_list temp_caldata;
- struct ath9k_cal_list adcgain_caldata;
- struct ath9k_cal_list adcdc_caldata;
- struct ath9k_cal_list *cal_list;
diff --git a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
index 4615643..6edef09 100644
--- a/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
@@ -84,7 +84,7 @@
bool reset_power_on;
bool htc_reset_init;
-@@ -1068,6 +1076,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
+@@ -1067,6 +1075,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);

View File

@ -1,38 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:18 +0000
Subject: ar71xx: add user-space support for the OpenMesh OM5P-ACv2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49150
Forwarded: https://patchwork.ozlabs.org/patch/624200/
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index a4051f2..d4d8b4e 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -178,7 +178,8 @@ get_status_led() {
om5p-an)
status_led="om5p:blue:power"
;;
- om5p-ac)
+ om5p-ac | \
+ om5p-acv2)
status_led="om5pac:blue:power"
;;
onion-omega)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 10b8048..fbf76c8 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -619,6 +619,9 @@ ar71xx_board_detect() {
*"OM5P AC")
name="om5p-ac"
;;
+ *"OM5P ACv2")
+ name="om5p-acv2"
+ ;;
*"Onion Omega")
name="onion-omega"
;;

View File

@ -0,0 +1,885 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 13 Oct 2016 10:01:19 +0200
Subject: ath9k: remove intermediate queueing patch until it is fixed properly
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Backport of LEDE 04a69843198f2252992812e35ac05016db4a1a94
diff --git a/package/kernel/mac80211/patches/320-ath9k-Switch-to-using-mac80211-intermediate-software.patch b/package/kernel/mac80211/patches/320-ath9k-Switch-to-using-mac80211-intermediate-software.patch
deleted file mode 100644
index f8b8f86..0000000
--- a/package/kernel/mac80211/patches/320-ath9k-Switch-to-using-mac80211-intermediate-software.patch
+++ /dev/null
@@ -1,871 +0,0 @@
-From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
-Date: Wed, 6 Jul 2016 21:34:17 +0200
-Subject: [PATCH] ath9k: Switch to using mac80211 intermediate software queues.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This switches ath9k over to using the mac80211 intermediate software
-queueing mechanism for data packets. It removes the queueing inside the
-driver, except for the retry queue, and instead pulls from mac80211 when
-a packet is needed. The retry queue is used to store a packet that was
-pulled but can't be sent immediately.
-
-The old code path in ath_tx_start that would queue packets has been
-removed completely, as has the qlen limit tunables (since there's no
-longer a queue in the driver to limit).
-
-Based on Tim's original patch set, but reworked quite thoroughly.
-
-Cc: Tim Shepard <shep@alum.mit.edu>
-Cc: Felix Fietkau <nbd@nbd.name>
-Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
----
-
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -91,7 +91,6 @@ int ath_descdma_setup(struct ath_softc *
- #define ATH_RXBUF 512
- #define ATH_TXBUF 512
- #define ATH_TXBUF_RESERVE 5
--#define ATH_MAX_QDEPTH (ATH_TXBUF / 4 - ATH_TXBUF_RESERVE)
- #define ATH_TXMAXTRY 13
- #define ATH_MAX_SW_RETRIES 30
-
-@@ -145,7 +144,9 @@ int ath_descdma_setup(struct ath_softc *
- #define BAW_WITHIN(_start, _bawsz, _seqno) \
- ((((_seqno) - (_start)) & 4095) < (_bawsz))
-
--#define ATH_AN_2_TID(_an, _tidno) (&(_an)->tid[(_tidno)])
-+#define ATH_STA_2_TID(_sta, _tidno) ((struct ath_atx_tid *)(_sta)->txq[_tidno]->drv_priv)
-+#define ATH_VIF_2_TID(_vif) ((struct ath_atx_tid *)(_vif)->txq->drv_priv)
-+#define ATH_AN_2_TID(_an, _tidno) ((_an)->sta ? ATH_STA_2_TID((_an)->sta, _tidno) : ATH_VIF_2_TID((_an)->vif))
-
- #define IS_HT_RATE(rate) (rate & 0x80)
- #define IS_CCK_RATE(rate) ((rate >= 0x18) && (rate <= 0x1e))
-@@ -164,7 +165,6 @@ struct ath_txq {
- spinlock_t axq_lock;
- u32 axq_depth;
- u32 axq_ampdu_depth;
-- bool stopped;
- bool axq_tx_inprogress;
- struct list_head txq_fifo[ATH_TXFIFO_DEPTH];
- u8 txq_headidx;
-@@ -232,7 +232,6 @@ struct ath_buf {
-
- struct ath_atx_tid {
- struct list_head list;
-- struct sk_buff_head buf_q;
- struct sk_buff_head retry_q;
- struct ath_node *an;
- struct ath_txq *txq;
-@@ -247,13 +246,13 @@ struct ath_atx_tid {
- s8 bar_index;
- bool active;
- bool clear_ps_filter;
-+ bool has_queued;
- };
-
- struct ath_node {
- struct ath_softc *sc;
- struct ieee80211_sta *sta; /* station struct we're part of */
- struct ieee80211_vif *vif; /* interface with which we're associated */
-- struct ath_atx_tid tid[IEEE80211_NUM_TIDS];
-
- u16 maxampdu;
- u8 mpdudensity;
-@@ -276,7 +275,6 @@ struct ath_tx_control {
- struct ath_node *an;
- struct ieee80211_sta *sta;
- u8 paprd;
-- bool force_channel;
- };
-
-
-@@ -293,7 +291,6 @@ struct ath_tx {
- struct ath_descdma txdma;
- struct ath_txq *txq_map[IEEE80211_NUM_ACS];
- struct ath_txq *uapsdq;
-- u32 txq_max_pending[IEEE80211_NUM_ACS];
- u16 max_aggr_framelen[IEEE80211_NUM_ACS][4][32];
- };
-
-@@ -585,6 +582,7 @@ void ath9k_release_buffered_frames(struc
- u16 tids, int nframes,
- enum ieee80211_frame_release_type reason,
- bool more_data);
-+void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue);
-
- /********/
- /* VIFs */
---- a/drivers/net/wireless/ath/ath9k/channel.c
-+++ b/drivers/net/wireless/ath/ath9k/channel.c
-@@ -1007,7 +1007,6 @@ static void ath_scan_send_probe(struct a
- goto error;
-
- txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO];
-- txctl.force_channel = true;
- if (ath_tx_start(sc->hw, skb, &txctl))
- goto error;
-
-@@ -1130,7 +1129,6 @@ ath_chanctx_send_vif_ps_frame(struct ath
- memset(&txctl, 0, sizeof(txctl));
- txctl.txq = sc->tx.txq_map[IEEE80211_AC_VO];
- txctl.sta = sta;
-- txctl.force_channel = true;
- if (ath_tx_start(sc->hw, skb, &txctl)) {
- ieee80211_free_txskb(sc->hw, skb);
- return false;
---- a/drivers/net/wireless/ath/ath9k/debug.c
-+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -600,7 +600,6 @@ static int read_file_xmit(struct seq_fil
- PR("MPDUs XRetried: ", xretries);
- PR("Aggregates: ", a_aggr);
- PR("AMPDUs Queued HW:", a_queued_hw);
-- PR("AMPDUs Queued SW:", a_queued_sw);
- PR("AMPDUs Completed:", a_completed);
- PR("AMPDUs Retried: ", a_retries);
- PR("AMPDUs XRetried: ", a_xretries);
-@@ -629,8 +628,7 @@ static void print_queue(struct ath_softc
- seq_printf(file, "%s: %d ", "qnum", txq->axq_qnum);
- seq_printf(file, "%s: %2d ", "qdepth", txq->axq_depth);
- seq_printf(file, "%s: %2d ", "ampdu-depth", txq->axq_ampdu_depth);
-- seq_printf(file, "%s: %3d ", "pending", txq->pending_frames);
-- seq_printf(file, "%s: %d\n", "stopped", txq->stopped);
-+ seq_printf(file, "%s: %3d\n", "pending", txq->pending_frames);
-
- ath_txq_unlock(sc, txq);
- }
-@@ -1208,7 +1206,6 @@ static const char ath9k_gstrings_stats[]
- AMKSTR(d_tx_mpdu_xretries),
- AMKSTR(d_tx_aggregates),
- AMKSTR(d_tx_ampdus_queued_hw),
-- AMKSTR(d_tx_ampdus_queued_sw),
- AMKSTR(d_tx_ampdus_completed),
- AMKSTR(d_tx_ampdu_retries),
- AMKSTR(d_tx_ampdu_xretries),
-@@ -1288,7 +1285,6 @@ void ath9k_get_et_stats(struct ieee80211
- AWDATA(xretries);
- AWDATA(a_aggr);
- AWDATA(a_queued_hw);
-- AWDATA(a_queued_sw);
- AWDATA(a_completed);
- AWDATA(a_retries);
- AWDATA(a_xretries);
-@@ -1346,14 +1342,6 @@ int ath9k_init_debug(struct ath_hw *ah)
- read_file_xmit);
- debugfs_create_devm_seqfile(sc->dev, "queues", sc->debug.debugfs_phy,
- read_file_queues);
-- debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
-- &sc->tx.txq_max_pending[IEEE80211_AC_BK]);
-- debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
-- &sc->tx.txq_max_pending[IEEE80211_AC_BE]);
-- debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
-- &sc->tx.txq_max_pending[IEEE80211_AC_VI]);
-- debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
-- &sc->tx.txq_max_pending[IEEE80211_AC_VO]);
- debugfs_create_devm_seqfile(sc->dev, "misc", sc->debug.debugfs_phy,
- read_file_misc);
- debugfs_create_devm_seqfile(sc->dev, "reset", sc->debug.debugfs_phy,
---- a/drivers/net/wireless/ath/ath9k/debug.h
-+++ b/drivers/net/wireless/ath/ath9k/debug.h
-@@ -147,7 +147,6 @@ struct ath_interrupt_stats {
- * @completed: Total MPDUs (non-aggr) completed
- * @a_aggr: Total no. of aggregates queued
- * @a_queued_hw: Total AMPDUs queued to hardware
-- * @a_queued_sw: Total AMPDUs queued to software queues
- * @a_completed: Total AMPDUs completed
- * @a_retries: No. of AMPDUs retried (SW)
- * @a_xretries: No. of AMPDUs dropped due to xretries
-@@ -174,7 +173,6 @@ struct ath_tx_stats {
- u32 xretries;
- u32 a_aggr;
- u32 a_queued_hw;
-- u32 a_queued_sw;
- u32 a_completed;
- u32 a_retries;
- u32 a_xretries;
---- a/drivers/net/wireless/ath/ath9k/debug_sta.c
-+++ b/drivers/net/wireless/ath/ath9k/debug_sta.c
-@@ -52,8 +52,8 @@ static ssize_t read_file_node_aggr(struc
- "TID", "SEQ_START", "SEQ_NEXT", "BAW_SIZE",
- "BAW_HEAD", "BAW_TAIL", "BAR_IDX", "SCHED", "PAUSED");
-
-- for (tidno = 0, tid = &an->tid[tidno];
-- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {
-+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
-+ tid = ATH_STA_2_TID(an->sta, tidno);
- txq = tid->txq;
- ath_txq_lock(sc, txq);
- if (tid->active) {
---- a/drivers/net/wireless/ath/ath9k/init.c
-+++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -358,7 +358,6 @@ static int ath9k_init_queues(struct ath_
- for (i = 0; i < IEEE80211_NUM_ACS; i++) {
- sc->tx.txq_map[i] = ath_txq_setup(sc, ATH9K_TX_QUEUE_DATA, i);
- sc->tx.txq_map[i]->mac80211_qnum = i;
-- sc->tx.txq_max_pending[i] = ATH_MAX_QDEPTH;
- }
- return 0;
- }
-@@ -873,6 +872,7 @@ static void ath9k_set_hw_capab(struct at
- hw->max_rate_tries = 10;
- hw->sta_data_size = sizeof(struct ath_node);
- hw->vif_data_size = sizeof(struct ath_vif);
-+ hw->txq_data_size = sizeof(struct ath_atx_tid);
- hw->extra_tx_headroom = 4;
-
- hw->wiphy->available_antennas_rx = BIT(ah->caps.max_rxchains) - 1;
---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -2695,4 +2695,5 @@ struct ieee80211_ops ath9k_ops = {
- .sw_scan_start = ath9k_sw_scan_start,
- .sw_scan_complete = ath9k_sw_scan_complete,
- .get_txpower = ath9k_get_txpower,
-+ .wake_tx_queue = ath9k_wake_tx_queue,
- };
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -65,6 +65,8 @@ static struct ath_buf *ath_tx_setup_buff
- struct ath_txq *txq,
- struct ath_atx_tid *tid,
- struct sk_buff *skb);
-+static int ath_tx_prepare(struct ieee80211_hw *hw, struct sk_buff *skb,
-+ struct ath_tx_control *txctl);
-
- enum {
- MCS_HT20,
-@@ -118,6 +120,26 @@ static void ath_tx_queue_tid(struct ath_
- list_add_tail(&tid->list, list);
- }
-
-+void ath9k_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *queue)
-+{
-+ struct ath_softc *sc = hw->priv;
-+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
-+ struct ath_atx_tid *tid = (struct ath_atx_tid *) queue->drv_priv;
-+ struct ath_txq *txq = tid->txq;
-+
-+ ath_dbg(common, QUEUE, "Waking TX queue: %pM (%d)\n",
-+ queue->sta ? queue->sta->addr : queue->vif->addr,
-+ tid->tidno);
-+
-+ ath_txq_lock(sc, txq);
-+
-+ tid->has_queued = true;
-+ ath_tx_queue_tid(sc, txq, tid);
-+ ath_txq_schedule(sc, txq);
-+
-+ ath_txq_unlock(sc, txq);
-+}
-+
- static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
- {
- struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-@@ -160,7 +182,6 @@ static void ath_set_rates(struct ieee802
- static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
- struct sk_buff *skb)
- {
-- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct ath_frame_info *fi = get_frame_info(skb);
- int q = fi->txq;
-
-@@ -171,14 +192,6 @@ static void ath_txq_skb_done(struct ath_
- if (WARN_ON(--txq->pending_frames < 0))
- txq->pending_frames = 0;
-
-- if (txq->stopped &&
-- txq->pending_frames < sc->tx.txq_max_pending[q]) {
-- if (ath9k_is_chanctx_enabled())
-- ieee80211_wake_queue(sc->hw, info->hw_queue);
-- else
-- ieee80211_wake_queue(sc->hw, q);
-- txq->stopped = false;
-- }
- }
-
- static struct ath_atx_tid *
-@@ -188,9 +201,47 @@ ath_get_skb_tid(struct ath_softc *sc, st
- return ATH_AN_2_TID(an, tidno);
- }
-
-+static struct sk_buff *
-+ath_tid_pull(struct ath_atx_tid *tid)
-+{
-+ struct ath_softc *sc = tid->an->sc;
-+ struct ieee80211_hw *hw = sc->hw;
-+ struct ath_tx_control txctl = {
-+ .txq = tid->txq,
-+ .sta = tid->an->sta,
-+ };
-+ struct sk_buff *skb;
-+ struct ath_frame_info *fi;
-+ int q;
-+
-+ if (!tid->has_queued)
-+ return NULL;
-+
-+ skb = ieee80211_tx_dequeue(hw, container_of((void*)tid, struct ieee80211_txq, drv_priv));
-+ if (!skb) {
-+ tid->has_queued = false;
-+ return NULL;
-+ }
-+
-+ if (ath_tx_prepare(hw, skb, &txctl)) {
-+ ieee80211_free_txskb(hw, skb);
-+ return NULL;
-+ }
-+
-+ q = skb_get_queue_mapping(skb);
-+ if (tid->txq == sc->tx.txq_map[q]) {
-+ fi = get_frame_info(skb);
-+ fi->txq = q;
-+ ++tid->txq->pending_frames;
-+ }
-+
-+ return skb;
-+ }
-+
-+
- static bool ath_tid_has_buffered(struct ath_atx_tid *tid)
- {
-- return !skb_queue_empty(&tid->buf_q) || !skb_queue_empty(&tid->retry_q);
-+ return !skb_queue_empty(&tid->retry_q) || tid->has_queued;
- }
-
- static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid)
-@@ -199,46 +250,11 @@ static struct sk_buff *ath_tid_dequeue(s
-
- skb = __skb_dequeue(&tid->retry_q);
- if (!skb)
-- skb = __skb_dequeue(&tid->buf_q);
-+ skb = ath_tid_pull(tid);
-
- return skb;
- }
-
--/*
-- * ath_tx_tid_change_state:
-- * - clears a-mpdu flag of previous session
-- * - force sequence number allocation to fix next BlockAck Window
-- */
--static void
--ath_tx_tid_change_state(struct ath_softc *sc, struct ath_atx_tid *tid)
--{
-- struct ath_txq *txq = tid->txq;
-- struct ieee80211_tx_info *tx_info;
-- struct sk_buff *skb, *tskb;
-- struct ath_buf *bf;
-- struct ath_frame_info *fi;
--
-- skb_queue_walk_safe(&tid->buf_q, skb, tskb) {
-- fi = get_frame_info(skb);
-- bf = fi->bf;
--
-- tx_info = IEEE80211_SKB_CB(skb);
-- tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU;
--
-- if (bf)
-- continue;
--
-- bf = ath_tx_setup_buffer(sc, txq, tid, skb);
-- if (!bf) {
-- __skb_unlink(skb, &tid->buf_q);
-- ath_txq_skb_done(sc, txq, skb);
-- ieee80211_free_txskb(sc->hw, skb);
-- continue;
-- }
-- }
--
--}
--
- static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
- {
- struct ath_txq *txq = tid->txq;
-@@ -873,20 +889,16 @@ static int ath_compute_num_delims(struct
-
- static struct ath_buf *
- ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,
-- struct ath_atx_tid *tid, struct sk_buff_head **q)
-+ struct ath_atx_tid *tid)
- {
- struct ieee80211_tx_info *tx_info;
- struct ath_frame_info *fi;
-- struct sk_buff *skb;
-+ struct sk_buff *skb, *first_skb = NULL;
- struct ath_buf *bf;
- u16 seqno;
-
- while (1) {
-- *q = &tid->retry_q;
-- if (skb_queue_empty(*q))
-- *q = &tid->buf_q;
--
-- skb = skb_peek(*q);
-+ skb = ath_tid_dequeue(tid);
- if (!skb)
- break;
-
-@@ -898,7 +910,6 @@ ath_tx_get_tid_subframe(struct ath_softc
- bf->bf_state.stale = false;
-
- if (!bf) {
-- __skb_unlink(skb, *q);
- ath_txq_skb_done(sc, txq, skb);
- ieee80211_free_txskb(sc->hw, skb);
- continue;
-@@ -927,8 +938,19 @@ ath_tx_get_tid_subframe(struct ath_softc
- seqno = bf->bf_state.seqno;
-
- /* do not step over block-ack window */
-- if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno))
-+ if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) {
-+ __skb_queue_tail(&tid->retry_q, skb);
-+
-+ /* If there are other skbs in the retry q, they are
-+ * probably within the BAW, so loop immediately to get
-+ * one of them. Otherwise the queue can get stuck. */
-+ if (!skb_queue_is_first(&tid->retry_q, skb) && skb != first_skb) {
-+ if(!first_skb) /* infinite loop prevention */
-+ first_skb = skb;
-+ continue;
-+ }
- break;
-+ }
-
- if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) {
- struct ath_tx_status ts = {};
-@@ -936,7 +958,6 @@ ath_tx_get_tid_subframe(struct ath_softc
-
- INIT_LIST_HEAD(&bf_head);
- list_add(&bf->list, &bf_head);
-- __skb_unlink(skb, *q);
- ath_tx_update_baw(sc, tid, seqno);
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
- continue;
-@@ -948,11 +969,10 @@ ath_tx_get_tid_subframe(struct ath_softc
- return NULL;
- }
-
--static bool
-+static int
- ath_tx_form_aggr(struct ath_softc *sc, struct ath_txq *txq,
- struct ath_atx_tid *tid, struct list_head *bf_q,
-- struct ath_buf *bf_first, struct sk_buff_head *tid_q,
-- int *aggr_len)
-+ struct ath_buf *bf_first)
- {
- #define PADBYTES(_len) ((4 - ((_len) % 4)) % 4)
- struct ath_buf *bf = bf_first, *bf_prev = NULL;
-@@ -962,12 +982,13 @@ ath_tx_form_aggr(struct ath_softc *sc, s
- struct ieee80211_tx_info *tx_info;
- struct ath_frame_info *fi;
- struct sk_buff *skb;
-- bool closed = false;
-+
-
- bf = bf_first;
- aggr_limit = ath_lookup_rate(sc, bf, tid);
-
-- do {
-+ while (bf)
-+ {
- skb = bf->bf_mpdu;
- fi = get_frame_info(skb);
-
-@@ -976,12 +997,12 @@ ath_tx_form_aggr(struct ath_softc *sc, s
- if (nframes) {
- if (aggr_limit < al + bpad + al_delta ||
- ath_lookup_legacy(bf) || nframes >= h_baw)
-- break;
-+ goto stop;
-
- tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
- if ((tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) ||
- !(tx_info->flags & IEEE80211_TX_CTL_AMPDU))
-- break;
-+ goto stop;
- }
-
- /* add padding for previous frame to aggregation length */
-@@ -1003,20 +1024,18 @@ ath_tx_form_aggr(struct ath_softc *sc, s
- ath_tx_addto_baw(sc, tid, bf);
- bf->bf_state.ndelim = ndelim;
-
-- __skb_unlink(skb, tid_q);
- list_add_tail(&bf->list, bf_q);
- if (bf_prev)
- bf_prev->bf_next = bf;
-
- bf_prev = bf;
-
-- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q);
-- if (!bf) {
-- closed = true;
-- break;
-- }
-- } while (ath_tid_has_buffered(tid));
--
-+ bf = ath_tx_get_tid_subframe(sc, txq, tid);
-+ }
-+ goto finish;
-+stop:
-+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
-+finish:
- bf = bf_first;
- bf->bf_lastbf = bf_prev;
-
-@@ -1027,9 +1046,7 @@ ath_tx_form_aggr(struct ath_softc *sc, s
- TX_STAT_INC(txq->axq_qnum, a_aggr);
- }
-
-- *aggr_len = al;
--
-- return closed;
-+ return al;
- #undef PADBYTES
- }
-
-@@ -1406,18 +1423,15 @@ static void ath_tx_fill_desc(struct ath_
- static void
- ath_tx_form_burst(struct ath_softc *sc, struct ath_txq *txq,
- struct ath_atx_tid *tid, struct list_head *bf_q,
-- struct ath_buf *bf_first, struct sk_buff_head *tid_q)
-+ struct ath_buf *bf_first)
- {
- struct ath_buf *bf = bf_first, *bf_prev = NULL;
-- struct sk_buff *skb;
- int nframes = 0;
-
- do {
- struct ieee80211_tx_info *tx_info;
-- skb = bf->bf_mpdu;
-
- nframes++;
-- __skb_unlink(skb, tid_q);
- list_add_tail(&bf->list, bf_q);
- if (bf_prev)
- bf_prev->bf_next = bf;
-@@ -1426,13 +1440,15 @@ ath_tx_form_burst(struct ath_softc *sc,
- if (nframes >= 2)
- break;
-
-- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q);
-+ bf = ath_tx_get_tid_subframe(sc, txq, tid);
- if (!bf)
- break;
-
- tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
-- if (tx_info->flags & IEEE80211_TX_CTL_AMPDU)
-+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
-+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
- break;
-+ }
-
- ath_set_rates(tid->an->vif, tid->an->sta, bf, false);
- } while (1);
-@@ -1443,34 +1459,33 @@ static bool ath_tx_sched_aggr(struct ath
- {
- struct ath_buf *bf;
- struct ieee80211_tx_info *tx_info;
-- struct sk_buff_head *tid_q;
- struct list_head bf_q;
- int aggr_len = 0;
-- bool aggr, last = true;
-+ bool aggr;
-
- if (!ath_tid_has_buffered(tid))
- return false;
-
- INIT_LIST_HEAD(&bf_q);
-
-- bf = ath_tx_get_tid_subframe(sc, txq, tid, &tid_q);
-+ bf = ath_tx_get_tid_subframe(sc, txq, tid);
- if (!bf)
- return false;
-
- tx_info = IEEE80211_SKB_CB(bf->bf_mpdu);
- aggr = !!(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
- if ((aggr && txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) ||
-- (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH)) {
-+ (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH)) {
-+ __skb_queue_tail(&tid->retry_q, bf->bf_mpdu);
- *stop = true;
- return false;
- }
-
- ath_set_rates(tid->an->vif, tid->an->sta, bf, false);
- if (aggr)
-- last = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf,
-- tid_q, &aggr_len);
-+ aggr_len = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf);
- else
-- ath_tx_form_burst(sc, txq, tid, &bf_q, bf, tid_q);
-+ ath_tx_form_burst(sc, txq, tid, &bf_q, bf);
-
- if (list_empty(&bf_q))
- return false;
-@@ -1513,9 +1528,6 @@ int ath_tx_aggr_start(struct ath_softc *
- an->mpdudensity = density;
- }
-
-- /* force sequence number allocation for pending frames */
-- ath_tx_tid_change_state(sc, txtid);
--
- txtid->active = true;
- *ssn = txtid->seq_start = txtid->seq_next;
- txtid->bar_index = -1;
-@@ -1540,7 +1552,6 @@ void ath_tx_aggr_stop(struct ath_softc *
- ath_txq_lock(sc, txq);
- txtid->active = false;
- ath_tx_flush_tid(sc, txtid);
-- ath_tx_tid_change_state(sc, txtid);
- ath_txq_unlock_complete(sc, txq);
- }
-
-@@ -1550,14 +1561,12 @@ void ath_tx_aggr_sleep(struct ieee80211_
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
- struct ath_atx_tid *tid;
- struct ath_txq *txq;
-- bool buffered;
- int tidno;
-
- ath_dbg(common, XMIT, "%s called\n", __func__);
-
-- for (tidno = 0, tid = &an->tid[tidno];
-- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {
--
-+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
-+ tid = ATH_AN_2_TID(an, tidno);
- txq = tid->txq;
-
- ath_txq_lock(sc, txq);
-@@ -1567,13 +1576,12 @@ void ath_tx_aggr_sleep(struct ieee80211_
- continue;
- }
-
-- buffered = ath_tid_has_buffered(tid);
-+ if (!skb_queue_empty(&tid->retry_q))
-+ ieee80211_sta_set_buffered(sta, tid->tidno, true);
-
- list_del_init(&tid->list);
-
- ath_txq_unlock(sc, txq);
--
-- ieee80211_sta_set_buffered(sta, tidno, buffered);
- }
- }
-
-@@ -1586,19 +1594,16 @@ void ath_tx_aggr_wakeup(struct ath_softc
-
- ath_dbg(common, XMIT, "%s called\n", __func__);
-
-- for (tidno = 0, tid = &an->tid[tidno];
-- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {
--
-+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
-+ tid = ATH_AN_2_TID(an, tidno);
- txq = tid->txq;
-
- ath_txq_lock(sc, txq);
- tid->clear_ps_filter = true;
--
- if (ath_tid_has_buffered(tid)) {
- ath_tx_queue_tid(sc, txq, tid);
- ath_txq_schedule(sc, txq);
- }
--
- ath_txq_unlock_complete(sc, txq);
- }
- }
-@@ -1621,11 +1626,6 @@ void ath_tx_aggr_resume(struct ath_softc
-
- tid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor;
-
-- if (ath_tid_has_buffered(tid)) {
-- ath_tx_queue_tid(sc, txq, tid);
-- ath_txq_schedule(sc, txq);
-- }
--
- ath_txq_unlock_complete(sc, txq);
- }
-
-@@ -1641,7 +1641,6 @@ void ath9k_release_buffered_frames(struc
- struct ieee80211_tx_info *info;
- struct list_head bf_q;
- struct ath_buf *bf_tail = NULL, *bf;
-- struct sk_buff_head *tid_q;
- int sent = 0;
- int i;
-
-@@ -1656,11 +1655,10 @@ void ath9k_release_buffered_frames(struc
-
- ath_txq_lock(sc, tid->txq);
- while (nframes > 0) {
-- bf = ath_tx_get_tid_subframe(sc, sc->tx.uapsdq, tid, &tid_q);
-+ bf = ath_tx_get_tid_subframe(sc, sc->tx.uapsdq, tid);
- if (!bf)
- break;
-
-- __skb_unlink(bf->bf_mpdu, tid_q);
- list_add_tail(&bf->list, &bf_q);
- ath_set_rates(tid->an->vif, tid->an->sta, bf, true);
- if (bf_isampdu(bf)) {
-@@ -1675,7 +1673,7 @@ void ath9k_release_buffered_frames(struc
- sent++;
- TX_STAT_INC(txq->axq_qnum, a_queued_hw);
-
-- if (an->sta && !ath_tid_has_buffered(tid))
-+ if (an->sta && skb_queue_empty(&tid->retry_q))
- ieee80211_sta_set_buffered(an->sta, i, false);
- }
- ath_txq_unlock_complete(sc, tid->txq);
-@@ -1902,13 +1900,7 @@ bool ath_drain_all_txq(struct ath_softc
- if (!ATH_TXQ_SETUP(sc, i))
- continue;
-
-- /*
-- * The caller will resume queues with ieee80211_wake_queues.
-- * Mark the queue as not stopped to prevent ath_tx_complete
-- * from waking the queue too early.
-- */
- txq = &sc->tx.txq[i];
-- txq->stopped = false;
- ath_draintxq(sc, txq);
- }
-
-@@ -2308,15 +2300,12 @@ int ath_tx_start(struct ieee80211_hw *hw
- struct ath_txq *txq = txctl->txq;
- struct ath_atx_tid *tid = NULL;
- struct ath_buf *bf;
-- bool queue, ps_resp;
-+ bool ps_resp;
- int q, ret;
-
- if (vif)
- avp = (void *)vif->drv_priv;
-
-- if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
-- txctl->force_channel = true;
--
- ps_resp = !!(info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE);
-
- ret = ath_tx_prepare(hw, skb, txctl);
-@@ -2331,63 +2320,13 @@ int ath_tx_start(struct ieee80211_hw *hw
-
- q = skb_get_queue_mapping(skb);
-
-+ if (ps_resp)
-+ txq = sc->tx.uapsdq;
-+
- ath_txq_lock(sc, txq);
- if (txq == sc->tx.txq_map[q]) {
- fi->txq = q;
-- if (++txq->pending_frames > sc->tx.txq_max_pending[q] &&
-- !txq->stopped) {
-- if (ath9k_is_chanctx_enabled())
-- ieee80211_stop_queue(sc->hw, info->hw_queue);
-- else
-- ieee80211_stop_queue(sc->hw, q);
-- txq->stopped = true;
-- }
-- }
--
-- queue = ieee80211_is_data_present(hdr->frame_control);
--
-- /* If chanctx, queue all null frames while NOA could be there */
-- if (ath9k_is_chanctx_enabled() &&
-- ieee80211_is_nullfunc(hdr->frame_control) &&
-- !txctl->force_channel)
-- queue = true;
--
-- /* Force queueing of all frames that belong to a virtual interface on
-- * a different channel context, to ensure that they are sent on the
-- * correct channel.
-- */
-- if (((avp && avp->chanctx != sc->cur_chan) ||
-- sc->cur_chan->stopped) && !txctl->force_channel) {
-- if (!txctl->an)
-- txctl->an = &avp->mcast_node;
-- queue = true;
-- ps_resp = false;
-- }
--
-- if (txctl->an && queue)
-- tid = ath_get_skb_tid(sc, txctl->an, skb);
--
-- if (ps_resp) {
-- ath_txq_unlock(sc, txq);
-- txq = sc->tx.uapsdq;
-- ath_txq_lock(sc, txq);
-- } else if (txctl->an && queue) {
-- WARN_ON(tid->txq != txctl->txq);
--
-- if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
-- tid->clear_ps_filter = true;
--
-- /*
-- * Add this frame to software queue for scheduling later
-- * for aggregation.
-- */
-- TX_STAT_INC(txq->axq_qnum, a_queued_sw);
-- __skb_queue_tail(&tid->buf_q, skb);
-- if (!txctl->an->sleeping)
-- ath_tx_queue_tid(sc, txq, tid);
--
-- ath_txq_schedule(sc, txq);
-- goto out;
-+ ++txq->pending_frames;
- }
-
- bf = ath_tx_setup_buffer(sc, txq, tid, skb);
-@@ -2871,9 +2810,8 @@ void ath_tx_node_init(struct ath_softc *
- struct ath_atx_tid *tid;
- int tidno, acno;
-
-- for (tidno = 0, tid = &an->tid[tidno];
-- tidno < IEEE80211_NUM_TIDS;
-- tidno++, tid++) {
-+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
-+ tid = ATH_AN_2_TID(an, tidno);
- tid->an = an;
- tid->tidno = tidno;
- tid->seq_start = tid->seq_next = 0;
-@@ -2881,11 +2819,14 @@ void ath_tx_node_init(struct ath_softc *
- tid->baw_head = tid->baw_tail = 0;
- tid->active = false;
- tid->clear_ps_filter = true;
-- __skb_queue_head_init(&tid->buf_q);
-+ tid->has_queued = false;
- __skb_queue_head_init(&tid->retry_q);
- INIT_LIST_HEAD(&tid->list);
- acno = TID_TO_WME_AC(tidno);
- tid->txq = sc->tx.txq_map[acno];
-+
-+ if (!an->sta)
-+ break; /* just one multicast ath_atx_tid */
- }
- }
-
-@@ -2895,9 +2836,8 @@ void ath_tx_node_cleanup(struct ath_soft
- struct ath_txq *txq;
- int tidno;
-
-- for (tidno = 0, tid = &an->tid[tidno];
-- tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {
--
-+ for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
-+ tid = ATH_AN_2_TID(an, tidno);
- txq = tid->txq;
-
- ath_txq_lock(sc, txq);
-@@ -2909,6 +2849,9 @@ void ath_tx_node_cleanup(struct ath_soft
- tid->active = false;
-
- ath_txq_unlock(sc, txq);
-+
-+ if (!an->sta)
-+ break; /* just one multicast ath_atx_tid */
- }
- }
-

View File

@ -1,46 +0,0 @@
From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Date: Sat, 9 Apr 2016 10:26:22 +0000
Subject: ar71xx: enable sysupgrade for the OpenMesh OM5P-ACv2
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Backport of r49151
Forwarded: https://patchwork.ozlabs.org/patch/624201/
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
index 1cfead9..209cdaa 100644
--- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh
@@ -74,6 +74,7 @@ platform_check_image_openmesh()
;;
OM5PAC)
[ "$board" = "om5p-ac" ] && break
+ [ "$board" = "om5p-acv2" ] && break
echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform"
return 1
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 67c0661..4a4c476 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -308,7 +308,8 @@ platform_check_image() {
om2p-lc | \
om5p | \
om5p-an | \
- om5p-ac)
+ om5p-ac | \
+ om5p-acv2)
platform_check_image_openmesh "$magic_long" "$1" && return 0
return 1
;;
@@ -542,7 +543,8 @@ platform_do_upgrade() {
om2p-lc | \
om5p | \
om5p-an | \
- om5p-ac)
+ om5p-ac | \
+ om5p-acv2)
platform_do_upgrade_openmesh "$ARGV"
;;
unifi-outdoor-plus | \

Some files were not shown because too many files have changed in this diff Show More