03 May, 2019

1 commit


27 Apr, 2019

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Johannes Berg says:

    ====================
    Various updates, notably:
    * extended key ID support (from 802.11-2016)
    * per-STA TX power control support
    * mac80211 TX performance improvements
    * HE (802.11ax) updates
    * mesh link probing support
    * enhancements of multi-BSSID support (also related to HE)
    * OWE userspace processing support
    ====================

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

    David S. Miller
     

26 Apr, 2019

20 commits

  • The requirement for mesh link metric refreshing, is that from one
    mesh point we be able to send some data frames to other mesh points
    which are not currently selected as a primary traffic path, but which
    are only 1 hop away. The absence of the primary path to the chosen node
    makes it necessary to apply some form of marking on a chosen packet
    stream so that the packets can be properly steered to the selected node
    for testing, and not by the regular mesh path lookup.

    Tested-by: Pradeep Kumar Chitrapu
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: Johannes Berg

    Rajkumar Manoharan
     
  • Allows setting of control flags of skb cb - if needed -
    when calling ieee80211_subif_start_xmit().

    Tested-by: Pradeep Kumar Chitrapu
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: Johannes Berg

    Rajkumar Manoharan
     
  • 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
     
  • The cfg80211_merge_profile() and ieee802_11_find_bssid_profile() are
    a bit cleaner if we just pass the merged_ie pointer instead of a pointer
    to the pointer.

    This isn't a functional change, it's just a clean up.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Johannes Berg

    Dan Carpenter
     
  • This patch introduce a new driver callback drv_sta_set_txpwr. This API will
    copy the transmit power value passed from user space and call the driver
    callback to set the tx power for the station.

    Co-developed-by: Balaji Pothunoori
    Signed-off-by: Ashok Raj Nagarajan
    Signed-off-by: Balaji Pothunoori
    Signed-off-by: Johannes Berg

    Ashok Raj Nagarajan
     
  • There's no need to allocate than one queue in the iTXQs case
    now that we no longer use ndo_select_queue to assign the AC.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • At Technical University of Munich we use MAC 802.11 TX status frames to
    perform several measurements in MAC 802.11 setups.

    With ath based drivers this was possible until commit d94a461d7a7df6
    ("ath9k: use ieee80211_tx_status_noskb where possible") as the driver
    ignored the IEEE80211_TX_CTL_REQ_TX_STATUS flag and always delivered
    tx_status frames. Since that commit, this behavior was changed and the
    driver now adheres to IEEE80211_TX_CTL_REQ_TX_STATUS.

    Due to performance reasons, IEEE80211_TX_CTL_REQ_TX_STATUS is not set for
    data frames from interfaces in managed mode. Hence, frames that are sent
    from a managed mode interface do never deliver tx_status frames. This
    remains true even if a monitor mode interface (the measurement interface)
    is added to the same ieee80211 physical device. Thus, there is no
    possibility for receiving tx_status frames for frames sent on an interface
    in managed mode, if the driver adheres to IEEE80211_TX_CTL_REQ_TX_STATUS.

    In order to force delivery of tx_status frames for research and debugging
    purposes, implement a debugfs option force_tx_status for ieee80211 physical
    devices. When this option is set for a physical device,
    IEEE80211_TX_CTL_REQ_TX_STATUS is enabled in all packets sent from that
    device. This option can be set via
    /sys/kernel/debug/ieee80211//force_tx_status. The default is disabled.

    Co-developed-by: Charlie Groh
    Signed-off-by: Charlie Groh
    Signed-off-by: Julius Niedworok
    Signed-off-by: Johannes Berg

    Julius Niedworok
     
  • FullMAC STAs have no way to update bss channel after CSA channel switch
    completion. As a result, user-space tools may provide inconsistent
    channel info. For instance, consider the following two commands:
    $ sudo iw dev wlan0 link
    $ sudo iw dev wlan0 info
    The latter command gets channel info from the hardware, so most probably
    its output will be correct. However the former command gets channel info
    from scan cache, so its output will contain outdated channel info.
    In fact, current bss channel info will not be updated until the
    next [re-]connect.

    Note that mac80211 STAs have a workaround for this, but it requires
    access to internal cfg80211 data, see ieee80211_chswitch_work:

    /* XXX: shouldn't really modify cfg80211-owned data! */
    ifmgd->associated->channel = sdata->csa_chandef.chan;

    This patch suggests to convert mac80211 workaround into cfg80211 behavior
    and to update current bss channel in cfg80211_ch_switch_notify.

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

    Sergey Matyukevich
     
  • A per-group shift was added to reduce the size of the per-rate transmit
    duration field to u16 without sacrificing a lot of precision
    This patch changes the macros to automatically calculate the best value for
    this shift based on the lowest rate within the group.
    This simplifies adding more groups and slightly improves accuracy for some of
    the existing groups.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • This is needed for the upcoming driver for MT7615 4x4 802.11ac chipsets

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • When using iTXQ, the network stack does not need the real queue number, since
    mac80211 is using its internal queues anyway. In that case we can defer
    selecting the queue and remove a redundant station lookup in the tx path to save
    some CPU cycles.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • 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
     
  • Optimize/cleanup the delay tailroom checks and adds one missing tailroom
    update.

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

    Alexander Wetzel
     
  • When using iTXQ, tx sequence number allocation and statistics are run at
    dequeue time. Because of that, it is safe to enable NETIF_F_LLTX, which
    allows tx handlers to run on multiple CPUs in parallel.

    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Reduces lock contention on enqueue/dequeue of iTXQ packets

    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Reduces lock contention on enqueue/dequeue of iTXQ packets

    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • The callers of these functions are all within RCU locked sections

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Since an element is limited to 255 octets, a profile may be split
    split to several elements. Support the split as defined in the 11ax
    draft 3.

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

    Sara Sharon
     
  • Subelement profile may specify element IDs it doesn't inherit
    from the management frame. Support it.

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

    Sara Sharon
     

