struct workqueue_struct *priv_wq;
}r8192_priv;
-bool init_firmware(struct net_device *dev);
+bool init_firmware(struct r8192_priv *priv);
u32 read_cam(struct r8192_priv *priv, u8 addr);
void write_cam(struct r8192_priv *priv, u8 addr, u32 data);
u8 read_nic_byte(struct r8192_priv *priv, int x);
void EnableHWSecurityConfig8192(struct r8192_priv *priv);
void setKey(struct r8192_priv *priv, u8 EntryNo, u8 KeyIndex, u16 KeyType,
const u8 *MacAddr, u8 DefaultKey, u32 *KeyContent);
-void firmware_init_param(struct net_device *dev);
+void firmware_init_param(struct r8192_priv *priv);
RT_STATUS cmpk_message_handle_tx(struct net_device *dev, u8* codevirtualaddress, u32 packettype, u32 buffer_len);
#ifdef ENABLE_IPS
OPT_FIRMWARE_RESET = 1,
};
-void firmware_init_param(struct net_device *dev)
+void firmware_init_param(struct r8192_priv *priv)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
rt_firmware *pfirmware = priv->pFirmware;
pfirmware->cmdpacket_frag_thresold =
/*
* segment the img and use the ptr and length to remember info on each segment
*/
-static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
+static bool fw_download_code(struct r8192_priv *priv, u8 *code_virtual_address,
u32 buffer_len)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
+ struct net_device *dev = priv->ieee80211->dev;
bool rt_status = true;
u16 frag_threshold;
u16 frag_length, frag_offset = 0;
cb_desc *tcb_desc;
u8 bLastIniPkt;
- firmware_init_param(dev);
+ firmware_init_param(priv);
/* Fragmentation might be required */
frag_threshold = pfirmware->cmdpacket_frag_thresold;
* register. Switch to CPU register in the begin and switch
* back before return
*/
-static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
+static bool CPUcheck_maincodeok_turnonCPU(struct r8192_priv *priv)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
unsigned long timeout;
bool rt_status = true;
u32 CPU_status = 0;
return rt_status;
}
-static bool CPUcheck_firmware_ready(struct net_device *dev)
+static bool CPUcheck_firmware_ready(struct r8192_priv *priv)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
unsigned long timeout;
bool rt_status = true;
u32 CPU_status = 0;
}
-bool init_firmware(struct net_device *dev)
+bool init_firmware(struct r8192_priv *priv)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
bool rt_status = true;
u32 file_length = 0;
u8 *mapped_file = NULL;
* 3. each skb_buff packet data content will already include
* the firmware info and Tx descriptor info
*/
- rt_status = fw_download_code(dev, mapped_file, file_length);
+ rt_status = fw_download_code(priv, mapped_file, file_length);
if (rt_status != TRUE)
goto download_firmware_fail;
pfirmware->firmware_status = FW_STATUS_2_MOVE_MAIN_CODE;
/* Check Put Code OK and Turn On CPU */
- rt_status = CPUcheck_maincodeok_turnonCPU(dev);
+ rt_status = CPUcheck_maincodeok_turnonCPU(priv);
if (rt_status != TRUE) {
RT_TRACE(COMP_FIRMWARE,
"CPUcheck_maincodeok_turnonCPU fail!\n");
pfirmware->firmware_status = FW_STATUS_4_MOVE_DATA_CODE;
mdelay(1);
- rt_status = CPUcheck_firmware_ready(dev);
+ rt_status = CPUcheck_firmware_ready(priv);
if (rt_status != TRUE) {
RT_TRACE(COMP_FIRMWARE,
"CPUcheck_firmware_ready fail(%d)!\n",