OSDN Git Service

mac80211_hwsim: add PMSR capability support
authorJaewan Kim <jaewan@google.com>
Wed, 22 Mar 2023 13:16:33 +0000 (13:16 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 Mar 2023 10:45:51 +0000 (11:45 +0100)
commit92d13386ec55816b3bdd6d578e59a71226e12806
treeaed89777f9b4ac38a0550cdfc1ba7e72abd48774
parent68b9bea267bfc1259e195dcac1bf69db0c0c28da
mac80211_hwsim: add PMSR capability support

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: Jaewan Kim <jaewan@google.com>
Link: https://lore.kernel.org/r/20230322131637.2633968-2-jaewan@google.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim.c
drivers/net/wireless/virtual/mac80211_hwsim.h