diff options
author | Andrew Zaborowski <andrew.zaborowski@intel.com> | 2017-02-10 12:02:31 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-06 11:21:38 +0300 |
commit | 4a4b8169501b18c3450ac735a7e277b24886a651 (patch) | |
tree | 0d2f2eadbb3894c25642935db9c497ae0a3ec377 /net/wireless/core.h | |
parent | 3eb0928fc3e4b4702462164b399acddb7f0f09fd (diff) | |
download | linux-4a4b8169501b18c3450ac735a7e277b24886a651.tar.xz |
cfg80211: Accept multiple RSSI thresholds for CQM
Change the SET CQM command's RSSI threshold attribute to accept any
number of thresholds as a sorted array. The API should be backwards
compatible so that if one s32 threshold value is passed, the old
mechanism is enabled. The netlink event generated is the same in both
cases.
cfg80211 handles an arbitrary number of RSSI thresholds but drivers have
to provide a method (set_cqm_rssi_range_config) that configures a range
set by a high and a low value. Drivers have to call back when the RSSI
goes out of that range and there's no additional event for each time the
range is reconfigured as there was with the current one-threshold API.
This method doesn't have a hysteresis parameter because there's no
benefit to the cfg80211 code from having the hysteresis be handled by
hardware/driver in terms of the number of wakeups. At the same time
it would likely be less consistent between drivers if offloaded or
done in the drivers.
Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.h')
-rw-r--r-- | net/wireless/core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/wireless/core.h b/net/wireless/core.h index 58ca206982fe..efa690a7ef8d 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h @@ -272,6 +272,13 @@ struct cfg80211_iface_destroy { u32 nlportid; }; +struct cfg80211_cqm_config { + u32 rssi_hyst; + s32 last_rssi_event_value; + int n_rssi_thresholds; + s32 rssi_thresholds[0]; +}; + void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev); /* free object */ @@ -512,4 +519,6 @@ void cfg80211_stop_nan(struct cfg80211_registered_device *rdev, #define CFG80211_DEV_WARN_ON(cond) ({bool __r = (cond); __r; }) #endif +void cfg80211_cqm_config_free(struct wireless_dev *wdev); + #endif /* __NET_WIRELESS_CORE_H */ |