05 Mar, 2020

3 commits

  • commit 0daa63ed4c6c4302790ce67b7a90c0997ceb7514 upstream.

    The below-mentioned commit changed the code to unlock *inside*
    the function, but previously the unlock was *outside*. It failed
    to remove the outer unlock, however, leading to double unlock.

    Fix this.

    Fixes: 33483a6b88e4 ("mac80211: fix missing unlock on error in ieee80211_mark_sta_auth()")
    Signed-off-by: Andrei Otcheretianski
    Link: https://lore.kernel.org/r/20200221104719.cce4741cf6eb.I671567b185c8a4c2409377e483fd149ce590f56d@changeid
    [rewrite commit message to better explain what happened]
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Andrei Otcheretianski
     
  • [ Upstream commit 33181ea7f5a62a17fbe55f0f73428ecb5e686be8 ]

    Before this patch, STA's would set new width of 160/80+80 MHz based on AP capability only.
    This is wrong because STA may not support > 80MHz BW.
    Fix is to verify STA has 160/80+80 MHz capability before increasing its width to > 80MHz.

    The "support_80_80" and "support_160" setting is based on:
    "Table 9-272 — Setting of the Supported Channel Width Set subfield and Extended NSS BW
    Support subfield at a STA transmitting the VHT Capabilities Information field"
    From "Draft P802.11REVmd_D3.0.pdf"

    Signed-off-by: Aviad Brikman
    Signed-off-by: Shay Bar
    Link: https://lore.kernel.org/r/20200210130728.23674-1-shay.bar@celeno.com
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Shay Bar
     
  • [ Upstream commit a04564c99bb4a92f805a58e56b2d22cc4978f152 ]

    We only use the parsing CRC for checking if a beacon changed,
    and elements with an ID > 63 cannot be represented in the
    filter. Thus, like we did before with WMM and Cisco vendor
    elements, just statically add these forgotten items to the
    CRC:
    - WLAN_EID_VHT_OPERATION
    - WLAN_EID_OPMODE_NOTIF

    I guess that in most cases when VHT/HE operation change, the HT
    operation also changed, and so the change was picked up, but we
    did notice that pure operating mode notification changes were
    ignored.

    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131111300.891737-22-luca@coelho.fi
    [restrict to VHT for the mac80211 branch]
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Johannes Berg
     

20 Feb, 2020

1 commit

  • commit 2bf973ff9b9aeceb8acda629ae65341820d4b35b upstream.

    Previously I intended to ignore quiet mode in probe response, however
    I ended up ignoring it instead for action frames. As a matter of fact,
    this path isn't invoked for probe responses to start with. Just revert
    this patch.

    Signed-off-by: Sara Sharon
    Fixes: 7976b1e9e3bf ("mac80211: ignore quiet mode in probe")
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20200131111300.891737-15-luca@coelho.fi
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Sara Sharon
     

06 Feb, 2020

