Commit Graph

459 Commits (24a7ccb0562a867e363a10ebdc64e3aaa6f01cd2)

Author SHA1 Message Date
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau df93d53a4b mac80211: update to wireless-testing 2016-05-12
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 98010ab489 kernel: remove ocf support, cryptodev-linux should be used instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 6bece706ec mac80211: ath9k: enable GPIO buttons
Enable platform-defined GPIO button support for ath9k device.
Key poller is activated for attached platform buttons.
Requires ath9k GPIO chip access.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48921
8 years ago
John Crispin 3a03c08c82 AR8216: improve mmd register access
Combine all bus operations for one MMD access in one function.
Protecting all these bus operations with one lock also helps
to avoid potential issues due to bus operations intercepting
the register and data write.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 48914
8 years ago
John Crispin d3776bdfc9 AR8216: make ARL age time configurable
The default TTL for address resolution table entries is 5 minutes
for all members of the AR8216 family. This can cause issues if
e.g. Wifi clients roam to another AP and their MAC appears on
another switch port suddenly. Then the client may not be reachable
until the old ARL entry expires.
I would have expected the switch to invalidate old entries if it
detects the same MAC on another port. But that's not the case.

Therefore make the TTL for ARL entries configurable.
The effective TTL will always be a multiple of 7 seconds.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 48913
8 years ago
John Crispin 4eaa750089 AR8216: remove redundant port number in MIB header line
The line before includes the port number anyway so there's no need
to duplicate the port number in the MIB info header.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 48912
8 years ago
John Crispin f03ec2baf7 AR8216: complement MIB counters with info in GiB / MiB / KiB
The decimal values especially for TxByte and RxGoodByte are hard to read
once bigger amounts of data have been transferred.
Therefore complement the decimal values with info in GiB / MiB / KiB.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 48911
8 years ago
John Crispin 76e1efc042 AR8216: don't display MIB counters if all are empty
For unused switch ports all MIB values are zero. Displaying ~40 empty
MIB counters is just confusing and makes it hard to read the output of
swconfig dev <dev> show.
Therefore, if all MIB counters for a port are zero, just display
an info that the MIB counters are empty.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 48910
8 years ago
Felix Fietkau a8c15c0204 mac80211: ath9k: enable platform WLAN LED name
Enable platform-supplied WLAN LED name for ath9k device.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Acked-by: Hartmut Knaack <knaack.h@gmx.de>

SVN-Revision: 48879
8 years ago
Felix Fietkau d527b82862 switch: allow Ethernet port LEDs to show specific port speeds only
This patch adds speed_mask special file to LEDs connected to switch ports
via 'switch' trigger. It allows to choose which speeds to signal when link
is up. If router has more than one LED per port, they may light up
differently depending on how fast connection is. Default setting is 'all
speeds' so backward compatibility with system scripts (for example uci) is
maintained.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48775
8 years ago
Felix Fietkau f61a80444c switch: make LED port_mask file write handler use kstrtoul() function
This patch changes swconfig_trig_port_mask_store() handler to utilize
kstrtoul() function instead of call to obsolete simple_strtoul(). Thanks
to this change, new handler takes less memory and makes port_mask special
file accept not only hexadecimal, but also decimal and octal numbers.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>

SVN-Revision: 48774
8 years ago
Rafał Miłecki 319863f60e kernel: mtdsplit: support uimage with UBI
This patch adds uimage firmware split support for ubi.

Signed-off-by: YounJae Rho <luxflow@live.com>

SVN-Revision: 48755
8 years ago
Rafał Miłecki 1a57ce0c03 kernel: mtdsplit: add missing digest field to Seama header
Seama format has 2 similar headers: container (seal) header and entity
header. The first one has size always set to 0 and doesn't contain MD5
digest.

When dealing with Seama on a flash we deal directly with an entity. You
can see mtdsplit_parse_seama reads from offset 0 and expects entity to
be there. Seama container is used by bootloader / interface only which
extract entity out of it and flash it.

