1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2012  Realtek Corporation.*/
3 
4 #include "../wifi.h"
5 #include "../core.h"
6 #include "../usb.h"
7 #include "../efuse.h"
8 #include "../base.h"
9 #include "reg.h"
10 #include "def.h"
11 #include "phy.h"
12 #include "mac.h"
13 #include "dm.h"
14 #include "rf.h"
15 #include "trx.h"
16 #include "led.h"
17 #include "hw.h"
18 #include "../rtl8192c/fw_common.h"
19 #include <linux/module.h>
20 
21 MODULE_AUTHOR("Georgia		<georgia@realtek.com>");
22 MODULE_AUTHOR("Ziv Huang	<ziv_huang@realtek.com>");
23 MODULE_AUTHOR("Larry Finger	<Larry.Finger@lwfinger.net>");
24 MODULE_LICENSE("GPL");
25 MODULE_DESCRIPTION("Realtek 8192C/8188C 802.11n USB wireless");
26 MODULE_FIRMWARE("rtlwifi/rtl8192cufw.bin");
27 MODULE_FIRMWARE("rtlwifi/rtl8192cufw_A.bin");
28 MODULE_FIRMWARE("rtlwifi/rtl8192cufw_B.bin");
29 MODULE_FIRMWARE("rtlwifi/rtl8192cufw_TMSC.bin");
30 
31 static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
32 {
33 	struct rtl_priv *rtlpriv = rtl_priv(hw);
34 	int err;
35 	char *fw_name;
36 
37 	rtlpriv->dm.dm_initialgain_enable = true;
38 	rtlpriv->dm.dm_flag = 0;
39 	rtlpriv->dm.disable_framebursting = false;
40 	rtlpriv->dm.thermalvalue = 0;
41 
42 	/* for firmware buf */
43 	rtlpriv->rtlhal.pfirmware = vzalloc(0x4000);
44 	if (!rtlpriv->rtlhal.pfirmware) {
45 		pr_err("Can't alloc buffer for fw\n");
46 		return 1;
47 	}
48 	if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
49 	    !IS_92C_SERIAL(rtlpriv->rtlhal.version)) {
50 		fw_name = "rtlwifi/rtl8192cufw_A.bin";
51 	} else if (IS_81XXC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) {
52 		fw_name = "rtlwifi/rtl8192cufw_B.bin";
53 	} else {
54 		fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
55 	}
56 	/* provide name of alternative file */
57 	rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
58 	pr_info("Loading firmware %s\n", fw_name);
59 	rtlpriv->max_fw_size = 0x4000;
60 	err = request_firmware_nowait(THIS_MODULE, 1,
61 				      fw_name, rtlpriv->io.dev,
62 				      GFP_KERNEL, hw, rtl_fw_cb);
63 	if (err) {
64 		vfree(rtlpriv->rtlhal.pfirmware);
65 		rtlpriv->rtlhal.pfirmware = NULL;
66 	}
67 	return err;
68 }
69 
70 static void rtl92cu_deinit_sw_vars(struct ieee80211_hw *hw)
71 {
72 	struct rtl_priv *rtlpriv = rtl_priv(hw);
73 
74 	if (rtlpriv->rtlhal.pfirmware) {
75 		vfree(rtlpriv->rtlhal.pfirmware);
76 		rtlpriv->rtlhal.pfirmware = NULL;
77 	}
78 }
79 
80 /* get bt coexist status */
81 static bool rtl92cu_get_btc_status(void)
82 {
83 	return false;
84 }
85 
86 static struct rtl_hal_ops rtl8192cu_hal_ops = {
87 	.init_sw_vars = rtl92cu_init_sw_vars,
88 	.deinit_sw_vars = rtl92cu_deinit_sw_vars,
89 	.read_chip_version = rtl92c_read_chip_version,
90 	.read_eeprom_info = rtl92cu_read_eeprom_info,
91 	.enable_interrupt = rtl92c_enable_interrupt,
92 	.disable_interrupt = rtl92c_disable_interrupt,
93 	.hw_init = rtl92cu_hw_init,
94 	.hw_disable = rtl92cu_card_disable,
95 	.set_network_type = rtl92cu_set_network_type,
96 	.set_chk_bssid = rtl92cu_set_check_bssid,
97 	.set_qos = rtl92c_set_qos,
98 	.set_bcn_reg = rtl92cu_set_beacon_related_registers,
99 	.set_bcn_intv = rtl92cu_set_beacon_interval,
100 	.update_interrupt_mask = rtl92cu_update_interrupt_mask,
101 	.get_hw_reg = rtl92cu_get_hw_reg,
102 	.set_hw_reg = rtl92cu_set_hw_reg,
103 	.update_rate_tbl = rtl92cu_update_hal_rate_tbl,
104 	.fill_tx_desc = rtl92cu_tx_fill_desc,
105 	.fill_fake_txdesc = rtl92cu_fill_fake_txdesc,
106 	.fill_tx_cmddesc = rtl92cu_tx_fill_cmddesc,
107 	.query_rx_desc = rtl92cu_rx_query_desc,
108 	.set_channel_access = rtl92cu_update_channel_access_setting,
109 	.radio_onoff_checking = rtl92cu_gpio_radio_on_off_checking,
110 	.set_bw_mode = rtl92c_phy_set_bw_mode,
111 	.switch_channel = rtl92c_phy_sw_chnl,
112 	.dm_watchdog = rtl92c_dm_watchdog,
113 	.scan_operation_backup = rtl_phy_scan_operation_backup,
114 	.set_rf_power_state = rtl92cu_phy_set_rf_power_state,
115 	.led_control = rtl92cu_led_control,
116 	.enable_hw_sec = rtl92cu_enable_hw_security_config,
117 	.set_key = rtl92c_set_key,
118 	.get_bbreg = rtl92c_phy_query_bb_reg,
119 	.set_bbreg = rtl92c_phy_set_bb_reg,
120 	.get_rfreg = rtl92cu_phy_query_rf_reg,
121 	.set_rfreg = rtl92cu_phy_set_rf_reg,
122 	.phy_rf6052_config = rtl92cu_phy_rf6052_config,
123 	.phy_rf6052_set_cck_txpower = rtl92cu_phy_rf6052_set_cck_txpower,
124 	.phy_rf6052_set_ofdm_txpower = rtl92cu_phy_rf6052_set_ofdm_txpower,
125 	.config_bb_with_headerfile = _rtl92cu_phy_config_bb_with_headerfile,
126 	.config_bb_with_pgheaderfile = _rtl92cu_phy_config_bb_with_pgheaderfile,
127 	.phy_lc_calibrate = _rtl92cu_phy_lc_calibrate,
128 	.phy_set_bw_mode_callback = rtl92cu_phy_set_bw_mode_callback,
129 	.dm_dynamic_txpower = rtl92cu_dm_dynamic_txpower,
130 	.fill_h2c_cmd = rtl92c_fill_h2c_cmd,
131 	.get_btc_status = rtl92cu_get_btc_status,
132 };
133 
134 static struct rtl_mod_params rtl92cu_mod_params = {
135 	.sw_crypto = 0,
136 	.debug_level = 0,
137 	.debug_mask = 0,
138 };
139 
140 module_param_named(swenc, rtl92cu_mod_params.sw_crypto, bool, 0444);
141 module_param_named(debug_level, rtl92cu_mod_params.debug_level, int, 0644);
142 module_param_named(debug_mask, rtl92cu_mod_params.debug_mask, ullong, 0644);
143 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
144 MODULE_PARM_DESC(debug_level, "Set debug level (0-5) (default 0)");
145 MODULE_PARM_DESC(debug_mask, "Set debug mask (default 0)");
146 
147 static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {
148 	/* rx */
149 	.in_ep_num = RTL92C_USB_BULK_IN_NUM,
150 	.rx_urb_num = RTL92C_NUM_RX_URBS,
151 	.rx_max_size = RTL92C_SIZE_MAX_RX_BUFFER,
152 	.usb_rx_hdl = rtl8192cu_rx_hdl,
153 	.usb_rx_segregate_hdl = NULL,
154 	/* tx */
155 	.usb_tx_cleanup = rtl8192c_tx_cleanup,
156 	.usb_tx_post_hdl = rtl8192c_tx_post_hdl,
157 	.usb_tx_aggregate_hdl = rtl8192c_tx_aggregate_hdl,
158 	/* endpoint mapping */
159 	.usb_endpoint_mapping = rtl8192cu_endpoint_mapping,
160 	.usb_mq_to_hwq = rtl8192cu_mq_to_hwq,
161 };
162 
163 static struct rtl_hal_cfg rtl92cu_hal_cfg = {
164 	.name = "rtl92c_usb",
165 	.ops = &rtl8192cu_hal_ops,
166 	.mod_params = &rtl92cu_mod_params,
167 	.usb_interface_cfg = &rtl92cu_interface_cfg,
168 
169 	.maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,
170 	.maps[SYS_FUNC_EN] = REG_SYS_FUNC_EN,
171 	.maps[SYS_CLK] = REG_SYS_CLKR,
172 	.maps[MAC_RCR_AM] = AM,
173 	.maps[MAC_RCR_AB] = AB,
174 	.maps[MAC_RCR_ACRC32] = ACRC32,
175 	.maps[MAC_RCR_ACF] = ACF,
176 	.maps[MAC_RCR_AAP] = AAP,
177 
178 	.maps[EFUSE_TEST] = REG_EFUSE_TEST,
179 	.maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
180 	.maps[EFUSE_CLK] = 0,
181 	.maps[EFUSE_CLK_CTRL] = REG_EFUSE_CTRL,
182 	.maps[EFUSE_PWC_EV12V] = PWC_EV12V,
183 	.maps[EFUSE_FEN_ELDR] = FEN_ELDR,
184 	.maps[EFUSE_LOADER_CLK_EN] = LOADER_CLK_EN,
185 	.maps[EFUSE_ANA8M] = EFUSE_ANA8M,
186 	.maps[EFUSE_HWSET_MAX_SIZE] = HWSET_MAX_SIZE,
187 	.maps[EFUSE_MAX_SECTION_MAP] = EFUSE_MAX_SECTION,
188 	.maps[EFUSE_REAL_CONTENT_SIZE] = EFUSE_REAL_CONTENT_LEN,
189 
190 	.maps[RWCAM] = REG_CAMCMD,
191 	.maps[WCAMI] = REG_CAMWRITE,
192 	.maps[RCAMO] = REG_CAMREAD,
193 	.maps[CAMDBG] = REG_CAMDBG,
194 	.maps[SECR] = REG_SECCFG,
195 	.maps[SEC_CAM_NONE] = CAM_NONE,
196 	.maps[SEC_CAM_WEP40] = CAM_WEP40,
197 	.maps[SEC_CAM_TKIP] = CAM_TKIP,
198 	.maps[SEC_CAM_AES] = CAM_AES,
199 	.maps[SEC_CAM_WEP104] = CAM_WEP104,
200 
201 	.maps[RTL_IMR_BCNDMAINT6] = IMR_BCNDMAINT6,
202 	.maps[RTL_IMR_BCNDMAINT5] = IMR_BCNDMAINT5,
203 	.maps[RTL_IMR_BCNDMAINT4] = IMR_BCNDMAINT4,
204 	.maps[RTL_IMR_BCNDMAINT3] = IMR_BCNDMAINT3,
205 	.maps[RTL_IMR_BCNDMAINT2] = IMR_BCNDMAINT2,
206 	.maps[RTL_IMR_BCNDMAINT1] = IMR_BCNDMAINT1,
207 	.maps[RTL_IMR_BCNDOK8] = IMR_BCNDOK8,
208 	.maps[RTL_IMR_BCNDOK7] = IMR_BCNDOK7,
209 	.maps[RTL_IMR_BCNDOK6] = IMR_BCNDOK6,
210 	.maps[RTL_IMR_BCNDOK5] = IMR_BCNDOK5,
211 	.maps[RTL_IMR_BCNDOK4] = IMR_BCNDOK4,
212 	.maps[RTL_IMR_BCNDOK3] = IMR_BCNDOK3,
213 	.maps[RTL_IMR_BCNDOK2] = IMR_BCNDOK2,
214 	.maps[RTL_IMR_BCNDOK1] = IMR_BCNDOK1,
215 	.maps[RTL_IMR_TIMEOUT2] = IMR_TIMEOUT2,
216 	.maps[RTL_IMR_TIMEOUT1] = IMR_TIMEOUT1,
217 
218 	.maps[RTL_IMR_TXFOVW] = IMR_TXFOVW,
219 	.maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT,
220 	.maps[RTL_IMR_BCNINT] = IMR_BCNINT,
221 	.maps[RTL_IMR_RXFOVW] = IMR_RXFOVW,
222 	.maps[RTL_IMR_RDU] = IMR_RDU,
223 	.maps[RTL_IMR_ATIMEND] = IMR_ATIMEND,
224 	.maps[RTL_IMR_BDOK] = IMR_BDOK,
225 	.maps[RTL_IMR_MGNTDOK] = IMR_MGNTDOK,
226 	.maps[RTL_IMR_TBDER] = IMR_TBDER,
227 	.maps[RTL_IMR_HIGHDOK] = IMR_HIGHDOK,
228 	.maps[RTL_IMR_TBDOK] = IMR_TBDOK,
229 	.maps[RTL_IMR_BKDOK] = IMR_BKDOK,
230 	.maps[RTL_IMR_BEDOK] = IMR_BEDOK,
231 	.maps[RTL_IMR_VIDOK] = IMR_VIDOK,
232 	.maps[RTL_IMR_VODOK] = IMR_VODOK,
233 	.maps[RTL_IMR_ROK] = IMR_ROK,
234 	.maps[RTL_IBSS_INT_MASKS] = (IMR_BCNINT | IMR_TBDOK | IMR_TBDER),
235 
236 	.maps[RTL_RC_CCK_RATE1M] = DESC_RATE1M,
237 	.maps[RTL_RC_CCK_RATE2M] = DESC_RATE2M,
238 	.maps[RTL_RC_CCK_RATE5_5M] = DESC_RATE5_5M,
239 	.maps[RTL_RC_CCK_RATE11M] = DESC_RATE11M,
240 	.maps[RTL_RC_OFDM_RATE6M] = DESC_RATE6M,
241 	.maps[RTL_RC_OFDM_RATE9M] = DESC_RATE9M,
242 	.maps[RTL_RC_OFDM_RATE12M] = DESC_RATE12M,
243 	.maps[RTL_RC_OFDM_RATE18M] = DESC_RATE18M,
244 	.maps[RTL_RC_OFDM_RATE24M] = DESC_RATE24M,
245 	.maps[RTL_RC_OFDM_RATE36M] = DESC_RATE36M,
246 	.maps[RTL_RC_OFDM_RATE48M] = DESC_RATE48M,
247 	.maps[RTL_RC_OFDM_RATE54M] = DESC_RATE54M,
248 	.maps[RTL_RC_HT_RATEMCS7] = DESC_RATEMCS7,
249 	.maps[RTL_RC_HT_RATEMCS15] = DESC_RATEMCS15,
250 };
251 
252 #define USB_VENDOR_ID_REALTEK		0x0bda
253 
254 /* 2010-10-19 DID_USB_V3.4 */
255 static const struct usb_device_id rtl8192c_usb_ids[] = {
256 
257 	/*=== Realtek demoboard ===*/
258 	/* Default ID */
259 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8191, rtl92cu_hal_cfg)},
260 
261 	/****** 8188CU ********/
262 	/* RTL8188CTV */
263 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x018a, rtl92cu_hal_cfg)},
264 	/* 8188CE-VAU USB minCard */
265 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8170, rtl92cu_hal_cfg)},
266 	/* 8188cu 1*1 dongle */
267 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8176, rtl92cu_hal_cfg)},
268 	/* 8188cu 1*1 dongle, (b/g mode only) */
269 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8177, rtl92cu_hal_cfg)},
270 	/* 8188cu Slim Solo */
271 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817a, rtl92cu_hal_cfg)},
272 	/* 8188cu Slim Combo */
273 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817b, rtl92cu_hal_cfg)},
274 	/* 8188RU High-power USB Dongle */
275 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817d, rtl92cu_hal_cfg)},
276 	/* 8188CE-VAU USB minCard (b/g mode only) */
277 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817e, rtl92cu_hal_cfg)},
278 	/* 8188RU in Alfa AWUS036NHR */
279 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817f, rtl92cu_hal_cfg)},
280 	/* RTL8188CUS-VL */
281 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x818a, rtl92cu_hal_cfg)},
282 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x819a, rtl92cu_hal_cfg)},
283 	/* 8188 Combo for BC4 */
284 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8754, rtl92cu_hal_cfg)},
285 
286 	/****** 8192CU ********/
287 	/* 8192cu 2*2 */
288 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8178, rtl92cu_hal_cfg)},
289 	/* 8192CE-VAU USB minCard */
290 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817c, rtl92cu_hal_cfg)},
291 
292 	/*=== Customer ID ===*/
293 	/****** 8188CU ********/
294 	{RTL_USB_DEVICE(0x050d, 0x1102, rtl92cu_hal_cfg)}, /*Belkin - Edimax*/
295 	{RTL_USB_DEVICE(0x050d, 0x11f2, rtl92cu_hal_cfg)}, /*Belkin - ISY*/
296 	{RTL_USB_DEVICE(0x06f8, 0xe033, rtl92cu_hal_cfg)}, /*Hercules - Edimax*/
297 	{RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/
298 	{RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/
299 	{RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/
300 	{RTL_USB_DEVICE(0x0846, 0x9043, rtl92cu_hal_cfg)}, /*NG WNA1000Mv2*/
301 	{RTL_USB_DEVICE(0x0b05, 0x17ba, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/
302 	{RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/
303 	{RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
304 	{RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
305 	{RTL_USB_DEVICE(0x0df6, 0x0070, rtl92cu_hal_cfg)}, /*Sitecom - 150N */
306 	{RTL_USB_DEVICE(0x0df6, 0x0077, rtl92cu_hal_cfg)}, /*Sitecom-WLA2100V2*/
307 	{RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
308 	{RTL_USB_DEVICE(0x4856, 0x0091, rtl92cu_hal_cfg)}, /*NetweeN - Feixun*/
309 	/* HP - Lite-On ,8188CUS Slim Combo */
310 	{RTL_USB_DEVICE(0x103c, 0x1629, rtl92cu_hal_cfg)},
311 	{RTL_USB_DEVICE(0x13d3, 0x3357, rtl92cu_hal_cfg)}, /* AzureWave */
312 	{RTL_USB_DEVICE(0x2001, 0x3308, rtl92cu_hal_cfg)}, /*D-Link - Alpha*/
313 	{RTL_USB_DEVICE(0x2019, 0x4902, rtl92cu_hal_cfg)}, /*Planex - Etop*/
314 	{RTL_USB_DEVICE(0x2019, 0xab2a, rtl92cu_hal_cfg)}, /*Planex - Abocom*/
315 	/*SW-WF02-AD15 -Abocom*/
316 	{RTL_USB_DEVICE(0x2019, 0xab2e, rtl92cu_hal_cfg)},
317 	{RTL_USB_DEVICE(0x2019, 0xed17, rtl92cu_hal_cfg)}, /*PCI - Edimax*/
318 	{RTL_USB_DEVICE(0x20f4, 0x648b, rtl92cu_hal_cfg)}, /*TRENDnet - Cameo*/
319 	{RTL_USB_DEVICE(0x7392, 0x7811, rtl92cu_hal_cfg)}, /*Edimax - Edimax*/
320 	{RTL_USB_DEVICE(0x13d3, 0x3358, rtl92cu_hal_cfg)}, /*Azwave 8188CE-VAU*/
321 	/* Russian customer -Azwave (8188CE-VAU  b/g mode only) */
322 	{RTL_USB_DEVICE(0x13d3, 0x3359, rtl92cu_hal_cfg)},
323 	{RTL_USB_DEVICE(0x4855, 0x0090, rtl92cu_hal_cfg)}, /* Feixun */
324 	{RTL_USB_DEVICE(0x4855, 0x0091, rtl92cu_hal_cfg)}, /* NetweeN-Feixun */
325 	{RTL_USB_DEVICE(0x9846, 0x9041, rtl92cu_hal_cfg)}, /* Netgear Cameo */
326 
327 	/****** 8188 RU ********/
328 	/* Netcore */
329 	{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x317f, rtl92cu_hal_cfg)},
330 
331 	/****** 8188CUS Slim Solo********/
332 	{RTL_USB_DEVICE(0x04f2, 0xaff7, rtl92cu_hal_cfg)}, /*Xavi*/
333 	{RTL_USB_DEVICE(0x04f2, 0xaff9, rtl92cu_hal_cfg)}, /*Xavi*/
334 	{RTL_USB_DEVICE(0x04f2, 0xaffa, rtl92cu_hal_cfg)}, /*Xavi*/
335 	{RTL_USB_DEVICE(0x0846, 0x9042, rtl92cu_hal_cfg)}, /*On Netwrks N150MA*/
336 
337 	/****** 8188CUS Slim Combo ********/
338 	{RTL_USB_DEVICE(0x04f2, 0xaff8, rtl92cu_hal_cfg)}, /*Xavi*/
339 	{RTL_USB_DEVICE(0x04f2, 0xaffb, rtl92cu_hal_cfg)}, /*Xavi*/
340 	{RTL_USB_DEVICE(0x04f2, 0xaffc, rtl92cu_hal_cfg)}, /*Xavi*/
341 	{RTL_USB_DEVICE(0x2019, 0x1201, rtl92cu_hal_cfg)}, /*Planex-Vencer*/
342 
343 	/****** 8192CU ********/
344 	{RTL_USB_DEVICE(0x050d, 0x1004, rtl92cu_hal_cfg)}, /*Belcom-SurfN300*/
345 	{RTL_USB_DEVICE(0x050d, 0x2102, rtl92cu_hal_cfg)}, /*Belcom-Sercomm*/
346 	{RTL_USB_DEVICE(0x050d, 0x2103, rtl92cu_hal_cfg)}, /*Belcom-Edimax*/
347 	{RTL_USB_DEVICE(0x0586, 0x341f, rtl92cu_hal_cfg)}, /*Zyxel -Abocom*/
348 	{RTL_USB_DEVICE(0x07aa, 0x0056, rtl92cu_hal_cfg)}, /*ATKK-Gemtek*/
349 	{RTL_USB_DEVICE(0x07b8, 0x8178, rtl92cu_hal_cfg)}, /*Funai -Abocom*/
350 	{RTL_USB_DEVICE(0x0846, 0x9021, rtl92cu_hal_cfg)}, /*Netgear-Sercomm*/
351 	{RTL_USB_DEVICE(0x0846, 0xf001, rtl92cu_hal_cfg)}, /*On Netwrks N300MA*/
352 	{RTL_USB_DEVICE(0x0b05, 0x17ab, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/
353 	{RTL_USB_DEVICE(0x0bda, 0x8186, rtl92cu_hal_cfg)}, /*Realtek 92CE-VAU*/
354 	{RTL_USB_DEVICE(0x0df6, 0x0061, rtl92cu_hal_cfg)}, /*Sitecom-Edimax*/
355 	{RTL_USB_DEVICE(0x0e66, 0x0019, rtl92cu_hal_cfg)}, /*Hawking-Edimax*/
356 	{RTL_USB_DEVICE(0x2001, 0x3307, rtl92cu_hal_cfg)}, /*D-Link-Cameo*/
357 	{RTL_USB_DEVICE(0x2001, 0x3309, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
358 	{RTL_USB_DEVICE(0x2001, 0x330a, rtl92cu_hal_cfg)}, /*D-Link-Alpha*/
359 	{RTL_USB_DEVICE(0x2001, 0x330d, rtl92cu_hal_cfg)}, /*D-Link DWA-131 */
360 	{RTL_USB_DEVICE(0x2019, 0xab2b, rtl92cu_hal_cfg)}, /*Planex -Abocom*/
361 	{RTL_USB_DEVICE(0x20f4, 0x624d, rtl92cu_hal_cfg)}, /*TRENDNet*/
362 	{RTL_USB_DEVICE(0x2357, 0x0100, rtl92cu_hal_cfg)}, /*TP-Link WN8200ND*/
363 	{RTL_USB_DEVICE(0x7392, 0x7822, rtl92cu_hal_cfg)}, /*Edimax -Edimax*/
364 	{}
365 };
366 
367 MODULE_DEVICE_TABLE(usb, rtl8192c_usb_ids);
368 
369 static int rtl8192cu_probe(struct usb_interface *intf,
370 			   const struct usb_device_id *id)
371 {
372 	return rtl_usb_probe(intf, id, &rtl92cu_hal_cfg);
373 }
374 
375 static struct usb_driver rtl8192cu_driver = {
376 	.name = "rtl8192cu",
377 	.probe = rtl8192cu_probe,
378 	.disconnect = rtl_usb_disconnect,
379 	.id_table = rtl8192c_usb_ids,
380 
381 #ifdef CONFIG_PM
382 	/* .suspend = rtl_usb_suspend, */
383 	/* .resume = rtl_usb_resume, */
384 	/* .reset_resume = rtl8192c_resume, */
385 #endif /* CONFIG_PM */
386 	.disable_hub_initiated_lpm = 1,
387 };
388 
389 module_usb_driver(rtl8192cu_driver);
390