31 Jul, 2020

1 commit

  • Currently, before being able to forward a packet between two 802.11s
    nodes, both a PLINK handshake is performed upon receiving a beacon and
    then later a PREQ/PREP exchange for path discovery is performed on
    demand upon receiving a data frame to forward.

    When running a mesh protocol on top of an 802.11s interface, like
    batman-adv, we do not need the multi-hop mesh routing capabilities of
    802.11s and usually set mesh_fwding=0. However, even with mesh_fwding=0
    the PREQ/PREP path discovery is still performed on demand. Even though
    in this scenario the next hop PREQ/PREP will determine is always the
    direct 11s neighbor node.

    The new mesh_nolearn parameter allows to skip the PREQ/PREP exchange in
    this scenario, leading to a reduced delay, reduced packet buffering and
    simplifies HWMP in general.

    mesh_nolearn is still rather conservative in that if the packet destination
    is not a direct 11s neighbor, it will fall back to PREQ/PREP path
    discovery.

    For normal, multi-hop 802.11s mesh routing it is usually not advisable
    to enable mesh_nolearn as a transmission to a direct but distant neighbor
    might be worse than reaching that same node via a more robust /
    higher throughput etc. multi-hop path.

    Cc: Sven Eckelmann
    Cc: Simon Wunderlich
    Signed-off-by: Linus Lüssing
    Link: https://lore.kernel.org/r/20200617073034.26149-1-linus.luessing@c0d3.blue
    [fix nl80211 policy to range 0/1 only]
    Signed-off-by: Johannes Berg

    Linus Lüssing
     

29 Mar, 2018

1 commit


31 Jan, 2018

1 commit

  • Mesh used to use the mandatory rates as basic rates, but we got
    the calculation of mandatory rates wrong until some time ago.
    Fix this this broke interoperability with older versions since
    now more basic rates are required, and thus the MBSS isn't the
    same and the network stops working.

    Fix this by simply using only 1Mbps as the basic rate in 2.4GHz.
    Since the changed mandatory rates only affected 2.4GHz, this is
    all we need to make it work again.

    Reported-and-tested-by: Matthias Schiffer
    Fixes: 1bd773c077de ("wireless: set correct mandatory rate flags")
    Signed-off-by: Johannes Berg

    Johannes Berg
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 May, 2017

1 commit

  • When joining a mesh network it is not guaranteed that userspace has a
    daemon listening for radar events. This is however required for channels
    requiring DFS. To flag that userspace will handle radar events, it needs
    to set NL80211_ATTR_HANDLE_DFS.

    This matches the current mechanism used for IBSS mode.

    Signed-off-by: Benjamin Berg
    Signed-off-by: Simon Wunderlich
    Signed-off-by: Johannes Berg

    Benjamin Berg
     

06 Mar, 2017

1 commit

  • DFS requirement for ETSI domain (section 4.7.1.4 in
    ETSI EN 301 893 V1.8.1) is the only one which explicitly
    states that once DFS channel is marked as available afer
    the CAC, this channel will remain in available state even
    moving to a different operating channel. But the same is
    not explicitly stated in FCC DFS requirement. Also, Pre-CAC
    requriements are not explicitly mentioned in FCC requirement.
    Current implementation in keeping DFS channel in available
    state is same as described in ETSI domain.

    For non-ETSI DFS domain, this patch gives a grace period of 2 seconds
    since the completion of successful CAC before moving the channel's
    DFS state to 'usable' from 'available' state. The same grace period
    is checked against the channel's dfs_state_entered timestamp while
    deciding if a DFS channel is available for operation. There is a new
    radar event, NL80211_RADAR_PRE_CAC_EXPIRED, reported when DFS channel
    is moved from available to usable state after the grace period. Also
    make sure the DFS channel state is reset to usable once the beaconing
    operation on that channel is brought down (like stop_ap, leave_ibss
    and leave_mesh) in non-ETSI domain.

    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: Johannes Berg

    Vasanthakumar Thiagarajan
     

27 Oct, 2016

1 commit


12 Apr, 2016

