aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-25 11:46:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:38:52 -0500
commit47846c9b0c10808d9337d2e7d09361f3e0a0a71a (patch)
tree8e5d0dbf3309b7868fa73a888f9561ffea1580e3 /net/mac80211/main.c
parentabe60632f311d515b082b450504ee24006023951 (diff)
mac80211: reduce reliance on netdev
For bluetooth 3, we will most likely not have a netdev for a virtual interface (sdata), so prepare for that by reducing the reliance on having a netdev. This patch moves the name and address fields into the sdata struct and uses them from there all over. Some work is needed to keep them sync'ed, but that's not a lot of work and in slow paths anyway. In doing so, this also reduces the number of pointer dereferences in many places, because of things like sdata->dev->dev_addr becoming sdata->vif.addr. 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, 12 insertions, 5 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 8116d1a96a4a..dbf05b4dd003 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -32,7 +32,6 @@
32#include "led.h" 32#include "led.h"
33#include "cfg.h" 33#include "cfg.h"
34#include "debugfs.h" 34#include "debugfs.h"
35#include "debugfs_netdev.h"
36 35
37void ieee80211_configure_filter(struct ieee80211_local *local) 36void ieee80211_configure_filter(struct ieee80211_local *local)
38{ 37{
@@ -173,7 +172,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
173 } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) 172 } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
174 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; 173 sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid;
175 else if (sdata->vif.type == NL80211_IFTYPE_AP) 174 else if (sdata->vif.type == NL80211_IFTYPE_AP)
176 sdata->vif.bss_conf.bssid = sdata->dev->dev_addr; 175 sdata->vif.bss_conf.bssid = sdata->vif.addr;
177 else if (ieee80211_vif_is_mesh(&sdata->vif)) { 176 else if (ieee80211_vif_is_mesh(&sdata->vif)) {
178 sdata->vif.bss_conf.bssid = zero; 177 sdata->vif.bss_conf.bssid = zero;
179 } else { 178 } else {
@@ -672,11 +671,19 @@ static int __init ieee80211_init(void)
672 671
673 ret = rc80211_pid_init(); 672 ret = rc80211_pid_init();
674 if (ret) 673 if (ret)
675 return ret; 674 goto err_pid;
676 675
677 ieee80211_debugfs_netdev_init(); 676 ret = ieee80211_iface_init();
677 if (ret)
678 goto err_netdev;
678 679
679 return 0; 680 return 0;
681 err_netdev:
682 rc80211_pid_exit();
683 err_pid:
684 rc80211_minstrel_exit();
685
686 return ret;
680} 687}
681 688
682static void __exit ieee80211_exit(void) 689static void __exit ieee80211_exit(void)
@@ -693,7 +700,7 @@ static void __exit ieee80211_exit(void)
693 if (mesh_allocated) 700 if (mesh_allocated)
694 ieee80211s_stop(); 701 ieee80211s_stop();
695 702
696 ieee80211_debugfs_netdev_exit(); 703 ieee80211_iface_exit();
697} 704}
698 705
699 706