27 Aug, 2020

1 commit


28 May, 2020

1 commit

  • Add support for TX status reporting for the control port
    TX API; this will be used by hostapd when it moves to the
    control port TX API.

    Signed-off-by: Markus Theil
    Link: https://lore.kernel.org/r/20200527160334.19224-1-markus.theil@tu-ilmenau.de
    [fix commit message, it was referring to nl80211]
    Signed-off-by: Johannes Berg

    Markus Theil
     

27 May, 2020

2 commits

  • If the driver advertises NL80211_EXT_FEATURE_SCAN_FREQ_KHZ
    userspace can omit NL80211_ATTR_SCAN_FREQUENCIES in favor
    of an NL80211_ATTR_SCAN_FREQ_KHZ. To get scan results in
    KHz userspace must also set the
    NL80211_SCAN_FLAG_FREQ_KHZ.

    This lets nl80211 remain compatible with older userspaces
    while not requring and sending redundant (and potentially
    incorrect) scan frequency sets.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200430172554.18383-4-thomas@adapt-ip.com
    [use just nla_nest_start() (not _noflag) for NL80211_ATTR_SCAN_FREQ_KHZ]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • …m/linux/kernel/git/jberg/mac80211-next

    Johannes Berg says:

    ====================
    One batch of changes, containing:
    * hwsim improvements from Jouni and myself, to be able to
    test more scenarios easily
    * some more HE (802.11ax) support
    * some initial S1G (sub 1 GHz) work for fractional MHz channels
    * some (action) frame registration updates to help DPP support
    * along with other various improvements/fixes
    ====================

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

    David S. Miller
     

24 Apr, 2020

3 commits

  • cfg80211_chan_def and ieee80211_channel recently gained a
    frequency offset component. Handle this where it makes
    sense (potentially required by S1G channels).

    For IBSS, TDLS, CSA, and ROC we return -EOPNOTSUPP if a
    channel with frequency offset is passed, since they may or
    may not work. Once someone tests and verifies these
    commands work on thos types of channels, we can remove
    that error.

    join_ocb and join_mesh look harmless because they use a
    simple ieee80211_vif_use_channel(), which is using an
    already verified channel, so we let those through.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200402011810.22947-4-thomas@adapt-ip.com
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • Convert a user space registration for processing multicast Action frames
    (NL80211_CMD_REGISTER_FRAME with NL80211_ATTR_RECEIVE_MULTICAST) to a
    new enum ieee80211_filter_flags bit FIF_MCAST_ACTION so that drivers can
    update their RX filter parameters appropriately, if needed.

    Signed-off-by: Jouni Malinen
    Link: https://lore.kernel.org/r/20200421144815.19175-1-jouni@codeaurora.org
    [rename variables to rx_mcast_action_reg indicating action frames only]
    Signed-off-by: Johannes Berg

    Jouni Malinen
     
  • When fixing the initialization race, we neglected to account for
    the fact that debugfs is initialized in wiphy_register(), and
    some debugfs things went missing (or rather were rerooted to the
    global debugfs root).

    Fix this by adding debugfs entries only after wiphy_register().
    This requires some changes in the rate control code since it
    currently adds debugfs at alloc time, which can no longer be
    done after the reordering.

    Reported-by: Jouni Malinen
    Reported-by: kernel test robot
    Reported-by: Hauke Mehrtens
    Reported-by: Felix Fietkau
    Cc: stable@vger.kernel.org
    Fixes: 52e04b4ce5d0 ("mac80211: fix race in ieee80211_register_hw()")
    Signed-off-by: Johannes Berg
    Acked-by: Sumit Garg
    Link: https://lore.kernel.org/r/20200423111344.0e00d3346f12.Iadc76a03a55093d94391fc672e996a458702875d@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

15 Apr, 2020

