2013-05-08 21:45:39 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
#ifndef __RTL8188E_CMD_H__
|
|
|
|
#define __RTL8188E_CMD_H__
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
typedef enum _RTL8188E_H2C_CMD_ID
|
|
|
|
{
|
2015-03-16 14:43:53 +00:00
|
|
|
/* Class Common */
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_COM_RSVD_PAGE =0x00,
|
|
|
|
H2C_COM_MEDIA_STATUS_RPT =0x01,
|
2014-12-19 06:59:46 +00:00
|
|
|
H2C_COM_SCAN =0x02,
|
|
|
|
H2C_COM_KEEP_ALIVE =0x03,
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_COM_DISCNT_DECISION =0x04,
|
|
|
|
H2C_COM_INIT_OFFLOAD =0x06,
|
|
|
|
H2C_COM_REMOTE_WAKE_CTL =0x07,
|
|
|
|
H2C_COM_AP_OFFLOAD =0x08,
|
|
|
|
H2C_COM_BCN_RSVD_PAGE =0x09,
|
|
|
|
H2C_COM_PROB_RSP_RSVD_PAGE =0x0A,
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* Class PS */
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_PS_PWR_MODE =0x20,
|
|
|
|
H2C_PS_TUNE_PARA =0x21,
|
|
|
|
H2C_PS_TUNE_PARA_2 =0x22,
|
|
|
|
H2C_PS_LPS_PARA =0x23,
|
|
|
|
H2C_PS_P2P_OFFLOAD =0x24,
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* Class DM */
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_DM_MACID_CFG =0x40,
|
|
|
|
H2C_DM_TXBF =0x41,
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* Class BT */
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_BT_COEX_MASK =0x60,
|
|
|
|
H2C_BT_COEX_GPIO_MODE =0x61,
|
|
|
|
H2C_BT_DAC_SWING_VAL =0x62,
|
|
|
|
H2C_BT_PSD_RST =0x63,
|
2014-12-19 06:59:46 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* Class */
|
2014-12-11 21:15:04 +00:00
|
|
|
H2C_RESET_TSF =0xc0,
|
|
|
|
}RTL8188E_H2C_CMD_ID;
|
2014-12-19 06:59:46 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct cmd_msg_parm {
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 eid; /* element id */
|
|
|
|
u8 sz; /* sz */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 buf[6];
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
enum{
|
2013-05-08 21:45:39 +00:00
|
|
|
PWRS
|
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
typedef struct _SETPWRMODE_PARM {
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 Mode;/* 0:Active,1:LPS,2:WMMPS */
|
|
|
|
u8 SmartPS_RLBM;/* LPS=0:PS_Poll,1:PS_Poll,2:NullData,WMM=0:PS_Poll,1:NullData */
|
|
|
|
u8 AwakeInterval; /* unit: beacon interval */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 bAllQueueUAPSD;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 PwrState;/* AllON(0x0c),RFON(0x04),RFOFF(0x00) */
|
2014-12-11 21:15:04 +00:00
|
|
|
} SETPWRMODE_PARM, *PSETPWRMODE_PARM;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct H2C_SS_RFOFF_PARAM{
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 ROFOn; /* 1: on, 0:off */
|
|
|
|
u16 gpio_period; /* unit: 1024 us */
|
2014-12-11 21:15:04 +00:00
|
|
|
}__attribute__ ((packed));
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
typedef struct JOINBSSRPT_PARM{
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 OpMode; /* RT_MEDIA_STATUS */
|
2014-12-11 21:15:04 +00:00
|
|
|
}JOINBSSRPT_PARM, *PJOINBSSRPT_PARM;
|
|
|
|
|
|
|
|
typedef struct _RSVDPAGE_LOC {
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 LocProbeRsp;
|
|
|
|
u8 LocPsPoll;
|
|
|
|
u8 LocNullData;
|
|
|
|
u8 LocQosNull;
|
|
|
|
u8 LocBTQosNull;
|
2014-12-11 21:15:04 +00:00
|
|
|
} RSVDPAGE_LOC, *PRSVDPAGE_LOC;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
struct P2P_PS_Offload_t {
|
|
|
|
u8 Offload_En:1;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 role:1; /* 1: Owner, 0: Client */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 CTWindow_En:1;
|
|
|
|
u8 NoA0_En:1;
|
|
|
|
u8 NoA1_En:1;
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 AllStaSleep:1; /* Only valid in Owner */
|
2013-05-08 21:45:39 +00:00
|
|
|
u8 discovery:1;
|
|
|
|
u8 rsvd:1;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct P2P_PS_CTWPeriod_t {
|
2015-03-16 14:43:53 +00:00
|
|
|
u8 CTWPeriod; /* TU */
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* host message to firmware cmd */
|
2014-12-17 23:13:53 +00:00
|
|
|
void rtl8188e_set_FwPwrMode_cmd(struct adapter *padapter, u8 Mode);
|
|
|
|
void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus);
|
|
|
|
u8 rtl8188e_set_rssi_cmd(struct adapter *padapter, u8 *param);
|
|
|
|
u8 rtl8188e_set_raid_cmd(struct adapter *padapter, u32 mask);
|
|
|
|
void rtl8188e_Add_RateATid(struct adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
2015-03-16 14:43:53 +00:00
|
|
|
/* u8 rtl8192c_set_FwSelectSuspend_cmd(struct adapter *padapter, u8 bfwpoll, u16 period); */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_P2P
|
2014-12-17 23:13:53 +00:00
|
|
|
void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *padapter, u8 p2p_ps_state);
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* CONFIG_P2P */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2014-12-17 23:13:53 +00:00
|
|
|
void CheckFwRsvdPageContent(struct adapter *padapter);
|
2015-01-28 05:14:58 +00:00
|
|
|
void rtl8188e_set_FwMediaStatus_cmd(struct adapter *padapter, __le16 mstatus_rpt );
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
2015-03-16 14:43:53 +00:00
|
|
|
/* u8 rtl8188e_reset_tsf(struct adapter *padapter, u8 reset_port); */
|
2014-12-17 23:13:53 +00:00
|
|
|
int reset_tsf(struct adapter *Adapter, u8 reset_port );
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* CONFIG_TSF_RESET_OFFLOAD */
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
#define H2C_8188E_RSVDPAGE_LOC_LEN 5
|
|
|
|
#define H2C_8188E_AOAC_RSVDPAGE_LOC_LEN 7
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* */
|
|
|
|
/* H2C CMD CONTENT -------------------------------------------------- */
|
|
|
|
/* */
|
|
|
|
/* _RSVDPAGE_LOC_CMD_0x00 */
|
2014-12-11 21:15:04 +00:00
|
|
|
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
|
|
|
|
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
|
|
|
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
|
|
|
|
#define SET_8188E_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* AOAC_RSVDPAGE_LOC_0x83 */
|
2014-12-11 21:15:04 +00:00
|
|
|
#define SET_8188E_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 0, 8, __Value)
|
|
|
|
#define SET_8188E_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif/* __RTL8188E_CMD_H__ */
|