mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>,
	Johannes Berg <johannes.berg@intel.com>
Subject: linux-next: manual merge of the wireless-next tree with the  tree
Date: Tue, 27 Aug 2013 14:36:11 +1000	[thread overview]
Message-ID: <20130827143611.73ee131ad3889564ecb20a4e@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3768 bytes --]

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/mac80211/ibss.c between commit 75a423f493ff ("mac80211: ibss: fix
ignored channel parameter") from the wireless tree and commit
d51b70ff5122 ("mac80211: move ibss presp generation in own function")
from the wireless-next tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc net/mac80211/ibss.c
index cb73baf,74de0f1..0000000
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@@ -246,6 -191,90 +191,93 @@@ ieee80211_ibss_build_presp(struct ieee8
  
  	presp->head_len = pos - presp->head;
  	if (WARN_ON(presp->head_len > frame_len))
+ 		goto error;
+ 
+ 	return presp;
+ error:
+ 	kfree(presp);
+ 	return NULL;
+ }
+ 
+ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
+ 				      const u8 *bssid, const int beacon_int,
 -				      struct ieee80211_channel *chan,
++				      struct cfg80211_chan_def *req_chandef,
+ 				      const u32 basic_rates,
+ 				      const u16 capability, u64 tsf,
+ 				      bool creator)
+ {
+ 	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ 	struct ieee80211_local *local = sdata->local;
+ 	struct ieee80211_supported_band *sband;
+ 	struct ieee80211_mgmt *mgmt;
+ 	struct cfg80211_bss *bss;
+ 	u32 bss_change;
+ 	struct cfg80211_chan_def chandef;
++	struct ieee80211_channel *chan;
+ 	struct beacon_data *presp;
+ 	enum nl80211_bss_scan_width scan_width;
+ 	bool have_higher_than_11mbit;
+ 
+ 	sdata_assert_lock(sdata);
+ 
+ 	/* Reset own TSF to allow time synchronization work. */
+ 	drv_reset_tsf(local, sdata);
+ 
+ 	if (!ether_addr_equal(ifibss->bssid, bssid))
+ 		sta_info_flush(sdata);
+ 
+ 	/* if merging, indicate to driver that we leave the old IBSS */
+ 	if (sdata->vif.bss_conf.ibss_joined) {
+ 		sdata->vif.bss_conf.ibss_joined = false;
+ 		sdata->vif.bss_conf.ibss_creator = false;
+ 		sdata->vif.bss_conf.enable_beacon = false;
+ 		netif_carrier_off(sdata->dev);
+ 		ieee80211_bss_info_change_notify(sdata,
+ 						 BSS_CHANGED_IBSS |
+ 						 BSS_CHANGED_BEACON_ENABLED);
+ 	}
+ 
+ 	presp = rcu_dereference_protected(ifibss->presp,
+ 					  lockdep_is_held(&sdata->wdev.mtx));
+ 	rcu_assign_pointer(ifibss->presp, NULL);
+ 	if (presp)
+ 		kfree_rcu(presp, rcu_head);
+ 
+ 	sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
+ 
 -	chandef = ifibss->chandef;
++	/* make a copy of the chandef, it could be modified below. */
++	chandef = *req_chandef;
++	chan = chandef.chan;
+ 	if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
+ 		if (chandef.width == NL80211_CHAN_WIDTH_5 ||
+ 		    chandef.width == NL80211_CHAN_WIDTH_10 ||
+ 		    chandef.width == NL80211_CHAN_WIDTH_20_NOHT ||
+ 		    chandef.width == NL80211_CHAN_WIDTH_20) {
+ 			sdata_info(sdata,
+ 				   "Failed to join IBSS, beacons forbidden\n");
+ 			return;
+ 		}
+ 		chandef.width = NL80211_CHAN_WIDTH_20;
+ 		chandef.center_freq1 = chan->center_freq;
+ 	}
+ 
+ 	ieee80211_vif_release_channel(sdata);
+ 	if (ieee80211_vif_use_channel(sdata, &chandef,
+ 				      ifibss->fixed_channel ?
+ 					IEEE80211_CHANCTX_SHARED :
+ 					IEEE80211_CHANCTX_EXCLUSIVE)) {
+ 		sdata_info(sdata, "Failed to join IBSS, no channel context\n");
+ 		return;
+ 	}
+ 
+ 	memcpy(ifibss->bssid, bssid, ETH_ALEN);
+ 
+ 	sband = local->hw.wiphy->bands[chan->band];
+ 
+ 	presp = ieee80211_ibss_build_presp(sdata, beacon_int, basic_rates,
+ 					   capability, tsf, &chandef,
+ 					   &have_higher_than_11mbit);
+ 	if (!presp)
  		return;
  
  	rcu_assign_pointer(ifibss->presp, presp);

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2013-08-27  4:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27  4:36 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-21  1:49 Stephen Rothwell
2011-12-21 10:47 ` Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130827143611.73ee131ad3889564ecb20a4e@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=simon.wunderlich@s2003.tu-chemnitz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®