Commit 846c3c9c authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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

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

Kalle Valo says:

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

First set of patches for v5.11. rtw88 getting improvements to work
better with Bluetooth and other driver also getting some new features.
mhi-ath11k-immutable branch was pulled from mhi tree to avoid
conflicts with mhi tree.

Major changes:

rtw88
 * major bluetooth co-existance improvements
wilc1000
 * Wi-Fi Multimedia (WMM) support
ath11k
 * Fast Initial Link Setup (FILS) discovery and unsolicited broadcast
   probe response support
 * qcom,ath11k-calibration-variant Device Tree setting
 * cold boot calibration support
 * new DFS region: JP
wnc36xx
 * enable connection monitoring and keepalive in firmware
ath10k
 * firmware IRAM recovery feature
mhi
 * merge mhi-ath11k-immutable branch to make MHI API change go smoothly

* tag 'wireless-drivers-next-2020-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (180 commits)
  wl1251: remove trailing semicolon in macro definition
  airo: remove trailing semicolon in macro definition
  wilc1000: added queue support for WMM
  wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt()
  wilc1000: free resource in wilc_wlan_txq_add_mgmt_pkt() for failure path
  wilc1000: free resource in wilc_wlan_txq_add_net_pkt() for failure path
  wilc1000: added 'ndo_set_mac_address' callback support
  brcmfmac: expose firmware config files through modinfo
  wlcore: Switch to using the new API kobj_to_dev()
  rtw88: coex: add feature to enhance HID coexistence performance
  rtw88: coex: upgrade coexistence A2DP mechanism
  rtw88: coex: add action for coexistence in hardware initial
  rtw88: coex: add function to avoid cck lock
  rtw88: coex: change the coexistence mechanism for WLAN connected
  rtw88: coex: change the coexistence mechanism for HID
  rtw88: coex: update AFH information while in free-run mode
  rtw88: coex: update the mechanism for A2DP + PAN
  rtw88: coex: add debug message
  rtw88: coex: run coexistence when WLAN entering/leaving LPS
  Revert "rtl8xxxu: Add Buffalo WI-U3-866D to list of supported devices"
  ...
====================

Link: https://lore.kernel.org/r/20201203185732.9CFA5C433ED@smtp.codeaurora.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents fdd8b824 9eb597c7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -144,6 +144,12 @@ properties:
        * reg
        * reg-names

  qcom,ath11k-calibration-variant:
    $ref: /schemas/types.yaml#/definitions/string
    description:
      string to uniquely identify variant of the calibration data in the
      board-2.bin for designs with colliding bus and device specific ids

required:
  - compatible
  - reg