3 commits

  • [ Upstream commit 6f601265215a421f425ba3a4850a35861d024643 ]

    TKIP replay protection was skipped for the very first frame received
    after a new key is configured. While this is potentially needed to avoid
    dropping a frame in some cases, this does leave a window for replay
    attacks with group-addressed frames at the station side. Any earlier
    frame sent by the AP using the same key would be accepted as a valid
    frame and the internal RSC would then be updated to the TSC from that
    frame. This would allow multiple previously transmitted group-addressed
    frames to be replayed until the next valid new group-addressed frame
    from the AP is received by the station.

    Fix this by limiting the no-replay-protection exception to apply only
    for the case where TSC=0, i.e., when this is for the very first frame
    protected using the new key, and the local RSC had not been set to a
    higher value when configuring the key (which may happen with GTK).

    Signed-off-by: Jouni Malinen
    Link: https://lore.kernel.org/r/20200107153545.10934-1-j@w1.fi
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Jouni Malinen
     
  • [ Upstream commit 26ec17a1dc5ecdd8d91aba63ead6f8b5ad5dea0d ]

    In case a radar event of CAC_FINISHED or RADAR_DETECTED
    happens during another phy is during CAC we might need
    to cancel that CAC.

    If we got a radar in a channel that another phy is now
    doing CAC on then the CAC should be canceled there.

    If, for example, 2 phys doing CAC on the same channels,
    or on comptable channels, once on of them will finish his
    CAC the other might need to cancel his CAC, since it is no
    longer relevant.

    To fix that the commit adds an callback and implement it in
    mac80211 to end CAC.
    This commit also adds a call to said callback if after a radar
    event we see the CAC is no longer relevant

    Signed-off-by: Orr Mazor
    Reviewed-by: Sergey Matyukevich
    Link: https://lore.kernel.org/r/20191222145449.15792-1-Orr.Mazor@tandemg.com
    [slightly reformat/reword commit message]
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Orr Mazor
     
  • [ Upstream commit 02a614499600af836137c3fbc4404cd96365fff2 ]

    The following warning is triggered every time an unestablished mesh peer
    gets dumped. Checks if a peer link is established before retrieving the
    airtime link metric.

    [ 9563.022567] WARNING: CPU: 0 PID: 6287 at net/mac80211/mesh_hwmp.c:345
    airtime_link_metric_get+0xa2/0xb0 [mac80211]
    [ 9563.022697] Hardware name: PC Engines apu2/apu2, BIOS v4.10.0.3
    [ 9563.022756] RIP: 0010:airtime_link_metric_get+0xa2/0xb0 [mac80211]
    [ 9563.022838] Call Trace:
    [ 9563.022897] sta_set_sinfo+0x936/0xa10 [mac80211]
    [ 9563.022964] ieee80211_dump_station+0x6d/0x90 [mac80211]
    [ 9563.023062] nl80211_dump_station+0x154/0x2a0 [cfg80211]
    [ 9563.023120] netlink_dump+0x17b/0x370
    [ 9563.023130] netlink_recvmsg+0x2a4/0x480
    [ 9563.023140] ____sys_recvmsg+0xa6/0x160
    [ 9563.023154] ___sys_recvmsg+0x93/0xe0
    [ 9563.023169] __sys_recvmsg+0x7e/0xd0
    [ 9563.023210] do_syscall_64+0x4e/0x140
    [ 9563.023217] entry_SYSCALL_64_after_hwframe+0x44/0xa9

    Signed-off-by: Markus Theil
    Link: https://lore.kernel.org/r/20191203180644.70653-1-markus.theil@tu-ilmenau.de
    [rewrite commit message]
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Markus Theil
     

12 Jan, 2020

1 commit

  • [ Upstream commit 753ffad3d6243303994227854d951ff5c70fa9e0 ]

    Fix overwriting of the qos_ctrl.tid field for encrypted frames injected on
    a monitor interface. While qos_ctrl.tid is not encrypted, it's used as an
    input into the encryption algorithm so it's protected, and thus cannot be
    modified after encryption. For injected frames, the encryption may already
    have been done in userspace, so we cannot change any fields.

    Before passing the frame to the driver, the qos_ctrl.tid field is updated
    from skb->priority. Prior to dbd50a851c50 skb->priority was updated in
    ieee80211_select_queue_80211(), but this function is no longer always
    called.

    Update skb->priority in ieee80211_monitor_start_xmit() so that the value
    is stored, and when later code 'modifies' the TID it really sets it to
    the same value as before, preserving the encryption.

    Fixes: dbd50a851c50 ("mac80211: only allocate one queue when using iTXQs")
    Signed-off-by: Fredrik Olofsson
    Link: https://lore.kernel.org/r/20191119133451.14711-1-fredrik.olofsson@anyfinetworks.com
    [rewrite commit message based on our discussion]
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Fredrik Olofsson
     

31 Dec, 2019

1 commit

  • [ Upstream commit 08a5bdde3812993cb8eb7aa9124703df0de28e4b ]

    Commit 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing")
    let STAs send QoS Null frames as PS triggers if the AP was
    a QoS STA. However, the mac80211 PS stack relies on an
    interface flag IEEE80211_STA_NULLFUNC_ACKED for
    determining trigger frame ACK, which was not being set for
    acked non-QoS Null frames. The effect is an inability to
    trigger hardware sleep via IEEE80211_CONF_PS since the QoS
    Null frame was seemingly never acked.

    This bug only applies to drivers which set both
    IEEE80211_HW_REPORTS_TX_ACK_STATUS and
    IEEE80211_HW_PS_NULLFUNC_STACK.

    Detect the acked QoS Null frame to restore STA power save.

    Fixes: 7b6ddeaf27ec ("mac80211: use QoS NDP for AP probing")
    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20191119053538.25979-4-thomas@adapt-ip.com
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Thomas Pedersen
     

08 Nov, 2019

