You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
John W. Linville
parent
685d12a192
commit
cc1d2806bf
@@ -796,7 +796,6 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
return cfg80211_ibss_wext_siwfreq(dev, info, wextfreq, extra);
|
||||
case NL80211_IFTYPE_MONITOR:
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
|
||||
if (freq < 0)
|
||||
return freq;
|
||||
@@ -808,6 +807,17 @@ static int cfg80211_wext_siwfreq(struct net_device *dev,
|
||||
wdev_unlock(wdev);
|
||||
mutex_unlock(&rdev->devlist_mtx);
|
||||
return err;
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
freq = cfg80211_wext_freq(wdev->wiphy, wextfreq);
|
||||
if (freq < 0)
|
||||
return freq;
|
||||
if (freq == 0)
|
||||
return -EINVAL;
|
||||
mutex_lock(&rdev->devlist_mtx);
|
||||
err = cfg80211_set_mesh_freq(rdev, wdev, freq,
|
||||
NL80211_CHAN_NO_HT);
|
||||
mutex_unlock(&rdev->devlist_mtx);
|
||||
return err;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user