1 commit

  • A race condition leading to a kernel crash is observed during invocation
    of ieee80211_register_hw() on a dragonboard410c device having wcn36xx
    driver built as a loadable module along with a wifi manager in user-space
    waiting for a wifi device (wlanX) to be active.

    Sequence diagram for a particular kernel crash scenario:

    user-space ieee80211_register_hw() ieee80211_tasklet_handler()
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    | | |
    || |
    | || |
    | |
    Link: https://lore.kernel.org/r/1586254255-28713-1-git-send-email-sumit.garg@linaro.org
    [Johannes: fix rtnl imbalances]
    Signed-off-by: Johannes Berg

    Sumit Garg
     

20 Mar, 2020

3 commits

  • Some of the drivers are not using channel context, but let the
    stack to control/switch channels instead. For such cases, driver
    can still remain on channel because the mac80211 stack actually
    supports it.

    The stack will check if the driver is using chan_ctx and has
    ops->remain_on_channel been hooked. Otherwise it will start its
    ROC work to remain on channel. So, even if the driver is not
    using chan_ctx, the driver is still capable of doing remain on
    channel.

    Signed-off-by: Yan-Hsuan Chuang
    Link: https://lore.kernel.org/r/20200312074337.16198-1-yhchuang@realtek.com
    Signed-off-by: Johannes Berg

    Yan-Hsuan Chuang
     
  • Set the NL80211_EXT_FEATURE_DEL_IBSS_STA if the interface support IBSS
    mode, so that stations can be reset from user space.

    mac80211 already deletes stations by itself, so mac80211 drivers must
    already support this.

    This has been successfully tested with ath9k.

    Signed-off-by: Nicolas Cavallari
    Link: https://lore.kernel.org/r/20200305135754.12094-2-cavallar@lri.fr
    Signed-off-by: Johannes Berg

    Nicolas Cavallari
     
  • This patch adds support for disabling pre-auth rx over the nl80211 control
    port for mac80211.

    Signed-off-by: Markus Theil
    Link: https://lore.kernel.org/r/20200312091055.54257-3-markus.theil@tu-ilmenau.de
    [fix indentation slightly, squash feature enablement]
    Signed-off-by: Johannes Berg

    Markus Theil
     

24 Feb, 2020

1 commit

  • This reverts commit 9b125c27998719288e4dcf2faf54511039526692.

    As Jouni points out, there's really no need for this, since the
    RSN pre-authentication frames are normal data frames, not port
    control frames (locally).

    Fixes: 9b125c279987 ("mac80211: support NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS")
    Signed-off-by: Johannes Berg
    Link: https://lore.kernel.org/r/20200224101910.b87da63a3cd6.Ic94bc51a370c4aa7d19fbca9b96d90ab703257dc@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

14 Feb, 2020

1 commit

  • With multiple VIFS ath10k, and probably others, tries to find the
    minimum txpower for all vifs and uses that when setting txpower in
    the firmware.

    If a second vif is added and starts to scan, it's txpower is not
    initialized yet and it set to zero.

    ath10k had a patch to ignore zero values, but then it is impossible
    to actually set txpower to zero.

    So, instead initialize the txpower to INT_MIN in mac80211, and let
    drivers know that means the power has not been set and so should
    be ignored.

    This should fix regression in:

    commit 88407beb1b1462f706a1950a355fd086e1c450b6
    Author: Ryan Hsu
    Date: Tue Dec 13 14:55:19 2016 -0800

    ath10k: fix incorrect txpower set by P2P_DEVICE interface

    Tested on ath10k 9984 with ath10k-ct firmware.

    Signed-off-by: Ben Greear
    Link: https://lore.kernel.org/r/20191217183057.24586-1-greearb@candelatech.com
    Signed-off-by: Johannes Berg

    Ben Greear
     

07 Feb, 2020

