Commit 7a0f8ad5 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git fixes for 5.1. Major changes:

ath10k

* fix locking problem with crashdump

* fix warnings during suspend and resume
parents 5c403533 9e80ad37
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1855,7 +1855,7 @@ void ath10k_ce_dump_registers(struct ath10k *ar,
	struct ath10k_ce_crash_data ce_data;
	u32 addr, id;

	lockdep_assert_held(&ar->data_lock);
	lockdep_assert_held(&ar->dump_mutex);

	ath10k_err(ar, "Copy Engine register dump:\n");

+1 −0
Original line number Diff line number Diff line
@@ -3119,6 +3119,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
		goto err_free_wq;

	mutex_init(&ar->conf_mutex);
	mutex_init(&ar->dump_mutex);
	spin_lock_init(&ar->data_lock);

	INIT_LIST_HEAD(&ar->peers);
+3 −0
Original line number Diff line number Diff line
@@ -1063,6 +1063,9 @@ struct ath10k {
	/* prevents concurrent FW reconfiguration */
	struct mutex conf_mutex;

	/* protects coredump data */
	struct mutex dump_mutex;

	/* protects shared structure data */
	spinlock_t data_lock;

+3 −3
Original line number Diff line number Diff line
@@ -1102,7 +1102,7 @@ struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar)
{
	struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;

	lockdep_assert_held(&ar->data_lock);
	lockdep_assert_held(&ar->dump_mutex);

	if (ath10k_coredump_mask == 0)
		/* coredump disabled */
@@ -1146,7 +1146,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
	if (!buf)
		return NULL;

	spin_lock_bh(&ar->data_lock);
	mutex_lock(&ar->dump_mutex);

	dump_data = (struct ath10k_dump_file_data *)(buf);
	strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP",
@@ -1213,7 +1213,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
		sofar += sizeof(*dump_tlv) + crash_data->ramdump_buf_len;
	}

	spin_unlock_bh(&ar->data_lock);
	mutex_unlock(&ar->dump_mutex);

	return dump_data;
}
+2 −2
Original line number Diff line number Diff line
@@ -5774,7 +5774,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
	}

	if (changed & BSS_CHANGED_MCAST_RATE &&
	    !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
	    !ath10k_mac_vif_chan(arvif->vif, &def)) {
		band = def.chan->band;
		rateidx = vif->bss_conf.mcast_rate[band] - 1;

@@ -5812,7 +5812,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
	}

	if (changed & BSS_CHANGED_BASIC_RATES) {
		if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
		if (ath10k_mac_vif_chan(vif, &def)) {
			mutex_unlock(&ar->conf_mutex);
			return;
		}
Loading