This calls commit() on all logical interfaces of a physical interface, if the channel of it is changed. Before it works as it should, I must fix the joining process of STA and IBSS a little, which I will make tomorrow. This version call it only in the wireless extensions, because the handling in nl80211 must discussed more, but I think in the case of wext it is the right way. Signed-off-by: Alina Friedrichsen <x-alina@xxxxxxx> --- diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 1ac0516..dce1618 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -157,7 +157,10 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra) { + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); + struct ieee80211_sub_if_data *nsdata; + int ret; if (sdata->vif.type == NL80211_IFTYPE_ADHOC) sdata->u.ibss.flags &= ~IEEE80211_IBSS_AUTO_CHANNEL_SEL; @@ -173,19 +176,25 @@ static int ieee80211_ioctl_siwfreq(struct net_device *dev, else if (sdata->vif.type == NL80211_IFTYPE_STATION) sdata->u.mgd.flags |= IEEE80211_STA_AUTO_CHANNEL_SEL; - return 0; + ret = 0; } else - return ieee80211_set_freq(sdata, + ret = ieee80211_set_freq(sdata, ieee80211_channel_to_frequency(freq->m)); } else { int i, div = 1000000; for (i = 0; i < freq->e; i++) div /= 10; if (div > 0) - return ieee80211_set_freq(sdata, freq->m / div); + ret = ieee80211_set_freq(sdata, freq->m / div); else - return -EINVAL; + ret = -EINVAL; } + + list_for_each_entry(nsdata, &local->interfaces, list) { + ieee80211_commit(nsdata); + } + + return ret; } -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html