diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-12-18 11:20:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-01-05 16:07:12 -0500 |
commit | 21f83589644bb2ed98079bf1e2154c8e70ca6a6c (patch) | |
tree | ede391a8c788a43f7c4ea3baa3367e020d45f179 /net/mac80211/driver-ops.h | |
parent | c96e96354a6c9456cdf1f150eca504e2ea35301e (diff) |
mac80211: implement hardware offload for remain-on-channel
This allows drivers to support remain-on-channel
offload if they implement smarter timing or need
to use a device implementation like iwlwifi.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r-- | net/mac80211/driver-ops.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index af0c4398cceb..98d589960a49 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -465,4 +465,34 @@ static inline int drv_get_antenna(struct ieee80211_local *local, | |||
465 | return ret; | 465 | return ret; |
466 | } | 466 | } |
467 | 467 | ||
468 | static inline int drv_remain_on_channel(struct ieee80211_local *local, | ||
469 | struct ieee80211_channel *chan, | ||
470 | enum nl80211_channel_type chantype, | ||
471 | unsigned int duration) | ||
472 | { | ||
473 | int ret; | ||
474 | |||
475 | might_sleep(); | ||
476 | |||
477 | trace_drv_remain_on_channel(local, chan, chantype, duration); | ||
478 | ret = local->ops->remain_on_channel(&local->hw, chan, chantype, | ||
479 | duration); | ||
480 | trace_drv_return_int(local, ret); | ||
481 | |||
482 | return ret; | ||
483 | } | ||
484 | |||
485 | static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local) | ||
486 | { | ||
487 | int ret; | ||
488 | |||
489 | might_sleep(); | ||
490 | |||
491 | trace_drv_cancel_remain_on_channel(local); | ||
492 | ret = local->ops->cancel_remain_on_channel(&local->hw); | ||
493 | trace_drv_return_int(local, ret); | ||
494 | |||
495 | return ret; | ||
496 | } | ||
497 | |||
468 | #endif /* __MAC80211_DRIVER_OPS */ | 498 | #endif /* __MAC80211_DRIVER_OPS */ |