diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-10-08 09:48:37 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-10-09 11:30:08 +0200 |
commit | 6d027bcc8a4e2518ae825b0ff3dd069ab1abfe96 (patch) | |
tree | 798d3bfaf90f5f653905da6cb3be864f2a7a0443 /net/mac80211/driver-ops.h | |
parent | e9a21949b79414dda42a017855b288901c07e613 (diff) | |
download | op-kernel-dev-6d027bcc8a4e2518ae825b0ff3dd069ab1abfe96.zip op-kernel-dev-6d027bcc8a4e2518ae825b0ff3dd069ab1abfe96.tar.gz |
mac80211: add pre_channel_switch driver operation
Some drivers may need to prepare for a channel switch also when it is
initiated from the remote side (eg. station, P2P client). To make
this possible, add a generic callback that can be called for all
interface types.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 196d48c..5522672 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1196,6 +1196,24 @@ drv_channel_switch_beacon(struct ieee80211_sub_if_data *sdata, } } +static inline int +drv_pre_channel_switch(struct ieee80211_sub_if_data *sdata, + struct ieee80211_channel_switch *ch_switch) +{ + struct ieee80211_local *local = sdata->local; + int ret = 0; + + if (!check_sdata_in_driver(sdata)) + return -EIO; + + trace_drv_pre_channel_switch(local, sdata, ch_switch); + if (local->ops->pre_channel_switch) + ret = local->ops->pre_channel_switch(&local->hw, &sdata->vif, + ch_switch); + trace_drv_return_int(local, ret); + return ret; +} + static inline int drv_join_ibss(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata) { |