Lines Matching refs:ipg
190 mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode) in mt7915_tm_set_ipg_params() argument
205 if (ipg < sig_ext + slot_time + sifs) in mt7915_tm_set_ipg_params()
206 ipg = 0; in mt7915_tm_set_ipg_params()
208 if (!ipg) in mt7915_tm_set_ipg_params()
211 ipg -= sig_ext; in mt7915_tm_set_ipg_params()
213 if (ipg <= (TM_MAX_SIFS + slot_time)) { in mt7915_tm_set_ipg_params()
214 sifs = ipg - slot_time; in mt7915_tm_set_ipg_params()
216 u32 val = (ipg + slot_time) / slot_time; in mt7915_tm_set_ipg_params()
224 ipg -= ((1 << cw) - 1) * slot_time; in mt7915_tm_set_ipg_params()
226 aifsn = ipg / slot_time; in mt7915_tm_set_ipg_params()
230 ipg -= aifsn * slot_time; in mt7915_tm_set_ipg_params()
232 if (ipg > TM_DEFAULT_SIFS) in mt7915_tm_set_ipg_params()
233 sifs = min_t(u32, ipg, TM_MAX_SIFS); in mt7915_tm_set_ipg_params()
442 u32 ipg = td->tx_ipg; in mt7915_tm_set_tx_frames() local
460 if (duty_cycle && tx_time && !ipg) { in mt7915_tm_set_tx_frames()
461 ipg = tx_time * 100 / duty_cycle - tx_time; in mt7915_tm_set_tx_frames()
462 } else if (duty_cycle && !tx_time && ipg) { in mt7915_tm_set_tx_frames()
464 tx_time = duty_cycle * ipg / (100 - duty_cycle); in mt7915_tm_set_tx_frames()
467 mt7915_tm_set_ipg_params(phy, ipg, td->tx_rate_mode); in mt7915_tm_set_tx_frames()
470 if (ipg) in mt7915_tm_set_tx_frames()
471 td->tx_queued_limit = MT76_TM_TIMEOUT * 1000000 / ipg / 2; in mt7915_tm_set_tx_frames()