diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 18:52:52 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:37 -0400 |
commit | 2448798133d747ad339e57099e32a1d1e68aca1c (patch) | |
tree | ee09385f5dca9e243c38f5f888baa02605423bd7 /net/mac80211/main.c | |
parent | 2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (diff) | |
download | blackbird-op-linux-2448798133d747ad339e57099e32a1d1e68aca1c.tar.gz blackbird-op-linux-2448798133d747ad339e57099e32a1d1e68aca1c.zip |
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/main.c')
-rw-r--r-- | net/mac80211/main.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c817c9ef215a..b80bc80e46cf 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -26,6 +26,7 @@ #include <net/cfg80211.h> #include "ieee80211_i.h" +#include "driver-ops.h" #include "rate.h" #include "mesh.h" #include "wep.h" @@ -81,10 +82,9 @@ void ieee80211_configure_filter(struct ieee80211_local *local) /* be a bit nasty */ new_flags |= (1<<31); - local->ops->configure_filter(local_to_hw(local), - changed_flags, &new_flags, - local->mdev->mc_count, - local->mdev->mc_list); + drv_configure_filter(local, changed_flags, &new_flags, + local->mdev->mc_count, + local->mdev->mc_list); WARN_ON(new_flags & (1<<31)); @@ -192,7 +192,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) } if (changed && local->open_count) { - ret = local->ops->config(local_to_hw(local), changed); + ret = drv_config(local, changed); /* * Goal: * HW reconfiguration should never fail, the driver has told @@ -276,11 +276,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, } } - if (local->ops->bss_info_changed) - local->ops->bss_info_changed(local_to_hw(local), - &sdata->vif, - &sdata->vif.bss_conf, - changed); + drv_bss_info_changed(local, &sdata->vif, + &sdata->vif.bss_conf, changed); /* * DEPRECATED |