Commit Graph

323 Commits

Author SHA1 Message Date
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
2014-05-24 17:04:12 +00:00
Felix Fietkau
8513629e3e mac80211: update to wireless-testing 2014-05-19
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40800
2014-05-20 09:35:17 +00:00
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
2014-05-19 15:48:18 +00:00
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
2014-05-08 21:52:19 +00:00
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
2014-05-08 21:51:36 +00:00
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
2014-04-22 08:08:02 +00:00
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
2014-03-30 10:04:55 +00:00
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
2014-03-30 09:15:16 +00:00
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
2014-03-30 09:15:11 +00:00
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
2014-03-30 09:15:07 +00:00
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
2014-02-22 11:16:58 +00:00
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
2014-02-22 11:16:56 +00:00
Luka Perkov
cde033f918 kernel: rtl8306: update reset function
Signed-off-by: Antonios Vamporakis <ant@area128.com>

SVN-Revision: 39589
2014-02-15 22:54:35 +00:00
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
2014-01-26 16:46:21 +00:00
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
2014-01-24 17:14:59 +00:00
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
2014-01-24 08:48:10 +00:00
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
2014-01-21 14:43:50 +00:00
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
2014-01-21 14:24:45 +00:00
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
2014-01-21 12:11:18 +00:00
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
2014-01-20 20:01:22 +00:00
Hauke Mehrtens
de266cd1c1 b53: make b53_switch_reset_gpio() static
SVN-Revision: 39353
2014-01-20 19:07:18 +00:00
Gabor Juhos
0056ac55af generic: ar8216: add custom LED support for the AR8327 switch
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39338
2014-01-20 10:22:56 +00:00
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
2014-01-20 10:22:55 +00:00
Gabor Juhos
c7652f1f9e generic: ar8216: add optimized rmw operation
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 39336
2014-01-20 10:22:54 +00:00
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
2013-12-16 10:11:00 +00:00
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
2013-12-16 07:51:19 +00:00
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
2013-12-15 22:18:04 +00:00
Felix Fietkau
7a260c3620 ath9k: merge initval and tx gain table updates, calibration fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 39001
2013-12-08 14:48:30 +00:00
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
2013-11-29 20:18:48 +00:00
Gabor Juhos
74a353f64f generic: ar8216: remove trailing whitespaces
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38951
2013-11-29 20:18:46 +00:00
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
2013-11-13 18:04:39 +00:00
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
2013-11-10 23:29:59 +00:00
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
2013-11-09 19:27:27 +00:00
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
2013-10-30 06:51:01 +00:00
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
2013-10-24 00:25:52 +00:00
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
2013-10-06 22:35:28 +00:00
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
2013-09-25 21:44:28 +00:00
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
2013-09-25 20:13:12 +00:00
Gabor Juhos
2e62ff9320 kernel/3.10: add partition parser for Seama firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38114
2013-09-21 17:56:18 +00:00
Gabor Juhos
2f2ed5c5c1 kernel/3.10: add partition parser for uImage firmwares
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38113
2013-09-21 17:56:09 +00:00
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
2013-09-21 17:56:01 +00:00
Gabor Juhos
61c39f923b kernel/3.10: add more helpers to the mtdsplit code
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38111
2013-09-21 17:55:54 +00:00
Gabor Juhos
daec7ad768 kernel/3.10: add separate rootfs partition parser
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 38110
2013-09-21 17:55:49 +00:00
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
2013-09-21 17:55:44 +00:00
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
2013-09-15 13:30:49 +00:00
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
2013-09-15 13:29:14 +00:00
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
2013-09-14 16:17:36 +00:00
Hauke Mehrtens
2da56b4ebc kernel: b53: add soft reset for BCM539x switches
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 37987
2013-09-14 16:14:02 +00:00
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
2013-09-05 20:30:34 +00:00
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
2013-09-04 16:15:10 +00:00