diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-05-16 17:50:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-05 15:32:18 -0400 |
commit | cc1d2806bf06ab92268343d26eb3d8d8f00f8bc9 (patch) | |
tree | b14ffa920d616470715e715df49f990bfdcf12ae /net/mac80211/cfg.c | |
parent | 685d12a1929f274bd91497e33b4255fe164ac8ec (diff) |
cfg80211: provide channel to join_mesh function
Just like the AP mode patch, instead of setting
the channel and then joining the mesh network,
provide the channel to join the network on to
the join_mesh() function.
Like in AP mode, you can also give the channel
to the join-mesh nl80211 command now.
Unlike AP mode, it picks a default channel if
none was given.
As libertas uses mesh mode interfaces but has
no join_mesh callback and we can't simply break
it, keep some compatibility code for that case
and configure the channel directly for it.
In the non-libertas case, where we store the
channel until join, allow setting it while the
interface is down.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8e9d525c4653..f47af8b3185e 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1598,6 +1598,12 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev, | |||
1598 | err = copy_mesh_setup(ifmsh, setup); | 1598 | err = copy_mesh_setup(ifmsh, setup); |
1599 | if (err) | 1599 | if (err) |
1600 | return err; | 1600 | return err; |
1601 | |||
1602 | err = ieee80211_set_channel(wiphy, dev, setup->channel, | ||
1603 | setup->channel_type); | ||
1604 | if (err) | ||
1605 | return err; | ||
1606 | |||
1601 | ieee80211_start_mesh(sdata); | 1607 | ieee80211_start_mesh(sdata); |
1602 | 1608 | ||
1603 | return 0; | 1609 | return 0; |