diff options
-rw-r--r-- | drivers/staging/rtl8192e/r8192E.h | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_cmdpkt.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/r819xE_firmware.c | 24 |
4 files changed, 14 insertions, 18 deletions
diff --git a/drivers/staging/rtl8192e/r8192E.h b/drivers/staging/rtl8192e/r8192E.h index 8052d0cf9fb9..fc231a068fea 100644 --- a/drivers/staging/rtl8192e/r8192E.h +++ b/drivers/staging/rtl8192e/r8192E.h | |||
@@ -1108,7 +1108,7 @@ typedef struct r8192_priv | |||
1108 | struct workqueue_struct *priv_wq; | 1108 | struct workqueue_struct *priv_wq; |
1109 | }r8192_priv; | 1109 | }r8192_priv; |
1110 | 1110 | ||
1111 | bool init_firmware(struct net_device *dev); | 1111 | bool init_firmware(struct r8192_priv *priv); |
1112 | u32 read_cam(struct r8192_priv *priv, u8 addr); | 1112 | u32 read_cam(struct r8192_priv *priv, u8 addr); |
1113 | void write_cam(struct r8192_priv *priv, u8 addr, u32 data); | 1113 | void write_cam(struct r8192_priv *priv, u8 addr, u32 data); |
1114 | u8 read_nic_byte(struct r8192_priv *priv, int x); | 1114 | u8 read_nic_byte(struct r8192_priv *priv, int x); |
@@ -1126,7 +1126,7 @@ void CamResetAllEntry(struct r8192_priv *priv); | |||
1126 | void EnableHWSecurityConfig8192(struct r8192_priv *priv); | 1126 | void EnableHWSecurityConfig8192(struct r8192_priv *priv); |
1127 | void setKey(struct r8192_priv *priv, u8 EntryNo, u8 KeyIndex, u16 KeyType, | 1127 | void setKey(struct r8192_priv *priv, u8 EntryNo, u8 KeyIndex, u16 KeyType, |
1128 | const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent); | 1128 | const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent); |
1129 | void firmware_init_param(struct net_device *dev); | 1129 | void firmware_init_param(struct r8192_priv *priv); |
1130 | RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len); | 1130 | RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len); |
1131 | 1131 | ||
1132 | #ifdef ENABLE_IPS | 1132 | #ifdef ENABLE_IPS |
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 933574c572f3..b29c37fa2ef6 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c | |||
@@ -2713,7 +2713,7 @@ static RT_STATUS rtl8192_adapter_start(struct r8192_priv *priv) | |||
2713 | 2713 | ||
2714 | //Firmware download | 2714 | //Firmware download |
2715 | RT_TRACE(COMP_INIT, "Load Firmware!\n"); | 2715 | RT_TRACE(COMP_INIT, "Load Firmware!\n"); |
2716 | bfirmwareok = init_firmware(dev); | 2716 | bfirmwareok = init_firmware(priv); |
2717 | if(bfirmwareok != true) { | 2717 | if(bfirmwareok != true) { |
2718 | rtStatus = RT_STATUS_FAILURE; | 2718 | rtStatus = RT_STATUS_FAILURE; |
2719 | return rtStatus; | 2719 | return rtStatus; |
diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c index a8310c92fd83..f60396015df8 100644 --- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c +++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c | |||
@@ -53,7 +53,7 @@ RT_STATUS cmpk_message_handle_tx( | |||
53 | int i; | 53 | int i; |
54 | 54 | ||
55 | RT_TRACE(COMP_CMDPKT,"%s(),buffer_len is %d\n",__FUNCTION__,buffer_len); | 55 | RT_TRACE(COMP_CMDPKT,"%s(),buffer_len is %d\n",__FUNCTION__,buffer_len); |
56 | firmware_init_param(dev); | 56 | firmware_init_param(priv); |
57 | //Fragmentation might be required | 57 | //Fragmentation might be required |
58 | frag_threshold = pfirmware->cmdpacket_frag_thresold; | 58 | frag_threshold = pfirmware->cmdpacket_frag_thresold; |
59 | do { | 59 | do { |
diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c index af99d0edfc88..1557d8030ca8 100644 --- a/drivers/staging/rtl8192e/r819xE_firmware.c +++ b/drivers/staging/rtl8192e/r819xE_firmware.c | |||
@@ -25,9 +25,8 @@ enum opt_rst_type { | |||
25 | OPT_FIRMWARE_RESET = 1, | 25 | OPT_FIRMWARE_RESET = 1, |
26 | }; | 26 | }; |
27 | 27 | ||
28 | void firmware_init_param(struct net_device *dev) | 28 | void firmware_init_param(struct r8192_priv *priv) |
29 | { | 29 | { |
30 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
31 | rt_firmware *pfirmware = priv->pFirmware; | 30 | rt_firmware *pfirmware = priv->pFirmware; |
32 | 31 | ||
33 | pfirmware->cmdpacket_frag_thresold = | 32 | pfirmware->cmdpacket_frag_thresold = |
@@ -37,10 +36,10 @@ void firmware_init_param(struct net_device *dev) | |||
37 | /* | 36 | /* |
38 | * segment the img and use the ptr and length to remember info on each segment | 37 | * segment the img and use the ptr and length to remember info on each segment |
39 | */ | 38 | */ |
40 | static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, | 39 | static bool fw_download_code(struct r8192_priv *priv, u8 *code_virtual_address, |
41 | u32 buffer_len) | 40 | u32 buffer_len) |
42 | { | 41 | { |
43 | struct r8192_priv *priv = ieee80211_priv(dev); | 42 | struct net_device *dev = priv->ieee80211->dev; |
44 | bool rt_status = true; | 43 | bool rt_status = true; |
45 | u16 frag_threshold; | 44 | u16 frag_threshold; |
46 | u16 frag_length, frag_offset = 0; | 45 | u16 frag_length, frag_offset = 0; |
@@ -52,7 +51,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, | |||
52 | cb_desc *tcb_desc; | 51 | cb_desc *tcb_desc; |
53 | u8 bLastIniPkt; | 52 | u8 bLastIniPkt; |
54 | 53 | ||
55 | firmware_init_param(dev); | 54 | firmware_init_param(priv); |
56 | 55 | ||
57 | /* Fragmentation might be required */ | 56 | /* Fragmentation might be required */ |
58 | frag_threshold = pfirmware->cmdpacket_frag_thresold; | 57 | frag_threshold = pfirmware->cmdpacket_frag_thresold; |
@@ -113,9 +112,8 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, | |||
113 | * register. Switch to CPU register in the begin and switch | 112 | * register. Switch to CPU register in the begin and switch |
114 | * back before return | 113 | * back before return |
115 | */ | 114 | */ |
116 | static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) | 115 | static bool CPUcheck_maincodeok_turnonCPU(struct r8192_priv *priv) |
117 | { | 116 | { |
118 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
119 | unsigned long timeout; | 117 | unsigned long timeout; |
120 | bool rt_status = true; | 118 | bool rt_status = true; |
121 | u32 CPU_status = 0; | 119 | u32 CPU_status = 0; |
@@ -166,9 +164,8 @@ CPUCheckMainCodeOKAndTurnOnCPU_Fail: | |||
166 | return rt_status; | 164 | return rt_status; |
167 | } | 165 | } |
168 | 166 | ||
169 | static bool CPUcheck_firmware_ready(struct net_device *dev) | 167 | static bool CPUcheck_firmware_ready(struct r8192_priv *priv) |
170 | { | 168 | { |
171 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
172 | unsigned long timeout; | 169 | unsigned long timeout; |
173 | bool rt_status = true; | 170 | bool rt_status = true; |
174 | u32 CPU_status = 0; | 171 | u32 CPU_status = 0; |
@@ -197,9 +194,8 @@ CPUCheckFirmwareReady_Fail: | |||
197 | 194 | ||
198 | } | 195 | } |
199 | 196 | ||
200 | bool init_firmware(struct net_device *dev) | 197 | bool init_firmware(struct r8192_priv *priv) |
201 | { | 198 | { |
202 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
203 | bool rt_status = true; | 199 | bool rt_status = true; |
204 | u32 file_length = 0; | 200 | u32 file_length = 0; |
205 | u8 *mapped_file = NULL; | 201 | u8 *mapped_file = NULL; |
@@ -289,7 +285,7 @@ bool init_firmware(struct net_device *dev) | |||
289 | * 3. each skb_buff packet data content will already include | 285 | * 3. each skb_buff packet data content will already include |
290 | * the firmware info and Tx descriptor info | 286 | * the firmware info and Tx descriptor info |
291 | */ | 287 | */ |
292 | rt_status = fw_download_code(dev, mapped_file, file_length); | 288 | rt_status = fw_download_code(priv, mapped_file, file_length); |
293 | if (rt_status != TRUE) | 289 | if (rt_status != TRUE) |
294 | goto download_firmware_fail; | 290 | goto download_firmware_fail; |
295 | 291 | ||
@@ -314,7 +310,7 @@ bool init_firmware(struct net_device *dev) | |||
314 | pfirmware->firmware_status = FW_STATUS_2_MOVE_MAIN_CODE; | 310 | pfirmware->firmware_status = FW_STATUS_2_MOVE_MAIN_CODE; |
315 | 311 | ||
316 | /* Check Put Code OK and Turn On CPU */ | 312 | /* Check Put Code OK and Turn On CPU */ |
317 | rt_status = CPUcheck_maincodeok_turnonCPU(dev); | 313 | rt_status = CPUcheck_maincodeok_turnonCPU(priv); |
318 | if (rt_status != TRUE) { | 314 | if (rt_status != TRUE) { |
319 | RT_TRACE(COMP_FIRMWARE, | 315 | RT_TRACE(COMP_FIRMWARE, |
320 | "CPUcheck_maincodeok_turnonCPU fail!\n"); | 316 | "CPUcheck_maincodeok_turnonCPU fail!\n"); |
@@ -329,7 +325,7 @@ bool init_firmware(struct net_device *dev) | |||
329 | pfirmware->firmware_status = FW_STATUS_4_MOVE_DATA_CODE; | 325 | pfirmware->firmware_status = FW_STATUS_4_MOVE_DATA_CODE; |
330 | mdelay(1); | 326 | mdelay(1); |
331 | 327 | ||
332 | rt_status = CPUcheck_firmware_ready(dev); | 328 | rt_status = CPUcheck_firmware_ready(priv); |
333 | if (rt_status != TRUE) { | 329 | if (rt_status != TRUE) { |
334 | RT_TRACE(COMP_FIRMWARE, | 330 | RT_TRACE(COMP_FIRMWARE, |
335 | "CPUcheck_firmware_ready fail(%d)!\n", | 331 | "CPUcheck_firmware_ready fail(%d)!\n", |