+0 −9
Original line number Diff line number Diff line
@@ -758,7 +758,6 @@ static int parse_ch_cfg(struct mhi_controller *mhi_cntrl,
		mhi_chan->offload_ch = ch_cfg->offload_channel;
		mhi_chan->db_cfg.reset_req = ch_cfg->doorbell_mode_switch;
		mhi_chan->pre_alloc = ch_cfg->auto_queue;
		mhi_chan->auto_start = ch_cfg->auto_start;

		/*
		 * If MHI host allocates buffers, then the channel direction
@@ -1160,11 +1159,6 @@ static int mhi_driver_probe(struct device *dev)
			goto exit_probe;

		ul_chan->xfer_cb = mhi_drv->ul_xfer_cb;
		if (ul_chan->auto_start) {
			ret = mhi_prepare_channel(mhi_cntrl, ul_chan);
			if (ret)
				goto exit_probe;
		}
	}

	ret = -EINVAL;
@@ -1198,9 +1192,6 @@ static int mhi_driver_probe(struct device *dev)
	if (ret)
		goto exit_probe;

	if (dl_chan && dl_chan->auto_start)
		mhi_prepare_channel(mhi_cntrl, dl_chan);

	mhi_device_put(mhi_dev);

	return ret;
+0 −1
Original line number Diff line number Diff line
@@ -563,7 +563,6 @@ struct mhi_chan {
	bool configured;
	bool offload_ch;
	bool pre_alloc;
	bool auto_start;
	bool wake_capable;
};

+84 −1
Original line number Diff line number Diff line
@@ -651,6 +651,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
	[ATH10K_FW_FEATURE_NON_BMI] = "non-bmi",
	[ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL] = "single-chan-info-per-channel",
	[ATH10K_FW_FEATURE_PEER_FIXED_RATE] = "peer-fixed-rate",
	[ATH10K_FW_FEATURE_IRAM_RECOVERY] = "iram-recovery",
};

static unsigned int ath10k_core_get_fw_feature_str(char *buf,
@@ -2604,6 +2605,78 @@ static int ath10k_core_compat_services(struct ath10k *ar)
	return 0;
}

#define TGT_IRAM_READ_PER_ITR (8 * 1024)

static int ath10k_core_copy_target_iram(struct ath10k *ar)
{
	const struct ath10k_hw_mem_layout *hw_mem;
	const struct ath10k_mem_region *tmp, *mem_region = NULL;
	dma_addr_t paddr;
	void *vaddr = NULL;
	u8 num_read_itr;
	int i, ret;
	u32 len, remaining_len;

	hw_mem = ath10k_coredump_get_mem_layout(ar);
	if (!hw_mem)
		return -ENOMEM;

	for (i = 0; i < hw_mem->region_table.size; i++) {
		tmp = &hw_mem->region_table.regions[i];
		if (tmp->type == ATH10K_MEM_REGION_TYPE_REG) {
			mem_region = tmp;
			break;
		}
	}

	if (!mem_region)
		return -ENOMEM;

	for (i = 0; i < ar->wmi.num_mem_chunks; i++) {
		if (ar->wmi.mem_chunks[i].req_id ==
		    WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID) {
			vaddr = ar->wmi.mem_chunks[i].vaddr;
			len = ar->wmi.mem_chunks[i].len;
			break;
		}
	}

	if (!vaddr || !len) {
		ath10k_warn(ar, "No allocated memory for IRAM back up");
		return -ENOMEM;
	}

	len = (len < mem_region->len) ? len : mem_region->len;
	paddr = mem_region->start;
	num_read_itr = len / TGT_IRAM_READ_PER_ITR;
	remaining_len = len % TGT_IRAM_READ_PER_ITR;
	for (i = 0; i < num_read_itr; i++) {
		ret = ath10k_hif_diag_read(ar, paddr, vaddr,
					   TGT_IRAM_READ_PER_ITR);
		if (ret) {
			ath10k_warn(ar, "failed to copy firmware IRAM contents: %d",
				    ret);
			return ret;
		}

		paddr += TGT_IRAM_READ_PER_ITR;
		vaddr += TGT_IRAM_READ_PER_ITR;
	}

	if (remaining_len) {
		ret = ath10k_hif_diag_read(ar, paddr, vaddr, remaining_len);
		if (ret) {
			ath10k_warn(ar, "failed to copy firmware IRAM contents: %d",
				    ret);
			return ret;
		}
	}

	ath10k_dbg(ar, ATH10K_DBG_BOOT, "target IRAM back up completed\n");

	return 0;
}

int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		      const struct ath10k_fw_components *fw)
{
@@ -2636,7 +2709,7 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
		if (status)
			goto err;

		/* Some of of qca988x solutions are having global reset issue
		/* Some of qca988x solutions are having global reset issue
		 * during target initialization. Bypassing PLL setting before
		 * downloading firmware and letting the SoC run on REF_CLK is
		 * fixing the problem. Corresponding firmware change is also
@@ -2765,6 +2838,16 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
	ath10k_dbg(ar, ATH10K_DBG_BOOT, "firmware %s booted\n",
		   ar->hw->wiphy->fw_version);

	if (test_bit(ATH10K_FW_FEATURE_IRAM_RECOVERY,
		     ar->running_fw->fw_file.fw_features)) {
		status = ath10k_core_copy_target_iram(ar);
		if (status) {
			ath10k_warn(ar, "failed to copy target iram contents: %d",
				    status);
			goto err_hif_stop;
		}
	}

	if (test_bit(WMI_SERVICE_EXT_RES_CFG_SUPPORT, ar->wmi.svc_map) &&
	    mode == ATH10K_FIRMWARE_MODE_NORMAL) {
		val = 0;
+8 −0
Original line number Diff line number Diff line
@@ -84,6 +84,11 @@

#define ATH10K_MAX_RETRY_COUNT 30

#define ATH10K_ITER_NORMAL_FLAGS (IEEE80211_IFACE_ITER_NORMAL | \
				  IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER)
#define ATH10K_ITER_RESUME_FLAGS (IEEE80211_IFACE_ITER_RESUME_ALL |\
				  IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER)

struct ath10k;

static inline const char *ath10k_bus_str(enum ath10k_bus bus)
@@ -829,6 +834,9 @@ enum ath10k_fw_features {
	/* Firmware allows setting peer fixed rate */
	ATH10K_FW_FEATURE_PEER_FIXED_RATE = 21,

	/* Firmware support IRAM recovery */
	ATH10K_FW_FEATURE_IRAM_RECOVERY = 22,

	/* keep last */
	ATH10K_FW_FEATURE_COUNT,
};
Loading