diff options
author | Javier Cardona <javier@cozybit.com> | 2008-05-17 03:55:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:47:39 -0400 |
commit | edaea5ce05ca804cc55438c586ca2f947d49f56f (patch) | |
tree | be82d922cb908221d247e21d04ddf5517e7a4953 /drivers/net/wireless/libertas/main.c | |
parent | 75bf45a7b4ab81cfa5c5eab68b57bbfee8b8ede2 (diff) |
libertas: Extend MESH_CONFIG command to access non-volatile configuration
This patch is based on a patch from Shailendra Govardhan and Brian Cavagnolo.
It extends the MESH_CONFIG command to configure non-volatile parameters on
libertas devices that support them (e.g. OLPC Active Antenna).
This patch only implements the driver/firmware interface.
See http://dev.laptop.org/ticket/6823 for minimal testing results and known
issues.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index a87febad8c29..01299c8ed27c 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -344,14 +344,15 @@ static ssize_t lbs_mesh_set(struct device *dev, | |||
344 | { | 344 | { |
345 | struct lbs_private *priv = to_net_dev(dev)->priv; | 345 | struct lbs_private *priv = to_net_dev(dev)->priv; |
346 | int enable; | 346 | int enable; |
347 | int ret; | 347 | int ret, action = CMD_ACT_MESH_CONFIG_STOP; |
348 | 348 | ||
349 | sscanf(buf, "%x", &enable); | 349 | sscanf(buf, "%x", &enable); |
350 | enable = !!enable; | 350 | enable = !!enable; |
351 | if (enable == !!priv->mesh_dev) | 351 | if (enable == !!priv->mesh_dev) |
352 | return count; | 352 | return count; |
353 | 353 | if (enable) | |
354 | ret = lbs_mesh_config(priv, enable, priv->curbssparams.channel); | 354 | action = CMD_ACT_MESH_CONFIG_START; |
355 | ret = lbs_mesh_config(priv, action, priv->curbssparams.channel); | ||
355 | if (ret) | 356 | if (ret) |
356 | return ret; | 357 | return ret; |
357 | 358 | ||
@@ -1257,9 +1258,11 @@ int lbs_start_card(struct lbs_private *priv) | |||
1257 | useful */ | 1258 | useful */ |
1258 | 1259 | ||
1259 | priv->mesh_tlv = 0x100 + 291; | 1260 | priv->mesh_tlv = 0x100 + 291; |
1260 | if (lbs_mesh_config(priv, 1, priv->curbssparams.channel)) { | 1261 | if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, |
1262 | priv->curbssparams.channel)) { | ||
1261 | priv->mesh_tlv = 0x100 + 37; | 1263 | priv->mesh_tlv = 0x100 + 37; |
1262 | if (lbs_mesh_config(priv, 1, priv->curbssparams.channel)) | 1264 | if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, |
1265 | priv->curbssparams.channel)) | ||
1263 | priv->mesh_tlv = 0; | 1266 | priv->mesh_tlv = 0; |
1264 | } | 1267 | } |
1265 | if (priv->mesh_tlv) { | 1268 | if (priv->mesh_tlv) { |