if (assoc_req->channel == priv->curbssparams.channel)
goto done;
+ if (priv->mesh_dev) {
+ /* Disconnect mesh while associating -- otherwise it
+ won't let us change channels */
+ lbs_mesh_config(priv, 0);
+ }
+
lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
priv->curbssparams.channel, assoc_req->channel);
if (assoc_req->channel != priv->curbssparams.channel) {
lbs_deb_assoc("ASSOC: channel: failed to update channel to %d\n",
assoc_req->channel);
- goto done;
+ goto restore_mesh;
}
if ( assoc_req->secinfo.wep_enabled
/* Must restart/rejoin adhoc networks after channel change */
set_bit(ASSOC_FLAG_SSID, &assoc_req->flags);
-done:
+ restore_mesh:
+ if (priv->mesh_dev)
+ lbs_mesh_config(priv, 1);
+
+ done:
lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
return ret;
}