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

Commit ca579617 authored by Mohamed Abbas's avatar Mohamed Abbas Committed by John W. Linville
Browse files

iwlwifi: add power save to 5000 HW



This patch adds support for power save for 5000 HW.

Signed-off-by: default avatarMohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent adf044c8
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -875,18 +875,6 @@ static int iwl4965_hw_set_hw_params(struct iwl_priv *priv)
	return 0;
}

/* set card power command */
static int iwl4965_set_power(struct iwl_priv *priv,
		      void *cmd)
{
	int ret = 0;

	ret = iwl_send_cmd_pdu_async(priv, POWER_TABLE_CMD,
				    sizeof(struct iwl4965_powertable_cmd),
				    cmd, NULL);
	return ret;
}

static s32 iwl4965_math_div_round(s32 num, s32 denom, s32 *res)
{
	s32 sign = 1;
@@ -2440,7 +2428,6 @@ static struct iwl_lib_ops iwl4965_lib = {
		.check_version = iwl4965_eeprom_check_version,
		.query_addr = iwlcore_eeprom_query_addr,
	},
	.set_power = iwl4965_set_power,
	.send_tx_power	= iwl4965_send_tx_power,
	.update_chain_flags = iwl4965_update_chain_flags,
	.temperature = iwl4965_temperature_calib,
+1 −0
Original line number Diff line number Diff line
@@ -1474,6 +1474,7 @@ static struct iwl_lib_ops iwl5000_lib = {
	.alive_notify = iwl5000_alive_notify,
	.send_tx_power = iwl5000_send_tx_power,
	.temperature = iwl5000_temperature,
	.update_chain_flags = iwl4965_update_chain_flags,
	.apm_ops = {
		.init =	iwl5000_apm_init,
		.reset = iwl5000_apm_reset,
+2 −2
Original line number Diff line number Diff line
@@ -1993,7 +1993,7 @@ struct iwl4965_spectrum_notification {
 *****************************************************************************/

/**
 * struct iwl4965_powertable_cmd - Power Table Command
 * struct iwl_powertable_cmd - Power Table Command
 * @flags: See below:
 *
 * POWER_TABLE_CMD = 0x77 (command, has simple generic response)
@@ -2027,7 +2027,7 @@ struct iwl4965_spectrum_notification {
#define IWL_POWER_PCI_PM_MSK			__constant_cpu_to_le16(1 << 3)
#define IWL_POWER_FAST_PD			__constant_cpu_to_le16(1 << 4)

struct iwl4965_powertable_cmd {
struct iwl_powertable_cmd {
	__le16 flags;
	u8 keep_alive_seconds;
	u8 debug_flags;
+0 −1
Original line number Diff line number Diff line
@@ -139,7 +139,6 @@ struct iwl_lib_ops {
		int (*set_pwr_src)(struct iwl_priv *priv, enum iwl_pwr_src src);
	} apm_ops;
	/* power */
	int (*set_power)(struct iwl_priv *priv, void *cmd);
	int (*send_tx_power) (struct iwl_priv *priv);
	void (*update_chain_flags)(struct iwl_priv *priv);
	void (*temperature) (struct iwl_priv *priv);
+2 −1
Original line number Diff line number Diff line
@@ -283,7 +283,7 @@ struct iwl_cmd {
		u32 val32;
		struct iwl4965_bt_cmd bt;
		struct iwl4965_rxon_time_cmd rxon_time;
		struct iwl4965_powertable_cmd powertable;
		struct iwl_powertable_cmd powertable;
		struct iwl_qosparam_cmd qosparam;
		struct iwl_tx_cmd tx;
		struct iwl4965_tx_beacon_cmd tx_beacon;
@@ -590,6 +590,7 @@ extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
					const u8 *dest, int left);
extern void iwl4965_update_chain_flags(struct iwl_priv *priv);
int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src);
extern int iwl4965_set_power(struct iwl_priv *priv, void *cmd);

extern const u8 iwl_bcast_addr[ETH_ALEN];

Loading