24 Feb, 2020

1 commit

  • Now that there is support for BIGTK configuration and AP/STA
    functionality for using BIP with Beacon frames, indicate support for the
    Beacon protection functionality.

    Johannes: move this to hwsim, since it's not clear that all drivers
    using mac80211 will do this correctly - lots of them modify the
    beacon before transmission e.g. to update the TIM element, and that
    would obviously break the signature.

    Signed-off-by: Jouni Malinen
    Link: https://lore.kernel.org/r/20200222132548.20835-7-jouni@codeaurora.org
    Signed-off-by: Johannes Berg

    Jouni Malinen
     

17 Feb, 2020

39 commits

  • Get rid of xdp_ret in mvneta_swbm_rx_frame routine since now
    we can rely on xdp_stats to flush in case of xdp_redirect

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: David S. Miller

    Lorenzo Bianconi
     
  • Add xdp_redirect, xdp_pass, xdp_drop and xdp_tx counters
    to ethtool statistics

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: David S. Miller

    Lorenzo Bianconi
     
  • Introduce mvneta_stats structure in mvneta_update_stats routine signature
    in order to collect all the rx stats and update them at the end at the
    napi loop. mvneta_stats will be reused adding xdp statistics support to
    ethtool.

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: David S. Miller

    Lorenzo Bianconi
     
  • In oreder to avoid unnecessary instructions rely on open-coding updating
    per-cpu stats in mvneta_tx/mvneta_xdp_submit_frame and mvneta_rx_hwbm
    routines. This patch will be used to add xdp support to ethtool for the
    mvneta driver

    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: David S. Miller

    Lorenzo Bianconi
     
  • mvneta_ethtool_update_stats routine is currently reporting
    skb_alloc_error and refill_error only for the first rx queue.
    Fix the issue moving skb_alloc_err and refill_err in
    mvneta_pcpu_stats structure.
    Moreover this patch will be used to introduce xdp statistics
    to ethtool for the mvneta driver

    Fixes: 17a96da62716 ("net: mvneta: discriminate error cause for missed packet")
    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: David S. Miller

    Lorenzo Bianconi
     
  • The mv88e6390 has upto 8 sets of PCS registers, depending on how ports
    9 and 10 are configured. The can be spread over 8 ports. If a port has
    a PCS register set, return it along with the port registers. The
    register space is sparse, so hard code a list of registers which will
    be returned. It can later be extended, if needed, by append to the end
    of the list.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • The mv88e6352 has one PCS which can be used for 1000BaseX or
    SGMII. Add the registers to the dump for the port which the PCS is
    associated to.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • ethtool provides a generic mechanism for a driver to return the
    registers of an ethernet device. DSA uses this to give the port
    registers associated with an interfaces. Extend this to allow PCS
    registers to also be returned, if the port has a PCS associated to it.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Jeff Kirsher says:

    ====================
    100GbE Intel Wired LAN Driver Updates 2020-02-15

    This series contains updates to ice driver only.

    Brett adds support for "Queue in Queue" (QinQ) support, by supporting
    S-tag & C-tag VLAN traffic by disabling pruning when there are no 0x8100
    VLAN interfaces currently on top of the PF. Also refactored the port
    VLAN configuration to re-use the common code for enabling and disabling
    a port VLAN in single function. Added a helper function to determine if
    the VF link is up. Fixed how the port VLAN configures the priority bits
    for a VF interface. Fixed the port VLAN to only see its own broadcast
    and multicast traffic. Added support to enable and disable all receive
    queues, by refactoring adding a new function to do the necessary steps
    to enable/disable a queue with the necessary read flush. Fixed how we
    set the mapping mode for transmit and receive queues. Added support for
    VF queues to handle LAN overflow events. Fixed and refactored how
    receive queues get disabled for VFs, which was being handled one queue
    at at time, so improve it to handle when the VF is requesting more than
    one queue to be disabled. Fixed how the virtchnl_queue_select bitmap is
    validated.

    Finally a patch not authored by Brett, Bruce cleans up "fallthrough"
    comments which are unnecessary. Also replaces the "fallthough" comments
    with the GCC reserved word fallthrough, along with other GCC compiler
    fixes. Add missing function header comment regarding a function
    argument that was missing.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • On m68k, local irqs remain enabled while interrupt handlers execute.
    Therefore the macsonic driver has had to disable interrupts to avoid
    re-entering sonic_interrupt().

    As of commit 865ad2f2201d ("net/sonic: Add mutual exclusion for accessing
    shared state"), sonic_interrupt() became re-entrant, and its wrapper
    became redundant.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • Give the transmit command as soon as the transmit descriptor is ready.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • The explicit memory barriers are redundant now that proper locking and
    MMIO accessors have been employed.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • The transmit queue must be running already otherwise sonic_send_packet()
    would not have been called. If the queue was stopped by the interrupt
    handler, the interrupt handler will restart it again.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • The eol_tx variable is the one that matters to the tx algorithm because
    packets are always placed at the end of the list. The next_tx variable
    just confuses things so remove it.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • No functional change.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • The comment is meaningless since mark_bh() was removed a long time ago.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: David S. Miller

    Finn Thain
     
  • The register maps for the Gigabit controllers and the Ether one used on
    RZ/A1 (AKA R7S72100) are identical except for GECMR which is only present
    on the true GEther controllers. We no longer use the register map arrays
    to determine if a given register exists, and have added the GECMR flag to
    the 'struct sh_eth_cpu_data' in the previous patch, so we're ready to drop
    the R7S72100 specific register map -- this saves 216 bytes of object code
    (ARM gcc 4.8.5).

    Signed-off-by: Sergei Shtylyov
    Tested-by: Chris Brandt
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • Not all Ether controllers having the Gigabit register layout have GECMR --
    RZ/A1 (AKA R7S72100) actually has the same layout but no Gigabit speed
    support and hence no GECMR. In the past, the new register map table was
    added for this SoC, now I think we should have used the existing Gigabit
    table with the differences (such as GECMR) covered by the mere flags in
    the 'struct sh_eth_cpu_data'. Add such flag for GECMR -- and then we can
    get rid of the R7S72100 specific layout in the next patch...

    Signed-off-by: Sergei Shtylyov
    Tested-by: Chris Brandt
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • When adding the sh_eth_cpu_data::no_xdfar flag I forgot to add the flag
    check to __sh_eth_get_regs(), causing the non-existing RDFAR/TDFAR to be
    considered for dumping on the R-Car gen1/2 SoCs (the register offset check
    has the final say here)...

    Fixes: 4c1d45850d5 ("sh_eth: add sh_eth_cpu_data::cexcr flag")
    Signed-off-by: Sergei Shtylyov
    Tested-by: Chris Brandt
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • When adding the sh_eth_cpu_data::cexcr flag I forgot to add the flag
    check to __sh_eth_get_regs(), causing the non-existing RX packet counter
    registers to be considered for dumping on the R7S72100 SoC (the register
    offset sanity check has the final say here)...

    Fixes: 4c1d45850d5 ("sh_eth: add sh_eth_cpu_data::cexcr flag")
    Signed-off-by: Sergei Shtylyov
    Tested-by: Chris Brandt
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • When adding the sh_eth_cpu_data::no_tx_cntrs flag I forgot to add the
    flag check to __sh_eth_get_regs(), causing the non-existing TX counter
    registers to be considered for dumping on the R7S72100 SoC (the register
    offset sanity check has the final say here)...

    Fixes: ce9134dff6d9 ("sh_eth: add sh_eth_cpu_data::no_tx_cntrs flag")
    Signed-off-by: Sergei Shtylyov
    Tested-by: Chris Brandt
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • Improve the initial MAC configuration so we get a configuration which
    more represents the final operating mode, in particular with respect
    to the flow control settings.

    We do this by:
    1) more fully initialising our phy state, so we can use this as the
    initial state for PHY based connections.
    2) reading the fixed link state.
    3) ensuring that in-band mode has sane pause settings for SGMII vs
    802.3z negotiation modes.

    In all three cases, we ensure that state->link is false, just in case
    any MAC drivers have other ideas by mis-using this member, and we also
    take account of manual pause mode configuration at this point.

    This avoids MLO_PAUSE_AN being seen in mac_config() when operating in
    PHY, fixed mode or inband SGMII mode, thereby giving cleaner semantics
    to the pause flags. As a result of this, the pause flags now indicate
    in a mode-independent way what is required from a mac_config()
    implementation.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • When ethtool -A is used to change the pause modes, the pause
    advertisement is not being changed, but the documentation in
    uapi/linux/ethtool.h says we should be. Add that capability to
    phylink.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Resolve the fixed link flow control using the recently introduced
    linkmode_resolve_pause() helper, which we use in
    phylink_get_fixed_state() only when operating in full duplex mode.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Use the new phy_get_pause() helper to get the resolved pause modes for
    a PHY rather than resolving the pause modes ourselves. We temporarily
    retain our pause mode resolution for causes where there is no PHY
    attached, e.g. for fixed-link modes.

    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King
     
  • Split the application of manually controlled flow control modes from
    phylink_resolve_flow(), so that we can use alternative providers of
    flow control resolution.

    We also want to clear the MLO_PAUSE_AN flag when autoneg is disabled,
    since flow control can't be negotiated in this circumstance.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Remove the ability for ethtool -A to change the pause settings for
    fixed links; if this is really required, we can reinstate it later.

    Andrew Lunn agrees: "So I think it is safe to not implement ethtool
    -A, at least until somebody has a real use case for it."

    Lets avoid making things too complex for use cases that aren't being
    used.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Add a linkmode helper to set the flow control advertisement in an
    ethtool linkmode mask according to the tx/rx capabilities. This
    implementation is moved from phylib, and documented with an
    analysis of its shortcomings.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Add a couple of helpers to resolve negotiated flow control. Two helpers
    are provided:

    - linkmode_resolve_pause() which takes the link partner and local
    advertisements, and decodes whether we should enable TX or RX pause
    at the MAC. This is useful outside of phylib, e.g. in phylink.
    - phy_get_pause(), which returns the TX/RX enablement status for the
    current negotiation results of the PHY.

    This allows us to centralise the flow control resolution, rather than
    spreading it around.

    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • Register RxMissed exists on few early chip versions only, however all
    chip versions have the number of missed RX packets in the hardware
    counters. Therefore remove using RxMissed and get the number of missed
    RX packets from the hardware stats.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • Merge enabling and disabling jumbo packets to one function to make
    the code a little simpler.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • Currently code snippet (RTL_R32(tp, TxConfig) >> 20) & 0xfcf is used
    in few places to extract the chip XID. Change the code to do the XID
    extraction only once.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • In few places we do a PCI commit by reading an arbitrary chip register.
    It's not always obvious that the read is meant to be a PCI commit,
    therefore add a helper for it.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • Setting dev->features a few lines later allows to simplify the code.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • This is done for all RTL8169 chip versions in rtl8169_init_phy already.
    Therefore we can remove it here.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • rtl_link_chg_patch() can be called from rtl_open() to rtl8169_close()
    only. And in rtl8169_close() phy_stop() ensures that this function
    isn't called afterwards. So we don't need this check.

    Signed-off-by: Heiner Kallweit
    Signed-off-by: David S. Miller

    Heiner Kallweit
     
  • Either port 5 or port 8 can be used on a 7278 device, make sure that
    port 5 also gets configured properly for 2Gb/sec in that case.

    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • …m/linux/kernel/git/jberg/mac80211-next

    Johannes Berg says:

    ====================
    A few big new things:
    * 802.11 frame encapsulation offload support
    * more HE (802.11ax) support, including some for 6 GHz band
    * powersave in hwsim, for better testing

    Of course as usual there are various cleanups and small fixes.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • The alarm function hadn't been supported by PTP clock driver.
    The recommended solution PHC + phc2sys + nanosleep provides
    best performance. So drop the code of alarm in ptp_qoriq driver.

    Signed-off-by: Yangbo Lu
    Signed-off-by: David S. Miller

    Yangbo Lu