That said we should fix our header struct. This is important as we
calculate possible rootfs offset assuming it may be placed right after
Seama entity. So far calculate offset was always 16B too low.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48754
8 years ago
Rafał Miłecki 6831bac31f b53: support setting port link
When dealing with Broadcom hardware we can simply use swconfig's generic
helper, we just need to do some validation of requested state.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48623
8 years ago
Rafał Miłecki b3c3542515 b53: provide PHY access to swconfig
Thanks to this change swconfig can access port PHYs e.g. when setting
port link state with a generic helper.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48622
8 years ago
Rafał Miłecki 19b9e14c47 swconfig: add (PHY) generic helper setting port link
It's quite common for switches to have PHY per port so adding a generic
helper setting link state will help many drivers. It just needs an API
to access PHYs which this patch also adds.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48621
8 years ago
Rafał Miłecki 9220dd5d36 kernel: mtdsplit: support Seama entity with UBI
Some D-Link routers (e.g. DIR-885L) have NAND and use Seama format. It
means OpenWrt will want to have UBI in Sseama entity and should be able
to detect it.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48600
8 years ago
Rafał Miłecki 4156f292c1 kernel: mtdsplit: detect UBI partition when looking for rootfs
This allows mtdsplit parsers work with UBI which is very popular on
NAND flases.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48599
8 years ago
Rafał Miłecki e1491b341b kernel: mtdsplit: modify rootfs helpers to provide partition type
Our mtdsplit parsers may want to create partition with name choice based
on partition file system (e.g. SquashFS vs. JFFS2). This patch allows
passing extra argument pointing to variable that will be set properly.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48598
8 years ago
Rafał Miłecki 02abeb3b0a kernel: mtdsplit: document Seama splitter a bit
Rename kernel_size variable as it includes whole entity size, not just a
kernel size. Also update comments to match it and describe better what
are we checking/looking for.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48480
8 years ago
Jonas Gorski a9b4952be1 swconfig: simplify init code
Directly return the return value of genl_register_family_with_ops()
instead of storing it in a temporary variable, then returning it.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 48472
8 years ago
Jonas Gorski 38719ecca4 swconfig: drop linux < 3.13 code paths
The oldest kernel we support is 3.18, no need to keep code paths
for older kernels.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 48471
8 years ago
John Crispin ed72c5f846 ar71xx: add support for Netgear WPN824N
Add support for Netgear WPN824N.
Hardware specs:
  * AR7240, 4 LAN ports, 1 WAN port
  * AR9285 WLAN
  * 32 MB RAM
  * 4 MB Flash
  * 16 LEDs (LAN, WAN and Power/Status contain two LEDs for dual color
    effect)
  * 3 Buttons (not supported)

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>

SVN-Revision: 48356
9 years ago
Jonas Gorski 2b3b4c95f1 b53: update header register difinitions
BCM531x5 has two pontential cpu ports, and header mode can be enabled
independently on both.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 48302
9 years ago
Felix Fietkau f8d2ec6e9d ar8327: add IGMP Snooping support
This add support for IGMP Snooping on atheros switches (disabled by default),
which avoids flooding the network with multicast data.

Tested on TL-WDR4300: disabling IGMP Snooping results in multicast flooding
on each specific port, enabling it back again prevents each port from
receiving all multicast packets.

Partially based on: http://patchwork.ozlabs.org/patch/418122/

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 48268
9 years ago
Felix Fietkau 7703e14bc4 kernel: mtdsplit_squashfs: Align with the erase-block size
On most image types the rootfs ends at an erase-block. However, at least
with brnImages this is not the case: while the partitions are aligned
with the erase-block size there is a 12 byte footer at the end of the
partition which must not be touched by any filesystem. This lead to a
rootfs_data partition which was not aligned properly (and thus ended up
being readonly):
	0x000000480000-0x00000085a800 : "rootfs_data" (128 KiB EB)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48263
9 years ago
Felix Fietkau 651083bbd9 kernel: mtdsplit: add support for EVA images
This allows splitting EVA images (usually found in fritz devices). The
firmware will be split into a kernel and a separate rootfs partition.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48262
9 years ago
Felix Fietkau bdd2772f1d kernel: mtdsplit: add support for brnImages
This adds brnImage (used with the brnboot bootloader) firmware parsing
support. brnboot verifies the integrity of the firmware stored on the
"Code Image" partitions by looking at the 12 byte footer at the very end
of the partition. This footer contains the checksum of the original
brnImage (kernel + rootfs/squashfs) and must not be touched (by our JFFS2
rootfs_data - otherwise the image will not be bootable anymore).

Big thanks to Mathias Kresin for analyzing the brnImage structure and
finding out the information how to keep images valid even when adding a
nested rootfs_data partition.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48261
9 years ago
Rafał Miłecki 5f69279dd6 swconfig: add API for setting port link speed
Some switches can force link speed for a port. Let's add API that will
allow drivers to export this feature.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48142
9 years ago
Rafał Miłecki b836a7c29d ledtrig-netdev: don't stop timer on events for different interfaces
This fixes regression introduced in my recent ledtrig-netdev commit.
Events triggered by different interfaces were stopping timer so it
wasn't working for tx/rx mode.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 48072
9 years ago
John Crispin df165974c3 ledtrig-netdev: add support for renamed devices
The ppp0 interface is renamed after the connection is established. Due
to a missing NETDEV_REGISTER event, the ledtrig-netdev isn't aware of
the renamed interface and literally ignores the device
(no tx/rx indication, led isn't switched off with 'ifdown wan').

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48048
9 years ago
John Crispin 71cd537a8a swconfig: switch kernel PORT_LINK support to SWITCH_TYPE_LINK
As explained earlier, using SWITCH_TYPE_LINK gives more flexibility,
it doesn't require e.g. string parsing to read some data.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47999
9 years ago
John Crispin 67e10d757f swconfig: add SWITCH_TYPE_LINK and support sending link info to user space
So far we were sending link data as a string. It got some drawbacks:
1) Didn't allow writing clean user space apps reading link state. It was
   needed to do some screen scraping.
