Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
fw.h File Reference

Go to the source code of this file.

Data Structures

struct  fw_priv
 
struct  fw_hdr
 
struct  rt_firmware
 
struct  h2c_set_pwrmode_parm
 
struct  h2c_joinbss_rpt_parm
 
struct  h2c_wpa_ptk
 
struct  h2c_wpa_two_way_parm
 

Macros

#define RTL8190_MAX_FIRMWARE_CODE_SIZE   64000
 
#define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE   90000
 
#define RTL8190_CPU_START_OFFSET   0x80
 
#define MAX_FIRMWARE_CODE_SIZE   0xFF00
 
#define RT_8192S_FIRMWARE_HDR_SIZE   80
 
#define RT_8192S_FIRMWARE_HDR_EXCLUDE_PRI_SIZE   32
 
#define MAX_DEV_ADDR_SIZE   8
 
#define MAX_FIRMWARE_INFORMATION_SIZE   32
 
#define MAX_802_11_HEADER_LENGTH
 
#define ENCRYPTION_MAX_OVERHEAD   128
 
#define MAX_FRAGMENT_COUNT   8
 
#define MAX_TRANSMIT_BUFFER_SIZE
 
#define H2C_TX_CMD_HDR_LEN   8
 
#define FW_DIG_ENABLE_CTL   BIT(0)
 
#define FW_HIGH_PWR_ENABLE_CTL   BIT(1)
 
#define FW_SS_CTL   BIT(2)
 
#define FW_RA_INIT_CTL   BIT(3)
 
#define FW_RA_BG_CTL   BIT(4)
 
#define FW_RA_N_CTL   BIT(5)
 
#define FW_PWR_TRK_CTL   BIT(6)
 
#define FW_IQK_CTL   BIT(7)
 
#define FW_FA_CTL   BIT(8)
 
#define FW_DRIVER_CTRL_DM_CTL   BIT(9)
 
#define FW_PAPE_CTL_BY_SW_HW   BIT(10)
 
#define FW_DISABLE_ALL_DM   0
 
#define FW_PWR_TRK_PARAM_CLR   0x0000ffff
 
#define FW_RA_PARAM_CLR   0xffff0000
 
#define FW_CMD_IO_CLR(rtlpriv, _Bit)
 
#define FW_CMD_IO_UPDATE(rtlpriv, _val)   rtlpriv->rtlhal.fwcmd_iomap = _val;
 
#define FW_CMD_IO_SET(rtlpriv, _val)
 
#define FW_CMD_PARA_SET(rtlpriv, _val)
 
#define FW_CMD_IO_QUERY(rtlpriv)   (u16)(rtlpriv->rtlhal.fwcmd_iomap)
 
#define FW_CMD_IO_PARA_QUERY(rtlpriv)   ((u32)(rtlpriv->rtlhal.fwcmd_ioparam))
 

Enumerations

enum  desc_packet_type { DESC_PACKET_TYPE_INIT = 0, DESC_PACKET_TYPE_NORMAL = 1, DESC_PACKET_TYPE_INIT = 0, DESC_PACKET_TYPE_NORMAL = 1 }
 
enum  fw_status {
  FW_STATUS_INIT = 0, FW_STATUS_LOAD_IMEM = 1, FW_STATUS_LOAD_EMEM = 2, FW_STATUS_LOAD_DMEM = 3,
  FW_STATUS_READY = 4
}
 
enum  h2c_cmd {
  FW_H2C_SETPWRMODE = 0, FW_H2C_JOINBSSRPT = 1, FW_H2C_WOWLAN_UPDATE_GTK = 2, FW_H2C_WOWLAN_UPDATE_IV = 3,
  FW_H2C_WOWLAN_OFFLOAD = 4
}
 
enum  fw_h2c_cmd {
  H2C_READ_MACREG_CMD, H2C_WRITE_MACREG_CMD, H2C_READBB_CMD, H2C_WRITEBB_CMD,
  H2C_READRF_CMD, H2C_WRITERF_CMD, H2C_READ_EEPROM_CMD, H2C_WRITE_EEPROM_CMD,
  H2C_READ_EFUSE_CMD, H2C_WRITE_EFUSE_CMD, H2C_READ_CAM_CMD, H2C_WRITE_CAM_CMD,
  H2C_SETBCNITV_CMD, H2C_SETMBIDCFG_CMD, H2C_JOINBSS_CMD, H2C_DISCONNECT_CMD,
  H2C_CREATEBSS_CMD, H2C_SETOPMode_CMD, H2C_SITESURVEY_CMD, H2C_SETAUTH_CMD,
  H2C_SETKEY_CMD, H2C_SETSTAKEY_CMD, H2C_SETASSOCSTA_CMD, H2C_DELASSOCSTA_CMD,
  H2C_SETSTAPWRSTATE_CMD, H2C_SETBASICRATE_CMD, H2C_GETBASICRATE_CMD, H2C_SETDATARATE_CMD,
  H2C_GETDATARATE_CMD, H2C_SETPHYINFO_CMD, H2C_GETPHYINFO_CMD, H2C_SETPHY_CMD,
  H2C_GETPHY_CMD, H2C_READRSSI_CMD, H2C_READGAIN_CMD, H2C_SETATIM_CMD,
  H2C_SETPWRMODE_CMD, H2C_JOINBSSRPT_CMD, H2C_SETRATABLE_CMD, H2C_GETRATABLE_CMD,
  H2C_GETCCXREPORT_CMD, H2C_GETDTMREPORT_CMD, H2C_GETTXRATESTATICS_CMD, H2C_SETUSBSUSPEND_CMD,
  H2C_SETH2CLBK_CMD, H2C_TMP1, H2C_WOWLAN_UPDATE_GTK_CMD, H2C_WOWLAN_FW_OFFLOAD,
  H2C_TMP2, H2C_TMP3, H2C_WOWLAN_UPDATE_IV_CMD, H2C_TMP4,
  MAX_H2CCMD
}
 

