Commit Graph

510 Commits (6254a2028c181fe9863dc7758d47eda667b4f397)

Author SHA1 Message Date
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
Felix Fietkau 33b72b8e0f ar8216: adjust ATU flushing in case of link changes
If a link goes down, don't flush the complete ARL table.
Only flush the entries for the respective port.
Don't touch ARL table if a link goes up.

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

SVN-Revision: 46381
9 years ago
Felix Fietkau 00e599b0b7 ar8216: add ARL table flushing per port
Adds functions for flushing ARL table entries per port.

Successfully tested on AR8327. Implementation for AR8216/AR8236/AR8316
is based on the AR8236 datasheet and assumes that the three chips
share a common ATU register layout.
Compile-tested only for AR8216/AR8236/AR8316.

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

SVN-Revision: 46380
9 years ago
Felix Fietkau 2666403c3a ar8216: add reading ARL table for AR8216/AR8236/AR8316
Adds the chip-specific part of reading ARL table for AR8216/AR8236/AR8316.

It's based on the AR8236 datasheet and compile-tested only as I couldn't
find datasheets for AR8216/AR8316 and don't own devices with these chips.

The existing ar8216_atu_flush implementation was used for all three
chip types, therefore I guess they share a common ATU register layout.

More testing would be appreciated.

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

SVN-Revision: 46379
9 years ago
John Crispin 096b3759a9 build: Prevent more gzip timestamps
To improve reproducibility, prevent the inclusion of timestamps
in the gzip header.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46361
9 years ago
Hauke Mehrtens d0aca89c18 kernel: b53: fix build with brcm47xx
The position of the nvram header file on brcm47xx changed with kernel
version 4.1.

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

SVN-Revision: 46170
9 years ago
Rafał Miłecki 5c809ecfe7 b53: Allow using all 8 ports on BCM53011
On two tested devices: Netgear R6250 (BCM53011 rev 2) and Luxul XWC-1000
(BCM53011 rev 3) it was possible to use port 7 and eth1 (instead of port
5 and eth0). It seems BCM53011 just like BCM53012 has 8 ports and
usually 3 of them are connected to the SoC.

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

SVN-Revision: 46104
9 years ago
Felix Fietkau 4a9d726200 ar8216: Fix problem with AR8337 MAC swap handling
AR8337 supports a configuration bit to swap MAC0 and MAC6.
Currently this is set in general if an AR8337 is detected and causes
issues with devices using an AR8334 (internally an AR8337, just
less chip pins).
And it might even cause issues with AR8337-based devices with
different board designs.

Swapping the MAC's however isn't needed for AR8337 in general.
It's just needed in case of certain board designs (affected devices
seem to be based on Atheros reference board AP135/136-010).
Therefore this configuration bit should be moved to platform data.

The patch includes the needed changes to the device initialization
code of affected devices. Hopefully I didn't miss any ..

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

SVN-Revision: 45970
9 years ago
Jonas Gorski 9fbd6d0ba0 b53: fix memory out of bounds access on 64 bit targets
On device reset the sizes for the vlan and port tables were wrongly
calculated based on the pointer size instead of the struct size. This
causes buffer overruns on 64 bit targets, resulting in panics.

Fix this by dereferencing the pointers.

Reported-by: Fedor Konstantinov <blmink@mink.su>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45938
9 years ago
Jonas Gorski d24d5412ff b53: widen stp state mask to 3 bits (instead of 2)
At least on my b53 chip, the mask is 3 bits wide, and because
of this some STP states are not set properly and discarded when read.

Maybe for some other chips it makes sense to have just 2 bits width,
but I don't have other versions around to test/validate.

If that's the case then maybe we could add another STP state mask.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45937
9 years ago
Rafał Miłecki e93c68eedd b53: Allow using all ports on BCM53012
This chipset has at least 8 usable ports, e.g. Netgear R8000 has ports
5, 7 and 8 connected to Ethernet interfaces:
vlan1ports=0 1 2 3 5 7 8*
vlan2ports=4 8u
Port 6 seems to be always disabled.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45676
9 years ago
Rafał Miłecki 06ac2f5c74 b53: improve overriding CPU port state on BCM5301X
On BCM5301X there are two different cases to handle: CPU port 8 vs. any
other one. Support for CPU port 8 was already partially implemented but
it lacked setting some extra bit for 2G speed. It also will need to be
extended to implement "SMP dual core 3 GMAC setup". That's the reason
for handling it in separated code block.
This patch also adds overriding CPU port state for port other than 8. It
requires using recently defined GMII_PORT registers.
It was tested for regressions on BCM53011 revs 2 & 3. It was also
confirmed to fix switch on some internal Broadcom board.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45402
9 years ago
Jonas Gorski 4e826d8303 b53: clean up code to match kernel style better
* properly enclose macro arguments in paranthesis on use
* remove trailing white space
* convert C99 // comments
* add missing blank lines after declaration
* remove braces from single statement blocks
* split lines > 80 chars (except for one)

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

SVN-Revision: 45356
9 years ago
Jonas Gorski 61885f95f0 b53: define registers available and needed on BCM5301X
They are also present on some BCM63xx switches.

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

