Lines Matching refs:link
38 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00link_antenna_get_link_rssi()
40 if (rt2x00dev->link.qual.rx_success) in rt2x00link_antenna_get_link_rssi()
48 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00link_antenna_get_rssi_history()
58 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00link_antenna_update_rssi_history()
64 ewma_rssi_init(&rt2x00dev->link.ant.rssi_ant); in rt2x00link_antenna_reset()
69 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00lib_antenna_diversity_sample()
110 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00lib_antenna_diversity_eval()
150 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00lib_antenna_diversity()
171 } else if (rt2x00dev->link.count & 1) { in rt2x00lib_antenna_diversity()
183 struct link *link = &rt2x00dev->link; in rt2x00link_update_stats() local
184 struct link_qual *qual = &rt2x00dev->link.qual; in rt2x00link_update_stats()
185 struct link_ant *ant = &rt2x00dev->link.ant; in rt2x00link_update_stats()
212 ewma_rssi_add(&link->avg_rssi, -rxdesc->rssi); in rt2x00link_update_stats()
222 struct link *link = &rt2x00dev->link; in rt2x00link_start_tuner() local
244 &link->work, LINK_TUNE_INTERVAL); in rt2x00link_start_tuner()
249 cancel_delayed_work_sync(&rt2x00dev->link.work); in rt2x00link_stop_tuner()
254 struct link_qual *qual = &rt2x00dev->link.qual; in rt2x00link_reset_tuner()
268 rt2x00dev->link.count = 0; in rt2x00link_reset_tuner()
270 ewma_rssi_init(&rt2x00dev->link.avg_rssi); in rt2x00link_reset_tuner()
290 struct link_qual *qual = &rt2x00dev->link.qual; in rt2x00link_reset_qual()
298 static void rt2x00link_tuner_sta(struct rt2x00_dev *rt2x00dev, struct link *link) in rt2x00link_tuner_sta() argument
300 struct link_qual *qual = &rt2x00dev->link.qual; in rt2x00link_tuner_sta()
317 qual->rssi = rt2x00link_get_avg_rssi(&link->avg_rssi); in rt2x00link_tuner_sta()
325 rt2x00dev->ops->lib->link_tuner(rt2x00dev, qual, link->count); in rt2x00link_tuner_sta()
344 container_of(work, struct rt2x00_dev, link.work.work); in rt2x00link_tuner()
345 struct link *link = &rt2x00dev->link; in rt2x00link_tuner() local
359 rt2x00link_tuner_sta(rt2x00dev, link); in rt2x00link_tuner()
362 (link->count % (AGC_SECONDS / LINK_TUNE_SECONDS)) == 0) in rt2x00link_tuner()
367 (link->count % (VCO_SECONDS / LINK_TUNE_SECONDS)) == 0) in rt2x00link_tuner()
375 link->count++; in rt2x00link_tuner()
379 &link->work, LINK_TUNE_INTERVAL); in rt2x00link_tuner()
384 struct link *link = &rt2x00dev->link; in rt2x00link_start_watchdog() local
387 rt2x00dev->ops->lib->watchdog && link->watchdog) in rt2x00link_start_watchdog()
389 &link->watchdog_work, in rt2x00link_start_watchdog()
390 link->watchdog_interval); in rt2x00link_start_watchdog()
395 cancel_delayed_work_sync(&rt2x00dev->link.watchdog_work); in rt2x00link_stop_watchdog()
401 container_of(work, struct rt2x00_dev, link.watchdog_work.work); in rt2x00link_watchdog()
402 struct link *link = &rt2x00dev->link; in rt2x00link_watchdog() local
415 &link->watchdog_work, in rt2x00link_watchdog()
416 link->watchdog_interval); in rt2x00link_watchdog()
421 struct link *link = &rt2x00dev->link; in rt2x00link_register() local
423 INIT_DELAYED_WORK(&link->work, rt2x00link_tuner); in rt2x00link_register()
424 INIT_DELAYED_WORK(&link->watchdog_work, rt2x00link_watchdog); in rt2x00link_register()
426 if (link->watchdog_interval == 0) in rt2x00link_register()
427 link->watchdog_interval = WATCHDOG_INTERVAL; in rt2x00link_register()