Compare commits

...

443 Commits

Author SHA1 Message Date
Alexander Couzens
2da512ecf4 LEDE v17.01.2: adjust config defaults
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-10 13:08:02 +02:00
Felix Fietkau
65eec8bd5f build: ensure that flock is available for make download
It ensures that make download can parallelize downloads, even when some
packages download the same files (e.g. gcc/initial, gcc/final)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-08 23:02:37 +02:00
Alexander Couzens
4053c4f0fe include/toplevel: set env GIT_ASKPASS=/bin/true
When git-https request a service (e.g. github) which ask for credentials
git will pass this request to the user resulting download.pl to wait for
user input. Set GIT_ASKPASS to stop asking.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-06-08 23:02:37 +02:00
Jo-Philipp Wich
e5db08edf7 base-files: network.sh: fix a number of IPv6 logic flaws
* Change network_get_subnet6() to sensibly guess a suitable prefix

  Attempt to return the first non-linklocal, non-ula range, then attempt
  to return the first non-linklocal range and finally fall back to the
  previous behaviour of simply returning the first found item.

* Fix network_get_ipaddrs_all()

  Instead of replicating the flawed logic appending a fixed ":1" suffix
  to IPv6 addresses, rely on network_get_ipaddrs() and network_get_ipaddrs6()
  to build a single list of all interface addresses.

* Fix network_get_subnets6()

  Instead of replicating the flawed logic appending a fixed ":1" suffix
  to IPv6 addresses, rely on the ipv6-prefix-assignment.local-address
  field to figure out the proper network address.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-08 23:02:16 +02:00
Jo-Philipp Wich
8a42d4d851 mwlwifi: update to version 10.3.4.0 / 2017-06-06
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-08 19:57:31 +02:00
Daniel Golle
f709597e81 automake: import upstream fix for perl 5.26
Build broke as distributions now include Perl 5.26 and automake
triggered an "Unescaped left brace in regex" error.
Import upstream commit 13f00eb449 to fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-06-08 12:18:56 +02:00
Jo-Philipp Wich
df4363b607 base-files: network.sh: properly report local IPv6 addresses
Rework the network_get_ipaddr6() and network_get_ipaddrs6() functions to
fetch the effective local IPv6 address of delegated prefix from the
"local-address" field instead of naively hardcoding ":1" as static suffix.

Fixes FS#829.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-08 12:06:50 +02:00
Jo-Philipp Wich
4fbd072624 kernel: update kernel 4.4 to 4.4.71
Fixes the following security vulnerabilities:

CVE-2017-8890
The inet_csk_clone_lock function in net/ipv4/inet_connection_sock.c in the
Linux kernel through 4.10.15 allows attackers to cause a denial of service
(double free) or possibly have unspecified other impact by leveraging use
of the accept system call.

CVE-2017-9074
The IPv6 fragmentation implementation in the Linux kernel through 4.11.1
does not consider that the nexthdr field may be associated with an invalid
option, which allows local users to cause a denial of service (out-of-bounds
read and BUG) or possibly have unspecified other impact via crafted socket
and send system calls.

CVE-2017-9075
The sctp_v6_create_accept_sk function in net/sctp/ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9076
The dccp_v6_request_recv_sock function in net/dccp/ipv6.c in the Linux
kernel through 4.11.1 mishandles inheritance, which allows local users to
cause a denial of service or possibly have unspecified other impact via
crafted system calls, a related issue to CVE-2017-8890.

CVE-2017-9077
The tcp_v6_syn_recv_sock function in net/ipv6/tcp_ipv6.c in the Linux kernel
through 4.11.1 mishandles inheritance, which allows local users to cause a
denial of service or possibly have unspecified other impact via crafted
system calls, a related issue to CVE-2017-8890.

CVE-2017-9242
The __ip6_append_data function in net/ipv6/ip6_output.c in the Linux kernel
through 4.11.3 is too late in checking whether an overwrite of an skb data
structure may occur, which allows local users to cause a denial of service
(system crash) via crafted system calls.

Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8890
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9074
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9075
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9076
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9077
Ref: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9242
Ref: https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.71

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-07 21:24:41 +02:00
Kristian Evensen
443d705e38 Add missing APU1 reference to x86 board.d
x86 board.d only contains a case for the APU2, not the APU1. This
causes, for example, network configuration not to be created correctly.
Even though the APU1 seems to reaching EOL, there a still a lot of them
out there.

The APU1 and APU2 is configured in the same way and this patch should
also be considered for stable, as the error also exists there.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-06-06 23:02:20 +02:00
Mathias Kresin
524ed5088e base-files: always set proto passed to _ucidef_set_interface()
Overwrite an already set proto if a new one is passed to
_ucidef_set_interface() similar to what is done for the interface.

It is required when using ""ucidef_set_interface_wan 'ptm0' 'pppoe'"
after some initial wan interface configuration is already done by
ucidef_add_switch.

The "json_is_a protocol string" guard is meant to not reset an earlier
set interface proto in case something like
"ucidef_set_interface_lan 'eth0'" is used afterwards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 20:41:26 +02:00
Mathias Kresin
bf6216e5e3 lantiq: fix broadcasts and vlans in two iface mode
The two phy operation mode where one phy is assigned to an interface
without lantiq,* device tree property and the other phy is assigned to
an interface with the lantiq,wan device property was broken with the
multicast package leaks between vlans fixes.

Move the multicast packages relevant portmap settings to the condition
which handles multicast packages for better readability.

Replace the priv->port_map based port_map only for the interface which
has the lantiq,switch device tree property set, to allow tagged
multicast packages in two phy mode where the lantiq,switch device tree
property isn't used.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:51:42 +02:00
Felix Fietkau
36ccbbdab1 lantiq: select kmod-mt7603 instead of kmod-mt76 for WBMR-300HPD
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-06-03 16:51:41 +02:00
Mathias Kresin
4186d737f6 lantiq: use the P2812HNUF* wan port as wan
The port is labeled as wan and was only used as lan port because of the
"tx ring full" issues fixed with 8f02f7c.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:51:41 +02:00
Mathias Kresin
254bf7961e lantiq: xrx200: use vlan for ethernet wan port
Using the lantiq,wan device tree property for one interface node and
the lantiq,switch device tree property for another interface node at
the same time was never intended/isn't supported at the moment.

The property is meant to be used in two phy operation mode where one
phy is assigned to an interface without lantiq,* device tree property
and the other phy is assigned to an interface with the lantiq,wan
device property to have two netdevs.

If both properties are used at the same time, the lantiq,wan interface
is shown as independent netdev but not able to operate independent. The
port needs to be managed via swconfig. These dependency is not obvious
and fooled already a lot of users.

Add a default WAN vlan for xrx200 devices having an ethernet WAN port
and remove the lantiq,wan device tree property. Leave it up to the user
to set the ethernet WAN port as default WAN interface or to use this
port as additional LAN port.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-06-03 16:09:33 +02:00
Jo-Philipp Wich
b78bcdf619 x86: disable X2APIC support for legacy subtargets
Explicitely disable X2APIC support on legacy targets since the targeted
processor types do not support it anyway there.

Fixes FS#285.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-02 01:52:14 +02:00
Jo-Philipp Wich
e78a641f52 umdns: remove superfluous include in init script
The umdns init script includes function/network.sh globally, outside of any
service procedure. This causes init script activation to fail in buildroot
and IB context if umdns is set to builtin.

Additionally, the network.sh helper is not actually used.

Drop the entire include in order to repair init script activation in build
host context. Fixes FS#658.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-02 01:29:51 +02:00
Jo-Philipp Wich
cdfc6788a9 dnsmasq: bump to 2.77
This is a cumulative backport of multiple dnsmasq update commits in master.

Drops three LEDE specific patches which are included upstream and another
patch which became obsolete. Remaining LEDE specific patches are rebased.

Fixes FS#766 - Intermittent SIGSEGV crash of dnsmasq-full.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-06-02 00:25:08 +02:00
Alberto Bursi
9e20cc56b9 dnsmasq: make tftp root if not existing
If there's a TFTP root directory configured, create it with mkdir -p
(which does not throw an error if the folder exists already)
before starting dnsmasq. This is useful for TFTP roots in /tmp, for example.

Originally submitted by nfw user aka Nathaniel Wesley Filardo

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2017-06-02 00:09:14 +02:00
Karl Vogel
ebf46d2c5b dnsmasq: use logical interface name for dhcp relay config
The relay section should use the logical interface name and
not the linux network device name directly. This to be
consistent with other sections of the dnsmasq config where
'interface' means the logical interface.

Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
2017-06-02 00:07:02 +02:00
Philip Prindeville
78edfff530 dnsmasq: don't point --resolv-file to default location unconditionally
If noresolv is set, we should not generate a --resolv-file parameter.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [minor cleanup]
2017-06-02 00:06:24 +02:00
Piotr Dymacz
b1257d8d73 ar71xx: fix Wallys DR344 GPIO-connected LEDs and button
This fixes wrong GPIO numbers for LEDs and button in Wallys DR344 board
and sets color of all LEDs to green as the mass production boards have
only green one.

Actually, DR344 has 6 GPIO-connected LEDs and one button:

- GPIO11: status
- GPIO12: sig1
- GPIO13: sig2
- GPIO14: sig3
- GPIO15: sig4
- GPIO16: reset button
- GPIO17: lan

WAN LED is connected directly with AR8035 PHY.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:57:09 +02:00
Piotr Dymacz
21a7e40941 ar71xx: set GE interface as wan by default in Wallys DR344
This aligns default network interfaces configuration with vendor
firmware: GE (eth0) -> wan, FE (eth1) -> lan.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:57:00 +02:00
Piotr Dymacz
a412350684 ar71xx: fix GE interface support in Wallys DR344
GMAC0 interface of AR9344 SOC in Wallys DR344 board is connected with
AR8035, not with AR8327. Without this fix, GE interface doesn't work at
all or shows high packet loss ratio.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-30 14:56:53 +02:00
Etienne Haarsma
dfecce60e6 toolchain/gdb: update to version 7.12.1
Update gdb to version 7.12.1.

GDB 7.12.1 brings the following fixes and enhancements over GDB 7.12:

   * PR tdep/20682 (aarch64 regression: gdb.cp/nextoverthrow.exp)
   * PR server/20733 (Failed to build aarch64_be-linux-gnu GDBserver)
   * PR tdep/20953 (GDB crashes after "set architecture rl78")
   * PR tdep/20954 (GDB crashes if "set architecture rx")
   * PR tdep/20955 (GDB internal error in cris-tdep.c)
   * PR build/20712 (gdb 7.12+ doesn't build as C++ on Solaris)
   * PR breakpoint/20653 (string_to_explicit_location has some weird code)
   * PR build/20753 (MinGW compilation errors due to strcasecmp)
   * PR gdb/20977 (GDB exception handling is broken on i686-w64-mingw32)
   * PR python/21048 (backtrace is broken on i686)
   * PR sim/20808 (mips sim build fails due to undefined SD/CPU variables)
   * PR sim/20809 (mips sim build fails for r3900 cpus)
   * PR gdb/20939 (GDB aborts

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
2017-05-30 01:32:21 +02:00
Julian Labus
fe5e343933 usbmode: update usb-modeswitch-data to 20170205
add support for new hardware

Signed-off-by: Julian Labus <julian@labus-online.de>
2017-05-29 09:26:27 +02:00
Julian Labus
4baf0ea229 usbmode: update to latest version
453da8e convert-modeswitch.pl: fix message indices

Signed-off-by: Julian Labus <julian@labus-online.de>
2017-05-29 09:26:27 +02:00
Florian Fainelli
7c1e58863c usbmode: Update to latest HEAD
Brings the following changes:

22f041e18df0 Extend StandardEject sequence to include LUN 1
61fdf7e9b1cc cmake: Search for libjson-c
2769852e76b5 cmake: Find libubox/blobmsg_json.h
8a47c4b6649f add TargetClass support

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-05-29 09:26:27 +02:00
Jo-Philipp Wich
22478bf473 samba: bump PKG_RELEASE
The previous CVE bugfix commit did not adjust PKG_RELEASE, therefor the
fixed samba package does not appear as opkg update.

Bump the PKG_RELEASE to signify upgrades to downstream users.

Ref: https://forum.lede-project.org/t/sambacry-are-lede-devices-affected/3972/4

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-27 17:40:21 +02:00
Jo-Philipp Wich
757353c3a0 firewall: resync with master
Update to latest Git HEAD in order to import a number of fixes and other
improvements:

a4d98ae options: remove stray continue statement
3d2c18a options: improve handling of negations when parsing space separated values
0e5dd73 iptables: support -i, -o, -s and -d in option extra
4cb06c7 ubus: increase ubus network interface dump timeout
e5dfc82 iptables: add exception handling
f625954 firewall3: add check_snat() function
7d3d9dc firewall3: display the section type for UBUS rules
53ef9f1 firewall3: add UBUS support for include scripts
5cd4af4 firewall3: add UBUS support for ipset sections
02d6832 firewall3: add UBUS support for forwarding sections
0a7d36d firewall3: add UBUS support for redirect sections
d44f418 firewall3: add fw3_attr_parse_name_type() function
e264c8e firewall3: replace warn_rule() by warn_section()
6039c7f firewall3: check the return value of fw3_parse_options()
c328d1f build: use -Wno-format-truncation instead of -Wno-error=format-truncation
e06e537 utils: replace sprintf use with snprintf to avoid overflows
533f834 build: disable the format-truncation warning error to fix gcc 7 build errors
e751cde zones: drop outgoing invalid traffic in masqueraded zones
d596f72 rules: fix UCI context in error reporting
1d0564c ubus: fix interface name and proto lookup
82ccd9e firewall3: fix handling of UTC times
1949e0c iptables: support xtables API > 11

Fixes FS#548, FS#640, FS#806, FS#811.

Ref: https://forum.lede-project.org/t/nat-leakage-on-tl-wr1043nd-v4/1712

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-27 16:18:31 +02:00
Matthias Schiffer
4bd3b8f8b0 mac80211, hostapd: always explicitly set beacon interval
One of the latest mac80211 updates added sanity checks, requiring the
beacon intervals of all VIFs of the same radio to match. This often broke
AP+11s setups, as these modes use different default intervals, at least in
some configurations (observed on ath9k).

Instead of relying on driver or hostapd defaults, change the scripts to
always explicitly set the beacon interval, defaulting to 100. This also
applies the beacon interval to 11s interfaces, which had been forgotten
before. VIF-specific beacon_int setting is removed from hostapd.sh.

Fixes FS#619.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-05-27 14:24:13 +02:00
Nick Lowe
e194e1b3c8 hostapd: add legacy_rates option to disable 802.11b data rates.
Setting legacy_rates to 0 disables 802.11b data rates.
Setting legacy_rates to 1 enables 802.11b data rates. (Default)

The basic_rate option and supported_rates option are filtered based on this.

The rationale for the change, stronger now than in 2014, can be found in:

https://mentor.ieee.org/802.11/dcn/14/11-14-0099-00-000m-renewing-2-4ghz-band.pptx

The balance of equities between compatibility with b clients and the
detriment to the 2.4 GHz ecosystem as a whole strongly favors disabling b
rates by default.

Signed-off-by: Nick Lowe <nick.lowe@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup, defaults change]
2017-05-27 14:24:13 +02:00
Thomas Reifferscheid
20198f7330 ipq806x: fix Netgear X4 R7500 ath10k firmware selection
Netgear X4 R7500 comes with a QCA988X. Select a firmware that matches
the ath10k chipset

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
2017-05-27 14:23:14 +02:00
Mathias Kresin
784ceba269 treewide: select ath10k firmware explicit
Do not rely on the default firmware selected by ath10k.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-05-27 14:23:07 +02:00
Mathias Kresin
0e31ce730f ath10k-firmware: do not select the qca988x by default
Do not select the qca988x by default as soon as kmod-ath10k is
selected. We do support more ath10k chips than the qca988x in the
meantime, so this dependency doesn't make sense any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-05-27 14:22:16 +02:00
Yousong Zhou
a44d7bfb63 build: fix possible issue with kmod package having multiple AutoLoad's
This commit contains the following changes

 - Use local shell var where appliable
 - The $(sort $$$$$$$$mods) call will have no expected effect
 - Avoid EEXIST when creating symlinks in /etc/modules-boot.d/
 - Avoid duplicate arguments for insert_modules() in postinst-pkg

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-05-27 15:04:32 +08:00
Hauke Mehrtens
e02b12c4cf kernel: update kernel 4.4 to 4.4.70
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-05-27 00:43:02 +02:00
Yousong Zhou
2f92622ce8 kernel: fix autoloading arch-specific modules
Fixes FS#745

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-05-25 23:21:36 +08:00
Yousong Zhou
9c2bd3d631 backlight-pwm: fix module description
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-05-25 23:21:35 +08:00
Stijn Segers
215c1d05b8 kernel: update kernel 4.4 to 4.4.69
Bump the 17.01 tree kernel to 4.4.69. Trunk 4.4 and 17.01 4.4 have diverged, talked this
through with jow, he was okay with a clean diff against 17.01 and not a backported trunk
patch.

The following patches were applied upstream:

* 062-[1-6]-MIPS-* series
* 042-0004-mtd-bcm47xxpart-fix-parsing-first-block

Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup, as
it was incorrectly included upstream thus dropped from LEDE, but subsequently
reverted upstream. Thanks to Kevin Darbyshire-Bryant for pointing me to it.

  Compile-tested on: ar71xx, ramips/mt7621, x86/64.

  Run-tested on: ar71xx, ramips/mt7621, x86/64.

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2017-05-24 22:47:01 +02:00
Hauke Mehrtens
d1a0fc3ec8 binutils: fix build with host gcc < 4.9
binutils 2.27 checks if the target compiler supports -Wstack-
usage=262144, and also uses this setting for the host compiler. If the
host compiler is gcc < 4.9 binutils build will fail. This backports 2
commits which are fixing this problem for binutils 2.28.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-05-24 18:05:18 +02:00
Hauke Mehrtens
d179aa8769 util-linux: fix build with uclibc
Fix build of scriptreplay with uClibc.
Some parts of the libm detection were backported to 2.29.2, but some
parts were missing, which are added here. This patch is needed when
libm is a separate library, this is not needed for LEDE master, because
libm is there integrated in the libc for uClibc and musl.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
2017-05-24 18:04:51 +02:00
Kevin Darbyshire-Bryant
dd19a41520 dropbear: bump to 2017.75
- Security: Fix double-free in server TCP listener cleanup A double-free
in the server could be triggered by an authenticated user if dropbear is
running with -a (Allow connections to forwarded ports from any host)
This could potentially allow arbitrary code execution as root by an
authenticated user.  Affects versions 2013.56 to 2016.74. Thanks to Mark
Shepard for reporting the crash.
CVE-2017-9078 https://secure.ucc.asn.au/hg/dropbear/rev/c8114a48837c

- Security: Fix information disclosure with ~/.ssh/authorized_keys
symlink.  Dropbear parsed authorized_keys as root, even if it were a
symlink.  The fix is to switch to user permissions when opening
authorized_keys

A user could symlink their ~/.ssh/authorized_keys to a root-owned file
they couldn't normally read. If they managed to get that file to contain
valid authorized_keys with command= options it might be possible to read
other contents of that file.
This information disclosure is to an already authenticated user.
Thanks to Jann Horn of Google Project Zero for reporting this.
CVE-2017-9079 https://secure.ucc.asn.au/hg/dropbear/rev/0d889b068123

Refresh patches, rework 100-pubkey_path.patch to work with new
authorized_keys validation.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-05-24 18:04:51 +02:00
Stijn Tintel
51db1f5a9a samba: fix CVE-2017-7494
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 3f0d3d12da)
2017-05-24 15:41:30 +02:00
Rafał Miłecki
1165c0ae0d umdns: update to the version 2017-05-22
This includes following changes:
0e8b948 Support specifying instance name in JSON file
49fdb9f Support PTR queries for a specific service
26ce7dc Allow filtering with instance name in service_reply
920c62a Store instance name in the struct service
ff09d9a Rename service_name function to the service_instance_name
64f78f1 Rename mdns_hostname variable to the umdns_host_label

Previous package update pulled commit 70c66fbbcde86 ("Fix sending
replies to PTR questions") which introduced a regression which this
update fixes.

Fixes: 474c31a20d ("umdns: update to the version 2017-03-21")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-22 12:11:29 +02:00
Rafał Miłecki
74100f3788 bcm53xx: add support for TP-LINK Archer C5 V2
This model also contains few partitions non-discoverable partitions we
need to "protect". Othen than that it uses non-deprecated serial entry
in DTS that doesn't work with LEDE so we need to workaround it as well.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-22 11:38:03 +02:00
Rafał Miłecki
dfe2cea9cd firmware-utils: tplink-safeloader: add support for Archer C5 V2
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-22 11:38:03 +02:00
Rafał Miłecki
0bef8f8011 fstools: backport regression fix for volume_identify
This fixes regression when volume_identify didn't identify volume on
subsequent calls.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-22 11:15:53 +02:00
Jo-Philipp Wich
379155dc0f imagebuilder: fix bundling of DTS sources
Refer to LINUX_KARCH instead of ARCH when bundling DTS files in the image
builder tarball.

While we're at it, also dereference symbolic links when copying as some
kernel architectures contain symbolic links in their DTS directories.

This fixes aarch64 imagebuilders such as brcm2708/bcm2710 ones in particular
as the kernel refers to "aarch64" as "arm64" internally.

Ref: https://forum.lede-project.org/t/lede-image-builder-problem/3680

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-16 17:38:33 +02:00
Michal Sojka
dbaaeae428 image.mk: Generate cpiogz with root-owned files
Some files (e.g. /etc/dropbear) need to be owned by root. Add cpio
option to ensure that.

Other image types (at least targz and squashfs) already have this.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2017-05-16 17:38:08 +02:00
Steffen Weinreich
4bd98e9224 ramips: add om-watchdog to rut5xx DEVICE_PACKAGES
Add om-watchdog as default package for rut5xx.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
2017-05-15 22:56:01 +02:00
Steffen Weinreich
9423cf3e98 om-watchdog: add support for Teltonika RUT5xx (ramips)
Add rut5xx GPIO PIN selection to om-package startup script.

Testet on a RUT500 device, the timeout value of the hardware watchdog
is about 280 sec.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
[split into two commits, bump PKG_RELEASE]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:55:54 +02:00
Piotr Dymacz
38367c5699 om-watchdog: cosmetic code style fixes
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:55:47 +02:00
Piotr Dymacz
da4992f822 om-watchdog: cleanup Makefile
Drop redundant Build/Prepare, empty lines and duplicated Build/Compile.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-05-15 22:55:41 +02:00
Felix Fietkau
8011215ad2 ar71xx: enable nand-utils in the mikrotik subtarget to ensure it makes it to initramfs
Without it, sysupgrade from initramfs to nand fails

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-12 13:33:22 +02:00
Jo-Philipp Wich
aba1b3cbd1 openvpn: update to v2.4.2
Update to version 2.4.2 in order to address two potential Denial-of-Service
vectors in OpenVPN.

CVE-2017-7478 - Don't assert out on receiving too-large control packets
CVE-2017-7479 - Drop packets instead of assert out if packet id rolls over

Ref: https://community.openvpn.net/openvpn/wiki/ChangesInOpenvpn24#OpenVPN2.4.2
Ref: https://community.openvpn.net/openvpn/wiki/QuarkslabAndCryptographyEngineerAudits

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-12 11:57:01 +02:00
Felix Fietkau
53e751e303 openvpn: add myself as maintainer
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-12 11:57:01 +02:00
Daniel Engberg
d40e2efa94 OpenVPN: Update to 2.4.1
Update OpenVPN to 2.4.1
Remove 200-small_build_enable_occ.patch as it's included upstream.
Refresh patches
Add mirror and switch to HTTPS

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2017-05-12 11:57:00 +02:00
Martin Schiller
98491a9ae9 openvpn: add extra respawn parameters
This change protects the openvpn instances to be marked as "in a crash
loop" and thereby the connection retries will run infinitely.

When the remote site of an openvpn connection goes down for some time
(network failure etc.) the openvpn instance in an openwrt/lede device
should not stop retrying to establish the connection.

With the current limit of 5 retries, there is a user interaction
required, which isn't really what you want when the device should
simply do everything to keep the vpn connection up.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2017-05-12 11:57:00 +02:00
Yousong Zhou
bc58099802 openvpn: move list of params and bools to a separate file
So that future patches for addition/removal of them can be more
readable

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-05-12 11:57:00 +02:00
Jo-Philipp Wich
7f3ec01069 ramips: fixup-mac-address: add missing include
Add missing include of ramips.sh in order to import the missing
ramips_board_name() procedure.

Fixes FS#774.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-11 00:54:06 +02:00
Hans Dedecker
d8cfebaa50 dnsmasq: support dhcp_option config as a list
Configuring dhcp_option as an option does not allow the usage of white
spaces in the option value; fix this by supporting dhcp_option as a list
config while still supporting the option config to maintain backwards
compatibility

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-05-09 22:39:41 +02:00
Rafał Miłecki
d1e0cc8cd5 bcm53xx: backport DT patches for serial, thermal and MDIO
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-05-09 11:18:39 +02:00
Henryk Heisig
8619683037 ramips: add factory firmware for Tp-Link C20i/C50
TP-Link firmware doesn't accept sysupgrade.bin with metadata.

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-05-05 20:00:57 +02:00
Marcin Jurkowski
d90ff22c8c brcm63xx: fix invalid Asmax AR 1004g DTS reference
Build profile for Asmax AR 1004g refers to an invalid DTS "rg100a". The
correct DTS for this device is "ar1004g".

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-05-05 19:59:18 +02:00
Mathias Kresin
d49920e450 lantiq: fix avm fritz box mac addresses
It has been shown that the Fritz boxes have the correct mac address set
in the wireless calibration data/eeeprom. Use this mac address as base
for the ethernet and xdsl interface increment/decrement the address to
match the values stored in the tffs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-05-05 19:59:18 +02:00
Paul Spooren
79cd14152c ramips: enable ramdisk for mt7621
Fixes #758

Signed-off-by: Paul Spooren <paul@spooren.de>
2017-05-04 01:03:25 +02:00
Jo-Philipp Wich
bc0de2751c ipq806x: fix EA8500 switch configuration
Do not assign the CPU port twice, this confuses LuCI and possible other
programs relying on topology information in board.json.

Ref: https://github.com/openwrt/luci/issues/1086

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-03 14:16:04 +02:00
Jo-Philipp Wich
0c8f72639f base-files: implement ucidef_set_hostname(), ucidef_set_ntpserver()
Commit 2036ae4 (base-files: support hostname and ntp servers through board.d)
was supposed to implement these procedures but lacked the required changes
to uci-defaults.sh.

Add the missing procedures now to fix config generation on targets relying
on hostname or NTP server presetting.

Fixes FS#754.

Reported-by: Cristian Morales Vega <cristian@samknows.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-05-03 13:48:44 +02:00
Tomislav Požega
eb11207397 mac80211: rt2800: fix mt7620 E2 channel registers
update RF register 47 and 54 values according to vendor driver

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
2017-05-02 23:17:22 +02:00
Tomislav Požega
64fa4ead32 mac80211: rt2800: fix mt7620 vco calibration registers
Use register values from init LNA function instead of the ones from
restore LNA function. Apply register values based on rx path
configuration.

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[daniel@makrotopia.org: moved changes into a separate patch]
2017-05-02 23:17:22 +02:00
Daniel Golle
820a39687d mac80211: rt2x00: fix MT7620 LNA gain and VCO-after-ALC
This should fix issues with bad RX as well as AP not coming up and/or
scanning failing.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-05-02 23:17:22 +02:00
Daniel Golle
5b91d2b52e mac80211: rt2x00: import upstream changes and rebase our patches
Some of our local patches have been accepted upstream. And there are
some more relevant changes (mostly for rt2800usb). Import them and
rebase our remaining local patches on top.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-05-02 23:17:22 +02:00
Daniel Golle
ab7087e24f rt2x00: mt7620: make fixes requested upstream
Introduce RT6352 instead of matching against RF7620.
Clean up channel setting rfvals.
Port bandwidth filter calibration.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-05-02 23:17:22 +02:00
Daniel Golle
4314646ac6 rt2x00: mt7620: yet another beauty session
So here is another round of improvements for MT7620 WiFi.

This commit fixes a few significant issues related to TX_PWR_CFG_x and
TX_ALC and also makes the code more readable by adding register
descriptions for things added for MT7620 and use the usual bit-field
access macros and the now defined macros instead of plain bit-ops and
magic numbers.

Properly describe EEPROM_TARGET_POWER at word 0x68 (== byte 0xD0) and
thereby fix internal TXALC which would otherwise just read
out-of-bounds of the EEPROM map.

Split-out tx-power/ALC related stuff into an additional function.
Fix VCO calibration, it was carried out properly in the channel
switching but incomplete in the actual VCO calibration function.
Also there is no need to trigger VCO calibration in channel switching,
the VCO calibration function is already being called at this point.
Remove it from channel switching function to avoid redundant code.

The TX power calibration differs significantly from all other
Mediatek/Ralink chips: They finally allow 0.5dB steps stored as 8-bit
values for (almost) each bitrate -- and promptly ran out of space and
for some reason didn't want to change the EEPROM layout. The hence
opted for a scheme of sharing values for some adjecent bitrates and
a highly over-complicated (or obfuscated?) way to populate the
TX_PWR_CFG_x registers with the values stored in the EEPROM.
The code here now looks much less complicated than what you see in the
vendor's driver, however, it does the exact same thing:
bGpwrdeltaMinus is a constant and always TRUE, hence half of the
code was dead. Gpwrdelta is always 0 (rather than using the value read
from the EEPROM). What remains is some very grotesque effort to avoid
0x20, probably some hardware bug related to some misunderstanding of
what a singed 8-bit value is (imagine: if it was a signed 6-bit value
then someone could believe that 0x20 == 0x0). And then they didn't
clean it up once they later on anandonned that whole story of having a
constant offset for 40 MHz channels and just set the offset to be
constant 0 -- there is no effort for avoiding 0x20 for the 20 MHz
values stored in the EEPROM, hence that's probably just a forbidden
value in the EEPROM specs and won't appear anyway...
Anyway, the whole thing felt like solving some college math test
where in the end everything cancels out and the result equals 0 ;)
To make sure that channel bandwidth power compensation really doesn't
need to be taken care of, output a warning when the corresponding
value stored in the EEPROM is non-zero.

Also there is no apparent reason to refrain from initializing RFCSR
register 13, it doesn't fail what-so-ever.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-05-02 23:17:22 +02:00
Jonas Gorski
ceefe616c8 mac80211: add rt2x00 debug symbols to PKG_CONFIG_DEPENDS
Chaning these symbols require a recompilation of the modules, so make the
system aware of it.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-05-02 23:17:22 +02:00
Felix Fietkau
5ac51ada60 ath9k: fix power limits on init
The tx power applied by set_txpower is limited by the CTL (conformance
test limit) entries in the EEPROM. These can change based on the user
configured regulatory domain.
Depending on the EEPROM data this can cause the tx power to become too
limited, if the original regdomain CTLs impose lowr limits than the CTLs
of the user configured regdomain.

To fix this issue, set the initial channel limits without any CTL
restrictions and only apply the CTL at run time when setting the channel
and the real tx power.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-02 23:17:22 +02:00
Felix Fietkau
a9728799bc ath: do not apply broken power limits with ATH_USER_REGD
If a device uses the default EEPROM code, typically only the main CTLs
are valid, and they do not apply properly when switching to a different
regulatory domain. If the regdomain deviates from the EEPROM one, force
the world roaming regdomain to ensure that power limits are sane

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-05-02 23:17:22 +02:00
Hans Dedecker
503e496366 odhcpd: update to version 2017-04-28 (FS#595)
9268ca6 ndp: don't trigger IPv6 ping when neighbor entry is invalid
2b3355f ndp: fix adding proxy neighbor entries
7dff5b4 ndp: fix wrong interface name in syslog message
a54afb5 dhcpv6-ia: Fix segfault when writing DHCPv4 leases in state file
c0e9dbf ubus: don't segfault when there're no leases

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-05-02 22:08:32 +02:00
Hans Dedecker
c266641acf odhcpd: update to version 2017-04-21
570069d ubus: rework dumping IPv6 and IPv4 leases
4e579c4 dhcpv6-ia: simplify logic to write statefile and dhcpv6 logging

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-05-02 22:08:21 +02:00
Sergey Ryazanov
37cf921352 build: fix symlinked .config handling
When running "make menuconfig" with symlinked .config (e.g. to
env/.config) it renames symlink to .config.old, creates new .config file
and writes updated configuration here.

This breaks the desired workflow when changes in the configuration could
be checked using "scripts/env diff" and commited with
"scripts/env save". Since the env/.config file is not updated.

Fix this issue by exporting KCONFIG_OVERWRITECONFIG=1, which forces
mconf to overwrite the .config content, instead of renaming it and
creating a new file. This variable is set only if .config is a symlink,
otherwise the variable is not exported and the old behaviour is
preserved.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2017-05-02 16:11:09 +02:00
Thibaut VARENE
8b9f7bd7bd ramips: WN3000RPv3: do not setup switch
The WN3000RPv3 is a repeater with a single ethernet port. Setting up the
switch, even to disable it, is unnecessary and possibly confusing.

Configure LAN as eth0 instead.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:10:01 +02:00
Daniel Gonzalez Cabanelas
bf534e45ea brcm63xx: Add Observa VH4032N support
Add support for the Observa Telecom VH4032N router.

This is another BCM6368 router, 128 MB RAM, 32MB flash and 3 USB
host ports.

The wifi chip is an onboard Broadcom BCM43222.

Signed-off-by: Daniel Gonzalez Cabanelas <dgcbueu@gmail.com>
[jonas.gorski: use gpio-hog instead of abusing ephy-reset]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-04-28 17:09:55 +02:00
Koen Vandeputte
105d5b6f03 cns3xxx: use proper macro's for ID handling
Compiled & tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-04-28 17:09:49 +02:00
Kristian Evensen
49ce6d04b0 ramips: add support for Sanlinking D240
The Sanlinking Technologies D240
(http://www.sanlinking.com/en/29-dual-4g-wifi-router.html) is basically the same
device as the ZBT WE826, so adding support for it in LEDE is straight forward.
The differences is that the D240 has two mini-PCIe slots (instead of one), blue
LEDs and supports PoE.

Specification:
* CPU: MT7620A
* 1x 10/100Mbps POE (802.3af/802.3at) Ethernet, 4x 10/100Mbps.
* 16 MB Flash.
* 128 MB RAM.
* 1x USB 2.0 port.
* 2x mini-PCIe slots.
* 2x SIM slots.
* 1x 2.4Ghz WIFI.
* 1x button.

Wifi, USB, switch and both mini-PCIe slots are working. I have not been able to
test the SD card reader.

The device comes pre-installed with an older version of OpenWRT, including Luci.
In order to install LEDE, you need to follow the existing procedure for updating
OpenWRT/LEDE using Luci. I.e., you need to access the UI and update the firmware
using the sysupgrade-image. Remember to select that you do not want to keep
existing settings. The default router address is 192.168.10.1 and
username/password admin/root (at least on my devices).

If you brick the device, the procedure for recovery is the same as for the
WE826. Please see the wiki page for that device for instructions.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
2017-04-28 17:09:45 +02:00
Piotr Dymacz
58ec566331 ar71xx: select ATH79_NVRAM only by boards actually use it
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-04-28 17:09:40 +02:00
Mathias Kresin
7e2ad9cbb8 ramips: fix Sercomm NA930 compatible string
The Sercomm NA930 is not a mt7620a evaluation board and shouldn't use
the eval board compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:36 +02:00
Mathias Kresin
88cc06abb7 ramips: remove Planex CS-QR10 sound device tree node
The comptible string is neither added by any LEDE patch nor exists in
in the kernel. Drop the sound node which was obviously added
accidentally with 9195d8da ("ramips: DTS rework").

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:29 +02:00
Mathias Kresin
f1f0b92a79 ramips: cleanup SPI flash device tree properties usage
Use only the jedec,spi-nor compatible string. Everything else either
never worked or is only support to keep compatibility.

Remove the linux,modalias property. It is obsolete since kernel 4.4.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-28 17:09:24 +02:00
Felix Fietkau
6aa0a85fc6 ramips: remove DT pcie nodes for GL-MT300A/N
These devices don't have a secondary wifi chip

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-28 17:09:18 +02:00
Florian Fainelli
e200c66a1a rpcd: Explicitly link with lcrypt
Fixes build issues with some toolchains that don't add lcrypt in the default
search paths:

CMakeFiles/rpcd.dir/session.c.o: In function `rpc_login_test_password':
build_dir/target-mipsel-linux-gnu/rpcd-2016-12-03-0577cfc1/session.c:823: undefined reference to `crypt'
collect2: error: ld returned 1 exit status

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-28 17:09:13 +02:00
Vitaly Chekryzhev
28d626556d ramips: ZyXEL Keenetic Omni/Omni2: export gpio usb power
Export gpio usb to allow power management of USB port.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:09:08 +02:00
Vitaly Chekryzhev
fd693bc0e8 ramips: ZyXEL Keenetic Viva: align factory images
ZyXEL web-flasher requires squashfs to be aligned to 64kb.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:09:02 +02:00
Vitaly Chekryzhev
5b2624d618 ramips: ZyXEL Keenetic Viva: export gpio usb power
Export gpio usb to allow power management of USB port.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:08:56 +02:00
Yo Abe
a66623639a ramips: add ip17xx support to WLI-TX4-AG300N
ramips/rt288x WLI-TX4-AG300N was missing support for its 100Mbit switch which
should be included by default.

Signed-off-by: Yo Abe <abe.geel@gmail.com>
[Jo-Philipp Wich: picked from OpenWrt PR#359, rewrap commit msg, fix Sob]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-28 17:08:50 +02:00
Joseph C. Lehner
0405851eb2 ramips: fix EX2700 wireless mac
On some EX2700 devices, the MAC address from the eeprom data differs
from the actual MAC address. Fix that, and cleanup the DTS file
while we're at it.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
2017-04-28 17:08:42 +02:00
Vitaly Chekryzhev
a12655a840 ramips: ZyXEL Keenetic series update wan mac
Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:48 +02:00
Vitaly Chekryzhev
94948252e2 ramips: ZyXEL Keenetic Omni align factory images
ZyXEL web-flasher requires squashfs to be aligned to 64kb.

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:42 +02:00
Vitaly Chekryzhev
85bca2d0fb ramips: correct keenetic-series switch index
Fix switch name typo

Signed-off-by: Vitaly Chekryzhev <13hakta@gmail.com>
2017-04-28 17:07:35 +02:00
Thibaut VARENE
1aee42c6a9 ramips: add support for Netgear WN3000RPv3
This patch adds support for the Netgear WN3000RPv3
http://www.netgear.com/support/product/wn3000rpv3.aspx

Specifications:
- SoC: MediaTek MT7620A (580MHz, ramips)
- RAM: 32MB DDR
- Storage: 8MB NOR SPI flash
- Wireless: builtin MT7620A, 2x2:2 with u.FL connectors
- Ethernet: 1x100M
- Serial: JP1 header, 57600-8N1
- Stock firmware based on OpenWRT Kamikaze

Like the EX2700, the bootloader expects a secondary image signature,
see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577
This is why the same fakeroot image is used for the WN3000

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:07:24 +02:00
BangLang Huang
846457fdbf ramips: fix mac address of miwifi-mini
For the miwifi-mini, the offset of ethernet mac should be 0x28
which you can easyily dump from 'Factory' partition.

Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
2017-04-28 17:07:04 +02:00
Jo-Philipp Wich
7ee09377e7 feeds: add option to force feed update despite modified files
Implement a new flag "-f" for the feeds update command which causes the
script to fall back to a more agressive git update strategy in case there
are locally modified files in the feeds directory.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-28 17:02:48 +02:00
Furong Xu
0f3c2d031a ramips: Clean duplicated status property for Omega2 WMAC in dtsi
At the tail of dtsi, wmac is enabled twice, clean the first one

Signed-off-by: Furong Xu <xfr@outlook.com>
2017-04-28 17:02:48 +02:00
Giuseppe Lippolis
26f07f668a ramips: fixed sms led polarity into dwr-512 DT
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
2017-04-28 17:02:48 +02:00
Thibaut VARENE
dbd2212205 ramips: WN3000RPv3: do not setup switch
The WN3000RPv3 is a repeater with a single ethernet port. Setting up the
switch, even to disable it, is unnecessary and possibly confusing.

Configure LAN as eth0 instead.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-04-28 17:02:48 +02:00
Jo-Philipp Wich
ae0e167f2b busybox: revert accidential version bump
Due to an oversight during patch conflict resolution, the PKG_VERSION got
accidentially bumped instead of the PKG_RELEASE field.

Revert the bad version change as there exists no upstream 1.25.2 version.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 15:38:48 +02:00
Jo-Philipp Wich
fe0b171372 busybox: nslookup_lede: mimic output format of old Busybox applet
When invoking "nslookup_lede" with a domain argument and without explicit
query type, issue both A and AAAA queries and display the resulting IP
addresses in a numbered list style, similar to how the old BusyBox nslookup
used to output the records.

This is required for compatibility with certain scripts.

Ref: https://forum.lede-project.org/t/nslookup-ipv6-in-lede-17-01-1

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 15:33:16 +02:00
Jo-Philipp Wich
a2ee9b7068 busybox: nslookup_lede: fix compatibility with v1.25
The ":*" optstring syntax was only recently introduced with BusyBox v1.26,
older versions need a corresponding hint in the "opt_complementary" variable
to denote flag values that should be stored as llist entries.

Add the required opt_complementary entry to fix random SIGBUS, SIGILL or
SIGSEGV related crashes on BusyBox 1.25.x when attempting to use the "-q"
flag of the "nslookup_lede" applet.

Ref: https://forum.lede-project.org/t/nslookup-ipv6-in-lede-17-01-1

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 15:31:07 +02:00
Jo-Philipp Wich
af1d1ebdda x86: enable 4G high memory support for generic (32bit) subtarget
This is required to fully support a number of 32bit x86 systems equipped
with more than one GB ram, e.g. certain Atom CPU machines.

Ref: https://forum.lede-project.org/t/17-01-1-x86-doesnt-detect-all-of-the-ram/3295

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-27 15:26:48 +02:00
Yousong Zhou
3bfe7ee632 generic: keep module aliases inside .modinfo
It seems module aliases are actually essential info.  E.g. other modules
may call xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1) and the
kernel will request user mode modprobe helper for ipt_hashlimit and
ip6t_hashlimit respectively which are aliases of xt_hashlimit.ko

Compile-tested for armvirt, there is nearly no size impact.

Before

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:07 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533647 Jan 11 11:07 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:07 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544597 Jan 11 11:07 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:07 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654712 Jan 11 11:07 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738296 Jan 11 11:07 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

After

    -rw-r--r-- 1 yousong yousong     304 Jan 10 17:37 config.seed
    -rw-r--r-- 1 yousong yousong    1634 Jan 11 11:10 lede-armvirt-default.manifest
    -rw-r--r-- 1 yousong yousong 1533646 Jan 11 11:10 lede-armvirt-default-rootfs.tar.gz
    -rw-r--r-- 1 yousong yousong 1802711 Jan 11 11:10 lede-armvirt-root.ext4.gz
    -rw-r--r-- 1 yousong yousong 1544593 Jan 11 11:10 lede-armvirt-rootfs.cpio.gz
    -rw-r--r-- 1 yousong yousong 1174984 Jan 11 11:10 lede-armvirt-root.squashfs.gz
    -rwxr-xr-x 1 yousong yousong 1654736 Jan 11 11:10 lede-armvirt-zImage
    -rwxr-xr-x 1 yousong yousong 2738144 Jan 11 11:10 lede-armvirt-zImage-initramfs
    drwxr-xr-x 2 yousong yousong    4096 Jan 10 17:35 packages
    -rw-r--r-- 1 yousong yousong     739 Jan 10 17:37 sha256sums

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-27 14:46:31 +08:00
Yousong Zhou
2bc8d5eaf1 ubox: bump to version 2017-03-10
Fixes FS#684 with commit 21a4bd0

Changes since current version.  All changes except the ones prefixed
with asterisks are for bugfixes.  Module aliases awareness is expected
by the kernel to be a basic facility and is required for properly
initializing wireguard.

    16f7e16 syslog: remove unnecessary sizeof struct between messages
    21a4bd0 kmodloader: modprobe: return 0 for loaded modules
    3dc78a4 kmodloader: don't store aliases info in struct module
    c553354 cmake: fix typo
    8973576 kmodloader: fix not being able to find some modules
    fce9382 cmake: Check for getrandom system call
    ac2d43e kmodloader: support '-q' quiet option
   *f8d3d16 ubox: Add an option for more accurate timestamps in log
    14839f0 kmodloader: make insert_module() idempotent
   *6e3c6dc kmodloader: add module alias awareness
    9371411 kmodloader: fix out-of-bound access when parsing .modinfo
    a62c946 kmodloader: modprobe: skip possible command line arguments
   *46a4b5f kmodloader: log to kmsg when loading directories of modules
    eacc426 kmodloader: remove redundant glob wildcard char
    8488bb5 ubox: Initialize conditionally uninitialized variabled
    db070f1 ubox: Fix some memory leaks
    acc48b5 kmodloader: Fix typo in error message

Size comparison on x86_64 host

    function                                             old     new   delta
    main                                                2190    2344    +154
    scan_module_folder                                   665     793    +128
    alloc_module_node                                      -     113    +113
    .rodata                                              946    1036     +90
    alloc_module                                         202     245     +43
    free_modules                                          77     119     +42
    load_modprobe                                        209     237     +28
    scan_loaded_modules                                  241     265     +24
    avl_modcmp                                            45      67     +22
    insert_module                                        204     224     +20
    find_module                                           13      30     +17
    static.optind@@GLIBC_2                                 -       4      +4
    static.load_moddeps                                  118     117      -1
    scan_module_folders                                   55      54      -1
    ------------------------------------------------------------------------------
    (add/remove: 2/0 grow/shrink: 10/2 up/down: 685/-2)           Total: 683 bytes

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-04-27 14:38:05 +08:00
Álvaro Fernández Rojas
1ab41265c3 kernel: use skb_cow_head() to deal with cloned skbs
We need to ensure there is enough headroom to push extra header,
but we also need to check if we are allowed to change headers.

skb_cow_head() is the proper helper to deal with this.

Fixes Ethernet<->WiFi bridge for Raspberry Pi and probably other devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-04-23 13:55:03 +02:00
Matthias Schiffer
1d1935b242 ar71xx: fix minor syntax error in /lib/upgrade/platform.sh
Fix a '==' that should be a '=' in a test condition. Busybox fortunately
doesn't care.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-04-22 19:01:28 +02:00
Matthias Schiffer
9117ef8d6a ramips: update DEVICE_PACKAGES for Ubiquiti EdgeRouter X
Fixes removal of unneeded kernel modules with per-device rootfs.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-04-22 19:01:21 +02:00
Florian Fainelli
72fcdb6286 openssl: Use mkhash for STAMP_CONFIGURED
The current way of creating a STAMP_CONFIGURED filename for OpenSSL can
lead to an extremely long filename that makes touch unable to create it,
and fail the build.

Use mkhash to produce a hash against OPENSSL_OPTIONS which creates a
shortert stamp file,

Fixes #572

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-22 12:43:51 +02:00
Jo-Philipp Wich
5feb4f0e6d busybox: fix build of nslookup_lede applet without IPv6 (#728)
Protect any IPv6 related with appropriate guards to fix compilation with
disabled IPv6 support in Busybox.

Fixes #728.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-21 13:20:42 +02:00
Florian Fainelli
449880e0ff busybox: Move libresolv detection to LEDE Makefile
Since the LEDE nslookup applet is already specific to LEDE, move the
libresolv detection into the busybox Makefile that LEDE uses.

This fixes builds with external toolchains that don't automatically
search for headers and/or libraries without being told so.

Fixes: de5b8e5d2f ("busybox: add musl compatible nslookup replacement")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-21 12:24:17 +02:00
Rafał Miłecki
9437fbb7ab bcm53xx: backport BCM5301X patches
This fixes GIC interrupts (required before switching to 4.9), adds few
new entires & introduces DTS for Archer C5.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:04:24 +02:00
Rafał Miłecki
3ff31f8a78 bcm53xx: parepare for building more Linksys images
We still can't enable them by default without proper TRX support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:03:08 +02:00
Rafał Miłecki
ad145e03cc bcm53xx: prepare for building Archer C5 V2 image
Don't enable it yet as kernel needs to be updated first.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-04-20 23:03:07 +02:00
Vittorio Gambaletta
3dbc4175a8 ar71xx: add TP-LINK TL-WR841N/ND v12 image
This router has the same hardware as TP-LINK TL-WR841N/ND v11 (same FCC
ID, same TFTP image name...).

If the stock firmware web interface doesn't accept LEDE factory image,
it can be flashed via the U-Boot TFTP recovery mode, by long-pressing
the reset button after power on.

The TFTP image name is wr841nv11_tp_recovery.bin (yes, v11, not v12).

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
2017-04-20 16:52:54 +02:00
Daniel Engberg
7eb58cf109 utils/f2fs-tools: Update to 1.8.0
Update f2fs-tools to 1.8.0
Refresh patches
Remove selinux patch, use configure argument instead.
Switch to xz tarball
Adjust url to avoid redirects

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2017-04-17 18:15:53 +02:00
Jo-Philipp Wich
1d76542cca busybox: add musl compatible nslookup replacement
Add an alternative nslookup applet implementation which is compatible with
musl libc wrt. name server selection and which supports a number of additional
features such as query type selection.

Fixes #155, #217

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-15 18:13:45 +02:00
Jo-Philipp Wich
6ca5ccc620 kernel: update kernel 4.4 to 4.4.61
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-15 17:20:51 +02:00
Hans Dedecker
c2999ef592 odhcpd: update to version 2017-03-29 (FS#635)
3d9f406 rework IPv6 dns address selection (FS#635)
bc6c3ac ndp: keep an exact copy of IPv6 interface addresses
6eb1e01 ndp: code cleanup
eea7d03 rework IPv6 address dump logic
24d21c7 ndp: add syslog debug tracing

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-04-13 13:55:57 +02:00
Florian Fainelli
a532aaa2aa odhcpd: update to version 2017-02-28
Brings in the following change:

9eac2a896341 dhcpv6-ia: Check lockf return value

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-13 13:55:57 +02:00
Hans Dedecker
425c6d0462 odhcpd: update to version 2017-02-21
1b630f8 router: don't announce prefixes with valid lifetime equal to 0
ba0cac0 router: fix arithmetic exception fault
3495f17 router: allow RA prefix lifetime being set to leasetime value (FS#397)
e437ce9 treewide: simplify dhcp leasetime checking
942fb33 router: support ra_mininterval and ra_lifetime uci parameters (FS#397)
f913337 router.h: fix alignment style
4dc7edb Revert "odhcpd.h: fix alignment style"
62ea54f odhcpd.h: fix alignment style
a898ee5 config: make loglevel configurable via uci (FS#481)
51c756c odhcpd: display correct default log level in usage text
68ee0b5 treewide: define and use macro IN6_IS_ADDR_ULA
fa57225 ndp: deregister netlink event socket for non recoverable errors
ac70d28 odhcpd: fix white space errors

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-04-13 13:55:57 +02:00
Mathias Kresin
f2f672c32c ramips: add RP-N53 pcie wireless eeprom
Fix the PCIe 5GHz wireless by using the on flash eeprom/caldata.
Disable the 2.4GHz band as this band has no antennas attached but is
enabled in the eeprom/caldata.

Fixes: FS#691

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-12 10:13:40 +02:00
Mathias Kresin
f3dc2ffdd4 ramips: fix WHR-600D eeprom dt property
Fix the PCIe 5GHz wireless by using the ralink mtd-eeprom property as
this board have a RT5592 and uses the rt2x00 driver. The mediathek
device tree bindings do not work here.

Fixes: FS#691

Fixes: d8dd207ea6 ("ramips: use the ralink,mtd-eeprom device tree property")
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-04-12 10:13:37 +02:00
Felix Fietkau
caaa214eae util-linux: re-enable parallel builds
The original build error in 'more' seems to be gone

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-11 19:33:04 +02:00
Felix Fietkau
0faf921a01 util-linux: unconditionally enable ncursesw support
The build dependency is unconditional, and some components might fail if
ncurses is not available

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-11 19:33:00 +02:00
Daniel Engberg
f2a3653882 utils/util-linux: Update to 2.29.2
Update util-linux to 2.29.2
Remote 0001-fix-uClibc-ng-scanf-check.patch as it's been merged upstream.
Refresh patches
Change ncurses to ncursesw to fix compilation and avoid confusion

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [remove faulty dependency changes]
2017-04-11 19:32:57 +02:00
Jo-Philipp Wich
c6e79980b8 build: fix triggering opkg/host compilation
Commit 131db36 "build: remove separate /install step for host builds" dropped
the package/*/host/install targets in favor to performing the install steps
within the compile target instead.

Adjust package/Makefile accordingly in order to prevent a missing
staging_dir/host/bin/opkg when staging package archives into the rootfs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-09 15:42:20 +02:00
Felix Fietkau
5866ff8be8 libubox: fix host build on macOS
Use the defaults instead of a custom non-portable Host/Install section

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-08 14:49:05 +02:00
Jo-Philipp Wich
293c54c567 libubox: add host build
Our opkg fork requires libubox to build, so add a host build for it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-08 14:48:55 +02:00
Jo-Philipp Wich
5aa97e35de opkg: switch to LEDE fork (#120, #551, #571)
Cherry-pick the following commits from master to bump opkg in LEDE 17.01:

b65dc04712 opkg: switch to own fork to improve memory usage
55ffc38004 opkg: re-enable usign support
19720a6f03 opkg: fix handling conffiles in status lists
9e4555f58d opkg: fix stray printf() (#551)
ebf846b005 opkg: mark as essential (FS#571)
aedd5d5cb0 opkg: fix several package installation bugs
48ae44d033 opkg: gracefully handle missing $PATH, fix build warnings
1449b52f02 opkg: backport upstream fixes, code cleanups

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-04-08 14:31:27 +02:00
Felix Fietkau
7099bb19b5 mt76: ensure that the metapackage gets built as .ipk
Fixes errors during the image builder run

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-05 23:39:23 +02:00
Felix Fietkau
53fcaed1f7 image.mk: force kernel rebuild on every run
DTS dependencies are not processed correctly so makes it safer against
poentially stale builds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-05 10:08:22 +02:00
Jing Qiu
638ca50f3b kernel: Fix the incorrect i_nlink count after jffs2's RENAME_EXCHANGE operations.
The problem is caused by the incorrect handling of the parent inode's
i_nlink count for the dentry to be RENAME_EXCHANGED. There are 3 cases
to consider. Assume we want to RENAME_EXCHANGE struct dentry *a and
struct dentry *b, and inode_a is pointed to by dentry_a, inode_b is
pointed to by dentry_b:

1. If inode_a is a directory, but inode_b isn't, then we must decrease
   the i_nlink count of old_dir_i, and increase the i_nlink of new_dir_i.
2. If inode_a isn't a directory, but inode_b is a directory, then we
   must increase the i_nlink of old_dir_i, and decrease the i_nlink count
   of new_dir_i.
3. If the types of inode_a and inode_b are the same, we don't change the
   i_nlink for either old_dir_i or new_dir_i.

Signed-off-by: Jing Qiu <aqiu0720@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-05 09:57:41 +02:00
Felix Fietkau
47bf110cbb mac80211: backport an upstream fix for queue start/stop handling
Fixes issues with 802.11s

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-04-03 15:12:50 +02:00
Piotr Dymacz
a49503bbc7 sysntpd: restore support for peer-less (standalone) mode
ntpd from Busybox supports peer-less (standalone) mode when it's started
with option -l and without any peer provided with option -p. In this
mode ntpd uses local time as reference and acts as stratum 1 server.

This mode can be used in isolated networks, where Internet access and/or
other NTP server/s are not available, but the device has some other way
of getting correct time, like e.g. GPS (ugps supports setting local time
by default).

Support for this mode was incorrectly disabled/removed in:
1527f96ca6

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
2017-04-02 15:09:09 +02:00
Piotr Dymacz
1bdd23231b ar71xx: fix Wallys DR344 ethernet MAC addresses offsets
Without this fix, ethernet interfaces on Wallys DR344 use random MAC
addresses.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-04-02 15:09:09 +02:00
Piotr Dymacz
0cb669b469 ugps: fix and improve init script
The ugps tool expects device path in last argument. If it's provided
before other options, they won't be processed at all.

Additionally, make it possible to use absolute path for gps character
device in related uci configuration.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2017-04-02 15:09:09 +02:00
Hauke Mehrtens
0dcc4d239d kernel: update kernel 4.4 to 4.4.59
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-04-02 14:37:49 +02:00
Hauke Mehrtens
1adc6db036 ubox: fix sha256 mirror hash
Commit 5c20a4fec9 ("ubox: turn logd into a separate package") changed
the PKG_SOURCE_DATE which is also included in the tar file. This change
resulted in a new tar with a different hash, but the sha256 hash was not
updated. Fix the sha256 hash value in this commit to match what would be
created from git and what is already on the mirror.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
2017-03-30 22:34:49 +02:00
Hauke Mehrtens
298c40fd34 odhcpd: fix sha256 sum
The sha256sum added in commit b8567cb44e ("odhcpd: update to git HEAD
version (FS#396)") does not match the sha256sum of the file on the mirror or
when I clone it. Update the sha256 sum to the correct value.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
2017-03-30 22:00:48 +02:00
Yousong Zhou
910a9430a0 firewall: document rules for IPSec ESP/ISAKMP with 'name' option
These are recommended practices by REC-22 and REC-24 of RFC6092:
"Recommended Simple Security Capabilities in Customer Premises Equipment
(CPE) for Providing Residential IPv6 Internet Service"

Fixes FS#640

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-03-28 17:46:30 +08:00
Matthias Schiffer
1b94737824 iw: enable MESH ID in scan output
Make scan output useful for 802.11s meshes. The common print_ssid function
is used, so this doesn't add any additional code.

Based-on-patch-by: Jan-Tarek Butt <tarek@ring0.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-03-25 14:55:10 +01:00
Yousong Zhou
0d304d4228 busybox: vi: backporting patches to fix ZZ and :x command
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-03-25 13:23:58 +08:00
Rafał Miłecki
474c31a20d umdns: update to the version 2017-03-21
This includes following changes:
480d7bc Fix sending unicast questions on cache expire
a0403cd Keep source sockaddr for every cached DNS record
1478293 Fix code freeing cached non-A(AAA) records too early
9f1cc22 Fix replying to "QU" questions received on unicast interface
943bedb Fix reading port of incoming packets
c725494 Use MCAST_PORT define for port 5353
ce7e9e9 Use one define for DNS-Based Service Discovery service name
e1bacef Drop entries cached for interface we're going to delete
496aeba Fix comment typo in cache_gc_timer
f89986b Fix refreshing cached A(AAA) records that expire

Previous updates made umdns work as expected on startup but there were
still many bugs. They were mostly related to runtime - cache management
and requests + responses. E.g. umdns was never able to send question on
DNS record expire. It was also ignoring all incoming unicast questions.

Since these issues are quite serious it makes sense to backport this
update to the stable branch.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-03-24 06:51:45 +01:00
Rafał Miłecki
ba076ebbc5 umdns: update to the version 2017-03-14
This includes 3 cleanups:
fd5a160 Don't cache hosts as services
80dd246 Refresh DNS records A and AAAA directly
6515101 Access cached records (instead of services) to read list of hosts

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-03-24 06:51:44 +01:00
Yousong Zhou
0f23e80c27 iproute2: fix ip monitor can't work when NET_NS is not enabled
The bug appeared in v4.1.0 and was fixed since v4.8.0

Fixes FS#620

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-03-19 12:42:16 +08:00
Hauke Mehrtens
111cf1b9f3 curl: fix CVE-2017-2629 SSL_VERIFYSTATUS ignored
This fixes the following security problem:
https://curl.haxx.se/docs/adv_20170222.html

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-03-13 22:51:20 +01:00
Hauke Mehrtens
c4ed92ae7d mbedtls: update to version 2.4.2
This fixes the following security problems:
* CVE-2017-2784: Freeing of memory allocated on stack when validating a public key with a secp224k1 curve
* SLOTH vulnerability
* Denial of Service through Certificate Revocation List

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-03-13 22:35:48 +01:00
Álvaro Fernández Rojas
7d70ad66ac mac80211: mwifiex-sdio: select DRIVER_11AC_SUPPORT
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-11 20:34:52 +01:00
Álvaro Fernández Rojas
7ae68124a4 mac80211: mwifiex-pcie: select DRIVER_11AC_SUPPORT
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-11 20:34:52 +01:00
Henryk Heisig
fc90e87b65 mvebu: wrt3200acm enable SDIO interface
add mwifiex-sdio package to wrt3200acm

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
2017-03-11 20:34:33 +01:00
Henryk Heisig
c03083339a mac80211: add support for Marvell 802.11n/802.11ac SDIO Wireless cards
This adds option to build kernel module and firmware packages
for a Marvell 8887 SDIO Wireless device

Signed-off-by: Henryk Heisig <hyniu@o2.pl>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-11 20:34:03 +01:00
Álvaro Fernández Rojas
9d84accea1 brcm2708: remove duplicated gzip from image generation
Images are now automatically gziped so remove custom image command

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-11 13:08:20 +01:00
Stijn Segers
1bba5789af ar71xx: add ath10k driver and firmware for Netgear R6100 to firmware image
A Netgear R6100 owner reported the LEDE images lack the ath10k driver and firmware [1]. This patch adds both to the R6100 image.

[1] https://forum.lede-project.org/t/netgear-r6100-5ghz-wifi-not-working-after-initial-install/2222

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2017-03-11 12:46:43 +01:00
Rafał Miłecki
0eed4a61b9 umdns: update to the 2017-03-10 version
This fixes crash in interface_start caused by freeing interface in
interface_free without stopping a timeout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-03-10 13:09:54 +01:00
Stijn Tintel
4a405ac8f9 brcm2708: add support for the new Raspberry Pi Zero W
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-09 08:47:41 +01:00
Stijn Tintel
e091e8951d brcm2708: order boards and models alphabetically
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-08 09:55:37 +01:00
Álvaro Fernández Rojas
8b52a8906b brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo:
https://github.com/raspberrypi/linux/tree/rpi-4.4.y

- led1 can't be controlled on rpi-3 for linux 4.4, remove it.
- Fix modules.mk typos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-08 09:54:01 +01:00
Álvaro Fernández Rojas
b3ba3764d0 brcm2708-gpu-fw: update to latest version
This is needed in order to add support for the new RPi Zero W

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-03-08 09:28:19 +01:00
Jo-Philipp Wich
f8e08ffd94 ramips: fix Linksys RE6500 switch port mapping
Properly map the internal switch ports to the proper LAN1..LAN4 labels.

Fixes #530.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-07 17:39:34 +01:00
Jo-Philipp Wich
20a2db83de ppp: propagate master peerdns setting to dynamic slave interface
Honour the parent interfaces peerdns option when spawning a virtual DHCPv6
interface in order to avoid pulling in IPv6 DNS servers when the user opted
to inhibit peer DNS servers in the configuration.

Fixes #597.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-07 11:27:27 +01:00
Kevin Darbyshire-Bryant
09a8183ce8 kernel: update kernel 4.4 to 4.4.52
Bump kernel from 4.4.50 to 4.4.52

Refresh patches

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-03-03 18:18:49 +01:00
Rafał Miłecki
514854d636 bcm53xx: backport accepted BCM5301X and BCM53573 patches
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-03-03 11:41:10 +01:00
Rafał Miłecki
0c05cadeb7 bcm53xx: include Broadcom PHY driver in the kernel
Initial idea was to use package with this PHY driver for devices that
need it. Unfortunately this can't work as bgmac is built-in and PHY
probing happens before loading modules - it results in PHY subsystem
picking default (generic) PHY driver.

There were two ways of solving this:
1) Making bcm53xx use bgmac as module
xor
2) Built-in Broadcom PHY driver

After some quick discussion it seems we can simply built-in the driver
as increased kenel size is relatively small (1805 B).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-03-03 11:39:49 +01:00
Alberto Bursi
f4fc12f023 kirkwood: fix include in etc/board.d/02_network
the mtd_get_mac_ascii function called within this script requires the inclusion of /lib/functions/system.sh

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2017-03-01 20:37:37 +01:00
Hsing-Wang Liao
21903d056e wireless-tools: Change download url to github
Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
2017-03-01 20:37:37 +01:00
Alif M. Ahmad
f0e8470aa9 grub2: update to 2.02~rc1
Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
2017-03-01 20:37:37 +01:00
Kevin Darbyshire-Bryant
1b2a54b5cd iftop: bump to latest upstream
Drops a LEDE carried patch now upstream.
Convert to autotools.
A number of nits fixed upstream (dns & short packet handling most
notable)

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-03-01 20:37:37 +01:00
Ben Kelly
3d52251df4 swconfig: Bugfix switch_port uci option parsing
When not defining 'device' or 'vlan' in relevant switch_port uci
sections, behaviour is inconsistent due to *devn, *port and *vlan
pointers not being zero initialized.

Signed-off-by: Ben Kelly <ben@benjii.net>
2017-03-01 20:37:37 +01:00
Felix Fietkau
df041b6520 netifd: fix stopping netifd + interfaces
stop() is overwritten by rc.common, so implement stop_service instead.
While at it, remove the now unnecessary restart() override

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:37 +01:00
Martin Schiller
87e021e6e3 libpcap: add optional netfilter support
This is needed to use the nflog interface with tcpdump

Signed-off-by: Martin Schiller <mschiller@tdt.de>
2017-03-01 20:37:37 +01:00
Felix Fietkau
2e67e8c90f archs38: only calculate entry point address when necessary
$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:37 +01:00
Felix Fietkau
657e3ce8a2 arc770: only calculate entry point address when necessary
$(eval) runs even during prereq check, which can cause bogus error
messages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:37 +01:00
Felix Fietkau
0f2757dce4 px5g: replace px5g-standalone with a statically linked variant of px5g-mbedtls
px5g-standalone only supports SHA1 for certificates, which is strongly
deprecated. The new px5g-standalone is about 27k bigger (compressed),
and has identical behavior to px5g-mbedtls (it uses SHA256).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:37 +01:00
Felix Fietkau
2e8545333a mbedtls: add --function-sections and --data-sections to CFLAGS
This allows binaries that links these libraries statically to be reduced
by using --gc-sections on link

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:37 +01:00
Michal Sojka
e3021e0308 scripts/feeds: Reuse TOPDIR if defined in environment
The feeds script sets value of TOPDIR in a way that is inconsistent
with how toplevel Makefile sets it. The inconsistency manifests when I
use a "build directory" with symlinks to LEDE source (see below).

When make is invoked in such a directory, make's TOPDIR variable is
set to that directory, whereas scripts/feeds sets TOPDIR to the top of
LEDE source, which results in creating feeds directory inside the LEDE
source instead of in the build directory.

This patch changes the script so that it reuses the TOPDIR value form
the environment if it exists. The result is that 'make
package/symlinks' correctly fetches feeds to the build directory
instead in the source.

I use the following commands to create the build directory:

    ln -s $SRC/config config
    ln -s $SRC/Config.in Config.in
    ln -s $SRC/feeds.conf.default feeds.conf.default
    ln -s $SRC/include include
    ln -s $SRC/Makefile Makefile
    mkdir package
    ln -s $SRC/package/base-files package/base-files
    ln -s $SRC/package/boot package/boot
    ln -s $SRC/package/devel package/devel
    ln -s $SRC/package/firmware package/firmware
    ln -s $SRC/package/kernel package/kernel
    ln -s $SRC/package/libs package/libs
    ln -s $SRC/package/Makefile package/Makefile
    ln -s $SRC/package/network package/network
    ln -s $SRC/package/system package/system
    ln -s $SRC/package/utils package/utils
    ln -s $SRC/rules.mk rules.mk
    ln -s $SRC/scripts scripts
    ln -s $SRC/target target
    ln -s $SRC/toolchain toolchain
    ln -s $SRC/tools tools

This allows me to easily test changes in LEDE on multiple targets.

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
2017-03-01 20:37:37 +01:00
Hsing-Wang Liao
b036a22fcc kernel: add Chinese codepages
Signed-off-by: Hsing-Wang Liao <kuoruan@gmail.com>
2017-03-01 20:37:36 +01:00
Felix Fietkau
fffabd3c44 gen-dependencies.sh: fix handling variations in "file" output
On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:36 +01:00
Felix Fietkau
2d5f8eb067 rstrip.sh: fix handling variations in "file" output
On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:36 +01:00
Felix Fietkau
db7f80c587 libpcap: remove feature dependencies on kmod-* packages
USB support could be built into the kernel as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:36 +01:00
Ansuel Smith
00e4f6fd36 ebtables: update to last commit
Refreshed patches

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2017-03-01 20:37:36 +01:00
Daniel Albers
8aa92deaf6 hostapd: mv netifd.sh hostapd.sh
same name for the file on the host and target

Signed-off-by: Daniel Albers <daniel.albers@public-files.de>
2017-03-01 20:37:36 +01:00
Pavel Kubelun
2856c7e320 ath10k-firmware: update qca9984 firmware
Bump qca9984 firmware.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
2017-03-01 20:37:36 +01:00
Ulrich Weber
3983b4ad0f ppp: honor ip6table for IPv6 PPP interfaces
as we do for IPv4 PPP interfaces. When we create the
dynamic IPv6 interface we should inherit ip6table from
main interface.

Signed-off-by: Ulrich Weber <ulrich.weber@riverbed.com>
2017-03-01 20:37:36 +01:00
Florian Eckert
352f92fe08 ppp: add pppoe-discovery to an independent package
pppoe-discovery performs the same discovery process as pppoe, but does
not initiate a session

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-03-01 20:37:36 +01:00
David Pinilla Caparrós
31c2461e3f base-files: Added a deprecation notice on wifi detect
When running wifi detect, the user will be told on error output that
wifi detect is deprecated, that wifi config must be used instead. Also
the commit that changes it is referenced for further info.

Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
2017-03-01 20:37:36 +01:00
David Pinilla Caparrós
8bb839e85a base-files: Add wifi config to wifi command usage
Since commit 5f8f8a3661 wifi detect does
not longer work and wifi config it's used to configure not yet
configured wireless devices.

This commit changes command usage to reflect that change.

Signed-off-by: David Pinilla Caparrós <dpinitux@gmail.com>
2017-03-01 20:37:36 +01:00
Thibaut VARENE
cff47cacd1 ar71xx: fix platform_find_rootfspart()
platform_find_rootfspart() fails if the kernel partition comes before the
rootfs partition. The proposed patch fixes this while preserving what I
understand was the original idea: stop at first match.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-03-01 20:37:36 +01:00
Ben Kelly
e1e9d27655 uclibc++: patch bugfix erase() on derived __base_associative
When calling erase() on a containers derived from __base_associative
(e.g. multimap) and providing a pair of iterators a segfault will
occur.

Example code to reproduce:

	typedef std::multimap<int, int> testmap;
	testmap t;
	t.insert(std::pair<int, int>(1, 1));
	t.insert(std::pair<int, int>(2, 1));
	t.insert(std::pair<int, int>(3, 1));
	t.erase(t.begin(), t.end());

Signed-off-by: Ben Kelly <ben@benjii.net>
2017-03-01 20:37:36 +01:00
Mathias Kresin
e19fbd3297 ramips: fix Airlink AR725W device title
Gemtek is the ODM but the board was sold by Airlink101.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-03-01 20:37:36 +01:00
Jo-Philipp Wich
23fd4e65ba scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback
Add a fallback case to get_source_date_epoch.sh which reports the modification
time of the script itself in case there is no SCM information available, e.g.
when downloading .tar.gz or .zip tarballs produced by Github.

Also fix the mercurial case while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-01 20:37:36 +01:00
Felix Fietkau
37b0d547db ath10k-firmware: revert faulty PKG_SOURCE_DATE change from 7cb27b46
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:35 +01:00
Pavel Kubelun
e591831430 ath10k-firmware: update qca9984 firmware and board data
Fixes firmware crash in rare cases and a bug
ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in
push mode
for those who kept experiencing it after previous firmware update.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
2017-03-01 20:37:35 +01:00
Ben Greear
8a3ac15a47 ath10k-ct: Support ath10k CT firmware for 9887 chipsets.
And, update support for 9880 chipsets.  The new firmware
fixes a regression with EAPOL 4/4 packets added in
a recent commit.

It also fixes a case where the firmware would improperly try
to use STBC when configured for 1x1 (as 9887 always is).

Signed-off-by: Ben Greear <greearb@candelatech.com>
2017-03-01 20:37:35 +01:00
Magnus Kroken
4bd0edc8fd scripts/getver.sh: append short git hash based on upstream commit
The short git hash suffix printed by getver.sh is taken from the
latest local commit, change this to use the hash from latest
upstream commit if available. This is considered the intended
behavior based on commit message a642a11fac,
introducing getver.sh.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-03-01 20:37:35 +01:00
Chris Blake
9451cd7c5b leds-apu2: Add PC Engines APU2 LED driver
This adds support for the PCB LEDs and Reset Button found on the PC
Engines APU2/APU3 embedded boards.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-03-01 20:37:35 +01:00
Koen Vandeputte
65b05463d7 netfilter: re-enable TEE support for kernel 4.4
It got disabled in commit 4454a3fb63
but works nicely these days.

Tested on cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2017-03-01 20:37:35 +01:00
Chris Blake
2b122a6750 gpio-nct5104d: Add nct5104d driver package
This adds support for the SuperIO chip nct5104d found on the PC Engines
APU boards, which allows for a handful of additional ports, such as 2x
additional UART pinouts, enabling an external watchdog (no driver for
this functionality yet), and 16 GPIO pins. More info can be found at
https://pcengines.ch/ht_gpio.htm

Thanks to @feckert for helping package this.

Cc: Florian Eckert <Eckert.Florian@googlemail.com>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-03-01 20:37:35 +01:00
Chris Blake
bc443b1052 x86/64: Enable GPIO sysfs & GPIO LED support
The following changes enables GPIO sysfs as well as the LEDS_GPIO option
within the kernel. This is required to enable LEDs over a GPIO
interface.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-03-01 20:37:35 +01:00
Mathias Kresin
c5d8d8fd64 x86: drop ep80579-drivers
The subtarget on which the driver still depends was removed with
dee8986b95 because it was unmaintained
for a long time.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-03-01 20:37:35 +01:00
Daniel Golle
83d3e393bf 6in4: add missing colon when setting default ca_path
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2017-03-01 20:37:35 +01:00
John Crispin
ee1cd31d2b procd: update to latest git HEAD
5f91241 procd: add cancel_timeout on rc scripts when a runtime_timeout is specified
961dc69 procd: stop service using SIGKILL if SIGTERM failed to do so

Fixes FS#516.

Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit 946d1dfb87)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-01 12:10:06 +01:00
Felix Fietkau
bc61c1328d procd: update to the latest version
Fixes compatibility issues with glibc 2.25

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2ffb80bc9f)
2017-03-01 12:10:06 +01:00
Jo-Philipp Wich
709c326461 hostapd: fix feature indication
- Fix eap test to work with standalone hostapd builds
 - Fix 11n test to check the correct define
 - Add 11ac, 11r and 11w tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-03-01 01:18:58 +01:00
Yousong Zhou
ef5cb964b1 relayd: fix making incomplete instance json data
Defer procd_open_instance only after validity check passed.

Fixes FS#541

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-26 14:38:25 +08:00
Yousong Zhou
77fb98ee41 relayd: remove old start-stop-service related code
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-26 14:38:24 +08:00
Yousong Zhou
b24273fe71 ppp: ppp6-up: add executable permission bit
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-26 14:38:24 +08:00
Yousong Zhou
5f5fae27b5 mac80211: hwsim: select DRIVER_11AC_SUPPORT and DRIVER_11W_SUPPORT
This is required for default wireless configuration of malta target to
work out of the box again.  Fixes "77ece30e: hostapd: Add ability to
specify that that wireless driver supports 802.11ac"

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-26 14:38:24 +08:00
Brandon Koepke
2b22e1d5c3 openvpn: adding key_direction to append_params.
key_direction shows up as an openvpn option in the user-interface but does not end up in the /var/etc/openvpn*.conf file. Adding it to the list here fixed the issue for me.

Signed-off-by: Brandon Koepke <bdkoepke@fastmail.com>
[Fixes FS#537]
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-26 14:36:16 +08:00
Felix Fietkau
6cb46adbc9 ubus: update to the latest version
c09e4f0 ubusd: fix incomplete copy of shared buf during queue-ing
453b87f cli: add support for subscribing to objects
6eb3c96 cli: do not use default timeout for listen
dfe3383 libubus: reset ctx->sock.error when doing ubus reconnect
34c6e81 cli: fix listen_timeout compile issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-25 11:15:46 +01:00
Felix Fietkau
fdc22b616c ubus: update to the latest version
Adds the following fixes:

91acde6 libubus: do not modify uloop_cancelled
763b9b2 libubus: reset ctx->sock.eof to fix reconnect issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-25 11:11:24 +01:00
Ted Hess
4c9b45966e libubox: Update to latest version
9d6305a utils: Change calloc_a() to return size_t aligned pointers

Signed-off-by: Ted Hess <thess@kitschensync.net>
2017-02-25 11:10:41 +01:00
Felix Fietkau
67c2a176ce libubox: update to the latest version
Adds the following changes:

de3f14b uloop: add uloop_cancelling function
3b6181b utils: fix build on Mac OS X 10.12
7f671b1 blobmsg: add support for double
0fe1374 utils: add helper functions useful for allocating a ring buffer
8fc1c30 libubox: replace strtok with _r version.
4a9f74f libubox: allow reading out the pid of uloop process in lua
372e1e6 uloop: remove useless epoll data assignment
f9db1cb libubox: allow reading out the remaining time of a uloop timer in Lua

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-25 11:10:35 +01:00
Felix Fietkau
bf53a8327f acx-mac80211: fix scan API error that could lead to a crash
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-24 15:03:48 +01:00
Felix Fietkau
f1336d2a70 iw: sync nl80211.h with mac80211 package
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-24 12:22:29 +01:00
Felix Fietkau
703515f889 mac80211: sync with master branch as of 9edff13abd
Includes the following changes:
9edff13abd mac80211: disable potentially harmful PS software retry for A-MPDU sessions
75216a76b0 mac80211: backport upstream fix for CSA in IBSS mode
368cc8ef47 mac80211: update brcmfmac backporting brcmf_err cleanups
66a63d25c4 mac80211: fix build on linux 3.18
9eacb9d7fc rt2x00: mt7620: lots of improvements
fd94fa61a7 mac80211: brcmfmac: update Raspberry Pi patches for linux 4.9
649e766a64 mac80211: update to wireless-testing 2017-01-31
47540afa5d ath9k: add a warning to the tx99 config option
b367eef21d mac80211: rt2x00: add support for external LNA on MT7620
9200e168f2 mac80211: move (& update) upstream accepted brcmfmac patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-24 12:22:29 +01:00
Felix Fietkau
d27dd6298b ath10k-ct: depend on kmod-hwmon-core, it gets used when CONFIG_THERMAL is set
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-24 12:22:29 +01:00
Felix Fietkau
0ce2d5b6bf ath10k-ct: fix kernel api compatibility issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-24 12:22:28 +01:00
Ben Greear
09620c0825 ath10k-ct: Fix performance of 2x2 hardware running 3x3 firmware.
The driver had a bug when calculating the rateset.  This resolves
that and allows full VHT mcs rates on 2x2 hardware.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2017-02-24 12:22:28 +01:00
Joseph C. Lehner
0a3088cb4b mt76: split kmod package
This patch splits `kmod-mt76` into three separate packages:
`kmod-mt76-core`, `kmod-mt76x2` and `kmod-mt7603`. By making
`kmod-mt76` a metapackage containing these new packages,
the previous behaviour of including all drivers and firmware
is left unchanged, unless explicitly unselected in
`DEVICE_PACKAGES`.

This splitting is especially beneficial for devices with
small flash chips, since the `kmod-mt76` package currently
requires ~160K on squashfs (after compression).

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
2017-02-23 17:34:14 +01:00
Felix Fietkau
39d03d9959 lantiq: fix broadcast packets leaking on the wrong vlan on xrx200
The ethernet driver uses a port map override via special tag to control
the ports on which multicast packets are sent. This was added to work
around an issue in the switch that was occasionally leaking packets onto
the wrong vlan.
Unfortunately the change had some leftover lines that were overwrting
the port map with a list of all ports, thus always leaking packets onto
the wront vlan.

Fix this by only enabling the override with the VLAN port map and only
if a matching VLAN port map was actually found

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-23 13:01:34 +01:00
Rafał Miłecki
5fed9ef842 kernel: move upstream accepted bcm47xxpart TRX cleanups
Use 0xx prefix for accepted patches.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-22 19:02:51 +01:00
Rafał Miłecki
5c1758d468 kernel: backport bcm47xxsflash support for reading 32 MiB flashes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-22 19:01:50 +01:00
Stijn Tintel
349577adbf Revert "kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)"
This reverts commit ec1a695daa.

Revert the workaround, the problem was properly fixed in
2374549916.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 5c49fecf72)
2017-02-22 12:07:30 +01:00
Günther Kelleter
7fd494d4b2 ar8216: flush ARL table during reset after init_globals
commit 33b72b8e0f
"ar8216: adjust ATU flushing in case of link changes"
introduced portwise flushing on link down events. Now the ARL table could
be in a chaotic state after boot where ar8xxx_sw_get_arl_table looped
forever (depending on the entries collected while booting).

Fixes FS#384.

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
(cherry picked from commit 2374549916)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-02-22 11:57:27 +01:00
Felix Fietkau
f6d94b0dd6 cmake: skip build system check on compile
cmake checks the build system and its variables on its own to detect if
the makefiles need to be regenerated.
Unfortunately this can invalidate overrides passed in the
Build/Configure step. On non-Linux systems this breaks the build when
switching between targets of the same package architecture.

Fix this by forcibly disabling the build system check and relying on the
LEDE build system to take care of these things

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-21 16:16:25 +01:00
Baptiste Jonglez
59508e309e dnsmasq: Add upstream patch fixing SERVFAIL issues with multiple servers
This fixes FS#391 for lede-17.01

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-02-20 18:13:44 +01:00
Jo-Philipp Wich
06f3b91902 kernel: update kernel 4.4 to version 4.4.50
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-20 16:02:54 +01:00
Stijn Tintel
5612114090 Revert "px5g-standalone: provide px5g via PROVIDES"
This reverts commit cc66f819b4.

This commit causes opkg to install px5g-standalone instead of px5g when
installing luci-ssl. As luci-ssl depends on mbedtls, using
px5g-standalone makes no sense. Next to that, it creates deprecated SHA1
certificates. Revert the commit to avoid pxg5-standalone to be
installed by accident.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit ca8aee0c57)
2017-02-20 15:17:20 +01:00
Alberto Bursi
4d1ab84f1e uboot-kirkwood: fix goflexhome/net bootcommand
Goflexhome/net use uImage, and to boot an uImage the u-boot
must use bootm command, not bootz.

Fixes the "i cannot boot LEDE with this u-boot" issue that I
found out myself with my goflexnet.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2017-02-19 21:00:19 +01:00
Thibaut VARENE
cdeb2322ea ar71xx: Remove images for rb-941-2nd
The code that generates this image is broken in many ways.

The new code currently in master generates images that will not be compatible
with the ones in 17.01. To avoid a migration nightmare, this patch removes
image generation for this device in 17.01

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-19 20:52:52 +01:00
Jo-Philipp Wich
f79926cb94 sdk: emit proper tag references for base URLs
Properly resolve symbolic tag names when constructing the base feed Git url
and avoid emitting "HEAD" references when building from detached commits.

Fixes #495, #501.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-19 20:50:24 +01:00
Mathias Kresin
0a26490fe4 lantiq: set the internet led interface according to wan interface
Use the nas0 interface for the netdev trigger as default. Use the ptm0
interface for xRX200 boards to match the default wan interface set in
02_network.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-18 16:52:05 +01:00
Mathias Kresin
6a6e3a4928 lantiq: introduce lantiq_is_vdsl_system
Move the code to check if the current system is a system with vdsl
support to a dedicate function to make it reusable.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-18 16:52:05 +01:00
Mathias Kresin
c5879b0676 lantiq: fix ARV7519RW22 switch port indexing
Fixes FS#454.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-18 16:52:05 +01:00
Felix Fietkau
c835c9ebe5 uhttpd: use sha256 when generating certificates with openssl (FS#512)
Patch from attachment to FS#512

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-17 14:43:11 +01:00
Stijn Tintel
6ebb8723a6 dropbear: bump PKG_RELEASE
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 27040dbf89)
2017-02-17 12:31:52 +01:00
Joseph C. Sible
f527436364 dropbear: enable SHA256 HMACs
The only HMACs currently available use MD5 and SHA1, both of which have known
weaknesses. We already compile in the SHA256 code since we use Curve25519
by default, so there's no significant size penalty to enabling this.

Signed-off-by: Joseph C. Sible <josephcsible@users.noreply.github.com>
(cherry picked from commit 0bf85ef048)
2017-02-17 12:31:39 +01:00
Felix Fietkau
f88bd7cd0f ar71xx: fix ethernet PLL configuration for QCA956x
QCA956x is configured like AR934x, not like the older chips.
Should fix ethernet hangs when using the WAN port without SGMII

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-17 12:17:39 +01:00
David Woodhouse
828a024c81 x86: Set default baud rate on Geode images to 115200
Prior to commit 1496b95a0 ("x86: clean up default grub baudrate
settings") we had three different baud rates for the Geode targets:
19200 for net5501, 38400 for alix2, and 115200 for Geos.

It doesn't seem that there's a very good reason for varying from our
default 115200 baud, so let's make the Geode target do that instead.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2017-02-17 10:30:30 +01:00
David Woodhouse
63a8424702 x86: Add Geos profile for Geode subtarget
This makes the Geode images actually useful again. The Geos profile
should include the relevant hardware for that board, and the Default
profile adds the via-rhine adapter which seems to have been present in
the net5501 and alix targets killed in commit 9e0759ea26 ("x86: merge
all geode based subtargets into one").

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2017-02-17 10:30:30 +01:00
Chris Blake
808f6a500c x86: Add board configs for the PC Engines APU2
This adds the default LED and network settings for the PC Engines APU2
when running under the x86 target.

[dwmw2: Change Ethernet port setup]
Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-02-17 10:29:24 +01:00
David Woodhouse
6d6db65d82 x86: Enable DIAG LED on Geos
Based on a patch from Chris Blake <chrisrblake93@gmail.com>, except let's
do it by using the LED configuration instead of hard-coding it for each
board type. And try using /bin/board_detect to do the default behaviour,
on the first boot where the config hasn't yet been generated.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2017-02-17 10:28:52 +01:00
Chris Blake
bd5b5c749a x86: Move Traverse Geos configs into x86 base-files
This change moves the files in 657418d to the root of the x86 target.
This is done in preperation for adding more devices under other
subtargets.

CC: David Woodhouse <dwmw2@infradead.org>

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-02-17 10:28:45 +01:00
David Woodhouse
06e0c30336 x86: Add configuration back for Traverse Geos
When we merged all the Geode boards into one generic target, the default
network and LED configuration was lost. Put it back.

Fixes: 9e0759ea26 ("x86: merge all geode based subtargets into one")
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2017-02-17 10:28:39 +01:00
Rafał Miłecki
982dd01ac3 Mark targets using kernel 3.18 as source-only
We're past v17.01.0-rc2 phase and these few targets are stuck at 3.18
kernel. We obviously don't want to have targets like this built for the
release, especially with 3.18 being EOL.

It may be not too late for bringing these targets back for the next
minor release, so just mark them as source-only instead of dropping
completely.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-17 06:58:33 +01:00
Furong Xu
25b7295617 ramips: fix the number of uarts for MT7688
Same as MT7621 and MT7628, MT7688 allows up to 3 uarts

Signed-off-by: Furong Xu <xfr@outlook.com>
2017-02-16 09:54:30 +01:00
Furong Xu
71ea3b4814 ramips: fix PWM pin mux conflict in dtsi
GPIO18 and GPIO19 on OMEGA2(+) should be GPIO mode, enable PWM lead to a conflict

[    0.290633] rt2880-pinmux pinctrl: pin io18 already requested by pinctrl; cannot claim for 10005000.pwm
[    0.299722] rt2880-pinmux pinctrl: pin-18 (10005000.pwm) status -22
[    0.305729] rt2880-pinmux pinctrl: could not request pin 18 (io18) from group pwm0  on device rt2880-pinmux
[    0.315131] mtk-pwm 10005000.pwm: Error applying setting, reverse things back

Keep PWM disabled.

Signed-off-by: Furong Xu <xfr@outlook.com>
2017-02-16 09:54:17 +01:00
Cezary Jackiewicz
44aec27112 ugps: fix typo
Removing redundant spaces from the name of the option. Without fix:

root@LEDE:~# opkg install ugps
Installing ugps (2016-10-24-32a6b2b7-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01-SNAPSHOT/packages/mips_24kc/base/ugps_2016-10-24-32a6b2b7-1_mips_24kc.ipk
Configuring ugps.
uci: Parse error (invalid character in name field) at line 3, byte 23
uci: Parse error (invalid character in name field) at line 3, byte 23
sh: out of range
root@LEDE:~# uci show gps
uci: Parse error (invalid character in name field) at line 3, byte 23

With this fix:

root@LEDE:~# uci show gps
gps.@gps[0]=gps
gps.@gps[0].tty='ttyACM0'
gps.@gps[0].adjust_time='1'

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
2017-02-16 09:54:14 +01:00
Mirko Parthey
7efe538ac1 brcm47xx: fix button inversion for Asus WL-500W
The Asus WL-500W buttons are active high,
but the software treats them as active low.
Fix the inverted logic.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-16 00:20:33 +01:00
Mirko Parthey
be007c580e brcm47xx: fix USB driver choice for Asus WL-500W
BCM4704 SoC has only USB 1.1 core:
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x03, vendor 0x4243)
but this device actually comes with two USB 2.0 ports.

It appears embedded controller isn't used but instead there are two PCI
attached controllers (next to the BCM4321 wireless card):
1106:3038 VT82xx/62xx UHCI USB 1.1 Controller
1106:3104 USB 2.0

Choose a set of USB drivers which actually support this hardware.

Signed-off-by: Mirko Parthey <mirko.parthey@web.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-15 23:54:36 +01:00
Felix Fietkau
dbb8e04472 qos-scripts: fix module load commands (FS#438)
fq_codel is built-in, and xt_CONNMARK is provided by the xt_connmark
module

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-15 14:02:04 +01:00
Felix Fietkau
853bad5af2 kernel: fix crashes on MIPS when loading kernel modules under memory pressure
When memory is tight, modules may need to be loaded into vmalloc()
space. The code then has to generate jump trampolines which enable
relocations between vmalloc space and physical address space.

The code had a bug that was freeing these trampolines even when the
module was successfully loaded.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-15 13:23:58 +01:00
Rafał Miłecki
df49e49bc7 mdns: update and rename package to the umdns
This update includes numerous small fixes for:
1) Interfaces setup
2) Packets parsing
3) Sending replies
Without this there were multiple problems with exchanging information
between (u)mdns and other implementations (including (u)mdns as well).

This also follows project rename to umdns which was required to avoid
confusion with Apple's mdnsd from mDNSResponder project.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-15 13:07:21 +01:00
Felix Fietkau
72d045b2a6 ar71xx: fix DEFAULT_PACKAGES for mikrotik devices
Include packages from the default profile for NAND devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-15 12:59:22 +01:00
Felix Fietkau
b8c9ded999 build: add buildbot specific config option for setting defaults
This can be used to tweak the buildbot behavior without having to change
buildbot's configuration.
It will also allow us to add more aggressive clean steps (e.g. on
toolchain changes), which would break developers' workflows if enable
by default.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-15 11:37:13 +01:00
Furong Xu
eea6df8255 tools: patch-image: fix file descriptor leak.
Maybe this is committed by mistake, fix it.

Signed-off-by: Furong Xu <xfr@outlook.com>
2017-02-15 09:37:15 +01:00
John Crispin
30a4966053 octeon: only copy sysupgrade file if present
this caused

'mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory'

when running sysupgrade -n

Signed-off-by: John Crispin <john@phrozen.org>
2017-02-15 09:37:15 +01:00
Sven Eckelmann
152f57f509 ar71xx: Add missing device package om-watchdog for MR1750
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:56 +01:00
Sven Eckelmann
fcba5ee47a ar71xx: add OpenMesh A40 to OpenMesh A60 profile
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:55 +01:00
Sven Eckelmann
f30f25c33e ar71xx: extract ath10k wifi board.bin for the OpenMesh A40 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:55 +01:00
Sven Eckelmann
d6d9f256ff package/uboot-envtools: add OpenMesh A40 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:54 +01:00
Sven Eckelmann
e6057ed207 package/om-watchdog: add OpenMesh A40 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:53 +01:00
Sven Eckelmann
4a36180970 ar71xx: enable sysupgrade for the OpenMesh A40
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:52 +01:00
Sven Eckelmann
552bc355d1 ar71xx: add user-space support for the OpenMesh A40
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:52 +01:00
Sven Eckelmann
14add3f724 ar71xx: add kernel support for the OpenMesh A40 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:51 +01:00
Sven Eckelmann
b194b3d97f ar71xx: create profile and build image for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:50 +01:00
Sven Eckelmann
facbdec0b5 ar71xx: extract ath10k wifi board.bin for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:49 +01:00
Sven Eckelmann
8785ebc471 package/uboot-envtools: add OpenMesh a60 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:49 +01:00
Sven Eckelmann
eb383710e2 package/om-watchdog: add OpenMesh A60 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:48 +01:00
Sven Eckelmann
b7361c5b35 ar71xx: enable sysupgrade for the OpenMesh A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:47 +01:00
Sven Eckelmann
72c65c6213 scripts/om-fwupgradecfg-gen.sh: add support for the A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:47 +01:00
Sven Eckelmann
5ad9164b9c ar71xx: add user-space support for the OpenMesh A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:46 +01:00
Sven Eckelmann
72d8d8c6f3 ar71xx: add kernel support for the OpenMesh A60 board
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:45 +01:00
Sven Eckelmann
a3061e57e8 package/uboot-envtools: add OpenMesh OM2Pv4/-HSv4 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:45 +01:00
Sven Eckelmann
8a35c489ad package/om-watchdog: add OpenMesh OM2Pv4/-HSv4 support
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:44 +01:00
Sven Eckelmann
d536c1d04f ar71xx: enable sysupgrade for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:43 +01:00
Sven Eckelmann
b2f3d9b05c ar71xx: add user-space support for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:43 +01:00
Sven Eckelmann
9f0f4c1494 ar71xx: add kernel support for the OpenMesh OM2Pv4/-HSv4
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:42 +01:00
Sven Eckelmann
68ba0525a0 ar71xx: Remove the v2/v3 from the OpenMesh profile names
The list of v2/v3 devices is getting longer and makes reading the names of
the profiles unnecessary hard.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
2017-02-15 09:35:42 +01:00
Denis Osvald
cbd69f7e4e procd: fix default timeout for reload trigger actions
Default trigger action timeout was added to procd.sh in commit f88e3a4c0
(procd: add default timeout for reload trigger actions)
However, the timeout value was not placed under the correct JSON-script
array nesting level and thus did not apply.

To fix this and make the timeout actually apply to the reload triggers,
we place it in the correct scope, that is the per-trigger array.

Fixes: f88e3a4c0a
Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
2017-02-15 09:35:12 +01:00
Jonas Gorski
367a3bb36f mvebu: append metadata to clearfog sd card images
Fixes the following issue:

root@LEDE:/# sysupgrade /tmp/lede-mvebu-armada-388-clearfog-sdcard.img.gz
Saving metaconfig...
Image metadata not found
Use sysupgrade -F to override this check when downgrading or flashing to vendor firmware
Image check 'fwtool_check_image' failed.
root@LEDE:/#

Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-02-13 17:51:15 +01:00
Jonas Gorski
4817e61f45 brcm63xx: Neufbox 6: fix switch by probing through DT
Probe the switch through DT instead of a platform device. This fixes
probe, as GPIO offsets are now properly accounted for.

Fixes the following issue:

[    0.802953] 8021q: 802.1Q VLAN Support v1.8
[    0.810518] rtl8366_smi: gpio_request failed for 18, err=-517

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-02-13 17:51:08 +01:00
Felix Fietkau
034a80009c sdk: clean scripts/config before packing tarball (FS#504)
Avoids shipping potentially incompatible object files and also reduces
the tarball size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-13 11:47:12 +01:00
Giuseppe Lippolis
e5060b32e5 ramips: added image size into dwr-512 DT
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
2017-02-13 10:25:19 +01:00
Yangbo Lu
b72dcd5457 layerscape: fix adjust_link for 10G & 2.5G
Added a linux-4.4 patch to fix adjust_link for 10G & 2.5G.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2017-02-13 10:25:19 +01:00
Chuanhong Guo
57dfbac6ff ramips: Correct switch configuration for Newifi D1
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2017-02-13 10:25:19 +01:00
Martin Blumenstingl
32c9d467e3 lantiq: fix patching the wifi mac address on BTHOMEHUBV3A
The firmware hotplug script tries to read the mac address from a
partition with the name "uboot-env" which does not exist (instead it's
name is uboot_env). This broke calculation of the new checksum (after
patching the mac address) which resulted in ath9k refusing to use the
EEPROM data.

The original error reported by ath9k was:
PCI: Enabling device 0000:00:0e.0 (0000 -> 0002)
ath: phy0: Bad EEPROM checksum 0x2523
ath: phy0: Unable to initialize hardware; initialization status: -22
ath9k 0000:00:0e.0: Failed to initialize device

Fixes: a20616863d ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2017-02-13 07:57:04 +01:00
Felix Fietkau
e967f4dd27 ath9k: fix various issues in the airtime-fairness implementation
Effects of the bugs could include memory corruption, tx hangs, kernel
crahes, possibly other things as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-12 14:27:21 +01:00
Hauke Mehrtens
eac4851bfd kernel: MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch
This backports the following fix to our mips IRQ stack patches:
https://patchwork.linux-mips.org/patch/15110/

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-02-12 12:25:52 +01:00
Jonas Gorski
02515f0187 brcm63xx: fix lzma loader for BCM6362
BCM6362 and BCM3380 seem to share the same PRID. Disable serial output
for them until we can find a way to tell them apart reliably.

Fixes: 8f3cfe4ba2 ("brcm63xx: lzma-loader: add BCM3380 support")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-02-10 10:51:09 +01:00
Jonas Gorski
f49efcd325 brcm63xx: do a full reset phy cycle
Make sure we do a proper reset of the phy, if the phy reset is defined.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-02-10 10:51:09 +01:00
Jonas Gorski
921cecbdf8 brcm63xx: fix external interrupts on BCM6318
Setting the clear bit for an interrupt seems to cause interrupts to be
deasserted again immediately. So unset the bit for BCM6318 to allow
subsequent interrupts to still work.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
2017-02-10 10:51:09 +01:00
Hans Dedecker
b8567cb44e odhcpd: update to git HEAD version (FS#396)
8df4253 ndp: harden netlink event socket error handling
b02f3e6 ndp: close proc file descriptor also during error handling
8a615ad npd: rework IPv6 relay logic (FS#396)
0129f79 config: restore interface defaults when cleaning interface

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-09 21:42:48 +01:00
Hans Dedecker
03ff2d7359 odhcpd: update to git HEAD version (FS#388)
3317c86 dhcpv6-ia: apply lease delete based on assignment bound state
df50429 odhcpd: properly handle netlink messages (FS#388)
83d72cf odhcpd: fix coding style

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-09 21:42:00 +01:00
Alexey Brodkin
f25d9cbe48 arc770: backport upstream fix for unaligned access
This commit reverts 42f3c1f ("arc770: fix broken upstream change")
and simultaneously adds back-ported fix from Linus' tree:
a524c218bc94 ("ARC: [arcompact] brown paper bag bug in unaligned
access delay slot fixup").

Note mentioned patch will appear in stable trees soon as well so
IMHO there's not much sense in adding this separate patch in lede/master branch.
As well as we will get rid of it here in 17.01 once we bump 4.4 kernel here
later down the line.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Felix Fietkau <nbd@nbd.name>
Cc: John Crispin <john@phrozen.org>
Cc: Jo-Philipp Wich <jo@mein.io>
2017-02-09 09:15:17 +01:00
John Crispin
bd64568d27 procd: update to latest git HEAD
cdc3dab ujail: fix signal forwarding

Signed-off-by: John Crispin <john@phrozen.org>
2017-02-08 15:03:16 +01:00
Claudio Leite
4e2c2b51f5 ramips: fix AR670W partition alignment
mtdsplit_lzma requires that the rootfs be aligned to a block boundary.
Pad the kernel partition to make this so.

Signed-off-by: Claudio Leite <leitec@gmail.com>
2017-02-08 06:16:53 +01:00
Álvaro Fernández Rojas
86bd886697 brcmfmac: improve Raspberry Pi 3 stability
- Really disable power management (wrong config flags).
- Disable internal roaming engine.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-02-07 18:00:16 +01:00
Rafał Miłecki
083854f06f bcm53xx: add missing system.sh include
It's needed for macaddr_add.

Fixes: 5ed23223fd ("bcm53xx: set WAN MAC address to don't share one with LAN interface")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-07 11:51:05 +01:00
Jo-Philipp Wich
42f3c1fe1c arc770: fix broken upstream change
Add a patch to revert upstream commit 9aed02feae57bf7a40cb04ea0e3017cb7a998db4
which introduces syntax errors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-07 09:32:47 +01:00
Hauke Mehrtens
2ad4383b74 tcpdump: update to version 4.9.0
This fixes the following 41 security problems:
 + CVE-2016-7922: buffer overflow in print-ah.c:ah_print().
 + CVE-2016-7923: buffer overflow in print-arp.c:arp_print().
 + CVE-2016-7924: buffer overflow in print-atm.c:oam_print().
 + CVE-2016-7925: buffer overflow in print-sl.c:sl_if_print().
 + CVE-2016-7926: buffer overflow in print-ether.c:ethertype_print().
 + CVE-2016-7927: buffer overflow in print-802_11.c:ieee802_11_radio_print().
 + CVE-2016-7928: buffer overflow in print-ipcomp.c:ipcomp_print().
 + CVE-2016-7929: buffer overflow in print-juniper.c:juniper_parse_header().
 + CVE-2016-7930: buffer overflow in print-llc.c:llc_print().
 + CVE-2016-7931: buffer overflow in print-mpls.c:mpls_print().
 + CVE-2016-7932: buffer overflow in print-pim.c:pimv2_check_checksum().
 + CVE-2016-7933: buffer overflow in print-ppp.c:ppp_hdlc_if_print().
 + CVE-2016-7934: buffer overflow in print-udp.c:rtcp_print().
 + CVE-2016-7935: buffer overflow in print-udp.c:rtp_print().
 + CVE-2016-7936: buffer overflow in print-udp.c:udp_print().
 + CVE-2016-7937: buffer overflow in print-udp.c:vat_print().
 + CVE-2016-7938: integer overflow in print-zeromq.c:zmtp1_print_frame().
 + CVE-2016-7939: buffer overflow in print-gre.c, multiple functions.
 + CVE-2016-7940: buffer overflow in print-stp.c, multiple functions.
 + CVE-2016-7973: buffer overflow in print-atalk.c, multiple functions.
 + CVE-2016-7974: buffer overflow in print-ip.c, multiple functions.
 + CVE-2016-7975: buffer overflow in print-tcp.c:tcp_print().
 + CVE-2016-7983: buffer overflow in print-bootp.c:bootp_print().
 + CVE-2016-7984: buffer overflow in print-tftp.c:tftp_print().
 + CVE-2016-7985: buffer overflow in print-calm-fast.c:calm_fast_print().
 + CVE-2016-7986: buffer overflow in print-geonet.c, multiple functions.
 + CVE-2016-7992: buffer overflow in print-cip.c:cip_if_print().
 + CVE-2016-7993: a bug in util-print.c:relts_print() could cause a
      buffer overflow in multiple protocol parsers (DNS, DVMRP, HSRP, IGMP,
      lightweight resolver protocol, PIM).
 + CVE-2016-8574: buffer overflow in print-fr.c:frf15_print().
 + CVE-2016-8575: buffer overflow in print-fr.c:q933_print().
 + CVE-2017-5202: buffer overflow in print-isoclns.c:clnp_print().
 + CVE-2017-5203: buffer overflow in print-bootp.c:bootp_print().
 + CVE-2017-5204: buffer overflow in print-ip6.c:ip6_print().
 + CVE-2017-5205: buffer overflow in print-isakmp.c:ikev2_e_print().
 + CVE-2017-5341: buffer overflow in print-otv.c:otv_print().
 + CVE-2017-5342: a bug in multiple protocol parsers (Geneve, GRE, NSH,
      OTV, VXLAN and VXLAN GPE) could cause a buffer overflow in
      print-ether.c:ether_print().
 + CVE-2017-5482: buffer overflow in print-fr.c:q933_print().
 + CVE-2017-5483: buffer overflow in print-snmp.c:asn1_parse().
 + CVE-2017-5484: buffer overflow in print-atm.c:sig_print().
 + CVE-2017-5485: buffer overflow in addrtoname.c:lookup_nsap().
 + CVE-2017-5486: buffer overflow in print-isoclns.c:clnp_print().

The size of the package is only incread very little:
new size:
306430 tcpdump_4.9.0-1_mips_24kc.ipk
130324 tcpdump-mini_4.9.0-1_mips_24kc.ipk

old size:
302782 tcpdump_4.8.1-1_mips_24kc.ipk
129033 tcpdump-mini_4.8.1-1_mips_24kc.ipk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-02-06 22:34:28 +01:00
Rafał Miłecki
f2b885d82e bcm53xx: set Netgear R8000 USB LEDs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 20:26:01 +01:00
Stijn Tintel
054ce1624c kernel: update kernel 4.4 to version 4.4.47
Refresh patches for all targets that support kernel 4.4.
Compile-tested on all targets that use kernel 4.4 and aren't marked
broken, except arc770 and arch38 due to broken toolchain.

Runtime-tested on ar71xx, octeon, ramips and x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit d2c4041f02)

Conflicts:
	include/kernel-version.mk
	target/linux/ramips/patches-4.4/997-ralink-Introduce-fw_passed_dtb-to-arch-mips-ralink.patch
2017-02-06 20:13:06 +01:00
Koen Vandeputte
b786a5ffc3 kernel: bump to 4.4.46
Refreshed patches for all supported targets.

Compile-tested on ar71xx, cns3xxx, imx6, mt7621, oxnas and x86/64.
Run-tested on ar71xx, cns3xxx, imx6 and mt7621.

Tested-by: Stijn Segers <francesco.borromini@inventati.org>
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit 3becadd56c)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-02-06 20:13:06 +01:00
Koen Vandeputte
c656cbc56b kernel: bump to 4.4.45
Refreshed patches for all supported targets.

Compiled & tested on cns3xxx & imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry picked from commit 4d1515070b)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

Conflicts:
	target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
2017-02-06 20:13:06 +01:00
Stijn Segers
ee3067c588 Kernel: bump to 4.4.44
Bump kernel to 4.4.44. Compile-tested on ar71xx, ramips/mt7621 and x86/64.

.44 has been run-tested on the 17.01 branch here on ar71xx and mt7621.

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
(cherry picked from commit 20996edd68)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

Conflicts:
	target/linux/ar71xx/patches-4.4/920-usb-chipidea-AR933x-platform-support.patch
	target/linux/ar71xx/patches-4.4/930-chipidea-pullup.patch
2017-02-06 20:13:06 +01:00
Rafał Miłecki
518bb7ae5a bcm53xx: refresh Linux 4.4 config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 17:21:40 +01:00
Rafał Miłecki
8ff8e51cda bcm53xx: image: use one style of adding TARGET_DEVICES entries
It just makes code consistent. This trivial change may be a 17.01
candidate to provide simpler backporting experience.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 17:08:13 +01:00
Rafał Miłecki
81f9cd56a2 bcm53xx: backport upstream DTS files for Linksys devices
We dont't build officialy images for them yet due to partitioning
issues.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 09:08:06 +01:00
Rafał Miłecki
29c0b575ee bcm53xx: use accepted BCM5301X patches for R8000 and Luxul devices
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 09:05:26 +01:00
Rafał Miłecki
5c4b2eb3dd mac80211: brcmfmac: backport wowlan netdetect fixes
I needed a moment to figure out relation between this patchset and the
nl80211: fix validation of scheduled scan info for wowlan netdetect

It appears nl80211 commit will go on top of brcmfmac changes so it's
safe to backport these patches.

One patch that was excluded is commit 2a2a5d1835b6 ("brcmfmac: add
.update_connect_params() callback") as it depends on missing commit
088e8df82f91 ("cfg80211: Add support to update connection parameters").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:49 +01:00
Rafał Miłecki
52add1988c mac80211: brcmfmac: backport PSM watchdog improvements
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:49 +01:00
Rafał Miłecki
c578da6198 mac80211: brcmfmac: backport minor code cleanups
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:49 +01:00
Rafał Miłecki
4b9bdb48d9 mac80211: brcmfmac: backport 4.10 fixes & typo fix
This includes memory leak fix in initialization path.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:49 +01:00
Rafał Miłecki
85d128f145 mac80211: brcmfmac: backport scheduled scan cleanup and chip support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:49 +01:00
Rafał Miłecki
e48b1c2c07 mac80211: brcmfmac: backport some old patches from 2016
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:48 +01:00
Rafał Miłecki
e8f42223be mac80211: rename brcmfmac patches to use higher prefix
There are more patches to backport that should go before these.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-06 00:10:48 +01:00
Rafał Miłecki
41dc50fc27 kernel: backport bgmac support for external PHYs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:38:26 +01:00
Rafał Miłecki
aec04e1deb kernel: use upstream accepted bgmac fix for BCM47186B0
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:38:26 +01:00
Rafał Miłecki
f61044a9b0 kernel: rename bgmac patches to squeeze them
This is a pure rename without any changes. It makes maintaining bgmac
simpler and will hopefully make adding new kernel a bit easier.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:38:26 +01:00
Rafał Miłecki
36288db2fd mac80211: start hostapd with logging wpa_printf messages to syslog
Some debugging/error messages are printed using wpa_printf and this
change allows finally reading them out of the syslog.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:33:05 +01:00
Rafał Miłecki
bc49d7902c hostapd: enable support for logging wpa_printf messages to syslog
This will allow starting hostapd with the new -s parameter and finally
read all (error) messages from the syslog.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:31:02 +01:00
Rafał Miłecki
a0bc62fe08 hostapd: backport support for sending debug messages to the syslog
It wasn't possible to read hostapd wpa_printf messages unless running
hostapd manually. It was because hostapd was printing them using vprintf
and not directly to the syslog.

We were trying to workaround this problem by redirecting STDIN_FILENO
and STDOUT_FILENO but it was working only for the initialization phase.
As soon as hostapd did os_daemonize our solution stopped working.

Please note despite the subject this change doesn't affect debug level
messages only but just everything printed by hostapd with wpa_printf
including MSG_ERROR-s. This makes it even more important as reading
error messages can be quite useful for debugging.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-05 22:29:56 +01:00
Mathias Kresin
3f9a194e04 ramips: fix Airlink AR725W factory image build
The factory image can't be bigger than 3328 KByte. If the image is
bigger than that, the gemtek-header tool throws an error and breaks
the build.

Make sure the output file to which the gemtek header should be added
exists and wasn't removed during the check-size step because of it
size. This will prevent hard errors in case the factory image is to big
similar to what is done for sysupgrade images.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-04 12:54:40 +01:00
Hannu Nyman
c53bb974b2 ipq806x: fix wireless macs
Commit 71a39b8 ("ipq806x: Fix wireless support for Netgear Nighthawk X4S
D7800") added a trailing TAB char after the backslash which prevents
the assignment of the correct MACs for wifi devices.

Fixes: FS#451

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
[reworded commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-03 19:32:07 +01:00
Rafał Miłecki
5ed23223fd bcm53xx: set WAN MAC address to don't share one with LAN interface
After analyzing numerous NVRAMs and vendor firmwares it seems the base
MAC address is used for LAN interface. WAN interface has different one
which sometimes is set directly in NVRAM and sometines needs to be
calculated.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-03 08:05:32 +01:00
André Valentin
41de9a2e12 ipq806x: fixup nbg6817 internal mmc and switch configuration in DTS
The setting mmc-ddr-1_8v in the platform dts leads to read errors. The
device is unusable and system reboots in a loop. Because NBG6817 is the
only mmc device, I removed it in base dts.

The second change removes settings now present in base dts.

The third change references was a wrong conversion of constants in the switch settings.
Switch now initializes again.

Signed-off-by: André Valentin <avalentin@marcant.net>
2017-02-02 22:49:33 +01:00
Hannu Nyman
1b51a49a9d ccache, samba36: fix samba.org addresses to use https
samba.org has started to enforce https and
currently plain http downloads with curl/wget fail,
so convert samba.org download links to use https.

Modernise links at the same time.

Also convert samba.org URL fields to have https.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-02 00:26:05 +01:00
Rafał Miłecki
0224e32cd0 kernel: fix BCM54612E PHY support
This backports upstream commit 62e13097c46c ("net: phy: broadcom: rehook
BCM54612E specific init")

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-01 21:12:33 +01:00
Christian Lamparter
bce140ebb9 musl: update musl to 1.1.16+ and switch to download from git
This patch updates musl to 1.1.16+ [0] and removes all the
backported patches. This is a major release and tagged as such.
For more information visit musl-libc.org or read the WHATSNEW.

Furthermore, this patch also changes musl to download directly
from git. This makes it easier to update musl in the future.

The patch custom Add-format-attribute-to-some-function-declarations.patch
was assigned a new 400- number. This should avoid confusion
since 0xx numbers are usually assigned to backports.

[0] <http://git.musl-libc.org/cgit/musl/commit/?id=769f53598e781ffc89191520f3f8a93cb58db91f>

Cc: Hannu Nyman <hannu.nyman@iki.fi>
Cc: Koen Vandeputte <koen.vandeputte@ncentric.com>
Cc: Jo-Philipp Wich <jo@mein.io>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
2017-02-01 18:39:16 +01:00
Qian Zheng
b313f0d189 ar71xx: fix netgear wndr3700 v1/v2, wndr3800/wndr3800ch switch port mapping
Signed-off-by: Qian Zheng <sotux82@gmail.com>
2017-02-01 17:58:39 +01:00
Qian Zheng
581285c6dc ar71xx: fix netgear wnr2000 v3 switch port mapping
Signed-off-by: Qian Zheng <sotux82@gmail.com>
[Jo-Philipp Wich: fix alphabetical order after merging with gl-ar300 case]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-01 17:58:39 +01:00
Qian Zheng
0880105144 ar71xx: fix tl-wr841n-v7 switch port mapping
Signed-off-by: Qian Zheng <sotux82@gmail.com>
[Jo-Philipp Wich: fix alphabetical order]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-01 17:58:39 +01:00
Mathias Kresin
2a14335d95 mvebu: fix usb port leds
All mvebu boards have three USB LEDs. The first one is used for the
USB1 port.

There are two LEDs related to the second USB port. The top (bar) LED
gets bright in case any USB device is connected to the second USB port.

If the connected device is an USB 3 (SuperSpeed) device, the small dot
LED bellow the "bar" LED gets also bright.

While at it, use a name for the USB LEDs that matches the names printed
on the case.

Fixes: FS#423, FS#425

Signed-off-by: Kabuli Chana <newtownbuild@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-01 17:56:58 +01:00
Hans Geiblinger
faea9bea44 mvebu: set fan_ctrl.sh only on mamba
Signed-off-by: Hans Geiblinger <cybrnook2002yahoo.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [cleanup]
2017-02-01 17:56:58 +01:00
Chris Blake
e9b60b587b x86: add kernel module for sp5100_tco watchdog
This change adds the sp5100_tco driver as a kernel module for the x86
target. Specifically, this can be used by the PCEngines APU2/APU3. The
reason for having this as a kernel module is to allow users to
load/unload it on demand, as the I2C interface on the APU2/APU3 will not
work while this module is loaded. More info can be found on GitHub at
https://github.com/riptidewave93/LEDE-APU2/pull/5#issuecomment-255667736

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-02-01 17:45:25 +01:00
Chris Blake
af3ae4b37c x86: Add sp5100_tco AMD patches
This adds the following patches to the x86 target:

sp5100_tco: Add AMD Mullins platform support
sp5100_tco: Add AMD Carrizo platform support
sp5100_tco: fix the device check for SB800 and later chipsets
watchdog: sp5100_tco: properly check for new register layouts

With these added, the sp5100_tco driver can then be used on newer AMD
platforms, such as the PCEngines APU2/APU3 boards.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
2017-02-01 17:45:25 +01:00
Jiri Kastner
d6a830ac7e octeon: fix mtd partitions for erlite on cmdline
erlite mtdparts exposes boot0, boot1 and eeprom regions
as read/write.
this patch adds readonly flags, so these regions can't be
modified. same as it is already for ER profile.

Signed-off-by: Jiri Kastner <cz172638@gmail.com>
2017-02-01 17:39:09 +01:00
Zhang Jingye
9c915d1e7b ipq806x: Fix wireless support for Netgear Nighthawk X4S D7800
D7800 has a simular hardware to R7800 and uses dual QCA9980 for both 2.4GHz and 5GHz band.
However there is no proper initialization for them, which causes a kernel panic due to failed firmware loading.

This patch adds d7800 to ath10k caldata extraction list.
I can get two functional wireless bands after making change to it.

Signed-off-by: Zhang Jingye <934526987@qq.com>
2017-02-01 17:37:58 +01:00
Florian Fainelli
4d561b3a30 package-ipkg: Do not fail build without base-files
If the base-files package is not selected, we will fail executing the
very first postinst script:

make[3]: Leaving directory `/local/users/fainelli/openwrt/trunk'
cp -fpR
/local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion
/local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root.orig-orion
./usr/lib/opkg/info/busybox.postinst: line 3:
/local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion/lib/functions.sh:
No such file or directory
./usr/lib/opkg/info/busybox.postinst: line 4: default_postinst: command
not found
postinst script ./usr/lib/opkg/info/busybox.postinst has failed with
exit code 127
make[2]: *** [package/install] Error 1

Check for the existence of lib/functions.sh, and if it does not exist,
just bail out gracefully.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-02-01 16:07:30 +01:00
Wilco Baan Hofman
f8d8b60f1b Fix dependency for hostapd
Signed-off-by: Wilco Baan Hofman <wilco@baanhofman.nl>
2017-02-01 16:06:58 +01:00
Kevin Darbyshire-Bryant
4cd9625dd4 iproute2: cake: update cake support
Updated cake's tc patch to match the official cake repository
formatting.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-01 16:06:24 +01:00
Kevin Darbyshire-Bryant
4f5ff0041a kmod-sched-cake: Bump to latest version
wash, mpu & some memory optimisation have now made it to the official
cake repository.

Point LEDE to the official repository.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-01 16:06:24 +01:00
Jo-Philipp Wich
d1d970e235 libtool: don't clobber host libtool infrastructure
The libtool target package stages its files into the host staging directory
and moves the libltdl library parts from there into the target staging
directory afterwards.

By doing so, the package essentially renders the host libtool infrastructure
unusable, leading to the below error in subsequent package builds:

    libtoolize: $pkgltdldir is not a directory: `.../hostpkg/share/libtool`

Prevent this problem by using a dedicated libltdl install prefix in order to
avoid overwriting and moving away preexisting files belonging to tools/libtool.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-01 16:05:52 +01:00
Jo-Philipp Wich
e5bc7bff85 build: properly pass CPP and CXX flags in HOST_MAKE_VARS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-01 16:03:57 +01:00
Alexandru Ardelean
83c9bfad1e build: introduce default HOST_MAKE_VARS for host-builds
Inspired/adapted from `package-defaults.mk` MAKE_VARS.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-02-01 16:03:56 +01:00
Alexandru Ardelean
82009d4e30 tools/cmake: remove HOST_CONFIGURE_CMD and re-distribute the args & vars
The final semantic is the same, but this is a bit more correct.

Build tested on Windows 10 (yes, there is some
Ubuntu mode for Windows 10, and I've been also building LEDE
on it for a few weeks).

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-02-01 16:03:56 +01:00
Hans Dedecker
786160cd76 odhcp6c: use LEDE_GIT in package source url
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 16:00:01 +01:00
Hans Dedecker
4d9106afa6 odhcp6c: update to git HEAD version
c13b6a0 dhcpv6: fix white space error
e9d80cc dhcpv6: trigger restart of DHCPv6 state machine when not
		receiving statefull options
c7122ec update README
419fb63 dhcpv6: server unicast option support

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:21 +01:00
Hans Dedecker
02d511818f odhcpd: use LEDE_GIT in package source url
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:21 +01:00
Hans Dedecker
036cf93edf odhcpd: update to git HEAD version
c4f9ace odhcpd: decrease default log level to LOG_INFO
a6eadd7 odhcpd: rework IPv6 interface address dump
44965f1 odhcpd: extra syslog tracing

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:21 +01:00
Hans Dedecker
cd99f3c744 odhcpd: update to git HEAD version
e447ff9 router: fix compile issue on 64 bit systems

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:20 +01:00
Hans Dedecker
ef170bff32 odhcpd: update to git HEAD version
237f1f4 router: convert syslog lifetime traces into LOG_INFO prio
da660c7 treewide: rework prio of syslog messages
0485580 ndp: code cleanup
c5040fe router: add syslog debug tracing for trouble shooting
df023ad treewide: use RELAYD_MAX_ADDRS as address array size
c8ac572 ndp: don't scan netlink attributes in case of netlink route
event

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:20 +01:00
Hans Dedecker
fe253bcb99 netifd: update to git HEAD version
650758b interface-ip: route proto config support (FS#170)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:20 +01:00
Hans Dedecker
718c201b82 base-files: add /etc/iproute2/rt_protos
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-02-01 15:53:20 +01:00
Yousong Zhou
754f474568 base-files: uppercase default hostname: LEDE
The name will appear in shell prompt and LuCI page title.  Uppercase
letters seem to be more vigorous

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-02-01 15:40:20 +01:00
Bastian Bittorf
be7480cb5a procd: update procd.sh to disallow signal-numbers, enforce signal-names
A given signal-name is now converted to the corresonding number. In general
it's good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.

A real world example is signal 10, which is BUS on ramips and USR1 on PPC.

All users of 'procd_send_signal' must change their code to reflect this.

Signed-off-by: Bastian Bittorf <bb@npl.de>
2017-02-01 15:40:20 +01:00
Sven Roederer
7c5bc827b7 openvpn: ssl-enabled variants also provide a virtual openvpn-crypto package
When relying on x.509 certs for auth and / or encryption of traffic you can't
use package openvpn-nossl.
Just have your package depend on openvpn-crypto to have SSL-encryption and
X.509-support enabled in OpenVPN. If encryption / X.509 is not a must, use
virtual packge openvpn, which is provided by all OpenVPN-variants.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
2017-02-01 15:40:20 +01:00
Kevin Darbyshire-Bryant
acebb4a990 iproute2: cake: add 'mpu' minimum packet length support
Add 'mpu' minimum length packet size parameter for scheduling/bandwidth
accounting.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-01 15:40:20 +01:00
Kevin Darbyshire-Bryant
06fca0c48b kmod-sched-cake: add 'mpu' minimum packet length support
Add 'mpu' minimum packet length for scheduling/bandwidth accounting
purposes.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-02-01 15:40:20 +01:00
Steven Honson
ff813588fd hostapd: default to wps_independent 1
Signed-off-by: Steven Honson <steven@honson.id.au>
2017-02-01 15:40:20 +01:00
Steven Honson
2f9568ac2a hostapd: expose wps_independent and ap_setup_locked as uci options
ap_setup_locked is named wps_ap_setup_locked in uci for consistency with other
wps related uci options.

Signed-off-by: Steven Honson <steven@honson.id.au>
2017-02-01 15:40:20 +01:00
Gabe Rodriguez
f9519636f5 mwlwifi: Fixes rewritten history hash and latest version
The author of the upstream mwlwifi edited the history of the previous commit.
This commit not only fixes the updated hash but also sends in the latest
commits he made to the code which are mainly testing.

Signed-off-by: Gabe Rodriguez <lifehacksback@gmail.com>
2017-02-01 15:40:20 +01:00
Hannu Nyman
d7cae5f0b4 opkg: clarify messages and errors related to downloads
Clarify opkg's messages related to downloads:

* more visible error message for package list download failure
* separate error message for signature file download error
* if wget returns 4, signal the network error more clearly
* remove '.' from end of filenames and URLs

* try signature check only if the package list was downloaded ok.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-02-01 15:40:20 +01:00
Felix Fietkau
b2cd9b80ef ubus: update to the latest version
Adds uloop related libubus fixes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 15:40:20 +01:00
Felix Fietkau
977eb2c019 ubus: update to the latest version
- Adds support for passing file descriptors in ubus invoke requests
- Fixes clearing pending timers on ubus_shutdown()
- Fixes checking the amount of written data in ubusd
- Fixes an ubusd crash when trying to subscribe to system objects

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 15:40:19 +01:00
Jo-Philipp Wich
ea43d60c18 kernel: ar8327/ar8337: disable ARL access code to avoid lockups (FS#384)
Running ar8327_get_arl_entry() early after boot leads to MDIO related system
lockups on several devices using this driver.

Since dumping the ARL table contens is an optional, uncritical feature, simply
disable the code for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-02-01 15:40:19 +01:00
Rafał Miłecki
d5b5339540 bcm53xx: fix LAN MAC address for devices that use eth2 originally
We override default Ethernet interface with eth0 which often uses random
MAC due to missing proper NVRAM entry. Fix this by manually assigning
MAC in the config.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-02-01 15:27:18 +01:00
Felix Fietkau
01888f90a0 ar71xx: add missing DEVICE_TITLE for mikrotik devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 15:00:22 +01:00
Alex Samorukov
198d73b26f ar71xx: Fix mikrotik subtarget default profile for device profile selection
Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>
2017-02-01 14:59:57 +01:00
Alex Samorukov
0780fd5ee6 ar71xx: improve Mikrotik hAP Lite device support
- remove CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
- enable jffs2 support
- fix sysupgrade

Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>
2017-02-01 14:59:52 +01:00
Thibaut VARENE
2cf64afd4e ar71xx: mark soft_config mtd part as writeable for RB-941-2nD
The soft_config partition must be writeable for rbcfg to be able to
enact changes to the routerboot configuration.
The read-only flag was a mistake in the initial patch. Removing it
brings mach-rb941.c in line with all other RB platforms.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
2017-02-01 14:59:29 +01:00
Felix Fietkau
51b6dd1aed ar71xx: fix up the kernel config for the mikrotik subtarget
Limit enabled devices to routerboards, disable all other devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 14:59:23 +01:00
Cezary Jackiewicz
3e4b00e6fa ar71xx: fix network config for Mikrotik RB411U
Mikrotik RB411U has only one ethernet port - eth0. This patch allows to create
correct config with one lan section.

Signed-off-by: Cezary Jackiewicz <cezary@eko.one.pl>
2017-02-01 14:59:17 +01:00
Thibaut VARENE
ca2a03d1f6 ar71xx: add support for RB-941-2nD
Add full support for Mikrotik RB-941-2nD (hAP lite)

Original patch by Sergey Sergeev <adron@yapic.net> and
more information is available here:
https://wiki.openwrt.org/toh/mikrotik/rb941_2nd
I updated and adapted the patch to apply cleanly to LEDE trunk
and added proper numbering for the switch ports (matching case
labels).
Tested working on actual hardware with the information
provided in the above webpage. Sysupgrade works.

Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 14:59:11 +01:00
Felix Fietkau
0656bee36b ar71xx: convert mikrotik routerboard support to UBI
Remove the wget2nand script, drop the need for manual installation,
use sysupgrade instead.

There are now two different NAND images, one for 64 MiB flashes, the
other for >= 128 MiB

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 14:58:57 +01:00
Felix Fietkau
e53e44a0ad ar71xx: create a proper default profile for the mikrotik subtarget, drop other profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-02-01 14:58:52 +01:00
Sergey Sergeev
47fa00a3d4 tools: update kernel2minor to 0.24 version
Signed-off-by: Sergey Sergeev <adron@yapic.net>
2017-02-01 14:58:36 +01:00
Mathias Kresin
b2437a02a4 base-files: don't overwrite model name set by target
The condition is always true due to the literal string followed the
-n test parameter. A model name set by target scripts always gets
overwritten this way.

Change the condition to check for an already existing destination file
as it was before 5e85ae9 ("base-files: fix error message during boot").

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-02-01 07:40:09 +01:00
Felix Fietkau
f4162bf3ca mt76: update to the latest version
Fixes DFS detection false positive issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-31 21:29:33 +01:00
Rafał Miłecki
e3849823e0 kernel: update bcma to fix devm memory leaks
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-31 14:45:52 +01:00
Felix Fietkau
5f2a1ac59a ath9k: remove the deaf rx path state check patch
This needs to be refined and reworked before we can safely leave it
enabled by default

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-31 11:45:23 +01:00
Felix Fietkau
406f85a328 mdns: update to the latest version
- fixes unaligned acccesses, causing DNS parsing issues on ARMv5
- fixes service timeout handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-31 11:25:22 +01:00
Felix Fietkau
76f1b9457d download.pl: fix detecting download errors with curl
Avoid treating error pages as successfully downloaded content

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-31 11:25:18 +01:00
Felix Fietkau
bda982b97f ramips: add missing DTS pcie node for WSR-600
Enables PCI bus and support for the MT7603 and RT5592 chips

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-31 10:29:29 +01:00
Stijn Tintel
e038c60049 qemu: rename internal crypto/aes symbols
Qemu's local AES code defines symbols that conflict with
LibreSSL/OpenSSL's libcrypto. Rename them to avoid build problems.

See upstream commit c8d70e59738e672021926c7747af8ef9dea15c82.

Fixes FS#444.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-01-30 18:49:21 +01:00
Alexandru Ardelean
4fa8f2a7a1 tools/qemu: use default host configure rule ; set appropriate vars & args
Admittedly, this is my own OCD wanting to get rid of this.

Because I tried (a while back to upgrade QEMU to a newer version),
and (during that attempt) I tried to get rid of this.

Tested on Linux & Mac.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-01-30 17:38:17 +01:00
Alexander Couzens
31b0640906 lantiq: fix unaligned access in xrx200_poll_rx()
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-01-30 10:15:33 +01:00
Sergey Sergeev
ec095b5bf3 ledtrig-netdev: don't cancel work on events for different interfaces
This fixes logic bug(in function netdev_trig_notify) introduced in
0b2991a8ed commit.
Events triggered by different interfaces were stopping work queue so it
wasn't working for tx/rx mode.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
2017-01-29 17:34:29 +01:00
Toke Høiland-Jørgensen
b8fcbbf31d kmod-sched-core: Add HTB and TBF traffic shapers
HTB and TBF are the basic traffic shapers used by sqm-scripts. Moving
these into kmod-sched-core enables sqm-scripts to downgrade its
dependency from kmod-sched to kmod-sched-core, potentially making it
useful on devices with smaller flash sizes.

This adds around 30k to the size of kmod-sched-core (20k for sch_htb.ko
and 10k for sch_tbf.ko).

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2017-01-29 15:13:21 +01:00
FUKAUMI Naoki
70a6bbd53d ar71xx: prepare jffs2 partition properly in factory.bin for BHR-4GRV2
"pad-rootfs" is required just after "append-rootfs".

Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
2017-01-28 20:32:39 +01:00
Michael Heimpold
f5e8c908bd mxs: remove stale references to obsolete kernel module packages
Commit 29443e2 (mxs: remove modules.mk, select drivers in the kernel config)
missed to remove these references, so cleanup it now.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2017-01-28 20:32:39 +01:00
Magnus Kroken
69f773daa3 openvpn: add support for various new 2.4 configuration options
Updates to openvpn.init were included in early OpenVPN 2.4 patch
series, but got lost along the way and were never merged.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2017-01-28 20:20:02 +01:00
Rafał Miłecki
d46ce9498c kernel: backport support for BCM54210E PHY
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-28 19:12:46 +01:00
Rafał Miłecki
c170848254 kernel: backport support for BCM54810 PHY
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-28 19:12:42 +01:00
Rafał Miłecki
2ee7bc0a5e kernel: backport support for BCM54612E PHY
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-28 17:34:17 +01:00
Hauke Mehrtens
f5ab082243 openssl: update to version 1.0.2k
This fixes the following security problems:
CVE-2017-3731: Truncated packet could crash via OOB read
CVE-2017-3732: BN_mod_exp may produce incorrect results on x86_64
CVE-2016-7055: Montgomery multiplication may produce incorrect results

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-01-28 13:33:22 +01:00
Mathias Kresin
66211d0781 lantiq: fix brnImage signature for the VGV7510KW22BRN images
The VGV7510KW22BRN and VGV7519BRN do not have the same brnImage
signature. It was accidentally changed with ba42c1d ("lantiq: un-macro
the image building code").

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-01-28 12:44:35 +01:00
Felix Fietkau
36db143690 ath9k: fix up a refcount imbalance error in the IRQ related fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-27 15:46:07 +01:00
Matthias Schiffer
ecc362ed04 procd: update to latest git HEAD
0f58977 init: fix /tmp permissions on zram

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-27 10:10:12 +01:00
Matthias Schiffer
a1f918cd92 base-files: fix user creation on sysupgrade with few opkg control files
If only a single opkg control file exists (which can happen with
CONFIG_CLEAN_IPKG), grep would not print the file name by default. Instead
of forcing it using -H, we just switch to -l (print only file names) and
get rid of the cut.

Add -s to suppress an error message when no control files exist.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-27 10:10:02 +01:00
Matthias Schiffer
04a5085127 include/rootfs.mk: keep Require-User lines with CONFIG_CLEAN_IPKG
Require-User is handled by /etc/uci-defaults/13_fix_group_user on first
boot, so we need to keep these when removing all opkg data with
CONFIG_CLEAN_IPKG.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2017-01-27 10:09:50 +01:00
Jo-Philipp Wich
dfe77be01f imagebuilder: properly escape single quotes in device titles
The name "Plat'Home OpenBlocks AX3" causes the imagebuilders "make info"
command to fail with:

    bash: -c: line 0: syntax error near unexpected token `('
    bash: -c: line 0: `echo;  [...]'
    Makefile:99: recipe for target '_call_info' failed

Properly escape single quotes to avoid breaking the echo commands.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-26 10:16:53 +01:00
Felix Fietkau
f9022964cf ath9k: add stability fixes for long standing hang issues (FS#13, #34, #373, #383)
The radio would stop communicating completely. This issue was easiest to
trigger on AR913x devices, e.g. the TP-Link TL-WR1043ND, but other
hardware was occasionally affected as well.

The most critical issue was a race condition in disabling/enabling IRQs
between the IRQ handler and the IRQ processing tasklet

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-25 17:28:17 +01:00
Felix Fietkau
acd1795a60 mac80211: refresh patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-25 17:28:13 +01:00
Felix Fietkau
a6f3ea5e84 Add back the commit "ath9k: Add airtime fairness scheduler"
This reverts commit c296ba834d.
According to several reports, the issues with the airtime fairness
changes are gone in current versions.
It's time to re-apply the patch now.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-25 17:28:10 +01:00
Rafał Miłecki
6b68635047 bcm53xx: disable building Linksys EA6300 V1 image
This device has 2 TRX partitions (main one and failsafe one) and Linux
may not detect them properly failing to run userspace.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-25 10:51:58 +01:00
Felix Fietkau
e9ecb228c9 x86: fix sysupgrades on disks with 4k block size
Even when the disk uses 4k blocks, the partition table still uses units
of 512 byte sectors. Always use ibs=512 for the offsets

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-25 08:14:59 +01:00
Rafał Miłecki
e9d2173921 mac80211: brcmfmac: don't use uninitialize mem for country codes
There was a bug in brcmfmac patch that could result in treating random
memory as source of country codes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-24 23:01:46 +01:00
Rafał Miłecki
81f2196bb1 mac80211: move (& update) upstream accepted brcmfmac patches
These 3 patches are now in wireless-drivers-next tree.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-24 23:01:34 +01:00
Rafał Miłecki
86b4b027cf brcm47xx: backport arch patch with Luxul devices support
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-01-24 23:01:05 +01:00
Mathias Kresin
806d3cc2c3 packages: mark packages depending on a target as nonshared
The packages can't be build as shared packages due to the unmet
dependencies.

Fixes FS#418.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-01-24 19:59:55 +01:00
Jo-Philipp Wich
f6de4a5025 sdk: explicitely remove ccache directories when packing SDK
Upon first invocation, the ccache program will create the required directory
hierarchy so there is no point in shipping these empty directories.

Removing those paths also avoids shipping dangling symlinks in case the
directories got linked elsewhere, e.g. into a shared global cache.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-24 15:31:44 +01:00
Felix Fietkau
fc366fde07 lantiq: remove CPU_TYPE:=mips32r2, it gets overwritten anyway
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:47 +01:00
Felix Fietkau
b630d525c8 x86: unify CPU_TYPE for legacy and geode
According to some reports, -march=pentium-mmx is a better choice for
older Geode CPUs than -march=geode anyway.

Bump the minimum architecture of the legacy target from i486 to
pentium-mmx. Anything older is not worth supporting anyway.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:47 +01:00
Felix Fietkau
c2ecf9c37a uml: mark as source-only
Get rid of a special case in the buildbot script

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:47 +01:00
Felix Fietkau
4d73b6b8d0 malta: mark as source-only to avoid wasting build resources
The le64 and be64 subtargets do not share a package architecture with
any other targets, so they are pretty wasteful for a development-only
target.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:47 +01:00
Felix Fietkau
0a4d20fa9c malta: move FEATURES to the target makefile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:47 +01:00
Felix Fietkau
392cccb7f4 build: remove mips16 feature flag from target makefiles
It can be implicitly derived from the MIPS32 revision support in the
kernel configuration

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:45 +01:00
Felix Fietkau
e775adead8 build: remove obsolete mips32r2 CPU_TYPE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:09 +01:00
Felix Fietkau
6193e3cdee ramips/rt288x: switch CPU_TYPE to 24kc
While rt288x only has a MIPS 4KEc processor, it implements the MIPS32r2
architecture just like the 24Kc, so the instruction set should be 100%
compatible.
Switching it to 24kc allows it to share the package architecture with a
lot of other targets instead of creating a special case, saving
buildbot resources.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:35:09 +01:00
Felix Fietkau
b36e24f39e x86: remove the xen_domu subtarget
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:30:45 +01:00
Felix Fietkau
296772f939 x86/generic: add xen DomU support
Copy the relevant config options from the xen_domu subtarget

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-24 13:30:39 +01:00
Jo-Philipp Wich
b850218584 hostapd: fix stray "out of range" shell errors in hostapd.sh
The hostapd_append_wpa_key_mgmt() procedure uses the possibly uninitialized
$ieee80211r and $ieee80211w variables in a numerical comparisation, leading
to stray "netifd: radio0 (0000): sh: out of range" errors in logread when
WPA-PSK security is enabled.

Ensure that those variables are substituted with a default value in order to
avoid emitting this (harmless) shell error.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-23 14:56:20 +01:00
Jo-Philipp Wich
ef08595c3f openvpn: let all openvpn variants provide a virtual openvpn package
Add PROVIDES:=openvpn to the default recipe in order to let all build variants
provide a virtual openvpn package.

The advantage of this approach is that downstream packages can depend on just
"openvpn" without having to require a specific flavor.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-21 23:05:54 +01:00
Kevin Darbyshire-Bryant
3a9926e40f kmod-sched-cake: fix parameter passing kernel/user space
The last two parameters passed between user space tc and kernel space
sched-cake were transposed due to a merge mistake in a parameter header
file.

As such, using a packet overhead figure was likely to set cake to wash
packet DSCP values.  Similarly, the DSCP wash flag was used as an offset
to the displayed packet overhead value.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2017-01-21 14:27:37 +01:00
Daniel Engberg
12392e5600 zlib: Update to 1.2.11
Update to 1.2.11 as suggested by upstream
Also add SF as primary source and main site as fallback

Note: SF doesn't carry the 1.2.11 update yet.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2017-01-21 14:27:23 +01:00
Jo-Philipp Wich
cfb3ef3a97 lede-keyring: bundle latest usign certificates
Includes the public usign certificates used by the 17.01.* release builds.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-20 10:11:15 +01:00
Jo-Philipp Wich
2c4d158d80 sdk: fix Git URL detection
Instead of relying on complex sed patterns that trip up make syntax rules, use
GNU Makes builtin filter function to match desired URLs.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-20 10:11:15 +01:00
Jo-Philipp Wich
cf5f7aa0b6 sdk: avoid using private repository clone urls as base repo entry
Only consider the repository origin url as valid base feed entry if it is a
git://, http:// or https:// location.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-19 20:47:52 +01:00
Felix Fietkau
4039b3eba1 lantiq: fix an ethernet stability issue triggered by receving packets during boot
Disabling ethernet during reboot (only to enable it again when the
ethernet driver attaches) can put the chip into a faulty state where it
corrupts the header of all incoming packets.

This happens if packets arrive during the time window where the core is
disabled, and it can be easily reproduced by rebooting while sending a
flood ping to the broadcast address.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-19 14:30:47 +01:00
Felix Fietkau
6538961d6a lantiq: fix spurious irq storm
Since the MIPS IRQ stack patches, lantiq devices were emitting a storm
of messages like this:

[  567.872172] Spurious IRQ: CAUSE=0x1100c300

Fix this by reworking the IRQ dispatch code

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2017-01-19 12:34:08 +01:00
Mirko Vogt
c76da77573 git-kernel: $(SUBDIR) should always be $(LINUX_VERSION)
Before SUBDIR was set to $(PATCHVER) which may
or may not include the minor version number of
the linux kernel version. Usually it doesn't.

So the git-clone'd linux kernel was packed without
the minor version number taken into account, which
broke further processing, as it expected the
extracted dir being named linux-$(LINUX_VERSION)
(=with minor version) rather than linux-$(PATCHVER)
(=without minor version).

Changing SUBDIR to $(LINUX_VERSION) creates
consistent behaviour here.

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
2017-01-19 12:34:04 +01:00
Jo-Philipp Wich
29a4a17f55 sdk: do not strip static libraries
Do not strip static libraries shipped with the SDK in order to preserve the
archive index. If we strip the index of the shipped libraries, host programs
will fail to link these libraries with errors like:

    libssl.a: error adding symbols: Archive has no index; run ranlib to add one

The error was found while investigating a Python host build failure within
the SDK environment.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-18 16:13:10 +01:00
Hans Dedecker
c71e13a81a netifd: update to git HEAD version
a057f6e device: fix DEV_OPT_SENDREDIRECTS definition

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2017-01-17 14:07:47 +01:00
Stijn Segers
2ac776ac76 curl: fix HTTPS network timeouts with OpenSSL
Backport an upstream change to fix HTTPS timeouts with OpenSSL.
Upstream curl bug #1174.

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
[Jo-Philipp Wich: reword commit message, rename patch to 001-*]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-16 19:41:08 +01:00
Jo-Philipp Wich
1e1e3ef2fb LEDE v17.01: set branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-01-16 18:56:07 +01:00
1010 changed files with 21276 additions and 40014 deletions

View File

@@ -9,7 +9,7 @@ menu "Global build settings"
config ALL_NONSHARED
bool "Select all target specific packages by default"
default ALL
default ALL || BUILDBOT
config ALL_KMODS
bool "Select all kernel module packages by default"
@@ -19,6 +19,16 @@ menu "Global build settings"
bool "Select all userspace packages by default"
default n
config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)"
default n
help
This option changes several defaults to be more suitable for
automatic builds. This includes the following changes:
- Deleting build directories after compiling (to save space)
- Enabling per-device rootfs support
...
config SIGNED_PACKAGES
bool "Cryptographically signed package lists"
default y
@@ -61,7 +71,7 @@ menu "Global build settings"
bool
prompt "Collect kernel debug information"
select KERNEL_DEBUG_INFO
default n
default BUILDBOT
help
This collects debugging symbols from the kernel and all compiled modules.
Useful for release builds, so that kernel issues can be debugged offline

View File

@@ -59,7 +59,7 @@ menuconfig DEVEL
bool "Use ccache" if DEVEL
default n
help
Compiler cache; see http://ccache.samba.org/.
Compiler cache; see https://ccache.samba.org/
config EXTERNAL_KERNEL_TREE
string "Use external kernel tree" if DEVEL

View File

@@ -201,7 +201,6 @@ menu "Target Images"
int "Serial port baud rate"
depends on GRUB_IMAGES
default 38400 if TARGET_x86_generic
default 38400 if TARGET_x86_geode
default 115200
config GRUB_BOOTOPTS

View File

@@ -1,8 +1,4 @@
src-git packages https://git.lede-project.org/feed/packages.git
src-git luci https://git.lede-project.org/project/luci.git
src-git routing https://git.lede-project.org/feed/routing.git
src-git telephony https://git.lede-project.org/feed/telephony.git
#src-git targets https://github.com/openwrt/targets.git
#src-git management https://github.com/openwrt-management/packages.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
src-git packages https://git.lede-project.org/feed/packages.git^dc558eaa296686603c1730c1aab01f3ea69d7831
src-git luci https://git.lede-project.org/project/luci.git^7f6fc1681f7becc514a58082e871f3855d3a123f
src-git routing https://git.lede-project.org/feed/routing.git^dbbad8472288498c17825303d834da3ee5030806
src-git telephony https://git.lede-project.org/feed/telephony.git^1f0fb2538ba6fc306198fe2a9a4b976d63adb304

View File

@@ -107,3 +107,7 @@ define Host/Configure/Default
$(HOST_CMAKE_SOURCE_DIR) \
)
endef
MAKE_FLAGS += \
CMAKE_COMMAND='$$(if $$(CMAKE_DISABLE_$$@),:,$(STAGING_DIR_HOST)/bin/cmake)' \
CMAKE_DISABLE_cmake_check_build_system=1

View File

@@ -67,6 +67,12 @@ HOST_CONFIGURE_ARGS = \
--localstatedir=$(HOST_BUILD_PREFIX)/var \
--sbindir=$(HOST_BUILD_PREFIX)/bin
HOST_MAKE_VARS = \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
CXXFLAGS="$(HOST_CXXFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)"
HOST_MAKE_FLAGS =
HOST_CONFIGURE_CMD = $(BASH) ./configure
@@ -89,7 +95,8 @@ define Host/Configure
endef
define Host/Compile/Default
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
+$(HOST_MAKE_VARS) \
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
$(HOST_MAKE_FLAGS) \
$(1)
endef

View File

@@ -277,7 +277,7 @@ endif
ifdef CONFIG_TARGET_ROOTFS_CPIOGZ
define Image/Build/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
( cd $(TARGET_DIR); find . | cpio -o -H newc -R root:root | gzip -9n >$(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz )
endef
endif
@@ -420,7 +420,7 @@ define Device/Build/initramfs
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
cp $$^ $$@
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS)
$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
@rm -f $$@
$$(call concat_cmd,$$(KERNEL_INITRAMFS))
endef
@@ -444,7 +444,7 @@ define Device/Build/kernel
ifdef CONFIG_IB
install: $$(KDIR_KERNEL_IMAGE)
endif
$$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS)
$$(KDIR_KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare
@rm -f $$@
$$(call concat_cmd,$$(KERNEL))
$$(if $$(KERNEL_SIZE),$$(call Build/check-size,$$(KERNEL_SIZE)))

View File

@@ -60,7 +60,7 @@ define Download/git-kernel
PROTO:=git
VERSION:=$(CONFIG_KERNEL_GIT_BRANCH)
FILE:=$(LINUX_SOURCE)
SUBDIR:=linux-$(KERNEL_PATCHVER)
SUBDIR:=linux-$(LINUX_VERSION)
OPTS:=$(KERNEL_GIT_OPTS)
endef

View File

@@ -3,10 +3,10 @@
LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .43
LINUX_VERSION-4.4 = .42
LINUX_VERSION-4.4 = .71
LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
LINUX_KERNEL_HASH-4.4.42 = 324747568e92f203e3ee5ec8b291a868f58b870f1ad214fa64aa3507ed42e878
LINUX_KERNEL_HASH-4.4.71 = 44cd5532d6df32197fd0f89e6f8c542fcfb76b52155a4d3a609ef4898522e6ab
ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

View File

@@ -95,15 +95,16 @@ define ModuleAutoLoad
$(SH_FUNC) \
export modules=; \
probe_module() { \
mods="$$$$$$$$1"; \
boot="$$$$$$$$2"; \
local mods="$$$$$$$$1"; \
local boot="$$$$$$$$2"; \
local mod; \
shift 2; \
for mod in $(sort $$$$$$$$mods); do \
for mod in $$$$$$$$mods; do \
mkdir -p $(2)/etc/modules.d; \
echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$(1); \
done; \
if [ -e $(2)/etc/modules.d/$(1) ]; then \
if [ "$$$$$$$$boot" = "1" ]; then \
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$(1) ]; then \
mkdir -p $(2)/etc/modules-boot.d; \
ln -s ../modules.d/$(1) $(2)/etc/modules-boot.d/; \
fi; \
@@ -111,16 +112,17 @@ define ModuleAutoLoad
fi; \
}; \
add_module() { \
priority="$$$$$$$$1"; \
mods="$$$$$$$$2"; \
boot="$$$$$$$$3"; \
local priority="$$$$$$$$1"; \
local mods="$$$$$$$$2"; \
local boot="$$$$$$$$3"; \
local mod; \
shift 3; \
for mod in $(sort $$$$$$$$mods); do \
for mod in $$$$$$$$mods; do \
mkdir -p $(2)/etc/modules.d; \
echo "$$$$$$$$mod" >> $(2)/etc/modules.d/$$$$$$$$priority-$(1); \
done; \
if [ -e $(2)/etc/modules.d/$$$$$$$$priority-$(1) ]; then \
if [ "$$$$$$$$boot" = "1" ]; then \
if [ "$$$$$$$$boot" = "1" -a ! -e $(2)/etc/modules-boot.d/$$$$$$$$priority-$(1) ]; then \
mkdir -p $(2)/etc/modules-boot.d; \
ln -s ../modules.d/$$$$$$$$priority-$(1) $(2)/etc/modules-boot.d/; \
fi; \
@@ -129,6 +131,7 @@ define ModuleAutoLoad
}; \
$(3) \
if [ -n "$$$$$$$$modules" ]; then \
modules="$$$$$$$$(echo "$$$$$$$$modules" | tr ' ' '\n' | sort | uniq | paste -s -d' ')"; \
mkdir -p $(2)/etc/modules.d; \
mkdir -p $(2)/CONTROL; \
echo "#!/bin/sh" > $(2)/CONTROL/postinst-pkg; \

View File

@@ -209,11 +209,13 @@ $(_endef)
( \
echo "#!/bin/sh"; \
echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
echo "default_postinst \$$$$0 \$$$$@"; \
) > postinst; \
( \
echo "#!/bin/sh"; \
echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
echo "default_prerm \$$$$0 \$$$$@"; \
) > prerm; \

View File

@@ -47,6 +47,14 @@ opkg = \
TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
ifdef CONFIG_CLEAN_IPKG
define clean_ipkg
-find $(1)/usr/lib/opkg -type f -and -not -name '*.control' | $(XARGS) rm -rf
-sed -i -ne '/^Require-User: /p' $(1)/usr/lib/opkg/info/*.control
-find $(1)/usr/lib/opkg -empty | $(XARGS) rm -rf
endef
endif
define prepare_rootfs
@if [ -d $(TOPDIR)/files ]; then \
$(call file_copy,$(TOPDIR)/files/.,$(1)); \
@@ -75,6 +83,6 @@ define prepare_rootfs
rm -f $(1)/usr/lib/opkg/lists/*
rm -f $(1)/usr/lib/opkg/info/*.postinst*
rm -f $(1)/usr/lib/opkg/info/*.prerm*
$(if $(CONFIG_CLEAN_IPKG),rm -rf $(1)/usr/lib/opkg)
$(call clean_ipkg,$(1))
$(call mklibs,$(1))
endef

View File

@@ -164,17 +164,15 @@ ifeq ($(DUMP),1)
endif
CPU_CFLAGS += -mno-branch-likely
CPU_CFLAGS_mips32 = -mips32 -mtune=mips32
CPU_CFLAGS_mips32r2 = -mips32r2 -mtune=mips32r2
CPU_CFLAGS_mips64 = -mips64 -mtune=mips64 -mabi=64
CPU_CFLAGS_24kc = -mips32r2 -mtune=24kc
CPU_CFLAGS_74kc = -mips32r2 -mtune=74kc
CPU_CFLAGS_octeon = -march=octeon -mabi=64
endif
ifeq ($(ARCH),i386)
CPU_TYPE ?= i486
CPU_CFLAGS_i486 = -march=i486
CPU_TYPE ?= pentium
CPU_CFLAGS_pentium = -march=pentium-mmx
CPU_CFLAGS_pentium4 = -march=pentium4
CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow
endif
ifneq ($(findstring arm,$(ARCH)),)
CPU_TYPE ?= xscale
@@ -259,6 +257,9 @@ ifeq ($(DUMP),1)
ifneq ($(CONFIG_VIRTIO),)
FEATURES += virtio
endif
ifneq ($(CONFIG_CPU_MIPS32_R2),)
FEATURES += mips16
endif
FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
# remove duplicates

View File

@@ -23,6 +23,7 @@ HOSTCC ?= $(CC)
export REVISION
export SOURCE_DATE_EPOCH
export GIT_CONFIG_PARAMETERS='core.autocrlf=false'
export GIT_ASKPASS:=/bin/true
export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS))
# prevent perforce from messing with the patch utility
@@ -126,7 +127,7 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
cp $(HOME)/.openwrt/defconfig .config; \
fi
$< Config.in
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; $< Config.in
prepare_kernel_conf: .config FORCE
@@ -170,7 +171,7 @@ else
DOWNLOAD_DIRS = package/download
endif
download: .config FORCE
download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
clean dirclean: .config

View File

@@ -31,16 +31,16 @@ qstrip_escape=$(subst ','\'',$(call qstrip,$(1)))
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip_escape,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),SNAPSHOT)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),17.01.2)
VERSION_CODE:=$(call qstrip_escape,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r3435-65eec8bd5f)
VERSION_NICK:=$(call qstrip_escape,$(CONFIG_VERSION_NICK))
VERSION_NICK:=$(if $(VERSION_NICK),$(VERSION_NICK),$(RELEASE))
VERSION_REPO:=$(call qstrip_escape,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/snapshots)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.lede-project.org/releases/17.01.2)
VERSION_DIST:=$(call qstrip_escape,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),LEDE)

View File

@@ -56,7 +56,7 @@ $(curdir)/merge:
$(curdir)/merge-index: $(curdir)/merge
(cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/compile $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
[ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp

View File

@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/version.mk
PKG_NAME:=base-files
PKG_RELEASE:=171
PKG_RELEASE:=173
PKG_FLAGS:=nonshared
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
@@ -57,6 +57,7 @@ define Package/base-files/conffiles
/etc/sysctl.d/local.conf
/etc/sysctl.d/
/etc/iproute2/rt_tables
/etc/iproute2/rt_protos
$(call $(TARGET)/conffiles)
endef

View File

@@ -226,7 +226,7 @@ generate_static_system() {
uci -q batch <<-EOF
delete system.@system[0]
add system system
set system.@system[-1].hostname='lede'
set system.@system[-1].hostname='LEDE'
set system.@system[-1].timezone='UTC'
set system.@system[-1].ttylogin='0'
set system.@system[-1].log_size='64'

View File

@@ -0,0 +1,18 @@
#
# Reserved protocols.
#
0 unspec
1 redirect
2 kernel
3 boot
4 static
8 gated
9 ra
10 mrt
11 zebra
12 bird
13 dnrouted
14 xorp
15 ntk
16 dhcp
42 babel

View File

@@ -2,7 +2,7 @@
. /lib/functions.sh
for file in `grep Require-User /usr/lib/opkg/info/*.control | cut -d: -f1`; do
for file in `grep -sl Require-User /usr/lib/opkg/info/*.control`; do
file="${file##*/}"
file="${file%.control}"
add_group_and_user "${file}"

View File

@@ -29,18 +29,9 @@ network_get_ipaddr() {
# 1: destination variable
# 2: interface
network_get_ipaddr6() {
local __addr
if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][0].address"; then
case "$__addr" in
*:) export "$1=${__addr}1" ;;
*) export "$1=${__addr}" ;;
esac
return 0
fi
unset $1
return 1
__network_ifstatus "$1" "$2" "['ipv6-address'][0].address" || \
__network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['local-address'].address" || \
return 1
}
# determine first IPv4 subnet of given logical interface
@@ -54,7 +45,36 @@ network_get_subnet() {
# 1: destination variable
# 2: interface
network_get_subnet6() {
__network_ifstatus "$1" "$2" "['ipv6-address'][0]['address','mask']" "/"
local __nets __addr
if network_get_subnets6 __nets "$2"; then
# Attempt to return first non-fe80::/10, non-fc::/7 range
for __addr in $__nets; do
case "$__addr" in fe[8ab]?:*|f[cd]??:*)
continue
esac
export "$1=$__addr"
return 0
done
# Attempt to return first non-fe80::/10 range
for __addr in $__nets; do
case "$__addr" in fe[8ab]?:*)
continue
esac
export "$1=$__addr"
return 0
done
# Return first item
for __addr in $__nets; do
export "$1=$__addr"
return 0
done
fi
unset "$1"
return 1
}
# determine first IPv6 prefix of given logical interface
@@ -78,14 +98,19 @@ network_get_ipaddrs6() {
local __addr
local __list=""
if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][*].address"; then
if __network_ifstatus "__addr" "$2" "['ipv6-address'][*].address"; then
for __addr in $__addr; do
case "$__addr" in
*:) __list="${__list:+$__list }${__addr}1" ;;
*) __list="${__list:+$__list }${__addr}" ;;
esac
__list="${__list:+$__list }${__addr}"
done
fi
if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address"; then
for __addr in $__addr; do
__list="${__list:+$__list }${__addr}"
done
fi
if [ -n "$__list" ]; then
export "$1=$__list"
return 0
fi
@@ -98,18 +123,13 @@ network_get_ipaddrs6() {
# 1: destination variable
# 2: interface
network_get_ipaddrs_all() {
local __addr
local __list=""
local __addr __addr6
if __network_ifstatus "__addr" "$2" "['ipv4-address','ipv6-address','ipv6-prefix-assignment'][*].address"; then
for __addr in $__addr; do
case "$__addr" in
*:) __list="${__list:+$__list }${__addr}1" ;;
*) __list="${__list:+$__list }${__addr}" ;;
esac
done
network_get_ipaddrs __addr "$2"
network_get_ipaddrs6 __addr6 "$2"
export "$1=$__list"
if [ -n "$__addr" -o -n "$__addr6" ]; then
export "$1=${__addr:+$__addr }$__addr6"
return 0
fi
@@ -128,17 +148,24 @@ network_get_subnets() {
# 1: destination variable
# 2: interface
network_get_subnets6() {
local __addr
local __addr __mask
local __list=""
if __network_ifstatus "__addr" "$2" "['ipv6-address','ipv6-prefix-assignment'][*]['address','mask']" "/ "; then
if __network_ifstatus "__addr" "$2" "['ipv6-address'][*]['address','mask']" "/ "; then
for __addr in $__addr; do
case "$__addr" in
*:/*) __list="${__list:+$__list }${__addr%/*}1/${__addr##*/}" ;;
*) __list="${__list:+$__list }${__addr}" ;;
esac
__list="${__list:+$__list }${__addr}"
done
fi
if __network_ifstatus "__addr" "$2" "['ipv6-prefix-assignment'][*]['local-address'].address" && \
__network_ifstatus "__mask" "$2" "['ipv6-prefix-assignment'][*].mask"; then
for __addr in $__addr; do
__list="${__list:+$__list }${__addr}/${__mask%% *}"
__mask="${__mask#* }"
done
fi
if [ -n "$__list" ]; then
export "$1=$__list"
return 0
fi

View File

@@ -35,7 +35,7 @@ _ucidef_set_interface() {
json_select_object "$name"
json_add_string ifname "$iface"
if ! json_is_a protocol string; then
if ! json_is_a protocol string || [ -n "$proto" ]; then
case "$proto" in
static|dhcp|none|pppoe) : ;;
*)
@@ -619,6 +619,26 @@ ucidef_add_gpio_switch() {
json_select ..
}
ucidef_set_hostname() {
local hostname="$1"
json_select_object system
json_add_string hostname "$hostname"
json_select ..
}
ucidef_set_ntpserver() {
local server
json_select_object system
json_select_array ntpserver
for server in "$@"; do
json_add_string "" "$server"
done
json_select ..
json_select ..
}
board_config_update() {
json_init
[ -f ${CFG} ] && json_load "$(cat ${CFG})"

View File

@@ -3,7 +3,7 @@ do_sysinfo_generic() {
mkdir -p /tmp/sysinfo
[ -e /tmp/sysinfo/board_name ] || \
echo "$(strings /proc/device-tree/compatible | head -1)" > /tmp/sysinfo/board_name
[ -n /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
[ ! -e /tmp/sysinfo/model -a -e /proc/device-tree/model ] && \
echo "$(cat /proc/device-tree/model)" > /tmp/sysinfo/model
}

View File

@@ -6,8 +6,8 @@
usage() {
cat <<EOF
Usage: $0 [down|detect|reload|status]
enables (default), disables or detects a wifi configuration.
Usage: $0 [config|down|reload|status]
enables (default), disables or configures devices not yet configured.
EOF
exit 1
}
@@ -145,6 +145,12 @@ wifi_reload() {
wifi_reload_legacy
}
wifi_detect_notice() {
>&2 echo "WARNING: Wifi detect is deprecated. Use wifi config instead"
>&2 echo "For more information, see commit 5f8f8a366136a07df661e31decce2458357c167a"
exit 1
}
wifi_config() {
[ ! -f /etc/config/wireless ] && touch /etc/config/wireless
@@ -229,7 +235,7 @@ scan_wifi
case "$1" in
down) wifi_updown "disable" "$2";;
detect) ;;
detect) wifi_detect_notice ;;
config) wifi_config ;;
status) ubus_wifi_cmd "status" "$2";;
reload) wifi_reload "$2";;

View File

@@ -190,7 +190,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "http://downloads.lede-project.org/snapshots"
default "http://downloads.lede-project.org/releases/17.01.2"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -262,7 +262,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES
bool
prompt "Revision code in filenames"
default y
default n
help
Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive
@@ -286,7 +286,7 @@ menuconfig PER_FEED_REPO
config PER_FEED_REPO_ADD_COMMENTED
bool "Comment out not enabled feeds"
default y
default !BUILDBOT
depends on PER_FEED_REPO && PER_FEED_REPO_ADD_DISABLED
help
Add not enabled feeds as commented out source lines to opkg.conf.

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub
PKG_VERSION:=2.02~beta3
PKG_VERSION:=2.02~rc1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub \
http://gnualpha.uib.no/grub/ \
http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \
http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/
PKG_HASH:=30ec3d555e52a702c3eef449872ef874eff28b320f40b55ffc47f70db8e5ada1
PKG_HASH:=445239e9b96d1143c194c1d37851cf4196b83701c60172e49665e9d453d80278
PKG_FIXUP:=autoreconf
HOST_BUILD_PARALLEL:=1
@@ -25,6 +25,8 @@ PKG_BUILD_DEPENDS:=grub2/host
PKG_SSP:=0
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk

View File

@@ -12,6 +12,8 @@ PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/rbcfg

View File

@@ -14,6 +14,8 @@ touch /etc/config/ubootenv
board=$(ar71xx_board_name)
case "$board" in
a40|\
a60|\
alfa-ap120c|\
all0258n|\
ap90q|\
@@ -52,8 +54,10 @@ om2p|\
om2p-hs|\
om2p-hsv2|\
om2p-hsv3|\
om2p-hsv4|\
om2p-lc|\
om2pv2)
om2pv2|\
om2pv4)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
;;
dap-2695-a1|\

View File

@@ -10,7 +10,7 @@
- "bootm 0x800000"
+ "ubi part ubi; " \
+ "ubi read 0x800000 kernel; " \
+ "bootz 0x800000"
+ "bootm 0x800000"
#define CONFIG_MTDPARTS \
- "mtdparts=orion_nand:1m(uboot),6M(uImage),-(root)\0"

View File

@@ -17,6 +17,8 @@ PKG_HASH:=466eca9cdad2c15e957fb9ce7d0b6927ecd17d85c4cc2dff37e97a3e6b209c67
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define Package/yamonenv

View File

@@ -0,0 +1,65 @@
From 183eb37e25d903ccd68cc2d8f8a37e75872c03d2 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Tue, 6 Sep 2016 17:35:35 +0100
Subject: [PATCH 1/2] Do not pass host compiler sanitization flags on to linker
testsuite.
* Makefile.am (CFLAGS_FOR_TARGET): Define as a copy of CFLAGS but
without any sanitization options.
(CXXFLAGS_FOR_TARGET): Define as a copy of CXXFLAGS but without
any sanitization options.
(check-DEJAGNU): Pass CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET
as CFLAGS and CXXFLAGS respectively.
---
ld/Makefile.am | 8 ++++++--
ld/Makefile.in | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -136,6 +136,10 @@ CXX_FOR_TARGET = ` \
fi; \
fi`
+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
+
transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@
bin_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
@@ -2075,8 +2079,8 @@ check-DEJAGNU: site.exp
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -507,6 +507,10 @@ CXX_FOR_TARGET = ` \
fi; \
fi`
+
+# Strip out sanitization options as they require special host libraries.
+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'`
info_TEXINFOS = ld.texinfo
ld_TEXINFOS = configdoc.texi
noinst_TEXINFOS = ldint.texinfo
@@ -3644,8 +3648,8 @@ check-DEJAGNU: site.exp
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \
- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \
+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \

View File

@@ -32,6 +32,11 @@ $(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA9887 devices
endef
define Package/ath10k-firmware-qca9887-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k-CT firmware for QCA9887 devices
endef
QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
QCA9887_FIRMWARE_FILE_HASH:=5966408bd41f309edb595344b8dd088c0fed212debfd91e5f3e8a55ea119c16d
@@ -58,7 +63,6 @@ $(eval $(call Download,ath10k-qca9887-board))
define Package/ath10k-firmware-qca988x
$(Package/ath10k-firmware-default)
DEFAULT:=PACKAGE_kmod-ath10k
TITLE:=ath10k firmware for QCA988x devices
SECTION:=firmware
CATEGORY:=Firmware
@@ -72,13 +76,20 @@ define Download/ct-firmware
URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
endef
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19.rc1-lede
QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
define Download/ath10k-firmware-qca988x-ct
$(call Download/ct-firmware,QCA988X,)
HASH:=ad41b29a9eebf1066f993beb571f3bd13f14ea89336ef9d4f3b31ee57e7abe54
HASH:=4112d78161a2c20e7a9490ea8d04e9f919508bafb097d88761dcce026c26f93f
endef
$(eval $(call Download,ath10k-firmware-qca988x-ct))
QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
define Download/ath10k-firmware-qca9887-ct
$(call Download/ct-firmware,QCA9887,ath10k-9887)
HASH:=18b61875726d4384de46f75dec1d42fea31aa6d66dba4940cb9d375bc98732e4
endef
$(eval $(call Download,ath10k-firmware-qca9887-ct))
QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
define Download/ath10k-firmware-qca99x0-ct
$(call Download/ct-firmware,QCA99X0,ath10k-10-4)
@@ -107,6 +118,13 @@ $(Package/ath10k-firmware-default)
CATEGORY:=Firmware
endef
define Package/ath10k-firmware-qca9887-ct
$(Package/ath10k-firmware-default)
TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
SECTION:=firmware
CATEGORY:=Firmware
endef
define Package/ath10k-firmware-qca988x-ct/description
Alternative ath10k firmware for QCA988X from Candela Technologies.
Enables IBSS and other features. See:
@@ -116,6 +134,14 @@ is un-selected since the driver will try to load firmware-5.bin before
firmware-2.bin
endef
define Package/ath10k-firmware-qca9887-ct/description
Alternative ath10k firmware for QCA9887 from Candela Technologies.
Enables IBSS and other features. See:
http://www.candelatech.com/ath10k-10.1.php
This firmware conflicts with the standard 9887 firmware, so select only
one.
endef
define Package/ath10k-firmware-qca99x0-ct/description
Alternative ath10k firmware for QCA99x0 from Candela Technologies.
Enables IBSS and other features. See:
@@ -177,18 +203,18 @@ define Download/qca99x0-board
endef
$(eval $(call Download,qca99x0-board))
QCA9984_BOARD_REV:=deb1832c56c706d0f6cb539113e09f0daaa52b5f
QCA9984_BOARD_REV:=719c0127e52bd70559e71b85ab0331790e1bf66c
QCA9984_BOARD_FILE:=board-2.bin
QCA9984_BOARD_FILE_DL:=$(QCA9984_BOARD_FILE).$(QCA9984_BOARD_REV)
QCA9984_FIRMWARE_REV:=deb1832c56c706d0f6cb539113e09f0daaa52b5f
QCA9984_FIRMWARE_FILE:=firmware-5.bin_10.4-3.3-00102
QCA9984_FIRMWARE_REV:=d43cb1188154037506e94abf3aa456cc934c6861
QCA9984_FIRMWARE_FILE:=firmware-5.bin_10.4-3.4-00072
QCA9984_FIRMWARE_FILE_DL:=$(QCA9984_FIRMWARE_FILE).$(QCA9984_FIRMWARE_REV)
define Download/ath10k-qca9984-board
URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA9984/hw1.0/
URL_FILE:=$(QCA9984_BOARD_FILE)?id=$(QCA9984_BOARD_REV)
FILE:=$(QCA9984_BOARD_FILE_DL)
HASH:=6a79ff0e8cc71549e771b41dbb7dad862d8e29da852f8aff25ce1e4bd5ea263e
HASH:=e968b214fd76d5b7859f71841ce40fbd5f47336c3ccbaf95e23f902f5e569aef
endef
$(eval $(call Download,ath10k-qca9984-board))
@@ -196,7 +222,7 @@ define Download/ath10k-qca9984-firmware
URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA9984/hw1.0/
URL_FILE:=$(QCA9984_FIRMWARE_FILE)?id=$(QCA9984_FIRMWARE_REV)
FILE:=$(QCA9984_FIRMWARE_FILE_DL)
HASH:=490ad52df76a4fa8004a3a8c21dd43bb8262dd2816df48a6408706b82491f299
HASH:=28d5834e8c4ca8fcef9ea033cd8b9b0f9ee84ecf30dbde84c9c64bf8dd9912bc
endef
$(eval $(call Download,ath10k-qca9984-firmware))
@@ -224,6 +250,16 @@ define Package/ath10k-firmware-qca988x/install
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
endef
define Package/ath10k-firmware-qca9887-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
$(INSTALL_DATA) \
$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
$(INSTALL_DATA) \
$(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
$(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
endef
define Package/ath10k-firmware-qca988x-ct/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
$(INSTALL_DATA) \
@@ -297,6 +333,7 @@ $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
$(eval $(call BuildPackage,ath10k-firmware-qca6174))
$(eval $(call BuildPackage,ath10k-firmware-qca9984))
$(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
$(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))

View File

@@ -22,6 +22,8 @@ PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAM
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define fman/Default

View File

@@ -20,6 +20,15 @@ define Package/mwifiex-pcie-firmware/install
endef
$(eval $(call BuildPackage,mwifiex-pcie-firmware))
Package/mwifiex-sdio-firmware = $(call Package/firmware-default,Marvell 8887 firmware)
define Package/mwifiex-sdio-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/mrvl
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/mrvl/sd8887_uapsta.bin \
$(1)/lib/firmware/mrvl/
endef
$(eval $(call BuildPackage,mwifiex-sdio-firmware))
Package/libertas-usb-firmware = $(call Package/firmware-default,Marvell 8388/8682 USB firmware)
define Package/libertas-usb-firmware/install
$(INSTALL_DIR) $(1)/lib/firmware/libertas

View File

@@ -20,6 +20,8 @@ PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAM
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define ppfe/Default

View File

@@ -22,6 +22,8 @@ PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAM
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README
PKG_FLAGS:=nonshared
include $(INCLUDE_DIR)/package.mk
define rcw/Default

View File

@@ -81,3 +81,32 @@
adev->channel = channel;
--- a/merge.c
+++ b/merge.c
@@ -2776,7 +2776,10 @@ void acx_irq_work(struct work_struct *wo
/* HOST_INT_SCAN_COMPLETE */
if (irqmasked & HOST_INT_SCAN_COMPLETE) {
if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
- ieee80211_scan_completed(adev->hw, false);
+ struct cfg80211_scan_info info = {
+ .aborted = false
+ };
+ ieee80211_scan_completed(adev->hw, &info);
log(L_INIT, "scan completed\n");
clear_bit(ACX_FLAG_SCANNING, &adev->flags);
}
@@ -3138,10 +3141,13 @@ int acx_op_start(struct ieee80211_hw *hw
void acx_stop(acx_device_t *adev)
{
+ struct cfg80211_scan_info info = {
+ .aborted = true
+ };
acxmem_lock_flags;
if (test_bit(ACX_FLAG_SCANNING, &adev->flags)) {
- ieee80211_scan_completed(adev->hw, true);
+ ieee80211_scan_completed(adev->hw, &info);
acx_issue_cmd(adev, ACX1xx_CMD_STOP_SCAN, NULL, 0);
clear_bit(ACX_FLAG_SCANNING, &adev->flags);
}

View File

@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2017-01-10
PKG_SOURCE_VERSION:=f5bacb83baf95e887c50c286606f4f565ef71d86
PKG_MIRROR_HASH:=845950a177ed6dd7ad3f645df79403e9980f089a09b66e74a9b88abe58dfe5e6
PKG_SOURCE_DATE:=2017-01-26
PKG_SOURCE_VERSION:=d2bc84ff277936c58231f0c2280242eda4199e63
PKG_MIRROR_HASH:=6b734b987db00b97b06faca686dcebc56fb23b93093afbb35d5cf534987269bf
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
PKG_BUILD_PARALLEL:=1
@@ -23,7 +23,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/ath10k-ct
SUBMENU:=Wireless Drivers
TITLE:=ath10k-ct driver optimized for CT ath10k firmware
DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +@KERNEL_RELAY
DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @PCI_SUPPORT +@KERNEL_RELAY +kmod-hwmon-core
FILES:=\
$(PKG_BUILD_DIR)/ath10k/ath10k_pci.ko \
$(PKG_BUILD_DIR)/ath10k/ath10k_core.ko

View File

@@ -0,0 +1,97 @@
--- a/ath10k/debug.c
+++ b/ath10k/debug.c
@@ -166,11 +166,11 @@ void ath10k_debug_print_hwfw_info(struct
ar->id.subsystem_vendor, ar->id.subsystem_device);
ath10k_info(ar, "kconfig debug %d debugfs %d tracing %d dfs %d testmode %d\n",
- config_enabled(CONFIG_ATH10K_DEBUG),
- config_enabled(CONFIG_ATH10K_DEBUGFS),
- config_enabled(CONFIG_ATH10K_TRACING),
- config_enabled(CONFIG_ATH10K_DFS_CERTIFIED),
- config_enabled(CONFIG_NL80211_TESTMODE));
+ IS_ENABLED(CONFIG_ATH10K_DEBUG),
+ IS_ENABLED(CONFIG_ATH10K_DEBUGFS),
+ IS_ENABLED(CONFIG_ATH10K_TRACING),
+ IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED),
+ IS_ENABLED(CONFIG_NL80211_TESTMODE));
firmware = ar->normal_mode_fw.fw_file.firmware;
if (firmware)
@@ -3397,7 +3397,7 @@ int ath10k_debug_register(struct ath10k
debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR,
ar->debug.debugfs_phy, ar, &fops_nf_cal_period);
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
debugfs_create_file("dfs_simulate_radar", S_IWUSR,
ar->debug.debugfs_phy, ar,
&fops_simulate_radar);
--- a/ath10k/mac.c
+++ b/ath10k/mac.c
@@ -3556,7 +3556,7 @@ static void ath10k_regd_update(struct at
regpair = ar->ath_common.regulatory.regpair;
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
nl_dfs_reg = ar->dfs_detector->region;
wmi_dfs_reg = ath10k_mac_get_dfs_region(nl_dfs_reg);
ath10k_dbg(ar, ATH10K_DBG_REGULATORY,
@@ -3590,7 +3590,7 @@ static void ath10k_reg_notifier(struct w
ath_reg_notifier_apply(wiphy, request, &ar->ath_common.regulatory);
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) {
ath10k_dbg(ar, ATH10K_DBG_REGULATORY, "reg-notifier: dfs region 0x%x\n",
request->dfs_region);
result = ar->dfs_detector->set_dfs_domain(ar->dfs_detector,
@@ -8863,7 +8863,7 @@ int ath10k_mac_register(struct ath10k *a
if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags))
ar->hw->netdev_features = NETIF_F_HW_CSUM;
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED)) {
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
/* Init ath dfs pattern detector */
ar->ath_common.debug_mask = ATH_DBG_DFS;
ar->dfs_detector = dfs_pattern_detector_init(&ar->ath_common,
@@ -8908,7 +8908,7 @@ err_unregister:
ieee80211_unregister_hw(ar->hw);
err_dfs_detector_exit:
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
ar->dfs_detector->exit(ar->dfs_detector);
err_free:
@@ -8923,7 +8923,7 @@ void ath10k_mac_unregister(struct ath10k
{
ieee80211_unregister_hw(ar->hw);
- if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
+ if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
ar->dfs_detector->exit(ar->dfs_detector);
kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
--- a/ath10k/thermal.c
+++ b/ath10k/thermal.c
@@ -192,7 +192,7 @@ int ath10k_thermal_register(struct ath10
/* Avoid linking error on devm_hwmon_device_register_with_groups, I
* guess linux/hwmon.h is missing proper stubs. */
- if (!config_enabled(CONFIG_HWMON))
+ if (!IS_ENABLED(CONFIG_HWMON))
return 0;
hwmon_dev = devm_hwmon_device_register_with_groups(ar->dev,
--- a/ath10k/wmi.c
+++ b/ath10k/wmi.c
@@ -3788,7 +3788,7 @@ void ath10k_wmi_event_dfs(struct ath10k
phyerr->tsf_timestamp, tsf, buf_len);
/* Skip event if DFS disabled */
- if (!config_enabled(CONFIG_ATH10K_DFS_CERTIFIED))
+ if (!IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED))
return;
ATH10K_DFS_STAT_INC(ar, pulses_total);

View File

@@ -0,0 +1,11 @@
--- a/ath10k/htt_rx.c
+++ b/ath10k/htt_rx.c
@@ -2490,7 +2490,7 @@ bool ath10k_htt_t2h_msg_handler(struct a
u32 freq = __le32_to_cpu(resp->chan_change.freq);
ar->tgt_oper_chan =
- __ieee80211_get_channel(ar->hw->wiphy, freq);
+ ieee80211_get_channel(ar->hw->wiphy, freq);
ath10k_dbg(ar, ATH10K_DBG_HTT,
"htt chan change freq %u phymode %s\n",
freq, ath10k_wmi_phymode_str(phymode));

View File

@@ -1,6 +1,6 @@
#
# Copyright (C) 2012-2016 OpenWrt.org
# Copyright (C) 2016 LEDE project
# Copyright (C) 2017 LEDE project
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=brcm2708-gpu-fw
PKG_VERSION:=2016-12-04
PKG_RELEASE:=d760a4ffd378c648ff5d9854e26dc868a5e1fd09
PKG_VERSION:=2017-03-03
PKG_RELEASE:=78c4983379de0537f49a97fb37ceaaf42632b28c
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
@@ -33,7 +33,7 @@ define Download/bootcode_bin
FILE:=$(RPI_FIRMWARE_FILE)-bootcode.bin
URL:=$(RPI_FIRMWARE_URL)
URL_FILE:=bootcode.bin
HASH:=a11bd31647c25712648757be75a19fa78c1df6f2409c7bf9bd202903f0421c0c
HASH:=d990031baec20fe2cd5e24d9f3d6fc34891afdb128838d010d9a0249ae29ea6b
endef
$(eval $(call Download,bootcode_bin))
@@ -41,7 +41,7 @@ define Download/fixup_dat
FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
URL:=$(RPI_FIRMWARE_URL)
URL_FILE:=fixup.dat
HASH:=93314d9e01fb53bdf4a25422de89d103cd2e779bd5e81663c658eaecd0c8018e
HASH:=38b69384f62bc7b64f17dcedc03c5582af6b4f8dfc25fe5904d4eb3181a3387b
endef
$(eval $(call Download,fixup_dat))
@@ -49,7 +49,7 @@ define Download/fixup_cd_dat
FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
URL:=$(RPI_FIRMWARE_URL)
URL_FILE:=fixup_cd.dat
HASH:=638671b81590bfdda5eac683d2025e50bb71c663e702f047ef299e23722f6cdd
HASH:=05c682ffcc74cd1356f1b9a32a7034763bfea94e5cb54eaaa2e69affc1cd33d7
endef
$(eval $(call Download,fixup_cd_dat))
@@ -57,7 +57,7 @@ define Download/start_elf
FILE:=$(RPI_FIRMWARE_FILE)-start.elf
URL:=$(RPI_FIRMWARE_URL)
URL_FILE:=start.elf
HASH:=cd60fdce9022fa1195a27f3fdf8eba9136476649006e33b72cbdb23dc3b74e90
HASH:=59b9d26b463a84f017fae186493bb54e642de6c7e0376b3cbe3375df6132edc0
endef
$(eval $(call Download,start_elf))
@@ -65,7 +65,7 @@ define Download/start_cd_elf
FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
URL:=$(RPI_FIRMWARE_URL)
URL_FILE:=start_cd.elf
HASH:=2f0cdcdaad7b9bf64f5288e206d54e007597c0c4068a5b893c02e0f4c0785ca5
HASH:=fb9aea03eb6790062c100166444bf7d2b8a6cea605bd041f905fcacefacbbae2
endef
$(eval $(call Download,start_cd_elf))

View File

@@ -1,92 +0,0 @@
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ep80579-drivers
PKG_VERSION:=1.0.34
PKG_RELEASE:=1
PKG_SOURCE:=Embedded.L.1.0.34.ADI.R100.tar.gz
PKG_SOURCE_URL:=ftp://ftp.adiengineering.com/Archive/OcracokeIsland/Drivers/Linux/1.0.34/
PKG_HASH:=f00684176a3dd1dc9ea8d96ecd1ecade5103f351ed93b9e3a5ff5f3f3295e2a9
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define KernelPackage/ep80579-drivers/Default
DEPENDS:=@TARGET_x86_ep80579
endef
define KernelPackage/ep80579-eth
$(call KernelPackage/ep80579-drivers/Default)
SUBMENU:=Network Devices
TITLE:=Intel EP80579 ethernet driver
FILES:= \
$(PKG_BUILD_DIR)/Embedded/src/GbE/gcu.ko \
$(PKG_BUILD_DIR)/Embedded/src/GbE/iegbe.ko
AUTOLOAD:=$(call AutoLoad,40,gcu iegbe)
endef
define KernelPackage/ep80579-misc
$(call KernelPackage/ep80579-drivers/Default)
SUBMENU:=Other modules
TITLE:=Misc. Intel EP80579 drivers (DMA,, gpio)
FILES:= \
$(PKG_BUILD_DIR)/Embedded/src/EDMA/dma.ko \
$(PKG_BUILD_DIR)/Embedded/src/GPIO/gpio.ko
AUTOLOAD:=$(call AutoLoad,40,gpio dma)
endef
define KernelPackage/ep80579-can
$(call KernelPackage/ep80579-drivers/Default)
SUBMENU:=Other modules
TITLE:=Intel EP80579 CAN driver
FILES:= \
$(PKG_BUILD_DIR)/Embedded/src/1588/timesync.ko \
$(PKG_BUILD_DIR)/Embedded/src/CAN/can.ko
AUTOLOAD:=$(call AutoLoad,40,timesync can)
endef
define Build/Prepare
rm -rf $(PKG_BUILD_DIR)
mkdir -p $(PKG_BUILD_DIR)
tar xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)/
$(Build/Patch)
endef
define Build/Compile/Subdir
$(MAKE) -C "$(LINUX_DIR)" \
KSRC="$(LINUX_DIR)" \
KOBJ="$(LINUX_DIR)" \
ENV_DIR=$(PKG_BUILD_DIR)/Embedded \
SUBDIRS="$(PKG_BUILD_DIR)/Embedded/src/$(1)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCHIVER="$(TARGET_CROSS)ar" \
COMPILER="$(TARGET_CC)" \
LINKER="$(TARGET_CROSS)ld" \
ARCH="$(LINUX_KARCH)"
endef
define Build/Compile
$(call Build/Compile/Subdir,GbE)
$(call Build/Compile/Subdir,CAN)
$(call Build/Compile/Subdir,EDMA)
$(call Build/Compile/Subdir,GPIO)
$(call Build/Compile/Subdir,WDT)
$(call Build/Compile/Subdir,1588)
endef
define KernelPackage/ep80579-eth/install
endef
$(eval $(call KernelPackage,ep80579-can))
$(eval $(call KernelPackage,ep80579-eth))
$(eval $(call KernelPackage,ep80579-misc))

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +0,0 @@
--- a/build_system/build_files/common.mk
+++ b/build_system/build_files/common.mk
@@ -122,7 +122,7 @@ CC=$(COMPILER)
LD=$(LINKER)
AR=$(ARCHIVER)
-CFLAGS+=-O2
+#CFLAGS+=-O2
PWD= $(shell pwd)
--- a/build_system/build_files/OS/linux_2.6.mk
+++ b/build_system/build_files/OS/linux_2.6.mk
@@ -80,7 +80,7 @@ endif
ifeq ($(OS_LEVEL), kernel_space)
-CFLAGS+=
+#CFLAGS+=
endif

View File

@@ -1,53 +0,0 @@
--- a/Embedded/src/1588/1588.c
+++ b/Embedded/src/1588/1588.c
@@ -291,7 +291,7 @@ int pci_probe(struct pci_dev *dev, const
}
- if ( request_irq(dev->irq, &timesync_isr, SA_SHIRQ, DRIVERNAME,
+ if ( request_irq(dev->irq, &timesync_isr, IRQF_SHARED, DRIVERNAME,
&g_drvr_data) )
{
printk("%s-pci_probe: irq\n", DRIVERNAME);
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -424,7 +424,7 @@ int can_open(struct inode *inode, struct
err = request_irq(
can_os->irq,
can_irq_handler,
- SA_SHIRQ,
+ IRQF_SHARED,
iminor(can_os->inode) ? CAN_PROC_1 : CAN_PROC_0,
&(g_can_os[iminor(can_os->inode)])
);
--- a/Embedded/src/EDMA/dma_linux.c
+++ b/Embedded/src/EDMA/dma_linux.c
@@ -367,7 +367,7 @@ int32_t edma_resume(struct pci_dev *dev)
return -ENODEV;
}
- if (request_irq(dev->irq, &edma_irq_handler, SA_SHIRQ,
+ if (request_irq(dev->irq, &edma_irq_handler, IRQF_SHARED,
g_char_drvr_name, dev) )
{
@@ -829,7 +829,7 @@ int32_t edma_probe(struct pci_dev * dev,
/*
* Obtain a (shared) Interrupt Request (IRQ) Line from the OS.
*/
- if (request_irq(dev->irq, &edma_irq_handler, SA_SHIRQ,
+ if (request_irq(dev->irq, &edma_irq_handler, IRQF_SHARED,
g_char_drvr_name, dev) )
{
--- a/Embedded/src/WDT/iwdt.c
+++ b/Embedded/src/WDT/iwdt.c
@@ -1461,7 +1461,7 @@ static int __init wdt_init_one(struct pc
/* Request irq only if wdt_irq is other than 0 */
if (wdt_irq) {
- if (request_irq(wdt_irq, wdt_isr, SA_INTERRUPT | SA_SHIRQ,
+ if (request_irq(wdt_irq, wdt_isr, IRQF_DISABLED | IRQF_SHARED,
"iwdt", &wdt_miscdev)) {
printk("IRQ %d is not free.\n", wdt_irq);
return -EIO;

View File

@@ -1,56 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -724,6 +724,26 @@ static void iegbe_dump_eeprom(struct ieg
kfree(data);
}
+static const struct net_device_ops iegbe_netdev_ops = {
+ .ndo_open = iegbe_open,
+ .ndo_stop = iegbe_close,
+ .ndo_start_xmit = iegbe_xmit_frame,
+ .ndo_get_stats = iegbe_get_stats,
+ .ndo_set_rx_mode = iegbe_set_rx_mode,
+ .ndo_set_mac_address = iegbe_set_mac,
+ .ndo_tx_timeout = iegbe_tx_timeout,
+ .ndo_change_mtu = iegbe_change_mtu,
+ .ndo_do_ioctl = iegbe_ioctl,
+ .ndo_validate_addr = eth_validate_addr,
+
+ .ndo_vlan_rx_register = iegbe_vlan_rx_register,
+ .ndo_vlan_rx_add_vid = iegbe_vlan_rx_add_vid,
+ .ndo_vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = iegbe_netpoll,
+#endif
+};
+
/**
* iegbe_probe - Device Initialization Routine
* @pdev: PCI device information struct
@@ -800,24 +820,11 @@ static int __devinit iegbe_probe(struct
if (!hw->hw_addr)
goto err_ioremap;
- netdev->open = &iegbe_open;
- netdev->stop = &iegbe_close;
- netdev->hard_start_xmit = &iegbe_xmit_frame;
- netdev->get_stats = &iegbe_get_stats;
- netdev->set_rx_mode = &iegbe_set_rx_mode;
- netdev->set_mac_address = &iegbe_set_mac;
- netdev->change_mtu = &iegbe_change_mtu;
- netdev->do_ioctl = &iegbe_ioctl;
+ netdev->netdev_ops = &iegbe_netdev_ops;
set_ethtool_ops(netdev);
- netdev->tx_timeout = &iegbe_tx_timeout;
netdev->watchdog_timeo = 5 * HZ;
netif_napi_add(netdev, &adapter->napi, iegbe_clean, 64);
- netdev->vlan_rx_register = iegbe_vlan_rx_register;
- netdev->vlan_rx_add_vid = iegbe_vlan_rx_add_vid;
- netdev->vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- netdev->poll_controller = iegbe_netpoll;
-#endif
+
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);

View File

@@ -1,41 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -3465,12 +3465,12 @@ static irqreturn_t iegbe_intr_msi(int ir
printk("Critical error! ICR = 0x%x\n", icr);
return IRQ_HANDLED;
}
- if (likely(netif_rx_schedule_prep(netdev, &adapter->napi))) {
+ if (likely(napi_schedule_prep(&adapter->napi))) {
adapter->total_tx_bytes = 0;
adapter->total_tx_packets = 0;
adapter->total_rx_bytes = 0;
adapter->total_rx_packets = 0;
- __netif_rx_schedule(netdev, &adapter->napi);
+ __napi_schedule(&adapter->napi);
} else
iegbe_irq_enable(adapter);
@@ -3527,12 +3527,12 @@ iegbe_intr(int irq, void *data)
E1000_WRITE_REG(&adapter->hw, IMC, ~0);
E1000_WRITE_FLUSH(&adapter->hw);
}
- if (likely(netif_rx_schedule_prep(netdev, &adapter->napi))) {
+ if (likely(napi_schedule_prep(&adapter->napi))) {
adapter->total_tx_bytes = 0;
adapter->total_tx_packets = 0;
adapter->total_rx_bytes = 0;
adapter->total_rx_packets = 0;
- __netif_rx_schedule(netdev, &adapter->napi);
+ __napi_schedule(&adapter->napi);
} else
/* this really should not happen! if it does it is basically a
* bug, but not a hard error, so enable ints and continue */
@@ -3574,7 +3574,7 @@ static int iegbe_clean(struct napi_struc
if (work_done < budget) {
if (likely(adapter->itr_setting & 3))
iegbe_set_itr(adapter);
- netif_rx_complete(poll_dev, napi);
+ napi_complete(napi);
iegbe_irq_enable(adapter);
}

View File

@@ -1,103 +0,0 @@
--- a/Embedded/src/GbE/iegbe.h
+++ b/Embedded/src/GbE/iegbe.h
@@ -316,7 +316,6 @@ struct iegbe_adapter {
int cleaned_count);
struct iegbe_rx_ring *rx_ring; /* One per active queue */
struct napi_struct napi;
- struct net_device *polling_netdev; /* One per active queue */
int num_tx_queues;
int num_rx_queues;
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -763,7 +763,7 @@ static int __devinit iegbe_probe(struct
struct iegbe_hw *hw;
static int cards_found = 0;
- int i, err, pci_using_dac;
+ int err, pci_using_dac;
u16 eeprom_data = 0;
u16 eeprom_apme_mask = E1000_EEPROM_APME;
int bars;
@@ -984,11 +984,8 @@ err_eeprom:
iegbe_phy_hw_reset(hw);
if (hw->flash_address)
iounmap(hw->flash_address);
- for (i = 0; i < adapter->num_rx_queues; i++)
- dev_put(&adapter->polling_netdev[i]);
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
- kfree(adapter->polling_netdev);
err_sw_init:
iounmap(hw->hw_addr);
err_ioremap:
@@ -1017,7 +1014,6 @@ iegbe_remove(struct pci_dev *pdev)
struct net_device *netdev = pci_get_drvdata(pdev);
struct iegbe_adapter *adapter = netdev_priv(netdev);
uint32_t manc;
- int i;
if(adapter->hw.mac_type >= iegbe_82540
&& adapter->hw.mac_type != iegbe_icp_xxxx
@@ -1030,15 +1026,11 @@ iegbe_remove(struct pci_dev *pdev)
}
unregister_netdev(netdev);
- for (i = 0x0; i < adapter->num_rx_queues; i++)
- dev_put(&adapter->polling_netdev[i]);
-
if(!iegbe_check_phy_reset_block(&adapter->hw)) {
iegbe_phy_hw_reset(&adapter->hw);
}
kfree(adapter->tx_ring);
kfree(adapter->rx_ring);
- kfree(adapter->polling_netdev);
iounmap(adapter->hw.hw_addr);
pci_release_regions(pdev);
@@ -1061,7 +1053,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
struct iegbe_hw *hw = &adapter->hw;
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;
- int i;
/* PCI config space info */
@@ -1111,11 +1102,6 @@ iegbe_sw_init(struct iegbe_adapter *adap
return -ENOMEM;
}
- for (i = 0; i < adapter->num_rx_queues; i++) {
- adapter->polling_netdev[i].priv = adapter;
- dev_hold(&adapter->polling_netdev[i]);
- set_bit(__LINK_STATE_START, &adapter->polling_netdev[i].state);
- }
spin_lock_init(&adapter->tx_queue_lock);
/*
@@ -1137,8 +1123,7 @@ iegbe_sw_init(struct iegbe_adapter *adap
* @adapter: board private structure to initialize
*
* We allocate one ring per queue at run-time since we don't know the
- * number of queues at compile-time. The polling_netdev array is
- * intended for Multiqueue, but should work fine with a single queue.
+ * number of queues at compile-time.
**/
static int __devinit
@@ -1158,15 +1143,6 @@ iegbe_alloc_queues(struct iegbe_adapter
return -ENOMEM;
}
- adapter->polling_netdev = kcalloc(adapter->num_rx_queues,
- sizeof(struct net_device),
- GFP_KERNEL);
- if (!adapter->polling_netdev) {
- kfree(adapter->tx_ring);
- kfree(adapter->rx_ring);
- return -ENOMEM;
- }
-
return E1000_SUCCESS;
}

View File

@@ -1,60 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -2161,7 +2161,8 @@ static void iegbe_set_rx_mode(struct net
{
struct iegbe_adapter *adapter = netdev_priv(netdev);
struct iegbe_hw *hw = &adapter->hw;
- struct dev_addr_list *uc_ptr;
+ struct netdev_hw_addr *ha;
+ bool use_uc = false;
struct dev_addr_list *mc_ptr;
u32 rctl;
u32 hash_value;
@@ -2187,12 +2188,11 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
}
}
- uc_ptr = NULL;
if (netdev->uc_count > rar_entries - 1) {
rctl |= E1000_RCTL_UPE;
} else if (!(netdev->flags & IFF_PROMISC)) {
rctl &= ~E1000_RCTL_UPE;
- uc_ptr = netdev->uc_list;
+ use_uc = true;
}
E1000_WRITE_REG(&adapter->hw, RCTL, rctl);
@@ -2210,13 +2210,20 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
* if there are not 14 addresses, go ahead and clear the filters
* -- with 82571 controllers only 0-13 entries are filled here
*/
+ i = 1;
+ if (use_uc)
+ list_for_each_entry(ha, &netdev->uc_list, list) {
+ if (i == rar_entries)
+ break;
+ iegbe_rar_set(hw, ha->addr, i++);
+ }
+
+ WARN_ON(i == rar_entries);
+
mc_ptr = netdev->mc_list;
- for (i = 1; i < rar_entries; i++) {
- if (uc_ptr) {
- iegbe_rar_set(hw, uc_ptr->da_addr, i);
- uc_ptr = uc_ptr->next;
- } else if (mc_ptr) {
+ for (; i < rar_entries; i++) {
+ if (mc_ptr) {
iegbe_rar_set(hw, mc_ptr->da_addr, i);
mc_ptr = mc_ptr->next;
} else {
@@ -2226,7 +2233,6 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
E1000_WRITE_FLUSH(&adapter->hw);
}
}
- WARN_ON(uc_ptr != NULL);
/* clear the old settings from the multicast hash table */

View File

@@ -1,20 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -2188,7 +2188,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
}
}
- if (netdev->uc_count > rar_entries - 1) {
+ if (netdev->uc.count > rar_entries - 1) {
rctl |= E1000_RCTL_UPE;
} else if (!(netdev->flags & IFF_PROMISC)) {
rctl &= ~E1000_RCTL_UPE;
@@ -2212,7 +2212,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
*/
i = 1;
if (use_uc)
- list_for_each_entry(ha, &netdev->uc_list, list) {
+ list_for_each_entry(ha, &netdev->uc.list, list) {
if (i == rar_entries)
break;
iegbe_rar_set(hw, ha->addr, i++);

View File

@@ -1,20 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -775,13 +775,13 @@ static int __devinit iegbe_probe(struct
if (err)
return err;
- if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
- !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) {
+ if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
+ !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
pci_using_dac = 1;
} else {
- err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+ err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (err) {
- err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
+ err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (err) {
E1000_ERR("No usable DMA configuration, "
"aborting\n");

View File

@@ -1,12 +0,0 @@
--- a/Embedded/src/GbE/iegbe_ethtool.c
+++ b/Embedded/src/GbE/iegbe_ethtool.c
@@ -944,7 +944,8 @@ iegbe_intr_test(struct iegbe_adapter *ad
*data = 0;
/* Hook up test interrupt handler just for this test */
- if(!request_irq(irq, &iegbe_test_intr, 0, netdev->name, netdev)) {
+ if(!request_irq(irq, &iegbe_test_intr, IRQF_PROBE_SHARED, netdev->name,
+ netdev)) {
shared_int = FALSE;
} else if(request_irq(irq, &iegbe_test_intr, IRQF_SHARED,
netdev->name, netdev)){

View File

@@ -1,747 +0,0 @@
--- a/Embedded/src/GbE/iegbe_oem_phy.c
+++ b/Embedded/src/GbE/iegbe_oem_phy.c
@@ -65,6 +65,10 @@ static int32_t iegbe_oem_link_m88_setup(
static int32_t iegbe_oem_set_phy_mode(struct iegbe_hw *hw);
static int32_t iegbe_oem_detect_phy(struct iegbe_hw *hw);
+static int32_t iegbe_oem_link_bcm5481_setup(struct iegbe_hw *hw);
+static int32_t bcm5481_read_18sv (struct iegbe_hw *hw, int sv, uint16_t *data);
+static int32_t oi_phy_setup (struct iegbe_hw *hw);
+
/**
* iegbe_oem_setup_link
* @hw: iegbe_hw struct containing device specific information
@@ -114,6 +118,10 @@ iegbe_oem_setup_link(struct iegbe_hw *hw
}
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ return E1000_SUCCESS;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_link_m88_setup(hw);
@@ -121,6 +129,12 @@ iegbe_oem_setup_link(struct iegbe_hw *hw
return ret_val;
}
break;
+ case BCM5481_PHY_ID:
+ ret_val = iegbe_oem_link_bcm5481_setup(hw);
+ if(ret_val) {
+ return ret_val;
+ }
+ break;
default:
DEBUGOUT("Invalid PHY ID\n");
return -E1000_ERR_PHY_TYPE;
@@ -179,6 +193,51 @@ iegbe_oem_setup_link(struct iegbe_hw *hw
#endif /* ifdef EXTERNAL_MDIO */
}
+/**
+ * iegbe_oem_link_bcm5481_setup
+ * @hw: iegbe_hw struct containing device specific information
+ *
+ * Returns E1000_SUCCESS, negative E1000 error code on failure
+ *
+ * copied verbatim from iegbe_oem_link_m88_setup
+ **/
+static int32_t
+iegbe_oem_link_bcm5481_setup(struct iegbe_hw *hw)
+{
+ int32_t ret_val;
+ uint16_t phy_data;
+
+ //DEBUGFUNC(__func__);
+
+ if(!hw)
+ return -1;
+
+ /* phy_reset_disable is set in iegbe_oem_set_phy_mode */
+ if(hw->phy_reset_disable)
+ return E1000_SUCCESS;
+
+ // Enable MDIX in extended control reg.
+ ret_val = iegbe_oem_read_phy_reg_ex(hw, BCM5481_ECTRL, &phy_data);
+ if(ret_val)
+ {
+ DEBUGOUT("Unable to read BCM5481_ECTRL register\n");
+ return ret_val;
+ }
+
+ phy_data &= ~BCM5481_ECTRL_DISMDIX;
+ ret_val = iegbe_oem_write_phy_reg_ex(hw, BCM5481_ECTRL, phy_data);
+ if(ret_val)
+ {
+ DEBUGOUT("Unable to write BCM5481_ECTRL register\n");
+ return ret_val;
+ }
+
+ ret_val = oi_phy_setup (hw);
+ if (ret_val)
+ return ret_val;
+
+ return E1000_SUCCESS;
+}
/**
* iegbe_oem_link_m88_setup
@@ -340,6 +399,11 @@ iegbe_oem_force_mdi(struct iegbe_hw *hw,
* see iegbe_phy_force_speed_duplex, which does the following for M88
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_force_mdi() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw,
@@ -415,6 +479,8 @@ iegbe_oem_phy_reset_dsp(struct iegbe_hw
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
DEBUGOUT("No DSP to reset on OEM PHY\n");
break;
default:
@@ -460,6 +526,11 @@ iegbe_oem_cleanup_after_phy_reset(struct
* see iegbe_phy_force_speed_duplex, which does the following for M88
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_cleanup_after_phy_reset() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
/*
@@ -573,6 +644,11 @@ iegbe_oem_set_phy_mode(struct iegbe_hw *
* use iegbe_set_phy_mode as example
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_set_phy_mode() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_read_eeprom(hw,
@@ -641,6 +717,19 @@ iegbe_oem_detect_phy(struct iegbe_hw *hw
}
hw->phy_type = iegbe_phy_oem;
+{
+ // If MAC2 (BCM5395 switch), manually detect the phy
+ struct iegbe_adapter *adapter;
+ uint32_t device_number;
+ adapter = (struct iegbe_adapter *) hw->back;
+ device_number = PCI_SLOT(adapter->pdev->devfn);
+ if (device_number == ICP_XXXX_MAC_2) {
+ hw->phy_id = BCM5395S_PHY_ID;
+ hw->phy_revision = 0;
+ return E1000_SUCCESS;
+ }
+}
+
ret_val = iegbe_oem_read_phy_reg_ex(hw, PHY_ID1, &phy_id_high);
if(ret_val) {
DEBUGOUT("Unable to read PHY register PHY_ID1\n");
@@ -690,6 +779,8 @@ iegbe_oem_get_tipg(struct iegbe_hw *hw)
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
phy_num = DEFAULT_ICP_XXXX_TIPG_IPGT;
break;
default:
@@ -738,6 +829,8 @@ iegbe_oem_phy_is_copper(struct iegbe_hw
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
isCopper = TRUE;
break;
default:
@@ -796,13 +889,13 @@ iegbe_oem_get_phy_dev_number(struct iegb
switch(device_number)
{
case ICP_XXXX_MAC_0:
- hw->phy_addr = 0x00;
+ hw->phy_addr = 0x01;
break;
case ICP_XXXX_MAC_1:
- hw->phy_addr = 0x01;
+ hw->phy_addr = 0x02;
break;
case ICP_XXXX_MAC_2:
- hw->phy_addr = 0x02;
+ hw->phy_addr = 0x00;
break;
default: hw->phy_addr = 0x00;
}
@@ -851,6 +944,12 @@ iegbe_oem_mii_ioctl(struct iegbe_adapter
if(!adapter || !ifr) {
return -1;
}
+
+ // If MAC2 (BCM5395 switch) then leave now
+ if ((PCI_SLOT(adapter->pdev->devfn)) == ICP_XXXX_MAC_2) {
+ return -1;
+ }
+
switch (data->reg_num) {
case PHY_CTRL:
if(mii_reg & MII_CR_POWER_DOWN) {
@@ -987,6 +1086,11 @@ void iegbe_oem_get_phy_regs(struct iegbe
* [10] = mdix mode
*/
switch (adapter->hw.phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_get_phy_regs() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
if(corrected_len > 0) {
@@ -1068,8 +1172,13 @@ iegbe_oem_phy_loopback(struct iegbe_adap
* Loopback configuration is the same for each of the supported PHYs.
*/
switch (adapter->hw.phy_id) {
+ case BCM5395S_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_phy_loopback() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
adapter->hw.autoneg = FALSE;
@@ -1182,8 +1291,14 @@ iegbe_oem_loopback_cleanup(struct iegbe_
}
switch (adapter->hw.phy_id) {
+ case BCM5395S_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_loopback_cleanup() has been called!\n");
+ return;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
default:
adapter->hw.autoneg = TRUE;
@@ -1243,6 +1358,11 @@ iegbe_oem_phy_speed_downgraded(struct ie
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ *isDowngraded = 0;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw, M88E1000_PHY_SPEC_STATUS,
@@ -1305,6 +1425,11 @@ iegbe_oem_check_polarity(struct iegbe_hw
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ *polarity = 0;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
/* return the Polarity bit in the Status register. */
@@ -1367,6 +1492,25 @@ iegbe_oem_phy_is_full_duplex(struct iegb
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ /* Always full duplex */
+ *isFD = 1;
+ break;
+
+ case BCM5481_PHY_ID:
+ ret_val = iegbe_read_phy_reg(hw, BCM5481_ASTAT, &phy_data);
+ if(ret_val) return ret_val;
+
+ switch (BCM5481_ASTAT_HCD(phy_data)) {
+ case BCM5481_ASTAT_1KBTFD:
+ case BCM5481_ASTAT_100BTXFD:
+ *isFD = 1;
+ break;
+ default:
+ *isFD = 0;
+ }
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw, M88E1000_PHY_SPEC_STATUS,
@@ -1423,6 +1567,25 @@ iegbe_oem_phy_is_speed_1000(struct iegbe
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ /* Always 1000mb */
+ *is1000 = 1;
+ break;
+
+ case BCM5481_PHY_ID:
+ ret_val = iegbe_read_phy_reg(hw, BCM5481_ASTAT, &phy_data);
+ if(ret_val) return ret_val;
+
+ switch (BCM5481_ASTAT_HCD(phy_data)) {
+ case BCM5481_ASTAT_1KBTFD:
+ case BCM5481_ASTAT_1KBTHD:
+ *is1000 = 1;
+ break;
+ default:
+ *is1000 = 0;
+ }
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw, M88E1000_PHY_SPEC_STATUS,
@@ -1478,6 +1641,25 @@ iegbe_oem_phy_is_speed_100(struct iegbe_
* see iegbe_config_mac_to_phy
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ /* Always 1000Mb, never 100mb */
+ *is100 = 0;
+ break;
+
+ case BCM5481_PHY_ID:
+ ret_val = iegbe_read_phy_reg(hw, BCM5481_ASTAT, &phy_data);
+ if(ret_val) return ret_val;
+
+ switch (BCM5481_ASTAT_HCD(phy_data)) {
+ case BCM5481_ASTAT_100BTXFD:
+ case BCM5481_ASTAT_100BTXHD:
+ *is100 = 1;
+ break;
+ default:
+ *is100 = 0;
+ }
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw,
@@ -1535,6 +1717,11 @@ iegbe_oem_phy_get_info(struct iegbe_hw *
* see iegbe_phy_m88_get_info
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_phy_get_info() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
/* The downshift status is checked only once, after link is
@@ -1636,8 +1823,13 @@ iegbe_oem_phy_hw_reset(struct iegbe_hw *
* the M88 used in truxton.
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_phy_hw_reset() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw, PHY_CTRL, &phy_data);
if(ret_val) {
DEBUGOUT("Unable to read register PHY_CTRL\n");
@@ -1699,6 +1891,8 @@ iegbe_oem_phy_init_script(struct iegbe_h
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
DEBUGOUT("Nothing to do for OEM PHY Init");
break;
default:
@@ -1735,6 +1929,11 @@ iegbe_oem_read_phy_reg_ex(struct iegbe_h
return -1;
}
+ if (hw->phy_id == BCM5395S_PHY_ID) {
+ DEBUGOUT("WARNING: iegbe_oem_read_phy_reg_ex() has been unexpectedly called!\n");
+ return -1;
+ }
+
/* call the GCU func that will read the phy
*
* Make note that the M88 phy is what'll be used on Truxton.
@@ -1782,6 +1981,11 @@ iegbe_oem_set_trans_gasket(struct iegbe_
}
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ DEBUGOUT("WARNING: An empty iegbe_oem_set_trans_gasket() has been called!\n");
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
/* Gasket set correctly for Marvell Phys, so nothing to do */
@@ -1886,6 +2090,8 @@ iegbe_oem_phy_needs_reset_with_mac(struc
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
ret_val = FALSE;
break;
default:
@@ -1935,6 +2141,8 @@ iegbe_oem_config_dsp_after_link_change(s
switch (hw->phy_id) {
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
+ case BCM5481_PHY_ID:
+ case BCM5395S_PHY_ID:
DEBUGOUT("No DSP to configure on OEM PHY");
break;
default:
@@ -1978,6 +2186,12 @@ iegbe_oem_get_cable_length(struct iegbe_
}
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ case BCM5481_PHY_ID:
+ *min_length = 0;
+ *max_length = iegbe_igp_cable_length_150;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
ret_val = iegbe_oem_read_phy_reg_ex(hw,
@@ -2061,6 +2275,23 @@ iegbe_oem_phy_is_link_up(struct iegbe_hw
*/
switch (hw->phy_id) {
+ case BCM5395S_PHY_ID:
+ /* Link always up */
+ *isUp = TRUE;
+ return E1000_SUCCESS;
+ break;
+
+ case BCM5481_PHY_ID:
+ iegbe_oem_read_phy_reg_ex(hw, BCM5481_ESTAT, &phy_data);
+ ret_val = iegbe_oem_read_phy_reg_ex(hw, BCM5481_ESTAT, &phy_data);
+ if(ret_val)
+ {
+ DEBUGOUT("Unable to read PHY register BCM5481_ESTAT\n");
+ return ret_val;
+ }
+ statusMask = BCM5481_ESTAT_LINK;
+ break;
+
case M88E1000_I_PHY_ID:
case M88E1141_E_PHY_ID:
iegbe_oem_read_phy_reg_ex(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
@@ -2092,3 +2323,210 @@ iegbe_oem_phy_is_link_up(struct iegbe_hw
#endif /* ifdef EXTERNAL_MDIO */
}
+
+
+//-----
+// Read BCM5481 expansion register
+//
+int32_t
+bcm5481_read_ex (struct iegbe_hw *hw, uint16_t reg, uint16_t *data)
+{
+ int ret;
+ uint16_t selector;
+ uint16_t reg_data;
+
+ // Get the current value of bits 15:12
+ ret = iegbe_oem_read_phy_reg_ex (hw, 0x15, &selector);
+ if (ret)
+ return ret;
+
+ // Select the expansion register
+ selector &= 0xf000;
+ selector |= (0xf << 8) | (reg);
+ iegbe_oem_write_phy_reg_ex (hw, 0x17, selector);
+
+ // Read the expansion register
+ ret = iegbe_oem_read_phy_reg_ex (hw, 0x15, &reg_data);
+
+ // De-select the expansion registers.
+ selector &= 0xf000;
+ iegbe_oem_write_phy_reg_ex (hw, 0x17, selector);
+
+ if (ret)
+ return ret;
+
+ *data = reg_data;
+ return ret;
+}
+
+//-----
+// Read reg 0x18 sub-register
+//
+static int32_t
+bcm5481_read_18sv (struct iegbe_hw *hw, int sv, uint16_t *data)
+{
+ int ret;
+ uint16_t tmp_data;
+
+ // Select reg 0x18, sv
+ tmp_data = ((sv & BCM5481_R18H_SV_MASK) << 12) | BCM5481_R18H_SV_MCTRL;
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R18H, tmp_data);
+ if(ret)
+ return ret;
+
+ // Read reg 0x18, sv
+ ret = iegbe_oem_read_phy_reg_ex (hw, BCM5481_R18H, &tmp_data);
+ if(ret)
+ return ret;
+
+ *data = tmp_data;
+ return ret;
+}
+
+//-----
+// Read reg 0x1C sub-register
+//
+int32_t
+bcm5481_read_1csv (struct iegbe_hw *hw, int sv, uint16_t *data)
+{
+ int ret;
+ uint16_t tmp_data;
+
+ // Select reg 0x1c, sv
+ tmp_data = ((sv & BCM5481_R1CH_SV_MASK) << BCM5481_R1CH_SV_SHIFT);
+
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R1CH, tmp_data);
+ if(ret)
+ return ret;
+
+ // Read reg 0x1c, sv
+ ret = iegbe_oem_read_phy_reg_ex (hw, BCM5481_R1CH, &tmp_data);
+ if(ret)
+ return ret;
+
+ *data = tmp_data;
+ return ret;
+}
+
+//-----
+// Read-modify-write a 0x1C register.
+//
+// hw - hardware access info.
+// reg - 0x1C register to modify.
+// data - bits which should be set.
+// mask - the '1' bits in this argument will be cleared in the data
+// read from 'reg' then 'data' will be or'd in and the result
+// will be written to 'reg'.
+
+int32_t
+bcm5481_rmw_1csv (struct iegbe_hw *hw, uint16_t reg, uint16_t data, uint16_t mask)
+{
+ int32_t ret;
+ uint16_t reg_data;
+
+ ret = 0;
+
+ ret = bcm5481_read_1csv (hw, reg, &reg_data);
+ if (ret)
+ {
+ DEBUGOUT("Unable to read BCM5481 1CH register\n");
+ printk (KERN_ERR "Unable to read BCM5481 1CH register [0x%x]\n", reg);
+ return ret;
+ }
+
+ reg_data &= ~mask;
+ reg_data |= (BCM5481_R1CH_WE | data);
+
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R1CH, reg_data);
+ if(ret)
+ {
+ DEBUGOUT("Unable to write BCM5481 1CH register\n");
+ printk (KERN_ERR "Unable to write BCM5481 1CH register\n");
+ return ret;
+ }
+
+ return ret;
+}
+
+int32_t
+oi_phy_setup (struct iegbe_hw *hw)
+{
+ int ret;
+ uint16_t pmii_data;
+ uint16_t mctrl_data;
+ uint16_t cacr_data;
+
+ ret = 0;
+
+ // Set low power mode via reg 0x18, sv010, bit 6
+ // Do a read-modify-write on reg 0x18, sv010 register to preserve existing bits.
+ ret = bcm5481_read_18sv (hw, BCM5481_R18H_SV_PMII, &pmii_data);
+ if (ret)
+ {
+ DEBUGOUT("Unable to read BCM5481_R18H_SV_PMII register\n");
+ printk (KERN_ERR "Unable to read BCM5481_R18H_SV_PMII register\n");
+ return ret;
+ }
+
+ // Set the LPM bit in the data just read and write back to sv010
+ // The shadow register select bits [2:0] are set by reading the sv010
+ // register.
+ pmii_data |= BCM5481_R18H_SV010_LPM;
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R18H, pmii_data);
+ if(ret)
+ {
+ DEBUGOUT("Unable to write BCM5481_R18H register\n");
+ printk (KERN_ERR "Unable to write BCM5481_R18H register\n");
+ return ret;
+ }
+
+
+ // Set the RGMII RXD to RXC skew bit in reg 0x18, sv111
+
+ if (bcm5481_read_18sv (hw, BCM5481_R18H_SV_MCTRL, &mctrl_data))
+ {
+ DEBUGOUT("Unable to read BCM5481_R18H_SV_MCTRL register\n");
+ printk (KERN_ERR "Unable to read BCM5481_R18H_SV_MCTRL register\n");
+ return ret;
+ }
+ mctrl_data |= (BCM5481_R18H_WE | BCM5481_R18H_SV111_SKEW);
+
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R18H, mctrl_data);
+ if(ret)
+ {
+ DEBUGOUT("Unable to write BCM5481_R18H register\n");
+ printk (KERN_ERR "Unable to write BCM5481_R18H register\n");
+ return ret;
+ }
+
+ // Enable RGMII transmit clock delay in reg 0x1c, sv00011
+ ret = bcm5481_read_1csv (hw, BCM5481_R1CH_CACR, &cacr_data);
+ if (ret)
+ {
+ DEBUGOUT("Unable to read BCM5481_R1CH_CACR register\n");
+ printk (KERN_ERR "Unable to read BCM5481_R1CH_CACR register\n");
+ return ret;
+ }
+
+ cacr_data |= (BCM5481_R1CH_WE | BCM5481_R1CH_CACR_TCD);
+
+ ret = iegbe_oem_write_phy_reg_ex (hw, BCM5481_R1CH, cacr_data);
+ if(ret)
+ {
+ DEBUGOUT("Unable to write BCM5481_R1CH register\n");
+ printk (KERN_ERR "Unable to write BCM5481_R1CH register\n");
+ return ret;
+ }
+
+ // Enable dual link speed indication (0x1c, sv 00010, bit 2)
+ ret = bcm5481_rmw_1csv (hw, BCM5481_R1CH_SC1, BCM5481_R1CH_SC1_LINK, BCM5481_R1CH_SC1_LINK);
+ if (ret)
+ return ret;
+
+ // Enable link and activity on ACTIVITY LED (0x1c, sv 01001, bit 4=1, bit 3=0)
+ ret = bcm5481_rmw_1csv (hw, BCM5481_R1CH_LCTRL, BCM5481_R1CH_LCTRL_ALEN, BCM5481_R1CH_LCTRL_ALEN | BCM5481_R1CH_LCTRL_AEN);
+ if (ret)
+ return ret;
+
+ return ret;
+}
--- a/Embedded/src/GbE/iegbe_oem_phy.h
+++ b/Embedded/src/GbE/iegbe_oem_phy.h
@@ -95,6 +95,8 @@ int32_t iegbe_oem_phy_is_link_up(struct
#define DEFAULT_ICP_XXXX_TIPG_IPGT 8 /* Inter Packet Gap Transmit Time */
#define ICP_XXXX_TIPG_IPGT_MASK 0x000003FFUL
+#define BCM5481_PHY_ID 0x0143BCA0
+#define BCM5395S_PHY_ID 0x0143BCF0
/* Miscellaneous defines */
#ifdef IEGBE_10_100_ONLY
@@ -103,5 +105,65 @@ int32_t iegbe_oem_phy_is_link_up(struct
#define ICP_XXXX_AUTONEG_ADV_DEFAULT 0x2F
#endif
+/* BCM5481 specifics */
+
+#define BCM5481_ECTRL (0x10)
+#define BCM5481_ESTAT (0x11)
+#define BCM5481_RXERR (0x12)
+#define BCM5481_EXPRW (0x15)
+#define BCM5481_EXPACC (0x17)
+#define BCM5481_ASTAT (0x19)
+#define BCM5481_R18H (0x18)
+#define BCM5481_R1CH (0x1c)
+
+/* indirect register access via register 18h */
+
+#define BCM5481_R18H_SV_MASK (7) // Mask for SV bits.
+#define BCM5481_R18H_SV_ACTRL (0) // SV000 Aux. control
+#define BCM5481_R18H_SV_10BT (1) // SV001 10Base-T
+#define BCM5481_R18H_SV_PMII (2) // SV010 Power/MII control
+#define BCM5481_R18H_SV_MTEST (4) // SV100 Misc. test
+#define BCM5481_R18H_SV_MCTRL (7) // SV111 Misc. control
+
+#define BCM5481_R18H_SV001_POL (1 << 13) // Polarity
+#define BCM5481_R18H_SV010_LPM (1 << 6)
+#define BCM5481_R18H_SV111_SKEW (1 << 8)
+#define BCM5481_R18H_WE (1 << 15) // Write enable
+
+// 0x1c registers
+#define BCM5481_R1CH_SV_SHIFT (10)
+#define BCM5481_R1CH_SV_MASK (0x1f)
+#define BCM5481_R1CH_SC1 (0x02) // sv00010 Spare control 1
+#define BCM5481_R1CH_CACR (0x03) // sv00011 Clock alignment control
+#define BCM5481_R1CH_LCTRL (0x09) // sv01001 LED control
+#define BCM5481_R1CH_LEDS1 (0x0d) // sv01101 LED selector 1
+
+// 0x1c common
+#define BCM5481_R1CH_WE (1 << 15) // Write enable
+
+// 0x1c, sv 00010
+#define BCM5481_R1CH_SC1_LINK (1 << 2) // sv00010 Linkspeed
+
+// 0x1c, sv 00011
+#define BCM5481_R1CH_CACR_TCD (1 << 9) // sv00011 RGMII tx clock delay
+
+// 0x1c, sv 01001
+#define BCM5481_R1CH_LCTRL_ALEN (1 << 4) // Activity/Link enable on ACTIVITY LED
+#define BCM5481_R1CH_LCTRL_AEN (1 << 3) // Activity enable on ACTIVITY LED
+
+#define BCM5481_ECTRL_DISMDIX (1 <<14)
+
+#define BCM5481_MCTRL_AUTOMDIX (1 <<9)
+
+#define BCM5481_ESTAT_LINK (1 << 8)
+
+#define BCM5481_ASTAT_ANC (1 << 15)
+#define BCM5481_ASTAT_ANHCD (7 << 8)
+#define BCM5481_ASTAT_HCD(x) ((x >> 8) & 7)
+#define BCM5481_ASTAT_1KBTFD (0x7)
+#define BCM5481_ASTAT_1KBTHD (0x6)
+#define BCM5481_ASTAT_100BTXFD (0x5)
+#define BCM5481_ASTAT_100BTXHD (0x3)
+
#endif /* ifndef _IEGBE_OEM_PHY_H_ */

View File

@@ -1,11 +0,0 @@
--- a/Embedded/src/CAN/icp_can_user.h
+++ b/Embedded/src/CAN/icp_can_user.h
@@ -63,6 +63,8 @@
#ifndef __ICP_CAN_USER_H__
#define __ICP_CAN_USER_H__
+#include <linux/ioctl.h>
+
/*****************************************************************************
* Device IO control codes.
*****************************************************************************/

View File

@@ -1,11 +0,0 @@
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -70,6 +70,8 @@
#include "can_main.h"
#include "can_ioctl.h"
+#include <linux/fs.h>
+
MODULE_AUTHOR("Intel(R) Corporation");
MODULE_DESCRIPTION("Controller Area Network Driver");

View File

@@ -1,23 +0,0 @@
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -654,7 +654,7 @@ int can_dev_io(struct inode *inode, stru
/*****************************************************************************
* Interrupt handler.
*****************************************************************************/
-irqreturn_t can_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t can_irq_handler(int irq, void *dev_id)
{
can_os_t *can_os = (can_os_t *) dev_id;
unsigned int int_status;
--- a/Embedded/src/CAN/can_main.h
+++ b/Embedded/src/CAN/can_main.h
@@ -165,8 +165,7 @@ int can_dev_io(
irqreturn_t can_irq_handler(
int irq,
- void *dev_id,
- struct pt_regs *regs);
+ void *dev_id);
void can_tasklet(
unsigned long arg

View File

@@ -1,40 +0,0 @@
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -214,8 +214,8 @@ int can_pci_probe(struct pci_dev *dev, c
spin_lock_init(&(g_can_os[can_num].int_spinlock));
spin_lock_init(&(g_can_os[can_num].open_spinlock));
- dev->dev.driver_data = (void *) &(g_can_os[can_num]);
- if (!dev->dev.driver_data)
+ dev_set_drvdata(&dev->dev, (void *) &(g_can_os[can_num]));
+ if (!dev_get_drvdata(&dev->dev))
{
printk("Couldn't create CAN device %d. Exiting.\n",
dev->device);
@@ -237,7 +237,7 @@ int can_pci_probe(struct pci_dev *dev, c
*****************************************************************************/
void can_pci_remove(struct pci_dev *dev)
{
- can_os_t *can_os = dev->dev.driver_data;
+ can_os_t *can_os = dev_get_drvdata(&dev->dev);
iounmap(can_os->pci_remap);
icp_can_destroy(can_os->can);
@@ -251,7 +251,7 @@ int can_pci_suspend(struct pci_dev *dev,
{
unsigned int i;
unsigned int int_status;
- can_os_t *can_os = dev->dev.driver_data;
+ can_os_t *can_os = dev_get_drvdata(&dev->dev);
int err;
/* Indicate that we are suspending */
@@ -322,7 +322,7 @@ int can_pci_suspend(struct pci_dev *dev,
int can_pci_resume(struct pci_dev *dev)
{
unsigned int i;
- can_os_t *can_os = dev->dev.driver_data;
+ can_os_t *can_os = dev_get_drvdata(&dev->dev);
/* Restore PCI CFG space */
pci_restore_state(dev);

View File

@@ -1,59 +0,0 @@
--- a/Embedded/src/WDT/iwdt.c
+++ b/Embedded/src/WDT/iwdt.c
@@ -180,19 +180,19 @@ MODULE_PARM_DESC(wdt_scale, "Intel WDT s
module_param(wdt_intr_type, byte, WDT_INT_TYPE_IRQ);
MODULE_PARM_DESC(wdt_intr_type, "Intel WDT interrupt type (default SERIRQ).");
-module_param(wdt_margin1, uint, TIMER_MARGIN);
+module_param(wdt_margin1, uint, 0);
MODULE_PARM_DESC(wdt_margin1, "First stage Intel WDT timeout in steps of 1 ms by default.");
-module_param(wdt_margin2, uint, TIMER_MARGIN);
+module_param(wdt_margin2, uint, 0);
MODULE_PARM_DESC(wdt_margin2, "Second stage Intel WDT timeout in steps of 1 ms by default.");
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Intel WDT can't be stopped once started (default=0)");
-module_param(wdt_index_port, int, 0x4E);
+module_param(wdt_index_port, int, 0);
MODULE_PARM_DESC(wdt_index_port, "WDT Index Port (default 0x4e)");
-module_param(wdt_data_port, int, 0x4E);
+module_param(wdt_data_port, int, 0);
MODULE_PARM_DESC(wdt_data_port, "WDT Data Port (default 0x4f)");
static int wdt_get_iobase(struct pci_dev *dev, u16 *iobase, int *irq);
@@ -218,7 +218,7 @@ static ssize_t wdt_write(struct file *fi
size_t count, loff_t * pos);
static int wdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
-static irqreturn_t wdt_isr(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t wdt_isr(int irq, void *dev_id);
static void __exit wdt_cleanup(void);
static int __init wdt_init(void);
static int __init wdt_init_one(struct pci_dev *dev,
@@ -255,7 +255,7 @@ static struct pci_driver wdt_driver = {
name: "iwdt",
id_table: lpc_pci_tbl,
probe: wdt_init_one,
- remove: __devexit(wdt_remove_one),
+ remove: __devexit_p(wdt_remove_one),
suspend: wdt_pci_suspend,
resume: wdt_pci_resume,
};
@@ -1393,12 +1393,12 @@ static int wdt_ioctl(struct inode *inode
/*
* Function Name: wdt_isr()
- * Parameter: int irq - irq number, void *dev_id, struct pt_regs *regs
+ * Parameter: int irq - irq number, void *dev_id
* Return Value:: IRQ_NONE - if the interrupt is not for wdt.
* IRQ_HANDLED - if it is for wdt.
* Description: This is the interrupt service routine of the WDT.
*/
-static irqreturn_t wdt_isr(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t wdt_isr(int irq, void *dev_id)
{
u8 val;

View File

@@ -1,22 +0,0 @@
--- a/Embedded/src/EDMA/dma_linux.c
+++ b/Embedded/src/EDMA/dma_linux.c
@@ -149,8 +149,7 @@ int32_t edma_suspend (struct pci_dev *de
int32_t edma_resume(struct pci_dev *dev);
int32_t initialize_edma_device(struct edma_device *device);
-static irqreturn_t edma_irq_handler(int32_t irq, void * dev_id,
- struct pt_regs * regs);
+static irqreturn_t edma_irq_handler(int32_t irq, void * dev_id);
/* Prototypes - Misc. */
@@ -429,8 +428,7 @@ int32_t edma_release(struct inode * inod
* Return Values: HANDLED = 1, NOT_HANDLED = 0
*****************************************************************************/
-static irqreturn_t edma_irq_handler(int32_t irq, void * dev_id,
- struct pt_regs * regs)
+static irqreturn_t edma_irq_handler(int32_t irq, void * dev_id)
{
uint32_t clear_bits;

View File

@@ -1,22 +0,0 @@
--- a/Embedded/src/1588/1588.c
+++ b/Embedded/src/1588/1588.c
@@ -631,7 +631,7 @@ int restore_interrupts(void)
IRQ_NONE => this device did not interrupt
******************************************************************************/
-irqreturn_t timesync_isr(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t timesync_isr(int irq, void *dev_id)
{
if ( !ixTimeSyncAccEventAmmsFlagGet() && !ixTimeSyncAccEventAsmsFlagGet()&&
!ixTimeSyncAccEventAtmFlagGet() && !ixTimeSyncAccEventPpsmFlagGet()&&
--- a/Embedded/src/1588/1588.h
+++ b/Embedded/src/1588/1588.h
@@ -128,7 +128,7 @@ int pci_suspend(struct pci_dev *dev, pm_
int pci_resume(struct pci_dev *dev);
int pci_probe(struct pci_dev *dev, const struct pci_device_id *id);
void pci_remove(struct pci_dev *dev);
-irqreturn_t timesync_isr(int irq, void *dev_id, struct pt_regs *regs);
+irqreturn_t timesync_isr(int irq, void *dev_id);
// private functions
int save_reg_state(void);

View File

@@ -1,22 +0,0 @@
--- a/Embedded/src/CAN/can_main.h
+++ b/Embedded/src/CAN/can_main.h
@@ -65,7 +65,7 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
-#include <asm/semaphore.h>
+#include <linux/semaphore.h>
#include <linux/spinlock.h>
#include <linux/cdev.h>
#include <asm/uaccess.h>
--- a/Embedded/src/EDMA/dma_linux.c
+++ b/Embedded/src/EDMA/dma_linux.c
@@ -87,7 +87,7 @@
#include <linux/fcntl.h> /* O_ACCMODE */
#include <asm/system.h> /* cli, *_flags */
#include <asm/uaccess.h> /* copy_to_user */
-#include <asm/semaphore.h>
+#include <linux/semaphore.h>
#include <asm/io.h> /* inb(), outb() */
#include <linux/kmod.h>
#include <linux/ioport.h> /* request_region */

View File

@@ -1,30 +0,0 @@
--- a/Embedded/src/1588/1588.c
+++ b/Embedded/src/1588/1588.c
@@ -72,6 +72,7 @@
*
****************************************************************************/
+#include <linux/sched.h>
#include "1588.h"
MODULE_AUTHOR("Intel(R) Corporation");
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -68,6 +68,7 @@
*
**************************************************************************/
+#include <linux/sched.h>
#include "can_main.h"
#include "can_ioctl.h"
#include <linux/fs.h>
--- a/Embedded/src/WDT/iwdt.c
+++ b/Embedded/src/WDT/iwdt.c
@@ -137,6 +137,7 @@
#include <linux/watchdog.h>
#include <linux/miscdevice.h>
#include <linux/interrupt.h>
+#include <linux/sched.h>
#include "iwdt.h"
MODULE_AUTHOR("Intel(R) Corporation");

View File

@@ -1,31 +0,0 @@
--- a/Embedded/src/GbE/kcompat.h
+++ b/Embedded/src/GbE/kcompat.h
@@ -46,12 +46,6 @@ GPL LICENSE SUMMARY
#include <linux/sched.h>
#include <asm/io.h>
-#ifndef IRQ_HANDLED
-#define irqreturn_t void
-#define IRQ_HANDLED
-#define IRQ_NONE
-#endif
-
#ifndef SET_NETDEV_DEV
#define SET_NETDEV_DEV(net, pdev)
#endif
@@ -748,6 +742,15 @@ extern void dump_stack(void);
#endif /* 2.4.24 */
+/*****************************************************************************/
+#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) )
+#ifndef IRQ_HANDLED
+#define irqreturn_t void
+#define IRQ_HANDLED
+#define IRQ_NONE
+#endif
+#endif /* < 2.6.30 */
+
#endif /* _KCOMPAT_H_ */

View File

@@ -1,11 +0,0 @@
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -3534,7 +3534,7 @@ static int iegbe_clean(struct napi_struc
int tx_cleaned = 0, work_done = 0;
/* Must NOT use netdev_priv macro here. */
- adapter = poll_dev->priv;
+ adapter = netdev_priv(poll_dev);
/* iegbe_clean is called per-cpu. This lock protects
* tx_ring[0] from being cleaned by multiple cpus

View File

@@ -1,91 +0,0 @@
--- a/Embedded/src/GbE/Makefile
+++ b/Embedded/src/GbE/Makefile
@@ -60,19 +60,19 @@ GBE_NAME = iegbe
GCU_NAME = gcu
VERSION_FILE := $(KSRC)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KSRC)/include/generated/autoconf.h
ifeq (,$(wildcard $(VERSION_FILE)))
$(error Linux kernel source not configured - missing version.h)
endif
ifeq (,$(wildcard $(CONFIG_FILE)))
- $(error Linux kernel source not configured - missing autoconf.h)
+ $(error Linux kernel source not configured - missing autoconf.h)
endif
ifeq (,$(wildcard $(UTS_REL_FILE)))
- $(error Linux kernel source not configured - missing utsrelease.h)
+ $(error Linux kernel source not configured - missing utsrelease.h)
endif
# set the install path
--- a/Embedded/src/1588/Makefile
+++ b/Embedded/src/1588/Makefile
@@ -97,8 +97,8 @@ OUTPUT_PATH ?= /
EXTRA_LDFLAGS += -whole-archive
VERSION_FILE := $(KOBJ)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h
# as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h
--- a/Embedded/src/CAN/Makefile
+++ b/Embedded/src/CAN/Makefile
@@ -100,8 +100,8 @@ OUTPUT_PATH ?= /
EXTRA_LDFLAGS += -whole-archive
VERSION_FILE := $(KOBJ)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h
# as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h
--- a/Embedded/src/EDMA/Makefile
+++ b/Embedded/src/EDMA/Makefile
@@ -114,8 +114,8 @@ OUTPUT_PATH ?= /
EXTRA_LDFLAGS += -whole-archive
VERSION_FILE := $(KOBJ)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h
# as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h
--- a/Embedded/src/GPIO/Makefile
+++ b/Embedded/src/GPIO/Makefile
@@ -97,8 +97,8 @@ OUTPUT_PATH ?= /
EXTRA_LDFLAGS += -whole-archive
VERSION_FILE := $(KOBJ)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h
# as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h
--- a/Embedded/src/WDT/Makefile
+++ b/Embedded/src/WDT/Makefile
@@ -99,8 +99,8 @@ OUTPUT_PATH ?= /
EXTRA_LDFLAGS += -whole-archive
VERSION_FILE := $(KOBJ)/include/linux/version.h
-UTS_REL_FILE := $(KSRC)/include/linux/utsrelease.h
-CONFIG_FILE := $(KOBJ)/include/linux/autoconf.h
+UTS_REL_FILE := $(KSRC)/include/generated/utsrelease.h
+CONFIG_FILE := $(KOBJ)/include/generated/autoconf.h
# as of 2.6.16, kernel define UTS_RELEASE has been moved to utsrelease.h

View File

@@ -1,392 +0,0 @@
--- a/Embedded/src/GbE/kcompat.h
+++ b/Embedded/src/GbE/kcompat.h
@@ -590,6 +590,10 @@ static inline void _kc_synchronize_irq()
#define ETHTOOL_OPS_COMPAT
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#define HAVE_NETIF_MSG 1
+#endif
+
#ifndef HAVE_NETIF_MSG
#define HAVE_NETIF_MSG 1
enum {
--- a/Embedded/src/GbE/iegbe_main.c
+++ b/Embedded/src/GbE/iegbe_main.c
@@ -159,9 +159,9 @@ static void iegbe_smartspeed(struct iegb
static inline int iegbe_82547_fifo_workaround(struct iegbe_adapter *adapter,
struct sk_buff *skb);
-static void iegbe_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp);
-static void iegbe_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
-static void iegbe_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
+static bool iegbe_vlan_used(struct iegbe_adapter *adapter);
+static int iegbe_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
+static int iegbe_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
static void iegbe_restore_vlan(struct iegbe_adapter *adapter);
static int iegbe_notify_reboot(struct notifier_block *,
@@ -324,8 +324,8 @@ static void iegbe_update_mng_vlan(struct
struct net_device *netdev = adapter->netdev;
u16 vid = hw->mng_cookie.vlan_id;
u16 old_vid = adapter->mng_vlan_id;
- if (adapter->vlgrp) {
- if (!vlan_group_get_device(adapter->vlgrp, vid)) {
+ if (iegbe_vlan_used(adapter)) {
+ if (!test_bit(old_vid, adapter->active_vlans)) {
if (hw->mng_cookie.status &
E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) {
iegbe_vlan_rx_add_vid(netdev, vid);
@@ -335,7 +335,7 @@ static void iegbe_update_mng_vlan(struct
if ((old_vid != (u16)E1000_MNG_VLAN_NONE) &&
(vid != old_vid) &&
- !vlan_group_get_device(adapter->vlgrp, old_vid))
+ !test_bit(old_vid, adapter->active_vlans))
iegbe_vlan_rx_kill_vid(netdev, old_vid);
} else
adapter->mng_vlan_id = vid;
@@ -736,7 +736,6 @@ static const struct net_device_ops iegbe
.ndo_do_ioctl = iegbe_ioctl,
.ndo_validate_addr = eth_validate_addr,
- .ndo_vlan_rx_register = iegbe_vlan_rx_register,
.ndo_vlan_rx_add_vid = iegbe_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = iegbe_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -767,7 +766,6 @@ static int __devinit iegbe_probe(struct
u16 eeprom_data = 0;
u16 eeprom_apme_mask = E1000_EEPROM_APME;
int bars;
- DECLARE_MAC_BUF(mac);
bars = pci_select_bars(pdev, IORESOURCE_MEM);
err = pci_enable_device(pdev);
@@ -1247,8 +1245,7 @@ static int iegbe_close(struct net_device
if ((hw->mng_cookie.status &
E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) &&
- !(adapter->vlgrp &&
- vlan_group_get_device(adapter->vlgrp, adapter->mng_vlan_id))) {
+ !test_bit(adapter->mng_vlan_id, adapter->active_vlans)) {
iegbe_vlan_rx_kill_vid(netdev, adapter->mng_vlan_id);
}
return 0;
@@ -2163,11 +2160,13 @@ static void iegbe_set_rx_mode(struct net
struct iegbe_hw *hw = &adapter->hw;
struct netdev_hw_addr *ha;
bool use_uc = false;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
struct dev_addr_list *mc_ptr;
- u32 rctl;
u32 hash_value;
- int i, rar_entries = E1000_RAR_ENTRIES;
int mta_reg_count = E1000_NUM_MTA_REGISTERS;
+#endif
+ u32 rctl;
+ int i, rar_entries = E1000_RAR_ENTRIES;
/* reserve RAR[14] for LAA over-write work-around */
if (hw->mac_type == iegbe_82571)
@@ -2220,6 +2219,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
WARN_ON(i == rar_entries);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
mc_ptr = netdev->mc_list;
for (; i < rar_entries; i++) {
@@ -2247,6 +2247,7 @@ int mta_reg_count = E1000_NUM_MTA_REGIST
hash_value = iegbe_hash_mc_addr(hw, mc_ptr->da_addr);
iegbe_mta_set(hw, hash_value);
}
+#endif
if (hw->mac_type == iegbe_82542_rev2_0)
iegbe_leave_82542_rst(adapter);
@@ -2821,14 +2822,14 @@ static int iegbe_tx_map(struct iegbe_ada
* Avoid terminating buffers within evenly-aligned
* dwords. */
if(unlikely(adapter->pcix_82544 &&
- !((unsigned long)(frag->page+offset+size-1) & 4) &&
+ !((unsigned long)(frag->page.p+offset+size-1) & 4) &&
size > 4))
size -= 4;
buffer_info->length = size;
buffer_info->dma =
pci_map_page(adapter->pdev,
- frag->page,
+ frag->page.p,
offset,
size,
PCI_DMA_TODEVICE);
@@ -3131,7 +3132,7 @@ static int iegbe_xmit_frame(struct sk_bu
}
}
- if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) {
+ if (unlikely(iegbe_vlan_used(adapter) && vlan_tx_tag_present(skb))) {
tx_flags |= E1000_TX_FLAGS_VLAN;
tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
}
@@ -3832,10 +3833,12 @@ static bool iegbe_clean_rx_irq(struct ie
skb->protocol = eth_type_trans(skb, netdev);
- if (unlikely(adapter->vlgrp &&
+ if (unlikely(iegbe_vlan_used(adapter) &&
(status & E1000_RXD_STAT_VP))) {
- vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
- le16_to_cpu(rx_desc->special));
+ u16 vid;
+
+ vid = le16_to_cpu(rx_desc->special);
+ __vlan_hwaccel_put_tag(skb, vid);
} else {
netif_receive_skb(skb);
}
@@ -3986,9 +3989,10 @@ copydone:
cpu_to_le16(E1000_RXDPS_HDRSTAT_HDRSP)))
adapter->rx_hdr_split++;
- if(unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) {
- vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
- le16_to_cpu(rx_desc->wb.middle.vlan));
+ if(unlikely(iegbe_vlan_used(adapter) && (staterr & E1000_RXD_STAT_VP))) {
+ u16 vid;
+ vid = le16_to_cpu(rx_desc->wb.middle.vlan);
+ __vlan_hwaccel_put_tag(skb, vid);
} else {
netif_receive_skb(skb);
}
@@ -4496,17 +4500,25 @@ iegbe_io_write(struct iegbe_hw *hw, unsi
outl(value, port);
}
-static void iegbe_vlan_rx_register(struct net_device *netdev,
- struct vlan_group *grp)
+static bool iegbe_vlan_used(struct iegbe_adapter *adapter)
+{
+ u16 vid;
+
+ for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
+ return true;
+
+ return false;
+}
+
+static void iegbe_vlan_mode(struct net_device *netdev, bool vlan_on)
{
struct iegbe_adapter *adapter = netdev_priv(netdev);
uint32_t ctrl, rctl;
if (!test_bit(__E1000_DOWN, &adapter->flags))
iegbe_irq_disable(adapter);
- adapter->vlgrp = grp;
- if(grp) {
+ if(vlan_on) {
/* enable VLAN tag insert/strip */
ctrl = E1000_READ_REG(&adapter->hw, CTRL);
ctrl |= E1000_CTRL_VME;
@@ -4538,30 +4550,37 @@ static void iegbe_vlan_rx_register(struc
iegbe_irq_enable(adapter);
}
-static void iegbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
+static int iegbe_vlan_rx_add_vid(struct net_device *netdev, u16 vid)
{
struct iegbe_adapter *adapter = netdev_priv(netdev);
uint32_t vfta, index;
if((adapter->hw.mng_cookie.status &
E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) &&
(vid == adapter->mng_vlan_id)) {
- return;
+ return 0;
}
+
+ if (!iegbe_vlan_used(adapter))
+ iegbe_vlan_mode(netdev, true);
+
/* add VID to filter table */
index = (vid >> 0x5) & 0x7F;
vfta = E1000_READ_REG_ARRAY(&adapter->hw, VFTA, index);
vfta |= (0x1 << (vid & 0x1F));
iegbe_write_vfta(&adapter->hw, index, vfta);
+
+ set_bit(vid, adapter->active_vlans);
+
+ return 0;
}
-static void iegbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
+static int iegbe_vlan_rx_kill_vid(struct net_device *netdev, u16 vid)
{
struct iegbe_adapter *adapter = netdev_priv(netdev);
u32 vfta, index;
if (!test_bit(__E1000_DOWN, &adapter->flags))
iegbe_irq_disable(adapter);
- vlan_group_set_device(adapter->vlgrp, vid, NULL);
if (!test_bit(__E1000_DOWN, &adapter->flags))
iegbe_irq_enable(adapter);
@@ -4570,21 +4589,26 @@ static void iegbe_vlan_rx_kill_vid(struc
vfta = E1000_READ_REG_ARRAY(&adapter->hw, VFTA, index);
vfta &= ~(0x1 << (vid & 0x1F));
iegbe_write_vfta(&adapter->hw, index, vfta);
+
+ clear_bit(vid, adapter->active_vlans);
+
+ if (!iegbe_vlan_used(adapter))
+ iegbe_vlan_mode(netdev, false);
+
+ return 0;
}
static void iegbe_restore_vlan(struct iegbe_adapter *adapter)
{
- iegbe_vlan_rx_register(adapter->netdev, adapter->vlgrp);
-
- if (adapter->vlgrp) {
u16 vid;
- for (vid = 0x0; vid < VLAN_GROUP_ARRAY_LEN; vid++) {
- if (!vlan_group_get_device(adapter->vlgrp, vid))
- continue;
+
+ if (!iegbe_vlan_used(adapter))
+ return;
+
+ iegbe_vlan_mode(adapter->netdev, true);
+ for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
iegbe_vlan_rx_add_vid(adapter->netdev, vid);
}
- }
-}
int iegbe_set_spd_dplx(struct iegbe_adapter *adapter, u16 spddplx)
@@ -4864,10 +4888,11 @@ iegbe_resume(struct pci_dev *pdev)
default:
break;
}
-#endif
return 0x0;
}
+#endif
+
#ifdef CONFIG_NET_POLL_CONTROLLER
/*
--- a/Embedded/src/GbE/iegbe_ethtool.c
+++ b/Embedded/src/GbE/iegbe_ethtool.c
@@ -327,6 +327,7 @@ iegbe_set_pauseparam(struct net_device *
return 0;
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
static uint32_t
iegbe_get_rx_csum(struct net_device *netdev)
{
@@ -392,6 +393,7 @@ iegbe_set_tso(struct net_device *netdev,
return 0;
}
#endif /* NETIF_F_TSO */
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */
static uint32_t
iegbe_get_msglevel(struct net_device *netdev)
@@ -807,6 +809,7 @@ err_setup_rx:
E1000_82542_##R : E1000_##R; \
return 1; } }
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
static int
iegbe_reg_test(struct iegbe_adapter *adapter, uint64_t *data)
{
@@ -1710,6 +1713,7 @@ iegbe_diag_test(struct net_device *netde
}
msleep_interruptible(0xfa0);
}
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)) */
static void
iegbe_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
@@ -1812,6 +1816,7 @@ iegbe_set_wol(struct net_device *netdev,
/* bit defines for adapter->led_status */
#define E1000_LED_ON 0
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
static void
iegbe_led_blink_callback(unsigned long data)
{
@@ -1864,6 +1869,7 @@ iegbe_phys_id(struct net_device *netdev,
return 0;
}
+#endif
static int
iegbe_nway_reset(struct net_device *netdev)
@@ -1876,11 +1882,13 @@ iegbe_nway_reset(struct net_device *netd
return 0;
}
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
static int
iegbe_get_stats_count(struct net_device *netdev)
{
return E1000_STATS_LEN;
}
+#endif
static void
iegbe_get_ethtool_stats(struct net_device *netdev,
@@ -1936,6 +1944,8 @@ struct ethtool_ops iegbe_ethtool_ops = {
.set_ringparam = iegbe_set_ringparam,
.get_pauseparam = iegbe_get_pauseparam,
.set_pauseparam = iegbe_set_pauseparam,
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
.get_rx_csum = iegbe_get_rx_csum,
.set_rx_csum = iegbe_set_rx_csum,
.get_tx_csum = iegbe_get_tx_csum,
@@ -1946,11 +1956,13 @@ struct ethtool_ops iegbe_ethtool_ops = {
.get_tso = ethtool_op_get_tso,
.set_tso = iegbe_set_tso,
#endif
+
.self_test_count = iegbe_diag_test_count,
.self_test = iegbe_diag_test,
- .get_strings = iegbe_get_strings,
.phys_id = iegbe_phys_id,
.get_stats_count = iegbe_get_stats_count,
+#endif
+ .get_strings = iegbe_get_strings,
.get_ethtool_stats = iegbe_get_ethtool_stats,
};
--- a/Embedded/src/GbE/gcu_main.c
+++ b/Embedded/src/GbE/gcu_main.c
@@ -93,7 +93,7 @@ static struct pci_driver gcu_driver = {
};
static struct gcu_adapter *global_adapter = 0;
-static spinlock_t global_adapter_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(global_adapter_spinlock);
static unsigned long g_intflags = 0;
MODULE_AUTHOR("Intel(R) Corporation");
--- a/Embedded/src/GbE/iegbe.h
+++ b/Embedded/src/GbE/iegbe.h
@@ -257,7 +257,7 @@ struct iegbe_adapter {
struct timer_list tx_fifo_stall_timer;
struct timer_list watchdog_timer;
struct timer_list phy_info_timer;
- struct vlan_group *vlgrp;
+ unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
uint16_t mng_vlan_id;
uint32_t bd_number;
uint32_t rx_buffer_len;

View File

@@ -1,41 +0,0 @@
--- a/Embedded/src/CAN/can_main.c
+++ b/Embedded/src/CAN/can_main.c
@@ -72,6 +72,7 @@
#include "can_main.h"
#include "can_ioctl.h"
#include <linux/fs.h>
+#include <linux/module.h>
MODULE_AUTHOR("Intel(R) Corporation");
@@ -110,7 +111,7 @@ struct file_operations file_ops = {
.owner = THIS_MODULE,
.read = can_read,
.write = can_write,
- .ioctl = can_dev_io,
+ .unlocked_ioctl = can_dev_io,
.open = can_open,
.release = can_release
};
@@ -594,8 +595,7 @@ int icp_can_reset(can_os_t *can_os)
/*****************************************************************************
* Device IO control function. Used by user apps to configure CAN device.
*****************************************************************************/
-int can_dev_io(struct inode *inode, struct file *filp, unsigned int cmd,
- unsigned long arg)
+long can_dev_io(struct file *filp, unsigned int cmd, unsigned long arg)
{
can_os_t *can_os;
unsigned int err=0;
--- a/Embedded/src/CAN/can_main.h
+++ b/Embedded/src/CAN/can_main.h
@@ -157,8 +157,7 @@ ssize_t can_write(
int icp_can_reset(
can_os_t *can_os);
-int can_dev_io(
- struct inode *inode,
+long can_dev_io(
struct file *filp,
unsigned int cmd,
unsigned long arg);

View File

@@ -1,33 +0,0 @@
--- a/Embedded/src/GPIO/gpio.h
+++ b/Embedded/src/GPIO/gpio.h
@@ -121,8 +121,7 @@ int gpio_init(void);
void gpio_close(void);
int gpio_open(struct inode *inode, struct file *filp);
int gpio_release(struct inode *inode, struct file *filp);
-int gpio_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
- unsigned long arg);
+long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
// private driver functions
int gpio_getpininfo(int Signal, char *pBuff);
@@ -134,7 +133,7 @@ struct file_operations file_ops =
.owner = THIS_MODULE,
.open = gpio_open,
.release = gpio_release,
- .ioctl = gpio_ioctl,
+ .unlocked_ioctl = gpio_ioctl,
};
#endif
--- a/Embedded/src/GPIO/gpio_ref.c
+++ b/Embedded/src/GPIO/gpio_ref.c
@@ -251,8 +251,7 @@ int gpio_release(struct inode *inode, st
0 => success
< 0 => error
******************************************************************************/
-int gpio_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
- unsigned long arg)
+long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
gpio_ioctl_t Info;
u_int bitstr = 0;

View File

@@ -1,31 +0,0 @@
--- a/Embedded/src/WDT/iwdt.c
+++ b/Embedded/src/WDT/iwdt.c
@@ -217,8 +217,7 @@ static int wdt_open(struct inode *inode,
static int wdt_release(struct inode *inode, struct file *file);
static ssize_t wdt_write(struct file *file, const char *data,
size_t count, loff_t * pos);
-static int wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg);
+static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static irqreturn_t wdt_isr(int irq, void *dev_id);
static void __exit wdt_cleanup(void);
static int __init wdt_init(void);
@@ -243,7 +242,7 @@ static struct pci_device_id lpc_pci_tbl[
static struct file_operations wdt_fops = {
owner: THIS_MODULE,
write: wdt_write,
- ioctl: wdt_ioctl,
+ unlocked_ioctl: wdt_ioctl,
open: wdt_open,
release: wdt_release,
};
@@ -1201,8 +1200,7 @@ char *wdt_get_ioctl_string(unsigned int
* Return Value: 0 - successful, negative value - failed.
* Description: This function is used to provide IO interface.
*/
-static int wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
u8 mode=0, scale=0, int_type=0;
u32 u_margin=0, dcount=0;

View File

@@ -1,33 +0,0 @@
--- a/Embedded/src/1588/1588.c
+++ b/Embedded/src/1588/1588.c
@@ -664,8 +664,7 @@ irqreturn_t timesync_isr(int irq, void *
0 => success
< 0 => error
******************************************************************************/
-int timesync_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
- unsigned long arg)
+long timesync_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
wait_queue_head_t *event = NULL;
unsigned int bytes_ret = 0;
--- a/Embedded/src/1588/1588.h
+++ b/Embedded/src/1588/1588.h
@@ -121,8 +121,7 @@ MODULE_DEVICE_TABLE(pci, pci_ids);
// Linux functions
int timesync_open(struct inode *inode, struct file *filp);
int timesync_release(struct inode *inode, struct file *filp);
-int timesync_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
- unsigned long arg);
+long timesync_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
void timesync_close(void);
int pci_suspend(struct pci_dev *dev, pm_message_t state);
int pci_resume(struct pci_dev *dev);
@@ -142,7 +141,7 @@ struct file_operations file_ops =
.owner = THIS_MODULE,
.open = timesync_open,
.release = timesync_release,
- .ioctl = timesync_ioctl,
+ .unlocked_ioctl = timesync_ioctl,
};
// Linux pci operations

View File

@@ -0,0 +1,52 @@
#
# Copyright (C) 2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=gpio-nct5104d
PKG_RELEASE:=1
PKG_MAINTAINER:=Florian Eckert <Eckert.Florian@googlemail.com>
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
define KernelPackage/gpio-nct5104d
SUBMENU:=Other modules
TITLE:= GPIO nct5104d support
DEPENDS:= @GPIO_SUPPORT @TARGET_x86
FILES:=$(PKG_BUILD_DIR)/gpio-nct5104d.ko
AUTOLOAD:=$(call AutoLoad,30,gpio-nct5104d,1)
KCONFIG:=
endef
define KernelPackage/gpio-nct5104d/description
Support for GPIO functionality of NCT5104D super I/O chip.
endef
EXTRA_KCONFIG:= \
CONFIG_GPIO_NCT5104D=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,gpio-nct5104d))

View File

@@ -0,0 +1,5 @@
config GPIO_NCT5104D
tristate "NCT5104D GPIO support"
depends on GENERIC_GPIO
help
Say yes here to support GPIO functionality of NCT5104D super I/O chip

View File

@@ -0,0 +1 @@
obj-${CONFIG_GPIO_NCT5104D} += gpio-nct5104d.o

View File

@@ -0,0 +1,461 @@
/*
* GPIO driver for NCT5104D
*
* Author: Tasanakorn Phaipool <tasanakorn@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/version.h>
#include <linux/dmi.h>
#include <linux/string.h>
#define DRVNAME "gpio-nct5104d"
/*
* Super-I/O registers
*/
#define SIO_LDSEL 0x07 /* Logical device select */
#define SIO_CHIPID 0x20 /* Chaip ID (2 bytes) */
#define SIO_GPIO_ENABLE 0x30 /* GPIO enable */
#define SIO_GPIO1_MODE 0xE0 /* GPIO1 Mode OpenDrain/Push-Pull */
#define SIO_GPIO2_MODE 0xE1 /* GPIO2 Mode OpenDrain/Push-Pull */
#define SIO_LD_GPIO 0x07 /* GPIO logical device */
#define SIO_LD_GPIO_MODE 0x0F /* GPIO mode control device */
#define SIO_UNLOCK_KEY 0x87 /* Key to enable Super-I/O */
#define SIO_LOCK_KEY 0xAA /* Key to disable Super-I/O */
#define SIO_NCT5104D_ID 0x1061 /* Chip ID */
#define SIO_PCENGINES_APU_NCT5104D_ID 0xc452 /* Chip ID */
enum chips { nct5104d };
static const char * const nct5104d_names[] = {
"nct5104d"
};
struct nct5104d_sio {
int addr;
enum chips type;
};
struct nct5104d_gpio_bank {
struct gpio_chip chip;
unsigned int regbase;
struct nct5104d_gpio_data *data;
};
struct nct5104d_gpio_data {
struct nct5104d_sio *sio;
int nr_bank;
struct nct5104d_gpio_bank *bank;
};
/*
* Super-I/O functions.
*/
static inline int superio_inb(int base, int reg)
{
outb(reg, base);
return inb(base + 1);
}
static int superio_inw(int base, int reg)
{
int val;
outb(reg++, base);
val = inb(base + 1) << 8;
outb(reg, base);
val |= inb(base + 1);
return val;
}
static inline void superio_outb(int base, int reg, int val)
{
outb(reg, base);
outb(val, base + 1);
}
static inline int superio_enter(int base)
{
/* Don't step on other drivers' I/O space by accident. */
if (!request_muxed_region(base, 2, DRVNAME)) {
pr_err(DRVNAME "I/O address 0x%04x already in use\n", base);
return -EBUSY;
}
/* According to the datasheet the key must be send twice. */
outb(SIO_UNLOCK_KEY, base);
outb(SIO_UNLOCK_KEY, base);
return 0;
}
static inline void superio_select(int base, int ld)
{
outb(SIO_LDSEL, base);
outb(ld, base + 1);
}
static inline void superio_exit(int base)
{
outb(SIO_LOCK_KEY, base);
release_region(base, 2);
}
/*
* GPIO chip.
*/
static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset);
static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset);
static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
unsigned offset, int value);
static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value);
#define NCT5104D_GPIO_BANK(_base, _ngpio, _regbase) \
{ \
.chip = { \
.label = DRVNAME, \
.owner = THIS_MODULE, \
.direction_input = nct5104d_gpio_direction_in, \
.get = nct5104d_gpio_get, \
.direction_output = nct5104d_gpio_direction_out, \
.set = nct5104d_gpio_set, \
.base = _base, \
.ngpio = _ngpio, \
.can_sleep = true, \
}, \
.regbase = _regbase, \
}
#define gpio_dir(base) (base + 0)
#define gpio_data(base) (base + 1)
static struct nct5104d_gpio_bank nct5104d_gpio_bank[] = {
NCT5104D_GPIO_BANK(0 , 8, 0xE0),
NCT5104D_GPIO_BANK(10, 8, 0xE4)
};
static int nct5104d_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
{
int err;
struct nct5104d_gpio_bank *bank =
container_of(chip, struct nct5104d_gpio_bank, chip);
struct nct5104d_sio *sio = bank->data->sio;
u8 dir;
err = superio_enter(sio->addr);
if (err)
return err;
superio_select(sio->addr, SIO_LD_GPIO);
dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
dir |= (1 << offset);
superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
superio_exit(sio->addr);
return 0;
}
static int nct5104d_gpio_get(struct gpio_chip *chip, unsigned offset)
{
int err;
struct nct5104d_gpio_bank *bank =
container_of(chip, struct nct5104d_gpio_bank, chip);
struct nct5104d_sio *sio = bank->data->sio;
u8 data;
err = superio_enter(sio->addr);
if (err)
return err;
superio_select(sio->addr, SIO_LD_GPIO);
data = superio_inb(sio->addr, gpio_data(bank->regbase));
superio_exit(sio->addr);
return !!(data & 1 << offset);
}
static int nct5104d_gpio_direction_out(struct gpio_chip *chip,
unsigned offset, int value)
{
int err;
struct nct5104d_gpio_bank *bank =
container_of(chip, struct nct5104d_gpio_bank, chip);
struct nct5104d_sio *sio = bank->data->sio;
u8 dir, data_out;
err = superio_enter(sio->addr);
if (err)
return err;
superio_select(sio->addr, SIO_LD_GPIO);
data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
if (value)
data_out |= (1 << offset);
else
data_out &= ~(1 << offset);
superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
dir = superio_inb(sio->addr, gpio_dir(bank->regbase));
dir &= ~(1 << offset);
superio_outb(sio->addr, gpio_dir(bank->regbase), dir);
superio_exit(sio->addr);
return 0;
}
static void nct5104d_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
{
int err;
struct nct5104d_gpio_bank *bank =
container_of(chip, struct nct5104d_gpio_bank, chip);
struct nct5104d_sio *sio = bank->data->sio;
u8 data_out;
err = superio_enter(sio->addr);
if (err)
return;
superio_select(sio->addr, SIO_LD_GPIO);
data_out = superio_inb(sio->addr, gpio_data(bank->regbase));
if (value)
data_out |= (1 << offset);
else
data_out &= ~(1 << offset);
superio_outb(sio->addr, gpio_data(bank->regbase), data_out);
superio_exit(sio->addr);
}
/*
* Platform device and driver.
*/
static int nct5104d_gpio_probe(struct platform_device *pdev)
{
int err;
int i;
struct nct5104d_sio *sio = pdev->dev.platform_data;
struct nct5104d_gpio_data *data;
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;
switch (sio->type) {
case nct5104d:
data->nr_bank = ARRAY_SIZE(nct5104d_gpio_bank);
data->bank = nct5104d_gpio_bank;
break;
default:
return -ENODEV;
}
data->sio = sio;
platform_set_drvdata(pdev, data);
/* For each GPIO bank, register a GPIO chip. */
for (i = 0; i < data->nr_bank; i++) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
bank->chip.dev = &pdev->dev;
bank->data = data;
err = gpiochip_add(&bank->chip);
if (err) {
dev_err(&pdev->dev,
"Failed to register gpiochip %d: %d\n",
i, err);
goto err_gpiochip;
}
}
return 0;
err_gpiochip:
for (i = i - 1; i >= 0; i--) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
int rm_err = gpiochip_remove(&bank->chip);
if (rm_err < 0)
dev_err(&pdev->dev,
"Failed to remove gpiochip %d: %d\n",
i, rm_err);
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
gpiochip_remove (&bank->chip);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
}
return err;
}
static int nct5104d_gpio_remove(struct platform_device *pdev)
{
int i;
struct nct5104d_gpio_data *data = platform_get_drvdata(pdev);
for (i = 0; i < data->nr_bank; i++) {
struct nct5104d_gpio_bank *bank = &data->bank[i];
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
int err = gpiochip_remove(&bank->chip);
if (err) {
dev_err(&pdev->dev,
"Failed to remove GPIO gpiochip %d: %d\n",
i, err);
return err;
}
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
gpiochip_remove (&bank->chip);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
}
return 0;
}
static int __init nct5104d_find(int addr, struct nct5104d_sio *sio)
{
int err;
u16 devid;
u8 gpio_cfg;
err = superio_enter(addr);
if (err)
return err;
err = -ENODEV;
devid = superio_inw(addr, SIO_CHIPID);
switch (devid) {
case SIO_NCT5104D_ID:
case SIO_PCENGINES_APU_NCT5104D_ID:
sio->type = nct5104d;
/* enable GPIO0 and GPIO1 */
superio_select(addr, SIO_LD_GPIO);
gpio_cfg = superio_inb(addr, SIO_GPIO_ENABLE);
gpio_cfg |= 0x03;
superio_outb(addr, SIO_GPIO_ENABLE, gpio_cfg);
break;
default:
pr_info(DRVNAME ": Unsupported device 0x%04x\n", devid);
goto err;
}
sio->addr = addr;
err = 0;
pr_info(DRVNAME ": Found %s at %#x chip id 0x%04x\n",
nct5104d_names[sio->type],
(unsigned int) addr,
(int) superio_inw(addr, SIO_CHIPID));
superio_select(sio->addr, SIO_LD_GPIO_MODE);
superio_outb(sio->addr, SIO_GPIO1_MODE, 0x0);
superio_outb(sio->addr, SIO_GPIO2_MODE, 0x0);
err:
superio_exit(addr);
return err;
}
static struct platform_device *nct5104d_gpio_pdev;
static int __init
nct5104d_gpio_device_add(const struct nct5104d_sio *sio)
{
int err;
nct5104d_gpio_pdev = platform_device_alloc(DRVNAME, -1);
if (!nct5104d_gpio_pdev)
pr_err(DRVNAME ": Error platform_device_alloc\n");
if (!nct5104d_gpio_pdev)
return -ENOMEM;
err = platform_device_add_data(nct5104d_gpio_pdev,
sio, sizeof(*sio));
if (err) {
pr_err(DRVNAME "Platform data allocation failed\n");
goto err;
}
err = platform_device_add(nct5104d_gpio_pdev);
if (err) {
pr_err(DRVNAME "Device addition failed\n");
goto err;
}
pr_info(DRVNAME ": Device added\n");
return 0;
err:
platform_device_put(nct5104d_gpio_pdev);
return err;
}
/*
*/
static struct platform_driver nct5104d_gpio_driver = {
.driver = {
.owner = THIS_MODULE,
.name = DRVNAME,
},
.probe = nct5104d_gpio_probe,
.remove = nct5104d_gpio_remove,
};
static int __init nct5104d_gpio_init(void)
{
int err;
struct nct5104d_sio sio;
const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
/* Make sure we only run on PC Engine APU boards */
if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strncasecmp(board_name, "apu", 3)) {
return -ENODEV;
}
if (nct5104d_find(0x2e, &sio) &&
nct5104d_find(0x4e, &sio))
return -ENODEV;
err = platform_driver_register(&nct5104d_gpio_driver);
if (!err) {
pr_info(DRVNAME ": platform_driver_register\n");
err = nct5104d_gpio_device_add(&sio);
if (err)
platform_driver_unregister(&nct5104d_gpio_driver);
}
return err;
}
subsys_initcall(nct5104d_gpio_init);
static void __exit nct5104d_gpio_exit(void)
{
platform_device_unregister(nct5104d_gpio_pdev);
platform_driver_unregister(&nct5104d_gpio_driver);
}
module_exit(nct5104d_gpio_exit);
MODULE_DESCRIPTION("GPIO driver for Super-I/O chips NCT5104D");
MODULE_AUTHOR("Tasanakorn Phaipool <tasanakorn@gmail.com>");
MODULE_LICENSE("GPL");

View File

@@ -12,10 +12,10 @@ PKG_NAME:=sched-cake
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/kdarbyshirebryant/sch_cake.git
PKG_SOURCE_DATE:=2016-12-19
PKG_SOURCE_VERSION:=70c8eb766d5afcf3cf187594b7cd776da92bee3c
PKG_MIRROR_HASH:=16174db5dad0a5b5ba522d4cfc058cff9851ed013a3a05166b04eb127bb12a24
PKG_SOURCE_URL:=https://github.com/dtaht/sch_cake.git
PKG_SOURCE_DATE:=2017-01-28
PKG_SOURCE_VERSION:=9789742cfc596d48583ba4cdbc8f38d026121fa6
PKG_MIRROR_HASH:=2a5afc45722c28ca8778eb50452eb305306e7898b32d7d6d73d3e77edf3cce99
PKG_MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
include $(INCLUDE_DIR)/package.mk

View File

@@ -0,0 +1,52 @@
#
# Copyright (C) 2017 Chris Blake <chrisrblake93@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=leds-apu2
PKG_RELEASE:=1
PKG_MAINTAINER:=Chris Blake <chrisrblake93@gmail.com>
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
define KernelPackage/leds-apu2
SUBMENU:=LED modules
TITLE:= PC Engines APU2/APU3 LED support
DEPENDS:= @GPIO_SUPPORT @TARGET_x86
FILES:=$(PKG_BUILD_DIR)/leds-apu2.ko
AUTOLOAD:=$(call AutoLoad,41,leds-apu2,1)
KCONFIG:=
endef
define KernelPackage/leds-apu2/description
Driver for the PC Engines APU2/APU3 LEDs & Reset Button.
endef
EXTRA_KCONFIG:= \
CONFIG_LEDS_APU2=m
EXTRA_CFLAGS:= \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \
$(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \
MAKE_OPTS:= \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
$(EXTRA_KCONFIG)
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
$(MAKE_OPTS) \
modules
endef
$(eval $(call KernelPackage,leds-apu2))

View File

@@ -0,0 +1,8 @@
config LEDS_APU2
tristate "PC Engines APU2/APU3 LED support"
depends on LEDS_CLASS
depends on LEDS_GPIO
depends on GPIOLIB
help
Say yes here to enable support for the CPU GPIO pins on the PC Engines
APU2/APU3 board, which enables the front LEDs and Reset Button.

View File

@@ -0,0 +1 @@
obj-${CONFIG_LEDS_APU2} += leds-apu2.o

View File

@@ -0,0 +1,374 @@
/*
* APU2 LED/GPIO Driver
* Copyright (c) 2016 Christian Lamparter <chunkeey (at) googlemail.com>
*
* Based on gpio-apu2.c - AMD FCH GPIO support for PC-Engines APU-2 board
*
* Copyright (c) 2015 Carsten Spiess <fli4l at carsten-spiess.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/miscdevice.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/version.h>
#include <linux/dmi.h>
#include <linux/string.h>
#include <linux/leds.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#define DEVNAME "leds-apu2"
#define FCH_ACPI_MMIO_BASE 0xFED80000
#define FCH_GPIO_BASE (FCH_ACPI_MMIO_BASE + 0x1500)
#define FCH_GPIO_SIZE 0x300
#define APU_NUM_GPIO 4
#define GPIO_BIT_DIR 23
#define GPIO_BIT_WRITE 22
#define GPIO_BIT_READ 16
/* internal variables */
static struct pci_dev *gpio_apu2_pci;
static DEFINE_SPINLOCK (gpio_lock);
/* the watchdog platform device */
static struct platform_device *gpio_apu2_platform_device;
static struct platform_device *leddev;
static struct platform_device *keydev;
static const struct pci_device_id gpio_apu2_pci_tbl[] ={
{PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, PCI_ANY_ID, PCI_ANY_ID},
{ 0, } /* End of list */
};
MODULE_DEVICE_TABLE (pci, gpio_apu2_pci_tbl);
/* EGPIO89=GPIO32, AGPIO68=GPIO57, AGPIO69=GPIO58, AGPIO70=GPIO59 */
static u8 gpio_offset[APU_NUM_GPIO] = {89, 68, 69, 70};
static void __iomem *gpio_addr[APU_NUM_GPIO] = {NULL, NULL, NULL, NULL};
static int gpio_apu2_get_dir (struct gpio_chip *chip, unsigned offset)
{
u32 val;
val = ~ioread32 (gpio_addr[offset]);
return (val >> GPIO_BIT_DIR) & 1;
}
static int gpio_apu2_dir_in (struct gpio_chip *gc, unsigned offset)
{
u32 val;
spin_lock_bh (&gpio_lock);
val = ioread32 (gpio_addr[offset]);
val &= ~BIT(GPIO_BIT_DIR);
iowrite32 (val, gpio_addr[offset]);
spin_unlock_bh (&gpio_lock);
return 0;
}
static int gpio_apu2_dir_out (struct gpio_chip *chip, unsigned offset,
int value)
{
u32 val;
spin_lock_bh (&gpio_lock);
val = ioread32 (gpio_addr[offset]);
val |= BIT(GPIO_BIT_DIR);
iowrite32 (val, gpio_addr[offset]);
spin_unlock_bh (&gpio_lock);
return 0;
}
static int gpio_apu2_get_data (struct gpio_chip *chip, unsigned offset)
{
u32 val;
val = ioread32 (gpio_addr[offset]);
return (val >> GPIO_BIT_READ) & 1;
}
static void gpio_apu2_set_data (struct gpio_chip *chip, unsigned offset, int value)
{
u32 val;
spin_lock_bh (&gpio_lock);
val = ioread32 (gpio_addr[offset]);
if (value)
val |= BIT(GPIO_BIT_WRITE);
else
val &= ~BIT(GPIO_BIT_WRITE);
iowrite32 (val, gpio_addr[offset]);
spin_unlock_bh (&gpio_lock);
}
static struct gpio_chip gpio_apu2_chip = {
.label = DEVNAME,
.owner = THIS_MODULE,
.base = -1,
.ngpio = APU_NUM_GPIO,
.get_direction = gpio_apu2_get_dir,
.direction_input = gpio_apu2_dir_in,
.direction_output = gpio_apu2_dir_out,
.get = gpio_apu2_get_data,
.set = gpio_apu2_set_data,
};
/*
*
*/
static int gpio_apu2_probe (struct platform_device *dev)
{
int ret = 0;
int i;
struct pci_dev *pci_dev = NULL;
/* Match the PCI device */
for_each_pci_dev (pci_dev) {
if (pci_match_id (gpio_apu2_pci_tbl, pci_dev) != NULL) {
gpio_apu2_pci = pci_dev;
break;
}
}
if (!gpio_apu2_pci)
return -ENODEV;
pr_info ("%s: PCI Revision ID: 0x%x\n", DEVNAME, gpio_apu2_pci->revision);
/* Determine type of southbridge chipset */
if (gpio_apu2_pci->revision < 0x40) {
return -EACCES;
}
/* Request memory region for GPIO's */
if (!devm_request_mem_region (&dev->dev, FCH_GPIO_BASE,
FCH_GPIO_SIZE, DEVNAME)){
pr_err ("%s: request GPIO mem region failed\n", DEVNAME);
return -ENXIO;
}
/* Map IO's for GPIO's */
for (i = 0; i < APU_NUM_GPIO; i++) {
gpio_addr[i] = devm_ioremap (&dev->dev,
FCH_GPIO_BASE + (gpio_offset[i] * sizeof (u32)), sizeof (u32));
if (!gpio_addr[i]) {
pr_err ("%s: map GPIO%d address failed\n", DEVNAME, gpio_offset[i]);
return -ENXIO;
}
}
gpio_apu2_chip.dev = &dev->dev;
ret = gpiochip_add (&gpio_apu2_chip);
if (ret) {
pr_err ("%s: adding gpiochip failed\n", DEVNAME);
}
return ret;
}
static int gpio_apu2_remove (struct platform_device *dev)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
int ret;
ret = gpiochip_remove (&gpio_apu2_chip);
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
gpiochip_remove (&gpio_apu2_chip);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
return 0;
}
static struct platform_driver gpio_apu2_driver = {
.probe = gpio_apu2_probe,
.remove = gpio_apu2_remove,
.driver = {
.owner = THIS_MODULE,
.name = DEVNAME
}
};
static struct gpio_led apu2_leds_gpio[] = {
{
.name = "apu2:green:power",
.gpio = 509,
.active_low = 1,
},
{
.name = "apu2:green:led2",
.gpio = 510,
.active_low = 1,
},
{
.name = "apu2:green:led3",
.gpio = 511,
.active_low = 1,
},
};
static struct gpio_keys_button apu2_gpio_keys[] = {
{
.desc = "Reset button",
.type = EV_KEY,
.code = KEY_RESTART,
.debounce_interval = 60,
.gpio = 508,
.active_low = 1,
},
};
static void register_gpio_keys_polled(int id, unsigned poll_interval,
unsigned nbuttons,
struct gpio_keys_button *buttons)
{
struct gpio_keys_platform_data pdata = { };
int err;
keydev = platform_device_alloc("gpio-keys-polled", id);
if (!keydev) {
printk(KERN_ERR "Failed to allocate gpio-keys platform device\n");
return;
}
pdata.poll_interval = poll_interval;
pdata.nbuttons = nbuttons;
pdata.buttons = buttons;
err = platform_device_add_data(keydev, &pdata, sizeof(pdata));
if (err) {
dev_err(&keydev->dev, "failed to add platform data to key driver (%d)", err);
goto err_put_pdev;
}
err = platform_device_add(keydev);
if (err) {
dev_err(&keydev->dev, "failed to register key platform device (%d)", err);
goto err_put_pdev;
}
return;
err_put_pdev:
platform_device_put(keydev);
keydev = NULL;
}
static void register_leds_gpio(int id, unsigned num_leds, struct gpio_led *leds)
{
struct gpio_led_platform_data pdata = { };
int err;
leddev = platform_device_alloc("leds-gpio", id);
if (!leddev) {
printk(KERN_ERR "Failed to allocate leds-gpio platform device\n");
return;
}
pdata.num_leds = num_leds;
pdata.leds = leds;
err = platform_device_add_data(leddev, &pdata, sizeof(pdata));
if (err) {
dev_err(&leddev->dev, "failed to add platform data to key driver (%d)", err);
goto err_put_pdev;
}
err = platform_device_add(leddev);
if (err) {
dev_err(&leddev->dev, "failed to register key platform device (%d)", err);
goto err_put_pdev;
}
return;
err_put_pdev:
platform_device_put(leddev);
leddev = NULL;
}
static int __init gpio_apu2_init (void)
{
int err;
const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
/* Match the device name/model */
if (!board_name || !board_vendor || strcasecmp(board_vendor, "PC Engines") || strcasecmp(board_name, "apu2")) {
err = -ENODEV;
goto exit;
}
pr_info ("%s: load APU2/LED GPIO driver module\n", DEVNAME);
err = platform_driver_register (&gpio_apu2_driver);
if (err)
goto exit;
gpio_apu2_platform_device = platform_device_register_simple (DEVNAME, -1, NULL, 0);
if (IS_ERR(gpio_apu2_platform_device)) {
err = PTR_ERR(gpio_apu2_platform_device);
goto exit_driver;
}
pr_info ("%s: APU2 GPIO/LED driver module loaded\n", DEVNAME);
register_leds_gpio(-1, ARRAY_SIZE(apu2_leds_gpio), apu2_leds_gpio);
register_gpio_keys_polled(-1, 20, ARRAY_SIZE(apu2_gpio_keys), apu2_gpio_keys);
return 0;
exit_driver:
platform_driver_unregister (&gpio_apu2_driver);
exit:
return err;
}
static void __exit gpio_apu2_exit (void)
{
platform_device_unregister (gpio_apu2_platform_device);
platform_device_unregister (leddev);
platform_device_unregister (keydev);
platform_driver_unregister (&gpio_apu2_driver);
pr_info ("%s: APU2 GPIO/LED driver module unloaded\n", DEVNAME);
}
MODULE_AUTHOR ("Carsten Spiess <fli4l at carsten-spiess.de>");
MODULE_DESCRIPTION("GPIO driver for AMD FCH on PC-Engines APU-2");
MODULE_LICENSE("GPL");
module_init (gpio_apu2_init);
module_exit (gpio_apu2_exit);

View File

@@ -436,7 +436,7 @@ endef
define KernelPackage/crypto-md5/octeon
FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-md5.ko
AUTOLOAD:=$(call AutoLoad,09,octeon-md5)
AUTOLOAD+=$(call AutoLoad,09,octeon-md5)
endef
$(eval $(call KernelPackage,crypto-md5))
@@ -468,12 +468,12 @@ endef
define KernelPackage/crypto-sha1/octeon
FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha1.ko
AUTOLOAD:=$(call AutoLoad,09,octeon-sha1)
AUTOLOAD+=$(call AutoLoad,09,octeon-sha1)
endef
define KernelPackage/crypto-sha1/x86/64
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha1-ssse3.ko
AUTOLOAD:=$(call AutoLoad,09,sha1-ssse3)
AUTOLOAD+=$(call AutoLoad,09,sha1-ssse3)
endef
$(eval $(call KernelPackage,crypto-sha1))
@@ -493,12 +493,12 @@ endef
define KernelPackage/crypto-sha256/octeon
FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha256.ko
AUTOLOAD:=$(call AutoLoad,09,octeon-sha256)
AUTOLOAD+=$(call AutoLoad,09,octeon-sha256)
endef
define KernelPackage/crypto-sha256/x86/64
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha256-ssse3.ko
AUTOLOAD:=$(call AutoLoad,09,sha256-ssse3)
AUTOLOAD+=$(call AutoLoad,09,sha256-ssse3)
endef
$(eval $(call KernelPackage,crypto-sha256))
@@ -518,12 +518,12 @@ endef
define KernelPackage/crypto-sha512/octeon
FILES+=$(LINUX_DIR)/arch/mips/cavium-octeon/crypto/octeon-sha512.ko
AUTOLOAD:=$(call AutoLoad,09,octeon-sha512)
AUTOLOAD+=$(call AutoLoad,09,octeon-sha512)
endef
define KernelPackage/crypto-sha512/x86/64
FILES+=$(LINUX_DIR)/arch/x86/crypto/sha512-ssse3.ko
AUTOLOAD:=$(call AutoLoad,09,sha512-ssse3)
AUTOLOAD+=$(call AutoLoad,09,sha512-ssse3)
endef
$(eval $(call KernelPackage,crypto-sha512))

View File

@@ -495,7 +495,7 @@ $(eval $(call KernelPackage,ipt-tproxy))
define KernelPackage/ipt-tee
TITLE:=TEE support
DEPENDS:=+kmod-ipt-conntrack @!LINUX_4_4
DEPENDS:=+kmod-ipt-conntrack
KCONFIG:= \
CONFIG_NETFILTER_XT_TARGET_TEE
FILES:= \

View File

@@ -736,7 +736,7 @@ $(eval $(call KernelPackage,mppe))
SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit
SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem
SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -748,6 +748,8 @@ define KernelPackage/sched-core
KCONFIG:= \
CONFIG_NET_SCHED=y \
CONFIG_NET_SCH_HFSC \
CONFIG_NET_SCH_HTB \
CONFIG_NET_SCH_TBF \
CONFIG_NET_SCH_INGRESS \
CONFIG_NET_SCH_FQ_CODEL \
CONFIG_NET_CLS=y \
@@ -789,12 +791,10 @@ define KernelPackage/sched
KCONFIG:= \
CONFIG_NET_SCH_CODEL \
CONFIG_NET_SCH_DSMARK \
CONFIG_NET_SCH_HTB \
CONFIG_NET_SCH_FIFO \
CONFIG_NET_SCH_GRED \
CONFIG_NET_SCH_PRIO \
CONFIG_NET_SCH_RED \
CONFIG_NET_SCH_TBF \
CONFIG_NET_SCH_SFQ \
CONFIG_NET_SCH_TEQL \
CONFIG_NET_SCH_FQ \

View File

@@ -147,6 +147,38 @@ endef
$(eval $(call KernelPackage,nls-cp932))
define KernelPackage/nls-cp936
SUBMENU:=Native Language Support
TITLE:=Codepage 936 (Simplified Chinese)
KCONFIG:=CONFIG_NLS_CODEPAGE_936
FILES:=$(LINUX_DIR)/fs/nls/nls_cp936.ko
AUTOLOAD:=$(call AutoLoad,25,nls_cp936)
$(call AddDepends/nls)
endef
define KernelPackage/nls-cp936/description
Kernel module for NLS Codepage 936 (Simplified Chinese)
endef
$(eval $(call KernelPackage,nls-cp936))
define KernelPackage/nls-cp950
SUBMENU:=Native Language Support
TITLE:=Codepage 950 (Traditional Chinese)
KCONFIG:=CONFIG_NLS_CODEPAGE_950
FILES:=$(LINUX_DIR)/fs/nls/nls_cp950.ko
AUTOLOAD:=$(call AutoLoad,25,nls_cp950)
$(call AddDepends/nls)
endef
define KernelPackage/nls-cp950/description
Kernel module for NLS Codepage 950 (Traditional Chinese)
endef
$(eval $(call KernelPackage,nls-cp950))
define KernelPackage/nls-cp1250
SUBMENU:=Native Language Support
TITLE:=Codepage 1250 (Eastern Europe)

View File

@@ -67,7 +67,7 @@ define KernelPackage/sound-core/uml
FILES:= \
$(LINUX_DIR)/sound/soundcore.ko \
$(LINUX_DIR)/arch/um/drivers/hostaudio.ko
AUTOLOAD:=$(call AutoLoad,30,soundcore hostaudio)
AUTOLOAD+=$(call AutoLoad,30,soundcore hostaudio)
endef
define KernelPackage/sound-core/description

View File

@@ -47,7 +47,7 @@ define KernelPackage/backlight-pwm
AUTOLOAD:=$(call AutoProbe,video pwm_bl)
endef
define KernelPackage/backlight/backlight-pwm
define KernelPackage/backlight-pwm/description
Kernel module for PWM based Backlight support.
endef
@@ -72,7 +72,7 @@ endef
define KernelPackage/fb/x86
FILES+=$(LINUX_DIR)/arch/x86/video/fbdev.ko
AUTOLOAD:=$(call AutoLoad,06,fbdev fb)
AUTOLOAD+=$(call AutoLoad,06,fbdev fb)
endef
$(eval $(call KernelPackage,fb))

View File

@@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2016-10-08
PKG_RELEASE:=1
PKG_VERSION:=2017-01-31
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_BACKPORT_VERSION:=
PKG_HASH:=4f6350e3b75815060bfdf47ef266ad613c7bfea5b7b1dc4552dee69e1bebe4fb
PKG_HASH:=75e6d39e34cf156212a2509172a4a62b673b69eb4a1d9aaa565f7fa719fa2317
PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
@@ -35,7 +35,7 @@ PKG_DRIVERS = \
libertas-sdio libertas-usb libertas-spi \
mac80211-hwsim \
mt7601u \
mwl8k mwifiex-pcie \
mwl8k mwifiex-pcie mwifiex-sdio \
p54-common p54-pci p54-spi p54-usb \
rt2x00-lib rt2x00-pci rt2x00-usb \
rt2400-pci rt2500-pci rt2500-usb \
@@ -68,6 +68,8 @@ PKG_CONFIG_DEPENDS:= \
CONFIG_PACKAGE_BRCM80211_DEBUG \
CONFIG_PACKAGE_IWLWIFI_DEBUG \
CONFIG_PACKAGE_IWLWIFI_DEBUGFS \
CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS \
CONFIG_PACKAGE_RT2X00_DEBUG \
CONFIG_PACKAGE_RTLWIFI_DEBUG \
CONFIG_ATH9K_SUPPORT_PCOEM \
CONFIG_ATH9K_TX99 \
@@ -248,7 +250,7 @@ define KernelPackage/ath9k/config
depends on PACKAGE_kmod-ath9k
config ATH9K_TX99
bool "Enable TX99 support"
bool "Enable TX99 support (WARNING: testing only, breaks normal operation!)"
depends on PACKAGE_kmod-ath9k
config ATH9K_UBNTHSR
@@ -1022,7 +1024,7 @@ endef
define KernelPackage/mac80211-hwsim
$(call KernelPackage/mac80211/Default)
TITLE:=mac80211 HW simulation device
DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT
DEPENDS+= +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
endef
@@ -1055,7 +1057,7 @@ define KernelPackage/mwifiex-pcie
$(call KernelPackage/mac80211/Default)
TITLE:=Driver for Marvell 802.11n/802.11ac PCIe Wireless cards
URL:=http://wireless.kernel.org/en/users/Drivers/mwifiex
DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT +mwifiex-pcie-firmware
DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +mwifiex-pcie-firmware
FILES:= \
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex_pcie.ko
@@ -1066,6 +1068,21 @@ define KernelPackage/mwifiex-pcie/description
Kernel modules for Marvell 802.11n/802.11ac PCIe Wireless cards
endef
define KernelPackage/mwifiex-sdio
$(call KernelPackage/mac80211/Default)
TITLE:=Driver for Marvell 802.11n/802.11ac SDIO Wireless cards
URL:=http://wireless.kernel.org/en/users/Drivers/mwifiex
DEPENDS+= +kmod-mmc +kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +mwifiex-sdio-firmware
FILES:= \
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex.ko \
$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex_sdio.ko
AUTOLOAD:=$(call AutoProbe,mwifiex_sdio)
endef
define KernelPackage/mwifiex-sdio/description
Kernel modules for Marvell 802.11n/802.11ac SDIO Wireless cards
endef
define KernelPackage/p54/Default
$(call KernelPackage/mac80211/Default)
TITLE:=Prism54 Drivers
@@ -1598,6 +1615,7 @@ config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
config-$(call config_package,libertas-spi) += LIBERTAS LIBERTAS_SPI
config-$(call config_package,mwl8k) += MWL8K
config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
config-$(call config_package,mwifiex-sdio) += MWIFIEX MWIFIEX_SDIO
config-$(call config_package,rtl8180) += RTL8180
config-$(call config_package,rtl8187) += RTL8187
config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
@@ -1793,6 +1811,7 @@ $(eval $(call KernelPackage,mac80211-hwsim))
$(eval $(call KernelPackage,mt7601u))
$(eval $(call KernelPackage,mwl8k))
$(eval $(call KernelPackage,mwifiex-pcie))
$(eval $(call KernelPackage,mwifiex-sdio))
$(eval $(call KernelPackage,p54-common))
$(eval $(call KernelPackage,p54-pci))
$(eval $(call KernelPackage,p54-usb))

View File

@@ -268,7 +268,7 @@ mac80211_hostapd_setup_base() {
vht_max_mpdu_hw=11454
[ "$vht_max_mpdu_hw" != 3895 ] && \
vht_capab="$vht_capab[MAX-MPDU-$vht_max_mpdu_hw]"
# maximum A-MPDU length exponent
vht_max_a_mpdu_len_exp_hw=0
[ "$(($vht_cap & 58720256))" -ge 8388608 -a 1 -le "$vht_max_a_mpdu_len_exp" ] && \
@@ -566,7 +566,7 @@ mac80211_setup_adhoc() {
[ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate"
iw dev "$ifname" ibss join "$ssid" $freq $ibss_htmode fixed-freq $bssid \
${beacon_int:+beacon-interval $beacon_int} \
beacon-interval $beacon_int \
${brstr:+basic-rates $brstr} \
${mcval:+mcast-rate $mcval} \
${keyspec:+keys $keyspec}
@@ -646,7 +646,9 @@ mac80211_setup_vif() {
esac
freq="$(get_freq "$phy" "$channel")"
iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode ${mcval:+mcast-rate $mcval}
iw dev "$ifname" mesh join "$mesh_id" freq $freq $mesh_htmode \
${mcval:+mcast-rate $mcval} \
beacon-interval $beacon_int
fi
for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do
@@ -698,7 +700,7 @@ drv_mac80211_setup() {
country chanbw distance \
txpower antenna_gain \
rxantenna txantenna \
frag rts beacon_int htmode
frag rts beacon_int:100 htmode
json_get_values basic_rate_list basic_rate
json_select ..
@@ -756,7 +758,7 @@ drv_mac80211_setup() {
for_each_interface "ap" mac80211_prepare_vif
[ -n "$hostapd_ctrl" ] && {
/usr/sbin/hostapd -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file"
/usr/sbin/hostapd -s -P /var/run/wifi-$phy.pid -B "$hostapd_conf_file"
ret="$?"
wireless_add_process "$(cat /var/run/wifi-$phy.pid)" "/usr/sbin/hostapd" 1
[ "$ret" != 0 ] && {

View File

@@ -1,6 +1,6 @@
--- a/kconf/conf.c
+++ b/kconf/conf.c
@@ -593,40 +593,12 @@ int main(int ac, char **av)
@@ -594,40 +594,12 @@ int main(int ac, char **av)
case oldconfig:
case listnewconfig:
case olddefconfig:
@@ -44,7 +44,7 @@
break;
--- a/kconf/confdata.c
+++ b/kconf/confdata.c
@@ -1169,6 +1169,8 @@ bool conf_set_all_new_symbols(enum conf_
@@ -1170,6 +1170,8 @@ bool conf_set_all_new_symbols(enum conf_
}
bool has_changed = false;
@@ -53,7 +53,7 @@
for_all_symbols(i, sym) {
if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
continue;
@@ -1212,8 +1214,6 @@ bool conf_set_all_new_symbols(enum conf_
@@ -1213,8 +1215,6 @@ bool conf_set_all_new_symbols(enum conf_
}

View File

@@ -1,11 +0,0 @@
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -35,8 +35,6 @@ compat-$(CPTCFG_KERNEL_4_6) += backport-
compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o
compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o
-skcipher-objs += crypto-skcipher.o
-obj-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += skcipher.o
compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o
compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o
cordic-objs += lib-cordic.o

View File

@@ -0,0 +1,28 @@
--- a/backport-include/linux/kconfig.h
+++ b/backport-include/linux/kconfig.h
@@ -5,6 +5,8 @@
#include_next <linux/kconfig.h>
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
+
#ifndef __ARG_PLACEHOLDER_1
#define __ARG_PLACEHOLDER_1 0,
#define config_enabled(cfg) _config_enabled(cfg)
@@ -16,6 +18,7 @@
* 3.1 - 3.3 had a broken version of this, so undef
* (they didn't have __ARG_PLACEHOLDER_1)
*/
+
#undef IS_ENABLED
#define IS_ENABLED(option) \
(config_enabled(option) || config_enabled(option##_MODULE))
@@ -24,6 +27,8 @@
#undef IS_BUILTIN
#define IS_BUILTIN(option) config_enabled(option)
+#endif
+
#ifndef IS_REACHABLE
/*
* IS_REACHABLE(CONFIG_FOO) evaluates to 1 if the currently compiled

View File

@@ -1,22 +0,0 @@
--- a/backport-include/linux/skbuff.h
+++ b/backport-include/linux/skbuff.h
@@ -305,6 +305,19 @@ static inline void skb_free_frag(void *d
{
put_page(virt_to_head_page(data));
}
+
+#include <net/flow_keys.h>
+#include <linux/jhash.h>
+
+static inline u32 skb_get_hash_perturb(struct sk_buff *skb, u32 key)
+{
+ struct flow_keys keys;
+
+ skb_flow_dissect(skb, &keys);
+ return jhash_3words((__force u32)keys.dst,
+ (__force u32)keys.src ^ keys.ip_proto,
+ (__force u32)keys.ports, key);
+}
#endif
#endif /* __BACKPORT_SKBUFF_H */

View File

@@ -0,0 +1,152 @@
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -35,8 +35,6 @@ compat-$(CPTCFG_KERNEL_4_6) += backport-
compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_CCM) += crypto-ccm.o
compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o
-skcipher-objs += crypto-skcipher.o
-obj-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += skcipher.o
compat-$(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) += drivers-base-devcoredump.o
compat-$(CPTCFG_BPAUTO_RHASHTABLE) += lib-rhashtable.o
cordic-objs += lib-cordic.o
--- a/compat/drivers-base-devcoredump.c
+++ b/compat/drivers-base-devcoredump.c
@@ -31,6 +31,7 @@
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/workqueue.h>
+#include "backports.h"
static struct class devcd_class;
@@ -40,6 +41,10 @@ static bool devcd_disabled;
/* if data isn't read by userspace after 5 minutes then delete it */
#define DEVCD_TIMEOUT (HZ * 60 * 5)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+static struct bin_attribute devcd_attr_data;
+#endif
+
struct devcd_entry {
struct device devcd_dev;
void *data;
@@ -69,8 +74,7 @@ static void devcd_dev_release(struct dev
* a struct device to know when it goes away?
*/
if (devcd->failing_dev->kobj.sd)
- sysfs_delete_link(&devcd->failing_dev->kobj, &dev->kobj,
- "devcoredump");
+ sysfs_remove_link(&devcd->failing_dev->kobj, "devcoredump");
put_device(devcd->failing_dev);
kfree(devcd);
@@ -82,6 +86,9 @@ static void devcd_del(struct work_struct
devcd = container_of(wk, struct devcd_entry, del_wk.work);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+ device_remove_bin_file(&devcd->devcd_dev, &devcd_attr_data);
+#endif
device_del(&devcd->devcd_dev);
put_device(&devcd->devcd_dev);
}
@@ -115,6 +122,7 @@ static struct bin_attribute devcd_attr_d
.write = devcd_data_write,
};
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
static struct bin_attribute *devcd_dev_bin_attrs[] = {
&devcd_attr_data, NULL,
};
@@ -126,6 +134,7 @@ static const struct attribute_group devc
static const struct attribute_group *devcd_dev_groups[] = {
&devcd_dev_group, NULL,
};
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) */
static int devcd_free(struct device *dev, void *data)
{
@@ -160,18 +169,11 @@ static ssize_t disabled_store(struct cla
return count;
}
-static CLASS_ATTR_RW(disabled);
-static struct attribute *devcd_class_attrs[] = {
- &class_attr_disabled.attr,
- NULL,
+static struct class_attribute devcd_class_attrs[] = {
+ __ATTR_RW(disabled),
+ __ATTR_NULL
};
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
-ATTRIBUTE_GROUPS(devcd_class);
-#else
-#define BP_ATTR_GRP_STRUCT device_attribute
-ATTRIBUTE_GROUPS_BACKPORT(devcd_class);
-#endif
static struct class devcd_class = {
.name = "devcoredump",
@@ -179,10 +181,8 @@ static struct class devcd_class = {
.dev_release = devcd_dev_release,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
.dev_groups = devcd_dev_groups,
-#else
- .dev_attrs = devcd_class_dev_attrs,
#endif
- .class_groups = devcd_class_groups,
+ .class_attrs = devcd_class_attrs,
};
static ssize_t devcd_readv(char *buffer, loff_t offset, size_t count,
@@ -325,6 +325,11 @@ void dev_coredumpm(struct device *dev, s
if (device_add(&devcd->devcd_dev))
goto put_device;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+ if (device_create_bin_file(&devcd->devcd_dev, &devcd_attr_data))
+ goto put_device;
+#endif
+
if (sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj,
"failing_device"))
/* nothing - symlink will be missing */;
@@ -367,16 +372,13 @@ void dev_coredumpsg(struct device *dev,
}
EXPORT_SYMBOL_GPL(dev_coredumpsg);
-static int __init devcoredump_init(void)
+int __init devcoredump_init(void)
{
- init_devcd_class_attrs();
return class_register(&devcd_class);
}
-__initcall(devcoredump_init);
-static void __exit devcoredump_exit(void)
+void __exit devcoredump_exit(void)
{
class_for_each_device(&devcd_class, NULL, NULL, devcd_free);
class_unregister(&devcd_class);
}
-__exitcall(devcoredump_exit);
--- a/include/linux/backport-devcoredump.h
+++ b/include/linux/backport-devcoredump.h
@@ -66,7 +66,7 @@ static inline void _devcd_free_sgtable(s
}
-#ifdef CONFIG_DEV_COREDUMP
+#ifdef CPTCFG_BPAUTO_WANT_DEV_COREDUMP
void dev_coredumpv(struct device *dev, void *data, size_t datalen,
gfp_t gfp);
@@ -100,6 +100,6 @@ static inline void dev_coredumpsg(struct
{
_devcd_free_sgtable(table);
}
-#endif /* CONFIG_DEV_COREDUMP */
+#endif /* CPTCFG_BPAUTO_WANT_DEV_COREDUMP */
#endif /* __DEVCOREDUMP_H */

View File

@@ -0,0 +1,20 @@
--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
@@ -177,7 +177,7 @@ static bool rt2800usb_tx_sta_fifo_read_c
if (rt2800usb_txstatus_pending(rt2x00dev)) {
/* Read register after 1 ms */
hrtimer_start(&rt2x00dev->txstatus_timer,
- TXSTATUS_READ_INTERVAL,
+ ktime_set(0, TXSTATUS_READ_INTERVAL),
HRTIMER_MODE_REL);
return false;
}
@@ -204,7 +204,7 @@ static void rt2800usb_async_read_tx_stat
/* Read TX_STA_FIFO register after 2 ms */
hrtimer_start(&rt2x00dev->txstatus_timer,
- 2 * TXSTATUS_READ_INTERVAL,
+ ktime_set(0, 2*TXSTATUS_READ_INTERVAL),
HRTIMER_MODE_REL);
}

View File

@@ -0,0 +1,266 @@
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -32,8 +32,22 @@ static int nl80211_crypto_settings(struc
struct cfg80211_crypto_settings *settings,
int cipher_limit);
+static int nl80211_pre_doit(const struct genl_ops *ops, struct sk_buff *skb,
+ struct genl_info *info);
+static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
+ struct genl_info *info);
+
/* the netlink family */
-static struct genl_family nl80211_fam;
+static struct genl_family nl80211_fam = {
+ .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
+ .name = NL80211_GENL_NAME, /* have users key off the name instead */
+ .hdrsize = 0, /* no private header */
+ .version = 1, /* no particular meaning now */
+ .maxattr = NL80211_ATTR_MAX,
+ .netnsok = true,
+ .pre_doit = nl80211_pre_doit,
+ .post_doit = nl80211_post_doit,
+};
/* multicast groups */
enum nl80211_multicast_groups {
@@ -549,14 +563,13 @@ static int nl80211_prepare_wdev_dump(str
if (!cb->args[0]) {
err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
- genl_family_attrbuf(&nl80211_fam),
- nl80211_fam.maxattr, nl80211_policy);
+ nl80211_fam.attrbuf, nl80211_fam.maxattr,
+ nl80211_policy);
if (err)
goto out_unlock;
- *wdev = __cfg80211_wdev_from_attrs(
- sock_net(skb->sk),
- genl_family_attrbuf(&nl80211_fam));
+ *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk),
+ nl80211_fam.attrbuf);
if (IS_ERR(*wdev)) {
err = PTR_ERR(*wdev);
goto out_unlock;
@@ -1903,7 +1916,7 @@ static int nl80211_dump_wiphy_parse(stru
struct netlink_callback *cb,
struct nl80211_dump_wiphy_state *state)
{
- struct nlattr **tb = genl_family_attrbuf(&nl80211_fam);
+ struct nlattr **tb = nl80211_fam.attrbuf;
int ret = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
tb, nl80211_fam.maxattr, nl80211_policy);
/* ignore parse errors for backward compatibility */
@@ -7733,7 +7746,6 @@ static int nl80211_send_survey(struct sk
static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb)
{
- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam);
struct survey_info survey;
struct cfg80211_registered_device *rdev;
struct wireless_dev *wdev;
@@ -7746,7 +7758,7 @@ static int nl80211_dump_survey(struct sk
return res;
/* prepare_wdev_dump parsed the attributes */
- radio_stats = attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS];
+ radio_stats = nl80211_fam.attrbuf[NL80211_ATTR_SURVEY_RADIO_STATS];
if (!wdev->netdev) {
res = -EINVAL;
@@ -8594,14 +8606,14 @@ static int nl80211_testmode_dump(struct
*/
phy_idx = cb->args[0] - 1;
} else {
- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam);
-
err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
- attrbuf, nl80211_fam.maxattr, nl80211_policy);
+ nl80211_fam.attrbuf, nl80211_fam.maxattr,
+ nl80211_policy);
if (err)
goto out_err;
- rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf);
+ rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk),
+ nl80211_fam.attrbuf);
if (IS_ERR(rdev)) {
err = PTR_ERR(rdev);
goto out_err;
@@ -8609,8 +8621,9 @@ static int nl80211_testmode_dump(struct
phy_idx = rdev->wiphy_idx;
rdev = NULL;
- if (attrbuf[NL80211_ATTR_TESTDATA])
- cb->args[1] = (long)attrbuf[NL80211_ATTR_TESTDATA];
+ if (nl80211_fam.attrbuf[NL80211_ATTR_TESTDATA])
+ cb->args[1] =
+ (long)nl80211_fam.attrbuf[NL80211_ATTR_TESTDATA];
}
if (cb->args[1]) {
@@ -10814,7 +10827,8 @@ static int handle_nan_filter(struct nlat
i = 0;
nla_for_each_nested(attr, attr_filter, rem) {
- filter[i].filter = nla_memdup(attr, GFP_KERNEL);
+ filter[i].filter = kmemdup(nla_data(attr), nla_len(attr),
+ GFP_KERNEL);
filter[i].len = nla_len(attr);
i++;
}
@@ -11450,7 +11464,6 @@ static int nl80211_prepare_vendor_dump(s
struct cfg80211_registered_device **rdev,
struct wireless_dev **wdev)
{
- struct nlattr **attrbuf = genl_family_attrbuf(&nl80211_fam);
u32 vid, subcmd;
unsigned int i;
int vcmd_idx = -1;
@@ -11486,28 +11499,31 @@ static int nl80211_prepare_vendor_dump(s
}
err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
- attrbuf, nl80211_fam.maxattr, nl80211_policy);
+ nl80211_fam.attrbuf, nl80211_fam.maxattr,
+ nl80211_policy);
if (err)
goto out_unlock;
- if (!attrbuf[NL80211_ATTR_VENDOR_ID] ||
- !attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) {
+ if (!nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID] ||
+ !nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]) {
err = -EINVAL;
goto out_unlock;
}
- *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), attrbuf);
+ *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk),
+ nl80211_fam.attrbuf);
if (IS_ERR(*wdev))
*wdev = NULL;
- *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf);
+ *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk),
+ nl80211_fam.attrbuf);
if (IS_ERR(*rdev)) {
err = PTR_ERR(*rdev);
goto out_unlock;
}
- vid = nla_get_u32(attrbuf[NL80211_ATTR_VENDOR_ID]);
- subcmd = nla_get_u32(attrbuf[NL80211_ATTR_VENDOR_SUBCMD]);
+ vid = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_ID]);
+ subcmd = nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_SUBCMD]);
for (i = 0; i < (*rdev)->wiphy.n_vendor_commands; i++) {
const struct wiphy_vendor_command *vcmd;
@@ -11531,9 +11547,9 @@ static int nl80211_prepare_vendor_dump(s
goto out_unlock;
}
- if (attrbuf[NL80211_ATTR_VENDOR_DATA]) {
- data = nla_data(attrbuf[NL80211_ATTR_VENDOR_DATA]);
- data_len = nla_len(attrbuf[NL80211_ATTR_VENDOR_DATA]);
+ if (nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]) {
+ data = nla_data(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]);
+ data_len = nla_len(nl80211_fam.attrbuf[NL80211_ATTR_VENDOR_DATA]);
}
/* 0 is the first index - add 1 to parse only once */
@@ -12795,21 +12811,6 @@ static __genl_const struct genl_ops nl80
},
};
-static struct genl_family nl80211_fam __ro_after_init = {
- .name = NL80211_GENL_NAME, /* have users key off the name instead */
- .hdrsize = 0, /* no private header */
- .version = 1, /* no particular meaning now */
- .maxattr = NL80211_ATTR_MAX,
- .netnsok = true,
- .pre_doit = nl80211_pre_doit,
- .post_doit = nl80211_post_doit,
- .module = THIS_MODULE,
- .ops = nl80211_ops,
- .n_ops = ARRAY_SIZE(nl80211_ops),
- .mcgrps = nl80211_mcgrps,
- .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
-};
-
/* notification functions */
void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev,
@@ -14759,11 +14760,12 @@ void nl80211_send_ap_stopped(struct wire
/* initialisation/exit functions */
-int __init nl80211_init(void)
+int nl80211_init(void)
{
int err;
- err = genl_register_family(&nl80211_fam);
+ err = genl_register_family_with_ops_groups(&nl80211_fam, nl80211_ops,
+ nl80211_mcgrps);
if (err)
return err;
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -587,8 +587,15 @@ struct hwsim_radiotap_ack_hdr {
__le16 rt_chbitmask;
} __packed;
-/* MAC80211_HWSIM netlink family */
-static struct genl_family hwsim_genl_family;
+/* MAC80211_HWSIM netlinf family */
+static struct genl_family hwsim_genl_family = {
+ .id = GENL_ID_GENERATE,
+ .hdrsize = 0,
+ .name = "MAC80211_HWSIM",
+ .version = 1,
+ .maxattr = HWSIM_ATTR_MAX,
+ .netnsok = true,
+};
enum hwsim_multicast_groups {
HWSIM_MCGRP_CONFIG,
@@ -3250,18 +3257,6 @@ static __genl_const struct genl_ops hwsi
},
};
-static struct genl_family hwsim_genl_family __ro_after_init = {
- .name = "MAC80211_HWSIM",
- .version = 1,
- .maxattr = HWSIM_ATTR_MAX,
- .netnsok = true,
- .module = THIS_MODULE,
- .ops = hwsim_ops,
- .n_ops = ARRAY_SIZE(hwsim_ops),
- .mcgrps = hwsim_mcgrps,
- .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
-};
-
static void destroy_radio(struct work_struct *work)
{
struct mac80211_hwsim_data *data =
@@ -3309,13 +3304,15 @@ static struct notifier_block hwsim_netli
.notifier_call = mac80211_hwsim_netlink_notify,
};
-static int __init hwsim_init_netlink(void)
+static int hwsim_init_netlink(void)
{
int rc;
printk(KERN_INFO "mac80211_hwsim: initializing netlink\n");
- rc = genl_register_family(&hwsim_genl_family);
+ rc = genl_register_family_with_ops_groups(&hwsim_genl_family,
+ hwsim_ops,
+ hwsim_mcgrps);
if (rc)
goto failure;

View File

@@ -0,0 +1,20 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1133,7 +1133,7 @@ static u16 ieee80211_netdev_select_queue
return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
}
-static void
+static struct rtnl_link_stats64 *
ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
int i;
@@ -1158,6 +1158,8 @@ ieee80211_get_stats64(struct net_device
stats->rx_bytes += rx_bytes;
stats->tx_bytes += tx_bytes;
}
+
+ return stats;
}
static const struct net_device_ops ieee80211_dataif_ops = {

View File

@@ -0,0 +1,338 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -151,6 +151,15 @@ void ieee80211_recalc_idle(struct ieee80
ieee80211_hw_config(local, change);
}
+static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if (new_mtu < 256 || new_mtu > IEEE80211_MAX_DATA_LEN)
+ return -EINVAL;
+
+ dev->mtu = new_mtu;
+ return 0;
+}
+
static int ieee80211_verify_mac(struct ieee80211_sub_if_data *sdata, u8 *addr,
bool check_dup)
{
@@ -1168,6 +1177,7 @@ static const struct net_device_ops ieee8
.ndo_uninit = ieee80211_uninit,
.ndo_start_xmit = ieee80211_subif_start_xmit,
.ndo_set_rx_mode = ieee80211_set_multicast_list,
+ .ndo_change_mtu = ieee80211_change_mtu,
.ndo_set_mac_address = ieee80211_change_mac,
.ndo_select_queue = ieee80211_netdev_select_queue,
.ndo_get_stats64 = ieee80211_get_stats64,
@@ -1211,6 +1221,7 @@ static const struct net_device_ops ieee8
.ndo_uninit = ieee80211_uninit,
.ndo_start_xmit = ieee80211_monitor_start_xmit,
.ndo_set_rx_mode = ieee80211_set_multicast_list,
+ .ndo_change_mtu = ieee80211_change_mtu,
.ndo_set_mac_address = ieee80211_change_mac,
.ndo_select_queue = ieee80211_monitor_select_queue,
.ndo_get_stats64 = ieee80211_get_stats64,
@@ -1919,10 +1930,6 @@ int ieee80211_if_add(struct ieee80211_lo
netdev_set_default_ethtool_ops(ndev, &ieee80211_ethtool_ops);
- /* MTU range: 256 - 2304 */
- ndev->min_mtu = 256;
- ndev->max_mtu = IEEE80211_MAX_DATA_LEN;
-
ret = register_netdevice(ndev);
if (ret) {
ieee80211_if_free(ndev);
--- a/drivers/net/wireless/ath/wil6210/netdev.c
+++ b/drivers/net/wireless/ath/wil6210/netdev.c
@@ -42,6 +42,21 @@ static int wil_stop(struct net_device *n
return wil_down(wil);
}
+static int wil_change_mtu(struct net_device *ndev, int new_mtu)
+{
+ struct wil6210_priv *wil = ndev_to_wil(ndev);
+
+ if (new_mtu < 68 || new_mtu > mtu_max) {
+ wil_err(wil, "invalid MTU %d\n", new_mtu);
+ return -EINVAL;
+ }
+
+ wil_dbg_misc(wil, "change MTU %d -> %d\n", ndev->mtu, new_mtu);
+ ndev->mtu = new_mtu;
+
+ return 0;
+}
+
static int wil_do_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
{
struct wil6210_priv *wil = ndev_to_wil(ndev);
@@ -55,6 +70,7 @@ static const struct net_device_ops wil_n
.ndo_start_xmit = wil_start_xmit,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
+ .ndo_change_mtu = wil_change_mtu,
.ndo_do_ioctl = wil_do_ioctl,
};
@@ -111,7 +127,6 @@ static int wil6210_netdev_poll_tx(struct
static void wil_dev_setup(struct net_device *dev)
{
ether_setup(dev);
- dev->max_mtu = mtu_max;
dev->tx_queue_len = WIL_TX_Q_LEN_DEFAULT;
}
--- a/drivers/net/wireless/atmel/atmel.c
+++ b/drivers/net/wireless/atmel/atmel.c
@@ -1295,6 +1295,14 @@ static struct iw_statistics *atmel_get_w
return &priv->wstats;
}
+static int atmel_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > 2312))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
+
static int atmel_set_mac_address(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
@@ -1498,6 +1506,7 @@ static const struct file_operations atme
static const struct net_device_ops atmel_netdev_ops = {
.ndo_open = atmel_open,
.ndo_stop = atmel_close,
+ .ndo_change_mtu = atmel_change_mtu,
.ndo_set_mac_address = atmel_set_mac_address,
.ndo_start_xmit = start_tx,
.ndo_do_ioctl = atmel_ioctl,
@@ -1591,10 +1600,6 @@ struct net_device *init_atmel_card(unsig
dev->irq = irq;
dev->base_addr = port;
- /* MTU range: 68 - 2312 */
- dev->min_mtu = 68;
- dev->max_mtu = MAX_WIRELESS_BODY - ETH_FCS_LEN;
-
SET_NETDEV_DEV(dev, sys_dev);
if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) {
--- a/drivers/net/wireless/cisco/airo.c
+++ b/drivers/net/wireless/cisco/airo.c
@@ -2329,6 +2329,14 @@ static int airo_set_mac_address(struct n
return 0;
}
+static int airo_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > 2400))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
+
static LIST_HEAD(airo_devices);
static void add_airo_dev(struct airo_info *ai)
@@ -2648,6 +2656,7 @@ static const struct net_device_ops airo1
.ndo_get_stats = airo_get_stats,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
+ .ndo_change_mtu = airo_change_mtu,
};
static void wifi_setup(struct net_device *dev)
@@ -2659,8 +2668,6 @@ static void wifi_setup(struct net_device
dev->type = ARPHRD_IEEE80211;
dev->hard_header_len = ETH_HLEN;
dev->mtu = AIRO_DEF_MTU;
- dev->min_mtu = 68;
- dev->max_mtu = MIC_MSGLEN_MAX;
dev->addr_len = ETH_ALEN;
dev->tx_queue_len = 100;
@@ -2747,6 +2754,7 @@ static const struct net_device_ops airo_
.ndo_set_rx_mode = airo_set_multicast_list,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
+ .ndo_change_mtu = airo_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -2758,6 +2766,7 @@ static const struct net_device_ops mpi_n
.ndo_set_rx_mode = airo_set_multicast_list,
.ndo_set_mac_address = airo_set_mac_address,
.ndo_do_ioctl = airo_ioctl,
+ .ndo_change_mtu = airo_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -2813,7 +2822,6 @@ static struct net_device *_init_airo_car
dev->irq = irq;
dev->base_addr = port;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
- dev->max_mtu = MIC_MSGLEN_MAX;
SET_NETDEV_DEV(dev, dmdev);
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -6039,6 +6039,7 @@ static const struct net_device_ops ipw21
.ndo_open = ipw2100_open,
.ndo_stop = ipw2100_close,
.ndo_start_xmit = libipw_xmit,
+ .ndo_change_mtu = libipw_change_mtu,
.ndo_tx_timeout = ipw2100_tx_timeout,
.ndo_set_mac_address = ipw2100_set_address,
.ndo_validate_addr = eth_validate_addr,
@@ -6074,8 +6075,6 @@ static struct net_device *ipw2100_alloc_
dev->wireless_data = &priv->wireless_data;
dev->watchdog_timeo = 3 * HZ;
dev->irq = 0;
- dev->min_mtu = 68;
- dev->max_mtu = LIBIPW_DATA_LEN;
/* NOTE: We don't use the wireless_handlers hook
* in dev as the system will start throwing WX requests
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -11561,6 +11561,7 @@ static const struct net_device_ops ipw_p
.ndo_open = ipw_prom_open,
.ndo_stop = ipw_prom_stop,
.ndo_start_xmit = ipw_prom_hard_start_xmit,
+ .ndo_change_mtu = libipw_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
@@ -11586,9 +11587,6 @@ static int ipw_prom_alloc(struct ipw_pri
priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops;
- priv->prom_net_dev->min_mtu = 68;
- priv->prom_net_dev->max_mtu = LIBIPW_DATA_LEN;
-
priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
@@ -11621,6 +11619,7 @@ static const struct net_device_ops ipw_n
.ndo_set_rx_mode = ipw_net_set_multicast_list,
.ndo_set_mac_address = ipw_net_set_mac_address,
.ndo_start_xmit = libipw_xmit,
+ .ndo_change_mtu = libipw_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -11730,9 +11729,6 @@ static int ipw_pci_probe(struct pci_dev
net_dev->wireless_handlers = &ipw_wx_handler_def;
net_dev->ethtool_ops = &ipw_ethtool_ops;
- net_dev->min_mtu = 68;
- net_dev->max_mtu = LIBIPW_DATA_LEN;
-
err = sysfs_create_group(&pdev->dev.kobj, &ipw_attribute_group);
if (err) {
IPW_ERROR("failed to create sysfs device attributes\n");
--- a/drivers/net/wireless/intel/ipw2x00/libipw.h
+++ b/drivers/net/wireless/intel/ipw2x00/libipw.h
@@ -948,6 +948,7 @@ static inline int libipw_is_cck_rate(u8
/* libipw.c */
void free_libipw(struct net_device *dev, int monitor);
struct net_device *alloc_libipw(int sizeof_priv, int monitor);
+int libipw_change_mtu(struct net_device *dev, int new_mtu);
void libipw_networks_age(struct libipw_device *ieee, unsigned long age_secs);
--- a/drivers/net/wireless/intel/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
@@ -118,6 +118,15 @@ static void libipw_networks_initialize(s
&ieee->network_free_list);
}
+int libipw_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > LIBIPW_DATA_LEN))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
+EXPORT_SYMBOL(libipw_change_mtu);
+
struct net_device *alloc_libipw(int sizeof_priv, int monitor)
{
struct libipw_device *ieee;
--- a/drivers/net/wireless/intersil/hostap/hostap_main.c
+++ b/drivers/net/wireless/intersil/hostap/hostap_main.c
@@ -765,6 +765,16 @@ static void hostap_set_multicast_list(st
}
+static int prism2_change_mtu(struct net_device *dev, int new_mtu)
+{
+ if (new_mtu < PRISM2_MIN_MTU || new_mtu > PRISM2_MAX_MTU)
+ return -EINVAL;
+
+ dev->mtu = new_mtu;
+ return 0;
+}
+
+
static void prism2_tx_timeout(struct net_device *dev)
{
struct hostap_interface *iface;
@@ -803,6 +813,7 @@ static const struct net_device_ops hosta
.ndo_do_ioctl = hostap_ioctl,
.ndo_set_mac_address = prism2_set_mac_address,
.ndo_set_rx_mode = hostap_set_multicast_list,
+ .ndo_change_mtu = prism2_change_mtu,
.ndo_tx_timeout = prism2_tx_timeout,
.ndo_validate_addr = eth_validate_addr,
};
@@ -815,6 +826,7 @@ static const struct net_device_ops hosta
.ndo_do_ioctl = hostap_ioctl,
.ndo_set_mac_address = prism2_set_mac_address,
.ndo_set_rx_mode = hostap_set_multicast_list,
+ .ndo_change_mtu = prism2_change_mtu,
.ndo_tx_timeout = prism2_tx_timeout,
.ndo_validate_addr = eth_validate_addr,
};
@@ -827,6 +839,7 @@ static const struct net_device_ops hosta
.ndo_do_ioctl = hostap_ioctl,
.ndo_set_mac_address = prism2_set_mac_address,
.ndo_set_rx_mode = hostap_set_multicast_list,
+ .ndo_change_mtu = prism2_change_mtu,
.ndo_tx_timeout = prism2_tx_timeout,
.ndo_validate_addr = eth_validate_addr,
};
@@ -838,8 +851,6 @@ void hostap_setup_dev(struct net_device
iface = netdev_priv(dev);
ether_setup(dev);
- dev->min_mtu = PRISM2_MIN_MTU;
- dev->max_mtu = PRISM2_MAX_MTU;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
/* kernel callbacks */
--- a/drivers/net/wireless/intersil/orinoco/main.c
+++ b/drivers/net/wireless/intersil/orinoco/main.c
@@ -322,6 +322,9 @@ int orinoco_change_mtu(struct net_device
{
struct orinoco_private *priv = ndev_priv(dev);
+ if ((new_mtu < ORINOCO_MIN_MTU) || (new_mtu > ORINOCO_MAX_MTU))
+ return -EINVAL;
+
/* MTU + encapsulation + header length */
if ((new_mtu + ENCAPS_OVERHEAD + sizeof(struct ieee80211_hdr)) >
(priv->nicbuf_size - ETH_HLEN))
@@ -2285,9 +2288,6 @@ int orinoco_if_add(struct orinoco_privat
dev->base_addr = base_addr;
dev->irq = irq;
- dev->min_mtu = ORINOCO_MIN_MTU;
- dev->max_mtu = ORINOCO_MAX_MTU;
-
SET_NETDEV_DEV(dev, priv->dev);
ret = register_netdev(dev);
if (ret)

View File

@@ -0,0 +1,43 @@
--- a/backport-include/linux/string.h
+++ b/backport-include/linux/string.h
@@ -25,4 +25,8 @@ extern void *memdup_user_nul(const void
void memzero_explicit(void *s, size_t count);
#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0))
+ssize_t strscpy(char *dest, const char *src, size_t count);
+#endif
+
#endif /* __BACKPORT_LINUX_STRING_H */
--- a/compat/backport-4.3.c
+++ b/compat/backport-4.3.c
@@ -57,3 +57,29 @@ void seq_hex_dump(struct seq_file *m, co
}
}
EXPORT_SYMBOL_GPL(seq_hex_dump);
+
+ssize_t strscpy(char *dest, const char *src, size_t count)
+{
+ long res = 0;
+
+ if (count == 0)
+ return -E2BIG;
+
+ while (count) {
+ char c;
+
+ c = src[res];
+ dest[res] = c;
+ if (!c)
+ return res;
+ res++;
+ count--;
+ }
+
+ /* Hit buffer length without finding a NUL; force NUL-termination. */
+ if (res)
+ dest[res-1] = '\0';
+
+ return -E2BIG;
+}
+EXPORT_SYMBOL_GPL(strscpy);

View File

@@ -0,0 +1,85 @@
From 6232c17438ed01f43665197db5a98a4a4f77ef47 Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Thu, 2 Feb 2017 10:57:40 +0100
Subject: [PATCH 01/19] rt2x00: avoid introducing a USB dependency in the
rt2x00lib module
As reported by Felix:
Though protected by an ifdef, introducing an usb symbol dependency in
the rt2x00lib module is a major inconvenience for distributions that
package kernel modules split into individual packages.
Get rid of this unnecessary dependency by calling the usb related
function from a more suitable place.
Cc: Vishal Thanki <vishalthanki@gmail.com>
Reported-by: Felix Fietkau <nbd@nbd.name>
Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 23 ++++++++---------------
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 5 +++++
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index 8fcbc8dc94c1..4b08007f93f7 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1436,21 +1436,6 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
cancel_work_sync(&rt2x00dev->intf_work);
cancel_delayed_work_sync(&rt2x00dev->autowakeup_work);
cancel_work_sync(&rt2x00dev->sleep_work);
-#if IS_ENABLED(CPTCFG_RT2X00_LIB_USB)
- if (rt2x00_is_usb(rt2x00dev)) {
- usb_kill_anchored_urbs(rt2x00dev->anchor);
- hrtimer_cancel(&rt2x00dev->txstatus_timer);
- cancel_work_sync(&rt2x00dev->rxdone_work);
- cancel_work_sync(&rt2x00dev->txdone_work);
- }
-#endif
- if (rt2x00dev->workqueue)
- destroy_workqueue(rt2x00dev->workqueue);
-
- /*
- * Free the tx status fifo.
- */
- kfifo_free(&rt2x00dev->txstatus_fifo);
/*
* Kill the tx status tasklet.
@@ -1466,6 +1451,14 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
*/
rt2x00lib_uninitialize(rt2x00dev);
+ if (rt2x00dev->workqueue)
+ destroy_workqueue(rt2x00dev->workqueue);
+
+ /*
+ * Free the tx status fifo.
+ */
+ kfifo_free(&rt2x00dev->txstatus_fifo);
+
/*
* Free extra components
*/
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index 838ca58d2dd6..5a2bf9f63cd7 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -744,6 +744,11 @@ void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev)
{
struct data_queue *queue;
+ usb_kill_anchored_urbs(rt2x00dev->anchor);
+ hrtimer_cancel(&rt2x00dev->txstatus_timer);
+ cancel_work_sync(&rt2x00dev->rxdone_work);
+ cancel_work_sync(&rt2x00dev->txdone_work);
+
queue_for_each(rt2x00dev, queue)
rt2x00usb_free_entries(queue);
}
--
2.12.1

View File

@@ -0,0 +1,61 @@
From 93c7018ec16bb83399dd4db61c361a6d6aba0d5a Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Wed, 8 Feb 2017 12:18:09 +0100
Subject: [PATCH 02/19] rt2x00usb: do not anchor rx and tx urb's
We might kill TX or RX urb during rt2x00usb_flush_entry(), what can
cause anchor list corruption like shown below:
[ 2074.035633] WARNING: CPU: 2 PID: 14480 at lib/list_debug.c:33 __list_add+0xac/0xc0
[ 2074.035634] list_add corruption. prev->next should be next (ffff88020f362c28), but was dead000000000100. (prev=ffff8801d161bb70).
<snip>
[ 2074.035670] Call Trace:
[ 2074.035672] [<ffffffff813bde47>] dump_stack+0x63/0x8c
[ 2074.035674] [<ffffffff810a2231>] __warn+0xd1/0xf0
[ 2074.035676] [<ffffffff810a22af>] warn_slowpath_fmt+0x5f/0x80
[ 2074.035678] [<ffffffffa073855d>] ? rt2x00usb_register_write_lock+0x3d/0x60 [rt2800usb]
[ 2074.035679] [<ffffffff813dbe4c>] __list_add+0xac/0xc0
[ 2074.035681] [<ffffffff81591c6c>] usb_anchor_urb+0x4c/0xa0
[ 2074.035683] [<ffffffffa07322af>] rt2x00usb_kick_rx_entry+0xaf/0x100 [rt2x00usb]
[ 2074.035684] [<ffffffffa0732322>] rt2x00usb_clear_entry+0x22/0x30 [rt2x00usb]
To fix do not anchor TX and RX urb's, it is not needed as during
shutdown we kill those urbs in rt2x00usb_free_entries().
Cc: Vishal Thanki <vishalthanki@gmail.com>
Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index 5a2bf9f63cd7..fe13dd07cc2a 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -319,10 +319,8 @@ static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void *data)
entry->skb->data, length,
rt2x00usb_interrupt_txdone, entry);
- usb_anchor_urb(entry_priv->urb, rt2x00dev->anchor);
status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
- usb_unanchor_urb(entry_priv->urb);
if (status == -ENODEV)
clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
@@ -410,10 +408,8 @@ static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void *data)
entry->skb->data, entry->skb->len,
rt2x00usb_interrupt_rxdone, entry);
- usb_anchor_urb(entry_priv->urb, rt2x00dev->anchor);
status = usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
if (status) {
- usb_unanchor_urb(entry_priv->urb);
if (status == -ENODEV)
clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
--
2.12.1

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