diff options
author | Joe Perches <joe@perches.com> | 2012-01-04 22:40:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:07:40 -0500 |
commit | f30d7507a8116e2099a9135c873411db8c0a3dc6 (patch) | |
tree | 14ff0954b36045e9dfce93a4f0dd0e40c04960a2 /drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |
parent | af08687b4e6d44dcdb04b519e718eb58ecb99050 (diff) |
rtlwifi: Convert RT_TRACE macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving
and reduce the object size.
Remove unnecessary RT_TRACE parentheses.
Miscellaneous typo and grammar fixes.
Add missing newlines to formats.
Remove duplicate KERN_DEBUG prefixes.
Coalesce formats.
Align arguments.
$ size drivers/net/wireless/rtlwifi/built-in.o*
text data bss dec hex filename
594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.new
607022 55333 138720 801075 c3933 drivers/net/wireless/rtlwifi/built-in.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce/hw.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 182 |
1 files changed, 87 insertions, 95 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 2156378de1e8..4aa228fe96e9 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -141,7 +141,7 @@ void rtl92ce_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
141 | } | 141 | } |
142 | default: | 142 | default: |
143 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 143 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
144 | ("switch case not process\n")); | 144 | "switch case not processed\n"); |
145 | break; | 145 | break; |
146 | } | 146 | } |
147 | } | 147 | } |
@@ -207,7 +207,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
207 | u8 e_aci; | 207 | u8 e_aci; |
208 | 208 | ||
209 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, | 209 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, |
210 | ("HW_VAR_SLOT_TIME %x\n", val[0])); | 210 | "HW_VAR_SLOT_TIME %x\n", val[0]); |
211 | 211 | ||
212 | rtl_write_byte(rtlpriv, REG_SLOT, val[0]); | 212 | rtl_write_byte(rtlpriv, REG_SLOT, val[0]); |
213 | 213 | ||
@@ -246,8 +246,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
246 | *val = min_spacing_to_set; | 246 | *val = min_spacing_to_set; |
247 | 247 | ||
248 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, | 248 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, |
249 | ("Set HW_VAR_AMPDU_MIN_SPACE: %#x\n", | 249 | "Set HW_VAR_AMPDU_MIN_SPACE: %#x\n", |
250 | mac->min_space_cfg)); | 250 | mac->min_space_cfg); |
251 | 251 | ||
252 | rtl_write_byte(rtlpriv, REG_AMPDU_MIN_SPACE, | 252 | rtl_write_byte(rtlpriv, REG_AMPDU_MIN_SPACE, |
253 | mac->min_space_cfg); | 253 | mac->min_space_cfg); |
@@ -261,8 +261,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
261 | mac->min_space_cfg |= (density_to_set << 3); | 261 | mac->min_space_cfg |= (density_to_set << 3); |
262 | 262 | ||
263 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, | 263 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, |
264 | ("Set HW_VAR_SHORTGI_DENSITY: %#x\n", | 264 | "Set HW_VAR_SHORTGI_DENSITY: %#x\n", |
265 | mac->min_space_cfg)); | 265 | mac->min_space_cfg); |
266 | 266 | ||
267 | rtl_write_byte(rtlpriv, REG_AMPDU_MIN_SPACE, | 267 | rtl_write_byte(rtlpriv, REG_AMPDU_MIN_SPACE, |
268 | mac->min_space_cfg); | 268 | mac->min_space_cfg); |
@@ -310,8 +310,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, | 312 | RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, |
313 | ("Set HW_VAR_AMPDU_FACTOR: %#x\n", | 313 | "Set HW_VAR_AMPDU_FACTOR: %#x\n", |
314 | factor_toset)); | 314 | factor_toset); |
315 | } | 315 | } |
316 | break; | 316 | break; |
317 | } | 317 | } |
@@ -348,8 +348,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
348 | break; | 348 | break; |
349 | default: | 349 | default: |
350 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 350 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
351 | ("HW_VAR_ACM_CTRL acm set " | 351 | "HW_VAR_ACM_CTRL acm set failed: eACI is %d\n", |
352 | "failed: eACI is %d\n", acm)); | 352 | acm); |
353 | break; | 353 | break; |
354 | } | 354 | } |
355 | } else { | 355 | } else { |
@@ -365,14 +365,14 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
365 | break; | 365 | break; |
366 | default: | 366 | default: |
367 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 367 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
368 | ("switch case not process\n")); | 368 | "switch case not processed\n"); |
369 | break; | 369 | break; |
370 | } | 370 | } |
371 | } | 371 | } |
372 | 372 | ||
373 | RT_TRACE(rtlpriv, COMP_QOS, DBG_TRACE, | 373 | RT_TRACE(rtlpriv, COMP_QOS, DBG_TRACE, |
374 | ("SetHwReg8190pci(): [HW_VAR_ACM_CTRL] " | 374 | "SetHwReg8190pci(): [HW_VAR_ACM_CTRL] Write 0x%X\n", |
375 | "Write 0x%X\n", acm_ctrl)); | 375 | acm_ctrl); |
376 | rtl_write_byte(rtlpriv, REG_ACMHWCTRL, acm_ctrl); | 376 | rtl_write_byte(rtlpriv, REG_ACMHWCTRL, acm_ctrl); |
377 | break; | 377 | break; |
378 | } | 378 | } |
@@ -507,8 +507,8 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
507 | 507 | ||
508 | } | 508 | } |
509 | default: | 509 | default: |
510 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("switch case " | 510 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
511 | "not process\n")); | 511 | "switch case not processed\n"); |
512 | break; | 512 | break; |
513 | } | 513 | } |
514 | } | 514 | } |
@@ -530,8 +530,8 @@ static bool _rtl92ce_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) | |||
530 | 530 | ||
531 | if (count > POLLING_LLT_THRESHOLD) { | 531 | if (count > POLLING_LLT_THRESHOLD) { |
532 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 532 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
533 | ("Failed to polling write LLT done at " | 533 | "Failed to polling write LLT done at address %d!\n", |
534 | "address %d!\n", address)); | 534 | address); |
535 | status = false; | 535 | status = false; |
536 | break; | 536 | break; |
537 | } | 537 | } |
@@ -669,18 +669,15 @@ static bool _rtl92ce_init_mac(struct ieee80211_hw *hw) | |||
669 | udelay(2); | 669 | udelay(2); |
670 | 670 | ||
671 | retry = 0; | 671 | retry = 0; |
672 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("reg0xec:%x:%x\n", | 672 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "reg0xec:%x:%x\n", |
673 | rtl_read_dword(rtlpriv, 0xEC), | 673 | rtl_read_dword(rtlpriv, 0xEC), bytetmp); |
674 | bytetmp)); | ||
675 | 674 | ||
676 | while ((bytetmp & BIT(0)) && retry < 1000) { | 675 | while ((bytetmp & BIT(0)) && retry < 1000) { |
677 | retry++; | 676 | retry++; |
678 | udelay(50); | 677 | udelay(50); |
679 | bytetmp = rtl_read_byte(rtlpriv, REG_APS_FSMCO + 1); | 678 | bytetmp = rtl_read_byte(rtlpriv, REG_APS_FSMCO + 1); |
680 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("reg0xec:%x:%x\n", | 679 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "reg0xec:%x:%x\n", |
681 | rtl_read_dword(rtlpriv, | 680 | rtl_read_dword(rtlpriv, 0xEC), bytetmp); |
682 | 0xEC), | ||
683 | bytetmp)); | ||
684 | udelay(50); | 681 | udelay(50); |
685 | } | 682 | } |
686 | 683 | ||
@@ -864,13 +861,13 @@ void rtl92ce_enable_hw_security_config(struct ieee80211_hw *hw) | |||
864 | u8 sec_reg_value; | 861 | u8 sec_reg_value; |
865 | 862 | ||
866 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, | 863 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, |
867 | ("PairwiseEncAlgorithm = %d GroupEncAlgorithm = %d\n", | 864 | "PairwiseEncAlgorithm = %d GroupEncAlgorithm = %d\n", |
868 | rtlpriv->sec.pairwise_enc_algorithm, | 865 | rtlpriv->sec.pairwise_enc_algorithm, |
869 | rtlpriv->sec.group_enc_algorithm)); | 866 | rtlpriv->sec.group_enc_algorithm); |
870 | 867 | ||
871 | if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) { | 868 | if (rtlpriv->cfg->mod_params->sw_crypto || rtlpriv->sec.use_sw_sec) { |
872 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, ("not open " | 869 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
873 | "hw encryption\n")); | 870 | "not open hw encryption\n"); |
874 | return; | 871 | return; |
875 | } | 872 | } |
876 | 873 | ||
@@ -886,7 +883,7 @@ void rtl92ce_enable_hw_security_config(struct ieee80211_hw *hw) | |||
886 | rtl_write_byte(rtlpriv, REG_CR + 1, 0x02); | 883 | rtl_write_byte(rtlpriv, REG_CR + 1, 0x02); |
887 | 884 | ||
888 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, | 885 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, |
889 | ("The SECR-value %x\n", sec_reg_value)); | 886 | "The SECR-value %x\n", sec_reg_value); |
890 | 887 | ||
891 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_WPA_CONFIG, &sec_reg_value); | 888 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_WPA_CONFIG, &sec_reg_value); |
892 | 889 | ||
@@ -910,7 +907,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
910 | rtlpriv->intf_ops->disable_aspm(hw); | 907 | rtlpriv->intf_ops->disable_aspm(hw); |
911 | rtstatus = _rtl92ce_init_mac(hw); | 908 | rtstatus = _rtl92ce_init_mac(hw); |
912 | if (rtstatus != true) { | 909 | if (rtstatus != true) { |
913 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Init MAC failed\n")); | 910 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n"); |
914 | err = 1; | 911 | err = 1; |
915 | return err; | 912 | return err; |
916 | } | 913 | } |
@@ -918,8 +915,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
918 | err = rtl92c_download_fw(hw); | 915 | err = rtl92c_download_fw(hw); |
919 | if (err) { | 916 | if (err) { |
920 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 917 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
921 | ("Failed to download FW. Init HW " | 918 | "Failed to download FW. Init HW without FW now..\n"); |
922 | "without FW now..\n")); | ||
923 | err = 1; | 919 | err = 1; |
924 | rtlhal->fw_ready = false; | 920 | rtlhal->fw_ready = false; |
925 | return err; | 921 | return err; |
@@ -968,12 +964,12 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
968 | tmp_u1b = efuse_read_1byte(hw, 0x1FA); | 964 | tmp_u1b = efuse_read_1byte(hw, 0x1FA); |
969 | if (!(tmp_u1b & BIT(0))) { | 965 | if (!(tmp_u1b & BIT(0))) { |
970 | rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0F, 0x05); | 966 | rtl_set_rfreg(hw, RF90_PATH_A, 0x15, 0x0F, 0x05); |
971 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("PA BIAS path A\n")); | 967 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "PA BIAS path A\n"); |
972 | } | 968 | } |
973 | 969 | ||
974 | if (!(tmp_u1b & BIT(1)) && is92c) { | 970 | if (!(tmp_u1b & BIT(1)) && is92c) { |
975 | rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0F, 0x05); | 971 | rtl_set_rfreg(hw, RF90_PATH_B, 0x15, 0x0F, 0x05); |
976 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("PA BIAS path B\n")); | 972 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "PA BIAS path B\n"); |
977 | } | 973 | } |
978 | 974 | ||
979 | if (!(tmp_u1b & BIT(4))) { | 975 | if (!(tmp_u1b & BIT(4))) { |
@@ -982,7 +978,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw) | |||
982 | rtl_write_byte(rtlpriv, 0x16, tmp_u1b | 0x80); | 978 | rtl_write_byte(rtlpriv, 0x16, tmp_u1b | 0x80); |
983 | udelay(10); | 979 | udelay(10); |
984 | rtl_write_byte(rtlpriv, 0x16, tmp_u1b | 0x90); | 980 | rtl_write_byte(rtlpriv, 0x16, tmp_u1b | 0x90); |
985 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("under 1.5V\n")); | 981 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n"); |
986 | } | 982 | } |
987 | rtl92c_dm_init(hw); | 983 | rtl92c_dm_init(hw); |
988 | rtlpci->being_init_adapter = false; | 984 | rtlpci->being_init_adapter = false; |
@@ -1008,23 +1004,23 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) | |||
1008 | switch (version) { | 1004 | switch (version) { |
1009 | case VERSION_B_CHIP_92C: | 1005 | case VERSION_B_CHIP_92C: |
1010 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1006 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1011 | ("Chip Version ID: VERSION_B_CHIP_92C.\n")); | 1007 | "Chip Version ID: VERSION_B_CHIP_92C\n"); |
1012 | break; | 1008 | break; |
1013 | case VERSION_B_CHIP_88C: | 1009 | case VERSION_B_CHIP_88C: |
1014 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1010 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1015 | ("Chip Version ID: VERSION_B_CHIP_88C.\n")); | 1011 | "Chip Version ID: VERSION_B_CHIP_88C\n"); |
1016 | break; | 1012 | break; |
1017 | case VERSION_A_CHIP_92C: | 1013 | case VERSION_A_CHIP_92C: |
1018 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1014 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1019 | ("Chip Version ID: VERSION_A_CHIP_92C.\n")); | 1015 | "Chip Version ID: VERSION_A_CHIP_92C\n"); |
1020 | break; | 1016 | break; |
1021 | case VERSION_A_CHIP_88C: | 1017 | case VERSION_A_CHIP_88C: |
1022 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1018 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1023 | ("Chip Version ID: VERSION_A_CHIP_88C.\n")); | 1019 | "Chip Version ID: VERSION_A_CHIP_88C\n"); |
1024 | break; | 1020 | break; |
1025 | default: | 1021 | default: |
1026 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1022 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1027 | ("Chip Version ID: Unknown. Bug?\n")); | 1023 | "Chip Version ID: Unknown. Bug?\n"); |
1028 | break; | 1024 | break; |
1029 | } | 1025 | } |
1030 | 1026 | ||
@@ -1041,13 +1037,12 @@ static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) | |||
1041 | default: | 1037 | default: |
1042 | rtlphy->rf_type = RF_1T1R; | 1038 | rtlphy->rf_type = RF_1T1R; |
1043 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1039 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1044 | ("ERROR RF_Type is set!!")); | 1040 | "ERROR RF_Type is set!!\n"); |
1045 | break; | 1041 | break; |
1046 | } | 1042 | } |
1047 | 1043 | ||
1048 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, | 1044 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Chip RF Type: %s\n", |
1049 | ("Chip RF Type: %s\n", (rtlphy->rf_type == RF_2T2R) ? | 1045 | rtlphy->rf_type == RF_2T2R ? "RF_2T2R" : "RF_1T1R"); |
1050 | "RF_2T2R" : "RF_1T1R")); | ||
1051 | 1046 | ||
1052 | return version; | 1047 | return version; |
1053 | } | 1048 | } |
@@ -1069,8 +1064,8 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw, | |||
1069 | _rtl92ce_disable_bcn_sub_func(hw); | 1064 | _rtl92ce_disable_bcn_sub_func(hw); |
1070 | } else { | 1065 | } else { |
1071 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 1066 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
1072 | ("Set HW_VAR_MEDIA_STATUS: " | 1067 | "Set HW_VAR_MEDIA_STATUS: No such media status(%x)\n", |
1073 | "No such media status(%x).\n", type)); | 1068 | type); |
1074 | } | 1069 | } |
1075 | 1070 | ||
1076 | switch (type) { | 1071 | switch (type) { |
@@ -1078,27 +1073,27 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw, | |||
1078 | bt_msr |= MSR_NOLINK; | 1073 | bt_msr |= MSR_NOLINK; |
1079 | ledaction = LED_CTL_LINK; | 1074 | ledaction = LED_CTL_LINK; |
1080 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1075 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1081 | ("Set Network type to NO LINK!\n")); | 1076 | "Set Network type to NO LINK!\n"); |
1082 | break; | 1077 | break; |
1083 | case NL80211_IFTYPE_ADHOC: | 1078 | case NL80211_IFTYPE_ADHOC: |
1084 | bt_msr |= MSR_ADHOC; | 1079 | bt_msr |= MSR_ADHOC; |
1085 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1080 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1086 | ("Set Network type to Ad Hoc!\n")); | 1081 | "Set Network type to Ad Hoc!\n"); |
1087 | break; | 1082 | break; |
1088 | case NL80211_IFTYPE_STATION: | 1083 | case NL80211_IFTYPE_STATION: |
1089 | bt_msr |= MSR_INFRA; | 1084 | bt_msr |= MSR_INFRA; |
1090 | ledaction = LED_CTL_LINK; | 1085 | ledaction = LED_CTL_LINK; |
1091 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1086 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1092 | ("Set Network type to STA!\n")); | 1087 | "Set Network type to STA!\n"); |
1093 | break; | 1088 | break; |
1094 | case NL80211_IFTYPE_AP: | 1089 | case NL80211_IFTYPE_AP: |
1095 | bt_msr |= MSR_AP; | 1090 | bt_msr |= MSR_AP; |
1096 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, | 1091 | RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, |
1097 | ("Set Network type to AP!\n")); | 1092 | "Set Network type to AP!\n"); |
1098 | break; | 1093 | break; |
1099 | default: | 1094 | default: |
1100 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1095 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1101 | ("Network type %d not support!\n", type)); | 1096 | "Network type %d not supported!\n", type); |
1102 | return 1; | 1097 | return 1; |
1103 | break; | 1098 | break; |
1104 | 1099 | ||
@@ -1300,7 +1295,7 @@ void rtl92ce_set_beacon_interval(struct ieee80211_hw *hw) | |||
1300 | u16 bcn_interval = mac->beacon_interval; | 1295 | u16 bcn_interval = mac->beacon_interval; |
1301 | 1296 | ||
1302 | RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG, | 1297 | RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG, |
1303 | ("beacon_interval:%d\n", bcn_interval)); | 1298 | "beacon_interval:%d\n", bcn_interval); |
1304 | rtl92ce_disable_interrupt(hw); | 1299 | rtl92ce_disable_interrupt(hw); |
1305 | rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval); | 1300 | rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval); |
1306 | rtl92ce_enable_interrupt(hw); | 1301 | rtl92ce_enable_interrupt(hw); |
@@ -1312,8 +1307,8 @@ void rtl92ce_update_interrupt_mask(struct ieee80211_hw *hw, | |||
1312 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1307 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1313 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 1308 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
1314 | 1309 | ||
1315 | RT_TRACE(rtlpriv, COMP_INTR, DBG_LOUD, | 1310 | RT_TRACE(rtlpriv, COMP_INTR, DBG_LOUD, "add_msr:%x, rm_msr:%x\n", |
1316 | ("add_msr:%x, rm_msr:%x\n", add_msr, rm_msr)); | 1311 | add_msr, rm_msr); |
1317 | 1312 | ||
1318 | if (add_msr) | 1313 | if (add_msr) |
1319 | rtlpci->irq_mask[0] |= add_msr; | 1314 | rtlpci->irq_mask[0] |= add_msr; |
@@ -1567,7 +1562,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1567 | HWSET_MAX_SIZE); | 1562 | HWSET_MAX_SIZE); |
1568 | } else if (rtlefuse->epromtype == EEPROM_93C46) { | 1563 | } else if (rtlefuse->epromtype == EEPROM_93C46) { |
1569 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1564 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1570 | ("RTL819X Not boot from eeprom, check it !!")); | 1565 | "RTL819X Not boot from eeprom, check it !!"); |
1571 | } | 1566 | } |
1572 | 1567 | ||
1573 | RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "MAP", | 1568 | RT_PRINT_DATA(rtlpriv, COMP_INIT, DBG_DMESG, "MAP", |
@@ -1576,10 +1571,10 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1576 | eeprom_id = *((u16 *)&hwinfo[0]); | 1571 | eeprom_id = *((u16 *)&hwinfo[0]); |
1577 | if (eeprom_id != RTL8190_EEPROM_ID) { | 1572 | if (eeprom_id != RTL8190_EEPROM_ID) { |
1578 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 1573 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
1579 | ("EEPROM ID(%#x) is invalid!!\n", eeprom_id)); | 1574 | "EEPROM ID(%#x) is invalid!!\n", eeprom_id); |
1580 | rtlefuse->autoload_failflag = true; | 1575 | rtlefuse->autoload_failflag = true; |
1581 | } else { | 1576 | } else { |
1582 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload OK\n")); | 1577 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n"); |
1583 | rtlefuse->autoload_failflag = false; | 1578 | rtlefuse->autoload_failflag = false; |
1584 | } | 1579 | } |
1585 | 1580 | ||
@@ -1591,8 +1586,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1591 | *((u16 *) (&rtlefuse->dev_addr[i])) = usvalue; | 1586 | *((u16 *) (&rtlefuse->dev_addr[i])) = usvalue; |
1592 | } | 1587 | } |
1593 | 1588 | ||
1594 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1589 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr); |
1595 | ("%pM\n", rtlefuse->dev_addr)); | ||
1596 | 1590 | ||
1597 | _rtl92ce_read_txpower_info_from_hwpg(hw, | 1591 | _rtl92ce_read_txpower_info_from_hwpg(hw, |
1598 | rtlefuse->autoload_failflag, | 1592 | rtlefuse->autoload_failflag, |
@@ -1608,7 +1602,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1608 | rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; | 1602 | rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; |
1609 | 1603 | ||
1610 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, | 1604 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, |
1611 | ("EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid)); | 1605 | "EEPROM Customer ID: 0x%2x\n", rtlefuse->eeprom_oemid); |
1612 | 1606 | ||
1613 | /* set channel paln to world wide 13 */ | 1607 | /* set channel paln to world wide 13 */ |
1614 | rtlefuse->channel_plan = COUNTRY_CODE_WORLD_WIDE_13; | 1608 | rtlefuse->channel_plan = COUNTRY_CODE_WORLD_WIDE_13; |
@@ -1662,7 +1656,7 @@ static void _rtl92ce_hal_customized_behavior(struct ieee80211_hw *hw) | |||
1662 | break; | 1656 | break; |
1663 | } | 1657 | } |
1664 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, | 1658 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, |
1665 | ("RT Customized ID: 0x%02X\n", rtlhal->oem_id)); | 1659 | "RT Customized ID: 0x%02X\n", rtlhal->oem_id); |
1666 | } | 1660 | } |
1667 | 1661 | ||
1668 | void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw) | 1662 | void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw) |
@@ -1679,22 +1673,22 @@ void rtl92ce_read_eeprom_info(struct ieee80211_hw *hw) | |||
1679 | else | 1673 | else |
1680 | rtlpriv->dm.rfpath_rxenable[0] = | 1674 | rtlpriv->dm.rfpath_rxenable[0] = |
1681 | rtlpriv->dm.rfpath_rxenable[1] = true; | 1675 | rtlpriv->dm.rfpath_rxenable[1] = true; |
1682 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("VersionID = 0x%4x\n", | 1676 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "VersionID = 0x%4x\n", |
1683 | rtlhal->version)); | 1677 | rtlhal->version); |
1684 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); | 1678 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); |
1685 | if (tmp_u1b & BIT(4)) { | 1679 | if (tmp_u1b & BIT(4)) { |
1686 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("Boot from EEPROM\n")); | 1680 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "Boot from EEPROM\n"); |
1687 | rtlefuse->epromtype = EEPROM_93C46; | 1681 | rtlefuse->epromtype = EEPROM_93C46; |
1688 | } else { | 1682 | } else { |
1689 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("Boot from EFUSE\n")); | 1683 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "Boot from EFUSE\n"); |
1690 | rtlefuse->epromtype = EEPROM_BOOT_EFUSE; | 1684 | rtlefuse->epromtype = EEPROM_BOOT_EFUSE; |
1691 | } | 1685 | } |
1692 | if (tmp_u1b & BIT(5)) { | 1686 | if (tmp_u1b & BIT(5)) { |
1693 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload OK\n")); | 1687 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n"); |
1694 | rtlefuse->autoload_failflag = false; | 1688 | rtlefuse->autoload_failflag = false; |
1695 | _rtl92ce_read_adapter_info(hw); | 1689 | _rtl92ce_read_adapter_info(hw); |
1696 | } else { | 1690 | } else { |
1697 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Autoload ERR!!\n")); | 1691 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Autoload ERR!!\n"); |
1698 | } | 1692 | } |
1699 | _rtl92ce_hal_customized_behavior(hw); | 1693 | _rtl92ce_hal_customized_behavior(hw); |
1700 | } | 1694 | } |
@@ -1790,8 +1784,8 @@ static void rtl92ce_update_hal_rate_table(struct ieee80211_hw *hw, | |||
1790 | 1784 | ||
1791 | rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value); | 1785 | rtl_write_dword(rtlpriv, REG_ARFR0 + ratr_index * 4, ratr_value); |
1792 | 1786 | ||
1793 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, | 1787 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, "%x\n", |
1794 | ("%x\n", rtl_read_dword(rtlpriv, REG_ARFR0))); | 1788 | rtl_read_dword(rtlpriv, REG_ARFR0)); |
1795 | } | 1789 | } |
1796 | 1790 | ||
1797 | static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, | 1791 | static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, |
@@ -1919,16 +1913,15 @@ static void rtl92ce_update_hal_rate_mask(struct ieee80211_hw *hw, | |||
1919 | break; | 1913 | break; |
1920 | } | 1914 | } |
1921 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, | 1915 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, |
1922 | ("ratr_bitmap :%x\n", ratr_bitmap)); | 1916 | "ratr_bitmap :%x\n", ratr_bitmap); |
1923 | *(u32 *)&rate_mask = EF4BYTE((ratr_bitmap & 0x0fffffff) | | 1917 | *(u32 *)&rate_mask = EF4BYTE((ratr_bitmap & 0x0fffffff) | |
1924 | (ratr_index << 28)); | 1918 | (ratr_index << 28)); |
1925 | rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80; | 1919 | rate_mask[4] = macid | (shortgi ? 0x20 : 0x00) | 0x80; |
1926 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, ("Rate_index:%x, " | 1920 | RT_TRACE(rtlpriv, COMP_RATR, DBG_DMESG, |
1927 | "ratr_val:%x, %x:%x:%x:%x:%x\n", | 1921 | "Rate_index:%x, ratr_val:%x, %x:%x:%x:%x:%x\n", |
1928 | ratr_index, ratr_bitmap, | 1922 | ratr_index, ratr_bitmap, |
1929 | rate_mask[0], rate_mask[1], | 1923 | rate_mask[0], rate_mask[1], rate_mask[2], rate_mask[3], |
1930 | rate_mask[2], rate_mask[3], | 1924 | rate_mask[4]); |
1931 | rate_mask[4])); | ||
1932 | rtl92c_fill_h2c_cmd(hw, H2C_RA_MASK, 5, rate_mask); | 1925 | rtl92c_fill_h2c_cmd(hw, H2C_RA_MASK, 5, rate_mask); |
1933 | 1926 | ||
1934 | if (macid != 0) | 1927 | if (macid != 0) |
@@ -1994,7 +1987,7 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid) | |||
1994 | 1987 | ||
1995 | if ((ppsc->hwradiooff) && (e_rfpowerstate_toset == ERFON)) { | 1988 | if ((ppsc->hwradiooff) && (e_rfpowerstate_toset == ERFON)) { |
1996 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 1989 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
1997 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); | 1990 | "GPIOChangeRF - HW Radio ON, RF ON\n"); |
1998 | 1991 | ||
1999 | e_rfpowerstate_toset = ERFON; | 1992 | e_rfpowerstate_toset = ERFON; |
2000 | ppsc->hwradiooff = false; | 1993 | ppsc->hwradiooff = false; |
@@ -2002,7 +1995,7 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid) | |||
2002 | } else if ((ppsc->hwradiooff == false) | 1995 | } else if ((ppsc->hwradiooff == false) |
2003 | && (e_rfpowerstate_toset == ERFOFF)) { | 1996 | && (e_rfpowerstate_toset == ERFOFF)) { |
2004 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 1997 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
2005 | ("GPIOChangeRF - HW Radio OFF, RF OFF\n")); | 1998 | "GPIOChangeRF - HW Radio OFF, RF OFF\n"); |
2006 | 1999 | ||
2007 | e_rfpowerstate_toset = ERFOFF; | 2000 | e_rfpowerstate_toset = ERFOFF; |
2008 | ppsc->hwradiooff = true; | 2001 | ppsc->hwradiooff = true; |
@@ -2053,7 +2046,7 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2053 | u8 cam_offset = 0; | 2046 | u8 cam_offset = 0; |
2054 | u8 clear_number = 5; | 2047 | u8 clear_number = 5; |
2055 | 2048 | ||
2056 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, ("clear_all\n")); | 2049 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, "clear_all\n"); |
2057 | 2050 | ||
2058 | for (idx = 0; idx < clear_number; idx++) { | 2051 | for (idx = 0; idx < clear_number; idx++) { |
2059 | rtl_cam_mark_invalid(hw, cam_offset + idx); | 2052 | rtl_cam_mark_invalid(hw, cam_offset + idx); |
@@ -2081,8 +2074,8 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2081 | enc_algo = CAM_AES; | 2074 | enc_algo = CAM_AES; |
2082 | break; | 2075 | break; |
2083 | default: | 2076 | default: |
2084 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("switch case " | 2077 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
2085 | "not process\n")); | 2078 | "switch case not processed\n"); |
2086 | enc_algo = CAM_TKIP; | 2079 | enc_algo = CAM_TKIP; |
2087 | break; | 2080 | break; |
2088 | } | 2081 | } |
@@ -2100,9 +2093,8 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2100 | p_macaddr); | 2093 | p_macaddr); |
2101 | if (entry_id >= TOTAL_CAM_ENTRY) { | 2094 | if (entry_id >= TOTAL_CAM_ENTRY) { |
2102 | RT_TRACE(rtlpriv, COMP_SEC, | 2095 | RT_TRACE(rtlpriv, COMP_SEC, |
2103 | DBG_EMERG, | 2096 | DBG_EMERG, |
2104 | ("Can not find free hw" | 2097 | "Can not find free hw security cam entry\n"); |
2105 | " security cam entry\n")); | ||
2106 | return; | 2098 | return; |
2107 | } | 2099 | } |
2108 | } else { | 2100 | } else { |
@@ -2116,22 +2108,22 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2116 | 2108 | ||
2117 | if (rtlpriv->sec.key_len[key_index] == 0) { | 2109 | if (rtlpriv->sec.key_len[key_index] == 0) { |
2118 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, | 2110 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
2119 | ("delete one entry, entry_id is %d\n", | 2111 | "delete one entry, entry_id is %d\n", |
2120 | entry_id)); | 2112 | entry_id); |
2121 | if (mac->opmode == NL80211_IFTYPE_AP) | 2113 | if (mac->opmode == NL80211_IFTYPE_AP) |
2122 | rtl_cam_del_entry(hw, p_macaddr); | 2114 | rtl_cam_del_entry(hw, p_macaddr); |
2123 | rtl_cam_delete_one_entry(hw, p_macaddr, entry_id); | 2115 | rtl_cam_delete_one_entry(hw, p_macaddr, entry_id); |
2124 | } else { | 2116 | } else { |
2125 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, | 2117 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, |
2126 | ("The insert KEY length is %d\n", | 2118 | "The insert KEY length is %d\n", |
2127 | rtlpriv->sec.key_len[PAIRWISE_KEYIDX])); | 2119 | rtlpriv->sec.key_len[PAIRWISE_KEYIDX]); |
2128 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, | 2120 | RT_TRACE(rtlpriv, COMP_SEC, DBG_LOUD, |
2129 | ("The insert KEY is %x %x\n", | 2121 | "The insert KEY is %x %x\n", |
2130 | rtlpriv->sec.key_buf[0][0], | 2122 | rtlpriv->sec.key_buf[0][0], |
2131 | rtlpriv->sec.key_buf[0][1])); | 2123 | rtlpriv->sec.key_buf[0][1]); |
2132 | 2124 | ||
2133 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, | 2125 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
2134 | ("add one entry\n")); | 2126 | "add one entry\n"); |
2135 | if (is_pairwise) { | 2127 | if (is_pairwise) { |
2136 | RT_PRINT_DATA(rtlpriv, COMP_SEC, DBG_LOUD, | 2128 | RT_PRINT_DATA(rtlpriv, COMP_SEC, DBG_LOUD, |
2137 | "Pairwise Key content", | 2129 | "Pairwise Key content", |
@@ -2140,7 +2132,7 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2140 | key_len[PAIRWISE_KEYIDX]); | 2132 | key_len[PAIRWISE_KEYIDX]); |
2141 | 2133 | ||
2142 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, | 2134 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
2143 | ("set Pairwiase key\n")); | 2135 | "set Pairwise key\n"); |
2144 | 2136 | ||
2145 | rtl_cam_add_one_entry(hw, macaddr, key_index, | 2137 | rtl_cam_add_one_entry(hw, macaddr, key_index, |
2146 | entry_id, enc_algo, | 2138 | entry_id, enc_algo, |
@@ -2149,7 +2141,7 @@ void rtl92ce_set_key(struct ieee80211_hw *hw, u32 key_index, | |||
2149 | key_buf[key_index]); | 2141 | key_buf[key_index]); |
2150 | } else { | 2142 | } else { |
2151 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, | 2143 | RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG, |
2152 | ("set group key\n")); | 2144 | "set group key\n"); |
2153 | 2145 | ||
2154 | if (mac->opmode == NL80211_IFTYPE_ADHOC) { | 2146 | if (mac->opmode == NL80211_IFTYPE_ADHOC) { |
2155 | rtl_cam_add_one_entry(hw, | 2147 | rtl_cam_add_one_entry(hw, |