1. 24 2月, 2019 15 次提交
  2. 23 2月, 2019 19 次提交
    • D
      Merge branch 'net-phy-at803x-Update-delays-for-RGMII-modes' · e59d7909
      David S. Miller 提交于
      Vinod Koul says:
      
      ====================
      net: phy: at803x: Update delays for RGMII modes
      
      Peter[1] reported that patch cd28d1d6: ("net: phy: at803x: Disable
      phy delay for RGMII mode") caused regression on am335x-evmsk board.
      This board expects the Phy delay to be enabled but specified RGMII mode
      which refers to delays being disabled. So fix this by disabling delay only
      for RGMII mode and enable for RGMII_ID and RGMII_TXID/RXID modes.
      
      While at it, as pointed by Dave, don't inline the helpers.
      
      [1]: https://www.spinics.net/lists/netdev/msg550749.html
      
      Changes in v4:
       - fix log & comments nbased on Marc's feedback
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e59d7909
    • V
      net: phy: at803x: disable delay only for RGMII mode · 6d4cd041
      Vinod Koul 提交于
      Per "Documentation/devicetree/bindings/net/ethernet.txt" RGMII mode
      should not have delay in PHY whereas RGMII_ID and RGMII_RXID/RGMII_TXID
      can have delay in PHY.
      
      So disable the delay only for RGMII mode and enable for other modes.
      Also treat the default case as disabled delays.
      
      Fixes: cd28d1d6: ("net: phy: at803x: Disable phy delay for RGMII mode")
      Reported-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      Reviewed-by: NNiklas Cassel <niklas.cassel@linaro.org>
      Tested-by: NPeter Ujfalusi <peter.ujflausi@ti.com>
      Signed-off-by: NVinod Koul <vkoul@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d4cd041
    • V
      net: phy: at803x: don't inline helpers · 43f2ebd5
      Vinod Koul 提交于
      Some helpers were declared with the "inline" function specifier.
      It is preferable to let the compiler pick the right optimizations,
      so drop the specifier for at803x_disable_rx_delay() and
      at803x_disable_tx_delay()
      Reviewed-by: NNiklas Cassel <niklas.cassel@linaro.org>
      Tested-by: NPeter Ujfalusi <peter.ujflausi@ti.com>
      Reviewed-by: NMarc Gonzalez <marc.w.gonzalez@free.fr>
      Signed-off-by: NVinod Koul <vkoul@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43f2ebd5
    • C
      net_sched: initialize net pointer inside tcf_exts_init() · 14215108
      Cong Wang 提交于
      For tcindex filter, it is too late to initialize the
      net pointer in tcf_exts_validate(), as tcf_exts_get_net()
      requires a non-NULL net pointer. We can just move its
      initialization into tcf_exts_init(), which just requires
      an additional parameter.
      
      This makes the code in tcindex_alloc_perfect_hash()
      prettier.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14215108
    • D
      Merge tag 'wireless-drivers-next-for-davem-2019-02-22' of... · 1a256608
      David S. Miller 提交于
      Merge tag 'wireless-drivers-next-for-davem-2019-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 5.1
      
      Most likely the last set of patches for 5.1. WPA3 support to ath10k
      and qtnfmac. FTM support to iwlwifi and ath10k. And of course other
      new features and bugfixes.
      
      wireless-drivers was merged due to dependency in mt76.
      
      Major changes:
      
      iwlwifi
      
      * HE radiotap
      
      * FTM (Fine Timing Measurement) initiator and responder implementation
      
      * bump supported firmware API to 46
      
      * VHT extended NSS support
      
      * new PCI IDs for 9260 and 22000 series
      
      ath10k
      
      * change QMI interface to support the new (and backwards incompatible)
        interface from HL3.1 and used in recent HL2.0 branch firmware
        releases
      
      * support WPA3 with WCN3990
      
      * support for mac80211 airtime fairness based on transmit rate
        estimation, the firmware needs to support WMI_SERVICE_PEER_STATS to
        enable this
      
      * report transmit airtime to mac80211 with firmwares having
        WMI_SERVICE_REPORT_AIRTIME feature, this to have more accurate
        airtime fairness based on real transmit time (instead of just
        estimated from transmit rate)
      
      * support Fine Timing Measurement (FTM) responder role
      
      * add dynamic VLAN support with firmware having WMI_SERVICE_PER_PACKET_SW_ENCRYPT
      
      * switch to use SPDX license identifiers
      
      ath
      
      * add new country codes for US
      
      brcmfmac
      
      * support monitor frames with the hardware/ucode header
      
      qtnfmac
      
      * enable WPA3 SAE and OWE support
      
      mt76
      
      * beacon support for USB devices (mesh+ad-hoc only)
      
      rtlwifi
      
      * convert to use SPDX license identifiers
      
      libertas_tf
      
      * get the MAC address before registering the device
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a256608
    • D
      Merge branch 'AF_PACKET-transport_offset-fix' · d29d1c49
      David S. Miller 提交于
      Maxim Mikityanskiy says:
      
      ====================
      AF_PACKET transport_offset fix
      
      This patch series contains the implementation of the RFC that was posted
      on this mailing list previously:
      https://www.spinics.net/lists/netdev/msg541709.html
      
      It fixes having incorrect skb->transport_header values in cases when
      dissect fails. Having correct values set by the kernel fixes mlx5
      operation and allows to remove some unnecessary code flows in mlx5.
      
      v2 changes:
      
      - Rebase against the fresh net-next.
      - Don't return bool from skb_probe_transport_header (and don't rename
        the function).
      - WARN_ON_ONCE and error path in case of GSO without the L4 header.
      ====================
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d29d1c49
    • M
      net/mlx5e: Trust kernel regarding transport offset · 41f5f63c
      Maxim Mikityanskiy 提交于
      After AF_PACKET is fixed to calculate the transport header offset
      correctly, trust the value set by the kernel. If the offset wasn't set,
      it means there is no transport header in the packet.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Reviewed-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41f5f63c
    • M
      net/mlx5e: Remove the wrong assumption about transport offset · 3517dfe6
      Maxim Mikityanskiy 提交于
      skb_transport_offset() == 0 is not a special value. The only special
      value is when skb->transport_header is ~0U, and it's checked by
      skb_transport_header_was_set().
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Reviewed-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3517dfe6
    • M
      net/packet: Remove redundant skb->protocol set · 6437866e
      Maxim Mikityanskiy 提交于
      c72219b7 introduced tpacket_set_protocol that parses the Ethernet L2
      header and sets skb->protocol if it's unset. It is no longer needed
      since the introduction of packet_parse_headers. In case of SOCK_RAW and
      unset skb->protocol, packet_parse_headers asks the driver to tell the
      protocol number, and it's implemented for all Ethernet devices. As the
      old function supported only Ethernet, no functionality is lost.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6437866e
    • M
      net/packet: Ask driver for protocol if not provided by user · 75c65772
      Maxim Mikityanskiy 提交于
      If a socket was created with socket(AF_PACKET, SOCK_RAW, 0), the
      protocol number is unavailable. Try to ask the driver to extract it from
      the L2 header in order for skb_try_probe_transport_header to succeed.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75c65772
    • M
      net/ethernet: Add parse_protocol header_ops support · ace53b2e
      Maxim Mikityanskiy 提交于
      The previous commit introduced parse_protocol callback which should
      extract the protocol number from the L2 header. Make all Ethernet
      devices support it.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ace53b2e
    • M
      net: Introduce parse_protocol header_ops callback · e78b2915
      Maxim Mikityanskiy 提交于
      Introduce a new optional header_ops callback called parse_protocol and a
      wrapper function dev_parse_header_protocol, similar to dev_parse_header.
      
      The new callback's purpose is to extract the protocol number from the L2
      header, the format of which is known to the driver, but not to the upper
      layers of the stack.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e78b2915
    • M
      net: Don't set transport offset to invalid value · d2aa125d
      Maxim Mikityanskiy 提交于
      If the socket was created with socket(AF_PACKET, SOCK_RAW, 0),
      skb->protocol will be unset, __skb_flow_dissect() will fail, and
      skb_probe_transport_header() will fall back to the offset_hint, making
      the resulting skb_transport_offset incorrect.
      
      If, however, there is no transport header in the packet,
      transport_header shouldn't be set to an arbitrary value.
      
      Fix it by leaving the transport offset unset if it couldn't be found, to
      be explicit rather than to fill it with some wrong value. It changes the
      behavior, but if some code relied on the old behavior, it would be
      broken anyway, as the old one is incorrect.
      Signed-off-by: NMaxim Mikityanskiy <maximmi@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2aa125d
    • D
      Merge tag 'mac80211-next-for-davem-2019-02-22' of... · 5328b633
      David S. Miller 提交于
      Merge tag 'mac80211-next-for-davem-2019-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
      
      Johannes Berg says:
      
      ====================
      This time we have, of note:
       * the massive patch series for multi-BSSID support, I ended up
         applying that through a side branch to record some details
       * CSA improvements
       * HE (802.11ax) updates to Draft 3.3
       * strongly typed element iteration/etc. to make such code more
         readable - this came up in particular in multi-BSSID
       * rhashtable conversion patches from Herbert
      Along, as usual, with various fixes and improvements.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5328b633
    • D
      Merge branch 'dsa-vlan' · 2fce40a5
      David S. Miller 提交于
      Florian Fainelli says:
      
      ====================
      net: dsa: VLAN devices w/ filtering
      
      This patch series supports having VLAN devices on top of DSA/switch
      ports while the switch has VLAN filtering globally turned on (as is the
      case with Broadcom switches). Whether the switch does global or per-port
      VLAN filtering, having VLAN entries for these VLAN devices is
      beneficial.
      
      We take care of a few possibly problematic cases:
      
      - adding a VLAN device while there is an existing VLAN entry created by
        a VLAN aware bridge. The entire bridge's VLAN database and not just
        the specific bridge port is being checked to be safe and conserative
      
      - adding a bridge VLAN entry when there is an existing VLAN device
        created is also not possible because that would lead to the bridge
        being able to manipulate the VLAN device's VID/attributes under its feet
      
      - enslaving a VLAN device into a VLAN aware bridge since that duplicates
        functionality already offered by the VLAN aware bridge
      
      Here are the different test cases that were run to exercise this:
      
      ip addr flush dev gphy
      ip link add dev br0 type bridge
      echo 1 > /sys/class/net/br0/bridge/vlan_filtering
      ip link set dev gphy master br0
      udhcpc -i br0
      
      vconfig add rgmii_1 100
      ifconfig rgmii_1.100 192.168.100.10
      ping -c 2 192.168.100.1
      
      vconfig add br0 42
      bridge vlan add vid 42 dev gphy
      bridge vlan add vid 42 dev br0 self
      ifconfig br0.42 192.168.42.2
      ping -c 2 192.168.42.1
      
      ip link del rgmii_1.100
      vconfig add rgmii_1 100
      ifconfig rgmii_1.100 192.168.100.10
      ping -c 2 192.168.100.1
      echo 0 > /sys/class/net/br0/bridge/vlan_filtering
      ping -c 2 192.168.100.1
      
      ip link del rgmii_1.100
      echo 1 > /sys/class/net/br0/bridge/vlan_filtering
      
      vconfig add rgmii_1 100
      brctl addif br0 rgmii_1
      bridge vlan add vid 100 dev rgmii_1
      
      vconfig rem rgmii_1.100
      bridge vlan add vid 100 dev rgmii_1
      vconfig add rgmii_1 100
      
      bridge vlan del vid 100 dev rgmii_1
      vconfig add rgmii_1 100
      brctl addif br0 rgmii_1.100
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fce40a5
    • F
      net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation · 061f6a50
      Florian Fainelli 提交于
      In order to properly support VLAN filtering being enabled/disabled on a
      bridge, while having other ports being non bridge port members, we need
      to support the ndo_vlan_rx_{add,kill}_vid callbacks in order to make
      sure the non-bridge ports can continue receiving VLAN tags, even when
      the switch is globally configured to do ingress/egress VID checking.
      
      Since we can call dsa_port_vlan_{add,del} with a bridge_dev pointer
      NULL, we now need to check that in these two functions.
      
      We specifically deal with two possibly problematic cases:
      
      - creating a bridge VLAN entry while there is an existing VLAN device
        claiming that same VID
      
      - creating a VLAN device while there is an existing bridge VLAN entry
        with that VID
      
      Those are both resolved with returning -EBUSY back to user-space.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      061f6a50
    • F
      net: dsa: Deny enslaving VLAN devices into VLAN aware bridge · cc1d5bda
      Florian Fainelli 提交于
      VLAN devices on top of a DSA network device which is already part of a
      bridge and with said bridge being VLAN aware should not be allowed to be
      enslaved into that bridge. For one, this duplicates functionality
      offered by the VLAN aware bridge which supports tagged and untagged VLAN
      frames processing and it would make things needlessly complex to e.g.:
      propagate FDB/MDB accordingly.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cc1d5bda
    • G
      isdn_common: Mark expected switch fall-throughs · 6d20faec
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/isdn/i4l/isdn_common.c: In function ‘isdn_wildmat’:
      drivers/isdn/i4l/isdn_common.c:173:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
          p++;
          ~^~
      drivers/isdn/i4l/isdn_common.c:174:3: note: here
         default:
         ^~~~~~~
        CC [M]  drivers/leds/leds-lp8788.o
        CC [M]  drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu10_smumgr.o
      drivers/isdn/i4l/isdn_common.c: In function ‘isdn_status_callback’:
      drivers/isdn/i4l/isdn_common.c:729:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (divert_if)
            ^
      drivers/isdn/i4l/isdn_common.c:732:2: note: here
        default:
        ^~~~~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d20faec
    • A
      net: phy: aquantia: Use get_features for the PHYs abilities · 023fb4b5
      Andrew Lunn 提交于
      Use the new PHY driver call to get the PHYs supported features.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      [hkallweit1@gmail.com: removed new config_init callback from patch]
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      023fb4b5
  3. 22 2月, 2019 6 次提交