summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
Commit message (Collapse)AuthorAgeFilesLines
* generic: ar8216: add port mirroringHEADmasterluka2013-05-242-0/+318
| | | | | | | | | | | | | | | Tested on Buffalo WZR-600DHP with ar8316 switch. Commands used to mirror both RX and TX traffic from LAN port 1 to LAN port 4: $ swconfig dev switch0 set enable_mirror_rx 1 $ swconfig dev switch0 set enable_mirror_tx 1 $ swconfig dev switch0 set mirror_monitor_port 4 $ swconfig dev switch0 set mirror_source_port 1 Signed-off-by: Colin Leitner <colin.leitner@googlemail.com> Tested-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36713 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: add missing PHY ID for an AR8327 switch variantnbd2013-05-131-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36630 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: b53: use correct oops for bcm5365 switchhauke2013-05-091-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36589 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: add missing bcma defines and header file for bcrmfmacjogo2013-04-281-0/+124
| | | | | | | | Fixes build failure when having kmod-mmc and brcmfmac selected. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36468 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: fix rtl8366_smi compile warningblogic2013-04-251-1/+1
| | | | | | | | | drivers/net/phy/rtl8366_smi.c: In function 'rtl8366_sw_set_vlan_ports': drivers/net/phy/rtl8366_smi.c:1125:6: warning: 'pvid' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36442 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [geneirc] fix rtl8366s OF bindingblogic2013-04-121-2/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36323 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] unbreak portmapping - typo fixblogic2013-04-091-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36293 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [swconfig] allow loading port maps from OFblogic2013-04-093-0/+89
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36283 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: rtl8367: add compatible string with vendor prefixjuhosg2013-04-061-0/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36230 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: rtl8367b: fix rtl8367b_extif_init_ofjuhosg2013-04-061-7/+18
| | | | | | | | | | | | * disable external interface if its property is not present * show an error message if the extif property is not valid * use proper error values intead of -1 * fix memory leak * wrap long lines Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36229 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: rtl8367: allow to load extif config from OFjuhosg2013-04-061-6/+61
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36220 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: rtl8367: fix a typo in MODULE_DEVICE_TABLE macrojuhosg2013-04-061-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36219 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: rtl8367: add vendor prefix to the compatible stringjuhosg2013-04-061-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36218 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [generic] add OF support to rtl8367b driverblogic2013-04-031-6/+50
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36159 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: start AR8327 switch from the probe routinejuhosg2013-03-151-1/+19
| | | | | | | | | | | | The AR8327 switch gets its configuration from platform data or from the device-tree. This allows to start it from the probe routine. Doing so makes it usable with ethernet drivers which only connects to the PHY device when the ethernet interface is opened. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36050 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add ar8xxx_start helperjuhosg2013-03-151-11/+23
| | | | | | | | | Move switch starting code into a separate function. This makes it usable from other places. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36049 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add OF configuration support for AR8327juhosg2013-03-151-1/+52
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36047 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: separate platform_data based AR8327 codejuhosg2013-03-151-5/+16
| | | | | | | | | | Move platform_data specific configuration code into a separate routine. Do it in preparation for the upcoming OF support. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36046 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: don't use platform_data in ar8327_init_portjuhosg2013-03-151-5/+16
| | | | | | | | | Fetch the PORT_STATUS values in ar8327_hw_init and store those in a private data stucture for later use. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36045 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: move the ar8327_get_port_init_status functionjuhosg2013-03-151-28/+28
| | | | | | | | It will be used in ar8327_probe routine. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36044 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: simplify and rename ar8327_config_portjuhosg2013-03-151-15/+9
| | | | | | | | | | Return with the PORT_STATUS register value instead of writing that directly into the corresponding register. Also rename the function to ar8327_get_port_init_status. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36043 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: remove superfluous pdata checksjuhosg2013-03-151-2/+2
| | | | | | | | | | The presence of the platform data is already verified in ar8327_hw_init, and the driver does not start without that anyway. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36042 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: b53: clear SM_SW_FWD_MODE unconditionally when enabling VLANjogo2013-02-211-4/+2
| | | | | | | | | | Setting this bit stops BCM53125 (bgmac actually) from receiving any packets. This bit is cleared conditionally in b53_switch_reset and it seems the same is done in bcmrobo.c which never sets that bit again. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35723 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: b53: remove empty spacesjogo2013-02-211-2/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35722 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: cleanup function/variable namesjuhosg2013-02-171-110/+110
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35642 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: rename struct ar8216_priv to ar8xxx_privjuhosg2013-02-171-94/+94
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35641 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: move PHY4 RGMII workaround code out of the loopjuhosg2013-02-141-11/+11
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35603 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: register the switch from the probe routinejuhosg2013-02-141-17/+12
| | | | | | | | | | | | | | | | | Currently the switch gets registered when an ethernet driver connects to a PHY of the switch. This method does not work with the ethernet drivers which are connecting to the PHY from their ndo_open callback. With those ethernet drivers, the driver tries to register the switch each time when the etherned device is opened and this causes a deadlock. Move the switch registration into the probe routine to fix this problem. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35602 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: remove superfluous code from ar8216_config_initjuhosg2013-02-111-12/+0
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35562 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: don't use ethernet device name in register_switchjuhosg2013-02-111-3/+4
| | | | | | | | | | The switches are accessed via an MDIO bus. Set the alias to the name of the MDIO bus, and show that in the message along with the name of the switch switch device. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35560 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: reuse the private data from ar8216_probejuhosg2013-02-111-33/+40
| | | | | | | | | | | The private data of the switch is already allocated in ar8216_priv, assign that to each PHY on the same MDIO bus. Also remove the redundant code from ar8216_config_init. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35559 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: use phydev instead of pdev everywherejuhosg2013-02-111-33/+33
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35555 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: use pr_* macros for kernel messagesjuhosg2013-02-111-8/+7
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35554 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: fix PHY features setupjuhosg2013-02-111-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Sujith says: This commit breaks the WAN port on my AP96 - DHCP fails. Reverting it fixes the issue. commit b67cc3a0cdd02973610d4d5a63226d1c44841e94 Author: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> Date: Fri Feb 8 09:13:18 2013 +0000 generic: ar8216: simplify phy features setup Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@355183c298f89-4303-0410-b956-a3cf2f4a3e73 This change restores the previous behaviour and moves the code into the ar8216_probe function. Reported-by: Sujith Manoharan <sujith@msujith.org> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Tested-by: Sujith Manoharan <sujith@msujith.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35549 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add ar8xxx_probe_switch helperjuhosg2013-02-101-31/+42
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35547 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: rename ar8xxx_mib_cleanup to ar8xxx_mib_stopjuhosg2013-02-101-2/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35546 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: free mib counters from ar8xxx_freejuhosg2013-02-101-4/+2
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35545 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add ar8xxx_free helperjuhosg2013-02-101-6/+12
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35544 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add ar8xxx_create{,mii} helpersjuhosg2013-02-101-14/+33
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35543 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: remove redundant phy address checkjuhosg2013-02-101-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35542 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: only set phy_ptr if packet mangling is usedjuhosg2013-02-101-2/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35541 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add defines for the AR8316 POSTRIP registerjuhosg2013-02-102-2/+32
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35539 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: don't probe the chip multiple timesjuhosg2013-02-101-8/+8
| | | | | | | | It is only needed when the private data is allocated. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35538 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add sanity check to ar8216_probejuhosg2013-02-101-0/+41
| | | | | | | | | Verify that the mdio bus has PHY devices with a supported PHY ID at address 0-4. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35537 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: skip probe on unused PHY addressesjuhosg2013-02-101-0/+4
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35536 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: b53: fix reverted error check in probejogo2013-02-101-1/+1
| | | | | | | | | | | | b53_switch_detect returns value returned by b53_read8, which is 0 for success. So fail (and return error) only if b53_switch_detect returned something else than 0. This fixes supported and advertising being zeros for MDIO access. Cc: Jonas Gorski <jogo@openwrt.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35534 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: move sleep out of the loopjuhosg2013-02-091-1/+2
| | | | | | | | | | It is enough to sleep once after ANEG is enabled on all PHYs. This reduces boot time on boards with AR8316 switch. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35532 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: simplify phy features setupjuhosg2013-02-081-11/+6
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35518 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: don't use mdio bus specific functions in ar8216_id_chipjuhosg2013-02-081-8/+9
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35517 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: use inline function to convert swdev to ar8216juhosg2013-02-071-15/+19
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35514 3c298f89-4303-0410-b956-a3cf2f4a3e73