2 commits

  • In the first 5 minutes after boot (time of INITIAL_JIFFIES),
    ieee80211_sta_last_active() returns zero if last_ack is zero. This
    leads to "inactive time" showing jiffies_to_msecs(jiffies).

    # iw wlan0 station get fc:ec:da:64:a6:dd
    Station fc:ec:da:64:a6:dd (on wlan0)
    inactive time: 4294894049 ms
    .
    .
    connected time: 70 seconds

    Fix by returning last_rx if last_ack == 0.

    Signed-off-by: Ahmed Zaki
    Link: https://lore.kernel.org/r/20191031121243.27694-1-anzaki@gmail.com
    Signed-off-by: Johannes Berg

    Ahmed Zaki
     
  • 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
     

08 Oct, 2019

2 commits

  • In non-ETSI regulatory domains scan is blocked when operating channel
    is a DFS channel. For ETSI, however, once DFS channel is marked as
    available after the CAC, this channel will remain available (for some
    time) even after leaving this channel.

    Therefore a scan can be done without any impact on the availability
    of the DFS channel as no new CAC is required after the scan.

    Enable scan in mac80211 in these cases.

    Signed-off-by: Aaron Komisar
    Link: https://lore.kernel.org/r/1570024728-17284-1-git-send-email-aaron.komisar@tandemg.com
    Signed-off-by: Johannes Berg

    Aaron Komisar
     
  • We can process deauth frames and all, but we drop them very
    early in the RX path today - this could never have worked.

    Fixes: 2cc59e784b54 ("mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS")
    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20191004123706.15768-2-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Johannes Berg
     

04 Oct, 2019

1 commit

  • Although this shouldn't occur in practice, it's a good idea to bounds
    check the length field of the SSID element prior to using it for things
    like allocations or memcpy operations.

    Cc:
    Cc: Kees Cook
    Reported-by: Nicolas Waisman
    Signed-off-by: Will Deacon
    Link: https://lore.kernel.org/r/20191004095132.15777-1-will@kernel.org
    Signed-off-by: Johannes Berg

    Will Deacon
     

01 Oct, 2019

2 commits

  • Drivers typically expect this, as it's the case for almost all cases
    where this is called (i.e. from the TX path). Also, the code in mac80211
    itself (if the driver calls ieee80211_tx_dequeue()) expects this as it
    uses this_cpu_ptr() without additional protection.

    This should fix various reports of the problem:
    https://bugzilla.kernel.org/show_bug.cgi?id=204127
    https://lore.kernel.org/linux-wireless/CAN5HydrWb3o_FE6A1XDnP1E+xS66d5kiEuhHfiGKkLNQokx13Q@mail.gmail.com/
    https://lore.kernel.org/lkml/nycvar.YFH.7.76.1909111238470.473@cbobk.fhfr.pm/

    Cc: stable@vger.kernel.org
    Reported-and-tested-by: Jiri Kosina
    Reported-by: Aaron Hill
    Reported-by: Lukas Redlinger
    Reported-by: Oleksii Shevchuk
    Fixes: 21a5d4c3a45c ("mac80211: add stop/start logic for software TXQs")
    Link: https://lore.kernel.org/r/1569928763-I3e8838c5ecad878e59d4a94eb069a90f6641461a@changeid
    Reviewed-by: Toke Høiland-Jørgensen
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • If the interface type is P2P_DEVICE or NAN, read the file of
    '/sys/kernel/debug/ieee80211/phyx/netdev:wlanx/aqm' will get a
    NULL pointer dereference. As for those interface type, the
    pointer sdata->vif.txq is NULL.

    Unable to handle kernel NULL pointer dereference at virtual address 00000011
    CPU: 1 PID: 30936 Comm: cat Not tainted 4.14.104 #1
    task: ffffffc0337e4880 task.stack: ffffff800cd20000
    PC is at ieee80211_if_fmt_aqm+0x34/0xa0 [mac80211]
    LR is at ieee80211_if_fmt_aqm+0x34/0xa0 [mac80211]
    [...]
    Process cat (pid: 30936, stack limit = 0xffffff800cd20000)
    [...]
    [] ieee80211_if_fmt_aqm+0x34/0xa0 [mac80211]
    [] ieee80211_if_read+0x60/0xbc [mac80211]
    [] ieee80211_if_read_aqm+0x28/0x30 [mac80211]
    [] full_proxy_read+0x2c/0x48
    [] __vfs_read+0x2c/0xd4
    [] vfs_read+0x8c/0x108
    [] SyS_read+0x40/0x7c

    Signed-off-by: Miaoqing Pan
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/r/1569549796-8223-1-git-send-email-miaoqing@codeaurora.org
    [trim useless data from commit message]
    Signed-off-by: Johannes Berg

    Miaoqing Pan
     

