diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-06-28 19:55:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-29 15:11:06 -0400 |
commit | ab049fbf5ea87fc92441fc5211c315d04a312cca (patch) | |
tree | 6f0c9df0a08fabcd38c11cb19432608165acc7bd | |
parent | a5f377fb9c9758b248773c5b8b1a20d4e7e2c982 (diff) |
rtlwifi: rtl8192de: Fix build errors when using allyes configuration
After adding rtl8192de to linux-next, making the rtlwifi drivers be built-in
results in the following warnings:
LD drivers/net/wireless/rtlwifi/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_on':
(.text+0x11fb6): multiple definition of `rtl92ce_sw_led_on'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa326): first defined here
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o:(.bss+0x0): multiple definition of `dm_digtable'
drivers/net/wireless/rtlwifi/rtl8192c/built-in.o:(.bss+0x0): first defined here
ld: Warning: size of symbol `dm_digtable' changed from 40 in drivers/net/wireless/rtlwifi/rtl8192c/built-in.o to 48 in drivers/net/wireless/rtlwifi/rtl8192de/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_off':
(.text+0x11cfe): multiple definition of `rtl92ce_sw_led_off'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa06e): first defined here
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 176 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/dm.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/led.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/led.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 6 |
6 files changed, 101 insertions, 101 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c index d0baaf269a16..3cd0736fe8e1 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #define UNDEC_SM_PWDB entry_min_undecoratedsmoothed_pwdb | 38 | #define UNDEC_SM_PWDB entry_min_undecoratedsmoothed_pwdb |
39 | 39 | ||
40 | struct dig_t dm_digtable; | 40 | struct dig_t de_digtable; |
41 | 41 | ||
42 | static const u32 ofdmswing_table[OFDM_TABLE_SIZE_92D] = { | 42 | static const u32 ofdmswing_table[OFDM_TABLE_SIZE_92D] = { |
43 | 0x7f8001fe, /* 0, +6.0dB */ | 43 | 0x7f8001fe, /* 0, +6.0dB */ |
@@ -159,27 +159,27 @@ static const u8 cckswing_table_ch14[CCK_TABLE_SIZE][8] = { | |||
159 | 159 | ||
160 | static void rtl92d_dm_diginit(struct ieee80211_hw *hw) | 160 | static void rtl92d_dm_diginit(struct ieee80211_hw *hw) |
161 | { | 161 | { |
162 | dm_digtable.dig_enable_flag = true; | 162 | de_digtable.dig_enable_flag = true; |
163 | dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; | 163 | de_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; |
164 | dm_digtable.cur_igvalue = 0x20; | 164 | de_digtable.cur_igvalue = 0x20; |
165 | dm_digtable.pre_igvalue = 0x0; | 165 | de_digtable.pre_igvalue = 0x0; |
166 | dm_digtable.cursta_connectctate = DIG_STA_DISCONNECT; | 166 | de_digtable.cursta_connectctate = DIG_STA_DISCONNECT; |
167 | dm_digtable.presta_connectstate = DIG_STA_DISCONNECT; | 167 | de_digtable.presta_connectstate = DIG_STA_DISCONNECT; |
168 | dm_digtable.curmultista_connectstate = DIG_MULTISTA_DISCONNECT; | 168 | de_digtable.curmultista_connectstate = DIG_MULTISTA_DISCONNECT; |
169 | dm_digtable.rssi_lowthresh = DM_DIG_THRESH_LOW; | 169 | de_digtable.rssi_lowthresh = DM_DIG_THRESH_LOW; |
170 | dm_digtable.rssi_highthresh = DM_DIG_THRESH_HIGH; | 170 | de_digtable.rssi_highthresh = DM_DIG_THRESH_HIGH; |
171 | dm_digtable.fa_lowthresh = DM_FALSEALARM_THRESH_LOW; | 171 | de_digtable.fa_lowthresh = DM_FALSEALARM_THRESH_LOW; |
172 | dm_digtable.fa_highthresh = DM_FALSEALARM_THRESH_HIGH; | 172 | de_digtable.fa_highthresh = DM_FALSEALARM_THRESH_HIGH; |
173 | dm_digtable.rx_gain_range_max = DM_DIG_FA_UPPER; | 173 | de_digtable.rx_gain_range_max = DM_DIG_FA_UPPER; |
174 | dm_digtable.rx_gain_range_min = DM_DIG_FA_LOWER; | 174 | de_digtable.rx_gain_range_min = DM_DIG_FA_LOWER; |
175 | dm_digtable.backoff_val = DM_DIG_BACKOFF_DEFAULT; | 175 | de_digtable.backoff_val = DM_DIG_BACKOFF_DEFAULT; |
176 | dm_digtable.backoff_val_range_max = DM_DIG_BACKOFF_MAX; | 176 | de_digtable.backoff_val_range_max = DM_DIG_BACKOFF_MAX; |
177 | dm_digtable.backoff_val_range_min = DM_DIG_BACKOFF_MIN; | 177 | de_digtable.backoff_val_range_min = DM_DIG_BACKOFF_MIN; |
178 | dm_digtable.pre_cck_pd_state = CCK_PD_STAGE_LOWRSSI; | 178 | de_digtable.pre_cck_pd_state = CCK_PD_STAGE_LOWRSSI; |
179 | dm_digtable.cur_cck_pd_state = CCK_PD_STAGE_MAX; | 179 | de_digtable.cur_cck_pd_state = CCK_PD_STAGE_MAX; |
180 | dm_digtable.large_fa_hit = 0; | 180 | de_digtable.large_fa_hit = 0; |
181 | dm_digtable.recover_cnt = 0; | 181 | de_digtable.recover_cnt = 0; |
182 | dm_digtable.forbidden_igi = DM_DIG_FA_LOWER; | 182 | de_digtable.forbidden_igi = DM_DIG_FA_LOWER; |
183 | } | 183 | } |
184 | 184 | ||
185 | static void rtl92d_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw) | 185 | static void rtl92d_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw) |
@@ -273,35 +273,35 @@ static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw) | |||
273 | /* Determine the minimum RSSI */ | 273 | /* Determine the minimum RSSI */ |
274 | if ((mac->link_state < MAC80211_LINKED) && | 274 | if ((mac->link_state < MAC80211_LINKED) && |
275 | (rtlpriv->dm.UNDEC_SM_PWDB == 0)) { | 275 | (rtlpriv->dm.UNDEC_SM_PWDB == 0)) { |
276 | dm_digtable.min_undecorated_pwdb_for_dm = 0; | 276 | de_digtable.min_undecorated_pwdb_for_dm = 0; |
277 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, | 277 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, |
278 | ("Not connected to any\n")); | 278 | ("Not connected to any\n")); |
279 | } | 279 | } |
280 | if (mac->link_state >= MAC80211_LINKED) { | 280 | if (mac->link_state >= MAC80211_LINKED) { |
281 | if (mac->opmode == NL80211_IFTYPE_AP || | 281 | if (mac->opmode == NL80211_IFTYPE_AP || |
282 | mac->opmode == NL80211_IFTYPE_ADHOC) { | 282 | mac->opmode == NL80211_IFTYPE_ADHOC) { |
283 | dm_digtable.min_undecorated_pwdb_for_dm = | 283 | de_digtable.min_undecorated_pwdb_for_dm = |
284 | rtlpriv->dm.UNDEC_SM_PWDB; | 284 | rtlpriv->dm.UNDEC_SM_PWDB; |
285 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, | 285 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, |
286 | ("AP Client PWDB = 0x%lx\n", | 286 | ("AP Client PWDB = 0x%lx\n", |
287 | rtlpriv->dm.UNDEC_SM_PWDB)); | 287 | rtlpriv->dm.UNDEC_SM_PWDB)); |
288 | } else { | 288 | } else { |
289 | dm_digtable.min_undecorated_pwdb_for_dm = | 289 | de_digtable.min_undecorated_pwdb_for_dm = |
290 | rtlpriv->dm.undecorated_smoothed_pwdb; | 290 | rtlpriv->dm.undecorated_smoothed_pwdb; |
291 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, | 291 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, |
292 | ("STA Default Port PWDB = 0x%x\n", | 292 | ("STA Default Port PWDB = 0x%x\n", |
293 | dm_digtable.min_undecorated_pwdb_for_dm)); | 293 | de_digtable.min_undecorated_pwdb_for_dm)); |
294 | } | 294 | } |
295 | } else { | 295 | } else { |
296 | dm_digtable.min_undecorated_pwdb_for_dm = | 296 | de_digtable.min_undecorated_pwdb_for_dm = |
297 | rtlpriv->dm.UNDEC_SM_PWDB; | 297 | rtlpriv->dm.UNDEC_SM_PWDB; |
298 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, | 298 | RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, |
299 | ("AP Ext Port or disconnet PWDB = 0x%x\n", | 299 | ("AP Ext Port or disconnet PWDB = 0x%x\n", |
300 | dm_digtable.min_undecorated_pwdb_for_dm)); | 300 | de_digtable.min_undecorated_pwdb_for_dm)); |
301 | } | 301 | } |
302 | 302 | ||
303 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("MinUndecoratedPWDBForDM =%d\n", | 303 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("MinUndecoratedPWDBForDM =%d\n", |
304 | dm_digtable.min_undecorated_pwdb_for_dm)); | 304 | de_digtable.min_undecorated_pwdb_for_dm)); |
305 | } | 305 | } |
306 | 306 | ||
307 | static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) | 307 | static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) |
@@ -309,27 +309,27 @@ static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) | |||
309 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 309 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
310 | unsigned long flag = 0; | 310 | unsigned long flag = 0; |
311 | 311 | ||
312 | if (dm_digtable.cursta_connectctate == DIG_STA_CONNECT) { | 312 | if (de_digtable.cursta_connectctate == DIG_STA_CONNECT) { |
313 | if (dm_digtable.pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { | 313 | if (de_digtable.pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { |
314 | if (dm_digtable.min_undecorated_pwdb_for_dm <= 25) | 314 | if (de_digtable.min_undecorated_pwdb_for_dm <= 25) |
315 | dm_digtable.cur_cck_pd_state = | 315 | de_digtable.cur_cck_pd_state = |
316 | CCK_PD_STAGE_LOWRSSI; | 316 | CCK_PD_STAGE_LOWRSSI; |
317 | else | 317 | else |
318 | dm_digtable.cur_cck_pd_state = | 318 | de_digtable.cur_cck_pd_state = |
319 | CCK_PD_STAGE_HIGHRSSI; | 319 | CCK_PD_STAGE_HIGHRSSI; |
320 | } else { | 320 | } else { |
321 | if (dm_digtable.min_undecorated_pwdb_for_dm <= 20) | 321 | if (de_digtable.min_undecorated_pwdb_for_dm <= 20) |
322 | dm_digtable.cur_cck_pd_state = | 322 | de_digtable.cur_cck_pd_state = |
323 | CCK_PD_STAGE_LOWRSSI; | 323 | CCK_PD_STAGE_LOWRSSI; |
324 | else | 324 | else |
325 | dm_digtable.cur_cck_pd_state = | 325 | de_digtable.cur_cck_pd_state = |
326 | CCK_PD_STAGE_HIGHRSSI; | 326 | CCK_PD_STAGE_HIGHRSSI; |
327 | } | 327 | } |
328 | } else { | 328 | } else { |
329 | dm_digtable.cur_cck_pd_state = CCK_PD_STAGE_LOWRSSI; | 329 | de_digtable.cur_cck_pd_state = CCK_PD_STAGE_LOWRSSI; |
330 | } | 330 | } |
331 | if (dm_digtable.pre_cck_pd_state != dm_digtable.cur_cck_pd_state) { | 331 | if (de_digtable.pre_cck_pd_state != de_digtable.cur_cck_pd_state) { |
332 | if (dm_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { | 332 | if (de_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { |
333 | rtl92d_acquire_cckandrw_pagea_ctl(hw, &flag); | 333 | rtl92d_acquire_cckandrw_pagea_ctl(hw, &flag); |
334 | rtl_set_bbreg(hw, RCCK0_CCA, BMASKBYTE2, 0x83); | 334 | rtl_set_bbreg(hw, RCCK0_CCA, BMASKBYTE2, 0x83); |
335 | rtl92d_release_cckandrw_pagea_ctl(hw, &flag); | 335 | rtl92d_release_cckandrw_pagea_ctl(hw, &flag); |
@@ -338,13 +338,13 @@ static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) | |||
338 | rtl_set_bbreg(hw, RCCK0_CCA, BMASKBYTE2, 0xcd); | 338 | rtl_set_bbreg(hw, RCCK0_CCA, BMASKBYTE2, 0xcd); |
339 | rtl92d_release_cckandrw_pagea_ctl(hw, &flag); | 339 | rtl92d_release_cckandrw_pagea_ctl(hw, &flag); |
340 | } | 340 | } |
341 | dm_digtable.pre_cck_pd_state = dm_digtable.cur_cck_pd_state; | 341 | de_digtable.pre_cck_pd_state = de_digtable.cur_cck_pd_state; |
342 | } | 342 | } |
343 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CurSTAConnectState=%s\n", | 343 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CurSTAConnectState=%s\n", |
344 | (dm_digtable.cursta_connectctate == DIG_STA_CONNECT ? | 344 | (de_digtable.cursta_connectctate == DIG_STA_CONNECT ? |
345 | "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT"))); | 345 | "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT"))); |
346 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CCKPDStage=%s\n", | 346 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CCKPDStage=%s\n", |
347 | (dm_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ? | 347 | (de_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ? |
348 | "Low RSSI " : "High RSSI "))); | 348 | "Low RSSI " : "High RSSI "))); |
349 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("is92d single phy =%x\n", | 349 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("is92d single phy =%x\n", |
350 | IS_92D_SINGLEPHY(rtlpriv->rtlhal.version))); | 350 | IS_92D_SINGLEPHY(rtlpriv->rtlhal.version))); |
@@ -357,19 +357,19 @@ void rtl92d_dm_write_dig(struct ieee80211_hw *hw) | |||
357 | 357 | ||
358 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("cur_igvalue = 0x%x, " | 358 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("cur_igvalue = 0x%x, " |
359 | "pre_igvalue = 0x%x, backoff_val = %d\n", | 359 | "pre_igvalue = 0x%x, backoff_val = %d\n", |
360 | dm_digtable.cur_igvalue, dm_digtable.pre_igvalue, | 360 | de_digtable.cur_igvalue, de_digtable.pre_igvalue, |
361 | dm_digtable.backoff_val)); | 361 | de_digtable.backoff_val)); |
362 | if (dm_digtable.dig_enable_flag == false) { | 362 | if (de_digtable.dig_enable_flag == false) { |
363 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("DIG is disabled\n")); | 363 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("DIG is disabled\n")); |
364 | dm_digtable.pre_igvalue = 0x17; | 364 | de_digtable.pre_igvalue = 0x17; |
365 | return; | 365 | return; |
366 | } | 366 | } |
367 | if (dm_digtable.pre_igvalue != dm_digtable.cur_igvalue) { | 367 | if (de_digtable.pre_igvalue != de_digtable.cur_igvalue) { |
368 | rtl_set_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f, | 368 | rtl_set_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f, |
369 | dm_digtable.cur_igvalue); | 369 | de_digtable.cur_igvalue); |
370 | rtl_set_bbreg(hw, ROFDM0_XBAGCCORE1, 0x7f, | 370 | rtl_set_bbreg(hw, ROFDM0_XBAGCCORE1, 0x7f, |
371 | dm_digtable.cur_igvalue); | 371 | de_digtable.cur_igvalue); |
372 | dm_digtable.pre_igvalue = dm_digtable.cur_igvalue; | 372 | de_digtable.pre_igvalue = de_digtable.cur_igvalue; |
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
@@ -379,13 +379,13 @@ static void rtl92d_early_mode_enabled(struct rtl_priv *rtlpriv) | |||
379 | (rtlpriv->mac80211.vendor == PEER_CISCO)) { | 379 | (rtlpriv->mac80211.vendor == PEER_CISCO)) { |
380 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 380 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
381 | ("IOT_PEER = CISCO\n")); | 381 | ("IOT_PEER = CISCO\n")); |
382 | if (dm_digtable.last_min_undecorated_pwdb_for_dm >= 50 | 382 | if (de_digtable.last_min_undecorated_pwdb_for_dm >= 50 |
383 | && dm_digtable.min_undecorated_pwdb_for_dm < 50) { | 383 | && de_digtable.min_undecorated_pwdb_for_dm < 50) { |
384 | rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00); | 384 | rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00); |
385 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 385 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
386 | ("Early Mode Off\n")); | 386 | ("Early Mode Off\n")); |
387 | } else if (dm_digtable.last_min_undecorated_pwdb_for_dm <= 55 && | 387 | } else if (de_digtable.last_min_undecorated_pwdb_for_dm <= 55 && |
388 | dm_digtable.min_undecorated_pwdb_for_dm > 55) { | 388 | de_digtable.min_undecorated_pwdb_for_dm > 55) { |
389 | rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f); | 389 | rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f); |
390 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 390 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
391 | ("Early Mode On\n")); | 391 | ("Early Mode On\n")); |
@@ -399,14 +399,14 @@ static void rtl92d_early_mode_enabled(struct rtl_priv *rtlpriv) | |||
399 | static void rtl92d_dm_dig(struct ieee80211_hw *hw) | 399 | static void rtl92d_dm_dig(struct ieee80211_hw *hw) |
400 | { | 400 | { |
401 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 401 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
402 | u8 value_igi = dm_digtable.cur_igvalue; | 402 | u8 value_igi = de_digtable.cur_igvalue; |
403 | struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt); | 403 | struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt); |
404 | 404 | ||
405 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("==>\n")); | 405 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("==>\n")); |
406 | if (rtlpriv->rtlhal.earlymode_enable) { | 406 | if (rtlpriv->rtlhal.earlymode_enable) { |
407 | rtl92d_early_mode_enabled(rtlpriv); | 407 | rtl92d_early_mode_enabled(rtlpriv); |
408 | dm_digtable.last_min_undecorated_pwdb_for_dm = | 408 | de_digtable.last_min_undecorated_pwdb_for_dm = |
409 | dm_digtable.min_undecorated_pwdb_for_dm; | 409 | de_digtable.min_undecorated_pwdb_for_dm; |
410 | } | 410 | } |
411 | if (rtlpriv->dm.dm_initialgain_enable == false) | 411 | if (rtlpriv->dm.dm_initialgain_enable == false) |
412 | return; | 412 | return; |
@@ -424,9 +424,9 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
424 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("progress\n")); | 424 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("progress\n")); |
425 | /* Decide the current status and if modify initial gain or not */ | 425 | /* Decide the current status and if modify initial gain or not */ |
426 | if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) | 426 | if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) |
427 | dm_digtable.cursta_connectctate = DIG_STA_CONNECT; | 427 | de_digtable.cursta_connectctate = DIG_STA_CONNECT; |
428 | else | 428 | else |
429 | dm_digtable.cursta_connectctate = DIG_STA_DISCONNECT; | 429 | de_digtable.cursta_connectctate = DIG_STA_DISCONNECT; |
430 | 430 | ||
431 | /* adjust initial gain according to false alarm counter */ | 431 | /* adjust initial gain according to false alarm counter */ |
432 | if (falsealm_cnt->cnt_all < DM_DIG_FA_TH0) | 432 | if (falsealm_cnt->cnt_all < DM_DIG_FA_TH0) |
@@ -439,64 +439,64 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw) | |||
439 | value_igi += 2; | 439 | value_igi += 2; |
440 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 440 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
441 | ("dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n", | 441 | ("dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n", |
442 | dm_digtable.large_fa_hit, dm_digtable.forbidden_igi)); | 442 | de_digtable.large_fa_hit, de_digtable.forbidden_igi)); |
443 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 443 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
444 | ("dm_DIG() Before: Recover_cnt=%d, rx_gain_range_min=%x\n", | 444 | ("dm_DIG() Before: Recover_cnt=%d, rx_gain_range_min=%x\n", |
445 | dm_digtable.recover_cnt, dm_digtable.rx_gain_range_min)); | 445 | de_digtable.recover_cnt, de_digtable.rx_gain_range_min)); |
446 | 446 | ||
447 | /* deal with abnorally large false alarm */ | 447 | /* deal with abnorally large false alarm */ |
448 | if (falsealm_cnt->cnt_all > 10000) { | 448 | if (falsealm_cnt->cnt_all > 10000) { |
449 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 449 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
450 | ("dm_DIG(): Abnornally false alarm case.\n")); | 450 | ("dm_DIG(): Abnornally false alarm case.\n")); |
451 | 451 | ||
452 | dm_digtable.large_fa_hit++; | 452 | de_digtable.large_fa_hit++; |
453 | if (dm_digtable.forbidden_igi < dm_digtable.cur_igvalue) { | 453 | if (de_digtable.forbidden_igi < de_digtable.cur_igvalue) { |
454 | dm_digtable.forbidden_igi = dm_digtable.cur_igvalue; | 454 | de_digtable.forbidden_igi = de_digtable.cur_igvalue; |
455 | dm_digtable.large_fa_hit = 1; | 455 | de_digtable.large_fa_hit = 1; |
456 | } | 456 | } |
457 | if (dm_digtable.large_fa_hit >= 3) { | 457 | if (de_digtable.large_fa_hit >= 3) { |
458 | if ((dm_digtable.forbidden_igi + 1) > DM_DIG_MAX) | 458 | if ((de_digtable.forbidden_igi + 1) > DM_DIG_MAX) |
459 | dm_digtable.rx_gain_range_min = DM_DIG_MAX; | 459 | de_digtable.rx_gain_range_min = DM_DIG_MAX; |
460 | else | 460 | else |
461 | dm_digtable.rx_gain_range_min = | 461 | de_digtable.rx_gain_range_min = |
462 | (dm_digtable.forbidden_igi + 1); | 462 | (de_digtable.forbidden_igi + 1); |
463 | dm_digtable.recover_cnt = 3600; /* 3600=2hr */ | 463 | de_digtable.recover_cnt = 3600; /* 3600=2hr */ |
464 | } | 464 | } |
465 | } else { | 465 | } else { |
466 | /* Recovery mechanism for IGI lower bound */ | 466 | /* Recovery mechanism for IGI lower bound */ |
467 | if (dm_digtable.recover_cnt != 0) { | 467 | if (de_digtable.recover_cnt != 0) { |
468 | dm_digtable.recover_cnt--; | 468 | de_digtable.recover_cnt--; |
469 | } else { | 469 | } else { |
470 | if (dm_digtable.large_fa_hit == 0) { | 470 | if (de_digtable.large_fa_hit == 0) { |
471 | if ((dm_digtable.forbidden_igi - 1) < | 471 | if ((de_digtable.forbidden_igi - 1) < |
472 | DM_DIG_FA_LOWER) { | 472 | DM_DIG_FA_LOWER) { |
473 | dm_digtable.forbidden_igi = | 473 | de_digtable.forbidden_igi = |
474 | DM_DIG_FA_LOWER; | 474 | DM_DIG_FA_LOWER; |
475 | dm_digtable.rx_gain_range_min = | 475 | de_digtable.rx_gain_range_min = |
476 | DM_DIG_FA_LOWER; | 476 | DM_DIG_FA_LOWER; |
477 | 477 | ||
478 | } else { | 478 | } else { |
479 | dm_digtable.forbidden_igi--; | 479 | de_digtable.forbidden_igi--; |
480 | dm_digtable.rx_gain_range_min = | 480 | de_digtable.rx_gain_range_min = |
481 | (dm_digtable.forbidden_igi + 1); | 481 | (de_digtable.forbidden_igi + 1); |
482 | } | 482 | } |
483 | } else if (dm_digtable.large_fa_hit == 3) { | 483 | } else if (de_digtable.large_fa_hit == 3) { |
484 | dm_digtable.large_fa_hit = 0; | 484 | de_digtable.large_fa_hit = 0; |
485 | } | 485 | } |
486 | } | 486 | } |
487 | } | 487 | } |
488 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 488 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
489 | ("dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n", | 489 | ("dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n", |
490 | dm_digtable.large_fa_hit, dm_digtable.forbidden_igi)); | 490 | de_digtable.large_fa_hit, de_digtable.forbidden_igi)); |
491 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, | 491 | RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, |
492 | ("dm_DIG() After: recover_cnt=%d, rx_gain_range_min=%x\n", | 492 | ("dm_DIG() After: recover_cnt=%d, rx_gain_range_min=%x\n", |
493 | dm_digtable.recover_cnt, dm_digtable.rx_gain_range_min)); | 493 | de_digtable.recover_cnt, de_digtable.rx_gain_range_min)); |
494 | 494 | ||
495 | if (value_igi > DM_DIG_MAX) | 495 | if (value_igi > DM_DIG_MAX) |
496 | value_igi = DM_DIG_MAX; | 496 | value_igi = DM_DIG_MAX; |
497 | else if (value_igi < dm_digtable.rx_gain_range_min) | 497 | else if (value_igi < de_digtable.rx_gain_range_min) |
498 | value_igi = dm_digtable.rx_gain_range_min; | 498 | value_igi = de_digtable.rx_gain_range_min; |
499 | dm_digtable.cur_igvalue = value_igi; | 499 | de_digtable.cur_igvalue = value_igi; |
500 | rtl92d_dm_write_dig(hw); | 500 | rtl92d_dm_write_dig(hw); |
501 | if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G) | 501 | if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G) |
502 | rtl92d_dm_cck_packet_detection_thresh(hw); | 502 | rtl92d_dm_cck_packet_detection_thresh(hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.h b/drivers/net/wireless/rtlwifi/rtl8192de/dm.h index b3a42ff81456..69354657f0f5 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.h +++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.h | |||
@@ -200,7 +200,7 @@ enum dm_dig_connect { | |||
200 | DIG_CONNECT_MAX | 200 | DIG_CONNECT_MAX |
201 | }; | 201 | }; |
202 | 202 | ||
203 | extern struct dig_t dm_digtable; | 203 | extern struct dig_t de_digtable; |
204 | 204 | ||
205 | void rtl92d_dm_init(struct ieee80211_hw *hw); | 205 | void rtl92d_dm_init(struct ieee80211_hw *hw); |
206 | void rtl92d_dm_watchdog(struct ieee80211_hw *hw); | 206 | void rtl92d_dm_watchdog(struct ieee80211_hw *hw); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index eedfb38bec8e..31bdea8c700f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -627,11 +627,11 @@ static void _rtl92de_gen_refresh_led_state(struct ieee80211_hw *hw) | |||
627 | if (rtlpci->up_first_time) | 627 | if (rtlpci->up_first_time) |
628 | return; | 628 | return; |
629 | if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) | 629 | if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) |
630 | rtl92ce_sw_led_on(hw, pLed0); | 630 | rtl92de_sw_led_on(hw, pLed0); |
631 | else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) | 631 | else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) |
632 | rtl92ce_sw_led_on(hw, pLed0); | 632 | rtl92de_sw_led_on(hw, pLed0); |
633 | else | 633 | else |
634 | rtl92ce_sw_led_off(hw, pLed0); | 634 | rtl92de_sw_led_off(hw, pLed0); |
635 | } | 635 | } |
636 | 636 | ||
637 | static bool _rtl92de_init_mac(struct ieee80211_hw *hw) | 637 | static bool _rtl92de_init_mac(struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/led.c b/drivers/net/wireless/rtlwifi/rtl8192de/led.c index c965c73cf184..719972c16fcc 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/led.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/led.c | |||
@@ -40,7 +40,7 @@ static void _rtl92ce_init_led(struct ieee80211_hw *hw, | |||
40 | pled->ledon = false; | 40 | pled->ledon = false; |
41 | } | 41 | } |
42 | 42 | ||
43 | void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) | 43 | void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) |
44 | { | 44 | { |
45 | u8 ledcfg; | 45 | u8 ledcfg; |
46 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 46 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
@@ -77,7 +77,7 @@ void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
77 | pled->ledon = true; | 77 | pled->ledon = true; |
78 | } | 78 | } |
79 | 79 | ||
80 | void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | 80 | void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) |
81 | { | 81 | { |
82 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 82 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
83 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); | 83 | struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); |
@@ -128,10 +128,10 @@ static void _rtl92ce_sw_led_control(struct ieee80211_hw *hw, | |||
128 | case LED_CTL_POWER_ON: | 128 | case LED_CTL_POWER_ON: |
129 | case LED_CTL_LINK: | 129 | case LED_CTL_LINK: |
130 | case LED_CTL_NO_LINK: | 130 | case LED_CTL_NO_LINK: |
131 | rtl92ce_sw_led_on(hw, pLed0); | 131 | rtl92de_sw_led_on(hw, pLed0); |
132 | break; | 132 | break; |
133 | case LED_CTL_POWER_OFF: | 133 | case LED_CTL_POWER_OFF: |
134 | rtl92ce_sw_led_off(hw, pLed0); | 134 | rtl92de_sw_led_off(hw, pLed0); |
135 | break; | 135 | break; |
136 | default: | 136 | default: |
137 | break; | 137 | break; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/led.h b/drivers/net/wireless/rtlwifi/rtl8192de/led.h index f6d33a6f0f89..57f4a3c583d4 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/led.h +++ b/drivers/net/wireless/rtlwifi/rtl8192de/led.h | |||
@@ -31,8 +31,8 @@ | |||
31 | #define __RTL92CE_LED_H__ | 31 | #define __RTL92CE_LED_H__ |
32 | 32 | ||
33 | void rtl92de_init_sw_leds(struct ieee80211_hw *hw); | 33 | void rtl92de_init_sw_leds(struct ieee80211_hw *hw); |
34 | void rtl92ce_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled); | 34 | void rtl92de_sw_led_on(struct ieee80211_hw *hw, struct rtl_led *pled); |
35 | void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled); | 35 | void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled); |
36 | void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction); | 36 | void rtl92de_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction); |
37 | 37 | ||
38 | #endif | 38 | #endif |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c index 4d4c8ebc77ad..97fb6ca39d73 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c | |||
@@ -3192,13 +3192,13 @@ static void rtl92d_phy_set_io(struct ieee80211_hw *hw) | |||
3192 | rtlphy->current_io_type, rtlphy->set_io_inprogress)); | 3192 | rtlphy->current_io_type, rtlphy->set_io_inprogress)); |
3193 | switch (rtlphy->current_io_type) { | 3193 | switch (rtlphy->current_io_type) { |
3194 | case IO_CMD_RESUME_DM_BY_SCAN: | 3194 | case IO_CMD_RESUME_DM_BY_SCAN: |
3195 | dm_digtable.cur_igvalue = rtlphy->initgain_backup.xaagccore1; | 3195 | de_digtable.cur_igvalue = rtlphy->initgain_backup.xaagccore1; |
3196 | rtl92d_dm_write_dig(hw); | 3196 | rtl92d_dm_write_dig(hw); |
3197 | rtl92d_phy_set_txpower_level(hw, rtlphy->current_channel); | 3197 | rtl92d_phy_set_txpower_level(hw, rtlphy->current_channel); |
3198 | break; | 3198 | break; |
3199 | case IO_CMD_PAUSE_DM_BY_SCAN: | 3199 | case IO_CMD_PAUSE_DM_BY_SCAN: |
3200 | rtlphy->initgain_backup.xaagccore1 = dm_digtable.cur_igvalue; | 3200 | rtlphy->initgain_backup.xaagccore1 = de_digtable.cur_igvalue; |
3201 | dm_digtable.cur_igvalue = 0x17; | 3201 | de_digtable.cur_igvalue = 0x17; |
3202 | rtl92d_dm_write_dig(hw); | 3202 | rtl92d_dm_write_dig(hw); |
3203 | break; | 3203 | break; |
3204 | default: | 3204 | default: |