diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index 7c138fedcb19..9e366e28c983 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -1225,6 +1225,28 @@ void iwl_mvm_inactivity_check(struct iwl_mvm *mvm) | |||
1225 | rcu_read_unlock(); | 1225 | rcu_read_unlock(); |
1226 | } | 1226 | } |
1227 | 1227 | ||
1228 | void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, u32 *gp2, u64 *boottime) | ||
1229 | { | ||
1230 | bool ps_disabled; | ||
1231 | |||
1232 | lockdep_assert_held(&mvm->mutex); | ||
1233 | |||
1234 | /* Disable power save when reading GP2 */ | ||
1235 | ps_disabled = mvm->ps_disabled; | ||
1236 | if (!ps_disabled) { | ||
1237 | mvm->ps_disabled = true; | ||
1238 | iwl_mvm_power_update_device(mvm); | ||
1239 | } | ||
1240 | |||
1241 | *gp2 = iwl_read_prph(mvm->trans, DEVICE_SYSTEM_TIME_REG); | ||
1242 | *boottime = ktime_get_boot_ns(); | ||
1243 | |||
1244 | if (!ps_disabled) { | ||
1245 | mvm->ps_disabled = ps_disabled; | ||
1246 | iwl_mvm_power_update_device(mvm); | ||
1247 | } | ||
1248 | } | ||
1249 | |||
1228 | int iwl_mvm_send_lqm_cmd(struct ieee80211_vif *vif, | 1250 | int iwl_mvm_send_lqm_cmd(struct ieee80211_vif *vif, |
1229 | enum iwl_lqm_cmd_operatrions operation, | 1251 | enum iwl_lqm_cmd_operatrions operation, |
1230 | u32 duration, u32 timeout) | 1252 | u32 duration, u32 timeout) |