SVN-Revision: 45355
9 years ago
Gabor Juhos 82f0308be9 kernel: update yaffs code to the latest version
Use the latest version of the yaffs code. Fetched from the
yaffs2 git tree and it is based on the following commit:

  commit 7e5cf0fa1b694f835cdc184a8395b229fa29f9ae
  Author: Charles Manning <cdhmanning@gmail.com>
  Date:   Thu Aug 7 11:25:05 2014 +1200

    yaffs-direct: Basic tests. Add lpthread flag for background gc support

    Signed-off-by: Charles Manning <cdhmanning@gmail.com>

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 45188
9 years ago
Jonas Gorski 87568ebeac b53: reverse duplex bit meaning for IMP state override register
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44875
9 years ago
John Crispin 9a863f803e kernel: mtdsplit: add support for FIT image
If this option is enabled, the FIT image format will be detected and
split by the mtdsplit code. Detection is based upon the FDT magic, which
will trigger the parsing and detection of the rootfs, ending-up in the
creation of the 2 new partitions.

Signed-off-by: Mathieu Olivari <mathieu@codeaurora.org>

SVN-Revision: 44792
9 years ago
Jonas Gorski 085b8e0014 b53: global config is part of the management page, not the control page
It will now actually enable the mib counters instead of enabling rx/tx for
the first switch port.

Reported-by: Daniel Gonzalez <dgcbueu@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44788
9 years ago
John Crispin 57c7bed820 swconfig: fix build with linux 4.0
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 44617
9 years ago
Jonas Gorski d75cd5be37 b53: fix mmap register read/writes > 32 bit
For bcm63xx integrated switches, broadcom changed the data endianess
to match the system endianess. But this only applies to within one word,
which causes 48/64 bit values to be still split into their "litte endian"
groups.

E.g. 48 bit values (with 5 being the most significant byte) aligned

0x00 ..01  or   0123
0x04 2345       45..

will become

0x00 ..10 resp. 3210
0x04 5432       54..

Likewise for 64 bit values.

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

SVN-Revision: 44568
9 years ago
Nicolas Thill 40c0261f34 generic: ocf: irq compat stuff is not needed anymore
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 44444
10 years ago
Rafał Miłecki 615909819d kernel: mtdsplit_uimage: fix passed info about buf size
We obviously can't use sizeof(*buf) which is always 1.

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

SVN-Revision: 44424
10 years ago
Rafał Miłecki 30d6bc1026 kernel: mtdsplit_uimage: read more data to match Edimax needs
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 44415
10 years ago
Rafał Miłecki 072759ff39 kernel: mtdsplit_uimage: use separated buffer for reading data
We shouldn't read data directly into the header struct, as some devices
(e.g. Edimax) need more bytes due to some extra header.

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

SVN-Revision: 44414
10 years ago
Rafał Miłecki 5673e0b703 kernel: mtdsplit_uimage: add parser for Edimax devices
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 44413
10 years ago
Rafał Miłecki 1aed104c80 mtdsplit_uimage: more generic header verify function
Some devices have uImage headers after some extra headers (e.g. Edimax
devices). To support such cases our verify callback function should be
allowed to return header offset, not just a boolean value.

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

SVN-Revision: 44412
10 years ago
John Crispin 28353b3fc5 kernel: fix compile error inside adm6996.c
drivers/net/phy/adm6996.c:881:5: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'u32' [-Wformat=]

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44333
10 years ago
John Crispin baaef42952 ar71xx: Revert "added board support for compex wpj558"
This reverts commit f7873071561d82e75ba2dc46433a2982fef8ac6f.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44245
10 years ago
John Crispin bc906ca59e added board support for compex wpj558
Signed-off-by: Christian Mehlis <christian@m3hlis.de>

