iwlwifi: mvm: Change number of DTIMs to skip semantics
authorAlexander Bondar <alexander.bondar@intel.com>
Tue, 21 May 2013 11:49:09 +0000 (14:49 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 29 May 2013 07:03:23 +0000 (09:03 +0200)
If skip over DTIMs is enabled the driver can specify number of DTIMs
to skip. This parameter in host-device API implies number of DTIM
periods to skip. For example, to skip one DTIM means sleep over two
DTIM periods. Change semantics accordingly. Change this parameter's
default value.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw-api-power.h
drivers/net/wireless/iwlwifi/mvm/power.c

index b6bdfd36bebe92a03bfff84f12ccc04c9cccfa68..d8e19290b0f327f27b29b7d2fc5d716ed781b4de 100644 (file)
@@ -101,7 +101,9 @@ enum iwl_power_flags {
  * @tx_data_timeout:    Minimum time (usec) from last Tx packet for AM to
  *                     PSM transition - legacy PM
  * @sleep_interval:    not in use
- * @num_skip_dtim:     Number of DTIMs to skip if Skip over DTIM flag is set
+ * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag
+ *                     is set. For example, if it is required to skip over
+ *                     one DTIM, this value need to be set to 2 (DTIM periods).
  * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled.
  *                     Default: 80dbm
  */
@@ -113,7 +115,7 @@ struct iwl_powertable_cmd {
        __le32 rx_data_timeout;
        __le32 tx_data_timeout;
        __le32 sleep_interval[IWL_POWER_VEC_SIZE];
-       __le32 num_skip_dtim;
+       __le32 skip_dtim_periods;
        __le32 lprx_rssi_threshold;
 } __packed;
 
index c818d6d6aee66cd5696b83f08d2bb7944789e98c..516e64e7706f69678475ce1281ffff6709996add 100644 (file)
@@ -139,8 +139,8 @@ static void iwl_mvm_power_log(struct iwl_mvm *mvm,
                IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n",
                                cmd->lprx_rssi_threshold);
                if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK))
-                       IWL_DEBUG_POWER(mvm, "DTIMs to skip = %u\n",
-                                       le32_to_cpu(cmd->num_skip_dtim));
+                       IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n",
+                                       le32_to_cpu(cmd->skip_dtim_periods));
        }
 }
 
@@ -188,7 +188,7 @@ void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
            (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP ||
             mvm->cur_ucode == IWL_UCODE_WOWLAN)) {
                cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK);
-               cmd->num_skip_dtim = cpu_to_le32(2);
+               cmd->skip_dtim_periods = cpu_to_le32(3);
        }
 
        /* Check that keep alive period is at least 3 * DTIM */