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]
Date:	Mon, 22 Oct 2012 11:46:37 +1100
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,
	Johannes Berg <johannes.berg@...el.com>
Subject: linux-next: manual merge of the wireless-next tree with the
 wireless tree

Hi John,

Today's linux-next merge of the wireless-next tree got a conflict in
net/mac80211/mlme.c between commit 3a40414f826a ("mac80211: connect with
HT20 if HT40 is not permitted") from the wireless tree and commit
04ecd2578e71 ("mac80211: track needed RX chains for channel contexts")
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/mlme.c
index 1b7eed2,469d864..0000000
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@@ -3104,44 -3181,43 +3183,51 @@@ static int ieee80211_prep_channel(struc
  		}
  	}
  
 -	if (ht_oper) {
 +	if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+ 		const u8 *ht_cap_ie;
+ 		const struct ieee80211_ht_cap *ht_cap;
+ 		u8 chains = 1;
+ 
 -		channel_type = NL80211_CHAN_HT20;
 +		/*
 +		 * cfg80211 already verified that the channel itself can
 +		 * be used, but it didn't check that we can do the right
 +		 * HT type, so do that here as well. If HT40 isn't allowed
 +		 * on this channel, disable 40 MHz operation.
 +		 */
  
 -		if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
 -			switch (ht_oper->ht_param &
 -					IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
 -			case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
 +		switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
 +		case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
 +			if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
 +				ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
 +			else
  				channel_type = NL80211_CHAN_HT40PLUS;
 -				break;
 -			case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
 +			break;
 +		case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
 +			if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
 +				ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
 +			else
  				channel_type = NL80211_CHAN_HT40MINUS;
 -				break;
 -			}
 +			break;
  		}
- 	}
  
- 	if (!ieee80211_set_channel_type(local, sdata, channel_type)) {
- 		/* can only fail due to HT40+/- mismatch */
- 		channel_type = NL80211_CHAN_HT20;
- 		sdata_info(sdata,
- 			   "disabling 40 MHz due to multi-vif mismatch\n");
- 		ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
- 		WARN_ON(!ieee80211_set_channel_type(local, sdata,
- 						    channel_type));
+ 		ht_cap_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
+ 					     cbss->information_elements,
+ 					     cbss->len_information_elements);
+ 		if (ht_cap_ie && ht_cap_ie[1] >= sizeof(*ht_cap)) {
+ 			ht_cap = (void *)(ht_cap_ie + 2);
+ 			chains = ieee80211_mcs_to_chains(&ht_cap->mcs);
+ 		}
+ 		sdata->needed_rx_chains = min(chains, local->rx_chains);
+ 	} else {
+ 		sdata->needed_rx_chains = 1;
  	}
  
- 	local->oper_channel = cbss->channel;
- 	ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
+ 	/* will change later if needed */
+ 	sdata->smps_mode = IEEE80211_SMPS_OFF;
  
- 	return 0;
+ 	ieee80211_vif_release_channel(sdata);
+ 	return ieee80211_vif_use_channel(sdata, cbss->channel, channel_type,
+ 					 IEEE80211_CHANCTX_SHARED);
  }
  
  static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