Lines Matching full:pulse

248 				     struct mt76x02_dfs_hw_pulse *pulse)  in mt76x02_dfs_get_hw_pulse()  argument
253 data = (MT_DFS_CH_EN << 16) | pulse->engine; in mt76x02_dfs_get_hw_pulse()
257 pulse->period = mt76_rr(dev, MT_BBP(DFS, 19)); in mt76x02_dfs_get_hw_pulse()
260 pulse->w1 = mt76_rr(dev, MT_BBP(DFS, 20)); in mt76x02_dfs_get_hw_pulse()
261 pulse->w2 = mt76_rr(dev, MT_BBP(DFS, 23)); in mt76x02_dfs_get_hw_pulse()
264 pulse->burst = mt76_rr(dev, MT_BBP(DFS, 22)); in mt76x02_dfs_get_hw_pulse()
268 struct mt76x02_dfs_hw_pulse *pulse) in mt76x02_dfs_check_hw_pulse() argument
272 if (!pulse->period || !pulse->w1) in mt76x02_dfs_check_hw_pulse()
277 if (pulse->engine > 3) in mt76x02_dfs_check_hw_pulse()
280 if (pulse->engine == 3) { in mt76x02_dfs_check_hw_pulse()
285 /* check short pulse*/ in mt76x02_dfs_check_hw_pulse()
286 if (pulse->w1 < 120) in mt76x02_dfs_check_hw_pulse()
287 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse()
288 (pulse->period <= 4700 || in mt76x02_dfs_check_hw_pulse()
289 pulse->period >= 6400) && in mt76x02_dfs_check_hw_pulse()
290 (pulse->period <= 6800 || in mt76x02_dfs_check_hw_pulse()
291 pulse->period >= 10200) && in mt76x02_dfs_check_hw_pulse()
292 pulse->period <= 61600); in mt76x02_dfs_check_hw_pulse()
293 else if (pulse->w1 < 130) /* 120 - 130 */ in mt76x02_dfs_check_hw_pulse()
294 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse()
295 pulse->period <= 61600); in mt76x02_dfs_check_hw_pulse()
297 ret = (pulse->period >= 3500 && in mt76x02_dfs_check_hw_pulse()
298 pulse->period <= 10100); in mt76x02_dfs_check_hw_pulse()
301 if (pulse->engine >= 3) in mt76x02_dfs_check_hw_pulse()
304 ret = (pulse->period >= 4900 && in mt76x02_dfs_check_hw_pulse()
305 (pulse->period <= 10200 || in mt76x02_dfs_check_hw_pulse()
306 pulse->period >= 12400) && in mt76x02_dfs_check_hw_pulse()
307 pulse->period <= 100100); in mt76x02_dfs_check_hw_pulse()
313 if (pulse->w1 <= 130) in mt76x02_dfs_check_hw_pulse()
314 ret = (pulse->period >= 28360 && in mt76x02_dfs_check_hw_pulse()
315 (pulse->period <= 28700 || in mt76x02_dfs_check_hw_pulse()
316 pulse->period >= 76900) && in mt76x02_dfs_check_hw_pulse()
317 pulse->period <= 76940); in mt76x02_dfs_check_hw_pulse()
321 if (pulse->engine > 3) in mt76x02_dfs_check_hw_pulse()
324 if (pulse->engine == 3) { in mt76x02_dfs_check_hw_pulse()
329 /* check short pulse*/ in mt76x02_dfs_check_hw_pulse()
330 if (pulse->w1 < 120) in mt76x02_dfs_check_hw_pulse()
331 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse()
332 (pulse->period <= 4700 || in mt76x02_dfs_check_hw_pulse()
333 pulse->period >= 6400) && in mt76x02_dfs_check_hw_pulse()
334 (pulse->period <= 6800 || in mt76x02_dfs_check_hw_pulse()
335 pulse->period >= 27560) && in mt76x02_dfs_check_hw_pulse()
336 (pulse->period <= 27960 || in mt76x02_dfs_check_hw_pulse()
337 pulse->period >= 28360) && in mt76x02_dfs_check_hw_pulse()
338 (pulse->period <= 28700 || in mt76x02_dfs_check_hw_pulse()
339 pulse->period >= 79900) && in mt76x02_dfs_check_hw_pulse()
340 pulse->period <= 80100); in mt76x02_dfs_check_hw_pulse()
341 else if (pulse->w1 < 130) /* 120 - 130 */ in mt76x02_dfs_check_hw_pulse()
342 ret = (pulse->period >= 2900 && in mt76x02_dfs_check_hw_pulse()
343 (pulse->period <= 10100 || in mt76x02_dfs_check_hw_pulse()
344 pulse->period >= 27560) && in mt76x02_dfs_check_hw_pulse()
345 (pulse->period <= 27960 || in mt76x02_dfs_check_hw_pulse()
346 pulse->period >= 28360) && in mt76x02_dfs_check_hw_pulse()
347 (pulse->period <= 28700 || in mt76x02_dfs_check_hw_pulse()
348 pulse->period >= 79900) && in mt76x02_dfs_check_hw_pulse()
349 pulse->period <= 80100); in mt76x02_dfs_check_hw_pulse()
351 ret = (pulse->period >= 3900 && in mt76x02_dfs_check_hw_pulse()
352 pulse->period <= 10100); in mt76x02_dfs_check_hw_pulse()
368 * 2nd: DFS_R37[21:0]: pulse time in mt76x02_dfs_fetch_event()
369 * 3rd: DFS_R37[11:0]: pulse width in mt76x02_dfs_fetch_event()
645 struct mt76x02_dfs_hw_pulse pulse; in mt76x02_dfs_tasklet() local
650 pulse.engine = i; in mt76x02_dfs_tasklet()
651 mt76x02_dfs_get_hw_pulse(dev, &pulse); in mt76x02_dfs_tasklet()
653 if (!mt76x02_dfs_check_hw_pulse(dev, &pulse)) { in mt76x02_dfs_tasklet()