If the mesh interface is alreadys joined, the message NL80211_CMD_SET_CHANNEL sent by set_wiphy_channel function return error -16 (device busy). Call leave_mesh function before set_wiphy_channel fix it.
Signed-off-by: cedric voncken <[email protected]> --- a/linux/meshd-nl80211.c 2013-04-15 10:05:55.000000000 +0200 +++ b/linux/meshd-nl80211.c.new 2013-04-16 10:03:55.000000000 +0200 @@ -1244,7 +1244,8 @@ static int channel_to_freq(int chan) static int init(struct netlink_config_s *nlcfg, struct mesh_node *mesh) { int exitcode = 0; - + + leave_mesh(nlcfg); /* TODO: verify channel */ set_wiphy_channel(nlcfg, mesh); @@ -1266,7 +1267,6 @@ static int init(struct netlink_config_s exit(EXIT_FAILURE); } - leave_mesh(nlcfg); exitcode = join_mesh_rsn(nlcfg, mesh->conf); if (exitcode) { fprintf(stderr, "Failed to join mesh\n"); Cedric Voncken _______________________________________________ Devel mailing list [email protected] http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
