aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/assoc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index a4b9756ebb7f..7b672fe62cf9 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -204,6 +204,12 @@ static int assoc_helper_channel(struct lbs_private *priv,
204 if (assoc_req->channel == priv->curbssparams.channel) 204 if (assoc_req->channel == priv->curbssparams.channel)
205 goto done; 205 goto done;
206 206
207 if (priv->mesh_dev) {
208 /* Disconnect mesh while associating -- otherwise it
209 won't let us change channels */
210 lbs_mesh_config(priv, 0);
211 }
212
207 lbs_deb_assoc("ASSOC: channel: %d -> %d\n", 213 lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
208 priv->curbssparams.channel, assoc_req->channel); 214 priv->curbssparams.channel, assoc_req->channel);
209 215
@@ -221,7 +227,7 @@ static int assoc_helper_channel(struct lbs_private *priv,
221 if (assoc_req->channel != priv->curbssparams.channel) { 227 if (assoc_req->channel != priv->curbssparams.channel) {
222 lbs_deb_assoc("ASSOC: channel: failed to update channel to %d\n", 228 lbs_deb_assoc("ASSOC: channel: failed to update channel to %d\n",
223 assoc_req->channel); 229 assoc_req->channel);
224 goto done; 230 goto restore_mesh;
225 } 231 }
226 232
227 if ( assoc_req->secinfo.wep_enabled 233 if ( assoc_req->secinfo.wep_enabled
@@ -236,7 +242,11 @@ static int assoc_helper_channel(struct lbs_private *priv,
236 /* Must restart/rejoin adhoc networks after channel change */ 242 /* Must restart/rejoin adhoc networks after channel change */
237 set_bit(ASSOC_FLAG_SSID, &assoc_req->flags); 243 set_bit(ASSOC_FLAG_SSID, &assoc_req->flags);
238 244
239done: 245 restore_mesh:
246 if (priv->mesh_dev)
247 lbs_mesh_config(priv, 1);
248
249 done:
240 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); 250 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
241 return ret; 251 return ret;
242} 252}