1 commit

  • This enum is already perfectly aliased to enum nl80211_band, and
    the only reason for it is that we get IEEE80211_NUM_BANDS out of
    it. There's no really good reason to not declare the number of
    bands in nl80211 though, so do that and remove the cfg80211 one.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

06 May, 2014

1 commit

  • This exports a new cfg80211_stop_iface() function.

    This is intended for driver internal interface
    combination management and channel switching.

    Due to locking issues (it re-enters driver) the
    call is asynchronous and uses cfg80211 event
    list/worker.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

09 Apr, 2014

3 commits

  • Move the counting part of the interface combination check from
    cfg80211 to mac80211.

    This is needed to simplify locking when the driver has to perform a
    combination check by itself (eg. with channel-switch).

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

    Luciano Coelho
     
  • Some interface types don't require DFS (such as STATION, P2P_CLIENT
    etc). In order to centralize these decisions, make
    cfg80211_chandef_dfs_required() take the iftype into consideration.

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

    Luciano Coelho
     
  • Allow GO operation on a channel marked with IEEE80211_CHAN_GO_CONCURRENT
    iff there is an active station interface that is associated to
    an AP operating on the same channel in the 2 GHz band or the same UNII band
    (in the 5 GHz band). This relaxation is not allowed if the channel is
    marked with IEEE80211_CHAN_RADAR.

    Note that this is a permissive approach to the FCC definitions,
    that require a clear assessment that the device operating the AP is
    an authorized master, i.e., with radar detection and DFS capabilities.

    It is assumed that such restrictions are enforced by user space.
    Furthermore, it is assumed, that if the conditions that allowed for
    the operation of the GO on such a channel change, i.e., the station
    interface disconnected from the AP, it is the responsibility of user
    space to evacuate the GO from the channel.

    Signed-off-by: Ilan Peer
    Signed-off-by: Johannes Berg

    Ilan Peer
     

21 Feb, 2014

1 commit


05 Feb, 2014

1 commit

  • It was possible to break interface combinations in
    the following way:

    combo 1: iftype = AP, num_ifaces = 2, num_chans = 2,
    combo 2: iftype = AP, num_ifaces = 1, num_chans = 1, radar = HT20

    With the above interface combinations it was
    possible to:

    step 1. start AP on DFS channel by matching combo 2
    step 2. start AP on non-DFS channel by matching combo 1

    This was possible beacuse (step 2) did not consider
    if other interfaces require radar detection.

    The patch changes how cfg80211 tracks channels -
    instead of channel itself now a complete chandef
    is stored.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

19 Dec, 2013

1 commit

  • This allows QoS mapping from external networks to be implemented as
    defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
    DSCP ranges and exceptions for mapping frames to a specific UP over
    Wi-Fi.

    The payload of the QoS Map Set element (IEEE Std 802.11-2012, 8.4.2.97)
    is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
    configure the local behavior either on the AP (based on local
    configuration) or on a station (based on information received from the
    AP).

    Signed-off-by: Kyeyoon Park
    Signed-off-by: Jouni Malinen
    Signed-off-by: Johannes Berg

    Kyeyoon Park
     

04 Dec, 2013

1 commit


26 Nov, 2013

1 commit

  • These two flags are used for the same purpose, just
    combine them into a no-ir flag to annotate no initiating
    radiation is allowed.

    Old userspace sending either flag will have it treated as
    the no-ir flag. To be considerate to older userspace we
    also send both the no-ir flag and the old no-ibss flags.
    Newer userspace will have to be aware of older kernels.

    Update all places in the tree using these flags with the
    following semantic patch:

    @@
    @@
    -NL80211_RRF_PASSIVE_SCAN
    +NL80211_RRF_NO_IR
    @@
    @@
    -NL80211_RRF_NO_IBSS
    +NL80211_RRF_NO_IR
    @@
    @@
    -IEEE80211_CHAN_PASSIVE_SCAN
    +IEEE80211_CHAN_NO_IR
    @@
    @@
    -IEEE80211_CHAN_NO_IBSS
    +IEEE80211_CHAN_NO_IR
    @@
    @@
    -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR
    +NL80211_RRF_NO_IR
    @@
    @@
    -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR
    +IEEE80211_CHAN_NO_IR
    @@
    @@
    -(NL80211_RRF_NO_IR)
    +NL80211_RRF_NO_IR
    @@
    @@
    -(IEEE80211_CHAN_NO_IR)
    +IEEE80211_CHAN_NO_IR

    Along with some hand-optimisations in documentation, to
    remove duplicates and to fix some indentation.

    Signed-off-by: Luis R. Rodriguez
    [do all the driver updates in one go]
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     

