30 Oct, 2020

1 commit

  • After the previous similar bugfix there was another bug here,
    if no VHT elements were found we also disabled HE. Fix this to
    disable HE only on the 5 GHz band; on 6 GHz it was already not
    disabled, and on 2.4 GHz there need (should) not be any VHT.

    Fixes: 57fa5e85d53c ("mac80211: determine chandef from HE 6 GHz operation")
    Link: https://lore.kernel.org/r/20201013140156.535a2fc6192f.Id6e5e525a60ac18d245d86f4015f1b271fce6ee6@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

08 Oct, 2020

1 commit

  • last_rate is initialized to zero by sta_info_alloc(), but
    this indicates legacy bitrate for the last TX rate (and
    invalid for the last RX rate). To avoid a warning when
    decoding the last rate as legacy (before a data frame
    has been sent), initialize them as S1G MCS.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20201005164522.18069-2-thomas@adapt-ip.com
    [rename to ieee80211_s1g_sta_rate_init(), seems more appropriate]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     

02 Oct, 2020

1 commit

  • In ieee80211_determine_chantype(), the sband->ht_cap was
    being processed before S1G Operation element. Since the
    HT capability element should not be present on the S1G
    band, avoid processing potential garbage by moving the
    call to ieee80211_apply_htcap_overrides() to after the S1G
    block.

    Also, in case of a missing S1G Operation element, we would
    continue trying to process non-S1G elements (and return
    with a channel width of 20MHz). Instead, just assume
    primary channel is equal to operating and infer the
    operating width from the BSS channel, then return.

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

    Thomas Pedersen
     

28 Sep, 2020

5 commits

  • When a frame was acked and probe frames were sent, the connection monitoring
    needs to be reset, otherwise it will keep probing until the connection is
    considered dead, even though frames have been acked in the mean time.

    Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor")
    Reported-by: Georgi Valkov
    Signed-off-by: Felix Fietkau
    Link: https://lore.kernel.org/r/20200927105605.97954-1-nbd@nbd.name
    Signed-off-by: Johannes Berg

    Felix Fietkau
     
  • The changes required for associating in S1G are:

    - apply S1G BSS channel info before assoc
    - mark all S1G STAs as QoS STAs
    - include and parse AID request element
    - handle new Association Response format
    - don't fail assoc if supported rates element is missing

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200922022818.15855-15-thomas@adapt-ip.com
    [pass skb to ieee80211_add_aid_request_ie(), remove unused variable 'bss']
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • S1G beacons are 802.11 Extension Frames, so the fixed
    header part differs from regular beacons.

    Add a handler to process S1G beacons and abstract out the
    fetching of BSSID and element start locations in the
    beacon body handler.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200922022818.15855-14-thomas@adapt-ip.com
    [don't rename, small coding style cleanups]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • S1G allows listen interval up to 2^14 * 10000 beacon
    intervals. In order to do this listen interval needs a
    scaling factor applied to the lower 14 bits. Calculate
    this and properly encode the listen interval for S1G STAs.

    See IEEE802.11ah-2016 Table 9-44a for reference.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200922022818.15855-10-thomas@adapt-ip.com
    [move listen_int_usf into function using it]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • Include the S1G Capabilities element in an association
    request, and support the cfg80211 capability overrides.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200922022818.15855-5-thomas@adapt-ip.com
    [pass skb to ieee80211_add_s1g_capab_ie(), small code style edits]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     

23 Sep, 2020

1 commit

  • Two minor conflicts:

    1) net/ipv4/route.c, adding a new local variable while
    moving another local variable and removing it's
    initial assignment.

    2) drivers/net/dsa/microchip/ksz9477.c, overlapping changes.
    One pretty prints the port mode differently, whilst another
    changes the driver to try and obtain the port mode from
    the port node rather than the switch node.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Sep, 2020

3 commits

  • Calling mod_timer for every rx/tx packet can be quite expensive.
    Instead of constantly updating the timer, we can simply let it run out
    and check the timestamp of the last ACK or rx packet to re-arm it.

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

    Felix Fietkau
     
  • This is needed for encapsulation offload of 4-address mode packets

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

    Felix Fietkau
     
  • VHT is not supported on 2.4 GHz, but HE is; don't disable HE if HT
    is missing there, do that only on 5 GHz (6 GHz is only HE).

    Fixes: 57fa5e85d53ce51 ("mac80211: determine chandef from HE 6 GHz operation")
    Signed-off-by: Wen Gong
    Link: https://lore.kernel.org/r/010101747cb617f2-593c5410-1648-4a42-97a0-f3646a5a6dd1-000000@us-west-2.amazonses.com
    [rewrite the commit message]
    Signed-off-by: Johannes Berg

    Wen Gong
     

03 Aug, 2020