5 commits

  • This is now a trivial patch, but for seeing the actual changes
    I (Johannes) split it out from the original.

    Signed-off-by: Markus Theil
    Link: https://lore.kernel.org/r/20200115125522.3755-1-markus.theil@tu-ilmenau.de
    [split into separate cfg80211/mac80211 patches]
    Signed-off-by: Johannes Berg

    Markus Theil
     
  • To support Pre Association Security Negotiation (PASN) while already
    associated to one AP, allow user space to register to Rx
    authentication frames, so that the user space logic would be able to
    receive/handle authentication frames from a different AP as part of
    PASN.

    Note that it is expected that user space would intelligently register
    for Rx authentication frames, i.e., only when PASN is used and
    configure a match filter only for PASN authentication algorithm, as
    otherwise the MLME functionality of mac80211 would be broken.

    Additionally, since some versions of the user space daemons wrongly
    register to all types of authentication frames (which might result in
    unexpected behavior) allow such registration if the request is for a
    specific authentication algorithm number.

    Signed-off-by: Ilan Peer
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131114529.894206-1-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Ilan Peer
     
  • This function always returns 0, so there's no point in returning int.
    Make it void and remove the impossible error-path when calling it.

    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131111300.891737-11-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Luca Coelho
     
  • Set ndev->hw_features as well as ndev->features to allow
    changing the TX-related features with ethtool.

    We cannot (yet) change RX-related features since that
    requires telling the driver about it and we have no API
    for that yet.

    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131111300.891737-10-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Check early on that a device has support for QoS (at least 4
    queues) when it supports HT/VHT/HE, so we don't have to check
    this while connecting.

    This lets us clean up the code there: move some of it into
    channel preparation to clean up a bit more, and then change
    the logic to only check the "wmm_used" flag.

    Additionally, disable HE consistently when VHT is disabled.

    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131111300.891737-3-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Johannes Berg
     

13 Dec, 2019

1 commit

  • Instead of just having an airtime flag in debugfs, turn AQL into a proper
    NL80211_EXT_FEATURE, so drivers can turn it on when they are ready, and so
    we also expose the presence of the feature to userspace.

    This also has the effect of flipping the default, so drivers have to opt in
    to using AQL instead of getting it by default with TXQs. To keep
    functionality the same as pre-patch, we set this feature for ath10k (which
    is where it is needed the most).

    While we're at it, split out the debugfs interface so AQL gets its own
    per-station debugfs file instead of using the 'airtime' file.

    [Johannes:]
    This effectively disables AQL for iwlwifi, where it fixes a number of
    issues:
    * TSO in iwlwifi is causing underflows and associated warnings in AQL
    * HE (802.11ax) rates aren't reported properly so at HE rates, AQL could
    never have a valid estimate (it'd use 6 Mbps instead of up to 2400!)

    Signed-off-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/r/20191212111437.224294-1-toke@redhat.com
    Fixes: 3ace10f5b5ad ("mac80211: Implement Airtime-based Queue Limit (AQL)")
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     

22 Nov, 2019

1 commit

  • In order for the Fq_CoDel algorithm integrated in mac80211 layer to operate
    effectively to control excessive queueing latency, the CoDel algorithm
    requires an accurate measure of how long packets stays in the queue, AKA
    sojourn time. The sojourn time measured at the mac80211 layer doesn't
    include queueing latency in the lower layer (firmware/hardware) and CoDel
    expects lower layer to have a short queue. However, most 802.11ac chipsets
    offload tasks such TX aggregation to firmware or hardware, thus have a deep
    lower layer queue.

    Without a mechanism to control the lower layer queue size, packets only
    stay in mac80211 layer transiently before being sent to firmware queue.
    As a result, the sojourn time measured by CoDel in the mac80211 layer is
    almost always lower than the CoDel latency target, hence CoDel does little
    to control the latency, even when the lower layer queue causes excessive
    latency.

    The Byte Queue Limits (BQL) mechanism is commonly used to address the
    similar issue with wired network interface. However, this method cannot be
    applied directly to the wireless network interface. "Bytes" is not a
    suitable measure of queue depth in the wireless network, as the data rate
    can vary dramatically from station to station in the same network, from a
    few Mbps to over Gbps.

    This patch implements an Airtime-based Queue Limit (AQL) to make CoDel work
    effectively with wireless drivers that utilized firmware/hardware
    offloading. AQL allows each txq to release just enough packets to the lower
    layer to form 1-2 large aggregations to keep hardware fully utilized and
    retains the rest of the frames in mac80211 layer to be controlled by the
    CoDel algorithm.

    Signed-off-by: Kan Yan
    [ Toke: Keep API to set pending airtime internal, fix nits in commit msg ]
    Signed-off-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/r/20191119060610.76681-4-kyan@google.com
    Signed-off-by: Johannes Berg

    Kan Yan
     

08 Nov, 2019

1 commit

  • If ieee80211_txq_setup_flows() fails, we don't clean up LED
    state properly, leading to crashes later on, fix that.

    Fixes: dc8b274f0952 ("mac80211: Move up init of TXQs")
    Signed-off-by: Johannes Berg
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/r/20191105154110.1ccf7112ba5d.I0ba865792446d051867b33153be65ce6b063d98c@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

11 Sep, 2019

1 commit

  • Make it possibly for drivers to adjust the default max_mtu
    by storing it in the hardware struct and using that value
    for all interfaces.

    Signed-off-by: Wen Gong
    Link: https://lore.kernel.org/r/1567738137-31748-1-git-send-email-wgong@codeaurora.org
    Signed-off-by: Johannes Berg

    Wen Gong
     

26 Jul, 2019

1 commit

  • 1) Drop IEEE80211_HW_EXT_KEY_ID_NATIVE and let drivers directly set
    the NL80211_EXT_FEATURE_EXT_KEY_ID flag.

    2) Drop IEEE80211_HW_NO_AMPDU_KEYBORDER_SUPPORT and simply assume all
    drivers are unable to handle A-MPDU key borders.

    The new Extended Key ID API now requires all mac80211 drivers to set
    NL80211_EXT_FEATURE_EXT_KEY_ID when they implement set_key() and can
    handle Extended Key ID. For drivers not providing set_key() mac80211
    itself enables Extended Key ID support, using the internal SW crypto
    services.

    Signed-off-by: Alexander Wetzel
    Link: https://lore.kernel.org/r/20190629195015.19680-2-alexander@wetzel-home.de
    Signed-off-by: Johannes Berg

    Alexander Wetzel
     

