Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdfeb183 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: move pre-FW configuration to separate function"

parents b1f117a0 e674e6d6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -60,3 +60,15 @@ config WIL6210_PLATFORM_MSM
	---help---
	  Say Y here to enable wil6210 driver support for MSM
	  platform specific features

config WIL6210_DEBUGFS
	bool "wil6210 debugfs support"
	depends on WIL6210
	depends on DEBUG_FS
	default y
	---help---
	  Say Y here to enable wil6210 debugfs support, using the
	  kernel debugfs infrastructure. Select this
	  option if you are interested in debugging the driver.

	  If unsure, say Y to make it easier to debug problems.
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ wil6210-y := main.o
wil6210-y += netdev.o
wil6210-y += cfg80211.o
wil6210-y += pcie_bus.o
wil6210-y += debugfs.o
wil6210-$(CONFIG_WIL6210_DEBUGFS) += debugfs.o
wil6210-y += sysfs.o
wil6210-y += wmi.o
wil6210-y += interrupt.o
+22 −18
Original line number Diff line number Diff line
@@ -934,6 +934,27 @@ int wil_ps_update(struct wil6210_priv *wil, enum wmi_ps_profile_type ps_profile)
	return rc;
}

static void wil_pre_fw_config(struct wil6210_priv *wil)
{
	/* Mark FW as loaded from host */
	wil_s(wil, RGF_USER_USAGE_6, 1);

	/* clear any interrupts which on-card-firmware
	 * may have set
	 */
	wil6210_clear_irq(wil);
	/* CAF_ICR - clear and mask */
	/* it is W1C, clear by writing back same value */
	wil_s(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, ICR), 0);
	wil_w(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, IMV), ~0);

	if (wil->fw_calib_result > 0) {
		__le32 val = cpu_to_le32(wil->fw_calib_result |
						(CALIB_RESULT_SIGNATURE << 8));
		wil_w(wil, RGF_USER_FW_CALIB_RESULT, (u32 __force)val);
	}
}

/*
 * We reset all the structures, and we reset the UMAC.
 * After calling this routine, you're expected to reload
@@ -1031,24 +1052,7 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
		if (rc)
			return rc;

		/* Mark FW as loaded from host */
		wil_s(wil, RGF_USER_USAGE_6, 1);

		/* clear any interrupts which on-card-firmware
		 * may have set
		 */
		wil6210_clear_irq(wil);
		/* CAF_ICR - clear and mask */
		/* it is W1C, clear by writing back same value */
		wil_s(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, ICR), 0);
		wil_w(wil, RGF_CAF_ICR + offsetof(struct RGF_ICR, IMV), ~0);

		if (wil->fw_calib_result > 0) {
			__le32 val = cpu_to_le32(wil->fw_calib_result |
						 (CALIB_RESULT_SIGNATURE << 8));
			wil_w(wil, RGF_USER_FW_CALIB_RESULT, (u32 __force)val);
		}

		wil_pre_fw_config(wil);
		wil_release_cpu(wil);
	}

+5 −0
Original line number Diff line number Diff line
@@ -951,8 +951,13 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
			 struct cfg80211_mgmt_tx_params *params,
			 u64 *cookie);

#if defined(CONFIG_WIL6210_DEBUGFS)
int wil6210_debugfs_init(struct wil6210_priv *wil);
void wil6210_debugfs_remove(struct wil6210_priv *wil);
#else
static inline int wil6210_debugfs_init(struct wil6210_priv *wil) { return 0; }
static inline void wil6210_debugfs_remove(struct wil6210_priv *wil) {}
#endif
int wil6210_sysfs_init(struct wil6210_priv *wil);
void wil6210_sysfs_remove(struct wil6210_priv *wil);
int wil_cid_fill_sinfo(struct wil6210_priv *wil, int cid,
+475 −239

File changed.

Preview size limit exceeded, changes collapsed.