Lines Matching refs:dm_dig
326 struct dig_t *dm_dig = &rtlpriv->dm_digtable; in rtl88e_dm_initial_gain_min_pwdb() local
329 if ((dm_dig->curmultista_cstate == DIG_MULTISTA_CONNECT) && in rtl88e_dm_initial_gain_min_pwdb()
330 (dm_dig->cur_sta_cstate == DIG_STA_CONNECT)) { in rtl88e_dm_initial_gain_min_pwdb()
339 } else if (dm_dig->cur_sta_cstate == DIG_STA_CONNECT || in rtl88e_dm_initial_gain_min_pwdb()
340 dm_dig->cur_sta_cstate == DIG_STA_BEFORE_CONNECT) { in rtl88e_dm_initial_gain_min_pwdb()
342 } else if (dm_dig->curmultista_cstate == in rtl88e_dm_initial_gain_min_pwdb()
433 struct dig_t *dm_dig = &rtlpriv->dm_digtable; in rtl88e_dm_cck_packet_detection_thresh() local
436 if (dm_dig->cur_sta_cstate == DIG_STA_CONNECT) { in rtl88e_dm_cck_packet_detection_thresh()
437 dm_dig->rssi_val_min = rtl88e_dm_initial_gain_min_pwdb(hw); in rtl88e_dm_cck_packet_detection_thresh()
438 if (dm_dig->rssi_val_min > 25) { in rtl88e_dm_cck_packet_detection_thresh()
440 } else if ((dm_dig->rssi_val_min <= 25) && in rtl88e_dm_cck_packet_detection_thresh()
441 (dm_dig->rssi_val_min > 10)) { in rtl88e_dm_cck_packet_detection_thresh()
457 if (dm_dig->cur_cck_cca_thres != cur_cck_cca_thresh) in rtl88e_dm_cck_packet_detection_thresh()
460 dm_dig->cur_cck_cca_thres = cur_cck_cca_thresh; in rtl88e_dm_cck_packet_detection_thresh()
461 dm_dig->pre_cck_cca_thres = dm_dig->cur_cck_cca_thres; in rtl88e_dm_cck_packet_detection_thresh()
463 "CCK cca thresh hold =%x\n", dm_dig->cur_cck_cca_thres); in rtl88e_dm_cck_packet_detection_thresh()
471 struct dig_t *dm_dig = &rtlpriv->dm_digtable; in rtl88e_dm_dig() local
475 u8 current_igi = dm_dig->cur_igvalue; in rtl88e_dm_dig()
479 if (!dm_dig->dig_enable_flag) in rtl88e_dm_dig()
485 dm_dig->cur_sta_cstate = DIG_STA_CONNECT; in rtl88e_dm_dig()
487 dm_dig->cur_sta_cstate = DIG_STA_DISCONNECT; in rtl88e_dm_dig()
490 dm_dig->cur_sta_cstate = DIG_STA_DISCONNECT; in rtl88e_dm_dig()
495 dig_dynamic_min = dm_dig->dig_min_0; in rtl88e_dm_dig()
497 !dm_dig->media_connect_0; in rtl88e_dm_dig()
499 dm_dig->rssi_val_min = in rtl88e_dm_dig()
503 if ((dm_dig->rssi_val_min + 20) > dm_dig_max) in rtl88e_dm_dig()
504 dm_dig->rx_gain_max = dm_dig_max; in rtl88e_dm_dig()
505 else if ((dm_dig->rssi_val_min + 20) < dm_dig_min) in rtl88e_dm_dig()
506 dm_dig->rx_gain_max = dm_dig_min; in rtl88e_dm_dig()
508 dm_dig->rx_gain_max = dm_dig->rssi_val_min + 20; in rtl88e_dm_dig()
511 dig_dynamic_min = dm_dig->antdiv_rssi_max; in rtl88e_dm_dig()
513 if (dm_dig->rssi_val_min < dm_dig_min) in rtl88e_dm_dig()
515 else if (dm_dig->rssi_val_min < dig_maxofmin) in rtl88e_dm_dig()
518 dig_dynamic_min = dm_dig->rssi_val_min; in rtl88e_dm_dig()
521 dm_dig->rx_gain_max = dm_dig_max; in rtl88e_dm_dig()
527 dm_dig->large_fa_hit++; in rtl88e_dm_dig()
528 if (dm_dig->forbidden_igi < current_igi) { in rtl88e_dm_dig()
529 dm_dig->forbidden_igi = current_igi; in rtl88e_dm_dig()
530 dm_dig->large_fa_hit = 1; in rtl88e_dm_dig()
533 if (dm_dig->large_fa_hit >= 3) { in rtl88e_dm_dig()
534 if ((dm_dig->forbidden_igi + 1) > in rtl88e_dm_dig()
535 dm_dig->rx_gain_max) in rtl88e_dm_dig()
536 dm_dig->rx_gain_min = in rtl88e_dm_dig()
537 dm_dig->rx_gain_max; in rtl88e_dm_dig()
539 dm_dig->rx_gain_min = in rtl88e_dm_dig()
540 dm_dig->forbidden_igi + 1; in rtl88e_dm_dig()
541 dm_dig->recover_cnt = 3600; in rtl88e_dm_dig()
544 if (dm_dig->recover_cnt != 0) { in rtl88e_dm_dig()
545 dm_dig->recover_cnt--; in rtl88e_dm_dig()
547 if (dm_dig->large_fa_hit == 0) { in rtl88e_dm_dig()
548 if ((dm_dig->forbidden_igi - 1) < in rtl88e_dm_dig()
550 dm_dig->forbidden_igi = dig_dynamic_min; in rtl88e_dm_dig()
551 dm_dig->rx_gain_min = dig_dynamic_min; in rtl88e_dm_dig()
553 dm_dig->forbidden_igi--; in rtl88e_dm_dig()
554 dm_dig->rx_gain_min = in rtl88e_dm_dig()
555 dm_dig->forbidden_igi + 1; in rtl88e_dm_dig()
557 } else if (dm_dig->large_fa_hit == 3) { in rtl88e_dm_dig()
558 dm_dig->large_fa_hit = 0; in rtl88e_dm_dig()
563 if (dm_dig->cur_sta_cstate == DIG_STA_CONNECT) { in rtl88e_dm_dig()
565 current_igi = dm_dig->rssi_val_min; in rtl88e_dm_dig()
591 dm_dig->cur_igvalue = current_igi; in rtl88e_dm_dig()
593 dm_dig->media_connect_0 = in rtl88e_dm_dig()
595 dm_dig->dig_min_0 = dig_dynamic_min; in rtl88e_dm_dig()
691 struct dig_t *dm_dig = &rtlpriv->dm_digtable; in rtl88e_dm_write_dig() local
695 dm_dig->cur_igvalue, dm_dig->pre_igvalue, in rtl88e_dm_write_dig()
696 dm_dig->back_val); in rtl88e_dm_write_dig()
698 if (dm_dig->cur_igvalue > 0x3f) in rtl88e_dm_write_dig()
699 dm_dig->cur_igvalue = 0x3f; in rtl88e_dm_write_dig()
700 if (dm_dig->pre_igvalue != dm_dig->cur_igvalue) { in rtl88e_dm_write_dig()
702 dm_dig->cur_igvalue); in rtl88e_dm_write_dig()
704 dm_dig->pre_igvalue = dm_dig->cur_igvalue; in rtl88e_dm_write_dig()
1452 struct dig_t *dm_dig = &rtlpriv->dm_digtable; in rtl88e_dm_hw_ant_div() local
1546 dm_dig->antdiv_rssi_max = ant_div_max_rssi; in rtl88e_dm_hw_ant_div()
1547 dm_dig->rssi_max = max_rssi; in rtl88e_dm_hw_ant_div()