diff options
Diffstat (limited to 'drivers/staging/rtl8188eu/include')
21 files changed, 78 insertions, 779 deletions
diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h index a492a1c547ae..936c196699af 100644 --- a/drivers/staging/rtl8188eu/include/drv_types.h +++ b/drivers/staging/rtl8188eu/include/drv_types.h @@ -159,9 +159,15 @@ struct registry_priv { #define MAX_CONTINUAL_URB_ERR 4 +struct rt_firmware { + u8 *szFwBuffer; + u32 ulFwLength; +}; + struct dvobj_priv { struct adapter *if1; struct adapter *if2; + struct rt_firmware firmware; /* For 92D, DMDP have 2 interface. */ u8 InterfaceNumber; diff --git a/drivers/staging/rtl8188eu/include/ethernet.h b/drivers/staging/rtl8188eu/include/ethernet.h deleted file mode 100644 index a59f9120cd7e..000000000000 --- a/drivers/staging/rtl8188eu/include/ethernet.h +++ /dev/null @@ -1,42 +0,0 @@ -/****************************************************************************** - * - * 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 - * - * - ******************************************************************************/ -/*! \file */ -#ifndef __INC_ETHERNET_H -#define __INC_ETHERNET_H - -#define ETHERNET_ADDRESS_LENGTH 6 /* Ethernet Address Length */ -#define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ -#define LLC_HEADER_SIZE 6 /* LLC Header Length */ -#define TYPE_LENGTH_FIELD_SIZE 2 /* Type/Length Size */ -#define MINIMUM_ETHERNET_PACKET_SIZE 60 /* Min Ethernet Packet Size */ -#define MAXIMUM_ETHERNET_PACKET_SIZE 1514 /* Max Ethernet Packet Size */ - -/* Is Multicast Address? */ -#define RT_ETH_IS_MULTICAST(_addr) ((((u8 *)(_addr))[0]&0x01) != 0) -#define RT_ETH_IS_BROADCAST(_addr) ( \ - ((u8 *)(_addr))[0] == 0xff && \ - ((u8 *)(_addr))[1] == 0xff && \ - ((u8 *)(_addr))[2] == 0xff && \ - ((u8 *)(_addr))[3] == 0xff && \ - ((u8 *)(_addr))[4] == 0xff && \ - ((u8 *)(_addr))[5] == 0xff) /* Is Broadcast Address? */ - - -#endif /* #ifndef __INC_ETHERNET_H */ diff --git a/drivers/staging/rtl8188eu/include/h2clbk.h b/drivers/staging/rtl8188eu/include/h2clbk.h deleted file mode 100644 index e595030ac8a3..000000000000 --- a/drivers/staging/rtl8188eu/include/h2clbk.h +++ /dev/null @@ -1,35 +0,0 @@ -/****************************************************************************** - * - * 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 - * - * - ******************************************************************************/ - - -#define _H2CLBK_H_ - - -#include <rtl8711_spec.h> -#include <TypeDef.h> - - -void _lbk_cmd(struct adapter *adapter); - -void _lbk_rsp(struct adapter *adapter); - -void _lbk_evt(IN struct adapter *adapter); - -void h2c_event_callback(unsigned char *dev, unsigned char *pbuf); diff --git a/drivers/staging/rtl8188eu/include/if_ether.h b/drivers/staging/rtl8188eu/include/if_ether.h deleted file mode 100644 index db157712a203..000000000000 --- a/drivers/staging/rtl8188eu/include/if_ether.h +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************************************** - * - * 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 _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* - * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - * and FCS/CRC (frame check sequence). - */ - -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ - -/* - * These are the defined Ethernet Protocol ID's. - */ - -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ -#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet */ -#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ -#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK 0x809B /* Appletalk DDP */ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */ -#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */ -#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ -#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport - * over Ethernet - */ - -/* - * Non DIX types. Won't clash for 1500 types. - */ - -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ -#define ETH_P_802_2 0x0004 /* 802.2 frames */ -#define ETH_P_SNAP 0x0005 /* Internal only */ -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ -#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ -#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ -#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ -#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ -#define ETH_P_CONTROL 0x0016 /* Card specific control frames */ -#define ETH_P_IRDA 0x0017 /* Linux-IrDA */ -#define ETH_P_ECONET 0x0018 /* Acorn Econet */ - -/* - * This is an Ethernet frame header. - */ - -struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - unsigned short h_proto; /* packet type ID field */ -}; - -struct _vlan { - unsigned short h_vlan_TCI; /* Encap prio and VLAN ID */ - unsigned short h_vlan_encapsulated_proto; -}; - -#define get_vlan_id(pvlan) \ - ((ntohs((unsigned short)pvlan->h_vlan_TCI)) & 0xfff) -#define get_vlan_priority(pvlan) \ - ((ntohs((unsigned short)pvlan->h_vlan_TCI))>>13) -#define get_vlan_encap_proto(pvlan) \ - (ntohs((unsigned short)pvlan->h_vlan_encapsulated_proto)) - -#endif /* _LINUX_IF_ETHER_H */ diff --git a/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h b/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h deleted file mode 100644 index 037e9a5e5af9..000000000000 --- a/drivers/staging/rtl8188eu/include/ioctl_cfg80211.h +++ /dev/null @@ -1,107 +0,0 @@ -/****************************************************************************** - * - * 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 __IOCTL_CFG80211_H__ -#define __IOCTL_CFG80211_H__ - -struct rtw_wdev_invit_info { - u8 token; - u8 flags; - u8 status; - u8 req_op_ch; - u8 rsp_op_ch; -}; - -#define rtw_wdev_invit_info_init(invit_info) \ - do { \ - (invit_info)->token = 0; \ - (invit_info)->flags = 0x00; \ - (invit_info)->status = 0xff; \ - (invit_info)->req_op_ch = 0; \ - (invit_info)->rsp_op_ch = 0; \ - } while (0) - -struct rtw_wdev_priv { - struct wireless_dev *rtw_wdev; - - struct adapter *padapter; - - struct cfg80211_scan_request *scan_request; - spinlock_t scan_req_lock; - - struct net_device *pmon_ndev;/* for monitor interface */ - char ifname_mon[IFNAMSIZ + 1]; /* name of monitor interface */ - - u8 p2p_enabled; - - u8 provdisc_req_issued; - - struct rtw_wdev_invit_info invit_info; - - u8 bandroid_scan; - bool block; - bool power_mgmt; -}; - -#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w))) - -#define wiphy_to_wdev(x) \ -((struct wireless_dev *)(((struct rtw_wdev_priv *)wiphy_priv(x))->rtw_wdev)) - -int rtw_wdev_alloc(struct adapter *padapter, struct device *dev); -void rtw_wdev_free(struct wireless_dev *wdev); -void rtw_wdev_unregister(struct wireless_dev *wdev); - -void rtw_cfg80211_init_wiphy(struct adapter *padapter); - -void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter); - -void rtw_cfg80211_indicate_connect(struct adapter *padapter); -void rtw_cfg80211_indicate_disconnect(struct adapter *padapter); -void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, - bool aborted); - -#ifdef CONFIG_88EU_AP_MODE -void rtw_cfg80211_indicate_sta_assoc(struct adapter *padapter, - u8 *pmgmt_frame, uint frame_len); -void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, - unsigned char *da, - unsigned short reason); -#endif /* CONFIG_88EU_AP_MODE */ - -void rtw_cfg80211_issue_p2p_provision_request(struct adapter *padapter, - const u8 *buf, size_t len); -void rtw_cfg80211_rx_p2p_action_public(struct adapter *padapter, - u8 *pmgmt_frame, uint frame_len); -void rtw_cfg80211_rx_action_p2p(struct adapter *padapter, u8 *pmgmt_frame, - uint frame_len); -void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, - uint frame_len, const char *msg); - -int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, - char *buf, int len, int type); - -bool rtw_cfg80211_pwr_mgmt(struct adapter *adapter); - -#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) \ - cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) -#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) \ - cfg80211_send_rx_assoc(dev, bss, buf, len) - -#endif /* __IOCTL_CFG80211_H__ */ diff --git a/drivers/staging/rtl8188eu/include/ip.h b/drivers/staging/rtl8188eu/include/ip.h deleted file mode 100644 index 9fdac6d42d17..000000000000 --- a/drivers/staging/rtl8188eu/include/ip.h +++ /dev/null @@ -1,126 +0,0 @@ -/****************************************************************************** - * - * 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 _LINUX_IP_H -#define _LINUX_IP_H - -/* SOL_IP socket options */ - -#define IPTOS_TOS_MASK 0x1E -#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK) -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#define IPTOS_MINCOST 0x02 - -#define IPTOS_PREC_MASK 0xE0 -#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK) -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 - - -/* IP options */ -#define IPOPT_COPY 0x80 -#define IPOPT_CLASS_MASK 0x60 -#define IPOPT_NUMBER_MASK 0x1f - -#define IPOPT_COPIED(o) ((o)&IPOPT_COPY) -#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK) -#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK) - -#define IPOPT_CONTROL 0x00 -#define IPOPT_RESERVED1 0x20 -#define IPOPT_MEASUREMENT 0x40 -#define IPOPT_RESERVED2 0x60 - -#define IPOPT_END (0 | IPOPT_CONTROL) -#define IPOPT_NOOP (1 | IPOPT_CONTROL) -#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT) -#define IPOPT_RR (7 | IPOPT_CONTROL) -#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY) -#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY) - -#define IPVERSION 4 -#define MAXTTL 255 -#define IPDEFTTL 64 -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#define IPOPT_TS_TSONLY 0 /* timestamps only */ -#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#define IPOPT_TS_PRESPEC 3 /* specified modules only */ - -struct ip_options { - __u32 faddr; /* Saved first hop address */ - unsigned char optlen; - unsigned char srr; - unsigned char rr; - unsigned char ts; - unsigned char is_setbyuser:1, /* Set by setsockopt? */ - is_data:1, /* Options in __data, rather than skb*/ - is_strictroute:1,/* Strict source route */ - srr_is_hit:1, /* Packet destn addr was ours */ - is_changed:1, /* IP checksum more not valid */ - rr_needaddr:1, /* Need to record addr of out dev*/ - ts_needtime:1, /* Need to record timestamp */ - ts_needaddr:1; /* Need to record addr of out dev */ - unsigned char router_alert; - unsigned char __pad1; - unsigned char __pad2; - unsigned char __data[0]; -}; - -#define optlength(opt) (sizeof(struct ip_options) + opt->optlen) - -struct iphdr { -#if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ihl:4, - version:4; -#elif defined(__BIG_ENDIAN_BITFIELD) - __u8 version:4, - ihl:4; -#endif - __u8 tos; - __u16 tot_len; - __u16 id; - __u16 frag_off; - __u8 ttl; - __u8 protocol; - __u16 check; - __u32 saddr; - __u32 daddr; - /*The options start here. */ -}; - -#endif /* _LINUX_IP_H */ diff --git a/drivers/staging/rtl8188eu/include/nic_spec.h b/drivers/staging/rtl8188eu/include/nic_spec.h deleted file mode 100644 index d42244788ca9..000000000000 --- a/drivers/staging/rtl8188eu/include/nic_spec.h +++ /dev/null @@ -1,44 +0,0 @@ -/****************************************************************************** - * - * 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 __NIC_SPEC_H__ -#define __NIC_SPEC_H__ - -#define RTL8711_MCTRL_ (0x20000) -#define RTL8711_UART_ (0x30000) -#define RTL8711_TIMER_ (0x40000) -#define RTL8711_FINT_ (0x50000) -#define RTL8711_HINT_ (0x50000) -#define RTL8711_GPIO_ (0x60000) -#define RTL8711_WLANCTRL_ (0x200000) -#define RTL8711_WLANFF_ (0xe00000) -#define RTL8711_HCICTRL_ (0x600000) -#define RTL8711_SYSCFG_ (0x620000) -#define RTL8711_SYSCTRL_ (0x620000) -#define RTL8711_MCCTRL_ (0x020000) - - -#include <rtl8711_regdef.h> - -#include <rtl8711_bitdef.h> - - -#endif /* __RTL8711_SPEC_H__ */ diff --git a/drivers/staging/rtl8188eu/include/odm_interface.h b/drivers/staging/rtl8188eu/include/odm_interface.h index a50eae3ec68e..548a309db199 100644 --- a/drivers/staging/rtl8188eu/include/odm_interface.h +++ b/drivers/staging/rtl8188eu/include/odm_interface.h @@ -77,32 +77,9 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext); /* =========== EXtern Function Prototype */ -u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr); - -u16 ODM_Read2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr); - -u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr); - -void ODM_Write1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u8 Data); - -void ODM_Write2Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u16 Data); - -void ODM_Write4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u32 Data); - /* Memory Relative Function. */ -void ODM_AllocateMemory(struct odm_dm_struct *pDM_Odm, void **pPtr, u32 length); -void ODM_FreeMemory(struct odm_dm_struct *pDM_Odm, void *pPtr, u32 length); - -s32 ODM_CompareMemory(struct odm_dm_struct *pDM_Odm, void *pBuf1, void *pBuf2, - u32 length); /* ODM Timer relative API. */ -void ODM_SetTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer, - u32 msDelay); - -void ODM_InitializeTimer(struct odm_dm_struct *pDM_Odm, - struct timer_list *pTimer, void *CallBackFunc, - void *pContext, const char *szID); void ODM_CancelTimer(struct odm_dm_struct *pDM_Odm, struct timer_list *pTimer); diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 7956f0cdb96b..5889f58ed7d3 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -62,20 +62,11 @@ struct __queue { spinlock_t lock; }; -static inline struct list_head *get_next(struct list_head *list) -{ - return list->next; -} - static inline struct list_head *get_list_head(struct __queue *queue) { return &(queue->queue); } - -#define LIST_CONTAINOR(ptr, type, member) \ - ((type *)((char *)(ptr)-(size_t)(&((type *)0)->member))) - static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pirqL) { @@ -85,13 +76,6 @@ static inline int _enter_critical_mutex(struct mutex *pmutex, return ret; } - -static inline void _exit_critical_mutex(struct mutex *pmutex, - unsigned long *pirqL) -{ - mutex_unlock(pmutex); -} - static inline void rtw_list_delete(struct list_head *plist) { list_del_init(plist); @@ -122,17 +106,6 @@ static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled) #define RTW_DECLARE_TIMER_HDL(name) \ void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) -static inline void _init_workitem(struct work_struct *pwork, void *pfunc, - void *cntx) -{ - INIT_WORK(pwork, pfunc); -} - -static inline void _set_workitem(struct work_struct *pwork) -{ - schedule_work(pwork); -} - static inline void _cancel_workitem_sync(struct work_struct *pwork) { cancel_work_sync(pwork); @@ -230,15 +203,9 @@ extern unsigned char WPA_TKIP_CIPHER[4]; extern unsigned char RSN_TKIP_CIPHER[4]; #define rtw_update_mem_stat(flag, sz) do {} while (0) -u8 *_rtw_vmalloc(u32 sz); -u8 *_rtw_zvmalloc(u32 sz); -void _rtw_vmfree(u8 *pbuf, u32 sz); u8 *_rtw_zmalloc(u32 sz); u8 *_rtw_malloc(u32 sz); void _rtw_mfree(u8 *pbuf, u32 sz); -#define rtw_vmalloc(sz) _rtw_vmalloc((sz)) -#define rtw_zvmalloc(sz) _rtw_zvmalloc((sz)) -#define rtw_vmfree(pbuf, sz) _rtw_vmfree((pbuf), (sz)) #define rtw_malloc(sz) _rtw_malloc((sz)) #define rtw_zmalloc(sz) _rtw_zmalloc((sz)) #define rtw_mfree(pbuf, sz) _rtw_mfree((pbuf), (sz)) @@ -247,7 +214,6 @@ void *rtw_malloc2d(int h, int w, int size); void rtw_mfree2d(void *pbuf, int h, int w, int size); void _rtw_memcpy(void *dec, void *sour, u32 sz); -int _rtw_memcmp(void *dst, void *src, u32 sz); void _rtw_memset(void *pbuf, int c, u32 sz); void _rtw_init_listhead(struct list_head *list); diff --git a/drivers/staging/rtl8188eu/include/recv_osdep.h b/drivers/staging/rtl8188eu/include/recv_osdep.h index 691238078075..d76cc2db5028 100644 --- a/drivers/staging/rtl8188eu/include/recv_osdep.h +++ b/drivers/staging/rtl8188eu/include/recv_osdep.h @@ -28,18 +28,20 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); void _rtw_free_recv_priv(struct recv_priv *precvpriv); -s32 rtw_recv_entry(union recv_frame *precv_frame); -int rtw_recv_indicatepkt(struct adapter *adapter, union recv_frame *recv_frame); +s32 rtw_recv_entry(struct recv_frame *precv_frame); +int rtw_recv_indicatepkt(struct adapter *adapter, + struct recv_frame *recv_frame); void rtw_recv_returnpacket(struct net_device *cnxt, struct sk_buff *retpkt); -void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *recv_fr); +void rtw_hostapd_mlme_rx(struct adapter *padapter, struct recv_frame *recv_fr); void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup); int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); void rtw_free_recv_priv(struct recv_priv *precvpriv); int rtw_os_recv_resource_init(struct recv_priv *recvpr, struct adapter *adapt); -int rtw_os_recv_resource_alloc(struct adapter *adapt, union recv_frame *recvfr); +int rtw_os_recv_resource_alloc(struct adapter *adapt, + struct recv_frame *recvfr); void rtw_os_recv_resource_free(struct recv_priv *precvpriv); int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf); diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h index 161f1e5af9e6..75e41c4aeb27 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h @@ -76,17 +76,6 @@ (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x2300 || \ (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88E0) -enum firmware_source { - FW_SOURCE_IMG_FILE = 0, - FW_SOURCE_HEADER_FILE = 1, /* from header file */ -}; - -struct rt_firmware { - enum firmware_source eFWSource; - u8 *szFwBuffer; - u32 ulFwLength; -}; - /* This structure must be careful with byte-ordering */ struct rt_firmware_hdr { diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h index a8facf00eac0..07e5f5227336 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_recv.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_recv.h @@ -61,9 +61,10 @@ s32 rtl8188eu_init_recv_priv(struct adapter *padapter); void rtl8188eu_free_recv_priv(struct adapter *padapter); void rtl8188eu_recv_hdl(struct adapter *padapter, struct recv_buf *precvbuf); void rtl8188eu_recv_tasklet(void *priv); -void rtl8188e_query_rx_phy_status(union recv_frame *fr, struct phy_stat *phy); +void rtl8188e_query_rx_phy_status(struct recv_frame *fr, struct phy_stat *phy); void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe); -void update_recvframe_phyinfo_88e(union recv_frame *fra, struct phy_stat *phy); -void update_recvframe_attrib_88e(union recv_frame *fra, struct recv_stat *stat); +void update_recvframe_phyinfo_88e(struct recv_frame *fra, struct phy_stat *phy); +void update_recvframe_attrib_88e(struct recv_frame *fra, + struct recv_stat *stat); #endif diff --git a/drivers/staging/rtl8188eu/include/rtw_debug.h b/drivers/staging/rtl8188eu/include/rtw_debug.h index c6b193a2e795..ae05141f5ddf 100644 --- a/drivers/staging/rtl8188eu/include/rtw_debug.h +++ b/drivers/staging/rtl8188eu/include/rtw_debug.h @@ -99,20 +99,6 @@ extern u32 GlobalDebugLevel; } \ } while (0) -#define _func_enter_ \ - do { \ - if (GlobalDebugLevel >= _drv_debug_) \ - pr_info("%s : %s enters at %d\n", \ - DRIVER_PREFIX, __func__, __LINE__); \ - } while (0) - -#define _func_exit_ \ - do { \ - if (GlobalDebugLevel >= _drv_debug_) \ - pr_info("%s : %s exits at %d\n", \ - DRIVER_PREFIX, __func__, __LINE__); \ - } while (0) - #define RT_PRINT_DATA(_comp, _level, _titlestring, _hexdata, _hexdatalen)\ do { \ if (_level <= GlobalDebugLevel) { \ @@ -277,14 +263,4 @@ int proc_get_rssi_disp(char *page, char **start, int proc_set_rssi_disp(struct file *file, const char __user *buffer, unsigned long count, void *data); -#ifdef CONFIG_BT_COEXIST -int proc_get_btcoex_dbg(char *page, char **start, - off_t offset, int count, - int *eof, void *data); - -int proc_set_btcoex_dbg(struct file *file, const char *buffer, - signed long count, void *data); - -#endif /* CONFIG_BT_COEXIST */ - #endif /* __RTW_DEBUG_H__ */ diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b/drivers/staging/rtl8188eu/include/rtw_io.h index 3d1dfcc1b603..e8790f8f913e 100644 --- a/drivers/staging/rtl8188eu/include/rtw_io.h +++ b/drivers/staging/rtl8188eu/include/rtw_io.h @@ -99,7 +99,6 @@ struct intf_priv; struct intf_hdl; -struct io_queue; struct _io_ops { u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr); @@ -117,7 +116,6 @@ struct _io_ops { u8 *pmem); void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); - void (*_sync_irp_protocol_rw)(struct io_queue *pio_q); u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr); u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); @@ -237,34 +235,11 @@ struct reg_protocol_wt { Below is the data structure used by _io_handler */ -struct io_queue { - spinlock_t lock; - struct list_head free_ioreqs; - struct list_head pending; /* The io_req list that will be served - * in the single protocol read/write.*/ - struct list_head processing; - u8 *free_ioreqs_buf; /* 4-byte aligned */ - u8 *pallocated_free_ioreqs_buf; - struct intf_hdl intf; -}; - struct io_priv { struct adapter *padapter; struct intf_hdl intf; }; -uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue); -uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue); -uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue); -struct io_req *alloc_ioreq(struct io_queue *pio_q); - -uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl); -void unregister_intf_hdl(struct intf_hdl *pintfhdl); - -void _rtw_attrib_read(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); -void _rtw_attrib_write(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); - u8 _rtw_read8(struct adapter *adapter, u32 addr); u16 _rtw_read16(struct adapter *adapter, u32 addr); u32 _rtw_read32(struct adapter *adapter, u32 addr); @@ -363,25 +338,6 @@ void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops)); -uint alloc_io_queue(struct adapter *adapter); -void free_io_queue(struct adapter *adapter); -void async_bus_io(struct io_queue *pio_q); -void bus_sync_io(struct io_queue *pio_q); -u32 _ioreq2rwmem(struct io_queue *pio_q); void dev_power_down(struct adapter *Adapter, u8 bpwrup); -#define PlatformEFIOWrite1Byte(_a, _b, _c) \ - rtw_write8(_a, _b, _c) -#define PlatformEFIOWrite2Byte(_a, _b, _c) \ - rtw_write16(_a, _b, _c) -#define PlatformEFIOWrite4Byte(_a, _b, _c) \ - rtw_write32(_a, _b, _c) - -#define PlatformEFIORead1Byte(_a, _b) \ - rtw_read8(_a, _b) -#define PlatformEFIORead2Byte(_a, _b) \ - rtw_read16(_a, _b) -#define PlatformEFIORead4Byte(_a, _b) \ - rtw_read32(_a, _b) - #endif /* _RTL8711_IO_H_ */ diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl.h b/drivers/staging/rtl8188eu/include/rtw_ioctl.h index 8772d1d178c6..f3aa924f2029 100644 --- a/drivers/staging/rtl8188eu/include/rtw_ioctl.h +++ b/drivers/staging/rtl8188eu/include/rtw_ioctl.h @@ -102,8 +102,6 @@ struct oid_obj_priv { #if defined(_RTW_MP_IOCTL_C_) static int oid_null_function(struct oid_par_priv *poid_par_priv) { - _func_enter_; - _func_exit_; return NDIS_STATUS_SUCCESS; } #endif diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h b/drivers/staging/rtl8188eu/include/rtw_mlme.h index 6cd988f867da..45c22efe93fe 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h @@ -106,13 +106,6 @@ SHALL not lock up more than one lock at a time! #define traffic_threshold 10 #define traffic_scan_period 500 -struct sitesurvey_ctrl { - u64 last_tx_pkts; - uint last_rx_pkts; - int traffic_busy; - struct timer_list sitesurvey_ctrl_timer; -}; - struct rt_link_detect { u32 NumTxOkInPeriod; u32 NumRxOkInPeriod; @@ -304,31 +297,6 @@ struct wifidirect_info { u32 noa_start_time[P2P_MAX_NOA_NUM]; }; -struct tdls_ss_record { /* signal strength record */ - u8 macaddr[ETH_ALEN]; - u8 RxPWDBAll; - u8 is_tdls_sta; /* true: direct link sta, false: else */ -}; - -struct tdls_info { - u8 ap_prohibited; - uint setup_state; - u8 sta_cnt; - u8 sta_maximum; /* 1:tdls sta is equal (NUM_STA-1), reach max direct link number; 0: else; */ - struct tdls_ss_record ss_record; - u8 macid_index; /* macid entry that is ready to write */ - u8 clear_cam; /* cam entry that is trying to clear, using it in direct link teardown */ - u8 ch_sensing; - u8 cur_channel; - u8 candidate_ch; - u8 collect_pkt_num[MAX_CHANNEL_NUM]; - spinlock_t cmd_lock; - spinlock_t hdl_lock; - u8 watchdog_count; - u8 dev_discovered; /* WFD_TDLS: for sigma test */ - u8 enable; -}; - struct mlme_priv { spinlock_t lock; int fw_state; /* shall we protect this variable? maybe not necessarily... */ diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index f0c982d6d5f2..09e2a3980ea7 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h @@ -236,13 +236,13 @@ enum SCAN_STATE { struct mlme_handler { unsigned int num; char *str; - unsigned int (*func)(struct adapter *adapt, union recv_frame *frame); + unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame); }; struct action_handler { unsigned int num; char *str; - unsigned int (*func)(struct adapter *adapt, union recv_frame *frame); + unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame); }; struct ss_res { @@ -490,7 +490,7 @@ int allocate_fw_sta_entry(struct adapter *padapter); void flush_all_cam_entry(struct adapter *padapter); void site_survey(struct adapter *padapter); -u8 collect_bss_info(struct adapter *padapter, union recv_frame *precv_frame, +u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, struct wlan_bssid_ex *bssid); void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src, struct adapter *adapter, bool update_ie); @@ -544,7 +544,8 @@ unsigned int is_ap_in_wep(struct adapter *padapter); unsigned int should_forbid_n_rate(struct adapter *padapter); void report_join_res(struct adapter *padapter, int res); -void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame); +void report_survey_event(struct adapter *padapter, + struct recv_frame *precv_frame); void report_surveydone_event(struct adapter *padapter); void report_del_sta_event(struct adapter *padapter, unsigned char *addr, unsigned short reason); @@ -609,46 +610,46 @@ void start_clnt_join(struct adapter *padapter); void start_create_ibss(struct adapter *padapter); unsigned int OnAssocReq(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAssocRsp(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnProbeReq(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnProbeRsp(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int DoReserved(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnBeacon(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAtim(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnDisassoc(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAuth(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAuthClient(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnDeAuth(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int on_action_spct(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_qos(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_dls(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_back(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int on_action_public(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_ht(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_wmm(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); unsigned int OnAction_p2p(struct adapter *padapter, - union recv_frame *precv_frame); + struct recv_frame *precv_frame); void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res); void mlmeext_sta_del_event_callback(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h index 4a0e9ff3d479..9a42859d612b 100644 --- a/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/rtl8188eu/include/rtw_pwrctrl.h @@ -206,10 +206,6 @@ struct pwrctrl_priv { u8 bInternalAutoSuspend; u8 bInSuspend; -#ifdef CONFIG_BT_COEXIST - u8 bAutoResume; - u8 autopm_cnt; -#endif u8 bSupportRemoteWakeup; struct timer_list pwr_state_check_timer; int pwr_state_check_interval; diff --git a/drivers/staging/rtl8188eu/include/rtw_recv.h b/drivers/staging/rtl8188eu/include/rtw_recv.h index be9c30c57419..bcbce46cec85 100644 --- a/drivers/staging/rtl8188eu/include/rtw_recv.h +++ b/drivers/staging/rtl8188eu/include/rtw_recv.h @@ -270,7 +270,7 @@ struct recv_buf { len = (unsigned int )(tail - data); */ -struct recv_frame_hdr { +struct recv_frame { struct list_head list; struct sk_buff *pkt; struct sk_buff *pkt_newalloc; @@ -289,23 +289,16 @@ struct recv_frame_hdr { struct recv_reorder_ctrl *preorder_ctrl; }; -union recv_frame { - union { - struct list_head list; - struct recv_frame_hdr hdr; - uint mem[RECVFRAME_HDR_ALIGN>>2]; - } u; -}; - -union recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue); -union recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue); -void rtw_init_recvframe(union recv_frame *precvframe, +struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue); +struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue); +void rtw_init_recvframe(struct recv_frame *precvframe, struct recv_priv *precvpriv); -int rtw_free_recvframe(union recv_frame *precvframe, +int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv_queue); #define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue) -int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue); -int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue); +int _rtw_enqueue_recvframe(struct recv_frame *precvframe, + struct __queue *queue); +int rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue); void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue); u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter); @@ -315,29 +308,20 @@ struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue); void rtw_reordering_ctrl_timeout_handler(void *pcontext); -static inline u8 *get_rxmem(union recv_frame *precvframe) +static inline u8 *get_rxmem(struct recv_frame *precvframe) { /* always return rx_head... */ if (precvframe == NULL) return NULL; - return precvframe->u.hdr.rx_head; + return precvframe->rx_head; } -static inline u8 *get_rx_status(union recv_frame *precvframe) +static inline u8 *get_rx_status(struct recv_frame *precvframe) { return get_rxmem(precvframe); } -static inline u8 *get_recvframe_data(union recv_frame *precvframe) -{ - /* always return rx_data */ - if (precvframe == NULL) - return NULL; - - return precvframe->u.hdr.rx_data; -} - -static inline u8 *recvframe_push(union recv_frame *precvframe, int sz) +static inline u8 *recvframe_push(struct recv_frame *precvframe, int sz) { /* append data before rx_data */ @@ -348,16 +332,16 @@ static inline u8 *recvframe_push(union recv_frame *precvframe, int sz) */ if (precvframe == NULL) return NULL; - precvframe->u.hdr.rx_data -= sz ; - if (precvframe->u.hdr.rx_data < precvframe->u.hdr.rx_head) { - precvframe->u.hdr.rx_data += sz; + precvframe->rx_data -= sz; + if (precvframe->rx_data < precvframe->rx_head) { + precvframe->rx_data += sz; return NULL; } - precvframe->u.hdr.len += sz; - return precvframe->u.hdr.rx_data; + precvframe->len += sz; + return precvframe->rx_data; } -static inline u8 *recvframe_pull(union recv_frame *precvframe, int sz) +static inline u8 *recvframe_pull(struct recv_frame *precvframe, int sz) { /* rx_data += sz; move rx_data sz bytes hereafter */ @@ -366,16 +350,16 @@ static inline u8 *recvframe_pull(union recv_frame *precvframe, int sz) if (precvframe == NULL) return NULL; - precvframe->u.hdr.rx_data += sz; - if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) { - precvframe->u.hdr.rx_data -= sz; + precvframe->rx_data += sz; + if (precvframe->rx_data > precvframe->rx_tail) { + precvframe->rx_data -= sz; return NULL; } - precvframe->u.hdr.len -= sz; - return precvframe->u.hdr.rx_data; + precvframe->len -= sz; + return precvframe->rx_data; } -static inline u8 *recvframe_put(union recv_frame *precvframe, int sz) +static inline u8 *recvframe_put(struct recv_frame *precvframe, int sz) { /* used for append sz bytes from ptr to rx_tail, update rx_tail * and return the updated rx_tail to the caller */ @@ -384,17 +368,17 @@ static inline u8 *recvframe_put(union recv_frame *precvframe, int sz) if (precvframe == NULL) return NULL; - precvframe->u.hdr.rx_tail += sz; + precvframe->rx_tail += sz; - if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) { - precvframe->u.hdr.rx_tail -= sz; + if (precvframe->rx_tail > precvframe->rx_end) { + precvframe->rx_tail -= sz; return NULL; } - precvframe->u.hdr.len += sz; - return precvframe->u.hdr.rx_tail; + precvframe->len += sz; + return precvframe->rx_tail; } -static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz) +static inline u8 *recvframe_pull_tail(struct recv_frame *precvframe, int sz) { /* rmv data from rx_tail (by yitsen) */ @@ -404,64 +388,13 @@ static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz) if (precvframe == NULL) return NULL; - precvframe->u.hdr.rx_tail -= sz; - if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data) { - precvframe->u.hdr.rx_tail += sz; + precvframe->rx_tail -= sz; + if (precvframe->rx_tail < precvframe->rx_data) { + precvframe->rx_tail += sz; return NULL; } - precvframe->u.hdr.len -= sz; - return precvframe->u.hdr.rx_tail; -} - -static inline unsigned char *get_rxbuf_desc(union recv_frame *precvframe) -{ - unsigned char *buf_desc; - - if (precvframe == NULL) - return NULL; - return buf_desc; -} - -static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem) -{ - /* due to the design of 2048 bytes alignment of recv_frame, - * we can reference the union recv_frame */ - /* from any given member of recv_frame. */ - /* rxmem indicates the any member/address in recv_frame */ - - return (union recv_frame *)(((size_t)rxmem >> RXFRAME_ALIGN) << RXFRAME_ALIGN); -} - -static inline union recv_frame *pkt_to_recvframe(struct sk_buff *pkt) -{ - u8 *buf_star; - union recv_frame *precv_frame; - precv_frame = rxmem_to_recvframe((unsigned char *)buf_star); - - return precv_frame; -} - -static inline u8 *pkt_to_recvmem(struct sk_buff *pkt) -{ - /* return the rx_head */ - - union recv_frame *precv_frame = pkt_to_recvframe(pkt); - - return precv_frame->u.hdr.rx_head; -} - -static inline u8 *pkt_to_recvdata(struct sk_buff *pkt) -{ - /* return the rx_data */ - - union recv_frame *precv_frame = pkt_to_recvframe(pkt); - - return precv_frame->u.hdr.rx_data; -} - -static inline int get_recvframe_len(union recv_frame *precvframe) -{ - return precvframe->u.hdr.len; + precvframe->len -= sz; + return precvframe->rx_tail; } static inline s32 translate_percentage_to_dbm(u32 sig_stren_index) @@ -480,6 +413,6 @@ struct sta_info; void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv); -void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame); +void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame); #endif diff --git a/drivers/staging/rtl8188eu/include/rtw_xmit.h b/drivers/staging/rtl8188eu/include/rtw_xmit.h index 1ac1dd31db68..62f5db169523 100644 --- a/drivers/staging/rtl8188eu/include/rtw_xmit.h +++ b/drivers/staging/rtl8188eu/include/rtw_xmit.h @@ -105,11 +105,6 @@ struct tx_desc { __le32 txdw7; }; -union txdesc { - struct tx_desc txdesc; - unsigned int value[TXDESC_SIZE>>2]; -}; - struct hw_xmit { struct __queue *sta_queue; int accnt; diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h index 2e7307f259b6..a88ebf41bba1 100644 --- a/drivers/staging/rtl8188eu/include/wifi.h +++ b/drivers/staging/rtl8188eu/include/wifi.h @@ -694,7 +694,7 @@ struct WMM_para_element { struct ADDBA_request { unsigned char dialog_token; - unsigned short BA_para_set; + __le16 BA_para_set; unsigned short BA_timeout_value; unsigned short BA_starting_seqctrl; } __packed; |