Larry Finger | 58c4340 | 2013-08-21 22:34:07 -0500 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of version 2 of the GNU General Public License as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but WITHOUT |
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| 12 | * more details. |
| 13 | * |
Larry Finger | 58c4340 | 2013-08-21 22:34:07 -0500 | [diff] [blame] | 14 | ******************************************************************************/ |
| 15 | #ifndef __RTL8188E_CMD_H__ |
| 16 | #define __RTL8188E_CMD_H__ |
| 17 | |
| 18 | enum RTL8188E_H2C_CMD_ID { |
| 19 | /* Class Common */ |
| 20 | H2C_COM_RSVD_PAGE = 0x00, |
| 21 | H2C_COM_MEDIA_STATUS_RPT = 0x01, |
| 22 | H2C_COM_SCAN = 0x02, |
| 23 | H2C_COM_KEEP_ALIVE = 0x03, |
| 24 | H2C_COM_DISCNT_DECISION = 0x04, |
| 25 | H2C_COM_INIT_OFFLOAD = 0x06, |
| 26 | H2C_COM_REMOTE_WAKE_CTL = 0x07, |
| 27 | H2C_COM_AP_OFFLOAD = 0x08, |
| 28 | H2C_COM_BCN_RSVD_PAGE = 0x09, |
| 29 | H2C_COM_PROB_RSP_RSVD_PAGE = 0x0A, |
| 30 | |
| 31 | /* Class PS */ |
| 32 | H2C_PS_PWR_MODE = 0x20, |
| 33 | H2C_PS_TUNE_PARA = 0x21, |
| 34 | H2C_PS_TUNE_PARA_2 = 0x22, |
| 35 | H2C_PS_LPS_PARA = 0x23, |
| 36 | H2C_PS_P2P_OFFLOAD = 0x24, |
| 37 | |
| 38 | /* Class DM */ |
| 39 | H2C_DM_MACID_CFG = 0x40, |
| 40 | H2C_DM_TXBF = 0x41, |
| 41 | |
| 42 | /* Class BT */ |
| 43 | H2C_BT_COEX_MASK = 0x60, |
| 44 | H2C_BT_COEX_GPIO_MODE = 0x61, |
| 45 | H2C_BT_DAC_SWING_VAL = 0x62, |
| 46 | H2C_BT_PSD_RST = 0x63, |
| 47 | |
| 48 | /* Class */ |
| 49 | H2C_RESET_TSF = 0xc0, |
| 50 | }; |
| 51 | |
| 52 | struct cmd_msg_parm { |
| 53 | u8 eid; /* element id */ |
| 54 | u8 sz; /* sz */ |
| 55 | u8 buf[6]; |
| 56 | }; |
| 57 | |
| 58 | enum { |
| 59 | PWRS |
| 60 | }; |
| 61 | |
| 62 | struct setpwrmode_parm { |
| 63 | u8 Mode;/* 0:Active,1:LPS,2:WMMPS */ |
| 64 | u8 SmartPS_RLBM;/* LPS= 0:PS_Poll,1:PS_Poll,2:NullData,WMM= 0:PS_Poll,1:NullData */ |
| 65 | u8 AwakeInterval; /* unit: beacon interval */ |
| 66 | u8 bAllQueueUAPSD; |
| 67 | u8 PwrState;/* AllON(0x0c),RFON(0x04),RFOFF(0x00) */ |
| 68 | }; |
| 69 | |
| 70 | struct H2C_SS_RFOFF_PARAM { |
| 71 | u8 ROFOn; /* 1: on, 0:off */ |
| 72 | u16 gpio_period; /* unit: 1024 us */ |
| 73 | } __packed; |
| 74 | |
| 75 | struct joinbssrpt_parm { |
| 76 | u8 OpMode; /* RT_MEDIA_STATUS */ |
| 77 | }; |
| 78 | |
| 79 | struct rsvdpage_loc { |
| 80 | u8 LocProbeRsp; |
| 81 | u8 LocPsPoll; |
| 82 | u8 LocNullData; |
| 83 | u8 LocQosNull; |
| 84 | u8 LocBTQosNull; |
| 85 | }; |
| 86 | |
| 87 | struct P2P_PS_Offload_t { |
| 88 | u8 Offload_En:1; |
| 89 | u8 role:1; /* 1: Owner, 0: Client */ |
| 90 | u8 CTWindow_En:1; |
| 91 | u8 NoA0_En:1; |
| 92 | u8 NoA1_En:1; |
| 93 | u8 AllStaSleep:1; /* Only valid in Owner */ |
| 94 | u8 discovery:1; |
| 95 | u8 rsvd:1; |
| 96 | }; |
| 97 | |
| 98 | struct P2P_PS_CTWPeriod_t { |
| 99 | u8 CTWPeriod; /* TU */ |
| 100 | }; |
| 101 | |
| 102 | /* host message to firmware cmd */ |
| 103 | void rtl8188e_set_FwPwrMode_cmd(struct adapter *padapter, u8 Mode); |
| 104 | void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *padapter, u8 mstatus); |
Larry Finger | 58c4340 | 2013-08-21 22:34:07 -0500 | [diff] [blame] | 105 | void rtl8188e_Add_RateATid(struct adapter *padapter, u32 bitmap, u8 arg, |
| 106 | u8 rssi_level); |
| 107 | |
Larry Finger | 58c4340 | 2013-08-21 22:34:07 -0500 | [diff] [blame] | 108 | void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt); |
| 109 | |
| 110 | #endif/* __RTL8188E_CMD_H__ */ |