Searched refs:digtable (Results 1 - 3 of 3) sorted by relevance

/linux-4.4.14/drivers/net/wireless/realtek/rtlwifi/rtl8192se/
H A Ddm.c436 struct dig_t *digtable = &rtlpriv->dm_digtable; rtl92s_backoff_enable_flag() local
439 if (falsealm_cnt->cnt_all > digtable->fa_highthresh) { rtl92s_backoff_enable_flag()
440 if ((digtable->back_val - 6) < rtl92s_backoff_enable_flag()
441 digtable->backoffval_range_min) rtl92s_backoff_enable_flag()
442 digtable->back_val = digtable->backoffval_range_min; rtl92s_backoff_enable_flag()
444 digtable->back_val -= 6; rtl92s_backoff_enable_flag()
445 } else if (falsealm_cnt->cnt_all < digtable->fa_lowthresh) { rtl92s_backoff_enable_flag()
446 if ((digtable->back_val + 6) > rtl92s_backoff_enable_flag()
447 digtable->backoffval_range_max) rtl92s_backoff_enable_flag()
448 digtable->back_val = rtl92s_backoff_enable_flag()
449 digtable->backoffval_range_max; rtl92s_backoff_enable_flag()
451 digtable->back_val += 6; rtl92s_backoff_enable_flag()
458 struct dig_t *digtable = &rtlpriv->dm_digtable; _rtl92s_dm_initial_gain_sta_beforeconnect() local
463 if ((digtable->pre_sta_cstate == digtable->cur_sta_cstate) || _rtl92s_dm_initial_gain_sta_beforeconnect()
464 (digtable->cur_sta_cstate == DIG_STA_BEFORE_CONNECT)) { _rtl92s_dm_initial_gain_sta_beforeconnect()
465 if (digtable->cur_sta_cstate == DIG_STA_BEFORE_CONNECT) { _rtl92s_dm_initial_gain_sta_beforeconnect()
469 if (digtable->backoff_enable_flag) _rtl92s_dm_initial_gain_sta_beforeconnect()
472 digtable->back_val = DM_DIG_BACKOFF_MAX; _rtl92s_dm_initial_gain_sta_beforeconnect()
474 if ((digtable->rssi_val + 10 - digtable->back_val) > _rtl92s_dm_initial_gain_sta_beforeconnect()
475 digtable->rx_gain_max) _rtl92s_dm_initial_gain_sta_beforeconnect()
476 digtable->cur_igvalue = _rtl92s_dm_initial_gain_sta_beforeconnect()
477 digtable->rx_gain_max; _rtl92s_dm_initial_gain_sta_beforeconnect()
478 else if ((digtable->rssi_val + 10 - digtable->back_val) _rtl92s_dm_initial_gain_sta_beforeconnect()
479 < digtable->rx_gain_min) _rtl92s_dm_initial_gain_sta_beforeconnect()
480 digtable->cur_igvalue = _rtl92s_dm_initial_gain_sta_beforeconnect()
481 digtable->rx_gain_min; _rtl92s_dm_initial_gain_sta_beforeconnect()
483 digtable->cur_igvalue = digtable->rssi_val + 10 _rtl92s_dm_initial_gain_sta_beforeconnect()
484 - digtable->back_val; _rtl92s_dm_initial_gain_sta_beforeconnect()
487 digtable->cur_igvalue = _rtl92s_dm_initial_gain_sta_beforeconnect()
488 (digtable->cur_igvalue > 0x33) ? _rtl92s_dm_initial_gain_sta_beforeconnect()
489 digtable->cur_igvalue : 0x33; _rtl92s_dm_initial_gain_sta_beforeconnect()
492 digtable->cur_igvalue = _rtl92s_dm_initial_gain_sta_beforeconnect()
493 digtable->rx_gain_max; _rtl92s_dm_initial_gain_sta_beforeconnect()
503 digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; _rtl92s_dm_initial_gain_sta_beforeconnect()
506 digtable->back_val = DM_DIG_BACKOFF_MAX; _rtl92s_dm_initial_gain_sta_beforeconnect()
507 digtable->cur_igvalue = rtlpriv->phy.default_initialgain[0]; _rtl92s_dm_initial_gain_sta_beforeconnect()
508 digtable->pre_igvalue = 0; _rtl92s_dm_initial_gain_sta_beforeconnect()
513 if (digtable->pre_igvalue != rtl_get_bbreg(hw, ROFDM0_XAAGCCORE1, _rtl92s_dm_initial_gain_sta_beforeconnect()
517 if ((digtable->pre_igvalue != digtable->cur_igvalue) || _rtl92s_dm_initial_gain_sta_beforeconnect()
522 initial_gain = (u8)digtable->cur_igvalue; _rtl92s_dm_initial_gain_sta_beforeconnect()
527 digtable->pre_igvalue = digtable->cur_igvalue; _rtl92s_dm_initial_gain_sta_beforeconnect()
569 struct dig_t *digtable = &rtlpriv->dm_digtable; _rtl92s_dm_ctrl_initgain_byrssi() local
578 if (digtable->dig_enable_flag == false) _rtl92s_dm_ctrl_initgain_byrssi()
655 struct dig_t *digtable = &rtlpriv->dm_digtable; _rtl92s_dm_init_dig() local
658 digtable->dig_enable_flag = true; _rtl92s_dm_init_dig()
659 digtable->backoff_enable_flag = true; _rtl92s_dm_init_dig()
663 digtable->dig_algorithm = DIG_ALGO_BY_TOW_PORT; _rtl92s_dm_init_dig()
665 digtable->dig_algorithm = _rtl92s_dm_init_dig()
668 digtable->dig_twoport_algorithm = DIG_TWO_PORT_ALGO_RSSI; _rtl92s_dm_init_dig()
669 digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; _rtl92s_dm_init_dig()
670 /* off=by real rssi value, on=by digtable->rssi_val for new dig */ _rtl92s_dm_init_dig()
671 digtable->dig_dbgmode = DM_DBG_OFF; _rtl92s_dm_init_dig()
672 digtable->dig_slgorithm_switch = 0; _rtl92s_dm_init_dig()
675 digtable->dig_state = DM_STA_DIG_MAX; _rtl92s_dm_init_dig()
676 digtable->dig_highpwrstate = DM_STA_DIG_MAX; _rtl92s_dm_init_dig()
678 digtable->cur_sta_cstate = DIG_STA_DISCONNECT; _rtl92s_dm_init_dig()
679 digtable->pre_sta_cstate = DIG_STA_DISCONNECT; _rtl92s_dm_init_dig()
680 digtable->cur_ap_cstate = DIG_AP_DISCONNECT; _rtl92s_dm_init_dig()
681 digtable->pre_ap_cstate = DIG_AP_DISCONNECT; _rtl92s_dm_init_dig()
683 digtable->rssi_lowthresh = DM_DIG_THRESH_LOW; _rtl92s_dm_init_dig()
684 digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; _rtl92s_dm_init_dig()
686 digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; _rtl92s_dm_init_dig()
687 digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; _rtl92s_dm_init_dig()
689 digtable->rssi_highpower_lowthresh = DM_DIG_HIGH_PWR_THRESH_LOW; _rtl92s_dm_init_dig()
690 digtable->rssi_highpower_highthresh = DM_DIG_HIGH_PWR_THRESH_HIGH; _rtl92s_dm_init_dig()
693 digtable->rssi_val = 50; _rtl92s_dm_init_dig()
694 digtable->back_val = DM_DIG_BACKOFF_MAX; _rtl92s_dm_init_dig()
695 digtable->rx_gain_max = DM_DIG_MAX; _rtl92s_dm_init_dig()
697 digtable->rx_gain_min = DM_DIG_MIN; _rtl92s_dm_init_dig()
699 digtable->backoffval_range_max = DM_DIG_BACKOFF_MAX; _rtl92s_dm_init_dig()
700 digtable->backoffval_range_min = DM_DIG_BACKOFF_MIN; _rtl92s_dm_init_dig()
H A Dphy.c1372 struct dig_t *digtable = &rtlpriv->dm_digtable; rtl92s_phy_set_fw_cmd() local
1520 !digtable->dig_enable_flag) rtl92s_phy_set_fw_cmd()
1527 if ((digtable->dig_ext_port_stage == rtl92s_phy_set_fw_cmd()
1529 (digtable->dig_ext_port_stage == rtl92s_phy_set_fw_cmd()
/linux-4.4.14/drivers/net/wireless/realtek/rtlwifi/rtl8192c/
H A Ddm_common.c313 struct dig_t *digtable = &rtlpriv->dm_digtable; rtl92c_dm_ctrl_initgain_by_rssi() local
318 digtable->large_fa_hit++; rtl92c_dm_ctrl_initgain_by_rssi()
319 if (digtable->forbidden_igi < digtable->cur_igvalue) { rtl92c_dm_ctrl_initgain_by_rssi()
320 digtable->forbidden_igi = digtable->cur_igvalue; rtl92c_dm_ctrl_initgain_by_rssi()
321 digtable->large_fa_hit = 1; rtl92c_dm_ctrl_initgain_by_rssi()
324 if (digtable->large_fa_hit >= 3) { rtl92c_dm_ctrl_initgain_by_rssi()
325 if ((digtable->forbidden_igi + 1) > rtl92c_dm_ctrl_initgain_by_rssi()
326 digtable->rx_gain_max) rtl92c_dm_ctrl_initgain_by_rssi()
327 digtable->rx_gain_min = digtable->rx_gain_max; rtl92c_dm_ctrl_initgain_by_rssi()
329 digtable->rx_gain_min = (digtable->forbidden_igi + 1); rtl92c_dm_ctrl_initgain_by_rssi()
330 digtable->recover_cnt = 3600; /* 3600=2hr */ rtl92c_dm_ctrl_initgain_by_rssi()
334 if (digtable->recover_cnt != 0) { rtl92c_dm_ctrl_initgain_by_rssi()
335 digtable->recover_cnt--; rtl92c_dm_ctrl_initgain_by_rssi()
337 if (digtable->large_fa_hit == 0) { rtl92c_dm_ctrl_initgain_by_rssi()
338 if ((digtable->forbidden_igi-1) < DM_DIG_MIN) { rtl92c_dm_ctrl_initgain_by_rssi()
339 digtable->forbidden_igi = DM_DIG_MIN; rtl92c_dm_ctrl_initgain_by_rssi()
340 digtable->rx_gain_min = DM_DIG_MIN; rtl92c_dm_ctrl_initgain_by_rssi()
342 digtable->forbidden_igi--; rtl92c_dm_ctrl_initgain_by_rssi()
343 digtable->rx_gain_min = digtable->forbidden_igi + 1; rtl92c_dm_ctrl_initgain_by_rssi()
345 } else if (digtable->large_fa_hit == 3) { rtl92c_dm_ctrl_initgain_by_rssi()
346 digtable->large_fa_hit = 0; rtl92c_dm_ctrl_initgain_by_rssi()
355 digtable->fa_lowthresh) { rtl92c_dm_ctrl_initgain_by_rssi()
356 if ((digtable->back_val - 2) < rtl92c_dm_ctrl_initgain_by_rssi()
357 digtable->back_range_min) rtl92c_dm_ctrl_initgain_by_rssi()
358 digtable->back_val = digtable->back_range_min; rtl92c_dm_ctrl_initgain_by_rssi()
360 digtable->back_val -= 2; rtl92c_dm_ctrl_initgain_by_rssi()
362 digtable->fa_lowthresh) { rtl92c_dm_ctrl_initgain_by_rssi()
363 if ((digtable->back_val + 2) > rtl92c_dm_ctrl_initgain_by_rssi()
364 digtable->back_range_max) rtl92c_dm_ctrl_initgain_by_rssi()
365 digtable->back_val = digtable->back_range_max; rtl92c_dm_ctrl_initgain_by_rssi()
367 digtable->back_val += 2; rtl92c_dm_ctrl_initgain_by_rssi()
370 digtable->back_val = DM_DIG_BACKOFF_DEFAULT; rtl92c_dm_ctrl_initgain_by_rssi()
375 digtable->cur_igvalue = digtable->pre_igvalue + 2; rtl92c_dm_ctrl_initgain_by_rssi()
377 digtable->cur_igvalue = digtable->pre_igvalue + 1; rtl92c_dm_ctrl_initgain_by_rssi()
379 digtable->cur_igvalue = digtable->pre_igvalue - 1; rtl92c_dm_ctrl_initgain_by_rssi()
383 if (digtable->cur_igvalue > digtable->rx_gain_max) rtl92c_dm_ctrl_initgain_by_rssi()
384 digtable->cur_igvalue = digtable->rx_gain_max; rtl92c_dm_ctrl_initgain_by_rssi()
386 if (digtable->cur_igvalue < digtable->rx_gain_min) rtl92c_dm_ctrl_initgain_by_rssi()
387 digtable->cur_igvalue = digtable->rx_gain_min; rtl92c_dm_ctrl_initgain_by_rssi()

Completed in 98 milliseconds