Functions

int rtl92s_download_fw (struct ieee80211_hw *hw)
 
void rtl92s_set_fw_pwrmode_cmd (struct ieee80211_hw *hw, u8 mode)
 
void rtl92s_set_fw_joinbss_report_cmd (struct ieee80211_hw *hw, u8 mstatus, u8 ps_qosinfo)
 

Macro Definition Documentation

#define ENCRYPTION_MAX_OVERHEAD   128

Definition at line 46 of file fw.h.

#define FW_CMD_IO_CLR (   rtlpriv,
  _Bit 
)
Value:
do { \
udelay(1000); \
rtlpriv->rtlhal.fwcmd_iomap &= (~_Bit); \
} while (0)

Definition at line 344 of file fw.h.

#define FW_CMD_IO_PARA_QUERY (   rtlpriv)    ((u32)(rtlpriv->rtlhal.fwcmd_ioparam))

Definition at line 367 of file fw.h.

#define FW_CMD_IO_QUERY (   rtlpriv)    (u16)(rtlpriv->rtlhal.fwcmd_iomap)

Definition at line 365 of file fw.h.

#define FW_CMD_IO_SET (   rtlpriv,
  _val 
)
Value:
do { \
rtl_write_word(rtlpriv, LBUS_MON_ADDR, (u16)_val); \
FW_CMD_IO_UPDATE(rtlpriv, _val); \
} while (0)

Definition at line 353 of file fw.h.

#define FW_CMD_IO_UPDATE (   rtlpriv,
  _val 
)    rtlpriv->rtlhal.fwcmd_iomap = _val;

Definition at line 350 of file fw.h.

#define FW_CMD_PARA_SET (   rtlpriv,
  _val 
)
Value:
do { \
rtl_write_dword(rtlpriv, LBUS_ADDR_MASK, _val); \
rtlpriv->rtlhal.fwcmd_ioparam = _val; \
} while (0)

Definition at line 359 of file fw.h.

#define FW_DIG_ENABLE_CTL   BIT(0)

Definition at line 56 of file fw.h.

#define FW_DISABLE_ALL_DM   0

Definition at line 67 of file fw.h.

#define FW_DRIVER_CTRL_DM_CTL   BIT(9)

Definition at line 65 of file fw.h.

#define FW_FA_CTL   BIT(8)

Definition at line 64 of file fw.h.

#define FW_HIGH_PWR_ENABLE_CTL   BIT(1)

Definition at line 57 of file fw.h.

#define FW_IQK_CTL   BIT(7)

Definition at line 63 of file fw.h.

#define FW_PAPE_CTL_BY_SW_HW   BIT(10)

Definition at line 66 of file fw.h.

#define FW_PWR_TRK_CTL   BIT(6)

Definition at line 62 of file fw.h.

#define FW_PWR_TRK_PARAM_CLR   0x0000ffff

Definition at line 68 of file fw.h.

#define FW_RA_BG_CTL   BIT(4)

Definition at line 60 of file fw.h.

#define FW_RA_INIT_CTL   BIT(3)

Definition at line 59 of file fw.h.

#define FW_RA_N_CTL   BIT(5)

Definition at line 61 of file fw.h.

#define FW_RA_PARAM_CLR   0xffff0000

Definition at line 69 of file fw.h.

#define FW_SS_CTL   BIT(2)

Definition at line 58 of file fw.h.

#define H2C_TX_CMD_HDR_LEN   8

Definition at line 53 of file fw.h.

#define MAX_802_11_HEADER_LENGTH
Value:
(40 + \
MAX_FIRMWARE_INFORMATION_SIZE)

Definition at line 44 of file fw.h.

#define MAX_DEV_ADDR_SIZE   8

Definition at line 42 of file fw.h.

