diff options
Diffstat (limited to 'drivers/staging/rtl8712')
109 files changed, 40280 insertions, 0 deletions
diff --git a/drivers/staging/rtl8712/Kconfig b/drivers/staging/rtl8712/Kconfig new file mode 100644 index 000000000000..1e9a230a4db1 --- /dev/null +++ b/drivers/staging/rtl8712/Kconfig @@ -0,0 +1,18 @@ +config R8712U + tristate "RealTek RTL8712U (RTL8192SU) Wireless LAN NIC driver" + depends on WLAN && USB + select WIRELESS_EXT + select WEXT_PRIV + default N + ---help--- + This option adds the Realtek RTL8712 USB device such as the D-Link DWA-130. + If built as a module, it will be called r8712u. + +config R8712_AP + bool "Realtek RTL8712U AP code" + depends on R8712U + default N + ---help--- + This option allows the Realtek RTL8712 USB device to be an Access Point. + + diff --git a/drivers/staging/rtl8712/Makefile b/drivers/staging/rtl8712/Makefile new file mode 100644 index 000000000000..1ccd251fde47 --- /dev/null +++ b/drivers/staging/rtl8712/Makefile @@ -0,0 +1,34 @@ +r8712u-objs := \ + rtl871x_cmd.o \ + rtl8712_cmd.o \ + rtl871x_security.o \ + rtl871x_eeprom.o \ + rtl8712_efuse.o \ + hal_init.o \ + usb_halinit.o \ + usb_ops.o \ + usb_ops_linux.o \ + rtl871x_io.o \ + rtl8712_io.o \ + rtl871x_ioctl_linux.o \ + rtl871x_ioctl_rtl.o \ + rtl871x_ioctl_set.o \ + rtl8712_led.o \ + rtl871x_mlme.o \ + ieee80211.o \ + rtl871x_mp_ioctl.o \ + rtl871x_mp.o \ + mlme_linux.o \ + recv_linux.o \ + xmit_linux.o \ + usb_intf.o \ + os_intfs.o \ + rtl871x_pwrctrl.o \ + rtl8712_recv.o \ + rtl871x_recv.o \ + rtl871x_sta_mgt.o \ + rtl871x_xmit.o \ + rtl8712_xmit.o + +obj-$(CONFIG_R8712U) := r8712u.o + diff --git a/drivers/staging/rtl8712/basic_types.h b/drivers/staging/rtl8712/basic_types.h new file mode 100644 index 000000000000..a0538a8a6703 --- /dev/null +++ b/drivers/staging/rtl8712/basic_types.h @@ -0,0 +1,23 @@ +#ifndef __BASIC_TYPES_H__ +#define __BASIC_TYPES_H__ + +#define SUCCESS 0 +#define FAIL (-1) + +#include <linux/types.h> + +#define SIZE_T __kernel_size_t +#define sint signed int +#define FIELD_OFFSET(s, field) ((addr_t)&((s *)(0))->field) + +/* Should we extend this to be host_addr_t and target_addr_t for case: + * host : x86_64 + * target : mips64 + */ +#define addr_t unsigned long + +#define MEM_ALIGNMENT_OFFSET (sizeof(SIZE_T)) +#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1) + +#endif /*__BASIC_TYPES_H__*/ + diff --git a/drivers/staging/rtl8712/big_endian.h b/drivers/staging/rtl8712/big_endian.h new file mode 100644 index 000000000000..8512d1b5919d --- /dev/null +++ b/drivers/staging/rtl8712/big_endian.h @@ -0,0 +1,69 @@ +#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H +#define _LINUX_BYTEORDER_BIG_ENDIAN_H + +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#endif +#ifndef __BIG_ENDIAN_BITFIELD +#define __BIG_ENDIAN_BITFIELD +#endif + +#include "swab.h" + +#define __constant_htonl(x) ((__u32)(x)) +#define __constant_ntohl(x) ((__u32)(x)) +#define __constant_htons(x) ((__u16)(x)) +#define __constant_ntohs(x) ((__u16)(x)) +#define __constant_cpu_to_le64(x) ___constant_swab64((x)) +#define __constant_le64_to_cpu(x) ___constant_swab64((x)) +#define __constant_cpu_to_le32(x) ___constant_swab32((x)) +#define __constant_le32_to_cpu(x) ___constant_swab32((x)) +#define __constant_cpu_to_le16(x) ___constant_swab16((x)) +#define __constant_le16_to_cpu(x) ___constant_swab16((x)) +#define __constant_cpu_to_be64(x) ((__u64)(x)) +#define __constant_be64_to_cpu(x) ((__u64)(x)) +#define __constant_cpu_to_be32(x) ((__u32)(x)) +#define __constant_be32_to_cpu(x) ((__u32)(x)) +#define __constant_cpu_to_be16(x) ((__u16)(x)) +#define __constant_be16_to_cpu(x) ((__u16)(x)) +#define __cpu_to_le64(x) __swab64((x)) +#define __le64_to_cpu(x) __swab64((x)) +#define __cpu_to_le32(x) __swab32((x)) +#define __le32_to_cpu(x) __swab32((x)) +#define __cpu_to_le16(x) __swab16((x)) +#define __le16_to_cpu(x) __swab16((x)) +#define __cpu_to_be64(x) ((__u64)(x)) +#define __be64_to_cpu(x) ((__u64)(x)) +#define __cpu_to_be32(x) ((__u32)(x)) +#define __be32_to_cpu(x) ((__u32)(x)) +#define __cpu_to_be16(x) ((__u16)(x)) +#define __be16_to_cpu(x) ((__u16)(x)) +#define __cpu_to_le64p(x) __swab64p((x)) +#define __le64_to_cpup(x) __swab64p((x)) +#define __cpu_to_le32p(x) __swab32p((x)) +#define __le32_to_cpup(x) __swab32p((x)) +#define __cpu_to_le16p(x) __swab16p((x)) +#define __le16_to_cpup(x) __swab16p((x)) +#define __cpu_to_be64p(x) (*(__u64 *)(x)) +#define __be64_to_cpup(x) (*(__u64 *)(x)) +#define __cpu_to_be32p(x) (*(__u32 *)(x)) +#define __be32_to_cpup(x) (*(__u32 *)(x)) +#define __cpu_to_be16p(x) (*(__u16 *)(x)) +#define __be16_to_cpup(x) (*(__u16 *)(x)) +#define __cpu_to_le64s(x) __swab64s((x)) +#define __le64_to_cpus(x) __swab64s((x)) +#define __cpu_to_le32s(x) __swab32s((x)) +#define __le32_to_cpus(x) __swab32s((x)) +#define __cpu_to_le16s(x) __swab16s((x)) +#define __le16_to_cpus(x) __swab16s((x)) +#define __cpu_to_be64s(x) do {} while (0) +#define __be64_to_cpus(x) do {} while (0) +#define __cpu_to_be32s(x) do {} while (0) +#define __be32_to_cpus(x) do {} while (0) +#define __cpu_to_be16s(x) do {} while (0) +#define __be16_to_cpus(x) do {} while (0) + +#include "generic.h" + +#endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ + diff --git a/drivers/staging/rtl8712/drv_types.h b/drivers/staging/rtl8712/drv_types.h new file mode 100644 index 000000000000..6147786d655d --- /dev/null +++ b/drivers/staging/rtl8712/drv_types.h @@ -0,0 +1,164 @@ +/*--------------------------------------------------------------------- + + For type defines and data structure defines + +-----------------------------------------------------------------------*/ +#ifndef __DRV_TYPES_H__ +#define __DRV_TYPES_H__ + +struct _adapter; + +#include "osdep_service.h" +#include "wlan_bssdef.h" +#include "rtl8712_spec.h" +#include "rtl8712_hal.h" + +enum _NIC_VERSION { + RTL8711_NIC, + RTL8712_NIC, + RTL8713_NIC, + RTL8716_NIC +}; + +struct _adapter; + +struct qos_priv { + /* bit mask option: u-apsd, s-apsd, ts, block ack... */ + unsigned int qos_option; +}; + +#include "rtl871x_ht.h" +#include "rtl871x_cmd.h" +#include "wlan_bssdef.h" +#include "rtl871x_xmit.h" +#include "rtl871x_recv.h" +#include "rtl871x_security.h" +#include "rtl871x_pwrctrl.h" +#include "rtl871x_io.h" +#include "rtl871x_eeprom.h" +#include "sta_info.h" +#include "rtl871x_mlme.h" +#include "rtl871x_mp.h" +#include "rtl871x_debug.h" +#include "rtl871x_rf.h" +#include "rtl871x_event.h" +#include "rtl871x_led.h" + +#define SPEC_DEV_ID_NONE BIT(0) +#define SPEC_DEV_ID_DISABLE_HT BIT(1) +#define SPEC_DEV_ID_ENABLE_PS BIT(2) + +struct specific_device_id { + u32 flags; + u16 idVendor; + u16 idProduct; + +}; + +struct registry_priv { + u8 chip_version; + u8 rfintfs; + u8 lbkmode; + u8 hci; + u8 network_mode; /*infra, ad-hoc, auto*/ + struct ndis_802_11_ssid ssid; + u8 channel;/* ad-hoc support requirement */ + u8 wireless_mode;/* A, B, G, auto */ + u8 vrtl_carrier_sense; /*Enable, Disable, Auto*/ + u8 vcs_type;/*RTS/CTS, CTS-to-self*/ + u16 rts_thresh; + u16 frag_thresh; + u8 preamble;/*long, short, auto*/ + u8 scan_mode;/*active, passive*/ + u8 adhoc_tx_pwr; + u8 soft_ap; + u8 smart_ps; + u8 power_mgnt; + u8 radio_enable; |