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  rtl92d_firmware_header
 

Macros

#define FW_8192D_START_ADDRESS   0x1000
 
#define FW_8192D_PAGE_SIZE   4096
 
#define FW_8192D_POLLING_TIMEOUT_COUNT   1000
 
#define IS_FW_HEADER_EXIST(_pfwhdr)
 
#define SHIFT_AND_MASK_LE(__pdesc, __shift, __mask)
 
#define GET_FIRMWARE_HDR_SIGNATURE(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr, 0, 16)
 
#define GET_FIRMWARE_HDR_CATEGORY(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr, 16, 8)
 
#define GET_FIRMWARE_HDR_FUNCTION(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr, 24, 8)
 
#define GET_FIRMWARE_HDR_VERSION(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 4, 0, 16)
 
#define GET_FIRMWARE_HDR_SUB_VER(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 4, 16, 8)
 
#define GET_FIRMWARE_HDR_RSVD1(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 4, 24, 8)
 
#define GET_FIRMWARE_HDR_MONTH(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 8, 0, 8)
 
#define GET_FIRMWARE_HDR_DATE(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 8, 8, 8)
 
#define GET_FIRMWARE_HDR_HOUR(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 8, 16, 8)
 
#define GET_FIRMWARE_HDR_MINUTE(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 8, 24, 8)
 
#define GET_FIRMWARE_HDR_ROMCODE_SIZE(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 12, 0, 16)
 
#define GET_FIRMWARE_HDR_RSVD2(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 12, 16, 16)
 
#define GET_FIRMWARE_HDR_SVN_IDX(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 16, 0, 32)
 
#define GET_FIRMWARE_HDR_RSVD3(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 20, 0, 32)
 
#define GET_FIRMWARE_HDR_RSVD4(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 24, 0, 32)
 
#define GET_FIRMWARE_HDR_RSVD5(__fwhdr)   SHIFT_AND_MASK_LE(__fwhdr + 28, 0, 32)
 
#define pagenum_128(_len)   (u32)(((_len) >> 7) + ((_len) & 0x7F ? 1 : 0))
 
#define SET_H2CCMD_PWRMODE_PARM_MODE(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
 
#define SET_H2CCMD_PWRMODE_PARM_SMART_PS(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 1, 0, 8, __val)
 
#define SET_H2CCMD_PWRMODE_PARM_BCN_PASS_TIME(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 2, 0, 8, __val)
 
#define SET_H2CCMD_JOINBSSRPT_PARM_OPMODE(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
 
#define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
 
#define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 1, 0, 8, __val)
 
#define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__ph2ccmd, __val)   SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 2, 0, 8, __val)
 

Enumerations

enum  rtl8192d_h2c_cmd {
  H2C_AP_OFFLOAD = 0, H2C_SETPWRMODE = 1, H2C_JOINBSSRPT = 2, H2C_RSVDPAGE = 3,
  H2C_RSSI_REPORT = 5, H2C_RA_MASK = 6, H2C_MAC_MODE_SEL = 9, H2C_PWRM = 15,
  MAX_H2CCMD
}
 

Functions

int rtl92d_download_fw (struct ieee80211_hw *hw)
 
void rtl92d_fill_h2c_cmd (struct ieee80211_hw *hw, u8 element_id, u32 cmd_len, u8 *p_cmdbuffer)
 
void rtl92d_firmware_selfreset (struct ieee80211_hw *hw)
 
void rtl92d_set_fw_pwrmode_cmd (struct ieee80211_hw *hw, u8 mode)
 
void rtl92d_set_fw_rsvdpagepkt (struct ieee80211_hw *hw, bool b_dl_finished)
 
void rtl92d_set_fw_joinbss_report_cmd (struct ieee80211_hw *hw, u8 mstatus)
 

Macro Definition Documentation

#define FW_8192D_PAGE_SIZE   4096

Definition at line 34 of file fw.h.

#define FW_8192D_POLLING_TIMEOUT_COUNT   1000

Definition at line 35 of file fw.h.

#define FW_8192D_START_ADDRESS   0x1000

Definition at line 33 of file fw.h.

#define GET_FIRMWARE_HDR_CATEGORY (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr, 16, 8)

Definition at line 58 of file fw.h.

#define GET_FIRMWARE_HDR_DATE (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 8, 8, 8)

Definition at line 72 of file fw.h.

#define GET_FIRMWARE_HDR_FUNCTION (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr, 24, 8)

Definition at line 60 of file fw.h.

#define GET_FIRMWARE_HDR_HOUR (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 8, 16, 8)

Definition at line 74 of file fw.h.

#define GET_FIRMWARE_HDR_MINUTE (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 8, 24, 8)