15 Sep, 2019

1 commit


11 Sep, 2019

9 commits

  • The Layer 2 Update frame is used to update bridges when a station roams
    to another AP even if that STA does not transmit any frames after the
    reassociation. This behavior was described in IEEE Std 802.11F-2003 as
    something that would happen based on MLME-ASSOCIATE.indication, i.e.,
    before completing 4-way handshake. However, this IEEE trial-use
    recommended practice document was published before RSN (IEEE Std
    802.11i-2004) and as such, did not consider RSN use cases. Furthermore,
    IEEE Std 802.11F-2003 was withdrawn in 2006 and as such, has not been
    maintained amd should not be used anymore.

    Sending out the Layer 2 Update frame immediately after association is
    fine for open networks (and also when using SAE, FT protocol, or FILS
    authentication when the station is actually authenticated by the time
    association completes). However, it is not appropriate for cases where
    RSN is used with PSK or EAP authentication since the station is actually
    fully authenticated only once the 4-way handshake completes after
    authentication and attackers might be able to use the unauthenticated
    triggering of Layer 2 Update frame transmission to disrupt bridge
    behavior.

    Fix this by postponing transmission of the Layer 2 Update frame from
    station entry addition to the point when the station entry is marked
    authorized. Similarly, send out the VLAN binding update only if the STA
    entry has already been authorized.

    Signed-off-by: Jouni Malinen
    Reviewed-by: Johannes Berg
    Signed-off-by: David S. Miller

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

    Johannes Berg says:

    ====================
    We have a number of changes, but things are settling down:
    * a fix in the new 6 GHz channel support
    * a fix for recent minstrel (rate control) updates
    for an infinite loop
    * handle interface type changes better wrt. management frame
    registrations (for management frames sent to userspace)
    * add in-BSS RX time to survey information
    * handle HW rfkill properly if !CONFIG_RFKILL
    * send deauth on IBSS station expiry, to avoid state mismatches
    * handle deferred crypto tailroom updates in mac80211 better
    when device restart happens
    * fix a spectre-v1 - really a continuation of a previous patch
    * advertise NL80211_CMD_UPDATE_FT_IES as supported if so
    * add some missing parsing in VHT extended NSS support
    * support HE in mac80211_hwsim
    * let mac80211 drivers determine the max MTU themselves
    along with the usual cleanups etc.
    ====================

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

    David S. Miller
     
  • 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
     
  • When we expire an inactive station, try to send it a deauth. This
    helps if it's actually still around, and just has issues with
    beacon distribution (or we do), and it will not also remove us.
    Then, if we have shared state, this may not be reset properly,
    causing problems; for example, we saw a case where aggregation
    sessions weren't removed properly (due to the TX start being
    offloaded to firmware and it relying on deauth for stop), causing
    a lot of traffic to get lost due to the SN reset after remove/add
    of the peer.

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

    Johannes Berg
     
  • We already assume that key is not NULL and dereference it in a few
    other places before we check whether it is NULL, so the check is
    unnecessary. Remove it.

    Fixes: 96fc6efb9ad9 ("mac80211: IEEE 802.11 Extended Key ID support")
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20190830112451.21655-8-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Luca Coelho
     
  • In case we got a fw restart while roaming from encrypted AP to
    non-encrypted one, we might end up with hitting a warning on the pending
    counter crypto_tx_tailroom_pending_dec having a non-zero value.

    The following comment taken from net/mac80211/key.c explains the rational
    for the delayed tailroom needed:

    /*
    * The reason for the delayed tailroom needed decrementing is to
    * make roaming faster: during roaming, all keys are first deleted
    * and then new keys are installed. The first new key causes the
    * crypto_tx_tailroom_needed_cnt to go from 0 to 1, which invokes
    * the cost of synchronize_net() (which can be slow). Avoid this
    * by deferring the crypto_tx_tailroom_needed_cnt decrementing on
    * key removal for a while, so if we roam the value is larger than
    * zero and no 0->1 transition happens.
    *
    * The cost is that if the AP switching was from an AP with keys
    * to one without, we still allocate tailroom while it would no
    * longer be needed. However, in the typical (fast) roaming case
    * within an ESS this usually won't happen.
    */

    The next flow lead to the warning eventually reported as a bug:
    1. Disconnect from encrypted AP
    2. Set crypto_tx_tailroom_pending_dec = 1 for the key
    3. Schedule work
    4. Reconnect to non-encrypted AP
    5. Add a new key, setting the tailroom counter = 1
    6. Got FW restart while pending counter is set ---> hit the warning

    While on it, the ieee80211_reset_crypto_tx_tailroom() func was merged into
    its single caller ieee80211_reenable_keys (previously called
    ieee80211_enable_keys). Also, we reset the crypto_tx_tailroom_pending_dec
    and remove the counters warning as we just reset both.

    Signed-off-by: Lior Cohen
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20190830112451.21655-7-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Lior Cohen
     
  • When we reach this point, the key cannot be NULL. Remove the condition
    that suggests otherwise.

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

    Johannes Berg
     
  • "HE/HT/VHT" is a bit confusing since really the order of
    development (and possible support) is different - change
    this to "HT/VHT/HE".

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

    Johannes Berg
     
  • This fixes was missed in parsing the vht capabilities max bw
    support.

    Signed-off-by: Mordechay Goodstein
    Fixes: e80d642552a3 ("mac80211: copy VHT EXT NSS BW Support/Capable data to station")
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/20190830114057.22197-1-luca@coelho.fi
    Signed-off-by: Johannes Berg

    Mordechay Goodstein
     

