diff options
author | Eliad Peller <eliad@wizery.com> | 2011-09-21 07:06:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-27 14:27:48 -0400 |
commit | 37a41b4affa33bb237d3692bf51f1b5ebcaf29d8 (patch) | |
tree | 0201e166912d12bd8270b2117b11717756cfd5db /net/mac80211/driver-ops.h | |
parent | 129321804e36721e71fadcab5b475bd37bf53044 (diff) |
mac80211: add ieee80211_vif param to tsf functions
TSF can be kept per vif.
Add ieee80211_vif param to set/get/reset_tsf, and move
the debugfs entries to the per-vif directory.
Update all the drivers that implement these callbacks.
Signed-off-by: Eliad Peller <eliad@wizery.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 | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 9001ff331f0a..5e5d97389bc9 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -427,36 +427,40 @@ static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue, | |||
427 | return ret; | 427 | return ret; |
428 | } | 428 | } |
429 | 429 | ||
430 | static inline u64 drv_get_tsf(struct ieee80211_local *local) | 430 | static inline u64 drv_get_tsf(struct ieee80211_local *local, |
431 | struct ieee80211_sub_if_data *sdata) | ||
431 | { | 432 | { |
432 | u64 ret = -1ULL; | 433 | u64 ret = -1ULL; |
433 | 434 | ||
434 | might_sleep(); | 435 | might_sleep(); |
435 | 436 | ||
436 | trace_drv_get_tsf(local); | 437 | trace_drv_get_tsf(local, sdata); |
437 | if (local->ops->get_tsf) | 438 | if (local->ops->get_tsf) |
438 | ret = local->ops->get_tsf(&local->hw); | 439 | ret = local->ops->get_tsf(&local->hw, &sdata->vif); |
439 | trace_drv_return_u64(local, ret); | 440 | trace_drv_return_u64(local, ret); |
440 | return ret; | 441 | return ret; |
441 | } | 442 | } |
442 | 443 | ||
443 | static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf) | 444 | static inline void drv_set_tsf(struct ieee80211_local *local, |
445 | struct ieee80211_sub_if_data *sdata, | ||
446 | u64 tsf) | ||
444 | { | 447 | { |
445 | might_sleep(); | 448 | might_sleep(); |
446 | 449 | ||
447 | trace_drv_set_tsf(local, tsf); | 450 | trace_drv_set_tsf(local, sdata, tsf); |
448 | if (local->ops->set_tsf) | 451 | if (local->ops->set_tsf) |
449 | local->ops->set_tsf(&local->hw, tsf); | 452 | local->ops->set_tsf(&local->hw, &sdata->vif, tsf); |
450 | trace_drv_return_void(local); | 453 | trace_drv_return_void(local); |
451 | } | 454 | } |
452 | 455 | ||
453 | static inline void drv_reset_tsf(struct ieee80211_local *local) | 456 | static inline void drv_reset_tsf(struct ieee80211_local *local, |
457 | struct ieee80211_sub_if_data *sdata) | ||
454 | { | 458 | { |
455 | might_sleep(); | 459 | might_sleep(); |
456 | 460 | ||
457 | trace_drv_reset_tsf(local); | 461 | trace_drv_reset_tsf(local, sdata); |
458 | if (local->ops->reset_tsf) | 462 | if (local->ops->reset_tsf) |
459 | local->ops->reset_tsf(&local->hw); | 463 | local->ops->reset_tsf(&local->hw, &sdata->vif); |
460 | trace_drv_return_void(local); | 464 | trace_drv_return_void(local); |
461 | } | 465 | } |
462 | 466 | ||