Lines Matching refs:digtable
287 struct dig_t *digtable = &rtlpriv->dm_digtable; in rtl92c_dm_ctrl_initgain_by_rssi() local
292 digtable->large_fa_hit++; in rtl92c_dm_ctrl_initgain_by_rssi()
293 if (digtable->forbidden_igi < digtable->cur_igvalue) { in rtl92c_dm_ctrl_initgain_by_rssi()
294 digtable->forbidden_igi = digtable->cur_igvalue; in rtl92c_dm_ctrl_initgain_by_rssi()
295 digtable->large_fa_hit = 1; in rtl92c_dm_ctrl_initgain_by_rssi()
298 if (digtable->large_fa_hit >= 3) { in rtl92c_dm_ctrl_initgain_by_rssi()
299 if ((digtable->forbidden_igi + 1) > in rtl92c_dm_ctrl_initgain_by_rssi()
300 digtable->rx_gain_max) in rtl92c_dm_ctrl_initgain_by_rssi()
301 digtable->rx_gain_min = digtable->rx_gain_max; in rtl92c_dm_ctrl_initgain_by_rssi()
303 digtable->rx_gain_min = (digtable->forbidden_igi + 1); in rtl92c_dm_ctrl_initgain_by_rssi()
304 digtable->recover_cnt = 3600; /* 3600=2hr */ in rtl92c_dm_ctrl_initgain_by_rssi()
308 if (digtable->recover_cnt != 0) { in rtl92c_dm_ctrl_initgain_by_rssi()
309 digtable->recover_cnt--; in rtl92c_dm_ctrl_initgain_by_rssi()
311 if (digtable->large_fa_hit == 0) { in rtl92c_dm_ctrl_initgain_by_rssi()
312 if ((digtable->forbidden_igi-1) < DM_DIG_MIN) { in rtl92c_dm_ctrl_initgain_by_rssi()
313 digtable->forbidden_igi = DM_DIG_MIN; in rtl92c_dm_ctrl_initgain_by_rssi()
314 digtable->rx_gain_min = DM_DIG_MIN; in rtl92c_dm_ctrl_initgain_by_rssi()
316 digtable->forbidden_igi--; in rtl92c_dm_ctrl_initgain_by_rssi()
317 digtable->rx_gain_min = digtable->forbidden_igi + 1; in rtl92c_dm_ctrl_initgain_by_rssi()
319 } else if (digtable->large_fa_hit == 3) { in rtl92c_dm_ctrl_initgain_by_rssi()
320 digtable->large_fa_hit = 0; in rtl92c_dm_ctrl_initgain_by_rssi()
329 digtable->fa_lowthresh) { in rtl92c_dm_ctrl_initgain_by_rssi()
330 if ((digtable->back_val - 2) < in rtl92c_dm_ctrl_initgain_by_rssi()
331 digtable->back_range_min) in rtl92c_dm_ctrl_initgain_by_rssi()
332 digtable->back_val = digtable->back_range_min; in rtl92c_dm_ctrl_initgain_by_rssi()
334 digtable->back_val -= 2; in rtl92c_dm_ctrl_initgain_by_rssi()
336 digtable->fa_lowthresh) { in rtl92c_dm_ctrl_initgain_by_rssi()
337 if ((digtable->back_val + 2) > in rtl92c_dm_ctrl_initgain_by_rssi()
338 digtable->back_range_max) in rtl92c_dm_ctrl_initgain_by_rssi()
339 digtable->back_val = digtable->back_range_max; in rtl92c_dm_ctrl_initgain_by_rssi()
341 digtable->back_val += 2; in rtl92c_dm_ctrl_initgain_by_rssi()
344 digtable->back_val = DM_DIG_BACKOFF_DEFAULT; in rtl92c_dm_ctrl_initgain_by_rssi()
349 digtable->cur_igvalue = digtable->pre_igvalue + 2; in rtl92c_dm_ctrl_initgain_by_rssi()
351 digtable->cur_igvalue = digtable->pre_igvalue + 1; in rtl92c_dm_ctrl_initgain_by_rssi()
353 digtable->cur_igvalue = digtable->pre_igvalue - 1; in rtl92c_dm_ctrl_initgain_by_rssi()
357 if (digtable->cur_igvalue > digtable->rx_gain_max) in rtl92c_dm_ctrl_initgain_by_rssi()
358 digtable->cur_igvalue = digtable->rx_gain_max; in rtl92c_dm_ctrl_initgain_by_rssi()
360 if (digtable->cur_igvalue < digtable->rx_gain_min) in rtl92c_dm_ctrl_initgain_by_rssi()
361 digtable->cur_igvalue = digtable->rx_gain_min; in rtl92c_dm_ctrl_initgain_by_rssi()