Commit 7ab25038 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v5.11. Major changes:

ath11k

* suspend support for QCA6390 PCI devices

* support TXOP duration based RTS threshold

* mesh: add support for 256 bitmap in blockack frames in 11ax
parents 7f469b6d d1b0c338
Loading
Loading
Loading
Loading
+43 −11
Original line number Diff line number Diff line
@@ -1350,7 +1350,8 @@ out:

static int ath10k_core_fetch_board_data_api_n(struct ath10k *ar,
					      const char *boardname,
					      const char *fallback_boardname,
					      const char *fallback_boardname1,
					      const char *fallback_boardname2,
					      const char *filename)
{
	size_t len, magic_len;
@@ -1399,8 +1400,11 @@ static int ath10k_core_fetch_board_data_api_n(struct ath10k *ar,
	ret = ath10k_core_search_bd(ar, boardname, data, len);

	/* if we didn't find it and have a fallback name, try that */
	if (ret == -ENOENT && fallback_boardname)
		ret = ath10k_core_search_bd(ar, fallback_boardname, data, len);
	if (ret == -ENOENT && fallback_boardname1)
		ret = ath10k_core_search_bd(ar, fallback_boardname1, data, len);

	if (ret == -ENOENT && fallback_boardname2)
		ret = ath10k_core_search_bd(ar, fallback_boardname2, data, len);

	if (ret == -ENOENT) {
		ath10k_err(ar,
@@ -1420,7 +1424,8 @@ err:
}

static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
					 size_t name_len, bool with_variant)
					 size_t name_len, bool with_variant,
					 bool with_chip_id)
{
	/* strlen(',variant=') + strlen(ar->id.bdf_ext) */
	char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
@@ -1439,7 +1444,7 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
	}

	if (ar->id.qmi_ids_valid) {
		if (with_variant && ar->id.bdf_ext[0] != '\0')
		if (with_chip_id)
			scnprintf(name, name_len,
				  "bus=%s,qmi-board-id=%x,qmi-chip-id=%x%s",
				  ath10k_bus_str(ar->hif.bus),
@@ -1483,21 +1488,36 @@ static int ath10k_core_create_eboard_name(struct ath10k *ar, char *name,

int ath10k_core_fetch_board_file(struct ath10k *ar, int bd_ie_type)
{
	char boardname[100], fallback_boardname[100];
	char boardname[100], fallback_boardname1[100], fallback_boardname2[100];
	int ret;

	if (bd_ie_type == ATH10K_BD_IE_BOARD) {
		/* With variant and chip id */
		ret = ath10k_core_create_board_name(ar, boardname,
						    sizeof(boardname), true);
						    sizeof(boardname), true,
						    true);
		if (ret) {
			ath10k_err(ar, "failed to create board name: %d", ret);
			return ret;
		}

		ret = ath10k_core_create_board_name(ar, fallback_boardname,
						    sizeof(boardname), false);
		/* Without variant and only chip-id */
		ret = ath10k_core_create_board_name(ar, fallback_boardname1,
						    sizeof(boardname), false,
						    true);
		if (ret) {
			ath10k_err(ar, "failed to create 1st fallback board name: %d",
				   ret);
			return ret;
		}

		/* Without variant and without chip-id */
		ret = ath10k_core_create_board_name(ar, fallback_boardname2,
						    sizeof(boardname), false,
						    false);
		if (ret) {
			ath10k_err(ar, "failed to create fallback board name: %d", ret);
			ath10k_err(ar, "failed to create 2nd fallback board name: %d",
				   ret);
			return ret;
		}
	} else if (bd_ie_type == ATH10K_BD_IE_BOARD_EXT) {
@@ -1511,7 +1531,8 @@ int ath10k_core_fetch_board_file(struct ath10k *ar, int bd_ie_type)

	ar->bd_api = 2;
	ret = ath10k_core_fetch_board_data_api_n(ar, boardname,
						 fallback_boardname,
						 fallback_boardname1,
						 fallback_boardname2,
						 ATH10K_BOARD_API2_FILE);
	if (!ret)
		goto success;
@@ -2273,6 +2294,17 @@ static int ath10k_init_hw_params(struct ath10k *ar)
	return 0;
}

void ath10k_core_start_recovery(struct ath10k *ar)
{
	if (test_and_set_bit(ATH10K_FLAG_RESTARTING, &ar->dev_flags)) {
		ath10k_warn(ar, "already restarting\n");
		return;
	}

	queue_work(ar->workqueue, &ar->restart_work);
}
EXPORT_SYMBOL(ath10k_core_start_recovery);

static void ath10k_core_restart(struct work_struct *work)
{
	struct ath10k *ar = container_of(work, struct ath10k, restart_work);
+4 −0
Original line number Diff line number Diff line
@@ -865,6 +865,9 @@ enum ath10k_dev_flags {

	/* Per Station statistics service */
	ATH10K_FLAG_PEER_STATS,

	/* Indicates that ath10k device is during recovery process and not complete */
	ATH10K_FLAG_RESTARTING,
};

enum ath10k_cal_mode {
@@ -1320,6 +1323,7 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		      const struct ath10k_fw_components *fw_components);
int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt);
void ath10k_core_stop(struct ath10k *ar);
void ath10k_core_start_recovery(struct ath10k *ar);
int ath10k_core_register(struct ath10k *ar,
			 const struct ath10k_bus_params *bus_params);
void ath10k_core_unregister(struct ath10k *ar);
+3 −3
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
		ret = ath10k_debug_fw_assert(ar);
	} else if (!strcmp(buf, "hw-restart")) {
		ath10k_info(ar, "user requested hw restart\n");
		queue_work(ar->workqueue, &ar->restart_work);
		ath10k_core_start_recovery(ar);
		ret = 0;
	} else {
		ret = -EINVAL;
@@ -2005,7 +2005,7 @@ static ssize_t ath10k_write_btcoex(struct file *file,
		}
	} else {
		ath10k_info(ar, "restarting firmware due to btcoex change");
		queue_work(ar->workqueue, &ar->restart_work);
		ath10k_core_start_recovery(ar);
	}

	if (val)
@@ -2136,7 +2136,7 @@ static ssize_t ath10k_write_peer_stats(struct file *file,

	ath10k_info(ar, "restarting firmware due to Peer stats change");

	queue_work(ar->workqueue, &ar->restart_work);
	ath10k_core_start_recovery(ar);
	ret = count;

exit:
+1 −0
Original line number Diff line number Diff line
@@ -7932,6 +7932,7 @@ static void ath10k_reconfig_complete(struct ieee80211_hw *hw,
		ath10k_info(ar, "device successfully recovered\n");
		ar->state = ATH10K_STATE_ON;
		ieee80211_wake_queues(ar->hw);
		clear_bit(ATH10K_FLAG_RESTARTING, &ar->dev_flags);
	}

	mutex_unlock(&ar->conf_mutex);
+1 −1
Original line number Diff line number Diff line
@@ -1774,7 +1774,7 @@ static void ath10k_pci_fw_dump_work(struct work_struct *work)

	mutex_unlock(&ar->dump_mutex);

	queue_work(ar->workqueue, &ar->restart_work);
	ath10k_core_start_recovery(ar);
}

static void ath10k_pci_fw_crashed_dump(struct ath10k *ar)
Loading