diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 12:52:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:37 -0400 |
commit | 2448798133d747ad339e57099e32a1d1e68aca1c (patch) | |
tree | ee09385f5dca9e243c38f5f888baa02605423bd7 /net/mac80211/sta_info.c | |
parent | 2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (diff) |
mac80211: add driver ops wrappers
In order to later add tracing or verifications to the driver
calls mac80211 makes, this patch adds static inline wrappers
for all operations.
All calls are now written as
drv_<op>(local, ...);
instead of
local->ops-><op>(&local->hw, ...);
Where necessary, the wrappers also do existence checking and
return default values as appropriate.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 7116220d06be..a98ea273a155 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <net/mac80211.h> | 20 | #include <net/mac80211.h> |
21 | #include "ieee80211_i.h" | 21 | #include "ieee80211_i.h" |
22 | #include "driver-ops.h" | ||
22 | #include "rate.h" | 23 | #include "rate.h" |
23 | #include "sta_info.h" | 24 | #include "sta_info.h" |
24 | #include "debugfs_sta.h" | 25 | #include "debugfs_sta.h" |
@@ -346,8 +347,7 @@ int sta_info_insert(struct sta_info *sta) | |||
346 | struct ieee80211_sub_if_data, | 347 | struct ieee80211_sub_if_data, |
347 | u.ap); | 348 | u.ap); |
348 | 349 | ||
349 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 350 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_ADD, &sta->sta); |
350 | STA_NOTIFY_ADD, &sta->sta); | ||
351 | } | 351 | } |
352 | 352 | ||
353 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 353 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
@@ -405,8 +405,7 @@ static void __sta_info_set_tim_bit(struct ieee80211_if_ap *bss, | |||
405 | 405 | ||
406 | if (sta->local->ops->set_tim) { | 406 | if (sta->local->ops->set_tim) { |
407 | sta->local->tim_in_locked_section = true; | 407 | sta->local->tim_in_locked_section = true; |
408 | sta->local->ops->set_tim(local_to_hw(sta->local), | 408 | drv_set_tim(sta->local, &sta->sta, true); |
409 | &sta->sta, true); | ||
410 | sta->local->tim_in_locked_section = false; | 409 | sta->local->tim_in_locked_section = false; |
411 | } | 410 | } |
412 | } | 411 | } |
@@ -431,8 +430,7 @@ static void __sta_info_clear_tim_bit(struct ieee80211_if_ap *bss, | |||
431 | 430 | ||
432 | if (sta->local->ops->set_tim) { | 431 | if (sta->local->ops->set_tim) { |
433 | sta->local->tim_in_locked_section = true; | 432 | sta->local->tim_in_locked_section = true; |
434 | sta->local->ops->set_tim(local_to_hw(sta->local), | 433 | drv_set_tim(sta->local, &sta->sta, false); |
435 | &sta->sta, false); | ||
436 | sta->local->tim_in_locked_section = false; | 434 | sta->local->tim_in_locked_section = false; |
437 | } | 435 | } |
438 | } | 436 | } |
@@ -482,8 +480,8 @@ static void __sta_info_unlink(struct sta_info **sta) | |||
482 | struct ieee80211_sub_if_data, | 480 | struct ieee80211_sub_if_data, |
483 | u.ap); | 481 | u.ap); |
484 | 482 | ||
485 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | 483 | drv_sta_notify(local, &sdata->vif, STA_NOTIFY_REMOVE, |
486 | STA_NOTIFY_REMOVE, &(*sta)->sta); | 484 | &(*sta)->sta); |
487 | } | 485 | } |
488 | 486 | ||
489 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 487 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |