From: Johannes Berg Date: Wed, 5 May 2010 13:33:55 +0000 (+0200) Subject: mac80211: use fixed channel in ibss join when appropriate X-Git-Tag: v2.6.35-rc1~473^2~167^2~40 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=adfba3c7c026a6a5560d2a43fefc9b198cb74462;p=net-next-2.6.git mac80211: use fixed channel in ibss join when appropriate "mac80211: improve IBSS scanning" was missing a hunk. This adds that hunk as originally intended. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index ba752362b2b..d5855ae387e 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -907,6 +907,12 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata, sdata->u.ibss.channel = params->channel; sdata->u.ibss.fixed_channel = params->channel_fixed; + /* fix ourselves to that channel now already */ + if (params->channel_fixed) { + sdata->local->oper_channel = params->channel; + sdata->local->oper_channel_type = NL80211_CHAN_NO_HT; + } + if (params->ie) { sdata->u.ibss.ie = kmemdup(params->ie, params->ie_len, GFP_KERNEL);