03 Sep, 2019

1 commit


29 Aug, 2019

2 commits

  • The noencrypt flag was intended to be set if the "frame was received
    unencrypted" according to include/uapi/linux/nl80211.h. However, the
    current behavior is opposite of this.

    Cc: stable@vger.kernel.org
    Fixes: 018f6fbf540d ("mac80211: Send control port frames over nl80211")
    Signed-off-by: Denis Kenzior
    Link: https://lore.kernel.org/r/20190827224120.14545-3-denkenz@gmail.com
    Signed-off-by: Johannes Berg

    Denis Kenzior
     
  • In ieee80211_deliver_skb_to_local_stack intercepts EAPoL frames if
    mac80211 is configured to do so and forwards the contents over nl80211.
    During this process some additional data is also forwarded, including
    whether the frame was received encrypted or not. Unfortunately just
    prior to the call to ieee80211_deliver_skb_to_local_stack, skb->cb is
    cleared, resulting in incorrect data being exposed over nl80211.

    Fixes: 018f6fbf540d ("mac80211: Send control port frames over nl80211")
    Cc: stable@vger.kernel.org
    Signed-off-by: Denis Kenzior
    Link: https://lore.kernel.org/r/20190827224120.14545-2-denkenz@gmail.com
    Signed-off-by: Johannes Berg

    Denis Kenzior
     

28 Aug, 2019

1 commit


23 Aug, 2019

1 commit

  • Currently the for-loop will spin forever if variable supported is
    non-zero because supported is never changed. Fix this by adding in
    the missing right shift of supported.

    Addresses-Coverity: ("Infinite loop")
    Fixes: 48cb39522a9d ("mac80211: minstrel_ht: improve rate probing for devices with static fallback")
    Signed-off-by: Colin Ian King
    Link: https://lore.kernel.org/r/20190822122034.28664-1-colin.king@canonical.com
    Signed-off-by: Johannes Berg

    Colin Ian King
     

21 Aug, 2019