2 commits

  • mac80211.h says: Beacon filter support is advertised with the
    IEEE80211_VIF_BEACON_FILTER interface capability. The driver needs to
    enable beacon filter support whenever power save is enabled, that is
    IEEE80211_CONF_PS is set. When power save is enabled, the stack will
    not check for beacon loss and the driver needs to notify about loss
    of beacons with ieee80211_beacon_loss().

    Some controllers may want to dynamically enable the beacon filter
    capabilities on power save entry (CONF_PS) and disable it on exit.
    This is the case for the wcn36xx driver which only supports beacon
    filtering in PS mode (no CONNECTION_MONITOR support).

    When the mac80211 beacon monitor timer expires, the beacon filter
    flag must be checked again in case it as been changed in between
    (e.g. vif moved to PS mode).

    Signed-off-by: Loic Poulain
    Link: https://lore.kernel.org/r/1592471863-31402-1-git-send-email-loic.poulain@linaro.org
    Signed-off-by: Johannes Berg

    Loic Poulain
     
  • SAE authentication has been extended with H2E (IEEE 802.11 REVmd) and PK
    (WFA) options. Those extensions use special status code values in the
    SAE commit messages (Authentication frame with transaction sequence
    number 1) to identify which extension is in use. mac80211 was
    interpreting those new values as the AP denying authentication and that
    resulted in failure to complete SAE authentication in some cases.

    Fix this by adding exceptions for the new status code values 126 and
    127.

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

    Jouni Malinen
     

31 Jul, 2020

3 commits

  • This is in fact 'disabled' in the spec, but there it's in a
    place where that actually makes sense. In our internal data
    structures, it doesn't really make sense, and in fact the
    previous commit just fixed a bug in that area.

    Make this safer by inverting the polarity from 'disabled' to
    'enabled'.

    Link: https://lore.kernel.org/r/20200730130051.5d8399545bd9.Ie62fdcd1a6cd9c969315bc124084a494ca6c8df3@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Adding bss-color configuration is only valid in HE mode.
    Earlier we have enabled it by default, irrespective of
    capabilities/mode. Fix that.

    Reported-by: kernel test robot
    Reported-by: Rajkumar Manoharan
    Signed-off-by: P Praneesh
    Link: https://lore.kernel.org/r/1594262781-21444-1-git-send-email-ppranees@codeaurora.org
    [fix up commit message]
    Signed-off-by: Johannes Berg

    P Praneesh
     
  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200707204548.GA9320@embeddedor
    Signed-off-by: Johannes Berg

    Gustavo A. R. Silva
     

05 Jun, 2020

1 commit

  • Dan points out that if ieee80211_chandef_he_6ghz_oper() succeeds,
    we don't initialize 'ret'. Initialize it to 0 in this case, since
    everything went fine and nothing has to be disabled.

    Reported-by: Dan Carpenter
    Fixes: 57fa5e85d53c ("mac80211: determine chandef from HE 6 GHz operation")
    Signed-off-by: Johannes Berg
    Link: https://lore.kernel.org/r/20200603111500.bd2a5ff37b83.I2c3f338ce343b581db493eb9a0d988d1b626c8fb@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

31 May, 2020

7 commits

  • Set short slot also for 6 GHz band, just like 5 GHz.

    Signed-off-by: Tova Mussai
    Link: https://lore.kernel.org/r/20200528213443.75f38e6f5efd.I272fbae402b03123f04e9ae69204eeab960c70cd@changeid
    Signed-off-by: Johannes Berg

    Tova Mussai
     
  • Treat it like the 5 GHz band.

    Signed-off-by: Ilan Peer
    Link: https://lore.kernel.org/r/20200528213443.889e5c9dd006.Id8ed3bb8000ba8738be5df05639415eb2e23c61a@changeid
    Signed-off-by: Johannes Berg

    Ilan Peer
     
  • In order to handle 6 GHz AP side, take the HE 6 GHz band capability
    data and pass it to the driver (which needs it for A-MPDU spacing
    and A-MPDU length).

    Link: https://lore.kernel.org/r/1589399105-25472-6-git-send-email-rmanohar@codeaurora.org
    Co-developed-by: Rajkumar Manoharan
    Signed-off-by: Rajkumar Manoharan
    Link: https://lore.kernel.org/r/20200528213443.784e4890d82f.I5f1230d5ab27e84e7bbe88e3645b24ea15a0c146@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • An AP supporting EMA (Enhanced Multi-BSSID advertisement) should set
    bit 83 in the extended capabilities IE (9.4.2.26 in the 802.11ax D5 spec).
    So the *3rd* bit of the 10th byte should be checked.
    Also, in one place, the wrong byte was checked.
    (cfg80211_find_ie returns a pointer to the beginning of the IE,
    so the data really starts at ie[2], so the 10th byte
    should be ie[12]. To avoid this confusion, use cfg80211_find_elem
    instead).

    Signed-off-by: Shaul Triebitz
    Link: https://lore.kernel.org/r/20200528213443.4316121fa2a3.I9745582f8d41ad8e689dac0fefcd70b276d7c1ea@changeid
    Signed-off-by: Johannes Berg

    Shaul Triebitz
     
  • Support connecting to HE 6 GHz APs and mesh networks on 6 GHz,
    where the HT/VHT information is missing but instead the HE 6 GHz
    band capability is present, and the 6 GHz Operation information
    field is used to encode the channel configuration instead of the
    HT/VHT operation elements.

    Also add some other bits needed to connect to 6 GHz networks.

    Link: https://lore.kernel.org/r/1589399105-25472-10-git-send-email-rmanohar@codeaurora.org
    Co-developed-by: Rajkumar Manoharan
    Signed-off-by: Rajkumar Manoharan
    Link: https://lore.kernel.org/r/20200528213443.25687d2695bc.I3f9747c1147480f65445f13eda5c4a5ed4e86757@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • If the AP advertises inconsistent data, namely it has CCFS1 or CCFS2,
    but doesn't advertise support for 160/80+80 bandwidth or "Extended NSS
    BW Support", then we cannot use any MCSes in the the higher bandwidth.
    Thus, avoid connecting with higher bandwidth since it's less efficient
    that way.

    Link: https://lore.kernel.org/r/20200528213443.0e55d40c3ccc.I6fd0b4708ebd087e5e46466c3e91f6efbcbef668@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Construct HE 6 GHz band capability element (IEEE 802.11ax/D6.0,
    9.4.2.261) for association request and mesh beacon. The 6 GHz
    capability information is passed by driver through iftypes caps.

    Signed-off-by: Rajkumar Manoharan
    Link: https://lore.kernel.org/r/1589399105-25472-7-git-send-email-rmanohar@codeaurora.org
    [handle SMPS, adjust for previous patches, reserve SKB space properly,
    change to handle SKB directly]
    Link: https://lore.kernel.org/r/20200528213443.643aa8101111.I3f9747c1147480f65445f13eda5c4a5ed4e86757@changeid
    Signed-off-by: Johannes Berg

    Rajkumar Manoharan
     