12 Jul, 2019

1 commit

  • Pull networking updates from David Miller:
    "Some highlights from this development cycle:

    1) Big refactoring of ipv6 route and neigh handling to support
    nexthop objects configurable as units from userspace. From David
    Ahern.

    2) Convert explored_states in BPF verifier into a hash table,
    significantly decreased state held for programs with bpf2bpf
    calls, from Alexei Starovoitov.

    3) Implement bpf_send_signal() helper, from Yonghong Song.

    4) Various classifier enhancements to mvpp2 driver, from Maxime
    Chevallier.

    5) Add aRFS support to hns3 driver, from Jian Shen.

    6) Fix use after free in inet frags by allocating fqdirs dynamically
    and reworking how rhashtable dismantle occurs, from Eric Dumazet.

    7) Add act_ctinfo packet classifier action, from Kevin
    Darbyshire-Bryant.

    8) Add TFO key backup infrastructure, from Jason Baron.

    9) Remove several old and unused ISDN drivers, from Arnd Bergmann.

    10) Add devlink notifications for flash update status to mlxsw driver,
    from Jiri Pirko.

    11) Lots of kTLS offload infrastructure fixes, from Jakub Kicinski.

    12) Add support for mv88e6250 DSA chips, from Rasmus Villemoes.

    13) Various enhancements to ipv6 flow label handling, from Eric
    Dumazet and Willem de Bruijn.

    14) Support TLS offload in nfp driver, from Jakub Kicinski, Dirk van
    der Merwe, and others.

    15) Various improvements to axienet driver including converting it to
    phylink, from Robert Hancock.

    16) Add PTP support to sja1105 DSA driver, from Vladimir Oltean.

    17) Add mqprio qdisc offload support to dpaa2-eth, from Ioana
    Radulescu.

    18) Add devlink health reporting to mlx5, from Moshe Shemesh.

    19) Convert stmmac over to phylink, from Jose Abreu.

    20) Add PTP PHC (Physical Hardware Clock) support to mlxsw, from
    Shalom Toledo.

    21) Add nftables SYNPROXY support, from Fernando Fernandez Mancera.

    22) Convert tcp_fastopen over to use SipHash, from Ard Biesheuvel.

    23) Track spill/fill of constants in BPF verifier, from Alexei
    Starovoitov.

    24) Support bounded loops in BPF, from Alexei Starovoitov.

    25) Various page_pool API fixes and improvements, from Jesper Dangaard
    Brouer.

    26) Just like ipv4, support ref-countless ipv6 route handling. From
    Wei Wang.

    27) Support VLAN offloading in aquantia driver, from Igor Russkikh.

    28) Add AF_XDP zero-copy support to mlx5, from Maxim Mikityanskiy.

    29) Add flower GRE encap/decap support to nfp driver, from Pieter
    Jansen van Vuuren.

    30) Protect against stack overflow when using act_mirred, from John
    Hurley.

    31) Allow devmap map lookups from eBPF, from Toke Høiland-Jørgensen.

    32) Use page_pool API in netsec driver, Ilias Apalodimas.

    33) Add Google gve network driver, from Catherine Sullivan.

    34) More indirect call avoidance, from Paolo Abeni.

    35) Add kTLS TX HW offload support to mlx5, from Tariq Toukan.

    36) Add XDP_REDIRECT support to bnxt_en, from Andy Gospodarek.

    37) Add MPLS manipulation actions to TC, from John Hurley.

    38) Add sending a packet to connection tracking from TC actions, and
    then allow flower classifier matching on conntrack state. From
    Paul Blakey.

    39) Netfilter hw offload support, from Pablo Neira Ayuso"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2080 commits)
    net/mlx5e: Return in default case statement in tx_post_resync_params
    mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync().
    net: dsa: add support for BRIDGE_MROUTER attribute
    pkt_sched: Include const.h
    net: netsec: remove static declaration for netsec_set_tx_de()
    net: netsec: remove superfluous if statement
    netfilter: nf_tables: add hardware offload support
    net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload
    net: flow_offload: add flow_block_cb_is_busy() and use it
    net: sched: remove tcf block API
    drivers: net: use flow block API
    net: sched: use flow block API
    net: flow_offload: add flow_block_cb_{priv, incref, decref}()
    net: flow_offload: add list handling functions
    net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()
    net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
    net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND
    net: flow_offload: add flow_block_cb_setup_simple()
    net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC
    net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
    ...

    Linus Torvalds
     

