lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20130827143611.73ee131ad3889564ecb20a4e@canb.auug.org.au>
Date:	Tue, 27 Aug 2013 14:36:11 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	"John W. Linville" <linville@...driver.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Simon Wunderlich <simon.wunderlich@...03.tu-chemnitz.de>,
	Johannes Berg <johannes.berg@...el.com>
Subject: linux-next: manual merge of the wireless-next tree with the  tree

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@...b.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);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