1. 27 9月, 2021 1 次提交
  2. 18 8月, 2021 1 次提交
  3. 17 8月, 2021 1 次提交
  4. 23 6月, 2021 1 次提交
  5. 11 12月, 2020 2 次提交
  6. 11 11月, 2020 1 次提交
  7. 31 7月, 2020 1 次提交
    • L
      cfg80211/mac80211: add mesh_param "mesh_nolearn" to skip path discovery · e3718a61
      Linus Lüssing 提交于
      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 <sven@narfation.org>
      Cc: Simon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: NLinus Lüssing <ll@simonwunderlich.de>
      Link: https://lore.kernel.org/r/20200617073034.26149-1-linus.luessing@c0d3.blue
      [fix nl80211 policy to range 0/1 only]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e3718a61
  8. 27 5月, 2020 2 次提交
  9. 24 4月, 2020 2 次提交
  10. 24 2月, 2020 4 次提交
  11. 07 2月, 2020 1 次提交
    • M
      nl80211: add src and dst addr attributes for control port tx/rx · 8c3ed7aa
      Markus Theil 提交于
      When using control port over nl80211 in AP mode with
      pre-authentication, APs need to forward frames to other
      APs defined by their MAC address. Before this patch,
      pre-auth frames reaching user space over nl80211 control
      port  have no longer any information about the dest attached,
      which can be used for forwarding to a controller or injecting
      the frame back to a ethernet interface over a AF_PACKET
      socket.
      Analog problems exist, when forwarding pre-auth frames from
      AP -> STA.
      
      This patch therefore adds the NL80211_ATTR_DST_MAC and
      NL80211_ATTR_SRC_MAC attributes to provide more context
      information when forwarding.
      The respective arguments are optional on tx and included on rx.
      Therefore unaware existing software is not affected.
      
      Software which wants to detect this feature, can do so
      by checking against:
        NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS
      Signed-off-by: NMarkus Theil <markus.theil@tu-ilmenau.de>
      Link: https://lore.kernel.org/r/20200115125522.3755-1-markus.theil@tu-ilmenau.de
      [split into separate cfg80211/mac80211 patches]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8c3ed7aa
  12. 15 1月, 2020 1 次提交
  13. 27 11月, 2019 1 次提交
    • P
      ftrace: Rework event_create_dir() · 04ae87a5
      Peter Zijlstra 提交于
      Rework event_create_dir() to use an array of static data instead of
      function pointers where possible.
      
      The problem is that it would call the function pointer on module load
      before parse_args(), possibly even before jump_labels were initialized.
      Luckily the generated functions don't use jump_labels but it still seems
      fragile. It also gets in the way of changing when we make the module map
      executable.
      
      The generated function are basically calling trace_define_field() with a
      bunch of static arguments. So instead of a function, capture these
      arguments in a static array, avoiding the function call.
      
      Now there are a number of cases where the fields are dynamic (syscall
      arguments, kprobes and uprobes), in which case a static array does not
      work, for these we preserve the function call. Luckily all these cases
      are not related to modules and so we can retain the function call for
      them.
      
      Also fix up all broken tracepoint definitions that now generate a
      compile error.
      Tested-by: NAlexei Starovoitov <ast@kernel.org>
      Tested-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/20191111132458.342979914@infradead.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      04ae87a5
  14. 21 8月, 2019 1 次提交
  15. 14 6月, 2019 1 次提交
    • J
      nl80211: send event when CMD_FRAME duration expires · 1c38c7f2
      James Prestwood 提交于
      cfg80211_remain_on_channel_expired is used to notify userspace when
      the remain on channel duration expired by sending an event. There is
      no such equivalent to CMD_FRAME, where if offchannel and a duration
      is provided, the card will go offchannel for that duration. Currently
      there is no way for userspace to tell when that duration expired
      apart from setting an independent timeout. This timeout is quite
      erroneous as the kernel may not immediately send out the frame
      because of scheduling or work queue delays. In testing, it was found
      this timeout had to be quite large to accomidate any potential delays.
      
      A better solution is to have the kernel send an event when this
      duration has expired. There is already NL80211_CMD_FRAME_WAIT_CANCEL
      which can be used to cancel a NL80211_CMD_FRAME offchannel. Using this
      command matches perfectly to how NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL
      works, where its both used to cancel and notify if the duration has
      expired.
      Signed-off-by: NJames Prestwood <james.prestwood@linux.intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1c38c7f2
  16. 26 4月, 2019 2 次提交
  17. 08 4月, 2019 1 次提交
    • S
      cfg80211/nl80211: Offload OWE processing to user space in AP mode · cb74e977
      Sunil Dutt 提交于
      This interface allows the host driver to offload OWE processing
      to user space. This intends to support OWE (Opportunistic Wireless
      Encryption) AKM by the drivers that implement SME but rely on the
      user space for the cryptographic/OWE processing in AP mode. Such
      drivers are not capable of processing/deriving the DH IE.
      
      A new NL80211 command - NL80211_CMD_UPDATE_OWE_INFO is introduced
      to send the request/event between the host driver and user space.
      
      Driver shall provide the OWE info (MAC address and DH IE) of
      the peer to user space for cryptographic processing of the DH IE
      through the event. Accordingly, the user space shall update the
      OWE info/DH IE to the driver.
      
      Following is the sequence in AP mode for OWE authentication.
      
      Driver passes the OWE info obtained from the peer in the
      Association Request to the user space through the event
      cfg80211_update_owe_info_event. User space shall process the
      OWE info received and generate new OWE info. This OWE info is
      passed to the driver through NL80211_CMD_UPDATE_OWE_INFO
      request. Driver eventually uses this OWE info to send the
      Association Response to the peer.
      
      This OWE info in the command interface carries the IEs that include
      PMKID of the peer if the PMKSA is still valid or an updated DH IE
      for generating a new PMKSA with the peer.
      Signed-off-by: NLiangwei Dong <liangwei@codeaurora.org>
      Signed-off-by: NSunil Dutt <usdutt@codeaurora.org>
      Signed-off-by: NSrinivas Dasari <dasaris@codeaurora.org>
      [remove policy initialization - no longer exists]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      cb74e977
  18. 09 11月, 2018 2 次提交
    • J
      cfg80211: add peer measurement with FTM initiator API · 9bb7e0f2
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      9bb7e0f2
    • J
      cfg80211: tracing: avoid 'idx' variable · aaaa10e0
      Johannes Berg 提交于
      This variable shadows something that gets generated inside
      the tracing macros, which causes sparse to warn. Avoid it
      so sparse output is more readable, even if it doesn't seem
      to cause any trouble.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      aaaa10e0
  19. 02 10月, 2018 3 次提交
  20. 28 8月, 2018 1 次提交
  21. 06 7月, 2018 1 次提交
    • D
      nl80211/mac80211: allow non-linear skb in rx_control_port · a948f713
      Denis Kenzior 提交于
      The current implementation of cfg80211_rx_control_port assumed that the
      caller could provide a contiguous region of memory for the control port
      frame to be sent up to userspace.  Unfortunately, many drivers produce
      non-linear skbs, especially for data frames.  This resulted in userspace
      getting notified of control port frames with correct metadata (from
      address, port, etc) yet garbage / nonsense contents, resulting in bad
      handshakes, disconnections, etc.
      
      mac80211 linearizes skbs containing management frames.  But it didn't
      seem worthwhile to do this for control port frames.  Thus the signature
      of cfg80211_rx_control_port was changed to take the skb directly.
      nl80211 then takes care of obtaining control port frame data directly
      from the (linear | non-linear) skb.
      
      The caller is still responsible for freeing the skb,
      cfg80211_rx_control_port does not take ownership of it.
      
      Fixes: 6a671a50 ("nl80211: Add CMD_CONTROL_PORT_FRAME API")
      Signed-off-by: NDenis Kenzior <denkenz@gmail.com>
      [fix some kernel-doc formatting, add fixes tag]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a948f713
  22. 08 5月, 2018 1 次提交
  23. 29 3月, 2018 3 次提交
    • D
      nl80211: Implement TX of control port frames · 2576a9ac
      Denis Kenzior 提交于
      This commit implements the TX side of NL80211_CMD_CONTROL_PORT_FRAME.
      Userspace provides the raw EAPoL frame using NL80211_ATTR_FRAME.
      Userspace should also provide the destination address and the protocol
      type to use when sending the frame.  This is used to implement TX of
      Pre-authentication frames.  If CONTROL_PORT_ETHERTYPE_NO_ENCRYPT is
      specified, then the driver will be asked not to encrypt the outgoing
      frame.
      
      A new EXT_FEATURE flag is introduced so that nl80211 code can check
      whether a given wiphy has capability to pass EAPoL frames over nl80211.
      Signed-off-by: NDenis Kenzior <denkenz@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2576a9ac
    • D
      nl80211: Add CMD_CONTROL_PORT_FRAME API · 6a671a50
      Denis Kenzior 提交于
      This commit also adds cfg80211_rx_control_port function.  This is used
      to generate a CMD_CONTROL_PORT_FRAME event out to userspace.  The
      conn_owner_nlportid is used as the unicast destination.  This means that
      userspace must specify NL80211_ATTR_SOCKET_OWNER flag if control port
      over nl80211 routing is requested in NL80211_CMD_CONNECT,
      NL80211_CMD_ASSOCIATE, NL80211_CMD_START_AP or IBSS/mesh join.
      Signed-off-by: NDenis Kenzior <denkenz@gmail.com>
      [johannes: fix return value of cfg80211_rx_control_port()]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6a671a50
    • A
      treewide: remove large struct-pass-by-value from tracepoint arguments · c1055475
      Alexei Starovoitov 提交于
      - fix trace_hfi1_ctxt_info() to pass large struct by reference instead of by value
      - convert 'type array[]' tracepoint arguments into 'type *array',
        since compiler will warn that sizeof('type array[]') == sizeof('type *array')
        and later should be used instead
      
      The CAST_TO_U64 macro in the later patch will enforce that tracepoint
      arguments can only be integers, pointers, or less than 8 byte structures.
      Larger structures should be passed by reference.
      Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      c1055475
  24. 31 1月, 2018 1 次提交
    • S
      cfg80211/nl80211: Optional authentication offload to userspace · 40cbfa90
      Srinivas Dasari 提交于
      This interface allows the host driver to offload the authentication to
      user space. This is exclusively defined for host drivers that do not
      define separate commands for authentication and association, but rely on
      userspace SME (e.g., in wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME
      case) for the authentication to happen. This can be used to implement
      SAE without full implementation in the kernel/firmware while still being
      able to use NL80211_CMD_CONNECT with driver-based BSS selection.
      
      Host driver sends NL80211_CMD_EXTERNAL_AUTH event to start/abort
      authentication to the port on which connect is triggered and status
      of authentication is further indicated by user space to host
      driver through the same command response interface.
      
      User space entities advertise this capability through the
      NL80211_ATTR_EXTERNAL_AUTH_SUPP flag in the NL80211_CMD_CONNECT request.
      Host drivers shall look at this capability to offload the authentication.
      Signed-off-by: NSrinivas Dasari <dasaris@qti.qualcomm.com>
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      [add socket connection ownership check]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      40cbfa90
  25. 11 12月, 2017 1 次提交
  26. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      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 <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  27. 13 6月, 2017 1 次提交
  28. 28 4月, 2017 1 次提交