Lines Matching refs:de
375 static void pri_detector_exit(struct pri_detector *de) in pri_detector_exit() argument
377 pri_detector_reset(de, 0); in pri_detector_exit()
379 kfree(de); in pri_detector_exit()
382 static struct pri_sequence *pri_detector_add_pulse(struct pri_detector *de, in pri_detector_add_pulse() argument
388 const struct radar_detector_specs *rs = de->rs; in pri_detector_add_pulse()
394 if ((ts - de->last_ts) < rs->max_pri_tolerance) in pri_detector_add_pulse()
401 de->last_ts = ts; in pri_detector_add_pulse()
403 max_updated_seq = pseq_handler_add_to_existing_seqs(de, ts); in pri_detector_add_pulse()
405 if (!pseq_handler_create_sequences(de, ts, max_updated_seq)) { in pri_detector_add_pulse()
406 pri_detector_reset(de, ts); in pri_detector_add_pulse()
410 ps = pseq_handler_check_detection(de); in pri_detector_add_pulse()
413 pulse_queue_enqueue(de, ts); in pri_detector_add_pulse()
420 struct pri_detector *de; in pri_detector_init() local
422 de = kzalloc(sizeof(*de), GFP_ATOMIC); in pri_detector_init()
423 if (de == NULL) in pri_detector_init()
425 de->exit = pri_detector_exit; in pri_detector_init()
426 de->add_pulse = pri_detector_add_pulse; in pri_detector_init()
427 de->reset = pri_detector_reset; in pri_detector_init()
429 INIT_LIST_HEAD(&de->sequences); in pri_detector_init()
430 INIT_LIST_HEAD(&de->pulses); in pri_detector_init()
431 de->window_size = rs->pri_max * rs->ppb * rs->num_pri; in pri_detector_init()
432 de->max_count = rs->ppb * 2; in pri_detector_init()
433 de->rs = rs; in pri_detector_init()
436 return de; in pri_detector_init()