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

Merge tag 'wireless-next-2022-09-03' of...

Merge tag 'wireless-next-2022-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next



Johannes Berg says:

====================
drivers
 - rtw89: large update across the map, e.g. coex, pci(e), etc.
 - ath9k: uninit memory read fix
 - ath10k: small peer map fix and a WCN3990 device fix
 - wfx: underflow

stack
 - the "change MAC address while IFF_UP" change from James
   we discussed
 - more MLO work, including a set of fixes for the previous
   code, now that we have more code we can exercise it more
 - prevent some features with MLO that aren't ready yet
   (AP_VLAN and 4-address connections)
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents aa3fab01 c087f9fc
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA988X_HW_2_0_VERSION,
@@ -136,6 +137,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9887_HW_1_0_VERSION,
@@ -175,6 +177,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA6174_HW_3_2_VERSION,
@@ -209,6 +212,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.supports_peer_stats_info = true,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA6174_HW_2_1_VERSION,
@@ -247,6 +251,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA6174_HW_2_1_VERSION,
@@ -285,6 +290,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA6174_HW_3_0_VERSION,
@@ -323,6 +329,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA6174_HW_3_2_VERSION,
@@ -365,6 +372,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.supports_peer_stats_info = true,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -409,6 +417,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -460,6 +469,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -508,6 +518,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -546,6 +557,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -586,6 +598,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -617,6 +630,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.credit_size_workaround = true,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -662,6 +676,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = false,
		.hw_restart_disconnect = false,
		.use_fw_tx_credits = true,
	},
	{
		.id = WCN3990_HW_1_0_DEV_VERSION,
@@ -693,6 +708,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
		.tx_stats_over_pktlog = false,
		.dynamic_sar_support = true,
		.hw_restart_disconnect = true,
		.use_fw_tx_credits = false,
	},
};

+8 −3
Original line number Diff line number Diff line
@@ -947,13 +947,18 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
		return -ECOMM;
	}

	if (ar->hw_params.use_fw_tx_credits)
		htc->total_transmit_credits = __le16_to_cpu(msg->ready.credit_count);
	else
		htc->total_transmit_credits = 1;

	htc->target_credit_size = __le16_to_cpu(msg->ready.credit_size);

	ath10k_dbg(ar, ATH10K_DBG_HTC,
		   "Target ready! transmit resources: %d size:%d\n",
		   "Target ready! transmit resources: %d size:%d actual credits:%d\n",
		   htc->total_transmit_credits,
		   htc->target_credit_size);
		   htc->target_credit_size,
		   msg->ready.credit_count);

	if ((htc->total_transmit_credits == 0) ||
	    (htc->target_credit_size == 0)) {
+2 −0
Original line number Diff line number Diff line
@@ -635,6 +635,8 @@ struct ath10k_hw_params {
	bool dynamic_sar_support;

	bool hw_restart_disconnect;

	bool use_fw_tx_credits;
};

struct htt_resp;
+29 −25
Original line number Diff line number Diff line
@@ -864,22 +864,12 @@ static int ath10k_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 *addr)
	return 0;
}

static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
static void ath10k_peer_map_cleanup(struct ath10k *ar, struct ath10k_peer *peer)
{
	struct ath10k_peer *peer, *tmp;
	int peer_id;
	int i;
	int peer_id, i;

	lockdep_assert_held(&ar->conf_mutex);

	spin_lock_bh(&ar->data_lock);
	list_for_each_entry_safe(peer, tmp, &ar->peers, list) {
		if (peer->vdev_id != vdev_id)
			continue;

		ath10k_warn(ar, "removing stale peer %pM from vdev_id %d\n",
			    peer->addr, vdev_id);

	for_each_set_bit(peer_id, peer->peer_ids,
			 ATH10K_MAX_NUM_PEER_IDS) {
		ar->peer_map[peer_id] = NULL;
@@ -900,6 +890,23 @@ static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
	kfree(peer);
	ar->num_peers--;
}

static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
{
	struct ath10k_peer *peer, *tmp;

	lockdep_assert_held(&ar->conf_mutex);

	spin_lock_bh(&ar->data_lock);
	list_for_each_entry_safe(peer, tmp, &ar->peers, list) {
		if (peer->vdev_id != vdev_id)
			continue;

		ath10k_warn(ar, "removing stale peer %pM from vdev_id %d\n",
			    peer->addr, vdev_id);

		ath10k_peer_map_cleanup(ar, peer);
	}
	spin_unlock_bh(&ar->data_lock);
}

@@ -7621,10 +7628,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
				/* Clean up the peer object as well since we
				 * must have failed to do this above.
				 */
				list_del(&peer->list);
				ar->peer_map[i] = NULL;
				kfree(peer);
				ar->num_peers--;
				ath10k_peer_map_cleanup(ar, peer);
			}
		}
		spin_unlock_bh(&ar->data_lock);
+1 −1
Original line number Diff line number Diff line
@@ -1014,7 +1014,7 @@ static int ath6kl_fetch_fw_apin(struct ath6kl *ar, const char *name)

		switch (ie_id) {
		case ATH6KL_FW_IE_FW_VERSION:
			strlcpy(ar->wiphy->fw_version, data,
			strscpy(ar->wiphy->fw_version, data,
				min(sizeof(ar->wiphy->fw_version), ie_len+1));

			ath6kl_dbg(ATH6KL_DBG_BOOT,
Loading