aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
...
* ar8216: factor out AR8327/AR8337-specific driver code into ar8327.cFelix Fietkau2015-01-053-1030/+1134
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43845 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: move definitions from ar8216.c to ar8216.h and introduce ar8327.hFelix Fietkau2015-01-053-345/+365
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43844 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: remove openwrt micrel.c (replaced by upstream driver)Felix Fietkau2014-12-221-83/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43762 3c298f89-4303-0410-b956-a3cf2f4a3e73
* mvsw6171: note support for 88E6172 switchesLuka Perkov2014-12-191-1/+1
| | | | | | | | | The '6171 and '6172 are similar enough to work without any changes to the code. Signed-off-by: Claudio Leite <leitec@staticky.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43753 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Inline function ar8xxx_create_miiFelix Fietkau2014-12-181-13/+3
| | | | | | | | Inline function ar8xxx_create_mii. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43743 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Remove read/write/rmw member functions from ar8xxx_privFelix Fietkau2014-12-181-65/+51
| | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43742 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Create helpers mii_read32 / mii_write32 for 32 bit MII opsFelix Fietkau2014-12-181-34/+40
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43741 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Factor out chip-specific parameters from ar8xxx_probe_switchFelix Fietkau2014-12-181-117/+151
| | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43740 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: remove unused function parameter in ar8327_led_registerFelix Fietkau2014-12-181-2/+2
| | | | | | | | Remove unused function parameter in ar8327_led_register. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43739 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: enable cpu port to receive arp and broadcast frames for ar8236Felix Fietkau2014-12-122-0/+12
| | | | | | Signed-off-by: Weijie Gao <hackpascal@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43668 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: add driver for Marvell 88E6171 switchJohn Crispin2014-12-012-0/+1096
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43486 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out reg_port_stats_base parameters to ar8xxx_chipJohn Crispin2014-12-012-13/+20
| | | | | | | | | Factor out reg_port_stats_base parameters to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43471 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out mii_lo_first to ar8xxx_chipJohn Crispin2014-12-011-5/+5
| | | | | | | | Factor out mii_lo_first to ar8xxx_chip. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43470 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out chip-specific data structures from ar8xxx_privJohn Crispin2014-12-011-15/+16
| | | | | | | | Factor out chip-specific data structures from ar8xxx_priv. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43469 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out set_mirror_regs to ar8xxx_chipJohn Crispin2014-12-011-15/+13
| | | | | | | | | Factor out set_mirror_regs to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43468 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out mib_func to ar8xxx_chipJohn Crispin2014-12-011-6/+6
| | | | | | | | Factor out mib_func to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43467 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out info whether switch should be configured at probe stage ↵John Crispin2014-12-011-2/+4
| | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43466 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: suppress PHY reset for linux 3.14Felix Fietkau2014-11-271-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43410 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Fix issue with autoneg being disabled under 3.14, revert 43332Felix Fietkau2014-11-241-2/+47
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43356 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: Use generic hw_init from ar8236 for ar8216 tooFelix Fietkau2014-11-201-13/+7
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43334 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: simplify PHY fixup/initFelix Fietkau2014-11-201-19/+10
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43333 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: use genphy_config_aneg also for PHY 0Felix Fietkau2014-11-191-10/+1
| | | | | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43332 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out PHY init code into a generic functionFelix Fietkau2014-11-191-41/+25
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43331 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: introduce fixup_phys callback in ar8xxx_chipFelix Fietkau2014-11-191-2/+13
| | | | | | | | | Move phy fixup code from the chip-specific hw_init functions into a fixup_phys callback. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43330 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: after a switch reset poll until BCMR_RESET is clearedFelix Fietkau2014-11-191-3/+29
| | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43329 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: introduce global constant for number of PHYsFelix Fietkau2014-11-192-4/+5
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43328 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: fix "unused variable" compiler warningJohn Crispin2014-11-141-1/+1
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43273 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: last vs tailJohn Crispin2014-10-291-1/+1
| | | | | | | | sorry ..... Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43107 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: "swconfig list" shows devices in reverse orderJohn Crispin2014-10-291-1/+1
| | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43106 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: set the pvid based on runtime state instead of port number to fix ↵Felix Fietkau2014-10-021-3/+1
| | | | | | | | learning with enable_vlan = 0 Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42753 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ar8216: tagged+untagged on ar8327 (#12181)Felix Fietkau2014-09-231-7/+53
| | | | | | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42653 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: ar8216: move policies, pvid to setup_portFelix Fietkau2014-09-231-41/+52
| | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42652 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add new phyid 0x004dd043 (ar8326)John Crispin2014-07-141-0/+1
| | | | | | Used in ubiquity nanostation xw boards git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41635 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: disable EEE by default on AR8327 to fix stability issues (#14597)Felix Fietkau2014-07-102-0/+12
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41577 3c298f89-4303-0410-b956-a3cf2f4a3e73
* b53: hardcode reset GPIO for Linksys WRT300N 1.1Hauke Mehrtens2014-07-061-0/+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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41526 3c298f89-4303-0410-b956-a3cf2f4a3e73
* adm6996: the GPIO interface for the adm6996l does not support switch statistics.Hauke Mehrtens2014-07-051-2/+9
| | | | | | | | | | This patch deactivates the statistics, adds a missing lock initialization and fixes a waring. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41511 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Revert "ar71xx: Fix tagged+untagged operation on AR8327N (#12181)"Jo-Philipp Wich2014-05-241-154/+72
| | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40842 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: Fix tagged+untagged operation on AR8327N (#12181)Jo-Philipp Wich2014-05-191-72/+154
| | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40777 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: fix warning in swconfig.c with kernel 3.14Hauke Mehrtens2014-05-081-6/+10
| | | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40733 3c298f89-4303-0410-b956-a3cf2f4a3e73
* linux/generic: add MIB counters and port status to ADM6996 switchJohn Crispin2014-04-222-0/+144
| | | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40542 3c298f89-4303-0410-b956-a3cf2f4a3e73
* revert: kernel: rtl8306: fix max pvid & remove port isolationJohn Crispin2014-03-301-76/+37
| | | | | | | | apparently this one was nt a good idea to merge Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40330 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: rtl8306: fix vlan support on lantiq ar9 p2601hnfxJohn Crispin2014-03-301-0/+4
| | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40305 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: rtl8306: fix max pvid & remove port isolationJohn Crispin2014-03-301-37/+76
| | | | | | | | | | - 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40304 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: rtl8306: cosmetic changes for swconfigJohn Crispin2014-03-301-21/+26
| | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40303 3c298f89-4303-0410-b956-a3cf2f4a3e73
* b53: Make b53_switch_init staticJonas Gorski2014-02-221-1/+1
| | | | | | | | Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Patchwork: http://patchwork.openwrt.org/patch/4869/ Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39683 3c298f89-4303-0410-b956-a3cf2f4a3e73
* b53: Add BCM53128 switch supportJonas Gorski2014-02-223-2/+18
| | | | | | | | Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Patchwork: http://patchwork.openwrt.org/patch/4867/ Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39682 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: rtl8306: update reset functionLuka Perkov2014-02-151-7/+2
| | | | | | Signed-off-by: Antonios Vamporakis <ant@area128.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39589 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar71xx: swconfig: use the local helper to set LED brightness on link downGabor Juhos2014-01-261-1/+1
| | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39402 3c298f89-4303-0410-b956-a3cf2f4a3e73
* modules: swconfig.c: update the error path on 3.13, and behave nicely with ↵Zoltan HERPAI2014-01-211-3/+2
| | | | | | | | | | return Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39360 3c298f89-4303-0410-b956-a3cf2f4a3e73
* modules: update swconfig.c to compile on 3.13 (compile-tested)Zoltan HERPAI2014-01-211-0/+8
| | | | | | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39359 3c298f89-4303-0410-b956-a3cf2f4a3e73