linux-next: manual merge of the wireless-next tree with the tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx

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: pgpYc5QCM_z8m.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux