Commit e5795aac authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'wireless-drivers-next-2020-12-12' of...

Merge tag 'wireless-drivers-next-2020-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers-next patches for v5.11

Second set of patches for v5.11. iwlwifi gaining support for the new
6 GHz band and rtw88 got a new channel. Lots of new features for mt76
and ath11k now has working suspend for PCI devices. And as always,
smaller fixes and cleanups all over.

Major changes:

rtw88
 * add support for channel 144

mt76
 * support for more sta interfaces on mt7615/mt7915
 * mt7915 encapsulation offload
 * performance improvements
 * channel noise report on mt7915
 * mt7915 testmode support
 * mt7915 DBDC support

iwlwifi
 * support 6 GHz band

ath11k
 * suspend support for QCA6390 PCI devices
 * support TXOP duration based RTS threshold
 * mesh: add support for 256 bitmap in blockack frames in 11ax

* tag 'wireless-drivers-next-2020-12-12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (197 commits)
  ath11k: implement suspend for QCA6390 PCI devices
  ath11k: hif: add ce irq enable and disable functions
  ath11k: implement WoW enable and wakeup commands
  ath11k: set credit_update flag for flow controlled ep only
  ath11k: dp: stop rx pktlog before suspend
  ath11k: htc: implement suspend handling
  ath11k: htc: remove unused struct ath11k_htc_ops
  ath11k: pci: read select_window register to ensure write is finished
  ath11k: hif: implement suspend and resume functions
  ath11k: mhi: hook suspend and resume
  ath11k: Fix incorrect tlvs in scan start command
  ath11k: pci: disable VDD4BLOW
  ath11k: pci: fix L1ss clock unstable problem
  ath11k: pci: fix hot reset stability issues
  ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID
  ath11k: mhi: print a warning if firmware crashed
  ath11k: use MHI provided APIs to allocate and free MHI controller
  ath10k: add atomic protection for device recovery
  ath10k: add option for chip-id based BDF selection
  mt76: remove unused variable q
  ...
====================

Link: https://lore.kernel.org/r/20201212050839.EF50EC433C6@smtp.codeaurora.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 00f7763a 7ab25038
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1796,6 +1796,7 @@ static int adm8211_probe(struct pci_dev *pdev,
	if (io_len < 256 || mem_len < 1024) {
		printk(KERN_ERR "%s (adm8211): Too short PCI resources\n",
		       pci_name(pdev));
		err = -ENOMEM;
		goto err_disable_pdev;
	}

@@ -1805,6 +1806,7 @@ static int adm8211_probe(struct pci_dev *pdev,
	if (reg != ADM8211_SIG1 && reg != ADM8211_SIG2) {
		printk(KERN_ERR "%s (adm8211): Invalid signature (0x%x)\n",
		       pci_name(pdev), reg);
		err = -EINVAL;
		goto err_disable_pdev;
	}

@@ -1815,8 +1817,8 @@ static int adm8211_probe(struct pci_dev *pdev,
		return err; /* someone else grabbed it? don't disable it */
	}

	if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)) ||
	    dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32))) {
	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
	if (err) {
		printk(KERN_ERR "%s (adm8211): No suitable DMA available\n",
		       pci_name(pdev));
		goto err_free_reg;
+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);
Loading