09 Jul, 2019

1 commit

  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 5.3:

    API:
    - Test shash interface directly in testmgr
    - cra_driver_name is now mandatory

    Algorithms:
    - Replace arc4 crypto_cipher with library helper
    - Implement 5 way interleave for ECB, CBC and CTR on arm64
    - Add xxhash
    - Add continuous self-test on noise source to drbg
    - Update jitter RNG

    Drivers:
    - Add support for SHA204A random number generator
    - Add support for 7211 in iproc-rng200
    - Fix fuzz test failures in inside-secure
    - Fix fuzz test failures in talitos
    - Fix fuzz test failures in qat"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (143 commits)
    crypto: stm32/hash - remove interruptible condition for dma
    crypto: stm32/hash - Fix hmac issue more than 256 bytes
    crypto: stm32/crc32 - rename driver file
    crypto: amcc - remove memset after dma_alloc_coherent
    crypto: ccp - Switch to SPDX license identifiers
    crypto: ccp - Validate the the error value used to index error messages
    crypto: doc - Fix formatting of new crypto engine content
    crypto: doc - Add parameter documentation
    crypto: arm64/aes-ce - implement 5 way interleave for ECB, CBC and CTR
    crypto: arm64/aes-ce - add 5 way interleave routines
    crypto: talitos - drop icv_ool
    crypto: talitos - fix hash on SEC1.
    crypto: talitos - move struct talitos_edesc into talitos.h
    lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE
    crypto/NX: Set receive window credits to max number of CRBs in RxFIFO
    crypto: asymmetric_keys - select CRYPTO_HASH where needed
    crypto: serpent - mark __serpent_setkey_sbox noinline
    crypto: testmgr - dynamically allocate crypto_shash
    crypto: testmgr - dynamically allocate testvec_config
    crypto: talitos - eliminate unneeded 'done' functions at build time
    ...

    Linus Torvalds
     

