Lines Matching defs:pulse

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