summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_net.c
Commit message (Collapse)AuthorAgeFilesLines
* of_net: factor out repetitive code from of_get_mac_address()Sergei Shtylyov2015-03-291-12/+17
| | | | | | | | | | | | | | of_get_mac_address() basically does the same thing thrice, every time with a different property name, so it makes sense to factor out the repetitive code into separate function. While at it, we can start using ETH_ALEN instead of the bare number and drop unnecessary parens around the property length check. The resulting ARM object file is 100 bytes less in size than before the patch. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2014-04-021-24/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: "Here is my initial pull request for the networking subsystem during this merge window: 1) Support for ESN in AH (RFC 4302) from Fan Du. 2) Add full kernel doc for ethtool command structures, from Ben Hutchings. 3) Add BCM7xxx PHY driver, from Florian Fainelli. 4) Export computed TCP rate information in netlink socket dumps, from Eric Dumazet. 5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas Dichtel. 6) Convert many drivers to pci_enable_msix_range(), from Alexander Gordeev. 7) Record SKB timestamps more efficiently, from Eric Dumazet. 8) Switch to microsecond resolution for TCP round trip times, also from Eric Dumazet. 9) Clean up and fix 6lowpan fragmentation handling by making use of the existing inet_frag api for it's implementation. 10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss. 11) Auto size SKB lengths when composing netlink messages based upon past message sizes used, from Eric Dumazet. 12) qdisc dumps can take a long time, add a cond_resched(), From Eric Dumazet. 13) Sanitize netpoll core and drivers wrt. SKB handling semantics. Get rid of never-used-in-tree netpoll RX handling. From Eric W Biederman. 14) Support inter-address-family and namespace changing in VTI tunnel driver(s). From Steffen Klassert. 15) Add Altera TSE driver, from Vince Bridgers. 16) Optimizing csum_replace2() so that it doesn't adjust the checksum by checksumming the entire header, from Eric Dumazet. 17) Expand BPF internal implementation for faster interpreting, more direct translations into JIT'd code, and much cleaner uses of BPF filtering in non-socket ocntexts. From Daniel Borkmann and Alexei Starovoitov" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits) netpoll: Use skb_irq_freeable to make zap_completion_queue safe. net: Add a test to see if a skb is freeable in irq context qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port' net: ptp: move PTP classifier in its own file net: sxgbe: make "core_ops" static net: sxgbe: fix logical vs bitwise operation net: sxgbe: sxgbe_mdio_register() frees the bus Call efx_set_channels() before efx->type->dimension_resources() xen-netback: disable rogue vif in kthread context net/mlx4: Set proper build dependancy with vxlan be2net: fix build dependency on VxLAN mac802154: make csma/cca parameters per-wpan mac802154: allow only one WPAN to be up at any given time net: filter: minor: fix kdoc in __sk_run_filter netlink: don't compare the nul-termination in nla_strcmp can: c_can: Avoid led toggling for every packet. can: c_can: Simplify TX interrupt cleanup can: c_can: Store dlc private can: c_can: Reduce register access can: c_can: Make the code readable ...
| * net: phy: re-design phy_modes to be self-containedFlorian Fainelli2014-02-121-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_get_phy_mode() uses a local array to map phy_interface_t values from include/linux/net/phy.h to a string which is read from the 'phy-mode' or 'phy-connection-type' property. In preparation for exposing the PHY interface mode through sysfs, perform the following: - mode phy_modes from drivers/of/of_net.c to include/linux/phy.h such that it is right below the phy_interface_t enum - make it a static inline function returning the string such that we can use it by just including include/linux/net/phy.h - add a PHY_INTERFACE_MODE_MAX enum value to guard the iteration in of_get_phy_mode() Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | of: make of_get_phy_mode parse 'phy-connection-type'Florian Fainelli2014-02-031-4/+7
|/ | | | | | | | | | | Per the ePAPR v1.1 specification, 'phy-connection-type' is the canonical property name for describing an Ethernet to PHY connection type. Make sure that of_get_phy_mode() also attempts to parse that property and update the comments mentioning 'phy-mode' to also include 'phy-connection-type'. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* phylib: introduce PHY_INTERFACE_MODE_XGMII for 10G PHYAndy Fleming2014-01-131-0/+1
| | | | | | | Signed-off-by: Andy Fleming <afleming@gmail.com> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* of: Make of_get_phy_mode() return int i.s.o. const intGeert Uytterhoeven2013-08-281-1/+1
| | | | | | | include/linux/of_net.h:16: warning: type qualifiers ignored on function return type Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Grant Likely <grant.likely@linaro.org>
* phy: add reverse MII PHY connection typeFlorian Fainelli2013-05-311-0/+1
| | | | | | | | | The PHY library currently does not know about the the reverse MII connection type. Add it to the list of supported PHY modes and update of_get_phy_mode() to support it and look for the string "rev-mii". Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/of: include export.h for EXPORT_SYMBOL_GPL/THIS_MODULE as requiredPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | For files that were getting these macros via the implicit presence of module.h being everywhere. With contributions from Stephen Rothwell <sfr@canb.auug.org.au>. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* net: ibm_newemac: convert it to use of_get_phy_modeShawn Guo2011-07-271-0/+2
| | | | | | | | | | | | | | | | The patch extends 'enum phy_interface_t' and of_get_phy_mode a little bit with PHY_INTERFACE_MODE_NA and PHY_INTERFACE_MODE_SMII added, and then converts ibm_newemac net driver to use of_get_phy_mode getting phy mode from device tree. It also resolves the namespace conflict on phy_read/write between common mdiobus interface and ibm_newemac private one. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: David S. Miller <davem@davemloft.net> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David Miller <davem@davemloft.net>
* dt/net: add helper function of_get_phy_modeShawn Guo2011-07-271-0/+43
| | | | | | | | | | It adds the helper function of_get_phy_mode getting phy interface from device tree. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David Miller <davem@davemloft.net>
* of/net: Move of_get_mac_address() to a common source file.David Daney2010-11-011-0/+48
There are two identical implementations of of_get_mac_address(), one each in arch/powerpc/kernel/prom_parse.c and arch/microblaze/kernel/prom_parse.c. Move this function to a new common file of_net.{c,h} and adjust all the callers to include the new header. Signed-off-by: David Daney <ddaney@caviumnetworks.com> [grant.likely@secretlab.ca: protect header with #ifdef] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
OpenPOWER on IntegriCloud