2) Forced whole PORT_LINK communication to be string based. Adding
   support for *setting* port link required passing string and parting
   it in the kernel space.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47997
9 years ago
Rafał Miłecki e9e3a0682c ledtrig-netdev: reset link status & stats after changing device_name
Previously switching to non-existing device (interface) could result in
leaving LED on.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47990
9 years ago
Rafał Miłecki 2b1129a7ba ledtrig-netdev: drop locking from timer callback function
We may just delete timer on every trigger update and then start it again
if needed. This will let us avoid both: races and locking in frequently
called timer callback.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47987
9 years ago
Rafał Miłecki a56aaf73b9 ledtrig-netdev: switch rwlock to spinlock
Read/write lock was adding useless complexity, there wasn't any real
gain in case of this driver.
Also switch to _bh variants to avoid deadlocks.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47986
9 years ago
Rafał Miłecki 8996164e56 ledtrig-netdev: update base driver instead of patching it for every kernel
All supported kernels require patching ledtrig-netdev in the same way,
so it's safe to just move these changes to the base version of this
driver. We needed these patches for some old kernels 2.6.36 and 3.11.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47962
9 years ago
Felix Fietkau 814d70b2fd ar8216: rework/fix AR8337 MAC swap handling
In r45970 the MAC swap handling was made opt-in, however some boards
have been forgotten during the conversion. Since the reference design
uses this MAC swapping, and pretty much all known boards using this chip
seem to do so too, enabling the swapping is a more reasonable default
than leaving it disabled.

Change the code to still allow boards to opt-out of this.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47956
9 years ago
John Crispin 932bc8d5eb ath9k: Allow configuration of LED polarity in platform data.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 47910
9 years ago
Jonas Gorski 813227d992 kernel: mvswitch: merge 3.10+ compile fix into the code
The lowest we support is 3.18, so no need to keep it as a separate
patch.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 47749
9 years ago
John Crispin 7fe0940c69 generic: fix adm6996 init
Kernel 3.14 added aditional genphy_soft_reset phy reset to phy_init_hw in drivers/net/phy/phy_device.c
Since adm6996 does in driver soft reset and doesn't use BMCR_RESET for soft reset
add dummy soft_reset callback to adm6996 driver, like it is done in ar8216.

This fixes ticket #20147

Signed-off-by: Andrej Vlasic <andrej.vlasic0@gmail.com>

SVN-Revision: 47272
9 years ago
Rafał Miłecki 792f31bd10 kernel: crypto: fix ubsec_ssb.c compilation with 4.0+
SSB_DEVTABLE_END was removed in 4.0 by upstream commit 673e2baaa6d9
("treewide: Remove unnecessary SSB_DEVTABLE_END macro").

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 47047
9 years ago
Felix Fietkau 18c01061a9 mvsw61xx: match swconfig function names
Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 46865
9 years ago
Felix Fietkau b75d188b21 mvsw61xx: use standard swconfig get_port_link
The previous "link" and "status" functions were non-standard,
and thus less useful for parsing.

Signed-off-by: Claudio Leite <leitec@staticky.com>

SVN-Revision: 46864
9 years ago
Felix Fietkau e6fb730daa yaffs2: remove __TIME__ __DATE__ macros
prevent compiler errors with gcc 4.9
increase reproducibility

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46858
9 years ago
Imre Kaloz 9cca6c5ad9 Previously, all VLANs (port-based or 802.1q) were sharing a single database in the ATU. This created problems in the case of a system where two ports/devices share a MAC address (e.g. Linksys WRT1900AC eth0/eth1).
This also clears any bootloader-set FDB defaults. This had
caused issues creating port-based VLANs when mappings
overlapped previous VLANs. Packets destined to a port
not in the default port group flooded all ports.

Tested on a 88E6171 (Linksys EA4500) and 88E6172 ('1900AC)

Signed-off-by: Claudio Leite <leitec@staticky.com>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 46699
9 years ago
John Crispin 6d461ddbb2 generic: crypto: remove IRQF_DISABLED
no-op since 2.6.35
    removed in Kernel 4.1
    see https://lwn.net/Articles/380931/

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46671
9 years ago
Hauke Mehrtens b1bd85c40e kernel: yaffs2: update to version from 2015-06-02
In addition to the update this also fixes compile problems with kernel 4.1.

This closes #20323.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46609
9 years ago
Felix Fietkau b04b1ca933 ar8216: add swconfig attributes for ARL table flushing
Add swconfig attributes for flushing the ARL table globally or per port.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

SVN-Revision: 46382
9 years ago