16 Jul, 2013

1 commit


11 Jun, 2013

2 commits

  • Currently mesh uses mandatory rates as the default basic rates. Allow basic
    rates to be configured during mesh join. Basic rates are applied only if
    channel is also provided with mesh join command.

    Signed-off-by: Ashok Nagarajan
    [some whitespace fixes, refuse basic rates w/o channel]
    Signed-off-by: Johannes Berg

    Ashok Nagarajan
     
  • If a STA has a peer that it hasn't seen any tx activity
    from for a certain length of time, the peer link is
    expired. This means the inactive STA is removed from the
    list of peers and that STA is not considered a peer again
    unless it re-peers. Previously, this inactivity time was
    always 30 minutes. Now, add it to the mesh configuration
    and allow it to be configured. Retain 30 minutes as a
    default value.

    Signed-off-by: Colleen Twitty
    Signed-off-by: Johannes Berg

    Colleen Twitty
     

25 May, 2013

1 commit

  • Virtually all code paths in cfg80211 already (need to) hold
    the RTNL. As such, there's little point in having another
    four mutexes for various parts of the code, they just cause
    lock ordering issues (and much of the time, the RTNL and a
    few of the others need thus be held.)

    Simplify all this by getting rid of the extra four mutexes
    and just use the RTNL throughout. Only a few code changes
    were needed to do this and we can get rid of a work struct
    for bonus points.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

17 May, 2013

1 commit


06 Mar, 2013

2 commits

  • Secure mesh had the implicit requirement that the Mesh
    Peering Management entity be in userspace. However
    userspace might want to implement an open MPM as well, so
    specify a mesh setup parameter to indicate this.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • This is the sort of thing gcc's LTO could do, but since
    we don't have that yet we can also do it manually. The
    advantage is reduced code, both source and binary, e.g.
    on x86-64

    text data bss dec hex filename
    442825 56230 776 499831 7a077 cfg80211.ko (before)
    441585 56230 776 498591 79b9f cfg80211.ko (after)

    a reduction of ~1k.

    But in order to not complicate the code move only those
    functions that are simple wrappers, not those that have
    functionality of their own.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

17 Jan, 2013

2 commits

  • Add the nl80211_mesh_power_mode enumeration which holds possible
    values for the mesh power mode. These modes are unknown, active,
    light sleep and deep sleep.

    Add power_mode entry to the mesh config structure to hold the
    user-configured default mesh power mode. This value will be used
    for new peer links.

    Add the dot11MeshAwakeWindowDuration value to the mesh config.
    The awake window is a duration in TU describing how long the STA
    will stay awake after transmitting its beacon in PS mode.

    Add access routines to:
    - get/set local link-specific power mode (STA)
    - get remote STA's link-specific power mode (STA)
    - get remote STA's non-peer power mode (STA)
    - get/set default mesh power mode (mesh config)
    - get/set mesh awake window duration (mesh config)

    All config changes may be done at mesh runtime and take effect
    immediately.

    Signed-off-by: Marco Porsch
    Signed-off-by: Ivan Bezyazychnyy
    Signed-off-by: Mike Krinkin
    [fix commit message line length, error handling in set station]
    Signed-off-by: Johannes Berg

    Marco Porsch
     
  • Move the default mesh beacon interval and DTIM period to cfg80211
    and make them accessible to nl80211. This enables setting both
    values when joining an MBSS.

    Previously the DTIM parameter was not set by mac80211 so the
    driver's default value was used.

    Signed-off-by: Marco Porsch
    Signed-off-by: Johannes Berg

    Marco Porsch
     

