aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.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/util.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/util.c')
-rw-r--r--net/mac80211/util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2cde9bbfe7d9..97b613affe08 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -26,6 +26,7 @@
26#include <net/rtnetlink.h> 26#include <net/rtnetlink.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 "wme.h" 32#include "wme.h"
@@ -726,7 +727,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
726 qparam.txop = 0; 727 qparam.txop = 0;
727 728
728 for (i = 0; i < local_to_hw(local)->queues; i++) 729 for (i = 0; i < local_to_hw(local)->queues; i++)
729 local->ops->conf_tx(local_to_hw(local), i, &qparam); 730 drv_conf_tx(local, i, &qparam);
730} 731}
731 732
732void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, 733void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
@@ -1000,7 +1001,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1000 1001
1001 /* restart hardware */ 1002 /* restart hardware */
1002 if (local->open_count) { 1003 if (local->open_count) {
1003 res = local->ops->start(hw); 1004 res = drv_start(local);
1004 1005
1005 ieee80211_led_radio(local, hw->conf.radio_enabled); 1006 ieee80211_led_radio(local, hw->conf.radio_enabled);
1006 } 1007 }
@@ -1013,7 +1014,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1013 conf.vif = &sdata->vif; 1014 conf.vif = &sdata->vif;
1014 conf.type = sdata->vif.type; 1015 conf.type = sdata->vif.type;
1015 conf.mac_addr = sdata->dev->dev_addr; 1016 conf.mac_addr = sdata->dev->dev_addr;
1016 res = local->ops->add_interface(hw, &conf); 1017 res = drv_add_interface(local, &conf);
1017 } 1018 }
1018 } 1019 }
1019 1020
@@ -1026,8 +1027,8 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1026 struct ieee80211_sub_if_data, 1027 struct ieee80211_sub_if_data,
1027 u.ap); 1028 u.ap);
1028 1029
1029 local->ops->sta_notify(hw, &sdata->vif, 1030 drv_sta_notify(local, &sdata->vif, STA_NOTIFY_ADD,
1030 STA_NOTIFY_ADD, &sta->sta); 1031 &sta->sta);
1031 } 1032 }
1032 spin_unlock_irqrestore(&local->sta_lock, flags); 1033 spin_unlock_irqrestore(&local->sta_lock, flags);
1033 } 1034 }
@@ -1045,8 +1046,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1045 rcu_read_unlock(); 1046 rcu_read_unlock();
1046 1047
1047 /* setup RTS threshold */ 1048 /* setup RTS threshold */
1048 if (local->ops->set_rts_threshold) 1049 drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
1049 local->ops->set_rts_threshold(hw, hw->wiphy->rts_threshold);
1050 1050
1051 /* reconfigure hardware */ 1051 /* reconfigure hardware */
1052 ieee80211_hw_config(local, ~0); 1052 ieee80211_hw_config(local, ~0);