summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-07-21 21:43:17 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-08 20:26:31 +0200
commit49fee69204035247fd2a5828863fc6f633e829f2 (patch)
treecce5ce952f0e484e8251a331252a9cd13b9501bb /drivers/net/wireless/libertas/main.c
parentcfg80211: remove unused wext handler exports (diff)
downloadlinux-49fee69204035247fd2a5828863fc6f633e829f2.tar.xz
linux-49fee69204035247fd2a5828863fc6f633e829f2.zip
libertas: link mesh device to wiphy
The mesh device is now exposed as an interface of the wiphy. This exposes the mesh device to the cfg80211 interface, allowing mesh channel selection to be reimplemented, and available to NetworkManager as it was before. Some header tweaking was needed in order to implement lbs_mesh_activated(). Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 94652c5a25de..ee28ae510935 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -23,6 +23,7 @@
#include "cfg.h"
#include "debugfs.h"
#include "cmd.h"
+#include "mesh.h"
#define DRIVER_RELEASE_VERSION "323.p0"
const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
@@ -950,17 +951,20 @@ int lbs_start_card(struct lbs_private *priv)
if (ret)
goto done;
+ if (!lbs_disablemesh)
+ lbs_init_mesh(priv);
+ else
+ pr_info("%s: mesh disabled\n", dev->name);
+
if (lbs_cfg_register(priv)) {
pr_err("cannot register device\n");
goto done;
}
- lbs_update_channel(priv);
+ if (lbs_mesh_activated(priv))
+ lbs_start_mesh(priv);
- if (!lbs_disablemesh)
- lbs_init_mesh(priv);
- else
- pr_info("%s: mesh disabled\n", dev->name);
+ lbs_update_channel(priv);
lbs_debugfs_init_one(priv, dev);