An error occurred fetching the project authors.
  1. 08 Apr, 2019 2 commits
    • vamsi krishna's avatar
      nl80211/cfg80211: Specify band specific min RSSI thresholds with sched scan · 1e1b11b6
      vamsi krishna authored
      This commit adds the support to specify the RSSI thresholds per
      band for each match set. This enhances the current behavior which
      specifies a single rssi_threshold across all the bands by
      introducing the rssi_threshold_per_band. These per band rssi
      thresholds are referred through NL80211_BAND_* (enum nl80211_band)
      variables  as attribute types. Such attributes/values per each
      band are nested through NL80211_ATTR_SCHED_SCAN_MIN_RSSI.
      These band specific rssi thresholds shall take precedence over
      the current rssi_thold per match set.
      Drivers indicate this support through
      %NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD.
      These per band rssi attributes/values does not specify
      "default RSSI filter" as done by
      NL80211_SCHED_SCAN_MATCH_ATTR_RSSI to stay backward compatible.
      That said, these per band rssi values have to be specified for
      the corresponding matchset.
      Signed-off-by: default avatarvamsi krishna <vamsin@codeaurora.org>
      Signed-off-by: default avatarSrinivas Dasari <dasaris@codeaurora.org>
      [rebase on refactoring, add policy]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      1e1b11b6
    • Johannes Berg's avatar
      nl80211: reindent some sched scan code · d39f3b4f
      Johannes Berg authored
      The sched scan code here is really deep - avoid one level
      of indentation by short-circuiting the loop instead of
      putting everything into the if block.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d39f3b4f
  2. 22 Mar, 2019 1 commit
    • Johannes Berg's avatar
      genetlink: make policy common to family · 3b0f31f2
      Johannes Berg authored
      Since maxattr is common, the policy can't really differ sanely,
      so make it common as well.
      
      The only user that did in fact manage to make a non-common policy
      is taskstats, which has to be really careful about it (since it's
      still using a common maxattr!). This is no longer supported, but
      we can fake it using pre_doit.
      
      This reduces the size of e.g. nl80211.o (which has lots of commands):
      
         text	   data	    bss	    dec	    hex	filename
       398745	  14323	   2240	 415308	  6564c	net/wireless/nl80211.o (before)
       397913	  14331	   2240	 414484	  65314	net/wireless/nl80211.o (after)
      --------------------------------
         -832      +8       0    -824
      
      Which is obviously just 8 bytes for each command, and an added 8
      bytes for the new policy pointer. I'm not sure why the ops list is
      counted as .text though.
      
      Most of the code transformations were done using the following spatch:
          @ops@
          identifier OPS;
          expression POLICY;
          @@
          struct genl_ops OPS[] = {
          ...,
           {
          -	.policy = POLICY,
           },
          ...
          };
      
          @@
          identifier ops.OPS;
          expression ops.POLICY;
          identifier fam;
          expression M;
          @@
          struct genl_family fam = {
                  .ops = OPS,
                  .maxattr = M,
          +       .policy = POLICY,
                  ...
          };
      
      This also gets rid of devlink_nl_cmd_region_read_dumpit() accessing
      the cb->data as ops, which we want to change in a later genl patch.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b0f31f2
  3. 22 Feb, 2019 2 commits
  4. 11 Feb, 2019 2 commits
  5. 08 Feb, 2019 1 commit
  6. 01 Feb, 2019 1 commit
    • Johannes Berg's avatar
      netlink: reduce NLA_POLICY_NESTED{,_ARRAY} arguments · 23323289
      Johannes Berg authored
      In typical cases, there's no need to pass both the maxattr
      and the policy array pointer, as the maxattr should just be
      ARRAY_SIZE(policy) - 1. Therefore, to be less error prone,
      just remove the maxattr argument from the default macros
      and deduce the size accordingly.
      
      Leave the original macros with a leading underscore to use
      here and in case somebody needs to pass a policy pointer
      where the policy isn't declared in the same place and thus
      ARRAY_SIZE() cannot be used.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      23323289
  7. 25 Jan, 2019 4 commits
    • Liangwei Dong's avatar
      nl80211: Allow set/del pmksa operations for AP · 6c900360
      Liangwei Dong authored
      Host drivers may offload authentication to the user space
      through the commit ("cfg80211: Authentication offload to
      user space in AP mode").
      
      This interface can be used to implement SAE by having the
      userspace do authentication/PMKID key derivation and driver
      handle the association.
      
      A step ahead, this interface can get further optimized if the
      PMKID is passed to the host driver and also have it respond to
      the association request by the STA on a valid PMKID.
      
      This commit enables the userspace to pass the PMKID to the host
      drivers through the set/del pmksa operations in AP mode.
      
      Set/Del pmksa is now restricted to STA/P2P client mode only and
      thus the drivers might not expect them in any other(AP) mode.
      
      This commit also introduces a feature flag
      NL80211_EXT_FEATURE_AP_PMKSA_CACHING (johannes: renamed) to
      maintain the backward compatibility of such an expectation by
      the host drivers. These operations are allowed in AP mode only
      when the drivers advertize the capability through this flag.
      Signed-off-by: default avatarLiangwei Dong <liangwei@codeaurora.org>
      Signed-off-by: default avatarSrinivas Dasari <dasaris@codeaurora.org>
      [rename flag to NL80211_EXT_FEATURE_AP_PMKSA_CACHING]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6c900360
    • Srinivas Dasari's avatar
      cfg80211: Authentication offload to user space in AP mode · fe494370
      Srinivas Dasari authored
      commit 40cbfa90 ("cfg80211/nl80211: Optional authentication
      offload to userspace")' introduced authentication offload to user
      space by the host drivers in station mode. This commit extends
      the same for the AP mode too.
      
      Extend NL80211_ATTR_EXTERNAL_AUTH_SUPPORT to also claim the
      support of external authentication from the user space in AP mode.
      A new flag parameter is introduced in cfg80211_ap_settings to
      intend the same while "start ap".
      
      Host driver to use NL80211_CMD_FRAME interface to transmit and
      receive the authentication frames to / from the user space.
      
      Host driver to indicate the flag NL80211_RXMGMT_FLAG_EXTERNAL_AUTH
      while sending the authentication frame to the user space. This
      intends to the user space that the driver wishes it to process
      the authentication frame for certain protocols, though it had
      initially advertised the support for SME functionality.
      
      User space shall accordingly do the authentication and indicate
      its final status through the command NL80211_CMD_EXTERNAL_AUTH.
      Allow the command even if userspace doesn't include the attribute
      NL80211_ATTR_SSID for AP interface.
      
      Host driver shall continue with the association sequence and
      indicate the STA connection status through cfg80211_new_sta.
      
      To facilitate the host drivers in AP mode for matching the pmkid
      by the stations during the association, NL80211_CMD_EXTERNAL_AUTH
      is also enhanced to include the pmkid to drivers after
      the authentication.
      This pmkid can also be used in the STA mode to include in the
      association request.
      
      Also modify nl80211_external_auth to not mandate SSID in AP mode.
      Signed-off-by: default avatarSrinivas Dasari <dasaris@codeaurora.org>
      [remove useless nla_get_flag() usage]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      fe494370
    • Veerendranath Jakkam's avatar
      cfg80211: Allow drivers to advertise supported AKM suites · ab4dfa20
      Veerendranath Jakkam authored
      There was no such capability advertisement from the driver and thus the
      current user space has to assume the driver to support all the AKMs. While
      that may be the case with some drivers (e.g., mac80211-based ones), there
      are cfg80211-based drivers that implement SME and have constraints on
      which AKMs can be supported (e.g., such drivers may need an update to
      support SAE AKM using NL80211_CMD_EXTERNAL_AUTH). Allow such drivers to
      advertise the exact set of supported AKMs so that user space tools can
      determine what network profile options should be allowed to be configured.
      Signed-off-by: default avatarVeerendranath Jakkam <vjakkam@codeaurora.org>
      [pmsr data might be big, start a new netlink message section]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ab4dfa20
    • Johannes Berg's avatar
      nl80211: fix NLA_POLICY_NESTED() arguments · a8b5c6d6
      Johannes Berg authored
      syzbot reported an out-of-bounds read when passing certain
      malformed messages into nl80211. The specific place where
      this happened isn't interesting, the problem is that nested
      policy parsing was referring to the wrong maximum attribute
      and thus the policy wasn't long enough.
      
      Fix this by referring to the correct attribute. Since this
      is really not necessary, I'll come up with a separate patch
      to just pass the policy instead of both, in the common case
      we can infer the maxattr from the size of the policy array.
      
      Reported-by: syzbot+4157b036c5f4713b1f2f@syzkaller.appspotmail.com
      Cc: stable@vger.kernel.org
      Fixes: 9bb7e0f2 ("cfg80211: add peer measurement with FTM initiator API")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a8b5c6d6
  8. 19 Jan, 2019 3 commits
  9. 19 Dec, 2018 1 commit
  10. 18 Dec, 2018 2 commits
    • Sriram R's avatar
      nl80211: Add support to notify radar event info received from STA · 30c63115
      Sriram R authored
      Currently radar detection and corresponding channel switch is handled
      at the AP device. STA ignores these detected radar events since the
      radar signal can be seen mostly by the AP as well. But in scenarios where
      a radar signal is seen only at STA, notifying this event to the AP which
      can trigger a channel switch can be useful.
      Stations can report such radar events autonomously through Spectrum
      management (Measurement Report) action frame to its AP. The userspace on
      processing the report can notify the kernel with the use of the added
      NL80211_CMD_NOTIFY_RADAR to indicate the detected event and inturn adding
      the reported channel to NOL.
      Signed-off-by: default avatarSriram R <srirrama@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      30c63115
    • Luca Coelho's avatar
      cfg80211: add some missing fall through annotations · 925b5978
      Luca Coelho authored
      There are talks about enabling -Wimplicit-fallthrough warnings in the
      mainline and it is already enabled in linux-next.  Add all the
      missing annotations to prevent warnings when this happens.
      
      And in one case, remove the extra text from the annotation so that the
      compiler recognizes it.
      Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      925b5978
  11. 09 Nov, 2018 6 commits
    • Bob Copeland's avatar
      {nl,mac}80211: add rssi to mesh candidates · ecbc12ad
      Bob Copeland authored
      When peering is in userspace, some implementations may want to control
      which peers are accepted based on RSSI in addition to the information
      elements being sent today.  Add signal level so that info is available
      to clients.
      Signed-off-by: default avatarBob Copeland <bobcopeland@fb.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ecbc12ad
    • Bob Copeland's avatar
      {nl,mac}80211: add dot11MeshConnectedToMeshGate to meshconf · 01d66fbd
      Bob Copeland authored
      When userspace is controlling mesh routing, it may have better
      knowledge about whether a mesh STA is connected to a mesh
      gate than the kernel mpath table.  Add dot11MeshConnectedToMeshGate
      to the mesh config so that such applications can explicitly
      signal that a mesh STA is connected to a gate, which will then
      be advertised in the beacon.
      Signed-off-by: default avatarBob Copeland <bobcopeland@fb.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      01d66fbd
    • Bob Copeland's avatar
      {nl,mac}80211: report gate connectivity in station info · dbdaee7a
      Bob Copeland authored
      Capture the current state of gate connectivity from the mesh
      formation field in mesh config whenever we receive a beacon,
      and report that via GET_STATION.  This allows applications
      doing mesh peering in userspace to make peering decisions
      based on peers' current upstream connectivity.
      Signed-off-by: default avatarBob Copeland <bobcopeland@fb.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      dbdaee7a
    • Andrew Zaborowski's avatar
      nl80211: Emit a SET_INTERFACE on iftype change · 3d1a5bbf
      Andrew Zaborowski authored
      Let userspace learn about iftype changes by sending a notification
      when handling the NL80211_CMD_SET_INTERFACE command.  There seems
      to be no other place where the iftype can change: nl80211_set_interface
      is the only caller of cfg80211_change_iface which is the only caller of
      ops->change_virtual_intf.
      Signed-off-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3d1a5bbf
    • Johannes Berg's avatar
      cfg80211: add peer measurement with FTM initiator API · 9bb7e0f2
      Johannes Berg authored
      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: default avatarJohannes Berg <johannes.berg@intel.com>
      9bb7e0f2
    • Johannes Berg's avatar
      cfg80211/mac80211: fix FTM settings across CSA · c177db2d
      Johannes Berg authored
      When FTM is enabled, doing a CSA will unexpectedly lose it since
      the value of ftm_responder may be initialized to 0 instead of -1,
      so fix that.
      
      Fixes: 81e54d08 ("cfg80211: support FTM responder configuration/statistics")
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c177db2d
  12. 12 Oct, 2018 1 commit
    • Ankita Bajaj's avatar
      nl80211: Add per peer statistics to compute FCS error rate · 0d4e14a3
      Ankita Bajaj authored
      Add support for drivers to report the total number of MPDUs received
      and the number of MPDUs received with an FCS error from a specific
      peer. These counters will be incremented only when the TA of the
      frame matches the MAC address of the peer irrespective of FCS
      error.
      
      It should be noted that the TA field in the frame might be corrupted
      when there is an FCS error and TA matching logic would fail in such
      cases. Hence, FCS error counter might not be fully accurate, but it can
      provide help in detecting bad RX links in significant number of cases.
      This FCS error counter without full accuracy can be used, e.g., to
      trigger a kick-out of a connected client with a bad link in AP mode to
      force such a client to roam to another AP.
      Signed-off-by: default avatarAnkita Bajaj <bankita@codeaurora.org>
      Signed-off-by: default avatarJouni Malinen <jouni@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0d4e14a3
  13. 11 Oct, 2018 2 commits
  14. 02 Oct, 2018 8 commits
  15. 27 Sep, 2018 1 commit
  16. 26 Sep, 2018 1 commit
  17. 05 Sep, 2018 1 commit
  18. 30 Aug, 2018 1 commit