aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-04-23 12:52:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:14:37 -0400
commit2448798133d747ad339e57099e32a1d1e68aca1c (patch)
treeee09385f5dca9e243c38f5f888baa02605423bd7 /net/mac80211/main.c
parent2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (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/main.c')
-rw-r--r--net/mac80211/main.c17
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 @@
26#include <net/cfg80211.h> 26#include <net/cfg80211.h>
27 27
28#include "ieee80211_i.h" 28#include "ieee80211_i.h"
29#include "driver-ops.h"
29#include "rate.h" 30#include "rate.h"
30#include "mesh.h" 31#include "mesh.h"
31#include "wep.h" 32#include "wep.h"
@@ -81,10 +82,9 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
81 /* be a bit nasty */ 82 /* be a bit nasty */
82 new_flags |= (1<<31); 83 new_flags |= (1<<31);
83 84
84 local->ops->configure_filter(local_to_hw(local), 85 drv_configure_filter(local, changed_flags, &new_flags,
85 changed_flags, &new_flags, 86 local->mdev->mc_count,
86 local->mdev->mc_count, 87 local->mdev->mc_list);
87 local->mdev->mc_list);
88 88
89 WARN_ON(new_flags & (1<<31)); 89 WARN_ON(new_flags & (1<<31));
90 90
@@ -192,7 +192,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
192 } 192 }
193 193
194 if (changed && local->open_count) { 194 if (changed && local->open_count) {
195 ret = local->ops->config(local_to_hw(local), changed); 195 ret = drv_config(local, changed);
196 /* 196 /*
197 * Goal: 197 * Goal:
198 * HW reconfiguration should never fail, the driver has told 198 * 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,
276 } 276 }
277 } 277 }
278 278
279 if (local->ops->bss_info_changed) 279 drv_bss_info_changed(local, &sdata->vif,
280 local->ops->bss_info_changed(local_to_hw(local), 280 &sdata->vif.bss_conf, changed);
281 &sdata->vif,
282 &sdata->vif.bss_conf,
283 changed);
284 281
285 /* 282 /*
286 * DEPRECATED 283 * DEPRECATED