#define MAX_FIRMWARE_CODE_SIZE   0xFF00

Definition at line 36 of file fw.h.

#define MAX_FIRMWARE_INFORMATION_SIZE   32

Definition at line 43 of file fw.h.

#define MAX_FRAGMENT_COUNT   8

Definition at line 47 of file fw.h.

#define MAX_TRANSMIT_BUFFER_SIZE
Value:
(1600 + \
ENCRYPTION_MAX_OVERHEAD) *\

Definition at line 48 of file fw.h.

#define RT_8192S_FIRMWARE_HDR_EXCLUDE_PRI_SIZE   32

Definition at line 39 of file fw.h.

#define RT_8192S_FIRMWARE_HDR_SIZE   80

Definition at line 38 of file fw.h.

#define RTL8190_CPU_START_OFFSET   0x80

Definition at line 34 of file fw.h.

#define RTL8190_MAX_FIRMWARE_CODE_SIZE   64000

Definition at line 32 of file fw.h.

#define RTL8190_MAX_RAW_FIRMWARE_CODE_SIZE   90000

Definition at line 33 of file fw.h.

Enumeration Type Documentation

Enumerator:
DESC_PACKET_TYPE_INIT 
DESC_PACKET_TYPE_NORMAL 
DESC_PACKET_TYPE_INIT 
DESC_PACKET_TYPE_NORMAL 

Definition at line 71 of file fw.h.

enum fw_h2c_cmd
Enumerator:
H2C_READ_MACREG_CMD 
H2C_WRITE_MACREG_CMD 
H2C_READBB_CMD 
H2C_WRITEBB_CMD 
H2C_READRF_CMD 
H2C_WRITERF_CMD 
H2C_READ_EEPROM_CMD 
H2C_WRITE_EEPROM_CMD 
H2C_READ_EFUSE_CMD 
H2C_WRITE_EFUSE_CMD 
H2C_READ_CAM_CMD 
H2C_WRITE_CAM_CMD 
H2C_SETBCNITV_CMD 
H2C_SETMBIDCFG_CMD 
H2C_JOINBSS_CMD 
H2C_DISCONNECT_CMD 
H2C_CREATEBSS_CMD 
H2C_SETOPMode_CMD 
H2C_SITESURVEY_CMD 
H2C_SETAUTH_CMD 
H2C_SETKEY_CMD 
H2C_SETSTAKEY_CMD 
H2C_SETASSOCSTA_CMD 
H2C_DELASSOCSTA_CMD 
H2C_SETSTAPWRSTATE_CMD 
H2C_SETBASICRATE_CMD 
H2C_GETBASICRATE_CMD 
H2C_SETDATARATE_CMD 
H2C_GETDATARATE_CMD 
H2C_SETPHYINFO_CMD 
H2C_GETPHYINFO_CMD 
H2C_SETPHY_CMD 
H2C_GETPHY_CMD 
H2C_READRSSI_CMD 
H2C_READGAIN_CMD 
H2C_SETATIM_CMD 
H2C_SETPWRMODE_CMD 
H2C_JOINBSSRPT_CMD 
H2C_SETRATABLE_CMD 
H2C_GETRATABLE_CMD 
H2C_GETCCXREPORT_CMD 
H2C_GETDTMREPORT_CMD 
H2C_GETTXRATESTATICS_CMD 
H2C_SETUSBSUSPEND_CMD 
H2C_SETH2CLBK_CMD 
H2C_TMP1 
H2C_WOWLAN_UPDATE_GTK_CMD 
H2C_WOWLAN_FW_OFFLOAD 
H2C_TMP2 
H2C_TMP3 
H2C_WOWLAN_UPDATE_IV_CMD 
H2C_TMP4 
MAX_H2CCMD 

Definition at line 286 of file fw.h.

enum fw_status
Enumerator:
FW_STATUS_INIT 
FW_STATUS_LOAD_IMEM 
FW_STATUS_LOAD_EMEM 
FW_STATUS_LOAD_DMEM 
FW_STATUS_READY 

Definition at line 205 of file fw.h.

enum h2c_cmd
Enumerator:
FW_H2C_SETPWRMODE 
FW_H2C_JOINBSSRPT 
FW_H2C_WOWLAN_UPDATE_GTK 
FW_H2C_WOWLAN_UPDATE_IV 
FW_H2C_WOWLAN_OFFLOAD 

Definition at line 278 of file fw.h.

Function Documentation

int rtl92s_download_fw ( struct ieee80211_hw hw)

Definition at line 354 of file fw.c.

void rtl92s_set_fw_joinbss_report_cmd ( struct ieee80211_hw hw,
u8  mstatus,
u8  ps_qosinfo 
)

Definition at line 636 of file fw.c.

void rtl92s_set_fw_pwrmode_cmd ( struct ieee80211_hw hw,
u8  mode 
)

Definition at line 593 of file fw.c.