diff options
author | Johannes Berg <johannes.berg@intel.com> | 2018-10-16 11:24:47 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-11-09 11:20:34 +0100 |
commit | cee7013be9b71082c7ea63c46850157aaa1bf4b1 (patch) | |
tree | ecc0cd1431ff3b615d1d6d3f0500b0e7f36484c2 /net/mac80211/cfg.c | |
parent | 9bb7e0f24e7e7d00daa1219b14539e2e602649b2 (diff) | |
download | linux-cee7013be9b71082c7ea63c46850157aaa1bf4b1.tar.gz linux-cee7013be9b71082c7ea63c46850157aaa1bf4b1.tar.bz2 linux-cee7013be9b71082c7ea63c46850157aaa1bf4b1.zip |
mac80211: allow drivers to use peer measurement API
There's nothing much for mac80211 to do, so only pass through
the requests with minimal checks and tracing. The driver must
call cfg80211's results APIs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 51622333d460..2fccccfbbf4d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3849,6 +3849,26 @@ ieee80211_get_ftm_responder_stats(struct wiphy *wiphy, return drv_get_ftm_responder_stats(local, sdata, ftm_stats); } +static int +ieee80211_start_pmsr(struct wiphy *wiphy, struct wireless_dev *dev, + struct cfg80211_pmsr_request *request) +{ + struct ieee80211_local *local = wiphy_priv(wiphy); + struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(dev); + + return drv_start_pmsr(local, sdata, request); +} + +static void +ieee80211_abort_pmsr(struct wiphy *wiphy, struct wireless_dev *dev, + struct cfg80211_pmsr_request *request) +{ + struct ieee80211_local *local = wiphy_priv(wiphy); + struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(dev); + + return drv_abort_pmsr(local, sdata, request); +} + const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface, @@ -3944,4 +3964,6 @@ const struct cfg80211_ops mac80211_config_ops = { .tx_control_port = ieee80211_tx_control_port, .get_txq_stats = ieee80211_get_txq_stats, .get_ftm_responder_stats = ieee80211_get_ftm_responder_stats, + .start_pmsr = ieee80211_start_pmsr, + .abort_pmsr = ieee80211_abort_pmsr, }; |