Lines Matching refs:dm_digtable

19 	struct dig_t *dm_digtable = &rtlpriv->dm_digtable;  in rtl8723e_dm_initial_gain_min_pwdb()  local
28 if ((dm_digtable->curmultista_cstate == DIG_MULTISTA_CONNECT) && in rtl8723e_dm_initial_gain_min_pwdb()
29 (dm_digtable->cursta_cstate == DIG_STA_CONNECT)) { in rtl8723e_dm_initial_gain_min_pwdb()
38 } else if (dm_digtable->cursta_cstate == DIG_STA_CONNECT || in rtl8723e_dm_initial_gain_min_pwdb()
39 dm_digtable->cursta_cstate == DIG_STA_BEFORE_CONNECT) { in rtl8723e_dm_initial_gain_min_pwdb()
41 } else if (dm_digtable->curmultista_cstate == in rtl8723e_dm_initial_gain_min_pwdb()
100 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl92c_dm_ctrl_initgain_by_fa() local
101 u8 value_igi = dm_digtable->cur_igvalue; in rtl92c_dm_ctrl_initgain_by_fa()
118 dm_digtable->cur_igvalue = value_igi; in rtl92c_dm_ctrl_initgain_by_fa()
125 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl92c_dm_ctrl_initgain_by_rssi() local
127 if (rtlpriv->falsealm_cnt.cnt_all > dm_digtable->fa_highthresh) { in rtl92c_dm_ctrl_initgain_by_rssi()
128 if ((dm_digtable->back_val - 2) < in rtl92c_dm_ctrl_initgain_by_rssi()
129 dm_digtable->back_range_min) in rtl92c_dm_ctrl_initgain_by_rssi()
130 dm_digtable->back_val = in rtl92c_dm_ctrl_initgain_by_rssi()
131 dm_digtable->back_range_min; in rtl92c_dm_ctrl_initgain_by_rssi()
133 dm_digtable->back_val -= 2; in rtl92c_dm_ctrl_initgain_by_rssi()
134 } else if (rtlpriv->falsealm_cnt.cnt_all < dm_digtable->fa_lowthresh) { in rtl92c_dm_ctrl_initgain_by_rssi()
135 if ((dm_digtable->back_val + 2) > in rtl92c_dm_ctrl_initgain_by_rssi()
136 dm_digtable->back_range_max) in rtl92c_dm_ctrl_initgain_by_rssi()
137 dm_digtable->back_val = in rtl92c_dm_ctrl_initgain_by_rssi()
138 dm_digtable->back_range_max; in rtl92c_dm_ctrl_initgain_by_rssi()
140 dm_digtable->back_val += 2; in rtl92c_dm_ctrl_initgain_by_rssi()
143 if ((dm_digtable->rssi_val_min + 10 - dm_digtable->back_val) > in rtl92c_dm_ctrl_initgain_by_rssi()
144 dm_digtable->rx_gain_max) in rtl92c_dm_ctrl_initgain_by_rssi()
145 dm_digtable->cur_igvalue = dm_digtable->rx_gain_max; in rtl92c_dm_ctrl_initgain_by_rssi()
146 else if ((dm_digtable->rssi_val_min + 10 - in rtl92c_dm_ctrl_initgain_by_rssi()
147 dm_digtable->back_val) < dm_digtable->rx_gain_min) in rtl92c_dm_ctrl_initgain_by_rssi()
148 dm_digtable->cur_igvalue = dm_digtable->rx_gain_min; in rtl92c_dm_ctrl_initgain_by_rssi()
150 dm_digtable->cur_igvalue = dm_digtable->rssi_val_min + 10 - in rtl92c_dm_ctrl_initgain_by_rssi()
151 dm_digtable->back_val; in rtl92c_dm_ctrl_initgain_by_rssi()
155 dm_digtable->rssi_val_min, dm_digtable->back_val); in rtl92c_dm_ctrl_initgain_by_rssi()
165 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_initial_gain_multi_sta() local
172 if (!multi_sta || (dm_digtable->cursta_cstate != DIG_STA_DISCONNECT)) { in rtl8723e_dm_initial_gain_multi_sta()
174 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; in rtl8723e_dm_initial_gain_multi_sta()
178 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_0; in rtl8723e_dm_initial_gain_multi_sta()
179 dm_digtable->cur_igvalue = 0x20; in rtl8723e_dm_initial_gain_multi_sta()
183 if (dm_digtable->curmultista_cstate == DIG_MULTISTA_CONNECT) { in rtl8723e_dm_initial_gain_multi_sta()
184 if ((rssi_strength < dm_digtable->rssi_lowthresh) && in rtl8723e_dm_initial_gain_multi_sta()
185 (dm_digtable->dig_ext_port_stage != DIG_EXT_PORT_STAGE_1)) { in rtl8723e_dm_initial_gain_multi_sta()
187 if (dm_digtable->dig_ext_port_stage == in rtl8723e_dm_initial_gain_multi_sta()
189 dm_digtable->cur_igvalue = 0x20; in rtl8723e_dm_initial_gain_multi_sta()
193 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_1; in rtl8723e_dm_initial_gain_multi_sta()
194 } else if (rssi_strength > dm_digtable->rssi_highthresh) { in rtl8723e_dm_initial_gain_multi_sta()
195 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_2; in rtl8723e_dm_initial_gain_multi_sta()
198 } else if (dm_digtable->dig_ext_port_stage != DIG_EXT_PORT_STAGE_0) { in rtl8723e_dm_initial_gain_multi_sta()
199 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_0; in rtl8723e_dm_initial_gain_multi_sta()
200 dm_digtable->cur_igvalue = 0x20; in rtl8723e_dm_initial_gain_multi_sta()
206 dm_digtable->curmultista_cstate, in rtl8723e_dm_initial_gain_multi_sta()
207 dm_digtable->dig_ext_port_stage); in rtl8723e_dm_initial_gain_multi_sta()
213 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_initial_gain_sta() local
217 dm_digtable->presta_cstate, in rtl8723e_dm_initial_gain_sta()
218 dm_digtable->cursta_cstate); in rtl8723e_dm_initial_gain_sta()
220 if (dm_digtable->presta_cstate == dm_digtable->cursta_cstate || in rtl8723e_dm_initial_gain_sta()
221 dm_digtable->cursta_cstate == DIG_STA_BEFORE_CONNECT || in rtl8723e_dm_initial_gain_sta()
222 dm_digtable->cursta_cstate == DIG_STA_CONNECT) { in rtl8723e_dm_initial_gain_sta()
223 if (dm_digtable->cursta_cstate != DIG_STA_DISCONNECT) { in rtl8723e_dm_initial_gain_sta()
224 dm_digtable->rssi_val_min = in rtl8723e_dm_initial_gain_sta()
229 dm_digtable->rssi_val_min = 0; in rtl8723e_dm_initial_gain_sta()
230 dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; in rtl8723e_dm_initial_gain_sta()
231 dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT; in rtl8723e_dm_initial_gain_sta()
232 dm_digtable->cur_igvalue = 0x20; in rtl8723e_dm_initial_gain_sta()
233 dm_digtable->pre_igvalue = 0; in rtl8723e_dm_initial_gain_sta()
241 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_cck_packet_detection_thresh() local
243 if (dm_digtable->cursta_cstate == DIG_STA_CONNECT) { in rtl8723e_dm_cck_packet_detection_thresh()
244 dm_digtable->rssi_val_min = rtl8723e_dm_initial_gain_min_pwdb(hw); in rtl8723e_dm_cck_packet_detection_thresh()
246 if (dm_digtable->pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { in rtl8723e_dm_cck_packet_detection_thresh()
247 if (dm_digtable->rssi_val_min <= 25) in rtl8723e_dm_cck_packet_detection_thresh()
248 dm_digtable->cur_cck_pd_state = in rtl8723e_dm_cck_packet_detection_thresh()
251 dm_digtable->cur_cck_pd_state = in rtl8723e_dm_cck_packet_detection_thresh()
254 if (dm_digtable->rssi_val_min <= 20) in rtl8723e_dm_cck_packet_detection_thresh()
255 dm_digtable->cur_cck_pd_state = in rtl8723e_dm_cck_packet_detection_thresh()
258 dm_digtable->cur_cck_pd_state = in rtl8723e_dm_cck_packet_detection_thresh()
262 dm_digtable->cur_cck_pd_state = CCK_PD_STAGE_MAX; in rtl8723e_dm_cck_packet_detection_thresh()
265 if (dm_digtable->pre_cck_pd_state != dm_digtable->cur_cck_pd_state) { in rtl8723e_dm_cck_packet_detection_thresh()
266 if (dm_digtable->cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { in rtl8723e_dm_cck_packet_detection_thresh()
268 dm_digtable->cur_cck_fa_state = in rtl8723e_dm_cck_packet_detection_thresh()
271 dm_digtable->cur_cck_fa_state = in rtl8723e_dm_cck_packet_detection_thresh()
273 if (dm_digtable->pre_cck_fa_state != in rtl8723e_dm_cck_packet_detection_thresh()
274 dm_digtable->cur_cck_fa_state) { in rtl8723e_dm_cck_packet_detection_thresh()
275 if (dm_digtable->cur_cck_fa_state == in rtl8723e_dm_cck_packet_detection_thresh()
283 dm_digtable->pre_cck_fa_state = in rtl8723e_dm_cck_packet_detection_thresh()
284 dm_digtable->cur_cck_fa_state; in rtl8723e_dm_cck_packet_detection_thresh()
292 dm_digtable->pre_cck_fa_state = 0; in rtl8723e_dm_cck_packet_detection_thresh()
293 dm_digtable->cur_cck_fa_state = 0; in rtl8723e_dm_cck_packet_detection_thresh()
296 dm_digtable->pre_cck_pd_state = dm_digtable->cur_cck_pd_state; in rtl8723e_dm_cck_packet_detection_thresh()
300 "CCKPDStage=%x\n", dm_digtable->cur_cck_pd_state); in rtl8723e_dm_cck_packet_detection_thresh()
308 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_ctrl_initgain_by_twoport() local
314 dm_digtable->cursta_cstate = DIG_STA_CONNECT; in rtl8723e_dm_ctrl_initgain_by_twoport()
316 dm_digtable->cursta_cstate = DIG_STA_DISCONNECT; in rtl8723e_dm_ctrl_initgain_by_twoport()
322 dm_digtable->presta_cstate = dm_digtable->cursta_cstate; in rtl8723e_dm_ctrl_initgain_by_twoport()
329 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_dig() local
333 if (!dm_digtable->dig_enable_flag) in rtl8723e_dm_dig()
420 struct dig_t *dm_digtable = &rtlpriv->dm_digtable; in rtl8723e_dm_write_dig() local
424 dm_digtable->cur_igvalue, dm_digtable->pre_igvalue, in rtl8723e_dm_write_dig()
425 dm_digtable->back_val); in rtl8723e_dm_write_dig()
427 if (dm_digtable->pre_igvalue != dm_digtable->cur_igvalue) { in rtl8723e_dm_write_dig()
429 dm_digtable->cur_igvalue); in rtl8723e_dm_write_dig()
431 dm_digtable->cur_igvalue); in rtl8723e_dm_write_dig()
433 dm_digtable->pre_igvalue = dm_digtable->cur_igvalue; in rtl8723e_dm_write_dig()