libertas: pass channel argument directly to lbs_mesh_config()

There is weirdness here; the firmware seems to refuse to change channels
at will.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Woodhouse
2007-12-13 00:32:36 -05:00
committed by David S. Miller
parent 020f3d0001
commit 860621347e
5 changed files with 16 additions and 16 deletions

View File

@@ -205,13 +205,14 @@ static int assoc_helper_channel(struct lbs_private *priv,
goto done;
if (priv->mesh_dev) {
/* Disconnect mesh while associating -- otherwise it
won't let us change channels */
lbs_mesh_config(priv, 0);
/* Change mesh channel first; 21.p21 firmware won't let
you change channel otherwise (even though it'll return
an error to this */
lbs_mesh_config(priv, 0, assoc_req->channel);
}
lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
priv->curbssparams.channel, assoc_req->channel);
priv->curbssparams.channel, assoc_req->channel);
ret = lbs_set_channel(priv, assoc_req->channel);
if (ret < 0)
@@ -244,7 +245,7 @@ static int assoc_helper_channel(struct lbs_private *priv,
restore_mesh:
if (priv->mesh_dev)
lbs_mesh_config(priv, 1);
lbs_mesh_config(priv, 1, priv->curbssparams.channel);
done:
lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);