23 Apr, 2019

2 commits

  • We need to dereference the directory to get its parent to
    be able to rename it, so it's clearly not safe to try to
    do this with ERR_PTR() pointers. Skip in this case.

    It seems that this is most likely what was causing the
    report by syzbot, but I'm not entirely sure as it didn't
    come with a reproducer this time.

    Cc: stable@vger.kernel.org
    Reported-by: syzbot+4ece1a28b8f4730547c9@syzkaller.appspotmail.com
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The txq of vif is added to active_txqs list for ATF TXQ scheduling
    in the function ieee80211_queue_skb(), but it was not properly removed
    before freeing the txq object. It was causing use after free of the txq
    objects from the active_txqs list, result was kernel panic
    due to invalid memory access.

    Fix kernel invalid memory access by properly removing txq object
    from active_txqs list before free the object.

    Signed-off-by: Bhagavathi Perumal S
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Bhagavathi Perumal S
     

18 Apr, 2019

1 commit


10 Apr, 2019

1 commit


09 Apr, 2019

1 commit

  • Restore SW_CRYPTO_CONTROL operation on AP_VLAN interfaces for unicast
    keys, the original override was intended to be done for group keys as
    those are treated specially by mac80211 and would always have been
    rejected.

    Now the situation is that AP_VLAN support must be enabled by the driver
    if it can support it (meaning it can support software crypto GTK TX).

    Thus, also simplify the code - if we get here with AP_VLAN and non-
    pairwise key, software crypto must be used (driver doesn't know about
    the interface) and can be used (driver must've advertised AP_VLAN if
    it also uses SW_CRYPTO_CONTROL).

    Fixes: db3bdcb9c3ff ("mac80211: allow AP_VLAN operation on crypto controlled devices")
    Signed-off-by: Alexander Wetzel
    [rewrite commit message]
    Signed-off-by: Johannes Berg

    Alexander Wetzel
     

08 Apr, 2019

2 commits

  • Add support for mesh airtime link metric attribute
    NL80211_STA_INFO_AIRTIME_LINK_METRIC.

    Signed-off-by: Narayanraddi Masti
    Signed-off-by: Johannes Berg

    Narayanraddi Masti
     
  • Currently there is no way for the driver to signal to mac80211 that it should
    schedule a TXQ even if there are no packets on the mac80211 part of that queue.
    This is problematic if the driver has an internal retry queue to deal with
    software A-MPDU retry.

    This patch changes the behavior of ieee80211_schedule_txq to always schedule
    the queue, as its only user (ath9k) seems to expect such behavior already:
    it calls this function on tx status and on powersave wakeup whenever its
    internal retry queue is not empty.

    Also add an extra argument to ieee80211_return_txq to get the same behavior.

    This fixes an issue on ath9k where tx queues with packets to retry (and no
    new packets in mac80211) would not get serviced.

    Fixes: 89cea7493a346 ("ath9k: Switch to mac80211 TXQ scheduling and airtime APIs")
    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

29 Mar, 2019

6 commits

  • Holding the lock around the entire duration of tx scheduling can create
    some nasty lock contention, especially when processing airtime information
    from the tx status or the rx path.
    Improve locking by only holding the active_txq_lock for lookups / scheduling
    list modifications.

    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • There are several scenarios in which mac80211 can call drv_wake_tx_queue
    after ieee80211_restart_hw has been called and has not yet completed.
    Driver private structs are considered uninitialized until mac80211 has
    uploaded the vifs, stations and keys again, so using private tx queue
    data during that time is not safe.

    The driver can also not rely on drv_reconfig_complete to figure out when
    it is safe to accept drv_wake_tx_queue calls again, because it is only
    called after all tx queues are woken again.

    To fix this, bail out early in drv_wake_tx_queue if local->in_reconfig
    is set.

    Cc: stable@vger.kernel.org
    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • skb->truesize can change due to memory reallocation or when adding extra
    fragments. Adjust fq->memory_usage accordingly

    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Looks that 100 chars isn't enough for messages, as we keep getting
    warnings popping from different places due to message shortening.
    Instead of trying to shorten the prints, just increase the buffer size.

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

    Andrei Otcheretianski
     
  • The pointer to the last four bytes of the address is not guaranteed to be
    aligned, so we need to use __get_unaligned_cpu32 here

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Once a station enters powersave, its queues should not be returned by
    ieee80211_next_txq() anymore. They will be re-scheduled again after the
    station has woken up again

    Fixes: 1866760096bf4 ("mac80211: Add TXQ scheduling API")
    Signed-off-by: Felix Fietkau
    Acked-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

21 Mar, 2019

1 commit

  • After the previous patch, all the callers of ndo_select_queue()
    provide as a 'fallback' argument netdev_pick_tx.
    The only exceptions are nested calls to ndo_select_queue(),
    which pass down the 'fallback' available in the current scope
    - still netdev_pick_tx.

    We can drop such argument and replace fallback() invocation with
    netdev_pick_tx(). This avoids an indirect call per xmit packet
    in some scenarios (TCP syn, UDP unconnected, XDP generic, pktgen)
    with device drivers implementing such ndo. It also clean the code
    a bit.

    Tested with ixgbe and CONFIG_FCOE=m

    With pktgen using queue xmit:
    threads vanilla patched
    (kpps) (kpps)
    1 2334 2428
    2 4166 4278
    4 7895 8100

    v1 -> v2:
    - rebased after helper's name change

    Signed-off-by: Paolo Abeni
    Signed-off-by: David S. Miller

    Paolo Abeni
     

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

3 commits