aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-13 00:32:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:07 -0500
commit860621347e88b23517fc4ec93fa5af940401c3ec (patch)
tree059223640a79bfe60f0dd9fe3c15d5656cac740a /drivers/net/wireless/libertas/assoc.c
parent020f3d0001cb249ceae623c1a7ae0c196326ef3f (diff)
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>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index ff976ebcd014..cd8e043b16f4 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -205,13 +205,14 @@ static int assoc_helper_channel(struct lbs_private *priv,
205 goto done; 205 goto done;
206 206
207 if (priv->mesh_dev) { 207 if (priv->mesh_dev) {
208 /* Disconnect mesh while associating -- otherwise it 208 /* Change mesh channel first; 21.p21 firmware won't let
209 won't let us change channels */ 209 you change channel otherwise (even though it'll return
210 lbs_mesh_config(priv, 0); 210 an error to this */
211 lbs_mesh_config(priv, 0, assoc_req->channel);
211 } 212 }
212 213
213 lbs_deb_assoc("ASSOC: channel: %d -> %d\n", 214 lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
214 priv->curbssparams.channel, assoc_req->channel); 215 priv->curbssparams.channel, assoc_req->channel);
215 216
216 ret = lbs_set_channel(priv, assoc_req->channel); 217 ret = lbs_set_channel(priv, assoc_req->channel);
217 if (ret < 0) 218 if (ret < 0)
@@ -244,7 +245,7 @@ static int assoc_helper_channel(struct lbs_private *priv,
244 245
245 restore_mesh: 246 restore_mesh:
246 if (priv->mesh_dev) 247 if (priv->mesh_dev)
247 lbs_mesh_config(priv, 1); 248 lbs_mesh_config(priv, 1, priv->curbssparams.channel);
248 249
249 done: 250 done:
250 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); 251 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);