1. 30 Mar, 2023 33 commits
  2. 24 Mar, 2023 7 commits
    • Jaewan Kim's avatar
      mac80211_hwsim: add PMSR report support via virtio · 2af3b2a6
      Jaewan Kim authored
      PMSR (a.k.a. peer measurement) is generalized measurement between two
      devices with Wi-Fi support. And currently FTM (a.k.a. fine time measurement
      or flight time measurement) is the one and only measurement.
      
      Add the necessary functionality to allow mac80211_hwsim to report PMSR
      result. The result would come from the wmediumd, where other Wi-Fi
      devices' information are kept. mac80211_hwsim only need to deliver the
      result to the userspace.
      
      In detail, add new mac80211_hwsim attributes HWSIM_CMD_REPORT_PMSR, and
      HWSIM_ATTR_PMSR_RESULT. When mac80211_hwsim receives the PMSR result with
      command HWSIM_CMD_REPORT_PMSR and detail with attribute
      HWSIM_ATTR_PMSR_RESULT, received data is parsed to cfg80211_pmsr_result and
      resent to the userspace by cfg80211_pmsr_report().
      
      To help receive the details of PMSR result, hwsim_rate_info_attributes is
      added to receive rate_info without complex bitrate calculation. (i.e. send
      rate_info without adding inverse of nl80211_put_sta_rate()).
      Signed-off-by: default avatarJaewan Kim <jaewan@google.com>
      Link: https://lore.kernel.org/r/20230322131637.2633968-6-jaewan@google.com
      [fix uninitialized return value when there are no reports]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      2af3b2a6
    • Jaewan Kim's avatar
      mac80211_hwsim: add PMSR abort support via virtio · 8ba1da95
      Jaewan Kim authored
      PMSR (a.k.a. peer measurement) is generalized measurement between two
      devices with Wi-Fi support. And currently FTM (a.k.a. fine time
      measurement or flight time measurement) is the one and only measurement.
      
      Add necessary functionalities for mac80211_hwsim to abort previous PMSR
      request. The abortion request is sent to the wmedium where the PMSR request
      is actually handled.
      
      In detail, add new mac80211_hwsim command HWSIM_CMD_ABORT_PMSR. When
      mac80211_hwsim receives the PMSR abortion request via
      ieee80211_ops.abort_pmsr, the received cfg80211_pmsr_request is resent to
      the wmediumd with command HWSIM_CMD_ABORT_PMSR and attribute
      HWSIM_ATTR_PMSR_REQUEST. The attribute is formatted as the same way as
      nl80211_pmsr_start() expects.
      Signed-off-by: default avatarJaewan Kim <jaewan@google.com>
      Link: https://lore.kernel.org/r/20230322131637.2633968-5-jaewan@google.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8ba1da95
    • Jaewan Kim's avatar
      mac80211_hwsim: add PMSR request support via virtio · 5530c04c
      Jaewan Kim authored
      PMSR (a.k.a. peer measurement) is generalized measurement between two
      Wi-Fi devices. And currently FTM (a.k.a. fine time measurement or flight
      time measurement) is the one and only measurement. FTM is measured by
      RTT (a.k.a. round trip time) of packets between two Wi-Fi devices.
      
      Add necessary functionalities for mac80211_hwsim to start PMSR request by
      passthrough the request to wmediumd via virtio. mac80211_hwsim can't
      measure RTT for real because mac80211_hwsim the software simulator and
      packets are sent almost immediately for real. This change expect wmediumd
      to have all the location information of devices, so passthrough requests
      to wmediumd.
      
      In detail, add new mac80211_hwsim command HWSIM_CMD_ABORT_PMSR. When
      mac80211_hwsim receives the PMSR start request via
      ieee80211_ops.start_pmsr, the received cfg80211_pmsr_request is resent to
      the wmediumd with command HWSIM_CMD_START_PMSR and attribute
      HWSIM_ATTR_PMSR_REQUEST. The attribute is formatted as the same way as
      nl80211_pmsr_start() expects.
      Signed-off-by: default avatarJaewan Kim <jaewan@google.com>
      Link: https://lore.kernel.org/r/20230322131637.2633968-4-jaewan@google.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5530c04c
    • Jaewan Kim's avatar
      wifi: nl80211: make nl80211_send_chandef non-static · 5097f844
      Jaewan Kim authored
      Expose nl80211_send_chandef functionality for mac80211_hwsim or vendor
      netlink can use it where needed.
      Signed-off-by: default avatarJaewan Kim <jaewan@google.com>
      Reviewed-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
      Link: https://lore.kernel.org/r/20230322131637.2633968-3-jaewan@google.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5097f844
    • Jaewan Kim's avatar
      mac80211_hwsim: add PMSR capability support · 92d13386
      Jaewan Kim authored
      PMSR (a.k.a. peer measurement) is generalized measurement between two
      Wi-Fi devices. And currently FTM (a.k.a. fine time measurement or flight
      time measurement) is the one and only measurement. FTM is measured by
      RTT (a.k.a. round trip time) of packets between two Wi-Fi devices.
      
      Add necessary functionality to allow mac80211_hwsim to be configured with
      PMSR capability. The capability is mandatory to accept incoming PMSR
      request because nl80211_pmsr_start() ignores incoming the request without
      the PMSR capability.
      
      In detail, add new mac80211_hwsim attribute HWSIM_ATTR_PMSR_SUPPORT.
      HWSIM_ATTR_PMSR_SUPPORT is used to set PMSR capability when creating a new
      radio. To send extra capability details, HWSIM_ATTR_PMSR_SUPPORT can have
      nested PMSR capability attributes defined in the nl80211.h. Data format is
      the same as cfg80211_pmsr_capabilities.
      
      If HWSIM_ATTR_PMSR_SUPPORT is specified, mac80211_hwsim builds
      cfg80211_pmsr_capabilities and sets wiphy.pmsr_capa.
      Signed-off-by: default avatarJaewan Kim <jaewan@google.com>
      Link: https://lore.kernel.org/r/20230322131637.2633968-2-jaewan@google.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      92d13386
    • Aloka Dixit's avatar
      mac80211: support RNR for EMA AP · 68b9bea2
      Aloka Dixit authored
      Generate EMA beacons, each including MBSSID and RNR elements at a given
      index. If number of stored RNR elements is more than the number of
      MBSSID elements then add those in every EMA beacon.
      Signed-off-by: default avatarAloka Dixit <quic_alokad@quicinc.com>
      Link: https://lore.kernel.org/r/20230323113801.6903-3-quic_alokad@quicinc.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      68b9bea2
    • Aloka Dixit's avatar
      cfg80211: support RNR for EMA AP · dbbb27e1
      Aloka Dixit authored
      As per IEEE Std 802.11ax-2021, 11.1.3.8.3 Discovery of a nontransmitted
      BSSID profile, an EMA AP that transmits a Beacon frame carrying a partial
      list of nontransmitted BSSID profiles should include in the frame
      a Reduced Neighbor Report element carrying information for at least the
      nontransmitted BSSIDs that are not present in the Multiple BSSID element
      carried in that frame.
      Add new nested attribute NL80211_ATTR_EMA_RNR_ELEMS to support the above.
      Number of RNR elements must be more than or equal to the number of
      MBSSID elements. This attribute can be used only when EMA is enabled.
      Userspace is responsible for splitting the RNR into multiple elements such
      that each element excludes the non-transmitting profiles already included
      in the MBSSID element (%NL80211_ATTR_MBSSID_ELEMS) at the same index.
      Each EMA beacon will be generated by adding MBSSID and RNR elements
      at the same index. If the userspace provides more RNR elements than the
      number of MBSSID elements then these will be added in every EMA beacon.
      Signed-off-by: default avatarAloka Dixit <quic_alokad@quicinc.com>
      Link: https://lore.kernel.org/r/20230323113801.6903-2-quic_alokad@quicinc.com
      [Johannes: validate elements]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      dbbb27e1