Commit e85498b2 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville
Browse files

iwmc3200wifi: CT kill support



We set the initial CT (Temperature control) value to 110 degrees.
If the chip goes over that threshold, we hard block the device which will turn
it down. At the same time we schedule a 30 seconds delayed work that unblock
the device (and userspace is supposed to bring it back up), hoping that the
chip will have cooled down by then...

Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a82aedbf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -274,6 +274,17 @@ int iwm_send_calib_results(struct iwm_priv *iwm)
	return ret;
}

int iwm_send_ct_kill_cfg(struct iwm_priv *iwm, u8 entry, u8 exit)
{
	struct iwm_ct_kill_cfg_cmd cmd;

	cmd.entry_threshold = entry;
	cmd.exit_threshold = exit;

	return iwm_send_lmac_ptrough_cmd(iwm, REPLY_CT_KILL_CONFIG_CMD, &cmd,
					 sizeof(struct iwm_ct_kill_cfg_cmd), 0);
}

int iwm_send_umac_reset(struct iwm_priv *iwm, __le32 reset_flags, bool resp)
{
	struct iwm_udma_wifi_cmd udma_cmd = UDMA_UMAC_INIT;
+1 −0
Original line number Diff line number Diff line
@@ -396,6 +396,7 @@ int iwm_send_init_calib_cfg(struct iwm_priv *iwm, u8 calib_requested);
int iwm_send_periodic_calib_cfg(struct iwm_priv *iwm, u8 calib_requested);
int iwm_send_calib_results(struct iwm_priv *iwm);
int iwm_store_rxiq_calib_result(struct iwm_priv *iwm);
int iwm_send_ct_kill_cfg(struct iwm_priv *iwm, u8 entry, u8 exit);

/* UMAC commands */
int iwm_send_wifi_if_cmd(struct iwm_priv *iwm, void *payload, u16 payload_size,
+2 −0
Original line number Diff line number Diff line
@@ -398,6 +398,8 @@ int iwm_load_fw(struct iwm_priv *iwm)
	iwm_send_prio_table(iwm);
	iwm_send_calib_results(iwm);
	iwm_send_periodic_calib_cfg(iwm, periodic_calib_map);
	iwm_send_ct_kill_cfg(iwm, iwm->conf.ct_kill_entry,
			     iwm->conf.ct_kill_exit);

	return 0;

+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@ struct iwm_conf {
	u32 sdio_ior_timeout;
	unsigned long calib_map;
	unsigned long expected_calib_map;
	u8 ct_kill_entry;
	u8 ct_kill_exit;
	bool reset_on_fatal_err;
	bool auto_connect;
	bool wimax_not_present;
@@ -276,6 +278,7 @@ struct iwm_priv {
	struct iw_statistics wstats;
	struct delayed_work stats_request;
	struct delayed_work disconnect;
	struct delayed_work ct_kill_delay;

	struct iwm_debugfs dbg;

+8 −0
Original line number Diff line number Diff line
@@ -187,6 +187,14 @@ struct iwm_coex_prio_table_cmd {
				     COEX_EVT_FLAG_MEDIUM_ACTV_NTFY_MSK | \
				     COEX_EVT_FLAG_DELAY_MEDIUM_FREE_NTFY_MSK)

/* CT kill config command */
struct iwm_ct_kill_cfg_cmd {
	u32 exit_threshold;
	u32 reserved;
	u32 entry_threshold;
} __attribute__ ((packed));


/* LMAC OP CODES */
#define REPLY_PAD			0x0
#define REPLY_ALIVE			0x1
Loading