* [PATCH 0/5] update for 2.6.38
@ 2010-11-23 18:58 Wey-Yi Guy
2010-11-23 18:58 ` [PATCH 1/5] iwlagn: name change for BT config flag Wey-Yi Guy
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy
We add advance power management support for newer devices
We also consider BT coex and shadow register as part of power management
Wey-Yi Guy (5):
iwlagn: name change for BT config flag
iwlwifi: add more power management flags
iwlwifi: consider BT for power management
iwlwifi: power management checking for shadow register
iwlwifi: advance power management support
these patches are also available from wireless-next-2.6 branch on
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
drivers/net/wireless/iwlwifi/iwl-6000.c | 9 +++
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 4 +
drivers/net/wireless/iwlwifi/iwl-commands.h | 12 +++-
drivers/net/wireless/iwlwifi/iwl-core.h | 4 +
drivers/net/wireless/iwlwifi/iwl-power.c | 95 +++++++++++++++++++++++++--
5 files changed, 117 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/5] iwlagn: name change for BT config flag 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy @ 2010-11-23 18:58 ` Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 2/5] iwlwifi: add more power management flags Wey-Yi Guy ` (4 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw) To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy Bit 7 of BT config flag is used to enable/disable PSPoll sync. Make the name to match it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> --- drivers/net/wireless/iwlwifi/iwl-commands.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 9c1b7fb..4028ed3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -2439,8 +2439,9 @@ struct iwl_bt_cmd { #define IWLAGN_BT_FLAG_COEX_MODE_3W 2 #define IWLAGN_BT_FLAG_COEX_MODE_4W 3 -#define IWLAGN_BT_FLAG_UCODE_DEFAULT BIT(6) -#define IWLAGN_BT_FLAG_NOCOEX_NOTIF BIT(7) +#define IWLAGN_BT_FLAG_UCODE_DEFAULT BIT(6) +/* Disable Sync PSPoll on SCO/eSCO */ +#define IWLAGN_BT_FLAG_SYNC_2_BT_DISABLE BIT(7) #define IWLAGN_BT_PRIO_BOOST_MAX 0xFF #define IWLAGN_BT_PRIO_BOOST_MIN 0x00 -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] iwlwifi: add more power management flags 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 1/5] iwlagn: name change for BT config flag Wey-Yi Guy @ 2010-11-23 18:58 ` Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 3/5] iwlwifi: consider BT for power management Wey-Yi Guy ` (3 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw) To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy Adding additional power management option available for the device. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> --- drivers/net/wireless/iwlwifi/iwl-commands.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 4028ed3..f9e7fa4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -2671,6 +2671,11 @@ struct iwl_spectrum_notification { #define IWL_POWER_SLEEP_OVER_DTIM_MSK cpu_to_le16(BIT(2)) #define IWL_POWER_PCI_PM_MSK cpu_to_le16(BIT(3)) #define IWL_POWER_FAST_PD cpu_to_le16(BIT(4)) +#define IWL_POWER_BEACON_FILTERING cpu_to_le16(BIT(5)) +#define IWL_POWER_SHADOW_REG_ENA cpu_to_le16(BIT(6)) +#define IWL_POWER_CT_KILL_SET cpu_to_le16(BIT(7)) +#define IWL_POWER_BT_SCO_ENA cpu_to_le16(BIT(8)) +#define IWL_POWER_ADVANCE_PM_ENA cpu_to_le16(BIT(9)) struct iwl3945_powertable_cmd { __le16 flags; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] iwlwifi: consider BT for power management 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 1/5] iwlagn: name change for BT config flag Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 2/5] iwlwifi: add more power management flags Wey-Yi Guy @ 2010-11-23 18:58 ` Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 4/5] iwlwifi: power management checking for shadow register Wey-Yi Guy ` (2 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw) To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy Check the BT PSPoll flag when fill PM command to uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> --- drivers/net/wireless/iwlwifi/iwl-6000.c | 1 + drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 4 ++++ drivers/net/wireless/iwlwifi/iwl-core.h | 2 ++ drivers/net/wireless/iwlwifi/iwl-power.c | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 0cc66fd..f650282 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c @@ -549,6 +549,7 @@ static struct iwl_bt_params iwl6000_bt_params = { .agg_time_limit = BT_AGG_THRESHOLD_DEF, .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, + .bt_sco_disable = true, }; struct iwl_cfg iwl6000g2a_2agn_cfg = { diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index c4491f7..f8fe5f4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c @@ -1829,6 +1829,10 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) } else { bt_cmd.flags = IWLAGN_BT_FLAG_COEX_MODE_3W << IWLAGN_BT_FLAG_COEX_MODE_SHIFT; + if (priv->cfg->bt_params && + priv->cfg->bt_params->bt_sco_disable) + bt_cmd.flags |= IWLAGN_BT_FLAG_SYNC_2_BT_DISABLE; + if (priv->bt_ch_announce) bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION; IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags); diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 9035cd8..3f7bd40 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h @@ -334,6 +334,7 @@ struct iwl_base_params { * @agg_time_limit: maximum number of uSec in aggregation * @ampdu_factor: Maximum A-MPDU length factor * @ampdu_density: Minimum A-MPDU spacing + * @bt_sco_disable: uCode should not response to BT in SCO/ESCO mode */ struct iwl_bt_params { bool advanced_bt_coexist; @@ -343,6 +344,7 @@ struct iwl_bt_params { u16 agg_time_limit; u8 ampdu_factor; u8 ampdu_density; + bool bt_sco_disable; }; /* * @use_rts_for_aggregation: use rts/cts protection for HT traffic diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index b7abd86..306c852 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c @@ -163,6 +163,15 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, else cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; + if (priv->cfg->bt_params && + priv->cfg->bt_params->advanced_bt_coexist) { + if (!priv->cfg->bt_params->bt_sco_disable) + cmd->flags |= IWL_POWER_BT_SCO_ENA; + else + cmd->flags &= ~IWL_POWER_BT_SCO_ENA; + } + + slp_itrvl = le32_to_cpu(cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1]); if (slp_itrvl > IWL_CONN_MAX_LISTEN_INTERVAL) cmd->sleep_interval[IWL_POWER_VEC_SIZE - 1] = @@ -236,6 +245,14 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv, if (priv->power_data.pci_pm) cmd->flags |= IWL_POWER_PCI_PM_MSK; + if (priv->cfg->bt_params && + priv->cfg->bt_params->advanced_bt_coexist) { + if (!priv->cfg->bt_params->bt_sco_disable) + cmd->flags |= IWL_POWER_BT_SCO_ENA; + else + cmd->flags &= ~IWL_POWER_BT_SCO_ENA; + } + cmd->rx_data_timeout = cpu_to_le32(1000 * dynps_ms); cmd->tx_data_timeout = cpu_to_le32(1000 * dynps_ms); -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] iwlwifi: power management checking for shadow register 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy ` (2 preceding siblings ...) 2010-11-23 18:58 ` [PATCH 3/5] iwlwifi: consider BT for power management Wey-Yi Guy @ 2010-11-23 18:58 ` Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 5/5] iwlwifi: advance power management support Wey-Yi Guy 2010-11-24 17:28 ` [PATCH 0/5] update for 2.6.38 John W. Linville 5 siblings, 0 replies; 8+ messages in thread From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw) To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy If shadow register is enable, modify the power management command to inform uCode Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> --- drivers/net/wireless/iwlwifi/iwl-power.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 306c852..21c5e6a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c @@ -163,6 +163,11 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, else cmd->flags &= ~IWL_POWER_SLEEP_OVER_DTIM_MSK; + if (priv->cfg->base_params->shadow_reg_enable) + cmd->flags |= IWL_POWER_SHADOW_REG_ENA; + else + cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; + if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) { if (!priv->cfg->bt_params->bt_sco_disable) @@ -245,6 +250,11 @@ static void iwl_power_fill_sleep_cmd(struct iwl_priv *priv, if (priv->power_data.pci_pm) cmd->flags |= IWL_POWER_PCI_PM_MSK; + if (priv->cfg->base_params->shadow_reg_enable) + cmd->flags |= IWL_POWER_SHADOW_REG_ENA; + else + cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; + if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) { if (!priv->cfg->bt_params->bt_sco_disable) -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] iwlwifi: advance power management support 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy ` (3 preceding siblings ...) 2010-11-23 18:58 ` [PATCH 4/5] iwlwifi: power management checking for shadow register Wey-Yi Guy @ 2010-11-23 18:58 ` Wey-Yi Guy 2010-11-24 17:28 ` [PATCH 0/5] update for 2.6.38 John W. Linville 5 siblings, 0 replies; 8+ messages in thread From: Wey-Yi Guy @ 2010-11-23 18:58 UTC (permalink / raw) To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy For 6000g2b and up, adding advance power management support for better power consumption Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> --- drivers/net/wireless/iwlwifi/iwl-6000.c | 8 +++ drivers/net/wireless/iwlwifi/iwl-commands.h | 4 +- drivers/net/wireless/iwlwifi/iwl-core.h | 2 + drivers/net/wireless/iwlwifi/iwl-power.c | 68 +++++++++++++++++++++++++-- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index f650282..93e3fe9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c @@ -621,6 +621,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -641,6 +642,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -662,6 +664,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -682,6 +685,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -703,6 +707,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -723,6 +728,7 @@ struct iwl_cfg iwl6000g2b_bg_cfg = { .need_dc_calib = true, .need_temp_offset_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -862,6 +868,7 @@ struct iwl_cfg iwl130_bgn_cfg = { .ht_params = &iwl6000_ht_params, .need_dc_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; @@ -881,6 +888,7 @@ struct iwl_cfg iwl130_bg_cfg = { .bt_params = &iwl6000_bt_params, .need_dc_calib = true, .led_mode = IWL_LED_RF_STATE, + .adv_pm = true, /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, }; diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index f9e7fa4..c9448cb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -2668,6 +2668,8 @@ struct iwl_spectrum_notification { #define IWL_POWER_VEC_SIZE 5 #define IWL_POWER_DRIVER_ALLOW_SLEEP_MSK cpu_to_le16(BIT(0)) +#define IWL_POWER_POWER_SAVE_ENA_MSK cpu_to_le16(BIT(0)) +#define IWL_POWER_POWER_MANAGEMENT_ENA_MSK cpu_to_le16(BIT(1)) #define IWL_POWER_SLEEP_OVER_DTIM_MSK cpu_to_le16(BIT(2)) #define IWL_POWER_PCI_PM_MSK cpu_to_le16(BIT(3)) #define IWL_POWER_FAST_PD cpu_to_le16(BIT(4)) @@ -2675,7 +2677,7 @@ struct iwl_spectrum_notification { #define IWL_POWER_SHADOW_REG_ENA cpu_to_le16(BIT(6)) #define IWL_POWER_CT_KILL_SET cpu_to_le16(BIT(7)) #define IWL_POWER_BT_SCO_ENA cpu_to_le16(BIT(8)) -#define IWL_POWER_ADVANCE_PM_ENA cpu_to_le16(BIT(9)) +#define IWL_POWER_ADVANCE_PM_ENA_MSK cpu_to_le16(BIT(9)) struct iwl3945_powertable_cmd { __le16 flags; diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 3f7bd40..808be73 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h @@ -366,6 +366,7 @@ struct iwl_ht_params { * @need_temp_offset_calib: need to perform temperature offset calibration * @scan_antennas: available antenna for scan operation * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) + * @adv_pm: advance power management * * We enable the driver to be backward compatible wrt API version. The * driver specifies which APIs it supports (with @ucode_api_max being the @@ -413,6 +414,7 @@ struct iwl_cfg { u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; enum iwl_led_mode led_mode; + const bool adv_pm; }; /*************************** diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 21c5e6a..1eec18d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c @@ -75,6 +75,10 @@ struct iwl_power_vec_entry { #define NOSLP cpu_to_le16(0), 0, 0 #define SLP IWL_POWER_DRIVER_ALLOW_SLEEP_MSK, 0, 0 +#define ASLP (IWL_POWER_POWER_SAVE_ENA_MSK | \ + IWL_POWER_POWER_MANAGEMENT_ENA_MSK | \ + IWL_POWER_ADVANCE_PM_ENA_MSK) +#define ASLP_TOUT(T) cpu_to_le32(T) #define TU_TO_USEC 1024 #define SLP_TOUT(T) cpu_to_le32((T) * TU_TO_USEC) #define SLP_VEC(X0, X1, X2, X3, X4) {cpu_to_le32(X0), \ @@ -114,6 +118,52 @@ static const struct iwl_power_vec_entry range_2[IWL_POWER_NUM] = { {{SLP, SLP_TOUT(25), SLP_TOUT(25), SLP_VEC(4, 7, 10, 10, 0xFF)}, 0} }; +/* advance power management */ +/* DTIM 0 - 2 */ +static const struct iwl_power_vec_entry apm_range_0[IWL_POWER_NUM] = { + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 6, 8, 0xFF), ASLP_TOUT(2)}, 2} +}; + + +/* for DTIM period IWL_DTIM_RANGE_0_MAX + 1 through IWL_DTIM_RANGE_1_MAX */ +/* DTIM 3 - 10 */ +static const struct iwl_power_vec_entry apm_range_1[IWL_POWER_NUM] = { + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 6, 8, 0xFF), 0}, 2} +}; + +/* for DTIM period > IWL_DTIM_RANGE_1_MAX */ +/* DTIM 11 - */ +static const struct iwl_power_vec_entry apm_range_2[IWL_POWER_NUM] = { + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 4, 6, 0xFF), 0}, 0}, + {{ASLP, 0, 0, ASLP_TOUT(50), ASLP_TOUT(50), + SLP_VEC(1, 2, 6, 8, 0xFF), ASLP_TOUT(2)}, 2} +}; + static void iwl_static_sleep_cmd(struct iwl_priv *priv, struct iwl_powertable_cmd *cmd, enum iwl_power_level lvl, int period) @@ -124,11 +174,19 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, u8 skip; u32 slp_itrvl; - table = range_2; - if (period <= IWL_DTIM_RANGE_1_MAX) - table = range_1; - if (period <= IWL_DTIM_RANGE_0_MAX) - table = range_0; + if (priv->cfg->adv_pm) { + table = apm_range_2; + if (period <= IWL_DTIM_RANGE_1_MAX) + table = apm_range_1; + if (period <= IWL_DTIM_RANGE_0_MAX) + table = apm_range_0; + } else { + table = range_2; + if (period <= IWL_DTIM_RANGE_1_MAX) + table = range_1; + if (period <= IWL_DTIM_RANGE_0_MAX) + table = range_0; + } BUG_ON(lvl < 0 || lvl >= IWL_POWER_NUM); -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] update for 2.6.38 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy ` (4 preceding siblings ...) 2010-11-23 18:58 ` [PATCH 5/5] iwlwifi: advance power management support Wey-Yi Guy @ 2010-11-24 17:28 ` John W. Linville 2010-11-24 17:30 ` Guy, Wey-Yi 5 siblings, 1 reply; 8+ messages in thread From: John W. Linville @ 2010-11-24 17:28 UTC (permalink / raw) To: Wey-Yi Guy; +Cc: linux-wireless, ipw3945-devel On Tue, Nov 23, 2010 at 10:58:51AM -0800, Wey-Yi Guy wrote: > We add advance power management support for newer devices > We also consider BT coex and shadow register as part of power management > > Wey-Yi Guy (5): > iwlagn: name change for BT config flag > iwlwifi: add more power management flags > iwlwifi: consider BT for power management > iwlwifi: power management checking for shadow register > iwlwifi: advance power management support > > these patches are also available from wireless-next-2.6 branch on > git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git Since I had to rebase wireless-next-2.6, this pull wasn't good. I applied the patches manually. John -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] update for 2.6.38 2010-11-24 17:28 ` [PATCH 0/5] update for 2.6.38 John W. Linville @ 2010-11-24 17:30 ` Guy, Wey-Yi 0 siblings, 0 replies; 8+ messages in thread From: Guy, Wey-Yi @ 2010-11-24 17:30 UTC (permalink / raw) To: John W. Linville Cc: linux-wireless@vger.kernel.org, ipw3945-devel@lists.sourceforge.net On Wed, 2010-11-24 at 09:28 -0800, John W. Linville wrote: > On Tue, Nov 23, 2010 at 10:58:51AM -0800, Wey-Yi Guy wrote: > > We add advance power management support for newer devices > > We also consider BT coex and shadow register as part of power management > > > > Wey-Yi Guy (5): > > iwlagn: name change for BT config flag > > iwlwifi: add more power management flags > > iwlwifi: consider BT for power management > > iwlwifi: power management checking for shadow register > > iwlwifi: advance power management support > > > > these patches are also available from wireless-next-2.6 branch on > > git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git > > Since I had to rebase wireless-next-2.6, this pull wasn't good. > I applied the patches manually. > Thank you very much Wey ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-24 17:31 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-11-23 18:58 [PATCH 0/5] update for 2.6.38 Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 1/5] iwlagn: name change for BT config flag Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 2/5] iwlwifi: add more power management flags Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 3/5] iwlwifi: consider BT for power management Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 4/5] iwlwifi: power management checking for shadow register Wey-Yi Guy 2010-11-23 18:58 ` [PATCH 5/5] iwlwifi: advance power management support Wey-Yi Guy 2010-11-24 17:28 ` [PATCH 0/5] update for 2.6.38 John W. Linville 2010-11-24 17:30 ` Guy, Wey-Yi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox