Commit 2a2af5e6 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mac80211-for-davem-2019-06-14' of...

Merge tag 'mac80211-for-davem-2019-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

====================
Various fixes, all over:
 * a few memory leaks
 * fixes for management frame protection security
   and A2/A3 confusion (affecting TDLS as well)
 * build fix for certificates
 * etc.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4add7009 b6584202
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3851,6 +3851,7 @@ static int __init init_mac80211_hwsim(void)
			break;
		case HWSIM_REGTEST_STRICT_ALL:
			param.reg_strict = true;
			/* fall through */
		case HWSIM_REGTEST_DRIVER_REG_ALL:
			param.reg_alpha2 = hwsim_alpha2s[0];
			break;
+2 −1
Original line number Diff line number Diff line
@@ -3839,7 +3839,8 @@ struct cfg80211_ops {
 *	on wiphy_new(), but can be changed by the driver if it has a good
 *	reason to override the default
 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station
 *	on a VLAN interface)
 *	on a VLAN interface). This flag also serves an extra purpose of
 *	supporting 4ADDR AP mode on devices which do not support AP/VLAN iftype.
 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station
 * @WIPHY_FLAG_CONTROL_PORT_PROTOCOL: This device supports setting the
 *	control port protocol ethertype. The device also honours the
+11 −1
Original line number Diff line number Diff line
@@ -1435,7 +1435,7 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata)
	rcu_read_lock();
	chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);

	if (WARN_ON(!chanctx_conf)) {
	if (WARN_ON_ONCE(!chanctx_conf)) {
		rcu_read_unlock();
		return NULL;
	}
@@ -2037,6 +2037,13 @@ void __ieee80211_flush_queues(struct ieee80211_local *local,

static inline bool ieee80211_can_run_worker(struct ieee80211_local *local)
{
	/*
	 * It's unsafe to try to do any work during reconfigure flow.
	 * When the flow ends the work will be requeued.
	 */
	if (local->in_reconfig)
		return false;

	/*
	 * If quiescing is set, we are racing with __ieee80211_suspend.
	 * __ieee80211_suspend flushes the workers after setting quiescing,
@@ -2225,6 +2232,9 @@ void ieee80211_tdls_cancel_channel_switch(struct wiphy *wiphy,
					  const u8 *addr);
void ieee80211_teardown_tdls_peers(struct ieee80211_sub_if_data *sdata);
void ieee80211_tdls_chsw_work(struct work_struct *wk);
void ieee80211_tdls_handle_disconnect(struct ieee80211_sub_if_data *sdata,
				      const u8 *peer, u16 reason);
const char *ieee80211_get_reason_code_string(u16 reason_code);

extern const struct ethtool_ops ieee80211_ethtool_ops;

+0 −2
Original line number Diff line number Diff line
@@ -268,11 +268,9 @@ int ieee80211_set_tx_key(struct ieee80211_key *key)
{
	struct sta_info *sta = key->sta;
	struct ieee80211_local *local = key->local;
	struct ieee80211_key *old;

	assert_key_lock(local);

	old = key_mtx_dereference(local, sta->ptk[sta->ptk_idx]);
	sta->ptk_idx = key->conf.keyidx;
	ieee80211_check_fast_xmit(sta);

+5 −1
Original line number Diff line number Diff line
@@ -929,6 +929,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)

	/* flush STAs and mpaths on this iface */
	sta_info_flush(sdata);
	ieee80211_free_keys(sdata, true);
	mesh_path_flush_by_iface(sdata);

	/* stop the beacon */
@@ -1220,7 +1221,8 @@ int ieee80211_mesh_finish_csa(struct ieee80211_sub_if_data *sdata)
	ifmsh->chsw_ttl = 0;

	/* Remove the CSA and MCSP elements from the beacon */
	tmp_csa_settings = rcu_dereference(ifmsh->csa);
	tmp_csa_settings = rcu_dereference_protected(ifmsh->csa,
					    lockdep_is_held(&sdata->wdev.mtx));
	RCU_INIT_POINTER(ifmsh->csa, NULL);
	if (tmp_csa_settings)
		kfree_rcu(tmp_csa_settings, rcu_head);
@@ -1242,6 +1244,8 @@ int ieee80211_mesh_csa_beacon(struct ieee80211_sub_if_data *sdata,
	struct mesh_csa_settings *tmp_csa_settings;
	int ret = 0;

	lockdep_assert_held(&sdata->wdev.mtx);

	tmp_csa_settings = kmalloc(sizeof(*tmp_csa_settings),
				   GFP_ATOMIC);
	if (!tmp_csa_settings)
Loading