SVN-Revision: 44237
10 years ago
John Crispin 31fd66f808 ar71xx: add Netgear WNR1000v2/WNR1000v2-VC support (#18633)
The board is already supported by OpenWrt. WNR1000v2/WNR1000v2-VC are
pretty much the same as WNR2000v3/WNR612v2, therefore the same
initialization code and flash layout is used.

Signed-off-by: Ștefan Rusu <saltwaterc@gmail.com>
Tested-by: Douglas Fraser <1dsfraser@gmail.com>

SVN-Revision: 44221
10 years ago
Felix Fietkau f7ece95303 ar8216: prefix mii_xxx functions to avoid kernel namespace pollution
Prefix the exported mii_xxx32 functions with ar8xxx_
to avoid kernel namespace pollution.

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

SVN-Revision: 44105
10 years ago
Felix Fietkau 3a313a3e11 ar8216: add swconfig attribute to display ARL table on AR8327/AR8337
Add global read-only swconfig attribute "arl_table" to display the
address resolution table.
So far the chip-specific part is implemented for AR8327/AR8337 only
as I don't have the datasheets for the other AR8XXX chips.

Successfully tested on TL-WDR4300 (AR8327rev2)
and TL-WDR4900 (AR8327rev4).

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

SVN-Revision: 44104
10 years ago
Felix Fietkau 6ce848f622 ar8216: decrease page switch wait time
Until a few years ago the page switch wait time was set to msleep(1)
what was changed to usleep_range(1000, 2000) later.

I can not imagine that a low-level operation like switching page
on register level takes so much time.
Most likely the value of 1ms was initially set to check whether
it fixes an issue and then remained w/o further checking whether
also a smaller value would be sufficient.

Now the wait time is set to 5us and I successfully tested this on
AR8327. IMHO 5us should be plenty of time for all supported chips.
However I couldn't test this due to missing hardware.

If other chips should need a longer wait time we can add the
wait time as a parameter to the ar8xxx_chip struct.

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

SVN-Revision: 44103
10 years ago
Felix Fietkau a1fba9dfbe ar8216: add link change detection for switch ports
Check for switch port link changes and
- flush ATU in case of a change
- report link change via syslog

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

SVN-Revision: 44102
10 years ago
Felix Fietkau 74146c62c0 ar8216: fix ATU flushing
The functionality to flush the address translation table contains two bugs
which luckily compensate each other.
1. Just setting the operation is not sufficient to perform the flushing.
   The "active" bit needs to be set to actually trigger an action.
   For the vtu operations this is implemented correctly.
2. ar8xxx_phy_read_status is called every 2s by the phy state machine
   to check for link changes. This would have caused an ATU flush
   every 2s.

Fix the chip-specific ATU flush functions and remove the ATU flush call
from ar8xxx_phy_read_status.

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

SVN-Revision: 44101
10 years ago
Felix Fietkau 6dfea16ab9 ar8216: display flow control info in swconfig get_link in case of autonegatiation too
The swconfig get_link attribute (at least) on AR8327/AR8337 doesn't
consider the autonegotiated flow control.
AR8327/AR8337 provide the info about autonegotiated rx/tx flow control
in bits 10 and 11 of the port status register.
Use these values to display info about autonegotiated rx/tx flow
control as part of the get_link attribute.

Successfully tested on TL-WDR4900 (AR8327 rev.4) and
TL-WDR4300 (AR8327 rev.2).

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

SVN-Revision: 44023
10 years ago
Felix Fietkau 53c0c6054f ar8216: add 802.3az EEE info to swconfig get_link attribute
AR8327/AR8337 allow to read the result of EEE autonegotiation.
If EEE is autonegotiated between the link partners, display
this as part of the swconfig get_link attribute.

eee100:  100MBit EEE supported by both link partners
eee1000: 1GBit EEE supported by both link partners

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

SVN-Revision: 44022
10 years ago
Felix Fietkau bdc0750191 ar8216: introduce enable_eee swconfig attribute to control 802.3az EEE per port
Users reported network issues with AR8327 which turned out to be caused
by EEE not working correctly with certain link partners (ticket 14597).
The workaround was to disable EEE on all ports (changeset 41577).

The issue was with certain link partners only, therefore this patch
allows to control usage of EEE per port via swconfig.
Still the default is to initially disable EEE on all ports.

Successfully tested on a TL-WDR4900 (AR8327 rev.4)

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

SVN-Revision: 44021
10 years ago
John Crispin 64ccdb98fb ar8216: introduce ar8xxx_reg_clear complementing ar8xxx_reg_set
Introduce ar8xxx_reg_clear complementing ar8xxx_reg_set.

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

SVN-Revision: 44004
10 years ago
John Crispin 0fb39e6f4b ar8216: replace ar8xxx_rmw with ar8xxx_reg_set where appropriate
Replace ar8xxx_rmw with ar8xxx_reg_set where appropriate.

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

SVN-Revision: 44003
10 years ago
John Crispin 1cb2596f19 ar8216: define all switch_addr structs as const
Define all switch_addr structs as const.

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

SVN-Revision: 44002
10 years ago
Luka Perkov 9db3df9d6b mvsw61xx: track and set per-VLAN port state in STU
Since the driver doesn't know anything about (M)STP
we just hard-set the ports to be enabled if they are
part of the VLAN.

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

SVN-Revision: 43938
10 years ago
Luka Perkov 0b2cbeca7a mvsw61xx: clean up and expand register definitions
- eliminate MV_CPUPORT; not necessary since we define
  the CPU port(s) via Device Tree

- add STU and expand VTU operations

- update register names to match those of 88E61xx rather than
  mvswitch's 88E6060

- use more consistent formatting

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

SVN-Revision: 43937
10 years ago
Luka Perkov 1e39f3aef8 mvsw61xx: rework chip recognition
Recognizes 88E6171/6172/6176 at the moment.

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

SVN-Revision: 43936
10 years ago
Luka Perkov a1872182bb mvsw6171: rename to 'mvsw61xx'
In preparation for properly supporting switches
beyond the 88E6171.

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

SVN-Revision: 43935
10 years ago
Felix Fietkau 1cbf0fbcb4 ar8216: factor out AR8327/AR8337-specific driver code into ar8327.c
Move all AR8327/AR8337-specific driver code into a separate source file
ar8327.c and adjust patches so that ar8327.c is compiled if
CONFIG_AR8216_PHY is set.

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

SVN-Revision: 43845
10 years ago
Felix Fietkau cc02d4c72d ar8216: move definitions from ar8216.c to ar8216.h and introduce ar8327.h
Move several structure definitions and #defines from ar8216.c
to ar8216.h and move AR8327/AR8337 header stuff into a new
header file ar8327.h.

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

SVN-Revision: 43844
10 years ago
Felix Fietkau baa3a38ac6 kernel: add mtd split support for trx images
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43809
10 years ago
Felix Fietkau cc5f89c66a kernel: add a mtdsplit implementation for tp-link firmware headers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43806
10 years ago
Felix Fietkau 4153c0adff kernel: move mtdsplit files to drivers/mtd/mtdsplit/ to simplify maintenance, unify patches across kernel versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43805
10 years ago
Felix Fietkau 5506420980 kernel: remove openwrt micrel.c (replaced by upstream driver)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43762
10 years ago
Luka Perkov 0847247129 mvsw6171: note support for 88E6172 switches
The '6171 and '6172 are similar enough to work
without any changes to the code.

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

SVN-Revision: 43753
10 years ago
Felix Fietkau 2f9b042d69 ar8216: Inline function ar8xxx_create_mii
Inline function ar8xxx_create_mii.

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

SVN-Revision: 43743
10 years ago
Felix Fietkau 2289c7a010 ar8216: Remove read/write/rmw member functions from ar8xxx_priv
Remove read/write/rmw member functions from ar8xxx_priv

There seems to be no real benefit of the ar8xxx_priv member functions
read/write/rmw as one implementation exists for each of them only.
Especially ar8xxx_mii_rmw is assigned to priv->rmw first and then
mapped to ar8xxx_rmw.
Rename the ar8xxx_mii_.. functions to ar8xxx_.. and use them directly.

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

SVN-Revision: 43742
10 years ago
Felix Fietkau 45a494b808 ar8216: Create helpers mii_read32 / mii_write32 for 32 bit MII ops
Create helpers mii_read32 / mii_write32 for 32 bit MII ops.
Rename r3 variable to page in ar8xxx_mii_write to make it consistent
with the other ar8xxx_mii_xxxx functions.

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

SVN-Revision: 43741
10 years ago
Felix Fietkau 0e7f844c66 ar8216: Factor out chip-specific parameters from ar8xxx_probe_switch
Factor out chip-specific parameters from ar8xxx_probe_switch.
Move the ar8xxx_chip definitions after the swops definitions.

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

SVN-Revision: 43740
10 years ago
Felix Fietkau 054767cebc ar8216: remove unused function parameter in ar8327_led_register
Remove unused function parameter in ar8327_led_register.

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

SVN-Revision: 43739
10 years ago
Felix Fietkau 5b16fd1bf8 ar8216: enable cpu port to receive arp and broadcast frames for ar8236
Signed-off-by: Weijie Gao <hackpascal@gmail.com>

SVN-Revision: 43668
10 years ago
John Crispin 9b5f583906 kernel: add driver for Marvell 88E6171 switch
This is a swconfig driver for the Marvell 88E6171 switch,
which is a 7-port GigE switch with two CPU ports and 64
802.1q VLANs.

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

SVN-Revision: 43486
10 years ago
John Crispin ecd27db757 ar8216: factor out reg_port_stats_base parameters to ar8xxx_chip
Factor out reg_port_stats_base parameters to ar8xxx_chip.
Remove related chip_is_... checks.

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

SVN-Revision: 43471
10 years ago
John Crispin ae15531bd2 ar8216: factor out mii_lo_first to ar8xxx_chip
Factor out mii_lo_first to ar8xxx_chip.

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

SVN-Revision: 43470
10 years ago
John Crispin ea9324f3d3 ar8216: factor out chip-specific data structures from ar8xxx_priv
Factor out chip-specific data structures from ar8xxx_priv.

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

SVN-Revision: 43469
10 years ago
John Crispin a3b651635f ar8216: factor out set_mirror_regs to ar8xxx_chip
Factor out set_mirror_regs to ar8xxx_chip.
Remove related chip_is_... checks.

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

SVN-Revision: 43468
10 years ago
John Crispin b82a08f5b6 ar8216: factor out mib_func to ar8xxx_chip
Factor out mib_func to ar8xxx_chip. Remove related chip_is_... checks.

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

SVN-Revision: 43467
10 years ago
John Crispin af003867b1 ar8216: factor out info whether switch should be configured at probe stage to ar8xxx_chip
Factor out info whether switch should be configured at probe stage
to ar8xxx_chip. Remove related chip_is_... checks.

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

SVN-Revision: 43466
10 years ago
Felix Fietkau 14db2826ad ar8216: suppress PHY reset for linux 3.14
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43410
10 years ago
Felix Fietkau 35902404fc ar8216: Fix issue with autoneg being disabled under 3.14, revert 43332
Patch reverts 43332 which seems to cause issues with VLAN functionality.
Add a specific check to check whether ANEG is still enabled and re-enable
it if necessary. Disable generic phy soft reset for kernel >=3.16.

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

SVN-Revision: 43356
10 years ago
Felix Fietkau c9340fd8a9 ar8216: Use generic hw_init from ar8236 for ar8216 too
We should make sure that also for ar8216 hw gets initialized.
For ar8216 hw_init is a dummy currently. The hw_init used for ar8236
should be generic enough to be usable with ar8216 too.

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

SVN-Revision: 43334
10 years ago
Felix Fietkau 0178b516a2 ar8216: simplify PHY fixup/init
Move the PHY fixup call to the PHY init loop.
Use ar8xxx_has_gige in the PHY init instead of passing the gigE
capability via function parameter.

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

SVN-Revision: 43333
10 years ago
Felix Fietkau 43e3e88379 ar8216: use genphy_config_aneg also for PHY 0
Kernel 3.14 introduced a switch reset in phy_init_hw in drivers/net/phy
causing BMCR_ANENABLE to get cleared.

Due to the fact that ar8xxx_phy_config_aneg does nothing for
PHY 0 autonegatiation support remains disabled.
This can cause ports to operate at 10MBit/half-duplex only.

Fix this by calling genphy_config_aneg for PHY 0 too as
genphy_config_aneg sets BMCR_ANENABLE if it's not yet set.
Fixes: ticket 17800

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

SVN-Revision: 43332
10 years ago
Felix Fietkau 898712f43f ar8216: factor out PHY init code into a generic function
PHY init code in the switch-specific hw_init functions is mainly
identical. Factor it out into a generic ar8xxx_phy_init function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43331
10 years ago
Felix Fietkau 20baeb5595 ar8216: introduce fixup_phys callback in ar8xxx_chip
Move phy fixup code from the chip-specific hw_init functions into a
fixup_phys callback.

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

SVN-Revision: 43330
10 years ago
Felix Fietkau 37fefea79b ar8216: after a switch reset poll until BCMR_RESET is cleared
Currently there is a fixed 1000ms wait time after the switch was reset.
Most if not all switches need much less time to perform a reset.
Therefore replace the fixed wait time with polling for BMCR_RESET to
be cleared.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 43329
10 years ago
Felix Fietkau 6dcdc2bb05 ar8216: introduce global constant for number of PHYs
All supported switches have 5 PHYs. Currently partially 5 is hardcoded
and partially switch-specific constants exist.
Replace them with a global constant.

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

SVN-Revision: 43328
10 years ago
John Crispin 76a54a424c ar8216: fix "unused variable" compiler warning
Most likely a copy & paste error when deriving ar8327_sw_set_ports
from ar8xxx_sw_set_ports.
Remove unused variable.

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

SVN-Revision: 43273
10 years ago
John Crispin 2c72ffc154 ar71xx: add support for Netgear WNR2000v4
Signed-off-by: Michaël Burtin <mburtin@gmail.com>

SVN-Revision: 43173
10 years ago
John Crispin 62107ff367 swconfig: last vs tail
sorry .....

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43107
10 years ago
John Crispin ab5d70e046 swconfig: "swconfig list" shows devices in reverse order
Boards that have more than one swconfig enabled switch will show the devices in
reverse order when call swconfig list. Fix this by using list_add_tail().

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 43106
10 years ago
Felix Fietkau 156b296b20 ar8216: set the pvid based on runtime state instead of port number to fix learning with enable_vlan = 0
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42753
10 years ago
Felix Fietkau 38a8f5ae63 ar71xx: ar8216: tagged+untagged on ar8327 (#12181)
This allows tagged and untagged traffic together on the same port on ar8327
switch devices.

I looked at the first attempt to do this in r40777 (ar71xx: Fix tagged+untagged
operation on AR8327N (#12181)). I also set the vlan and port egress policies
like that change. But I change vlan_tagged in an less intrusive way. The
tagged/untagged decision is now based on the following rules:
- if vid != pvid then traffic is always tagged
- if vid == pvid then vlan_tagged stores if the traffic should be tagged

Tested on TP-Link WDR-3600 (ar8327N).

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>

SVN-Revision: 42653
10 years ago
Felix Fietkau 1c675ee9be ar71xx: ar8216: move policies, pvid to setup_port
This moves ingress, egress policy and pvid decisions to setup_port methods.
They arenow device type dependent.

This allows policy changes on only one device type which is needed to allow
tagged + untagged operation on ar8327.

Tested on TP-LINK WDR-3600 (ar8327N).

Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>

SVN-Revision: 42652
10 years ago
John Crispin c9813699b6 kernel: add own Kconfig for OpenWrt mtdsplit drivers
There are pretty many OpenWrt patches against mtd subsystem resulting
in a bit of mess and growing maintenance cost.
My idea is to use an extra "mtdsplit" directory with OpenWrt specific
files (including Kconfig).
This is the first step to achieve this. This patch adds a "mtdsplit"
directory with Kconfig and replaces 4 patches with a single one.

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

SVN-Revision: 42287
10 years ago
John Crispin de5fd0a189 ar8216: add new phyid 0x004dd043 (ar8326)
Used in ubiquity nanostation xw boards

SVN-Revision: 41635
10 years ago
Felix Fietkau a17a58e310 ar8216: disable EEE by default on AR8327 to fix stability issues (#14597)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41577
10 years ago
Hauke Mehrtens ed0dc1c97e b53: hardcode reset GPIO for Linksys WRT300N 1.1
According to the thread https://forum.openwrt.org/viewtopic.php?id=48281
b53 uses GPIO 7:
[    4.470000] b53_common: [DBG] b53_switch_reset_gpio using 7
and causes device to self-reboot. GPIO 8 was found in CFE boot log:
"Reset switch via GPIO 8 ..."

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

SVN-Revision: 41526
10 years ago
Hauke Mehrtens 286ff7e322 adm6996: the GPIO interface for the adm6996l does not support switch statistics.
This patch deactivates the statistics, adds a missing lock
initialization and fixes a waring.

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

SVN-Revision: 41511
10 years ago
Imre Kaloz e1de4e27c1 coding style cleanups, drop old kernel support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 41293
10 years ago
Jo-Philipp Wich f6e7074924 Revert "ar71xx: Fix tagged+untagged operation on AR8327N (#12181)"
Revert the tagged + untagged rework for now due to regressions in
vlan setup on certain AR83xx switches.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 40842
10 years ago
Felix Fietkau 8513629e3e mac80211: update to wireless-testing 2014-05-19
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40800
10 years ago
Jo-Philipp Wich 443b2dfe3c ar71xx: Fix tagged+untagged operation on AR8327N (#12181)
Replace the global "vlan_tagged" variable with an array storing the
tagging state per vlan.

The code was taken from #12181, tested and cleaned up by Saverio Proto
with additional bug fixes supplied by Álvaro Fernández.

Tested-by: Jo-Philipp Wich <jow@openwrt.org>
Signed-off-by: Saverio Proto <zioproto@gmail.com>
Signed-off-by: Álvaro Fernández <noltari@gmail.com>

SVN-Revision: 40777
10 years ago
Hauke Mehrtens 100e795bcc kernel: fix warning in swconfig.c with kernel 3.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 40733
10 years ago
Hauke Mehrtens c09007c1af kernel/generic: modify mtd related patches for 3.14
Function register_mtd_parser always returned 0 (at least since v3.3)
before being changed to return void in v3.14-rc1~65^2~93 (mtd: make
register_mtd_parser return void), so it's not needed to check the
return value of this function. Also add __init flag to caller.

This fix compile errors in 3.14 kernel like:
drivers/mtd/mtdsplit_seama.c: In function 'mtdsplit_seama_init':
drivers/mtd/mtdsplit_seama.c:99:2: error: void value not ignored as it ought to be
  return register_mtd_parser(&mtdsplit_seama_parser);
  ^

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>

SVN-Revision: 40731
10 years ago
John Crispin 1b96cf30a9 linux/generic: add MIB counters and port status to ADM6996 switch
This patch adds port status information and MIB counters to the ADM6996
switch driver.

The driver supports also the older ADM6996L-variant, but I'm not able to
test this patch on that chip. According to the datasheet the same
registers exist there as well, so I think it should work, but any
feedback is appreciated.

Signed-off-by: Matti Laakso <malaakso at elisanet.fi>

SVN-Revision: 40542
10 years ago
John Crispin 3972b47458 revert: kernel: rtl8306: fix max pvid & remove port isolation
apparently this one was nt a good idea to merge

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 40330
10 years ago
John Crispin deba38f2a7 kernel: rtl8306: fix vlan support on lantiq ar9 p2601hnfx
If the CPU port is not forced up, the link, at least on this board, is lost after
changes are applied. This makes sure that the link is restored. Regression tests
should confirm it doesn't break other boards.

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40305
10 years ago
John Crispin 72cdb34ae8 kernel: rtl8306: fix max pvid & remove port isolation
- hide port pvid - vlan index relation
- switch initialises with vlans disabled so port isolation is not used
- remove special treatment of cpu port

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40304
10 years ago
John Crispin 6a72dc4082 kernel: rtl8306: cosmetic changes for swconfig
Changes to:
- show the correct "enable_vlan" value under "Global attributes"
- show tagged ports under "Vlan: ports"
- use get_port_link method to report link status

Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 40303
10 years ago
Jonas Gorski c1f397e1e1 b53: Make b53_switch_init static
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Patchwork: http://patchwork.openwrt.org/patch/4869/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 39683
11 years ago
Jonas Gorski 9eb60826f2 b53: Add BCM53128 switch support
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Patchwork: http://patchwork.openwrt.org/patch/4867/
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 39682
11 years ago
Luka Perkov cde033f918 kernel: rtl8306: update reset function
Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 39589
11 years ago
Gabor Juhos 7c137c187f ar71xx: swconfig: use the local helper to set LED brightness on link down
Use the 'swconfig_trig_set_brightness' function to set
the brightness value of the LED when the link goes down.
This ensures that the last brighness value is saved into
a local variable which is used to track the actual LED
status.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39402
11 years ago
Gabor Juhos 89d60314e7 kernel/3.1x: add split code for LZMA compressed kernel based firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39387
11 years ago
Gabor Juhos e89476e0a8 Revert "kernel: create firmware partition from MyLoader partition parser"
This reverts r38197.

The automatically created firmware partition includes
the partition_table partition. Apart from the partition
table, this partition contains sensitive data on some
Compex devices which data can be destroyed when the
firmware partition gets modified. Revert the change to
prevent that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39382
11 years ago
Zoltan Herpai f3c07b8621 modules: swconfig.c: update the error path on 3.13, and behave nicely with return
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 39360
11 years ago
Zoltan Herpai 4d26250db1 modules: update swconfig.c to compile on 3.13 (compile-tested)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 39359
11 years ago
Jonas Gorski d5b4292032 kernel: ocf: add missing dependency for hifn driver
The HIFN driver is a PCI driver, thus requires PCI support to be enabled
to compile. Therefore let it depend on PCI..

Should fix mvebu builds.

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

SVN-Revision: 39357
11 years ago
Hauke Mehrtens 1f4e6394ed b53: use drvdata to store driver data
we should not abuse the platform_data pointer.

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

SVN-Revision: 39354
11 years ago
Hauke Mehrtens de266cd1c1 b53: make b53_switch_reset_gpio() static
SVN-Revision: 39353
11 years ago
Gabor Juhos 0056ac55af generic: ar8216: add custom LED support for the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39338
11 years ago
Gabor Juhos 15d41de1eb generic: ar8216: allow to use chip specific cleanup callback
It will be used for AR8327.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39337
11 years ago
Gabor Juhos c7652f1f9e generic: ar8216: add optimized rmw operation
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39336
11 years ago
Gabor Juhos 0601b5f404 kernel: define RB_ID_HW_OPTIONS in include/linux/routerboot.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39090
11 years ago
Gabor Juhos 7e3644d3cf kernel: update yaffs code
Use the latest version of the yaffs code. Fetched from the
yaffs2 git tree and it is based on the following commit:

  commit bc76682d93955cfb33051beb503ad9f8a5450578
  Merge: 3a8580e ffa781d
  Author: Charles Manning <cdhmanning@gmail.com>
  Date:   Thu Jul 11 17:46:25 2013 +1200

      Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39084
11 years ago
Gabor Juhos aeaff0090c generic: ar8216: Enable jumbo frames on AR8327 by default
This patch enables jumbo frames on AR8327 switch by default.
I have tested it on TP-Link TL-WDR3600.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39076
11 years ago
Felix Fietkau 7a260c3620 ath9k: merge initval and tx gain table updates, calibration fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39001
11 years ago
Gabor Juhos c378d5e953 generic: ar8216: add AR8337N switch support
This patch is needed to use the switch inside the Sitecom WLR-8100;
it was unusable and detected as Generic-Phy before.

since ar8337 is behaving like ar8327
generally do the same thing
see: https://forum.openwrt.org/viewtopic.php?pid=214218#p214218
forward-ported to trunk

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
Patchwork: http://patchwork.openwrt.org/patch/4469/
[juhosg: merge chip_is_ar83[23]7 statements in ar8xxx_phy_config_init]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38952
11 years ago
Gabor Juhos 74a353f64f generic: ar8216: remove trailing whitespaces
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38951
11 years ago
Hauke Mehrtens 0cdab0237d kernel: b53: fix untagged shift for BCM5365
The BCM5365 needs a shift of 7 bits and not 6 bits like the BCM5325 for
the untagged ports.

Thank you Russell for reporting this and testing the patch.

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

SVN-Revision: 38793
11 years ago
Hauke Mehrtens 72b47e69c4 kernel: b53: add initial support for switches in BCM5301X
This is also known as BCM470{7,8,9}.

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

SVN-Revision: 38712
11 years ago
Hauke Mehrtens 7a82667372 kernel: adm6996: add support for ADM6996L and GPIO interface
This patch makes it possible to use adm6996.c on first generation
BCM47XX devices with ADM switches.
The GPIO bit banging protocol implementation was copied from the old
switch driver and adapted to this driver and changed to the mainline
kernel GPIO interface.
The ADM6996L is different from the ADM6996M which is supported, for
both specs are available in the Internet.

This was tested on a WRT54GS version 1.0, thank you Dirk Neukirchen for
the device.

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

SVN-Revision: 38698
11 years ago
Gabor Juhos 2f27f5d404 generic: mtdsplit_uimage: add uImage magic for the WRN2200 board
Should fix boot failure on the WNR2200 boards.
Compile tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38594
11 years ago
Florian Fainelli 857a7a0124 kernel: make swconfig checkpath compliant
Fix the warnings and errors reported by checkpatch on swconfig.c

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 38523
11 years ago
Hauke Mehrtens 53a2c19c69 kernel: b53: add switch name into printk when it fails.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 38307
11 years ago
Hauke Mehrtens c75a970337 kernel: b53: add Register Access Bridge Registers (SRAB) interface
The SRAB interface is used on BCM4707 and BCM5301X SoCs.

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

SVN-Revision: 38198
11 years ago
Gabor Juhos fc79d210e0 kernel: create firmware partition from MyLoader partition parser
This is in preparation for sysupgrade support for Compex devices.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38197
11 years ago
Gabor Juhos 2e62ff9320 kernel/3.10: add partition parser for Seama firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38114
11 years ago
Gabor Juhos 2f2ed5c5c1 kernel/3.10: add partition parser for uImage firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38113
11 years ago
Gabor Juhos 98db90576c kernel/3.10: add default partition name defines to mtdsplit.h
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38112
11 years ago
Gabor Juhos 61c39f923b kernel/3.10: add more helpers to the mtdsplit code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38111
11 years ago
Gabor Juhos daec7ad768 kernel/3.10: add separate rootfs partition parser
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38110
11 years ago
Gabor Juhos d89bea92b3 kernel/3.10: move squashfs check from rootfs split code into a separate file
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38109
11 years ago
Hauke Mehrtens f5989e7f59 kernel: b53: detect revision of BCM5325
The revision is stored in a different register than it is in other
Broadcom switches.

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

SVN-Revision: 37995
11 years ago
Hauke Mehrtens 49d7c57fd1 kernel: b53: fix vlan write for BCM5325 revison 3+
These switches are integrated in some recent BCM53XX and BCM47XX SoCs
like the BCM53572.

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

SVN-Revision: 37994
11 years ago
Hauke Mehrtens cde1d53625 kernel: b53: use hard coded switch reset gpio on some boards.
The Linksys wrt310n v1 does not have a robo_reset config variable in
nvram, but GPIO Pin 8 is the pin needed for resetting the external
switch, Linksys hard coded it into their source code.

Thank you Devastator for testing.

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

SVN-Revision: 37988
11 years ago
Hauke Mehrtens 2da56b4ebc kernel: b53: add soft reset for BCM539x switches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37987
11 years ago
Jonas Gorski 4b0655500a kernel: b53: support phy ids for BCM5365
BCM5365 (and probably other older variants) use a different phy id, so
the phy driver never attached for them.
Fix this by adding the appropriate phy id to the fixup and the phy
driver.

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37906
11 years ago
Hauke Mehrtens 4eced13a37 kernel: b53: allow access the MIB counters on BCM5365
b53_no_ops has no elements and b53_port_ops has one element, this makes
the code access some random memory when trying to access the mib
counter functions.

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

SVN-Revision: 37895
11 years ago
Gabor Juhos 0950922925 generic: remove linux version checks from myloader.c
The myloader partition parser code uses ifdef wrappers
to make the code usable on kernels below version 3.2.
All targets are using kernel 3.3 at least so the wraper
is not needed. Remove that.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 37880
11 years ago
Luka Perkov 4f679c1775 kernel: drop dead pwm code
The files have last been used with 2.6.x kernel.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37810
11 years ago
Luka Perkov a2dccb958c kernel: drop dead glamo code
The code is not used since the s3c24xx target was removed.

Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 37809
11 years ago
Felix Fietkau 8b8875b305 ocf: switch MODULE_LICENSE from BSD to "Dual BSD/GPL" to make the kernel recognize modules as GPL-compatible
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37769
11 years ago
Felix Fietkau e5fd991c6c rtl8367: add support for configuring the VLAN FID
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 37760
11 years ago
Jonas Gorski 3e9ad14992 kernel: ocf: add missing kernel dependencies
OCF_CRYPTOSOFT uses both symbols form crypto_hash and crypto_blkcipher,
so let it select these through kernel config.

Fixes the following build error:

ERROR: "crypto_alloc_ahash" [crypto/ocf/cryptosoft.ko] undefined!
ERROR: "crypto_ahash_digest" [crypto/ocf/cryptosoft.ko] undefined!
ERROR: "crypto_ahash_setkey" [crypto/ocf/cryptosoft.ko] undefined!
make[6]: *** [__modpost] Error 1
make[5]: *** [modules] Error 2

Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 37652
11 years ago
Hauke Mehrtens 8966b86067 kernel: b53: use devm_gpio_request_one() to request gpio
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37648
11 years ago
Hauke Mehrtens e1127aca07 kernel: b53: add support for GPIO reset
This is needed for some switches used on bcm47xx SoCs like the one on the Asus RT-N66U.

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

SVN-Revision: 37645
11 years ago
John Crispin 4176b6fdd3 strict_strtoul is obsolete, use kstrtoul instead
based on http://patchwork.openwrt.org/patch/3827/

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37562
11 years ago
Lars-Peter Clausen 8fc44d1f5f kernel: Remove gpio-pwm patches
There is no platform using the gpio-pwm driver, yet these patches break the
generic PWM framework that is in upstream. So just remove them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

SVN-Revision: 37490
11 years ago
Jonas Gorski 29954b9ffc kernel: remove gpio_buttons
It hasn't been buildable for a long time, and there are no users of it
anymore left as all of them have been switched to the upstream accepted
version.

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

SVN-Revision: 37436
11 years ago
Hauke Mehrtens f8d55e7541 brcm47xx: use b53 phy driver for the switch in kernel 3.10
This makes it possible to use swconfig to controll the switch.

This was tested with devices using b43 and bgmac.
This was not tested on devices using tg3.
This does not support the adm switch used in some very old devices.

SVN-Revision: 37304
11 years ago
Gabor Juhos d187e3c32e generic: add port mirroring/monitoring capability to rtl8366rb switch
This patch adds swlib attributes to the RTL8366RB switch/PHY found in the
TL-WR1043ND router that allow to mirror ethernet packets to a monitor port.

Signed-off-by: Colin Leitner <colin.leitner@googlemail.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 36847
11 years ago