aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/wifi.h
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-09-22 10:39:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-26 17:22:27 -0400
commitf7953b2ad66cc5fc66e13d5c0a40e61b45cdfca8 (patch)
tree42ed50f3a91fd5844c57762113212e1fccb2b720 /drivers/net/wireless/rtlwifi/wifi.h
parent38506ecefab911785d5e1aa5889f6eeb462e0954 (diff)
rtlwifi: Modify core.c for new drivers
Each of the routines in the rtlwifi common driver needs to be modified for the coming changes. This patch prepares core.c, but also touches other files. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/wifi.h')
-rw-r--r--drivers/net/wireless/rtlwifi/wifi.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 9e990be4abb3..50bf73917f77 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -181,6 +181,31 @@ enum rf_tx_num {
181#define PACKET_ARP 2 181#define PACKET_ARP 2
182#define PACKET_EAPOL 3 182#define PACKET_EAPOL 3
183 183
184#define MAX_SUPPORT_WOL_PATTERN_NUM 16
185#define RSVD_WOL_PATTERN_NUM 1
186#define WKFMCAM_ADDR_NUM 6
187#define WKFMCAM_SIZE 24
188
189#define MAX_WOL_BIT_MASK_SIZE 16
190/* MIN LEN keeps 13 here */
191#define MIN_WOL_PATTERN_SIZE 13
192#define MAX_WOL_PATTERN_SIZE 128
193
194#define WAKE_ON_MAGIC_PACKET BIT(0)
195#define WAKE_ON_PATTERN_MATCH BIT(1)
196
197#define WOL_REASON_PTK_UPDATE BIT(0)
198#define WOL_REASON_GTK_UPDATE BIT(1)
199#define WOL_REASON_DISASSOC BIT(2)
200#define WOL_REASON_DEAUTH BIT(3)
201#define WOL_REASON_AP_LOST BIT(4)
202#define WOL_REASON_MAGIC_PKT BIT(5)
203#define WOL_REASON_UNICAST_PKT BIT(6)
204#define WOL_REASON_PATTERN_PKT BIT(7)
205#define WOL_REASON_RTD3_SSID_MATCH BIT(8)
206#define WOL_REASON_REALWOW_V2_WAKEUPPKT BIT(9)
207#define WOL_REASON_REALWOW_V2_ACKLOST BIT(10)
208
184struct txpower_info_2g { 209struct txpower_info_2g {
185 u8 index_cck_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; 210 u8 index_cck_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G];
186 u8 index_bw40_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; 211 u8 index_bw40_base[MAX_RF_PATH][MAX_CHNL_GROUP_24G];
@@ -811,6 +836,14 @@ enum rt_polarity_ctl {
811 RT_POLARITY_HIGH_ACT = 1, 836 RT_POLARITY_HIGH_ACT = 1,
812}; 837};
813 838
839enum wolpattern_type {
840 UNICAST_PATTERN = 0,
841 MULTICAST_PATTERN = 1,
842 BROADCAST_PATTERN = 2,
843 DONT_CARE_DA = 3,
844 UNKNOWN_TYPE = 4,
845};
846
814struct octet_string { 847struct octet_string {
815 u8 *octet; 848 u8 *octet;
816 u16 length; 849 u16 length;
@@ -1262,6 +1295,17 @@ struct rtl_mac {
1262 /* skb wait queue */ 1295 /* skb wait queue */
1263 struct sk_buff_head skb_waitq[MAX_TID_COUNT]; 1296 struct sk_buff_head skb_waitq[MAX_TID_COUNT];
1264 1297
1298 u8 ht_stbc_cap;
1299 u8 ht_cur_stbc;
1300
1301 /*vht support*/
1302 u8 vht_enable;
1303 u8 bw_80;
1304 u8 vht_cur_ldpc;
1305 u8 vht_cur_stbc;
1306 u8 vht_stbc_cap;
1307 u8 vht_ldpc_cap;
1308
1265 /*RDG*/ 1309 /*RDG*/
1266 bool rdg_en; 1310 bool rdg_en;
1267 1311
@@ -1426,6 +1470,20 @@ struct rtl_hal {
1426 1470
1427 u16 rx_tag;/*for 92ee*/ 1471 u16 rx_tag;/*for 92ee*/
1428 u8 rts_en; 1472 u8 rts_en;
1473
1474 /*for wowlan*/
1475 bool wow_enable;
1476 bool enter_pnp_sleep;
1477 bool wake_from_pnp_sleep;
1478 bool wow_enabled;
1479 __kernel_time_t last_suspend_sec;
1480 u32 wowlan_fwsize;
1481 u8 *wowlan_firmware;
1482
1483 u8 hw_rof_enable; /*Enable GPIO[9] as WL RF HW PDn source*/
1484
1485 bool real_wow_v2_enable;
1486 bool re_init_llt_table;
1429}; 1487};
1430 1488
1431struct rtl_security { 1489struct rtl_security {
@@ -1772,6 +1830,15 @@ struct rtl_ps_ctl {
1772 struct rtl_p2p_ps_info p2p_ps_info; 1830 struct rtl_p2p_ps_info p2p_ps_info;
1773 u8 pwr_mode; 1831 u8 pwr_mode;
1774 u8 smart_ps; 1832 u8 smart_ps;
1833
1834 /* wake up on line */
1835 u8 wo_wlan_mode;
1836 u8 arp_offload_enable;
1837 u8 gtk_offload_enable;
1838 /* Used for WOL, indicates the reason for waking event.*/
1839 u32 wakeup_reason;
1840 /* Record the last waking time for comparison with setting key. */
1841 u64 last_wakeup_time;
1775}; 1842};
1776 1843
1777struct rtl_stats { 1844struct rtl_stats {
@@ -1892,6 +1959,12 @@ struct rtl_tcb_desc {
1892 1959
1893struct rtl92c_firmware_header; 1960struct rtl92c_firmware_header;
1894 1961
1962struct rtl_wow_pattern {
1963 u8 type;
1964 u16 crc;
1965 u32 mask[4];
1966};
1967
1895struct rtl_hal_ops { 1968struct rtl_hal_ops {
1896 int (*init_sw_vars) (struct ieee80211_hw *hw); 1969 int (*init_sw_vars) (struct ieee80211_hw *hw);
1897 void (*deinit_sw_vars) (struct ieee80211_hw *hw); 1970 void (*deinit_sw_vars) (struct ieee80211_hw *hw);
@@ -1999,6 +2072,9 @@ struct rtl_hal_ops {
1999 bool (*is_fw_header) (struct rtl92c_firmware_header *hdr); 2072 bool (*is_fw_header) (struct rtl92c_firmware_header *hdr);
2000 u32 (*rx_command_packet)(struct ieee80211_hw *hw, 2073 u32 (*rx_command_packet)(struct ieee80211_hw *hw,
2001 struct rtl_stats status, struct sk_buff *skb); 2074 struct rtl_stats status, struct sk_buff *skb);
2075 void (*add_wowlan_pattern)(struct ieee80211_hw *hw,
2076 struct rtl_wow_pattern *rtl_pattern,
2077 u8 index);
2002}; 2078};
2003 2079
2004struct rtl_intf_ops { 2080struct rtl_intf_ops {