22 Jun, 2019

1 commit


20 Jun, 2019

1 commit

  • The WEP code in the mac80211 subsystem currently uses the crypto
    API to access the arc4 (RC4) cipher, which is overly complicated,
    and doesn't really have an upside in this particular case, since
    ciphers are always synchronous and therefore always implemented in
    software. Given that we have no accelerated software implementations
    either, it is much more straightforward to invoke a generic library
    interface directly.

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Herbert Xu

    Ard Biesheuvel
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

03 Jun, 2019

1 commit

  • ifa_list is protected by rcu, yet code doesn't reflect this.

    Add the __rcu annotations and fix up all places that are now reported by
    sparse.

    I've done this in the same commit to not add intermediate patches that
    result in new warnings.

    Reported-by: Eric Dumazet
    Signed-off-by: Florian Westphal
    Signed-off-by: David S. Miller

    Florian Westphal
     

26 Apr, 2019

3 commits

  • Mac80211 SW crypto handles replacing PTK keys correctly.

    Don't trigger needless warnings or workarounds when the driver can only
    use the known good SW crypto provided by mac80211.

    Signed-off-by: Alexander Wetzel
    Signed-off-by: Johannes Berg

    Alexander Wetzel
     
  • Only enable Extended Key ID support for drivers which are not supporting
    crypto offload and also do not support A-MPDU.

    While any driver using SW crypto from mac80211 is generally able to also
    support Extended Key ID these drivers are likely to mix keyIDs in
    AMPDUs when rekeying.

    According to IEEE 802.11-2016 "9.7.3 A-MPDU contents" this is not
    allowed.

    Signed-off-by: Alexander Wetzel
    [reword comment a bit, move ! into logic expression]
    Signed-off-by: Johannes Berg

    Alexander Wetzel
     
  • Add support for Extended Key ID as defined in IEEE 802.11-2016.

    - Implement the nl80211 API for Extended Key ID
    - Extend mac80211 API to allow drivers to support Extended Key ID
    - Enable Extended Key ID by default for drivers only supporting SW
    crypto (e.g. mac80211_hwsim)
    - Allow unicast Tx usage to be supressed (IEEE80211_KEY_FLAG_NO_AUTO_TX)
    - Select the decryption key based on the MPDU keyid
    - Enforce existing assumptions in the code that rekeys don't change the
    cipher

    Signed-off-by: Alexander Wetzel
    [remove module parameter]
    Signed-off-by: Johannes Berg

    Alexander Wetzel
     

25 Feb, 2019

1 commit

  • Three conflicts, one of which, for marvell10g.c is non-trivial and
    requires some follow-up from Heiner or someone else.

    The issue is that Heiner converted the marvell10g driver over to
    use the generic c45 code as much as possible.

    However, in 'net' a bug fix appeared which makes sure that a new
    local mask (MDIO_AN_10GBT_CTRL_ADV_NBT_MASK) with value 0x01e0
    is cleared.

    Signed-off-by: David S. Miller

    David S. Miller
     

22 Feb, 2019

1 commit

  • When we did the original tests for the optimal value of sk_pacing_shift, we
    came up with 6 ms of buffering as the default. Sadly, 6 is not a power of
    two, so when picking the shift value I erred on the size of less buffering
    and picked 4 ms instead of 8. This was probably wrong; those 2 ms of extra
    buffering makes a larger difference than I thought.

    So, change the default pacing shift to 7, which corresponds to 8 ms of
    buffering. The point of diminishing returns really kicks in after 8 ms, and
    so having this as a default should cut down on the need for extensive
    per-device testing and overrides needed in the drivers.

    Cc: stable@vger.kernel.org
    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     

08 Feb, 2019

1 commit


19 Jan, 2019