9 commits

  • On some devices that only support static rate fallback tables sending rate
    control probing packets can be really expensive.
    Probing lower rates can already hurt throughput quite a bit. What hurts even
    more is the fact that on mt76x0/mt76x2, single probing packets can only be
    forced by directing packets at a different internal hardware queue, which
    causes some heavy reordering and extra latency.
    The reordering issue is mainly problematic while pushing lots of packets to
    a particular station. If there is little activity, the overhead of probing is
    neglegible.

    The static fallback behavior is designed to pretty much only handle rate
    control algorithms that use only a very limited set of rates on which the
    algorithm switches up/down based on packet error rate.

    In order to better support that kind of hardware, this patch implements a
    different approach to rate probing where it switches to a slightly higher rate,
    waits for tx status feedback, then updates the stats and switches back to
    the new max throughput rate. This only triggers above a packet rate of 100
    per stats interval (~50ms).
    For that kind of probing, the code has to reduce the set of probing rates
    a lot more compared to single packet probing, so it uses only one packet
    per MCS group which is either slightly faster, or as close as possible to
    the max throughput rate.
    This allows switching between similar rates with different numbers of
    streams. The algorithm assumes that the hardware will work its way lower
    within an MCS group in case of retransmissions, so that lower rates don't
    have to be probed by the high packets per second rate probing code.

    To further reduce the search space, it also does not probe rates with lower
    channel bandwidth than the max throughput rate.

    At the moment, these changes will only affect mt76x0/mt76x2.

    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20190820095449.45255-4-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • Use the first supported rate instead of 0 (which can be invalid)

    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20190820095449.45255-3-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • On hardware with static fallback tables (e.g. mt76x2), rate probing attempts
    can be very expensive.
    On such devices, avoid sampling rates slower than the per-group max throughput
    rate, based on the assumption that the fallback table will take care of probing
    lower rates within that group if the higher rates fail.

    To further reduce unnecessary probing attempts, skip duplicate attempts on
    rates slower than the max throughput rate.

    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20190820095449.45255-2-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • The group number needs to be multiplied by the number of rates per group
    to get the full rate index

    Fixes: 5935839ad735 ("mac80211: improve minstrel_ht rate sorting by throughput & probability")
    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20190820095449.45255-1-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • 802.11ay specification defines Enhanced Directional Multi-Gigabit
    (EDMG) STA and AP which allow channel bonding of 2 channels and more.

    Introduce new NL attributes that are needed for enabling and
    configuring EDMG support.

    Two new attributes are used by kernel to publish driver's EDMG
    capabilities to the userspace:
    NL80211_BAND_ATTR_EDMG_CHANNELS - bitmap field that indicates the 2.16
    GHz channel(s) that are supported by the driver.
    When this attribute is not set it means driver does not support EDMG.
    NL80211_BAND_ATTR_EDMG_BW_CONFIG - represent the channel bandwidth
    configurations supported by the driver.

    Additional two new attributes are used by the userspace for connect
    command and for AP configuration:
    NL80211_ATTR_WIPHY_EDMG_CHANNELS
    NL80211_ATTR_WIPHY_EDMG_BW_CONFIG

    New rate info flag - RATE_INFO_FLAGS_EDMG, can be reported from driver
    and used for bitrate calculation that will take into account EDMG
    according to the 802.11ay specification.

    Signed-off-by: Alexei Avshalom Lazar
    Link: https://lore.kernel.org/r/1566138918-3823-2-git-send-email-ailizaro@codeaurora.org
    Signed-off-by: Johannes Berg

    Alexei Avshalom Lazar
     
  • he_spr_ie_elem is dereferenced before the NULL check. fix this by moving
    the assignment after the check.

    fixes commit 697f6c507c74 ("mac80211: propagate HE operation info into
    bss_conf")

    This was reported by the static code checker.

    Reported-by: Dan Carpenter
    Signed-off-by: John Crispin
    Link: https://lore.kernel.org/r/20190813070712.25509-1-john@phrozen.org
    Signed-off-by: Johannes Berg

    John Crispin
     
  • Report timestamp for when sta becomes associated.

    Signed-off-by: Ben Greear
    Link: https://lore.kernel.org/r/20190809180001.26393-2-greearb@candelatech.com
    [fix ktime_get_boot_ns() to ktime_get_boottime_ns(), assoc_at type to u64]
    Signed-off-by: Johannes Berg

    Ben Greear
     
  • In the 802.11ax specification a new band is introduced, which
    is also proposed by FCC for unlicensed use. This band is referred
    to as 6GHz spanning frequency range from 5925 to 7125 MHz.

    Reviewed-by: Pieter-Paul Giesberts
    Reviewed-by: Leon Zegers
    Signed-off-by: Arend van Spriel
    Link: https://lore.kernel.org/r/1564745465-21234-2-git-send-email-arend.vanspriel@broadcom.com
    Signed-off-by: Johannes Berg

    Arend van Spriel
     
  • The code generating the Tx Radiotap header when using tx_status_ext was
    missing a field increment after setting the VHT bandwidth.

    Fixes: 3d07ffcaf320 ("mac80211: add struct ieee80211_tx_status support to ieee80211_add_tx_radiotap_header")
    Signed-off-by: John Crispin
    Link: https://lore.kernel.org/r/20190807075949.32414-4-john@phrozen.org
    Signed-off-by: Johannes Berg

    John Crispin