Lines Matching refs:tcm
1074 low_latency = mvm->tcm.result.low_latency[mvmvif->id]; in iwl_mvm_tcm_iter()
1076 if (!mvm->tcm.result.change[mvmvif->id] && in iwl_mvm_tcm_iter()
1123 if (mvm->tcm.data[mvmvif->id].opened_rx_ba_sessions) in iwl_mvm_tcm_uapsd_nonagg_detected_wk()
1154 if (mvm->tcm.data[mvmvif->id].uapsd_nonagg_detect.detected) in iwl_mvm_uapsd_agg_disconnect()
1157 mvm->tcm.data[mvmvif->id].uapsd_nonagg_detect.detected = true; in iwl_mvm_uapsd_agg_disconnect()
1167 u64 bytes = mvm->tcm.data[mac].uapsd_nonagg_detect.rx_bytes; in iwl_mvm_check_uapsd_agg_expected_tpt()
1172 rate = ewma_rate_read(&mvm->tcm.data[mac].uapsd_nonagg_detect.rate); in iwl_mvm_check_uapsd_agg_expected_tpt()
1174 if (!rate || mvm->tcm.data[mac].opened_rx_ba_sessions || in iwl_mvm_check_uapsd_agg_expected_tpt()
1175 mvm->tcm.data[mac].uapsd_nonagg_detect.detected) in iwl_mvm_check_uapsd_agg_expected_tpt()
1222 unsigned int elapsed = jiffies_to_msecs(ts - mvm->tcm.ts); in iwl_mvm_calc_tcm_stats()
1224 jiffies_to_msecs(ts - mvm->tcm.uapsd_nonagg_ts); in iwl_mvm_calc_tcm_stats()
1231 bool handle_ll = time_after(ts, mvm->tcm.ll_ts + MVM_LL_PERIOD); in iwl_mvm_calc_tcm_stats()
1234 mvm->tcm.ll_ts = ts; in iwl_mvm_calc_tcm_stats()
1236 mvm->tcm.uapsd_nonagg_ts = ts; in iwl_mvm_calc_tcm_stats()
1238 mvm->tcm.result.elapsed = elapsed; in iwl_mvm_calc_tcm_stats()
1246 struct iwl_mvm_tcm_mac *mdata = &mvm->tcm.data[mac]; in iwl_mvm_calc_tcm_stats()
1254 mvm->tcm.result.change[mac] = load != mvm->tcm.result.load[mac]; in iwl_mvm_calc_tcm_stats()
1255 mvm->tcm.result.load[mac] = load; in iwl_mvm_calc_tcm_stats()
1256 mvm->tcm.result.airtime[mac] = airtime; in iwl_mvm_calc_tcm_stats()
1264 mvm->tcm.result.low_latency[mac] = true; in iwl_mvm_calc_tcm_stats()
1266 mvm->tcm.result.low_latency[mac] = false; in iwl_mvm_calc_tcm_stats()
1273 low_latency |= mvm->tcm.result.low_latency[mac]; in iwl_mvm_calc_tcm_stats()
1275 if (!mvm->tcm.result.low_latency[mac] && handle_uapsd) in iwl_mvm_calc_tcm_stats()
1286 mvm->tcm.result.global_change = load != mvm->tcm.result.global_load; in iwl_mvm_calc_tcm_stats()
1287 mvm->tcm.result.global_load = load; in iwl_mvm_calc_tcm_stats()
1291 mvm->tcm.result.band_load[i] = band_load; in iwl_mvm_calc_tcm_stats()
1327 time_after(ts, mvm->tcm.uapsd_nonagg_ts + in iwl_mvm_recalc_tcm()
1330 spin_lock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1331 if (mvm->tcm.paused || !time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) { in iwl_mvm_recalc_tcm()
1332 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1335 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1344 spin_lock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1346 if (!mvm->tcm.paused && time_after(ts, mvm->tcm.ts + MVM_TCM_PERIOD)) { in iwl_mvm_recalc_tcm()
1353 mvm->tcm.ts = ts; in iwl_mvm_recalc_tcm()
1355 schedule_delayed_work(&mvm->tcm.work, work_delay); in iwl_mvm_recalc_tcm()
1357 spin_unlock(&mvm->tcm.lock); in iwl_mvm_recalc_tcm()
1366 tcm.work); in iwl_mvm_tcm_work()
1373 spin_lock_bh(&mvm->tcm.lock); in iwl_mvm_pause_tcm()
1374 mvm->tcm.paused = true; in iwl_mvm_pause_tcm()
1375 spin_unlock_bh(&mvm->tcm.lock); in iwl_mvm_pause_tcm()
1377 cancel_delayed_work_sync(&mvm->tcm.work); in iwl_mvm_pause_tcm()
1385 spin_lock_bh(&mvm->tcm.lock); in iwl_mvm_resume_tcm()
1386 mvm->tcm.ts = jiffies; in iwl_mvm_resume_tcm()
1387 mvm->tcm.ll_ts = jiffies; in iwl_mvm_resume_tcm()
1389 struct iwl_mvm_tcm_mac *mdata = &mvm->tcm.data[mac]; in iwl_mvm_resume_tcm()
1396 if (mvm->tcm.result.low_latency[mac]) in iwl_mvm_resume_tcm()
1401 mvm->tcm.paused = false; in iwl_mvm_resume_tcm()
1407 if (mvm->tcm.result.global_load > IWL_MVM_TRAFFIC_LOW) in iwl_mvm_resume_tcm()
1408 schedule_delayed_work(&mvm->tcm.work, MVM_TCM_PERIOD); in iwl_mvm_resume_tcm()
1410 schedule_delayed_work(&mvm->tcm.work, MVM_LL_PERIOD); in iwl_mvm_resume_tcm()
1412 spin_unlock_bh(&mvm->tcm.lock); in iwl_mvm_resume_tcm()