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

Merge tag 'mac80211-for-davem-2020-07-30' of...

Merge tag 'mac80211-for-davem-2020-07-30' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

====================
A couple of more changes:
 * remove a warning that can trigger in certain races
 * check a function pointer before using it
 * check before adding 6 GHz to avoid a warning in mesh
 * fix two memory leaks in mesh
 * fix a TX status bug leading to a memory leak
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 85496a29 04e35caa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2166,6 +2166,7 @@ static int ieee80211_leave_mesh(struct wiphy *wiphy, struct net_device *dev)
	ieee80211_stop_mesh(sdata);
	mutex_lock(&sdata->local->mtx);
	ieee80211_vif_release_channel(sdata);
	kfree(sdata->u.mesh.ie);
	mutex_unlock(&sdata->local->mtx);

	return 0;
+13 −0
Original line number Diff line number Diff line
@@ -617,6 +617,19 @@ int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata,
int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata,
			    struct sk_buff *skb)
{
	struct ieee80211_supported_band *sband;
	const struct ieee80211_sband_iftype_data *iftd;

	sband = ieee80211_get_sband(sdata);
	if (!sband)
		return -EINVAL;

	iftd = ieee80211_get_sband_iftype_data(sband,
					       NL80211_IFTYPE_MESH_POINT);
	/* The device doesn't support HE in mesh mode or at all */
	if (!iftd)
		return 0;

	ieee80211_ie_build_he_6ghz_cap(sdata, skb);
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -521,6 +521,7 @@ static void mesh_path_free_rcu(struct mesh_table *tbl,
	del_timer_sync(&mpath->timer);
	atomic_dec(&sdata->u.mesh.mpaths);
	atomic_dec(&tbl->entries);
	mesh_path_flush_pending(mpath);
	kfree_rcu(mpath, rcu);
}

+1 −3
Original line number Diff line number Diff line
@@ -1923,9 +1923,7 @@ void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
	if (sta) {
		tx_pending = atomic_sub_return(tx_airtime,
					       &sta->airtime[ac].aql_tx_pending);
		if (WARN_ONCE(tx_pending < 0,
			      "STA %pM AC %d txq pending airtime underflow: %u, %u",
			      sta->addr, ac, tx_pending, tx_airtime))
		if (tx_pending < 0)
			atomic_cmpxchg(&sta->airtime[ac].aql_tx_pending,
				       tx_pending, 0);
	}
+4 −3
Original line number Diff line number Diff line
@@ -4230,11 +4230,12 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
	    test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
		goto out_free;

	memset(info, 0, sizeof(*info));

	if (unlikely(!multicast && skb->sk &&
		     skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS))
		ieee80211_store_ack_skb(local, skb, &info->flags, NULL);

	memset(info, 0, sizeof(*info));
		info->ack_frame_id = ieee80211_store_ack_skb(local, skb,
							     &info->flags, NULL);

	if (unlikely(sdata->control_port_protocol == ehdr->h_proto)) {
		if (sdata->control_port_no_encrypt)
Loading