14 May, 2019

1 commit

  • Commit 715a12334764 ("wireless: don't write C files on failures") drops
    the `test -f $$f` check. The list of targets contains the
    CONFIG_CFG80211_EXTRA_REGDB_KEYDIR directory itself, and this check used
    to filter it out. After the check was removed, the extra keydir option
    no longer works, failing with the following message:

    od: 'standard input': read error: Is a directory

    This commit restores the check to make extra keydir work again.

    Fixes: 715a12334764 ("wireless: don't write C files on failures")
    Signed-off-by: Maxim Mikityanskiy
    Signed-off-by: Johannes Berg

    Maxim Mikityanskiy
     

09 Nov, 2018

1 commit

  • Add a new "peer measurement" API, that can be used to measure
    certain things related to a peer. Right now, only implement
    FTM (flight time measurement) over it, but the idea is that
    it'll be extensible to also support measuring the necessary
    things to calculate e.g. angle-of-arrival for WiGig.

    The API is structured to have a generic list of peers and
    channels to measure with/on, and then for each of those a
    set of measurements (again, only FTM right now) to perform.

    Results are sent to the requesting socket, including a final
    complete message.

    Closing the controlling netlink socket will abort a running
    measurement.

    v3:
    - add a bit to report "final" for partial results
    - remove list keeping etc. and just unicast out the results
    to the requester (big code reduction ...)
    - also send complete message unicast, and as a result
    remove the multicast group
    - separate out struct cfg80211_pmsr_ftm_request_peer
    from struct cfg80211_pmsr_request_peer
    - document timeout == 0 if no timeout
    - disallow setting timeout nl80211 attribute to 0,
    must not include attribute for no timeout
    - make MAC address randomization optional
    - change num bursts exponent default to 0 (1 burst, rather
    rather than the old default of 15==don't care)

    v4:
    - clarify NL80211_ATTR_TIMEOUT documentation

    v5:
    - remove unnecessary nl80211 multicast/family changes
    - remove partial results bit/flag, final is sufficient
    - add max_bursts_exponent, max_ftms_per_burst to capability
    - rename "frames per burst" -> "FTMs per burst"

    v6:
    - rename cfg80211_pmsr_free_wdev() to cfg80211_pmsr_wdev_down()
    and call it in leave, so the device can't go down with any
    pending measurements

    v7:
    - wording fixes (Lior)
    - fix ftm.max_bursts_exponent to allow having the limit of 0 (Lior)

    v8:
    - copyright statements
    - minor coding style fixes
    - fix error path leak

    Signed-off-by: Johannes Berg

    Johannes Berg
     

19 Dec, 2017

2 commits

  • Not only does this remove the need for the hexdump code in most
    normal kernel builds (still there for the extra directory), but
    it also removes the need to ship binary files, which apparently
    is somewhat problematic, as Randy reported.

    While at it, also add the generated files to clean-files.

    Reported-by: Randy Dunlap
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Currently the certs C code generation appends to the generated files,
    which is most likely a leftover from commit 715a12334764 ("wireless:
    don't write C files on failures"). This causes duplicate code in the
    generated files if the certificates have their timestamps modified
    between builds and thereby trigger the generation rules.

    Fixes: 715a12334764 ("wireless: don't write C files on failures")
    Signed-off-by: Thierry Reding
    Signed-off-by: Johannes Berg

    Thierry Reding
     

06 Dec, 2017

2 commits

  • Change the scripting inside the shipped/extra certs C code
    generation to not write the file when there are any failures.
    That way, if the build aborts due to failures, we don't get
    into a situation where a dummy file has been created and the
    next build succeeds, but not with the desired output.

    Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking")
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Since od/sed are in posix, hopefully there's a better chance
    people will have them, over hexdump.

    Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking")
    Signed-off-by: Johannes Berg

    Johannes Berg
     

04 Nov, 2017

1 commit


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
     

13 Oct, 2017

1 commit

  • Building an allmodconfig kernel with 'make -s' now prints a single line:

    GEN net/wireless/shipped-certs.c

    Using '$(kecho)' here will skip the output with 'make -s' but
    otherwise keeps printing it, which is consistent with how we
    handle all the other output.

    Fixes: 90a53e4432b1 ("cfg80211: implement regdb signature checking")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Johannes Berg

    Arnd Bergmann
     

11 Oct, 2017

2 commits

  • Currently CRDA implements the signature checking, and the previous
    commits added the ability to load the whole regulatory database
    into the kernel.

    However, we really can't lose the signature checking, so implement
    it in the kernel by loading a detached signature (regulatory.db.p7s)
    and check it against built-in keys.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Parsing and building C structures from a regdb is no longer needed
    since the "firmware" file (regulatory.db) can be linked into the
    kernel image to achieve the same effect.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

15 Jan, 2017

1 commit

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

    Johannes Berg says:

    ====================
    For 4.11, we seem to have more than in the past few releases:
    * socket owner support for connections, so when the wifi
    manager (e.g. wpa_supplicant) is killed, connections are
    torn down - wpa_supplicant is critical to managing certain
    operations, and can opt in to this where applicable
    * minstrel & minstrel_ht updates to be more efficient (time and space)
    * set wifi_acked/wifi_acked_valid for skb->destructor use in the
    kernel, which was already available to userspace
    * don't indicate new mesh peers that might be used if there's no
    room to add them
    * multicast-to-unicast support in mac80211, for better medium usage
    (since unicast frames can use *much* higher rates, by ~3 orders of
    magnitude)
    * add API to read channel (frequency) limitations from DT
    * add infrastructure to allow randomizing public action frames for
    MAC address privacy (still requires driver support)
    * many cleanups and small improvements/fixes across the board
    ====================

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

    David S. Miller
     

06 Jan, 2017

1 commit

  • This patch adds a helper for reading that new property and applying
    limitations of supported channels specified this way.
    It is used with devices that normally support a wide wireless band but
    in a given config are limited to some part of it (usually due to board
    design). For example a dual-band chipset may be able to support one band
    only because of used antennas.
    It's also common that tri-band routers have separated radios for lower
    and higher part of 5 GHz band and it may be impossible to say which is
    which without a DT info.

    Signed-off-by: Rafał Miłecki
    [add new function to documentation, fix link]
    Signed-off-by: Johannes Berg

    Rafał Miłecki
     

16 Dec, 2016

1 commit


04 Nov, 2014

1 commit

  • This patch adds new iface type (NL80211_IFTYPE_OCB) representing
    the OCB (Outside the Context of a BSS) mode.
    When establishing a connection to the network a cfg80211_join_ocb
    function is called (particular nl80211_command is added as well).
    A mandatory parameters during the ocb_join operation are 'center
    frequency' and 'channel width (5/10 MHz)'.

    Changes done in mac80211 are minimal possible required to avoid
    many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB'
    not handled in switch) during compilation. Full functionality
    (where needed) is added in the following patch.

    Signed-off-by: Rostislav Lisovy
    Signed-off-by: Johannes Berg

    Rostislav Lisovy
     

18 Oct, 2012

1 commit

  • Add tracing to make debugging cfg80211/mac80211
    (or full-mac driver) interaction easier.

    Signed-off-by: Beni Lev
    Reviewed-by: Johannes Berg
    Reviewed-by: Hila Gonen
    Tested-by: Hila Gonen
    Reviewed-by: Emmanuel Grumbach
    [add a cast to int to sizeof() to avoid warning]
    Signed-off-by: Johannes Berg

    Beni Lev
     

29 Jun, 2012

1 commit


07 Dec, 2010

1 commit

  • Instead of tying mesh activity to interface up,
    add join and leave commands for mesh. Since we
    must be backward compatible, let cfg80211 handle
    joining a mesh if a mesh ID was pre-configured
    when the device goes up.

    Note that this therefore must modify mac80211 as
    well since mac80211 needs to lose the logic to
    start the mesh on interface up.

    We now allow querying mesh parameters before the
    mesh is connected, which simply returns defaults.
    Setting them (internally renamed to "update") is
    only allowed while connected. Specify them with
    the new mesh join command instead where needed.

    In mac80211, beaconing must now also follow the
    mesh enabled/not enabled state, which is done
    by testing the mesh ID.

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

    Johannes Berg
     

22 Dec, 2009

1 commit

  • This patch provides infrastructure for machine translation of the
    regulatory rules database used by CRDA into a C data structure.
    It includes code for searching that database as an alternative
    to dynamic regulatory rules updates via CRDA. Most people should
    use CRDA instead of this infrastructure, but it provides a better
    alternative than the WIRELESS_OLD_REGULATORY infrastructure (which
    can now be removed).

    Signed-off-by: John W. Linville

    John W. Linville
     

08 Oct, 2009

2 commits

  • Signed-off-by: John W. Linville

    John W. Linville
     
  • Refactor wext to
    * split out iwpriv handling
    * split out iwspy handling
    * split out procfs support
    * allow cfg80211 to have wireless extensions compat code
    w/o CONFIG_WIRELESS_EXT

    After this, drivers need to
    - select WIRELESS_EXT - for wext support
    - select WEXT_PRIV - for iwpriv support
    - select WEXT_SPY - for iwspy support

    except cfg80211 -- which gets new hooks in wext-core.c
    and can then get wext handlers without CONFIG_WIRELESS_EXT.

    Wireless extensions procfs support is auto-selected
    based on PROC_FS and anything that requires the wext core
    (i.e. WIRELESS_EXT or CFG80211_WEXT).

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

    Johannes Berg
     

14 Aug, 2009

1 commit

  • Currently, there's a problem that affects regulatory
    enforcement and connection stability, in that it is
    possible to switch the channel while connected to a
    network or joined to an IBSS.

    The problem comes from the fact that we only validate
    the channel against the current interface's type, not
    against any other interface. Thus, you have any type
    of interface up, additionally bring up a monitor mode
    interface and switch the channel on the monitor. This
    will obviously also switch the channel on the other
    interface.

    The problem now is that if you do that while sending
    beacons for IBSS mode, you can switch to a disabled
    channel or a channel that doesn't allow beaconing.
    Combined with a managed mode interface connected to
    an AP instead of an IBSS interface, you can easily
    break the connection that way.

    To fix this, this patch validates any channel change
    with all available interfaces, and disallows such
    changes on secondary interfaces if another interface
    is connected to an AP or joined to an IBSS.

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

    Johannes Berg
     

11 Jul, 2009

2 commits

  • This adds code to make it possible to use the cfg80211
    connect() API with wireless extensions, and because the
    previous patch added emulation of that API with auth()
    and assoc(), by extension also supports wext on that.
    At the same time, removes code from mac80211 for wext,
    but doesn't yet clean up mac80211's mlme code more.

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

    Johannes Berg
     
  • This patch introduces the cfg80211 connect/disconnect API.
    The goal here is to run the AUTH and ASSOC steps in one call.
    This is needed for some fullmac cards that run both steps
    directly from the target, after the host driver sends a
    connect command.

    Additionally, all the new crypto parameters for connect()
    are now also valid for associate() -- although associate
    requires the IEs to be used, the information can be useful
    for drivers and should be given.

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

    Samuel Ortiz
     

21 May, 2009

1 commit


23 Apr, 2009

1 commit

  • This adds IBSS API along with (preliminary) wext handlers.
    The wext handlers can only do IBSS so you need to call them
    from your own wext handlers if the mode is IBSS.

    The nl80211 API requires
    * an SSID
    * a channel (frequency) for the case that a new IBSS
    has to be created

    It optionally supports
    * a flag to fix the channel
    * a fixed BSSID

    The cfg80211 code also takes care to leave the IBSS before
    the netdev is set down. If wireless extensions are used, it
    also caches values when the interface is down and instructs
    the driver to join when the interface is set up.

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

    Johannes Berg
     

28 Mar, 2009

2 commits

  • Add new nl80211 event notifications (and a new multicast group, "mlme")
    for informing user space about received and processed Authentication,
    (Re)Association Response, Deauthentication, and Disassociation frames in
    station and IBSS modes (i.e., MLME SAP interface primitives
    MLME-AUTHENTICATE.confirm, MLME-ASSOCIATE.confirm,
    MLME-REASSOCIATE.confirm, MLME-DEAUTHENTICATE.indicate, and
    MLME-DISASSOCIATE.indication). The event data is encapsulated as the 802.11
    management frame since we already have the frame in that format and it
    includes all the needed information.

    This is the initial step in providing MLME SAP interface for
    authentication and association with nl80211. In other words, kernel code
    will act as the MLME and a user space application can control it as the
    SME.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • The scan capability added to cfg80211/nl80211 introduced a
    dependency on nl80211 by cfg80211. We can thus no longer have
    just cfg80211 without nl80211. Specifically, cfg80211_scan_done()
    calls nl80211_send_scan_aborted() or nl80211_send_scan_done().

    Now we remove the option for user to select nl80211. It will always
    be compiled if user selects cfg80211.

    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Reinette Chatre
     

14 Feb, 2009

1 commit


13 Dec, 2008

1 commit


05 Dec, 2008

1 commit


22 Nov, 2008

1 commit


01 Nov, 2008

1 commit


01 Mar, 2008

1 commit

  • This patch creates new cfg80211 wiphy API for channel and bitrate
    registration and converts mac80211 and drivers to the new API. The
    old mac80211 API is completely ripped out. All drivers (except ath5k)
    are updated to the new API, in many cases I expect that optimisations
    can be done.

    Along with the regulatory code I've also ripped out the
    IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
    unnecessary if the hardware simply gives us whatever channels it wants
    to support and we then enable/disable them as required, which is pretty
    much required for travelling.

    Additionally, the patch adds proper "basic" rate handling for STA
    mode interface, AP mode interface will have to have new API added
    to allow userspace to set the basic rate set, currently it'll be
    empty... However, the basic rate handling will need to be moved to
    the BSS conf stuff.

    I do expect there to be bugs in this, especially wrt. transmit
    power handling where I'm basically clueless about how it should work.

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

    Johannes Berg
     

11 Oct, 2007

1 commit


13 Jul, 2007

1 commit

  • Generic code to walk through the fields in a radiotap header, accounting
    for nasties like extended "field present" bitfields and alignment rules

    Signed-off-by: Andy Green
    Signed-off-by: Jiri Benc
    Signed-off-by: John W. Linville

    Andy Green
     

27 Apr, 2007

1 commit


26 Apr, 2007

2 commits

  • This patch creates the core cfg80211 code along with some sysfs bits.
    This is a stripped down version to allow mac80211 to function, but
    doesn't include any configuration yet except for creating and removing
    virtual interfaces.

    This patch includes the nl80211 header file but it only contains the
    interface types which the cfg80211 interface for creating virtual
    interfaces relies on.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This patch refactors the wireless Kconfig all over and already
    introduces net/wireless/Kconfig with just the WEXT bit for now,
    the cfg80211 patch will add to that as well.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville
    Signed-off-by: David S. Miller

    Johannes Berg