aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/swconfig.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: fix replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-191-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@nbd.name> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49379 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: add (PHY) generic helper setting port linkRafał Miłecki2016-02-031-0/+36
| | | | | | | | | | It's quite common for switches to have PHY per port so adding a generic helper setting link state will help many drivers. It just needs an API to access PHYs which this patch also adds. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48621 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: simplify init codeJonas Gorski2016-01-241-6/+1
| | | | | | | | | Directly return the return value of genl_register_family_with_ops() instead of storing it in a temporary variable, then returning it. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48472 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: drop linux < 3.13 code pathsJonas Gorski2016-01-241-20/+0
| | | | | | | | | The oldest kernel we support is 3.18, no need to keep code paths for older kernels. Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48471 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: add API for setting port link speedRafał Miłecki2016-01-061-1/+48
| | | | | | | | | Some switches can force link speed for a port. Let's add API that will allow drivers to export this feature. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48142 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: switch kernel PORT_LINK support to SWITCH_TYPE_LINKJohn Crispin2015-12-231-47/+4
| | | | | | | | | As explained earlier, using SWITCH_TYPE_LINK gives more flexibility, it doesn't require e.g. string parsing to read some data. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47999 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: add SWITCH_TYPE_LINK and support sending link info to user spaceJohn Crispin2015-12-231-0/+56
| | | | | | | | | | | | | So far we were sending link data as a string. It got some drawbacks: 1) Didn't allow writing clean user space apps reading link state. It was needed to do some screen scraping. 2) Forced whole PORT_LINK communication to be string based. Adding support for *setting* port link required passing string and parting it in the kernel space. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47997 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: fix build with linux 4.0John Crispin2015-03-061-3/+6
| | | | | | Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44617 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add 802.3az EEE info to swconfig get_link attributeFelix Fietkau2015-01-181-1/+3
| | | | | | | | | | | | | 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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44022 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
* 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
* 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
* kernel: make swconfig checkpath compliantFlorian Fainelli2013-10-241-35/+40
| | | | | | | | Fix the warnings and errors reported by checkpatch on swconfig.c Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38523 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [ramips] unbreak portmapping - typo fixJohn Crispin2013-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 OFJohn Crispin2013-04-091-0/+73
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36283 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: make it compatible with 3.7Gabor Juhos2012-11-211-3/+3
| | | | | | | | | | | | | | | | | | | swconfig does not compile with 3.7 because struct netlink_notify->pid has been renamed to struct netlink_notify->portid and struct genl_info->snd_pid has been renamed to struct genl_info->snd_portid Use the new names and add compatibility patches to 3.3 and 3.6. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34288 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [kernel] swconfig: get rid of the NLA_PUT_* macrosFlorian Fainelli2012-10-241-17/+33
| | | | | | | Upstream kernel 3.6 has removed this usage, use the plain functions directly as intended. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33906 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: use a mutex instead of a spinlock, many swconfig calls sleepFelix Fietkau2012-03-151-5/+5
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30952 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: swconfig: add a generic get_port_link implementationGabor Juhos2012-03-071-0/+79
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30839 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: swconfig: introduce a generic switch LED triggerGabor Juhos2011-12-311-0/+8
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29627 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: swconfig: add a missing unlock in error pathGabor Juhos2011-11-041-1/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28753 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: Add generic switch identifiersJonas Gorski2011-07-271-5/+30
| | | | | | | | Also make switches available under a generic name "switch<num>" for device name agnostic access. The old device name is used as an alias for backward compatibility. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27800 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: Replace SPIN_LOCK_UNLOCKED with DEFINE_SPINLOCKFelix Fietkau2011-04-261-1/+1
| | | | | | | | | SPIN_LOCK_UNLOCKED has been deprecated since 2.6.19 and will get removed in 2.6.39, so replace it with DEFINE_SPINLOCK(). Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26770 3c298f89-4303-0410-b956-a3cf2f4a3e73
* swconfig: cleanup of kernel drivers and interfaceFelix Fietkau2010-08-041-25/+29
| | | | | | | | - add some comments to a few data structures - add a switch_dev_ops data structure for attributes and callback to replace the stupid template memcpy - get rid of the switch_dev.priv pointer - using container_of() is better git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22476 3c298f89-4303-0410-b956-a3cf2f4a3e73
* rename target/linux/generic-2.6 to genericFelix Fietkau2010-06-261-0/+925
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21952 3c298f89-4303-0410-b956-a3cf2f4a3e73