Definition at line 76 of file fw.h.

#define GET_FIRMWARE_HDR_MONTH (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 8, 0, 8)

Definition at line 70 of file fw.h.

#define GET_FIRMWARE_HDR_ROMCODE_SIZE (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 12, 0, 16)

Definition at line 78 of file fw.h.

#define GET_FIRMWARE_HDR_RSVD1 (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 4, 24, 8)

Definition at line 66 of file fw.h.

#define GET_FIRMWARE_HDR_RSVD2 (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 12, 16, 16)

Definition at line 80 of file fw.h.

#define GET_FIRMWARE_HDR_RSVD3 (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 20, 0, 32)

Definition at line 86 of file fw.h.

#define GET_FIRMWARE_HDR_RSVD4 (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 24, 0, 32)

Definition at line 90 of file fw.h.

#define GET_FIRMWARE_HDR_RSVD5 (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 28, 0, 32)

Definition at line 92 of file fw.h.

#define GET_FIRMWARE_HDR_SIGNATURE (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr, 0, 16)

Definition at line 56 of file fw.h.

#define GET_FIRMWARE_HDR_SUB_VER (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 4, 16, 8)

Definition at line 64 of file fw.h.

#define GET_FIRMWARE_HDR_SVN_IDX (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 16, 0, 32)

Definition at line 84 of file fw.h.

#define GET_FIRMWARE_HDR_VERSION (   __fwhdr)    SHIFT_AND_MASK_LE(__fwhdr + 4, 0, 16)

Definition at line 62 of file fw.h.

#define IS_FW_HEADER_EXIST (   _pfwhdr)
Value:
((GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFF0) == 0x92C0 || \
(GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFF0) == 0x88C0 || \
(GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFFF) == 0x92D0 || \
(GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFFF) == 0x92D1 || \
(GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFFF) == 0x92D2 || \
(GET_FIRMWARE_HDR_SIGNATURE(_pfwhdr) & 0xFFFF) == 0x92D3)

Definition at line 37 of file fw.h.

#define pagenum_128 (   _len)    (u32)(((_len) >> 7) + ((_len) & 0x7F ? 1 : 0))

Definition at line 95 of file fw.h.

#define SET_H2CCMD_JOINBSSRPT_PARM_OPMODE (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)

Definition at line 104 of file fw.h.

#define SET_H2CCMD_PWRMODE_PARM_BCN_PASS_TIME (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 2, 0, 8, __val)

Definition at line 102 of file fw.h.

#define SET_H2CCMD_PWRMODE_PARM_MODE (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)

Definition at line 98 of file fw.h.

#define SET_H2CCMD_PWRMODE_PARM_SMART_PS (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 1, 0, 8, __val)

Definition at line 100 of file fw.h.

#define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 2, 0, 8, __val)

Definition at line 110 of file fw.h.

#define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)

Definition at line 106 of file fw.h.

#define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL (   __ph2ccmd,
  __val 
)    SET_BITS_TO_LE_1BYTE((__ph2ccmd) + 1, 0, 8, __val)

Definition at line 108 of file fw.h.

#define SHIFT_AND_MASK_LE (   __pdesc,
  __shift,
  __mask 
)
Value:
((le32_to_cpu(*(((__le32 *)(__pdesc)))) >> (__shift)) & \
BIT_LEN_MASK_32(__mask))

Definition at line 50 of file fw.h.

Enumeration Type Documentation

Enumerator:
H2C_AP_OFFLOAD 
H2C_SETPWRMODE 
H2C_JOINBSSRPT 
H2C_RSVDPAGE 
H2C_RSSI_REPORT 
H2C_RA_MASK 
H2C_MAC_MODE_SEL 
H2C_PWRM 
MAX_H2CCMD 

Definition at line 135 of file fw.h.

Function Documentation

int rtl92d_download_fw ( struct ieee80211_hw hw)

Definition at line 242 of file fw.c.

void rtl92d_fill_h2c_cmd ( struct ieee80211_hw hw,
u8  element_id,
u32  cmd_len,
u8 p_cmdbuffer 
)

Definition at line 532 of file fw.c.

void rtl92d_firmware_selfreset ( struct ieee80211_hw hw)

Definition at line 173 of file fw.c.

void rtl92d_set_fw_joinbss_report_cmd ( struct ieee80211_hw hw,
u8  mstatus 
)

Definition at line 774 of file fw.c.

void rtl92d_set_fw_pwrmode_cmd ( struct ieee80211_hw hw,
u8  mode 
)

Definition at line 543 of file fw.c.

void rtl92d_set_fw_rsvdpagepkt ( struct ieee80211_hw hw,
bool  b_dl_finished 
)

Definition at line 701 of file fw.c.