mac80211: allow mode change if IBSS is not allowed
PATCH 1/1 mac80211: allow mode change if IBSS is not allowed
Changing mode on an interface is not allowed if IBSS is disabled for the current channel. That restriction should only apply when switching to the ad-hoc mode, as it was prior to db17d8c4.
--- net/mac80211/iface.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/mac80211/iface.c +2 -1
@@ -699,7 +699,8 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,return 0 ;/* Setting ad-hoc mode on non-IBSS channel is not supported. */ -if (sdata->local->oper_channel->flags &IEEE80211_CHAN_NO_IBSS ) +if (sdata->local->oper_channel->flags &IEEE80211_CHAN_NO_IBSS && + type ==NL80211_IFTYPE_ADHOC )return -EOPNOTSUPP ;/*
Quoted 5 lines · Pavel Roskin
Changing mode on an interface is not allowed if IBSS is disabled for the current channel. That restriction should only apply when switching to the ad-hoc mode, as it was prior to
db17d8c4.Signed-off-by Pavel Roskin <[email protected]>
Thanks Pavel.
Quoted 23 lines
--- net/mac80211/iface.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)net/mac80211/iface.c +2
-2@@ -699,7 +699,8 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,return 0 ;/* Setting ad-hoc mode on non-IBSS channel is not supported. */ -if (sdata->local->oper_channel->flags &IEEE80211_CHAN_NO_IBSS ) +if (sdata->local->oper_channel->flags &IEEE80211_CHAN_NO_IBSS && + type ==NL80211_IFTYPE_ADHOC )return -EOPNOTSUPP ;/* -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Johannes Berg
Quoted 5 lines · Pavel Roskin
Changing mode on an interface is not allowed if IBSS is disabled for the current channel. That restriction should only apply when switching to the ad-hoc mode, as it was prior to
db17d8c4.Signed-off-by Pavel Roskin <[email protected]>Thanks Pavel.
Acked-by Johannes Berg <[email protected]>
Doesn't this need to account for the other beaconing modes?
John
Signature · 2 lines
John W. Linville Linux should be at the core [email protected] of your literate lifestyle.
Johannes Berg
maintainerQuoted 6 lines · John W. Linville
Quoted 5 lines · Johannes Berg
Quoted 4 lines · Pavel Roskin
Changing mode on an interface is not allowed if IBSS is disabled for the current channel. That restriction should only apply when switching to the ad-hoc mode, as it was prior to
db17d8c4.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Pavel Roskin <[email protected]>Thanks Pavel.
Acked-by Johannes Berg <[email protected]>Doesn't this need to account for the other beaconing modes?
Well, for now this fixes the regression I introduced, and how the other modes should be handled we haven't really defined yet. But yeah, it might make some sense for mesh too...
johannes