summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-11 18:56:42 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:06:53 -0800
commit23a397ac821ab0aa263bda47131bb0628e49101a (patch)
treea631b5bb2b89885519791b46f712b04407692d6a /drivers/net/wireless/libertas/cmd.c
parente7240acae372727aa8eb3a67ca7b189dd261136a (diff)
downloadtalos-op-linux-23a397ac821ab0aa263bda47131bb0628e49101a.tar.gz
talos-op-linux-23a397ac821ab0aa263bda47131bb0628e49101a.zip
libertas: add lbs_mesh sysfs attribute for enabling mesh
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 2228feccb249..01d23493b4eb 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1093,6 +1093,23 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
}
EXPORT_SYMBOL_GPL(lbs_mesh_access);
+int lbs_mesh_config(struct lbs_private *priv, int enable)
+{
+ struct cmd_ds_mesh_config cmd;
+
+ memset(&cmd, 0, sizeof(cmd));
+ cmd.action = cpu_to_le16(enable);
+ cmd.channel = cpu_to_le16(priv->curbssparams.channel);
+ cmd.type = cpu_to_le16(0x100 + 37);
+
+ if (enable) {
+ cmd.length = cpu_to_le16(priv->mesh_ssid_len);
+ memcpy(cmd.data, priv->mesh_ssid, priv->mesh_ssid_len);
+ }
+
+ return lbs_cmd_with_response(priv, CMD_MESH_CONFIG, cmd);
+}
+
static int lbs_cmd_bcn_ctrl(struct lbs_private * priv,
struct cmd_ds_command *cmd,
u16 cmd_action)
OpenPOWER on IntegriCloud