24 Apr, 2020

7 commits

  • RX status needs a KHz component, so add freq_offset. We
    can reduce the bits for the frequency since 60 GHz isn't
    supported.

    Signed-off-by: Thomas Pedersen
    Link: https://lore.kernel.org/r/20200402011810.22947-5-thomas@adapt-ip.com
    [fix commit message]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • 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
     
  • The MLME logic had a workaround that allowed to continue an
    association with an AP even if the AP did not provide any basic
    rates in its supported rates in the association response, assuming
    that the first (non basic) legacy rate could be used as a basic rate.
    However, this did not consider the case where the AP (which is
    obviously buggy) did not provide any legacy rate.

    Fix this by failing the association, as this can result in
    an unexpected failure in the low level driver and FW, e.g., in
    rate scale logic etc.

    Signed-off-by: Ilan Peer
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/iwlwifi.20200326150855.d70a1450d83f.I6e6ce5efda351a8544c0e7bfeee260fe3360d401@changeid
    Signed-off-by: Johannes Berg

    Ilan Peer
     
  • When parsing supported rates IE.

    Signed-off-by: Ilan Peer
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/iwlwifi.20200326150855.ed3e66f8c197.I93aad0e5ddb7ce79f05f8153922acb9aa5076d38@changeid
    Signed-off-by: Johannes Berg

    Ilan Peer
     
  • SAE AP may reject authentication with WLAN_STATUS_ANTI_CLOG_REQUIRED.
    As the user space will immediately continue the authentication flow,
    there is no need to destroy the authentication data in this case.
    This saves unneeded station removal and releasing the channel.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/iwlwifi.20200326150855.7483996157a8.I8040a842874aaf6d209df3fc8a2acb97a0bf508b@changeid
    Signed-off-by: Johannes Berg

    Andrei Otcheretianski
     
  • Add a flag to the BSS conf whether the BSS and STA support protected TWT.

    Signed-off-by: Shaul Triebitz
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/iwlwifi.20200326150855.1dcb2d16fa74.I74d7c007dad2601d2e39f54612fe6554dd5ab386@changeid
    Signed-off-by: Johannes Berg

    Shaul Triebitz
     
  • Maintain the connection AID only in sdata->vif.bss_conf.aid, not
    also in sdata->u.mgd.aid.

    Keep setting that where we set ifmgd->aid before, which has the
    side effect of exposing the AID to the driver before the station
    entry (AP) is marked associated, in case it needs it then.

    Requested-by: Felix Fietkau
    Signed-off-by: Johannes Berg
    Tested-by: Lorenzo Bianconi
    Link: https://lore.kernel.org/r/20200417123802.085d4a322b0c.I2e7a2ceceea8c6880219f9e9ee4d4ac985fd295a@changeid
    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 Mar, 2020

1 commit

  • 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
     

28 Feb, 2020

1 commit


21 Feb, 2020

1 commit

  • 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

    Andrei Otcheretianski
     

17 Feb, 2020

1 commit


07 Feb, 2020

4 commits