3 commits

  • Allow user to override STBC configuration for Rx and Tx spatial streams.
    In practice RX/TX STBC settings can be modified using appropriate
    options in wpa_supplicant configuration file:
    tx_stbc=-1..1
    rx_stbc=-1..3

    This functionality has been added to wpa_supplicant in commit cdeea70f59d0.

    In FullMAC case these STBC options are passed to drivers by cfg80211
    connect callback in fields of cfg80211_connect_params structure.
    However for mac80211 drivers, e.g. for mac80211_hwsim,
    overrides for STBC settings are ignored.

    The reason why RX/TX STBC capabilities are not modified for mac80211
    drivers is as follows. All drivers need to specify supported HT/VHT
    overrides explicitly: see ht_capa_mod_mask and vht_capa_mod_mask fields
    of wiphy structure. Only supported overrides will be passed to drivers by
    cfg80211_connect and cfg80211_mlme_assoc operations: see bitwise 'AND'
    performed by cfg80211_oper_and_ht_capa and cfg80211_oper_and_vht_capa.

    This commit adds RX/TX STBC HT capabilities to mac80211_ht_capa_mod_mask,
    allowing their modifications, as well as applies requested STBC
    modifications in function ieee80211_apply_htcap_overrides.

    Signed-off-by: Sergey Matyukevich
    Signed-off-by: Johannes Berg

    Sergey Matyukevich
     
  • This adds airtime accounting and scheduling to the mac80211 TXQ
    scheduler. A new callback, ieee80211_sta_register_airtime(), is added
    that drivers can call to report airtime usage for stations.

    When airtime information is present, mac80211 will schedule TXQs
    (through ieee80211_next_txq()) in a way that enforces airtime fairness
    between active stations. This scheduling works the same way as the ath9k
    in-driver airtime fairness scheduling. If no airtime usage is reported
    by the driver, the scheduler will default to round-robin scheduling.

    For drivers that don't control TXQ scheduling in software, a new API
    function, ieee80211_txq_may_transmit(), is added which the driver can use
    to check if the TXQ is eligible for transmission, or should be throttled to
    enforce fairness. Calls to this function must also be enclosed in
    ieee80211_txq_schedule_{start,end}() calls to ensure proper locking.

    The API ieee80211_txq_may_transmit() also ensures that TXQ list will be
    aligned aginst driver's own round-robin scheduler list. i.e it rotates
    the TXQ list till it makes the requested node becomes the first entry
    in TXQ list. Thus both the TXQ list and driver's list are in sync.

    Co-developed-by: Rajkumar Manoharan
    Signed-off-by: Louie Lu
    [added debugfs write op to reset airtime counter]
    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     
  • This adds an API to mac80211 to handle scheduling of TXQs. The interface
    between driver and mac80211 for TXQ handling is changed by adding two new
    functions: ieee80211_next_txq(), which will return the next TXQ to schedule
    in the current round-robin rotation, and ieee80211_return_txq(), which the
    driver uses to indicate that it has finished scheduling a TXQ (which will
    then be put back in the scheduling rotation if it isn't empty).

    The driver must call ieee80211_txq_schedule_start() at the start of each
    scheduling session, and ieee80211_txq_schedule_end() at the end. The API
    then guarantees that the same TXQ is not returned twice in the same
    session (so a driver can loop on ieee80211_next_txq() without worrying
    about breaking the loop.

    Usage of the new API is optional, so drivers can be ported one at a time.
    In this patch, the actual scheduling performed by mac80211 is simple
    round-robin, but a subsequent commit adds airtime fairness awareness to the
    scheduler.

    Signed-off-by: Toke Høiland-Jørgensen
    [minor kernel-doc fix, propagate sparse locking checks out]
    Signed-off-by: Johannes Berg

    Toke Høiland-Jørgensen
     

21 Dec, 2018

1 commit


18 Dec, 2018

1 commit

  • This isn't really a problem now, but it means that the function
    has a few NULL checks that are only relevant when coming from
    the initial interface added in mac80211, and that's confusing.
    Just pass non-NULL (but equivalently empty) in that case and
    remove all the NULL checks.

    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Johannes Berg