03 Dec, 2012

1 commit


26 Nov, 2012

2 commits

  • Change nl80211 to support specifying a VHT (or HT)
    using the control channel frequency (as before) and
    new attributes for the channel width and first and
    second center frequency. The old channel type is of
    course still supported for HT.

    Also change the cfg80211 channel definition struct
    to support these by adding the relevant fields to
    it (and removing the _type field.)

    This also adds new helper functions:
    - cfg80211_chandef_create to create a channel def
    struct given the control channel and channel type,
    - cfg80211_chandef_identical to check if two channel
    definitions are identical
    - cfg80211_chandef_compatible to check if the given
    channel definitions are compatible, and return the
    wider of the two

    This isn't entirely complete, but that doesn't matter
    until we have a driver using it. In particular, it's
    missing
    - regulatory checks on the usable bandwidth (if that
    even makes sense)
    - regulatory TX power (database can't deal with it)
    - a proper channel compatibility calculation for the
    new channel types

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Instead of passing a channel pointer and channel type
    to all functions and driver methods, pass a new channel
    definition struct. Right now, this struct contains just
    the control channel and channel type, but for VHT this
    will change.

    Also, add a small inline cfg80211_get_chandef_type() so
    that drivers don't need to use the _type field of the
    new structure all the time, which will change.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

18 Oct, 2012

2 commits


29 Jun, 2012

2 commits


18 Jun, 2012

1 commit

  • As defined in section 13.10.9.3 Case D (802.11-2012), this
    control variable is used to limit the mesh STA to send only
    one PREQ to a root mesh STA within this interval of time
    (in TUs). The default value for this variable is set to
    2000 TUs. However, for current implementation, the maximum
    configurable of dot11MeshHWMPconfirmationInterval is
    restricted by dot11MeshHWMPactivePathTimeout.

    Signed-off-by: Chun-Yeow Yeoh
    [line-break commit log]
    Signed-off-by: Johannes Berg

    Chun-Yeow Yeoh
     

14 Jun, 2012

1 commit


07 Jun, 2012

1 commit

  • Now that we've removed all uses of the set_channel
    API except for the monitor channel and in libertas,
    clarify this. Split the libertas mesh use into a
    new libertas_set_mesh_channel() operation, just to
    keep backward compatibility, and rename the normal
    set_channel() to set_monitor_channel().

    Also describe the desired set_monitor_channel()
    semantics more clearly.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

06 Jun, 2012

1 commit

  • Just like the AP mode patch, instead of setting
    the channel and then joining the mesh network,
    provide the channel to join the network on to
    the join_mesh() function.

    Like in AP mode, you can also give the channel
    to the join-mesh nl80211 command now.

    Unlike AP mode, it picks a default channel if
    none was given.

    As libertas uses mesh mode interfaces but has
    no join_mesh callback and we can't simply break
    it, keep some compatibility code for that case
    and configure the channel directly for it.

    In the non-libertas case, where we store the
    channel until join, allow setting it while the
    interface is down.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

09 May, 2012

1 commit

  • This patch introduces a new mesh configuration parameter "ht_opmode" and will
    allow user to check the current HT protection mode selected. Users could
    configure the protection mode by the command "iw mesh_iface set mesh_param
    mesh_ht_protection_mode=2". The default protection mode of mesh is set to
    non-HT mixed mode.

    Signed-off-by: Ashok Nagarajan
    Reviewed-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Ashok Nagarajan
     

11 Apr, 2012

1 commit


06 Mar, 2012

1 commit

  • Mesh peer links are established only if average rssi of the peer
    candidate satisfies the threshold. This is not in 802.11s specification
    but was requested by David Fulgham, an open80211s user. This is a way to avoid
    marginal peer links with stations that are barely within range.

    This patch adds a new mesh configuration parameter, mesh_rssi_threshold. This
    feature is supported only for hardwares that report signal in dBm.

    Signed-off-by: Ashok Nagarajan
    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Ashok Nagarajan