1. 31 Oct, 2014 19 commits
    • David S. Miller's avatar
      Merge tag 'master-2014-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · 99a49ce6
      David S. Miller authored
      John W. Linville says:
      
      ====================
      pull request: wireless 2014-10-31
      
      Please pull this small batch of spooky fixes intended for the 3.18
      stream...boo!
      
      Cyril Brulebois adds an rt2x00 device ID.
      
      Dan Carpenter provides a one-line masking fix for an ath9k debugfs
      entry.
      
      Larry Finger gives us a package of small rtlwifi fixes which add some
      bits that were left out of some feature updates that were included
      in the merge window.  Hopefully this isn't a sign that the rtlwifi
      base is getting too big...
      
      Marc Yang brings a fix for a temporary mwifiex stall when doing 11n
      RX reordering.
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99a49ce6
    • Lennart Sorensen's avatar
      drivers: net: cpsw: Support ALLMULTI and fix IFF_PROMISC in switch mode · 1e5c4bc4
      Lennart Sorensen authored
      The cpsw driver did not support the IFF_ALLMULTI flag which makes dynamic
      multicast routing not work.  Related to this, when enabling IFF_PROMISC
      in switch mode, all registered multicast addresses are flushed, resulting
      in only broadcast and unicast traffic being received.
      
      A new cpsw_ale_set_allmulti function now scans through the ALE entry
      table and adds/removes the host port from the unregistered multicast
      port mask of each vlan entry depending on the state of IFF_ALLMULTI.
      In promiscious mode, cpsw_ale_set_allmulti is used to force reception
      of all multicast traffic in addition to the unicast and broadcast traffic.
      
      With this change dynamic multicast and promiscious mode both work in
      switch mode.
      Signed-off-by: default avatarLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e5c4bc4
    • Lennart Sorensen's avatar
      drivers: net: cpsw: Fix broken loop condition in switch mode · 6f979eb3
      Lennart Sorensen authored
      0d961b3b (drivers: net: cpsw: fix buggy
      loop condition) accidentally fixed a loop comparison in too many places
      while fixing a real bug.
      
      It was correct to fix the dual_emac mode section since there 'i' is used
      as an index into priv->slaves which is a 0 based array.
      
      However the other two changes (which are only used in switch mode)
      are wrong since there 'i' is actually the ALE port number, and port 0
      is the host port, while port 1 and up are the slave ports.
      
      Putting the loop condition back in the switch mode section fixes it.
      
      A comment has been added to point out the intent clearly to avoid future
      confusion.  Also a comment is fixed that said the opposite of what was
      actually happening.
      Signed-off-by: default avatarLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f979eb3
    • Guenter Roeck's avatar
      net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0 · e0fb6fb6
      Guenter Roeck authored
      If a driver supports reading EEPROM but no EEPROM is installed in the system,
      the driver's get_eeprom_len function returns 0. ethtool will subsequently
      try to read that zero-length EEPROM anyway. If the driver does not support
      EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
      does support EEPROM access but no EEPROM is installed, the operation will
      return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0fb6fb6
    • Andy Shevchenko's avatar
      stmmac: pci: set default of the filter bins · 1e19e084
      Andy Shevchenko authored
      The commit 3b57de95 brought the support for a different amount of the
      filter bins, but didn't update the PCI driver accordingly. This patch appends
      the default values when the device is enumerated via PCI bus.
      
      Fixes: 3b57de95 (net: stmmac: Support devicetree configs for mcast and ucast filter entries)
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e19e084
    • Tony Lindgren's avatar
      net: smc91x: Fix gpios for device tree based booting · 7d2911c4
      Tony Lindgren authored
      With legacy booting, the platform init code was taking care of
      the configuring of GPIOs. With device tree based booting, things
      may or may not work depending what bootloader has configured or
      if the legacy platform code gets called.
      
      Let's add support for the pwrdn and reset GPIOs to the smc91x
      driver to fix the issues of smc91x not working properly when
      booted in device tree mode.
      
      And let's change n900 to use these settings as some versions
      of the bootloader do not configure things properly causing
      errors.
      Reported-by: default avatarKevin Hilman <khilman@linaro.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d2911c4
    • Pravin B Shelar's avatar
      mpls: Allow mpls_gso to be built as module · de05c400
      Pravin B Shelar authored
      Kconfig already allows mpls to be built as module. Following patch
      fixes Makefile to do same.
      
      CC: Simon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Acked-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de05c400
    • Pravin B Shelar's avatar
      mpls: Fix mpls_gso handler. · f7065f4b
      Pravin B Shelar authored
      mpls gso handler needs to pull skb after segmenting skb.
      
      CC: Simon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Acked-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7065f4b
    • hayeswang's avatar
      r8152: stop submitting intr for -EPROTO · d59c876d
      hayeswang authored
      For Renesas USB 3.0 host controller, when unplugging the usb hub which
      has the RTL8153 plugged, the driver would get -EPROTO for interrupt
      transfer. There is high probability to get the information of "HC died;
      cleaning up", if the driver continues to submit the interrupt transfer
      before the disconnect() is called.
      
      [ 1024.197678] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.213673] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.229668] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.245661] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.261653] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.277648] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.293642] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.309638] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.325633] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.341627] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.357621] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.373615] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.383097] usb 9-1: USB disconnect, device number 2
      [ 1024.383103] usb 9-1.4: USB disconnect, device number 6
      [ 1029.391010] xhci_hcd 0000:04:00.0: xHCI host not responding to stop endpoint command.
      [ 1029.391016] xhci_hcd 0000:04:00.0: Assuming host is dying, halting host.
      [ 1029.392551] xhci_hcd 0000:04:00.0: HC died; cleaning up
      [ 1029.421480] usb 8-1: USB disconnect, device number 2
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d59c876d
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · e3a88f9c
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      netfilter/ipvs fixes for net
      
      The following patchset contains fixes for netfilter/ipvs. This round of
      fixes is larger than usual at this stage, specifically because of the
      nf_tables bridge reject fixes that I would like to see in 3.18. The
      patches are:
      
      1) Fix a null-pointer dereference that may occur when logging
         errors. This problem was introduced by 4a4739d5 ("ipvs: Pull
         out crosses_local_route_boundary logic") in v3.17-rc5.
      
      2) Update hook mask in nft_reject_bridge so we can also filter out
         packets from there. This fixes 36d2af59 ("netfilter: nf_tables: allow
         to filter from prerouting and postrouting"), which needs this chunk
         to work.
      
      3) Two patches to refactor common code to forge the IPv4 and IPv6
         reject packets from the bridge. These are required by the nf_tables
         reject bridge fix.
      
      4) Fix nft_reject_bridge by avoiding the use of the IP stack to reject
         packets from the bridge. The idea is to forge the reject packets and
         inject them to the original port via br_deliver() which is now
         exported for that purpose.
      
      5) Restrict nft_reject_bridge to bridge prerouting and input hooks.
         the original skbuff may cloned after prerouting when the bridge stack
         needs to flood it to several bridge ports, it is too late to reject
         the traffic.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3a88f9c
    • Pablo Neira Ayuso's avatar
      netfilter: nft_reject_bridge: restrict reject to prerouting and input · 127917c2
      Pablo Neira Ayuso authored
      Restrict the reject expression to the prerouting and input bridge
      hooks. If we allow this to be used from forward or any other later
      bridge hook, if the frame is flooded to several ports, we'll end up
      sending several reject packets, one per cloned packet.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      127917c2
    • Pablo Neira Ayuso's avatar
      netfilter: nft_reject_bridge: don't use IP stack to reject traffic · 523b929d
      Pablo Neira Ayuso authored
      If the packet is received via the bridge stack, this cannot reject
      packets from the IP stack.
      
      This adds functions to build the reject packet and send it from the
      bridge stack. Comments and assumptions on this patch:
      
      1) Validate the IPv4 and IPv6 headers before further processing,
         given that the packet comes from the bridge stack, we cannot assume
         they are clean. Truncated packets are dropped, we follow similar
         approach in the existing iptables match/target extensions that need
         to inspect layer 4 headers that is not available. This also includes
         packets that are directed to multicast and broadcast ethernet
         addresses.
      
      2) br_deliver() is exported to inject the reject packet via
         bridge localout -> postrouting. So the approach is similar to what
         we already do in the iptables reject target. The reject packet is
         sent to the bridge port from which we have received the original
         packet.
      
      3) The reject packet is forged based on the original packet. The TTL
         is set based on sysctl_ip_default_ttl for IPv4 and per-net
         ipv6.devconf_all hoplimit for IPv6.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      523b929d
    • Pablo Neira Ayuso's avatar
      netfilter: nf_reject_ipv6: split nf_send_reset6() in smaller functions · 8bfcdf66
      Pablo Neira Ayuso authored
      That can be reused by the reject bridge expression to build the reject
      packet. The new functions are:
      
      * nf_reject_ip6_tcphdr_get(): to sanitize and to obtain the TCP header.
      * nf_reject_ip6hdr_put(): to build the IPv6 header.
      * nf_reject_ip6_tcphdr_put(): to build the TCP header.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      8bfcdf66
    • Pablo Neira Ayuso's avatar
      netfilter: nf_reject_ipv4: split nf_send_reset() in smaller functions · 052b9498
      Pablo Neira Ayuso authored
      That can be reused by the reject bridge expression to build the reject
      packet. The new functions are:
      
      * nf_reject_ip_tcphdr_get(): to sanitize and to obtain the TCP header.
      * nf_reject_iphdr_put(): to build the IPv4 header.
      * nf_reject_ip_tcphdr_put(): to build the TCP header.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      052b9498
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables_bridge: update hook_mask to allow {pre,post}routing · 4d87716c
      Pablo Neira Ayuso authored
      Fixes: 36d2af59 ("netfilter: nf_tables: allow to filter from prerouting and postrouting")
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      4d87716c
    • Ben Hutchings's avatar
      drivers/net: macvtap and tun depend on INET · de11b0e8
      Ben Hutchings authored
      These drivers now call ipv6_proxy_select_ident(), which is defined
      only if CONFIG_INET is enabled.  However, they have really depended
      on CONFIG_INET for as long as they have allowed sending GSO packets
      from userland.
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Fixes: f43798c2 ("tun: Allow GSO using virtio_net_hdr")
      Fixes: b9fb9ee0 ("macvtap: add GSO/csum offload support")
      Fixes: 5188cd44 ("drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de11b0e8
    • David S. Miller's avatar
      Merge branch 'ufo-fix' · c1304b21
      David S. Miller authored
      Ben Hutchings says:
      
      ====================
      drivers/net,ipv6: Fix IPv6 fragment ID selection for virtio
      
      The virtio net protocol supports UFO but does not provide for passing a
      fragment ID for fragmentation of IPv6 packets.  We used to generate a
      fragment ID wherever such a packet was fragmented, but currently we
      always use ID=0!
      
      v2: Add blank lines after declarations
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1304b21
    • Ben Hutchings's avatar
      drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets · 5188cd44
      Ben Hutchings authored
      UFO is now disabled on all drivers that work with virtio net headers,
      but userland may try to send UFO/IPv6 packets anyway.  Instead of
      sending with ID=0, we should select identifiers on their behalf (as we
      used to).
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Fixes: 916e4cf4 ("ipv6: reuse ip6_frag_id from ip6_ufo_append_data")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5188cd44
    • Ben Hutchings's avatar
      drivers/net: Disable UFO through virtio · 3d0ad094
      Ben Hutchings authored
      IPv6 does not allow fragmentation by routers, so there is no
      fragmentation ID in the fixed header.  UFO for IPv6 requires the ID to
      be passed separately, but there is no provision for this in the virtio
      net protocol.
      
      Until recently our software implementation of UFO/IPv6 generated a new
      ID, but this was a bug.  Now we will use ID=0 for any UFO/IPv6 packet
      passed through a tap, which is even worse.
      
      Unfortunately there is no distinction between UFO/IPv4 and v6
      features, so disable UFO on taps and virtio_net completely until we
      have a proper solution.
      
      We cannot depend on VM managers respecting the tap feature flags, so
      keep accepting UFO packets but log a warning the first time we do
      this.
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Fixes: 916e4cf4 ("ipv6: reuse ip6_frag_id from ip6_ufo_append_data")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d0ad094
  2. 30 Oct, 2014 21 commits