diff options
author | Chaoming Li <chaoming_li@realsil.com.cn> | 2011-10-11 22:28:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:15 -0400 |
commit | db7599391385f9837ac8a35b8f9d202b85409992 (patch) | |
tree | 90ffb68c1eb7b70c704848373c7174567a53367b /drivers/net/wireless/rtlwifi | |
parent | 09e92f0be2cc14dc808de0c0f12b57981b8c027d (diff) |
rtlwifi: rtl8192ce: Add new chip revisions
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtlwifi driver.
The changes include:
1. Adding new chip revisions including new firmware.
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/def.h | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/def.h | 4 |
3 files changed, 26 insertions, 6 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/def.h b/drivers/net/wireless/rtlwifi/rtl8192ce/def.h index 11f43196e61d..9fc804d89d65 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/def.h +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/def.h | |||
@@ -142,8 +142,22 @@ enum version_8192c { | |||
142 | VERSION_UNKNOWN = 0x88, | 142 | VERSION_UNKNOWN = 0x88, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | #define CUT_VERSION_MASK (BIT(6)|BIT(7)) | ||
146 | #define CHIP_VENDOR_UMC BIT(5) | ||
147 | #define CHIP_VENDOR_UMC_B_CUT BIT(6) /* Chip version for ECO */ | ||
148 | #define IS_VENDOR_UMC_A_CUT(version) ((IS_CHIP_VENDOR_UMC(version)) ? \ | ||
149 | ((GET_CVID_CUT_VERSION(version)) ? false : true) : false) | ||
145 | #define IS_CHIP_VER_B(version) ((version & CHIP_VER_B) ? true : false) | 150 | #define IS_CHIP_VER_B(version) ((version & CHIP_VER_B) ? true : false) |
151 | #define IS_VENDOR_UMC_A_CUT(version) ((IS_CHIP_VENDOR_UMC(version)) ? \ | ||
152 | ((GET_CVID_CUT_VERSION(version)) ? false : true) : false) | ||
146 | #define IS_92C_SERIAL(version) ((version & CHIP_92C_BITMASK) ? true : false) | 153 | #define IS_92C_SERIAL(version) ((version & CHIP_92C_BITMASK) ? true : false) |
154 | #define IS_CHIP_VENDOR_UMC(version) \ | ||
155 | ((version & CHIP_VENDOR_UMC) ? true : false) | ||
156 | #define GET_CVID_CUT_VERSION(version) ((version) & CUT_VERSION_MASK) | ||
157 | #define IS_81xxC_VENDOR_UMC_B_CUT(version) \ | ||
158 | ((IS_CHIP_VENDOR_UMC(version)) ? \ | ||
159 | ((GET_CVID_CUT_VERSION(version) == CHIP_VENDOR_UMC_B_CUT) ? \ | ||
160 | true : false) : false) | ||
147 | 161 | ||
148 | enum rtl819x_loopback_e { | 162 | enum rtl819x_loopback_e { |
149 | RTL819X_NO_LOOPBACK = 0, | 163 | RTL819X_NO_LOOPBACK = 0, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c index 141302f2b044..a48404cc2b96 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | |||
@@ -92,6 +92,8 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) | |||
92 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 92 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
93 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 93 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); |
94 | const struct firmware *firmware; | 94 | const struct firmware *firmware; |
95 | struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); | ||
96 | char *fw_name = NULL; | ||
95 | 97 | ||
96 | rtl8192ce_bt_reg_init(hw); | 98 | rtl8192ce_bt_reg_init(hw); |
97 | 99 | ||
@@ -161,8 +163,14 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw) | |||
161 | } | 163 | } |
162 | 164 | ||
163 | /* request fw */ | 165 | /* request fw */ |
164 | err = request_firmware(&firmware, rtlpriv->cfg->fw_name, | 166 | if (IS_VENDOR_UMC_A_CUT(rtlhal->version) && |
165 | rtlpriv->io.dev); | 167 | !IS_92C_SERIAL(rtlhal->version)) |
168 | fw_name = "rtlwifi/rtl8192cfwU.bin"; | ||
169 | else if (IS_81xxC_VENDOR_UMC_B_CUT(rtlhal->version)) | ||
170 | fw_name = "rtlwifi/rtl8192cfwU_B.bin"; | ||
171 | else | ||
172 | fw_name = rtlpriv->cfg->fw_name; | ||
173 | err = request_firmware(&firmware, fw_name, rtlpriv->io.dev); | ||
166 | if (err) { | 174 | if (err) { |
167 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 175 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
168 | ("Failed to request firmware!\n")); | 176 | ("Failed to request firmware!\n")); |
@@ -358,6 +366,8 @@ MODULE_AUTHOR("Larry Finger <Larry.Finger@lwfinger.net>"); | |||
358 | MODULE_LICENSE("GPL"); | 366 | MODULE_LICENSE("GPL"); |
359 | MODULE_DESCRIPTION("Realtek 8192C/8188C 802.11n PCI wireless"); | 367 | MODULE_DESCRIPTION("Realtek 8192C/8188C 802.11n PCI wireless"); |
360 | MODULE_FIRMWARE("rtlwifi/rtl8192cfw.bin"); | 368 | MODULE_FIRMWARE("rtlwifi/rtl8192cfw.bin"); |
369 | MODULE_FIRMWARE("rtlwifi/rtl8192cfwU.bin"); | ||
370 | MODULE_FIRMWARE("rtlwifi/rtl8192cfwU_B.bin"); | ||
361 | 371 | ||
362 | module_param_named(swenc, rtl92ce_mod_params.sw_crypto, bool, 0444); | 372 | module_param_named(swenc, rtl92ce_mod_params.sw_crypto, bool, 0444); |
363 | module_param_named(debug, rtl92ce_mod_params.debug, int, 0444); | 373 | module_param_named(debug, rtl92ce_mod_params.debug, int, 0444); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/def.h b/drivers/net/wireless/rtlwifi/rtl8192cu/def.h index c54940ea72fe..d097efb1e717 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/def.h +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/def.h | |||
@@ -50,10 +50,6 @@ | |||
50 | #define IS_VENDOR_UMC(version) \ | 50 | #define IS_VENDOR_UMC(version) \ |
51 | (((version) & CHIP_VENDOR_UMC) ? true : false) | 51 | (((version) & CHIP_VENDOR_UMC) ? true : false) |
52 | 52 | ||
53 | #define IS_VENDOR_UMC_A_CUT(version) \ | ||
54 | (((version) & CHIP_VENDOR_UMC) ? (((version) & (BIT(6) | BIT(7))) ? \ | ||
55 | false : true) : false) | ||
56 | |||
57 | #define IS_VENDOR_8723_A_CUT(version) \ | 53 | #define IS_VENDOR_8723_A_CUT(version) \ |
58 | (((version) & CHIP_VENDOR_UMC) ? (((version) & (BIT(6))) ? \ | 54 | (((version) & CHIP_VENDOR_UMC) ? (((version) & (BIT(6))) ? \ |
59 | false : true) : false) | 55 | false : true) : false) |