Lines Matching refs:tcm

750 	low_latency = mvm->tcm.result.low_latency[mvmvif->id];  in iwl_mvm_tcm_iter()
752 if (!mvm->tcm.result.change[mvmvif->id] && in iwl_mvm_tcm_iter()
792 if (mvm->tcm.data[mvmvif->id].opened_rx_ba_sessions) in iwl_mvm_tcm_uapsd_nonagg_detected_wk()
823 if (mvm->tcm.data[mvmvif->id].uapsd_nonagg_detect.detected) in iwl_mvm_uapsd_agg_disconnect()
826 mvm->tcm.data[mvmvif->id].uapsd_nonagg_detect.detected = true; in iwl_mvm_uapsd_agg_disconnect()
836 u64 bytes = mvm->tcm.data[mac].uapsd_nonagg_detect.rx_bytes; in iwl_mvm_check_uapsd_agg_expected_tpt()
841 rate = ewma_rate_read(&mvm->tcm.data[mac].uapsd_nonagg_detect.rate); in iwl_mvm_check_uapsd_agg_expected_tpt()
843 if (!rate || mvm->tcm.data[mac].opened_rx_ba_sessions || in iwl_mvm_check_uapsd_agg_expected_tpt()
844 mvm->tcm.data[mac].uapsd_nonagg_detect.detected) in iwl_mvm_check_uapsd_agg_expected_tpt()
891 unsigned int elapsed = jiffies_to_msecs(ts - mvm->tcm.ts); in iwl_mvm_calc_tcm_stats()
893 jiffies_to_msecs(ts - mvm->tcm.uapsd_nonagg_ts); in iwl_mvm_calc_tcm_stats()
900 bool handle_ll = time_after(ts, mvm->tcm.ll_ts + MVM_LL_PERIOD); in iwl_mvm_calc_tcm_stats()
903 mvm->tcm.ll_ts = ts; in iwl_mvm_calc_tcm_stats()
905 mvm->tcm.uapsd_nonagg_ts = ts; in iwl_mvm_calc_tcm_stats()
907 mvm->tcm.result.elapsed = elapsed; in iwl_mvm_calc_tcm_stats()
915 struct iwl_mvm_tcm_mac *mdata = &mvm->tcm.data[mac]; in iwl_mvm_calc_tcm_stats()
923 mvm->tcm.result.change[mac] = load != mvm->tcm.result.load[mac]; in iwl_mvm_calc_tcm_stats()
924 mvm->tcm.result.load[mac] = load; in iwl_mvm_calc_tcm_stats()
925 mvm->tcm.result.airtime[mac] = airtime; in iwl_mvm_calc_tcm_stats()
933 mvm->tcm.result.low_latency[mac] = true; in iwl_mvm_calc_tcm_stats()
935 mvm->tcm.result.low_latency[mac] = false; in iwl_mvm_calc_tcm_stats()
942 low_latency |= mvm->tcm.result.low_latency[mac]; in iwl_mvm_calc_tcm_stats()
944 if (!mvm->tcm.result.low_latency[mac] && handle_uapsd) in iwl_mvm_calc_tcm_stats()
955 mvm->tcm.result.global_load = load; in iwl_mvm_calc_tcm_stats()
959 mvm->tcm.result.band_load[i] = band_load; in iwl_mvm_calc_tcm_stats()
995 time_after(ts, mvm->tcm.uapsd_nonagg_ts + in iwl_mvm_recalc_tcm()
998 spin_lock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
999 if (mvm->tcm.paused || !time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) { in iwl_mvm_recalc_tcm()
1000 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1003 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1012 spin_lock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1014 if (!mvm->tcm.paused && time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) { in iwl_mvm_recalc_tcm()
1021 mvm->tcm.ts = ts; in iwl_mvm_recalc_tcm()
1023 schedule_delayed_work(&mvm->tcm.work, work_delay); in iwl_mvm_recalc_tcm()
1025 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1034 tcm.work); in iwl_mvm_tcm_work()
1041 spin_lock_bh(&mvm->tcm.lock); in iwl_mvm_pause_tcm()
1042 mvm->tcm.paused = true; in iwl_mvm_pause_tcm()
1043 spin_unlock_bh(&mvm->tcm.lock); in iwl_mvm_pause_tcm()
1045 cancel_delayed_work_sync(&mvm->tcm.work); in iwl_mvm_pause_tcm()
1053 spin_lock_bh(&mvm->tcm.lock); in iwl_mvm_resume_tcm()
1054 mvm->tcm.ts = jiffies; in iwl_mvm_resume_tcm()
1055 mvm->tcm.ll_ts = jiffies; in iwl_mvm_resume_tcm()
1057 struct iwl_mvm_tcm_mac *mdata = &mvm->tcm.data[mac]; in iwl_mvm_resume_tcm()
1064 if (mvm->tcm.result.low_latency[mac]) in iwl_mvm_resume_tcm()
1069 mvm->tcm.paused = false; in iwl_mvm_resume_tcm()
1075 if (mvm->tcm.result.global_load > IWL_MVM_TRAFFIC_LOW) in iwl_mvm_resume_tcm()
1076 schedule_delayed_work(&mvm->tcm.work, MVM_TCM_PERIOD); in iwl_mvm_resume_tcm()
1078 schedule_delayed_work(&mvm->tcm.work, MVM_LL_PERIOD); in iwl_mvm_resume_tcm()
1080 spin_unlock_bh(&mvm->tcm.lock); in iwl_mvm_resume_tcm()