summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ieee802154: default to AACK in at86rf230Phoebe Buckheister2014-02-171-1/+1
| | | | | | | | | | | | | | | The current IEEE802.15.4 stack assumes that a radio will never deliver packets with a bad CRC into the stack, as required by the standard. at86rf230 driven radios violates this assumption because of another incompatibility: devices are required to send ACKs if requested by a sender, but RF2xx will only send ACKs from a special receive mode that is currently not used by the driver. Enable this receive mode to fix both bugs. Frames with bad CRCs will not be received at all, and ACKs will be sent if so requested. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* ieee802154: add basic support for RF212 to at86rf230 driverPhoebe Buckheister2014-02-171-89/+179
| | | | | | | | | | | | | | | | Since the AT86RF2xy chips are mostly compatible, this is only a small change to the actual driver code. The at86rf230 driver already supports the RF212 in most places, only three small adjustments are required: * force the initial state after P_ON to FORCE_TRX_OFF to work around a documented erratum * channels_supported depends on the frequency of the transceiver, and thus is_rf212 * do early detection of chip version select an appropriate _ops struct based on the chip version. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'phy'David S. Miller2014-02-173-5/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Florian Fainelli says: ==================== net: phy: soft reset rework for 10G PHYs As reported by Shaohui, 10G PHYs may have a slightly more complex reset sequence for which a BMCR_RESET software reset might not suffice. This patchset offers a solution for those by allowing them to implement their own soft_reset() callback. Finally there is an update to the PHY library Documentation to cover for the newly added callbacks of the PHY driver structure. Changes in v2: - fixed callback testing - fixed typo in Documentation ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * Documentation: networking: update phy.txt with recent changesFlorian Fainelli2014-02-171-0/+9
| | | | | | | | | | | | | | | | The PHY library was missing a bunch of newly added PHY driver callbacks along with a smallish description of what they do, fix that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: allow PHY drivers to implement their own software resetFlorian Fainelli2014-02-172-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Shaohui, most 10G PHYs out there have a non-standard compliant software reset sequence, eventually something much more complex than just toggling the BMCR_RESET bit. Allow PHY driver to implement their own soft_reset() callback to deal with that. If no callback is provided, call into genphy_soft_reset() which makes sure the existing behavior is kept intact. Reported-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: move PHY software reset to genphy_soft_resetFlorian Fainelli2014-02-172-5/+23
|/ | | | | | | | | | | | | | As pointed out by Shaohui, this function is generic for 10/100/1000 PHYs, but 10G PHYs might have a slightly different reset sequence which prevents most of them from using this function. Move the BMCR_RESET based software resent sequence to genphy_soft_reset() in preparation for allowing PHY drivers to implement a soft_reset() callback. Reported-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Drivers: net: hyperv: Cleanup the netvsc receive callback functioKY Srinivasan2014-02-172-23/+12
| | | | | | | Get rid of the buffer allocation in the receive path for normal packets. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Drivers: net: hyperv: Cleanup the receive pathKY Srinivasan2014-02-171-16/+13
| | | | | | | | | Make the receive path a little more efficient by parameterizing the required state rather than re-establishing that state. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Drivers: net: hyperv: Get rid of the rndis_filter_packet structureKY Srinivasan2014-02-173-45/+4
| | | | | | | | | This structure is redundant; get rid of it make the code little more efficient - get rid of the unnecessary indirection. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net:cpsw: Pass unhandled ioctl's on to generic phy ioctlStefan Sørensen2014-02-171-7/+3
| | | | | | | | | | | This patch allows the use of a generic timestamping phy connected to the cpsw if CPTS support is not enabled. This also adds support of the SIOCGMIIREG and SIOCSMIIREG, and moves handling of SIOCGMIIPHY to the generic driver. Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Convert memcpy(foo, bar, ETH_ALEN) to ether_addr_copy(foo, bar)Joe Perches2014-02-173-25/+25
| | | | | | | | | | ether_addr_copy is smaller and faster for some architectures. This relies on a stack frame being at least __aligned(2) for one use of an Ethernet address on the stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Convert c99 commentsJoe Perches2014-02-171-88/+87
| | | | | | | Neatening only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Neaten pr_<level>Joe Perches2014-02-176-122/+110
| | | | | | | | | | | Add missing terminating newlines. Convert uses of pr_info to pr_cont in bond_check_params. Standardize upper/lower case styles. Typo fixes, remove unnecessary parentheses and periods. Alignment neatening. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: Convert pr_warning to pr_warn, neateningJoe Perches2014-02-174-73/+67
| | | | | | | | | Use more current logging style. Coalesce formats, realign arguments, drop unnecessary periods. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* caif: delete unnecessary field initializationJulia Lawall2014-02-172-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | On success, the function netdev_alloc_skb initializes the dev field of its result to its first argument, so this doesn't have to be done in the calling context. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression skb,privn,e; @@ skb = netdev_alloc_skb(privn,...); ... when strict ( -skb->dev = privn; | ?skb = e ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
* Documentation: broadcom-bcmgenet: add better clocks documentationFlorian Fainelli2014-02-171-2/+5
| | | | | | | | | | Document the required "clocks" phandles and their corresponding "clock-names" properties for the two clocks used by the GENET hardware block ("enet" and "enet-wol"). CC: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: correct usage of spin_lock() vs spin_lock_bh()Jon Paul Maloy2014-02-171-3/+3
| | | | | | | | | | | | | | | I commit e099e86c9e24fe9aff36773600543eb31d8954d ("tipc: add node_lock protection to link lookup function") we are calling spin_lock(&node->lock) directly instead of indirectly via the tipc_node_lock(node) function. However, tipc_node_lock() is using spin_lock_bh(), not spin_lock(), something leading to unbalanced usage in one place, and a smatch warning. We fix this by consistently using tipc_node_lock()/unlock() in in the places touched by the mentioned commit. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: fix a loop style problemJon Paul Maloy2014-02-171-5/+5
| | | | | | | | | | | | | | | | | | In commit 7d33939f475d403e79124e3143d7951dcfe8629f ("tipc: delay delete of link when failover is needed") we introduced a loop for finding and removing a link pointer in an array. The removal is done after we have left the loop, giving the impression that one may remove the wrong pointer if no matching element is found. This is not really a bug, since we know that there will always be a matching element, but it looks wrong, and causes a smatch warning. We fix this loop with this commit. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ip_tunnel: return more precise errno value when adding tunnel failsFlorian Westphal2014-02-171-5/+10
| | | | | | | | | | | Currently this always returns ENOBUFS, because the return value of __ip_tunnel_create is discarded. A more common failure is a duplicate name (EEXIST). Propagate the real error code so userspace can display a more meaningful error message. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* openvswitch: rename ->sync to ->syncpWANG Cong2014-02-152-7/+7
| | | | | | | | | | | | Openvswitch defines u64_stats_sync as ->sync rather than ->syncp, so fails to compile with netdev_alloc_pcpu_stats(). So just rename it to ->syncp. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 1c213bd24ad04f4430031 (net: introduce netdev_alloc_pcpu_stats() for drivers) Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Reviewed-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch warnings braces {}Wang Yufen2014-02-141-10/+5
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch warnings braces {}Wang Yufen2014-02-141-13/+7
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch warnings braces {}Wang Yufen2014-02-141-12/+6
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch warnings braces {}Wang Yufen2014-02-141-12/+6
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch errors comments and spaceWang Yufen2014-02-141-3/+3
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding:fix checkpatch errors with foo* bar|foo * barWang Yufen2014-02-141-3/+3
| | | | | Signed-off-by: Wang Yufen <wangyufen@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* appletalk: fix checkpatch error with indentwangweidong2014-02-141-45/+45
| | | | | | | checkpatch error: switch and case should be at the same indent. Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* appletalk: fix checkpatch errors with foo* bar|foo * barwangweidong2014-02-141-2/+2
| | | | | | | | | fix checkpatch errors below: ERROR: "foo* bar" should be "foo *bar" ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* appletalk: fix checkpatch errors with space required or prohibitedwangweidong2014-02-142-5/+5
| | | | | | | fix checkpatch errors while the space is required or prohibited Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: add pacing_rate information into tcp_infoEric Dumazet2014-02-142-0/+8
| | | | | | | | | | | | | | | | | | Add two new fields to struct tcp_info, to report sk_pacing_rate and sk_max_pacing_rate to monitoring applications, as ss from iproute2. User exported fields are 64bit, even if kernel is currently using 32bit fields. lpaa5:~# ss -i .. skmem:(r0,rb357120,t0,tb2097152,f1584,w1980880,o0,bl0) ts sack cubic wscale:6,6 rto:400 rtt:0.875/0.75 mss:1448 cwnd:1 ssthresh:12 send 13.2Mbps pacing_rate 3336.2Mbps unacked:15 retrans:1/5448 lost:15 rcv_space:29200 Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: introduce netdev_alloc_pcpu_stats() for driversWANG Cong2014-02-1419-154/+35
| | | | | | | | | There are many drivers calling alloc_percpu() to allocate pcpu stats and then initializing ->syncp. So just introduce a helper function for them. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net-sysfs: get_netdev_queue_index() cleanupEric Dumazet2014-02-141-6/+3
| | | | | | | | Remove one inline keyword, and no need for a loop to find an index into a table. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'bcmgenet'David S. Miller2014-02-1415-53/+4247
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Florian Fainelli says: ==================== Support for the Broadcom GENET driver This patchset adds support for the Broadcom GENET Gigabit Ethernet MAC controller. This controller is found on the Broadcom BCM7xxx Set Top Box System-on-a-chips. Changes since v4: - add dependency on CONFIG_OF Changes since v3: - fixed Kconfig dependency on FIXED_PHY Changes since v2: - dropped the patch that adds an "internal" phy-mode ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
| * MAINTAINERS: add entry for the Broadcom GENET driverFlorian Fainelli2014-02-141-0/+6
| | | | | | | | | | | | | | Add myself as a maintainer of the Broadcom GENET driver. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * Documentation: add Device tree bindings for Broadcom GENETFlorian Fainelli2014-02-141-0/+121
| | | | | | | | | | | | | | | | | | This patch adds the Device Tree bindings for the Broadcom GENET Gigabit Ethernet controller. A bunch of examples are provided to illustrate the versatile aspect of the hardare. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: bcmgenet: hook into the build systemFlorian Fainelli2014-02-143-0/+14
| | | | | | | | | | | | | | | | | | This patch adds a new configuration symbol: CONFIG_BCMGENET which allows us to build the Broadcom GENET driver and hook the driver files into the build system. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: bcmgenet: add MDIO routinesFlorian Fainelli2014-02-141-0/+464
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for configuring the port multiplexer hardware which resides in front of the GENET Ethernet MAC controller. This allows us to support: - internal PHYs (using drivers/net/phy/bcm7xxx.c) - MoCA PHYs which are an entirely separate hardware block not covered here - external PHYs and switches Note that MoCA and switches are currently supported using the emulated "fixed PHY" driver. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: bcmgenet: add main driver fileFlorian Fainelli2014-02-141-0/+2595
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the BCMGENET main driver file which supports the following: - GENET hardware from V1 to V4 - support for reading the UniMAC MIB counters statistics - support for the 5 transmit queues - support for RX/TX checksum offload and SG Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: bcmgenet: add driver definitions and private structureFlorian Fainelli2014-02-141-0/+630
| | | | | | | | | | | | | | | | | | This patchs adds the bcmgenet.h header file which contains all the hardware definitions for the GENETv1 to v4 hardware blocks as well as the driver private structure and MIB counters. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: add Broadcom BCM7xxx internal PHY driverFlorian Fainelli2014-02-144-0/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Broadcom BCM7xxx Set Top Box SoCs internal PHYs. This driver supports the following generation of SoCs: - BCM7366, BCM7439, BCM7445 (28nm process) - all 40nm and 65nm (older MIPS-based SoCs) The PHYs on these SoCs require a bunch of workarounds to operate correctly, both during configuration time and at suspend/resume time, the driver handles that for us. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: broadcom: extract register definitionsFlorian Fainelli2014-02-142-52/+51
| | | | | | | | | | | | | | | | | | | | The Broadcom BCM54xx register definitions are shared between BCM54xx and BCM7xx internal PHYs for which we are adding support. Extract these register definitions and put them in include/linux/brcmphy.h for use by the BCM7xxx internal PHY driver. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: update port type for MoCA PHYsFlorian Fainelli2014-02-141-1/+4
| | | | | | | | | | | | | | | | MoCA PHYs are using coaxial (BNC-like) connectors, update the transceiver port type when replying to ethtool. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net: phy: add MoCA PHY typeFlorian Fainelli2014-02-141-0/+3
|/ | | | | | | | | | | Some Ethernet MACs are connected to a MoCA PHY which will handle the low-level job of sending Ethernet frames on the coaxial cable, these Ethernet MACs need to know about it to be properly configured. Add a new PHY mode "moca" and update the Device Tree parsing logic to look for it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sch_netem: replace magic numbers with enumerate in GE modelYang Yingliang2014-02-141-4/+9
| | | | | | | | Replace some magic numbers which describe states of GE model loss generator with enumerate. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sch_netem: change some func's param from "struct Qdisc *" to "struct ↵Yang Yingliang2014-02-141-15/+10
| | | | | | | | | | | netem_sched_data *" In netem_change(), we have already get "struct netem_sched_data *q". Replace params of get_correlation() and other similar functions with "struct netem_sched_data *q". Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sch_netem: return errcode before setting paramsYang Yingliang2014-02-141-10/+29
| | | | | | | | | | get_dist_table() and get_loss_clg() may be failed. These two functions should be called after setting the members of qdisc_priv(sch), or it will break the old settings while either of them is failed. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: ip_forward: perform skb->pkt_type check at the beginningDenis Kirjanov2014-02-131-3/+4
| | | | | | | | | | Packets which have L2 address different from ours should be already filtered before entering into ip_forward(). Perform that check at the beginning to avoid processing such packets. Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: remove unnecessary return'sstephen hemminger2014-02-1311-20/+0
| | | | | | | | | | | One of my pet coding style peeves is the practice of adding extra return; at the end of function. Kill several instances of this in network code. I suppose some coccinelle wizardy could do this automatically. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: remove unused min_cwnd member of tcp_congestion_opsStanislav Fomichev2014-02-1311-22/+1
| | | | | | | | | | Commit 684bad110757 "tcp: use PRR to reduce cwin in CWR state" removed all calls to min_cwnd, so we can safely remove it. Also, remove tcp_reno_min_cwnd because it was only used for min_cwnd. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: refactor multi-channel config code for Skyhawk-R chipVasundhara Volam2014-02-135-32/+127
| | | | | | | | | | | | | | | | | Currently multi-channel configuration is read via the QUERY_FW_CONFIG cmd. This method has been deprecated by the Skyhawk-R FW. Instead, GET_PROFILE_CONFIG::port-desc must be used to query this configuration. This patch also: a) introduces a few macros to identify certain categories of multi-channel configs 2) re-factors the be_cmd_set_profile_config() code to be able to read any kind of desc (and not just the nic-desc.) Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud