mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-22 20:43:04 +00:00
rtl8188eu: Put the current kernel files into a new branch named kernel_code
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
18c80911a2
commit
adfd7de95d
113 changed files with 8126 additions and 34255 deletions
|
@ -198,42 +198,15 @@ struct ant_sel_cck {
|
|||
/* */
|
||||
/* BB and RF register read/write */
|
||||
/* */
|
||||
u32 rtl8188e_PHY_QueryBBReg(struct adapter *adapter, u32 regaddr, u32 mask);
|
||||
void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr,
|
||||
u32 mask, u32 data);
|
||||
u32 rtl8188e_PHY_QueryRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||
u32 regaddr, u32 mask);
|
||||
void rtl8188e_PHY_SetRFReg(struct adapter *adapter, enum rf_radio_path rfpath,
|
||||
u32 regaddr, u32 mask, u32 data);
|
||||
|
||||
/* Initialization related function */
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_MACConfig8188E(struct adapter *adapter);
|
||||
int PHY_BBConfig8188E(struct adapter *adapter);
|
||||
int PHY_RFConfig8188E(struct adapter *adapter);
|
||||
|
||||
/* RF config */
|
||||
int rtl8188e_PHY_ConfigRFWithParaFile(struct adapter *adapter, u8 *filename,
|
||||
enum rf_radio_path rfpath);
|
||||
int rtl8188e_PHY_ConfigRFWithHeaderFile(struct adapter *adapter,
|
||||
enum rf_radio_path rfpath);
|
||||
|
||||
/* Read initi reg value for tx power setting. */
|
||||
void rtl8192c_PHY_GetHWRegOriginalValue(struct adapter *adapter);
|
||||
|
||||
/* BB TX Power R/W */
|
||||
void PHY_GetTxPowerLevel8188E(struct adapter *adapter, u32 *powerlevel);
|
||||
void PHY_SetTxPowerLevel8188E(struct adapter *adapter, u8 channel);
|
||||
bool PHY_UpdateTxPowerDbm8188E(struct adapter *adapter, int power);
|
||||
|
||||
void PHY_ScanOperationBackup8188E(struct adapter *Adapter, u8 Operation);
|
||||
|
||||
/* Switch bandwidth for 8192S */
|
||||
void PHY_SetBWMode8188E(struct adapter *adapter,
|
||||
enum ht_channel_width chnlwidth, unsigned char offset);
|
||||
|
||||
/* channel switch related funciton */
|
||||
void PHY_SwChnl8188E(struct adapter *adapter, u8 channel);
|
||||
/* Call after initialization */
|
||||
void ChkFwCmdIoDone(struct adapter *adapter);
|
||||
|
||||
|
@ -246,19 +219,8 @@ void PHY_EnableHostClkReq(struct adapter *adapter);
|
|||
|
||||
bool SetAntennaConfig92C(struct adapter *adapter, u8 defaultant);
|
||||
|
||||
void storePwrIndexDiffRateOffset(struct adapter *adapter, u32 regaddr,
|
||||
u32 mask, u32 data);
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
|
||||
#define PHY_QueryBBReg(adapt, regaddr, mask) \
|
||||
rtl8188e_PHY_QueryBBReg((adapt), (regaddr), (mask))
|
||||
#define PHY_SetBBReg(adapt, regaddr, bitmask, data) \
|
||||
rtl8188e_PHY_SetBBReg((adapt), (regaddr), (bitmask), (data))
|
||||
#define PHY_QueryRFReg(adapt, rfpath, regaddr, bitmask) \
|
||||
rtl8188e_PHY_QueryRFReg((adapt), (rfpath), (regaddr), (bitmask))
|
||||
#define PHY_SetRFReg(adapt, rfpath, regaddr, bitmask, data) \
|
||||
rtl8188e_PHY_SetRFReg((adapt), (rfpath), (regaddr), (bitmask), (data))
|
||||
|
||||
#define PHY_SetMacReg PHY_SetBBReg
|
||||
|
||||
#define SIC_HW_SUPPORT 0
|
||||
|
|
|
@ -28,12 +28,9 @@
|
|||
#define __DRV_TYPES_H__
|
||||
|
||||
#define DRV_NAME "r8188eu"
|
||||
#define CONFIG_88EU_AP_MODE 1
|
||||
#define CONFIG_88EU_P2P 1
|
||||
|
||||
#include <osdep_service.h>
|
||||
#include <wlan_bssdef.h>
|
||||
#include <drv_types_linux.h>
|
||||
#include <rtw_ht.h>
|
||||
#include <rtw_cmd.h>
|
||||
#include <rtw_xmit.h>
|
||||
|
@ -43,7 +40,6 @@
|
|||
#include <rtw_qos.h>
|
||||
#include <rtw_security.h>
|
||||
#include <rtw_pwrctrl.h>
|
||||
#include <rtw_io.h>
|
||||
#include <rtw_eeprom.h>
|
||||
#include <sta_info.h>
|
||||
#include <rtw_mlme.h>
|
||||
|
@ -52,17 +48,7 @@
|
|||
#include <rtw_event.h>
|
||||
#include <rtw_led.h>
|
||||
#include <rtw_mlme_ext.h>
|
||||
#include <rtw_p2p.h>
|
||||
#include <rtw_ap.h>
|
||||
#include <rtw_mp.h>
|
||||
#include <rtw_br_ext.h>
|
||||
|
||||
enum _NIC_VERSION {
|
||||
RTL8711_NIC,
|
||||
RTL8712_NIC,
|
||||
RTL8713_NIC,
|
||||
RTL8716_NIC
|
||||
};
|
||||
|
||||
#define SPEC_DEV_ID_NONE BIT(0)
|
||||
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
|
||||
|
@ -71,12 +57,6 @@ enum _NIC_VERSION {
|
|||
#define SPEC_DEV_ID_RF_CONFIG_2T2R BIT(4)
|
||||
#define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5)
|
||||
|
||||
struct specific_device_id {
|
||||
u32 flags;
|
||||
u16 idVendor;
|
||||
u16 idProduct;
|
||||
};
|
||||
|
||||
struct registry_priv {
|
||||
u8 chip_version;
|
||||
u8 rfintfs;
|
||||
|
@ -161,15 +141,8 @@ 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;
|
||||
|
||||
/* For 92D, DMDP have 2 interface. */
|
||||
u8 InterfaceNumber;
|
||||
u8 NumInterfaces;
|
||||
|
@ -179,10 +152,6 @@ struct dvobj_priv {
|
|||
int RtOutPipe[3];
|
||||
u8 Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
|
||||
|
||||
u8 irq_alloc;
|
||||
|
||||
struct rt_firmware firmware;
|
||||
|
||||
/*-------- below is for USB INTERFACE --------*/
|
||||
|
||||
u8 nr_endpoint;
|
||||
|
@ -190,18 +159,12 @@ struct dvobj_priv {
|
|||
u8 RtNumInPipes;
|
||||
u8 RtNumOutPipes;
|
||||
int ep_num[5]; /* endpoint number */
|
||||
int RegUsbSS;
|
||||
struct semaphore usb_suspend_sema;
|
||||
struct mutex usb_vendor_req_mutex;
|
||||
|
||||
u8 *usb_alloc_vendor_req_buf;
|
||||
u8 *usb_vendor_req_buf;
|
||||
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
|
||||
ATOMIC_T continual_urb_error;
|
||||
u8 signal_strength;
|
||||
};
|
||||
|
||||
static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
||||
|
@ -211,39 +174,14 @@ static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
|
|||
return &dvobj->pusbintf->dev;
|
||||
};
|
||||
|
||||
enum _IFACE_TYPE {
|
||||
IFACE_PORT0, /* mapping to port0 for C/D series chips */
|
||||
IFACE_PORT1, /* mapping to port1 for C/D series chip */
|
||||
MAX_IFACE_PORT,
|
||||
};
|
||||
|
||||
enum _ADAPTER_TYPE {
|
||||
PRIMARY_ADAPTER,
|
||||
SECONDARY_ADAPTER,
|
||||
MAX_ADAPTER,
|
||||
};
|
||||
|
||||
enum driver_state {
|
||||
DRIVER_NORMAL = 0,
|
||||
DRIVER_DISAPPEAR = 1,
|
||||
DRIVER_REPLACE_DONGLE = 2,
|
||||
};
|
||||
|
||||
struct adapter {
|
||||
int DriverState;/* for disable driver using module, use dongle toi
|
||||
* replace module. */
|
||||
int pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
|
||||
int bDongle;/* build-in module or external dongle */
|
||||
u16 chip_type;
|
||||
u16 HardwareType;
|
||||
u16 interface_type;/* USB,SDIO,SPI,PCI */
|
||||
|
||||
struct dvobj_priv *dvobj;
|
||||
struct mlme_priv mlmepriv;
|
||||
struct mlme_ext_priv mlmeextpriv;
|
||||
struct cmd_priv cmdpriv;
|
||||
struct evt_priv evtpriv;
|
||||
struct io_priv iopriv;
|
||||
struct xmit_priv xmitpriv;
|
||||
struct recv_priv recvpriv;
|
||||
struct sta_priv stapriv;
|
||||
|
@ -252,7 +190,6 @@ struct adapter {
|
|||
struct pwrctrl_priv pwrctrlpriv;
|
||||
struct eeprom_priv eeprompriv;
|
||||
struct led_priv ledpriv;
|
||||
struct mp_priv mppriv;
|
||||
|
||||
#ifdef CONFIG_88EU_AP_MODE
|
||||
struct hostapd_priv *phostapdpriv;
|
||||
|
@ -261,27 +198,15 @@ struct adapter {
|
|||
struct wifidirect_info wdinfo;
|
||||
|
||||
void *HalData;
|
||||
u32 hal_data_sz;
|
||||
struct hal_ops HalFunc;
|
||||
|
||||
s32 bDriverStopped;
|
||||
s32 bSurpriseRemoved;
|
||||
s32 bCardDisableWOHSM;
|
||||
|
||||
u32 IsrContent;
|
||||
u32 ImrContent;
|
||||
|
||||
u8 EepromAddressSize;
|
||||
u8 hw_init_completed;
|
||||
u8 bDriverIsGoingToUnload;
|
||||
u8 init_adpt_in_progress;
|
||||
u8 bHaltInProgress;
|
||||
s8 signal_strength;
|
||||
|
||||
void *cmdThread;
|
||||
void *evtThread;
|
||||
void *xmitThread;
|
||||
void *recvThread;
|
||||
void (*intf_start)(struct adapter *adapter);
|
||||
void (*intf_stop)(struct adapter *adapter);
|
||||
struct net_device *pnetdev;
|
||||
|
@ -301,32 +226,16 @@ struct adapter {
|
|||
|
||||
int net_closed;
|
||||
u8 bFWReady;
|
||||
u8 bBTFWReady;
|
||||
u8 bReadPortCancel;
|
||||
u8 bWritePortCancel;
|
||||
u8 bRxRSSIDisplay;
|
||||
/* The driver will show up the desired channel number
|
||||
* when this flag is 1. */
|
||||
u8 bNotifyChannelChange;
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
/* The driver will show the current P2P status when the
|
||||
* upper application reads it. */
|
||||
u8 bShowGetP2PState;
|
||||
#endif
|
||||
struct adapter *pbuddy_adapter;
|
||||
|
||||
struct mutex *hw_init_mutex;
|
||||
struct mutex hw_init_mutex;
|
||||
|
||||
spinlock_t br_ext_lock;
|
||||
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];
|
||||
int pppoe_connection_in_progress;
|
||||
unsigned char pppoe_addr[MACADDRLEN];
|
||||
unsigned char scdb_mac[MACADDRLEN];
|
||||
unsigned char scdb_ip[4];
|
||||
struct nat25_network_db_entry *scdb_entry;
|
||||
unsigned char br_mac[MACADDRLEN];
|
||||
unsigned char br_ip[4];
|
||||
struct br_ext_info ethBrExtInfo;
|
||||
|
||||
u8 fix_rate;
|
||||
|
||||
|
|
59
include/fw.h
Normal file
59
include/fw.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2009-2013 Realtek Corporation.
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* The full GNU General Public License is included in this distribution in the
|
||||
* file called LICENSE.
|
||||
*
|
||||
* Contact Information:
|
||||
* wlanfae <wlanfae@realtek.com>
|
||||
* Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
|
||||
* Hsinchu 300, Taiwan.
|
||||
* Larry Finger <Larry.Finger@lwfinger.net>
|
||||
*
|
||||
*****************************************************************************/
|
||||
#include "drv_types.h"
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef __RTL92C__FW__H__
|
||||
#define __RTL92C__FW__H__
|
||||
|
||||
#define FW_8192C_START_ADDRESS 0x1000
|
||||
#define FW_8192C_PAGE_SIZE 4096
|
||||
#define FW_8192C_POLLING_DELAY 5
|
||||
|
||||
struct rtl92c_firmware_header {
|
||||
__le16 signature;
|
||||
u8 category;
|
||||
u8 function;
|
||||
u16 version;
|
||||
u8 subversion;
|
||||
u8 rsvd1;
|
||||
u8 month;
|
||||
u8 date;
|
||||
u8 hour;
|
||||
u8 minute;
|
||||
u16 ramcodesize;
|
||||
u16 rsvd2;
|
||||
u32 svnindex;
|
||||
u32 rsvd3;
|
||||
u32 rsvd4;
|
||||
u32 rsvd5;
|
||||
};
|
||||
|
||||
int rtl88eu_download_fw(struct adapter *adapt);
|
||||
|
||||
#endif
|
|
@ -166,8 +166,4 @@ void HalSetBrateCfg(struct adapter *Adapter, u8 *mBratesOS, u16 *pBrateCfg);
|
|||
bool Hal_MappingOutPipe(struct adapter *pAdapter, u8 NumOutPipe);
|
||||
|
||||
void hal_init_macaddr(struct adapter *adapter);
|
||||
|
||||
void c2h_evt_clear(struct adapter *adapter);
|
||||
s32 c2h_evt_read(struct adapter *adapter, u8 *buf);
|
||||
|
||||
#endif /* __HAL_COMMON_H__ */
|
||||
|
|
|
@ -144,8 +144,6 @@ enum hal_intf_ps_func {
|
|||
HAL_MAX_ID,
|
||||
};
|
||||
|
||||
typedef s32 (*c2h_id_filter)(u8 id);
|
||||
|
||||
struct hal_ops {
|
||||
u32 (*hal_power_on)(struct adapter *padapter);
|
||||
u32 (*hal_init)(struct adapter *padapter);
|
||||
|
@ -157,7 +155,6 @@ struct hal_ops {
|
|||
u32 (*inirp_deinit)(struct adapter *padapter);
|
||||
|
||||
s32 (*init_xmit_priv)(struct adapter *padapter);
|
||||
void (*free_xmit_priv)(struct adapter *padapter);
|
||||
|
||||
s32 (*init_recv_priv)(struct adapter *padapter);
|
||||
void (*free_recv_priv)(struct adapter *padapter);
|
||||
|
@ -166,7 +163,6 @@ struct hal_ops {
|
|||
void (*DeInitSwLeds)(struct adapter *padapter);
|
||||
|
||||
void (*dm_init)(struct adapter *padapter);
|
||||
void (*dm_deinit)(struct adapter *padapter);
|
||||
void (*read_chip_version)(struct adapter *padapter);
|
||||
|
||||
void (*init_default_value)(struct adapter *padapter);
|
||||
|
@ -198,9 +194,6 @@ struct hal_ops {
|
|||
enum hal_def_variable eVariable,
|
||||
void *pValue);
|
||||
|
||||
void (*GetHalODMVarHandler)(struct adapter *padapter,
|
||||
enum hal_odm_variable eVariable,
|
||||
void *pValue1, bool bSet);
|
||||
void (*SetHalODMVarHandler)(struct adapter *padapter,
|
||||
enum hal_odm_variable eVariable,
|
||||
void *pValue1, bool bSet);
|
||||
|
@ -211,25 +204,15 @@ struct hal_ops {
|
|||
|
||||
void (*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg,
|
||||
u8 rssi_level);
|
||||
void (*run_thread)(struct adapter *adapter);
|
||||
void (*cancel_thread)(struct adapter *adapter);
|
||||
|
||||
u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter);
|
||||
void (*AntDivCompareHandler)(struct adapter *adapter,
|
||||
struct wlan_bssid_ex *dst,
|
||||
struct wlan_bssid_ex *src);
|
||||
u8 (*interface_ps_func)(struct adapter *padapter,
|
||||
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||
|
||||
s32 (*hal_xmit)(struct adapter *padapter,
|
||||
struct xmit_frame *pxmitframe);
|
||||
s32 (*mgnt_xmit)(struct adapter *padapter,
|
||||
struct xmit_frame *pmgntframe);
|
||||
|
||||
u32 (*read_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||
u32 BitMask);
|
||||
void (*write_bbreg)(struct adapter *padapter, u32 RegAddr,
|
||||
u32 BitMask, u32 Data);
|
||||
u32 (*read_rfreg)(struct adapter *padapter,
|
||||
enum rf_radio_path eRFPath, u32 RegAddr,
|
||||
u32 BitMask);
|
||||
|
@ -237,40 +220,11 @@ struct hal_ops {
|
|||
enum rf_radio_path eRFPath, u32 RegAddr,
|
||||
u32 BitMask, u32 Data);
|
||||
|
||||
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite,
|
||||
u8 PwrState);
|
||||
void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
|
||||
u16 _size_byte, u8 *pbuf, bool bPseudoTest);
|
||||
void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
|
||||
u8 type, void *pOut, bool bPseudoTest);
|
||||
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
|
||||
bool bPseudoTest);
|
||||
int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
|
||||
u8 *data, bool bPseudoTest);
|
||||
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
|
||||
u8 word_en, u8 *data, bool bPseudoTest);
|
||||
u8 (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
|
||||
u16 efuse_addr, u8 word_en,
|
||||
u8 *data, bool bPseudoTest);
|
||||
bool (*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset,
|
||||
u8 word_en, u8 *data, bool test);
|
||||
|
||||
void (*sreset_init_value)(struct adapter *padapter);
|
||||
void (*sreset_reset_value)(struct adapter *padapter);
|
||||
void (*silentreset)(struct adapter *padapter);
|
||||
void (*sreset_xmit_status_check)(struct adapter *padapter);
|
||||
void (*sreset_linked_status_check) (struct adapter *padapter);
|
||||
u8 (*sreset_get_wifi_status)(struct adapter *padapter);
|
||||
|
||||
int (*IOL_exec_cmds_sync)(struct adapter *padapter,
|
||||
struct xmit_frame *frame, u32 max_wait,
|
||||
u32 bndy_cnt);
|
||||
|
||||
void (*hal_notch_filter)(struct adapter *adapter, bool enable);
|
||||
void (*hal_reset_security_engine)(struct adapter *adapter);
|
||||
s32 (*c2h_handler)(struct adapter *padapter,
|
||||
struct c2h_evt_hdr *c2h_evt);
|
||||
c2h_id_filter c2h_id_filter_ccx;
|
||||
};
|
||||
|
||||
enum rt_eeprom_type {
|
||||
|
@ -286,39 +240,10 @@ enum rt_eeprom_type {
|
|||
#define RF_CHANGE_BY_SW BIT31
|
||||
|
||||
enum hardware_type {
|
||||
HARDWARE_TYPE_RTL8180,
|
||||
HARDWARE_TYPE_RTL8185,
|
||||
HARDWARE_TYPE_RTL8187,
|
||||
HARDWARE_TYPE_RTL8188,
|
||||
HARDWARE_TYPE_RTL8190P,
|
||||
HARDWARE_TYPE_RTL8192E,
|
||||
HARDWARE_TYPE_RTL819xU,
|
||||
HARDWARE_TYPE_RTL8192SE,
|
||||
HARDWARE_TYPE_RTL8192SU,
|
||||
HARDWARE_TYPE_RTL8192CE,
|
||||
HARDWARE_TYPE_RTL8192CU,
|
||||
HARDWARE_TYPE_RTL8192DE,
|
||||
HARDWARE_TYPE_RTL8192DU,
|
||||
HARDWARE_TYPE_RTL8723AE,
|
||||
HARDWARE_TYPE_RTL8723AU,
|
||||
HARDWARE_TYPE_RTL8723AS,
|
||||
HARDWARE_TYPE_RTL8188EE,
|
||||
HARDWARE_TYPE_RTL8188EU,
|
||||
HARDWARE_TYPE_RTL8188ES,
|
||||
HARDWARE_TYPE_MAX,
|
||||
};
|
||||
|
||||
/* RTL8188E Series */
|
||||
#define IS_HARDWARE_TYPE_8188EE(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType == HARDWARE_TYPE_RTL8188EE)
|
||||
#define IS_HARDWARE_TYPE_8188EU(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType == HARDWARE_TYPE_RTL8188EU)
|
||||
#define IS_HARDWARE_TYPE_8188ES(_Adapter) \
|
||||
(((struct adapter *)_Adapter)->HardwareType == HARDWARE_TYPE_RTL8188ES)
|
||||
#define IS_HARDWARE_TYPE_8188E(_Adapter) \
|
||||
(IS_HARDWARE_TYPE_8188EE(_Adapter) || IS_HARDWARE_TYPE_8188EU(_Adapter) || \
|
||||
IS_HARDWARE_TYPE_8188ES(_Adapter))
|
||||
|
||||
#define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
|
||||
|
||||
#define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
|
||||
|
@ -328,7 +253,6 @@ void rtw_hal_def_value_init(struct adapter *padapter);
|
|||
void rtw_hal_free_data(struct adapter *padapter);
|
||||
|
||||
void rtw_hal_dm_init(struct adapter *padapter);
|
||||
void rtw_hal_dm_deinit(struct adapter *padapter);
|
||||
void rtw_hal_sw_led_init(struct adapter *padapter);
|
||||
void rtw_hal_sw_led_deinit(struct adapter *padapter);
|
||||
|
||||
|
@ -351,9 +275,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,
|
|||
void rtw_hal_set_odm_var(struct adapter *padapter,
|
||||
enum hal_odm_variable eVariable, void *pValue1,
|
||||
bool bSet);
|
||||
void rtw_hal_get_odm_var(struct adapter *padapter,
|
||||
enum hal_odm_variable eVariable,
|
||||
void *pValue1, bool bSet);
|
||||
|
||||
void rtw_hal_enable_interrupt(struct adapter *padapter);
|
||||
void rtw_hal_disable_interrupt(struct adapter *padapter);
|
||||
|
@ -361,15 +282,11 @@ void rtw_hal_disable_interrupt(struct adapter *padapter);
|
|||
u32 rtw_hal_inirp_init(struct adapter *padapter);
|
||||
u32 rtw_hal_inirp_deinit(struct adapter *padapter);
|
||||
|
||||
u8 rtw_hal_intf_ps_func(struct adapter *padapter,
|
||||
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||
|
||||
s32 rtw_hal_xmit(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
s32 rtw_hal_mgnt_xmit(struct adapter *padapter,
|
||||
struct xmit_frame *pmgntframe);
|
||||
|
||||
s32 rtw_hal_init_xmit_priv(struct adapter *padapter);
|
||||
void rtw_hal_free_xmit_priv(struct adapter *padapter);
|
||||
|
||||
s32 rtw_hal_init_recv_priv(struct adapter *padapter);
|
||||
void rtw_hal_free_recv_priv(struct adapter *padapter);
|
||||
|
@ -378,14 +295,9 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
|
|||
void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
|
||||
void rtw_hal_clone_data(struct adapter *dst_adapt,
|
||||
struct adapter *src_adapt);
|
||||
void rtw_hal_start_thread(struct adapter *padapter);
|
||||
void rtw_hal_stop_thread(struct adapter *padapter);
|
||||
|
||||
void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
|
||||
|
||||
u32 rtw_hal_read_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask);
|
||||
void rtw_hal_write_bbreg(struct adapter *padapter, u32 RegAddr, u32 BitMask,
|
||||
u32 Data);
|
||||
u32 rtw_hal_read_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath,
|
||||
u32 RegAddr, u32 BitMask);
|
||||
void rtw_hal_write_rfreg(struct adapter *padapter,
|
||||
|
@ -405,21 +317,11 @@ void rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
|
|||
struct wlan_bssid_ex *src);
|
||||
|
||||
void rtw_hal_sreset_init(struct adapter *padapter);
|
||||
void rtw_hal_sreset_reset(struct adapter *padapter);
|
||||
void rtw_hal_sreset_reset_value(struct adapter *padapter);
|
||||
void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
|
||||
void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
|
||||
u8 rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
|
||||
|
||||
int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame,
|
||||
u32 max_wating_ms, u32 bndy_cnt);
|
||||
|
||||
void rtw_hal_notch_filter(struct adapter *adapter, bool enable);
|
||||
void rtw_hal_reset_security_engine(struct adapter *adapter);
|
||||
|
||||
s32 rtw_hal_c2h_handler(struct adapter *adapter,
|
||||
struct c2h_evt_hdr *c2h_evt);
|
||||
c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter);
|
||||
void indicate_wx_scan_complete_event(struct adapter *padapter);
|
||||
u8 rtw_do_join(struct adapter *padapter);
|
||||
|
||||
|
|
|
@ -1233,19 +1233,6 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
|
|||
void dump_ies(u8 *buf, u32 buf_len);
|
||||
void dump_wps_ie(u8 *ie, u32 ie_len);
|
||||
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
void dump_p2p_ie(u8 *ie, u32 ie_len);
|
||||
u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen);
|
||||
u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
|
||||
u8 *buf_attr, u32 *len_attr);
|
||||
u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id,
|
||||
u8 *buf_content, uint *len_content);
|
||||
u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len,
|
||||
u8 *pdata_attr);
|
||||
void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex,
|
||||
u8 attr_id);
|
||||
#endif
|
||||
|
||||
uint rtw_get_rateset_len(u8 *rateset);
|
||||
|
||||
struct registry_priv;
|
||||
|
|
|
@ -103,24 +103,24 @@ struct wme_parameter_element {
|
|||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
(a)[0] = ((u16) (val)) & 0xff; \
|
||||
(a)[1] = ((u16)(val)) >> 8; \
|
||||
(a)[0] = ((u16)(val)) & 0xff; \
|
||||
} while (0)
|
||||
|
||||
#define WPA_PUT_BE32(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[3] = (u8) (((u32) (val)) & 0xff); \
|
||||
(a)[0] = (u8)((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[1] = (u8)((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[2] = (u8)((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[3] = (u8)(((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define WPA_PUT_LE32(a, val) \
|
||||
do { \
|
||||
(a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[0] = (u8) (((u32) (val)) & 0xff); \
|
||||
(a)[3] = (u8)((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[2] = (u8)((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[1] = (u8)((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[0] = (u8)(((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *)(a), (val))
|
||||
|
|
109
include/odm.h
109
include/odm.h
|
@ -90,14 +90,6 @@
|
|||
#define ANTTESTA 0x01 /* Ant A will be Testing */
|
||||
#define ANTTESTB 0x02 /* Ant B will be testing */
|
||||
|
||||
/* structure and define */
|
||||
|
||||
/* Add for AP/ADSLpseudo DM structuer requirement. */
|
||||
/* We need to remove to other position??? */
|
||||
struct rtl8192cd_priv {
|
||||
u8 temp;
|
||||
};
|
||||
|
||||
struct rtw_dig {
|
||||
u8 Dig_Enable_Flag;
|
||||
u8 Dig_Ext_Port_Stage;
|
||||
|
@ -151,7 +143,7 @@ struct rtl_ps {
|
|||
int Rssi_val_min;
|
||||
|
||||
u8 initialize;
|
||||
u32 Reg874,RegC70,Reg85C,RegA74;
|
||||
u32 Reg874, RegC70, Reg85C, RegA74;
|
||||
|
||||
};
|
||||
|
||||
|
@ -172,14 +164,6 @@ struct false_alarm_stats {
|
|||
u32 Cnt_BW_LSC; /* Gary */
|
||||
};
|
||||
|
||||
struct dyn_primary_cca {
|
||||
u8 PriCCA_flag;
|
||||
u8 intf_flag;
|
||||
u8 intf_type;
|
||||
u8 DupRTS_flag;
|
||||
u8 Monitor_flag;
|
||||
};
|
||||
|
||||
struct rx_hpc {
|
||||
u8 RXHP_flag;
|
||||
u8 PSD_func_trigger;
|
||||
|
@ -454,29 +438,7 @@ enum odm_ability_def {
|
|||
ODM_RF_CALIBRATION = BIT26,
|
||||
};
|
||||
|
||||
/* ODM_CMNINFO_INTERFACE */
|
||||
enum odm_interface_def {
|
||||
ODM_ITRF_PCIE = 0x1,
|
||||
ODM_ITRF_USB = 0x2,
|
||||
ODM_ITRF_SDIO = 0x4,
|
||||
ODM_ITRF_ALL = 0x7,
|
||||
};
|
||||
|
||||
/* ODM_CMNINFO_IC_TYPE */
|
||||
enum odm_ic_type {
|
||||
ODM_RTL8192S = BIT0,
|
||||
ODM_RTL8192C = BIT1,
|
||||
ODM_RTL8192D = BIT2,
|
||||
ODM_RTL8723A = BIT3,
|
||||
ODM_RTL8188E = BIT4,
|
||||
ODM_RTL8812 = BIT5,
|
||||
ODM_RTL8821 = BIT6,
|
||||
};
|
||||
|
||||
#define ODM_IC_11N_SERIES \
|
||||
(ODM_RTL8192S | ODM_RTL8192C | ODM_RTL8192D | \
|
||||
ODM_RTL8723A | ODM_RTL8188E)
|
||||
#define ODM_IC_11AC_SERIES (ODM_RTL8812)
|
||||
#define ODM_RTL8188E BIT4
|
||||
|
||||
/* ODM_CMNINFO_CUT_VER */
|
||||
enum odm_cut_version {
|
||||
|
@ -897,7 +859,6 @@ struct odm_dm_struct {
|
|||
struct fast_ant_train DM_FatTable;
|
||||
struct rtw_dig DM_DigTable;
|
||||
struct rtl_ps DM_PSTable;
|
||||
struct dyn_primary_cca DM_PriCCA;
|
||||
struct rx_hpc DM_RXHP_Table;
|
||||
struct false_alarm_stats FalseAlmCnt;
|
||||
struct false_alarm_stats FlaseAlmCntBuddyAdapter;
|
||||
|
@ -950,13 +911,6 @@ struct odm_dm_struct {
|
|||
|
||||
#define ODM_RF_PATH_MAX 3
|
||||
|
||||
enum ODM_RF_RADIO_PATH {
|
||||
ODM_RF_PATH_A = 0, /* Radio Path A */
|
||||
ODM_RF_PATH_B = 1, /* Radio Path B */
|
||||
ODM_RF_PATH_C = 2, /* Radio Path C */
|
||||
ODM_RF_PATH_D = 3, /* Radio Path D */
|
||||
};
|
||||
|
||||
enum ODM_RF_CONTENT {
|
||||
odm_radioa_txt = 0x1000,
|
||||
odm_radiob_txt = 0x1001,
|
||||
|
@ -1128,69 +1082,28 @@ extern u8 CCKSwingTable_Ch14 [CCK_TABLE_SIZE][8];
|
|||
#define SWAW_STEP_PEAK 0
|
||||
#define SWAW_STEP_DETERMINE 1
|
||||
|
||||
void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI);
|
||||
void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres);
|
||||
|
||||
void ODM_SetAntenna(struct odm_dm_struct *pDM_Odm, u8 Antenna);
|
||||
|
||||
|
||||
#define dm_RF_Saving ODM_RF_Saving
|
||||
void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal);
|
||||
|
||||
#define SwAntDivRestAfterLink ODM_SwAntDivRestAfterLink
|
||||
void ODM_SwAntDivRestAfterLink(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
#define dm_CheckTXPowerTracking ODM_TXPowerTrackingCheck
|
||||
void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm);
|
||||
#define dm_RF_Saving ODM_RF_Saving
|
||||
|
||||
void ODM_RF_Saving(struct odm_dm_struct *pDM_Odm, u8 bForceInNormal);
|
||||
void ODM_TXPowerTrackingCheck(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm);
|
||||
void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres);
|
||||
bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI,
|
||||
bool bForceUpdate, u8 *pRATRState);
|
||||
|
||||
#define dm_SWAW_RSSI_Check ODM_SwAntDivChkPerPktRssi
|
||||
void ODM_SwAntDivChkPerPktRssi(struct odm_dm_struct *pDM_Odm, u8 StationID,
|
||||
struct odm_phy_status_info *pPhyInfo);
|
||||
|
||||
u32 ConvertTo_dB(u32 Value);
|
||||
|
||||
u32 GetPSDData(struct odm_dm_struct *pDM_Odm, unsigned int point,
|
||||
u8 initial_gain_psd);
|
||||
|
||||
void odm_DIGbyRSSI_LPS(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
u32 ODM_Get_Rate_Bitmap(struct odm_dm_struct *pDM_Odm, u32 macid,
|
||||
u32 ra_mask, u8 rssi_level);
|
||||
|
||||
void ODM_DMInit(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_CmnInfoInit(struct odm_dm_struct *pDM_Odm,
|
||||
enum odm_common_info_def CmnInfo, u32 Value);
|
||||
|
||||
void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value);
|
||||
void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm,
|
||||
enum odm_common_info_def CmnInfo, void *pValue);
|
||||
|
||||
void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm,
|
||||
enum odm_common_info_def CmnInfo,
|
||||
u16 Index, void *pValue);
|
||||
|
||||
void ODM_CmnInfoUpdate(struct odm_dm_struct *pDM_Odm, u32 CmnInfo, u64 Value);
|
||||
|
||||
void ODM_InitAllTimers(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_CancelAllTimers(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_ReleaseAllTimers(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_AntselStatistics_88C(struct odm_dm_struct *pDM_Odm, u8 MacId,
|
||||
u32 PWDBAll, bool isCCKrate);
|
||||
|
||||
void ODM_SingleDualAntennaDefaultSetting(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
bool ODM_SingleDualAntennaDetection(struct odm_dm_struct *pDM_Odm, u8 mode);
|
||||
|
||||
void odm_dtc(struct odm_dm_struct *pDM_Odm);
|
||||
void ODM_DMInit(struct odm_dm_struct *pDM_Odm);
|
||||
void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm);
|
||||
void ODM_Write_DIG(struct odm_dm_struct *pDM_Odm, u8 CurrentIGI);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -111,8 +111,7 @@ void odm_Init_RSSIForDM(struct odm_dm_struct *pDM_Odm);
|
|||
void ODM_PhyStatusQuery(struct odm_dm_struct *pDM_Odm,
|
||||
struct odm_phy_status_info *pPhyInfo,
|
||||
u8 *pPhyStatus,
|
||||
struct odm_per_pkt_info *pPktinfo,
|
||||
struct adapter *adapt);
|
||||
struct odm_per_pkt_info *pPktinfo);
|
||||
|
||||
void ODM_MacStatusQuery(struct odm_dm_struct *pDM_Odm,
|
||||
u8 *pMacStatus,
|
||||
|
@ -121,13 +120,7 @@ void ODM_MacStatusQuery(struct odm_dm_struct *pDM_Odm,
|
|||
bool bPacketToSelf,
|
||||
bool bPacketBeacon);
|
||||
|
||||
enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *pDM_Odm,
|
||||
enum ODM_RF_RADIO_PATH Content,
|
||||
enum ODM_RF_RADIO_PATH eRFPath);
|
||||
|
||||
enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *pDM_Odm,
|
||||
enum odm_bb_config_type ConfigType);
|
||||
|
||||
enum HAL_STATUS ODM_ConfigMACWithHeaderFile(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,17 +29,17 @@
|
|||
|
||||
void ODM_DIG_LowerBound_88E(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void ODM_AntennaDiversityInit_88E(struct odm_dm_struct *pDM_Odm);
|
||||
void rtl88eu_dm_antenna_div_init(struct odm_dm_struct *dm_odm);
|
||||
|
||||
void ODM_AntennaDiversity_88E(struct odm_dm_struct *pDM_Odm);
|
||||
void rtl88eu_dm_antenna_diversity(struct odm_dm_struct *dm_odm);
|
||||
|
||||
void ODM_SetTxAntByTxInfo_88E(struct odm_dm_struct *pDM_Odm, u8 *pDesc,
|
||||
u8 macId);
|
||||
void rtl88eu_dm_set_tx_ant_by_tx_info(struct odm_dm_struct *dm_odm, u8 *desc,
|
||||
u8 mac_id);
|
||||
|
||||
void ODM_UpdateRxIdleAnt_88E(struct odm_dm_struct *pDM_Odm, u8 Ant);
|
||||
void rtl88eu_dm_update_rx_idle_ant(struct odm_dm_struct *dm_odm, u8 ant);
|
||||
|
||||
void ODM_AntselStatistics_88E(struct odm_dm_struct *pDM_Odm, u8 antsel_tr_mux,
|
||||
u32 MacId, u8 RxPWDBAll);
|
||||
void rtl88eu_dm_ant_sel_statistics(struct odm_dm_struct *dm_odm, u8 antsel_tr_mux,
|
||||
u32 mac_id, u8 rx_pwdb_all);
|
||||
|
||||
void odm_FastAntTraining(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
|
@ -47,10 +47,6 @@ void odm_FastAntTrainingCallback(struct odm_dm_struct *pDM_Odm);
|
|||
|
||||
void odm_FastAntTrainingWorkItemCallback(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void odm_PrimaryCCA_Init(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
bool ODM_DynamicPrimaryCCA_DupRTS(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
void odm_DynamicPrimaryCCA(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -83,9 +83,8 @@
|
|||
#define ODM_COMP_INIT BIT31
|
||||
|
||||
/*------------------------Export Marco Definition---------------------------*/
|
||||
#define DbgPrint pr_info
|
||||
#define RT_PRINTK(fmt, args...) \
|
||||
DbgPrint( "%s(): " fmt, __func__, ## args);
|
||||
pr_info("%s(): " fmt, __func__, ## args);
|
||||
|
||||
#ifndef ASSERT
|
||||
#define ASSERT(expr)
|
||||
|
@ -94,51 +93,18 @@
|
|||
#define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
|
||||
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||
(level <= pDM_Odm->DebugLevel)) { \
|
||||
if (pDM_Odm->SupportICType == ODM_RTL8192C) \
|
||||
DbgPrint("[ODM-92C] "); \
|
||||
else if (pDM_Odm->SupportICType == ODM_RTL8192D) \
|
||||
DbgPrint("[ODM-92D] "); \
|
||||
else if (pDM_Odm->SupportICType == ODM_RTL8723A) \
|
||||
DbgPrint("[ODM-8723A] "); \
|
||||
else if (pDM_Odm->SupportICType == ODM_RTL8188E) \
|
||||
DbgPrint("[ODM-8188E] "); \
|
||||
else if (pDM_Odm->SupportICType == ODM_RTL8812) \
|
||||
DbgPrint("[ODM-8812] "); \
|
||||
else if (pDM_Odm->SupportICType == ODM_RTL8821) \
|
||||
DbgPrint("[ODM-8821] "); \
|
||||
RT_PRINTK fmt; \
|
||||
}
|
||||
|
||||
#define ODM_RT_TRACE_F(pDM_Odm, comp, level, fmt) \
|
||||
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||
(level <= pDM_Odm->DebugLevel)) { \
|
||||
pr_info("[ODM-8188E] "); \
|
||||
RT_PRINTK fmt; \
|
||||
}
|
||||
|
||||
#define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \
|
||||
if (!(expr)) { \
|
||||
DbgPrint( "Assertion failed! %s at ......\n", #expr); \
|
||||
DbgPrint( " ......%s,%s,line=%d\n", __FILE__, \
|
||||
pr_info("Assertion failed! %s at ......\n", #expr); \
|
||||
pr_info(" ......%s,%s,line=%d\n", __FILE__, \
|
||||
__func__, __LINE__); \
|
||||
RT_PRINTK fmt; \
|
||||
ASSERT(false); \
|
||||
}
|
||||
#define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); }
|
||||
#define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); }
|
||||
#define ODM_dbg_trace(str) { DbgPrint("%s:%s\n", __func__, str); }
|
||||
|
||||
#define ODM_PRINT_ADDR(pDM_Odm, comp, level, title_str, ptr) \
|
||||
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||
(level <= pDM_Odm->DebugLevel)) { \
|
||||
int __i; \
|
||||
u8 *__ptr = (u8 *)ptr; \
|
||||
DbgPrint("[ODM] "); \
|
||||
DbgPrint(title_str); \
|
||||
DbgPrint(" "); \
|
||||
for (__i = 0; __i < 6; __i++) \
|
||||
DbgPrint("%02X%s", __ptr[__i], (__i==5)?"":"-");\
|
||||
DbgPrint("\n"); \
|
||||
}
|
||||
|
||||
void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
|
|
|
@ -30,29 +30,20 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <hal_intf.h>
|
||||
#include <usb_ops_linux.h>
|
||||
|
||||
/* 2 OutSrc Header Files */
|
||||
|
||||
#include "odm.h"
|
||||
#include "odm_HWConfig.h"
|
||||
#include "odm_debug.h"
|
||||
#include "odm_RegDefine11AC.h"
|
||||
#include "odm_RegDefine11N.h"
|
||||
|
||||
#include "HalPhyRf.h"
|
||||
#include "HalPhyRf_8188e.h"/* for IQK,LCK,Power-tracking */
|
||||
#include "Hal8188ERateAdaptive.h"/* for RA,Power training */
|
||||
#include "rtl8188e_hal.h"
|
||||
|
||||
#include "odm_interface.h"
|
||||
#include "odm_reg.h"
|
||||
|
||||
#include "HalHWImg8188E_MAC.h"
|
||||
#include "HalHWImg8188E_RF.h"
|
||||
#include "HalHWImg8188E_BB.h"
|
||||
#include "Hal8188EReg.h"
|
||||
|
||||
#include "odm_RegConfig8188E.h"
|
||||
#include "odm_RTL8188E.h"
|
||||
|
||||
void odm_CmnInfoHook_Debug(struct odm_dm_struct *pDM_Odm);
|
||||
|
@ -64,7 +55,6 @@ void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm);
|
|||
void odm_TXPowerTrackingInit(struct odm_dm_struct *pDM_Odm);
|
||||
void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_SwAntDivInit_NIC(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_GlobalAdapterCheck(void);
|
||||
void odm_CmnInfoUpdate_Debug(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_CommonInfoSelfUpdate(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_FalseAlarmCounterStatistics(struct odm_dm_struct *pDM_Odm);
|
||||
|
@ -74,24 +64,17 @@ void odm_RefreshRateAdaptiveMaskMP(struct odm_dm_struct *pDM_Odm);
|
|||
void odm_DynamicBBPowerSaving(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_SwAntDivChkAntSwitch(struct odm_dm_struct *pDM_Odm, u8 Step);
|
||||
void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_SwAntDivInit(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_1R_CCA(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RefreshRateAdaptiveMaskCE(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RefreshRateAdaptiveMaskAPADSL(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_DynamicTxPowerNIC(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_DynamicTxPowerAP(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RSSIMonitorCheckMP(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RSSIMonitorCheckCE(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_RSSIMonitorCheckAP(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_TXPowerTrackingThermalMeterInit(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_TXPowerTrackingCheckCE(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_TXPowerTrackingCheckMP(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_TXPowerTrackingCheckAP(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext);
|
||||
void odm_InitHybridAntDiv(struct odm_dm_struct *pDM_Odm);
|
||||
void odm_HwAntDiv(struct odm_dm_struct *pDM_Odm);
|
||||
|
|
|
@ -20,31 +20,13 @@
|
|||
#ifndef __ODM_TYPES_H__
|
||||
#define __ODM_TYPES_H__
|
||||
|
||||
/* */
|
||||
/* Define Different SW team support */
|
||||
/* */
|
||||
#define ODM_AP 0x01 /* BIT0 */
|
||||
#define ODM_ADSL 0x02 /* BIT1 */
|
||||
#define ODM_CE 0x04 /* BIT2 */
|
||||
#define ODM_MP 0x08 /* BIT3 */
|
||||
|
||||
#define RT_PCI_INTERFACE 1
|
||||
#define RT_USB_INTERFACE 2
|
||||
#define RT_SDIO_INTERFACE 3
|
||||
|
||||
enum HAL_STATUS {
|
||||
HAL_STATUS_SUCCESS,
|
||||
HAL_STATUS_FAILURE,
|
||||
};
|
||||
|
||||
enum RT_SPINLOCK_TYPE {
|
||||
RT_TEMP = 1,
|
||||
};
|
||||
|
||||
#include <basic_types.h>
|
||||
|
||||
#define DEV_BUS_TYPE RT_USB_INTERFACE
|
||||
|
||||
#define SET_TX_DESC_ANTSEL_A_88E(__pTxDesc, __Value) \
|
||||
SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 24, 1, __Value)
|
||||
#define SET_TX_DESC_ANTSEL_B_88E(__pTxDesc, __Value) \
|
||||
|
@ -52,11 +34,4 @@ enum RT_SPINLOCK_TYPE {
|
|||
#define SET_TX_DESC_ANTSEL_C_88E(__pTxDesc, __Value) \
|
||||
SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 29, 1, __Value)
|
||||
|
||||
/* define useless flag to avoid compile warning */
|
||||
#define USE_WORKITEM 0
|
||||
#define FOR_BRAZIL_PRETEST 0
|
||||
#define BT_30_SUPPORT 0
|
||||
#define FPGA_TWO_MAC_VERIFICATION 0
|
||||
|
||||
|
||||
#endif /* __ODM_TYPES_H__ */
|
||||
|
|
|
@ -24,38 +24,8 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
struct intf_priv {
|
||||
u8 *intf_dev;
|
||||
u32 max_iosz; /* USB2.0: 128, USB1.1: 64, SDIO:64 */
|
||||
u32 max_xmitsz; /* USB2.0: unlimited, SDIO:512 */
|
||||
u32 max_recvsz; /* USB2.0: unlimited, SDIO:512 */
|
||||
|
||||
u8 *io_rwmem;
|
||||
u8 *allocated_io_rwmem;
|
||||
u32 io_wsz; /* unit: 4bytes */
|
||||
u32 io_rsz;/* unit: 4bytes */
|
||||
u8 intf_status;
|
||||
|
||||
void (*_bus_io)(u8 *priv);
|
||||
|
||||
/*
|
||||
Under Sync. IRP (SDIO/USB)
|
||||
A protection mechanism is necessary for the io_rwmem(read/write protocol)
|
||||
|
||||
Under Async. IRP (SDIO/USB)
|
||||
The protection mechanism is through the pending queue.
|
||||
*/
|
||||
struct mutex ioctl_mutex;
|
||||
/* when in USB, IO is through interrupt in/out endpoints */
|
||||
struct usb_device *udev;
|
||||
struct urb *piorw_urb;
|
||||
u8 io_irp_cnt;
|
||||
u8 bio_irp_pending;
|
||||
struct semaphore io_retevt;
|
||||
struct timer_list io_timer;
|
||||
u8 bio_irp_timeout;
|
||||
u8 bio_timer_cancel;
|
||||
};
|
||||
extern char *rtw_initmac;
|
||||
extern int rtw_mc2u_disable;
|
||||
|
||||
u8 rtw_init_drv_sw(struct adapter *padapter);
|
||||
u8 rtw_free_drv_sw(struct adapter *padapter);
|
||||
|
@ -73,11 +43,9 @@ u16 rtw_recv_select_queue(struct sk_buff *skb);
|
|||
void rtw_proc_init_one(struct net_device *dev);
|
||||
void rtw_proc_remove_one(struct net_device *dev);
|
||||
|
||||
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
|
||||
void rtw_ips_dev_unload(struct adapter *padapter);
|
||||
|
||||
int rtw_ips_pwr_up(struct adapter *padapter);
|
||||
void rtw_ips_pwr_down(struct adapter *padapter);
|
||||
int rtw_hw_suspend(struct adapter *padapter);
|
||||
int rtw_hw_resume(struct adapter *padapter);
|
||||
|
||||
#endif /* _OSDEP_INTF_H_ */
|
||||
|
|
|
@ -24,13 +24,12 @@
|
|||
|
||||
#define _FAIL 0
|
||||
#define _SUCCESS 1
|
||||
#define RTW_RX_HANDLED 2
|
||||
#define RTW_RX_HANDLED 2
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kref.h>
|
||||
|
@ -39,7 +38,7 @@
|
|||
#include <linux/circ_buf.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/sem.h>
|
||||
|
@ -63,54 +62,13 @@ struct __queue {
|
|||
spinlock_t lock;
|
||||
};
|
||||
|
||||
#define thread_exit() complete_and_exit(NULL, 0)
|
||||
|
||||
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));
|
||||
return &(queue->queue);
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))
|
||||
|
||||
|
||||
static inline void _enter_critical(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_lock_irqsave(plock, *pirqL);
|
||||
}
|
||||
|
||||
static inline void _exit_critical(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_unlock_irqrestore(plock, *pirqL);
|
||||
}
|
||||
|
||||
static inline void _enter_critical_ex(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_lock_irqsave(plock, *pirqL);
|
||||
}
|
||||
|
||||
static inline void _exit_critical_ex(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_unlock_irqrestore(plock, *pirqL);
|
||||
}
|
||||
|
||||
static inline void _enter_critical_bh(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_lock_bh(plock);
|
||||
}
|
||||
|
||||
static inline void _exit_critical_bh(spinlock_t *plock, unsigned long *pirqL)
|
||||
{
|
||||
spin_unlock_bh(plock);
|
||||
}
|
||||
|
||||
static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pirqL)
|
||||
static inline int _enter_critical_mutex(struct mutex *pmutex,
|
||||
unsigned long *pirqL)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -118,70 +76,24 @@ static inline int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pir
|
|||
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);
|
||||
}
|
||||
|
||||
static inline void _init_timer(struct timer_list *ptimer,struct net_device *nic_hdl,void *pfunc,void* cntx)
|
||||
static inline void _init_timer(struct timer_list *ptimer,
|
||||
struct net_device *nic_hdl,
|
||||
void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->data = (unsigned long)cntx;
|
||||
init_timer(ptimer);
|
||||
}
|
||||
|
||||
static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
||||
static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
|
||||
{
|
||||
mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
|
||||
}
|
||||
|
||||
static inline void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled)
|
||||
{
|
||||
del_timer_sync(ptimer);
|
||||
*bcancelled= true;/* true ==1; false==0 */
|
||||
}
|
||||
|
||||
#define RTW_TIMER_HDL_ARGS void *FunctionContext
|
||||
#define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
|
||||
#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);
|
||||
}
|
||||
/* */
|
||||
/* Global Mutex: can only be used at PASSIVE level. */
|
||||
/* */
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (atomic_inc_return((atomic_t *)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
atomic_dec((atomic_t *)&(_MutexCounter)); \
|
||||
msleep(10); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
atomic_dec((atomic_t *)&(_MutexCounter)); \
|
||||
}
|
||||
#define RTW_DECLARE_TIMER_HDL(name) \
|
||||
void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
||||
|
||||
static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
|
||||
{
|
||||
|
@ -191,24 +103,6 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
|
|||
netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3));
|
||||
}
|
||||
|
||||
static inline void rtw_netif_wake_queue(struct net_device *pnetdev)
|
||||
{
|
||||
netif_tx_wake_all_queues(pnetdev);
|
||||
}
|
||||
|
||||
static inline void rtw_netif_start_queue(struct net_device *pnetdev)
|
||||
{
|
||||
netif_tx_start_all_queues(pnetdev);
|
||||
}
|
||||
|
||||
static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
|
||||
{
|
||||
netif_tx_stop_all_queues(pnetdev);
|
||||
}
|
||||
|
||||
#ifndef BIT
|
||||
#define BIT(x) ( 1 << (x))
|
||||
#endif
|
||||
|
||||
#define BIT0 0x00000001
|
||||
#define BIT1 0x00000002
|
||||
|
@ -250,185 +144,17 @@ static inline void rtw_netif_stop_queue(struct net_device *pnetdev)
|
|||
|
||||
extern int RTW_STATUS_CODE(int error_code);
|
||||
|
||||
/* flags used for rtw_update_mem_stat() */
|
||||
enum {
|
||||
MEM_STAT_VIR_ALLOC_SUCCESS,
|
||||
MEM_STAT_VIR_ALLOC_FAIL,
|
||||
MEM_STAT_VIR_FREE,
|
||||
MEM_STAT_PHY_ALLOC_SUCCESS,
|
||||
MEM_STAT_PHY_ALLOC_FAIL,
|
||||
MEM_STAT_PHY_FREE,
|
||||
MEM_STAT_TX, /* used to distinguish TX/RX, asigned from caller */
|
||||
MEM_STAT_TX_ALLOC_SUCCESS,
|
||||
MEM_STAT_TX_ALLOC_FAIL,
|
||||
MEM_STAT_TX_FREE,
|
||||
MEM_STAT_RX, /* used to distinguish TX/RX, asigned from caller */
|
||||
MEM_STAT_RX_ALLOC_SUCCESS,
|
||||
MEM_STAT_RX_ALLOC_FAIL,
|
||||
MEM_STAT_RX_FREE
|
||||
};
|
||||
|
||||
extern unsigned char MCS_rate_2R[16];
|
||||
extern unsigned char MCS_rate_1R[16];
|
||||
extern unsigned char RTW_WPA_OUI[];
|
||||
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))
|
||||
|
||||
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);
|
||||
u32 rtw_is_list_empty(struct list_head *phead);
|
||||
void rtw_list_insert_head(struct list_head *plist, struct list_head *phead);
|
||||
void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead);
|
||||
void rtw_list_delete(struct list_head *plist);
|
||||
|
||||
void _rtw_init_sema(struct semaphore *sema, int init_val);
|
||||
void _rtw_free_sema(struct semaphore *sema);
|
||||
void _rtw_up_sema(struct semaphore *sema);
|
||||
u32 _rtw_down_sema(struct semaphore *sema);
|
||||
void _rtw_mutex_init(struct mutex *pmutex);
|
||||
void _rtw_mutex_free(struct mutex *pmutex);
|
||||
void _rtw_spinlock_init(spinlock_t *plock);
|
||||
void _rtw_spinlock_free(spinlock_t *plock);
|
||||
|
||||
void _rtw_init_queue(struct __queue *pqueue);
|
||||
u32 _rtw_queue_empty(struct __queue *pqueue);
|
||||
u32 rtw_end_of_queue_search(struct list_head *queue, struct list_head *pelement);
|
||||
|
||||
u32 rtw_get_current_time(void);
|
||||
u32 rtw_systime_to_ms(u32 systime);
|
||||
u32 rtw_ms_to_systime(u32 ms);
|
||||
s32 rtw_get_passing_time_ms(u32 start);
|
||||
s32 rtw_get_time_interval_ms(u32 start, u32 end);
|
||||
|
||||
void rtw_sleep_schedulable(int ms);
|
||||
|
||||
void rtw_msleep_os(int ms);
|
||||
void rtw_usleep_os(int us);
|
||||
|
||||
u32 rtw_atoi(u8 *s);
|
||||
|
||||
void rtw_mdelay_os(int ms);
|
||||
void rtw_udelay_os(int us);
|
||||
|
||||
void rtw_yield_os(void);
|
||||
|
||||
static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
|
||||
{
|
||||
return del_timer_sync(ptimer);
|
||||
}
|
||||
|
||||
static __inline void thread_enter(char *name)
|
||||
{
|
||||
#ifdef daemonize
|
||||
daemonize("%s", name);
|
||||
#endif
|
||||
allow_signal(SIGTERM);
|
||||
}
|
||||
|
||||
static inline void flush_signals_thread(void)
|
||||
{
|
||||
if (signal_pending (current))
|
||||
flush_signals(current);
|
||||
}
|
||||
|
||||
static inline int res_to_status(int res)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
||||
#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
|
||||
#define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0: 1)) << 2)
|
||||
|
||||
static inline u32 _RND4(u32 sz)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = ((sz >> 2) + ((sz & 3) ? 1: 0)) << 2;
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32 _RND8(u32 sz)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = ((sz >> 3) + ((sz & 7) ? 1: 0)) << 3;
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32 _RND128(u32 sz)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = ((sz >> 7) + ((sz & 127) ? 1: 0)) << 7;
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32 _RND256(u32 sz)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = ((sz >> 8) + ((sz & 255) ? 1: 0)) << 8;
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32 _RND512(u32 sz)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
val = ((sz >> 9) + ((sz & 511) ? 1: 0)) << 9;
|
||||
return val;
|
||||
}
|
||||
|
||||
static inline u32 bitshift(u32 bitmask)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i <= 31; i++)
|
||||
if (((bitmask>>i) & 0x1) == 1) break;
|
||||
return i;
|
||||
}
|
||||
|
||||
/* limitation of path length */
|
||||
#define PATH_LENGTH_MAX PATH_MAX
|
||||
|
||||
void rtw_suspend_lock_init(void);
|
||||
void rtw_suspend_lock_uninit(void);
|
||||
void rtw_lock_suspend(void);
|
||||
void rtw_unlock_suspend(void);
|
||||
|
||||
/* Atomic integer operations */
|
||||
#define ATOMIC_T atomic_t
|
||||
|
||||
void ATOMIC_SET(ATOMIC_T *v, int i);
|
||||
int ATOMIC_READ(ATOMIC_T *v);
|
||||
void ATOMIC_ADD(ATOMIC_T *v, int i);
|
||||
void ATOMIC_SUB(ATOMIC_T *v, int i);
|
||||
void ATOMIC_INC(ATOMIC_T *v);
|
||||
void ATOMIC_DEC(ATOMIC_T *v);
|
||||
int ATOMIC_ADD_RETURN(ATOMIC_T *v, int i);
|
||||
int ATOMIC_SUB_RETURN(ATOMIC_T *v, int i);
|
||||
int ATOMIC_INC_RETURN(ATOMIC_T *v);
|
||||
int ATOMIC_DEC_RETURN(ATOMIC_T *v);
|
||||
|
||||
struct rtw_netdev_priv_indicator {
|
||||
void *priv;
|
||||
|
@ -436,7 +162,6 @@ struct rtw_netdev_priv_indicator {
|
|||
};
|
||||
struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv,
|
||||
void *old_priv);
|
||||
struct net_device *rtw_alloc_etherdev(int sizeof_priv);
|
||||
|
||||
#define rtw_netdev_priv(netdev) \
|
||||
(((struct rtw_netdev_priv_indicator *)netdev_priv(netdev))->priv)
|
||||
|
@ -451,92 +176,15 @@ void rtw_free_netdev(struct net_device *netdev);
|
|||
#define FUNC_ADPT_FMT "%s(%s)"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
|
||||
|
||||
#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)),(sig), 1)
|
||||
#define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
|
||||
|
||||
u64 rtw_modular64(u64 x, u64 y);
|
||||
u64 rtw_division64(u64 x, u64 y);
|
||||
|
||||
/* Macros for handling unaligned memory accesses */
|
||||
|
||||
#define RTW_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1]))
|
||||
#define RTW_PUT_BE16(a, val) \
|
||||
do { \
|
||||
(a)[0] = ((u16) (val)) >> 8; \
|
||||
(a)[1] = ((u16) (val)) & 0xff; \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
|
||||
#define RTW_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(a)[1] = ((u16) (val)) >> 8; \
|
||||
(a)[0] = ((u16) (val)) & 0xff; \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
|
||||
((u32) (a)[2]))
|
||||
#define RTW_PUT_BE24(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[2] = (u8) (((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \
|
||||
(((u32) (a)[2]) << 8) | ((u32) (a)[3]))
|
||||
#define RTW_PUT_BE32(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[3] = (u8) (((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_LE32(a) ((((u32) (a)[3]) << 24) | (((u32) (a)[2]) << 16) | \
|
||||
(((u32) (a)[1]) << 8) | ((u32) (a)[0]))
|
||||
#define RTW_PUT_LE32(a, val) \
|
||||
do { \
|
||||
(a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \
|
||||
(a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \
|
||||
(a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \
|
||||
(a)[0] = (u8) (((u32) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_BE64(a) ((((u64) (a)[0]) << 56) | (((u64) (a)[1]) << 48) | \
|
||||
(((u64) (a)[2]) << 40) | (((u64) (a)[3]) << 32) | \
|
||||
(((u64) (a)[4]) << 24) | (((u64) (a)[5]) << 16) | \
|
||||
(((u64) (a)[6]) << 8) | ((u64) (a)[7]))
|
||||
#define RTW_PUT_BE64(a, val) \
|
||||
do { \
|
||||
(a)[0] = (u8) (((u64) (val)) >> 56); \
|
||||
(a)[1] = (u8) (((u64) (val)) >> 48); \
|
||||
(a)[2] = (u8) (((u64) (val)) >> 40); \
|
||||
(a)[3] = (u8) (((u64) (val)) >> 32); \
|
||||
(a)[4] = (u8) (((u64) (val)) >> 24); \
|
||||
(a)[5] = (u8) (((u64) (val)) >> 16); \
|
||||
(a)[6] = (u8) (((u64) (val)) >> 8); \
|
||||
(a)[7] = (u8) (((u64) (val)) & 0xff); \
|
||||
} while (0)
|
||||
|
||||
#define RTW_GET_LE64(a) ((((u64) (a)[7]) << 56) | (((u64) (a)[6]) << 48) | \
|
||||
(((u64) (a)[5]) << 40) | (((u64) (a)[4]) << 32) | \
|
||||
(((u64) (a)[3]) << 24) | (((u64) (a)[2]) << 16) | \
|
||||
(((u64) (a)[1]) << 8) | ((u64) (a)[0]))
|
||||
#define RTW_GET_BE24(a) ((((u32)(a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
|
||||
((u32)(a)[2]))
|
||||
|
||||
void rtw_buf_free(u8 **buf, u32 *buf_len);
|
||||
void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);
|
||||
|
||||
struct rtw_cbuf {
|
||||
u32 write;
|
||||
u32 read;
|
||||
u32 size;
|
||||
void *bufs[0];
|
||||
};
|
||||
|
||||
bool rtw_cbuf_full(struct rtw_cbuf *cbuf);
|
||||
bool rtw_cbuf_empty(struct rtw_cbuf *cbuf);
|
||||
bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf);
|
||||
void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
|
||||
struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
|
||||
int wifirate2_ratetbl_inx(unsigned char rate);
|
||||
|
||||
#endif
|
||||
|
|
30
include/phy.h
Normal file
30
include/phy.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#include <odm.h>
|
||||
|
||||
#define IQK_DELAY_TIME_88E 10
|
||||
#define index_mapping_NUM_88E 15
|
||||
#define AVG_THERMAL_NUM_88E 4
|
||||
#define ODM_TARGET_CHNL_NUM_2G_5G 59
|
||||
|
||||
bool rtl88eu_phy_mac_config(struct adapter *adapt);
|
||||
bool rtl88eu_phy_rf_config(struct adapter *adapt);
|
||||
bool rtl88eu_phy_bb_config(struct adapter *adapt);
|
||||
|
||||
u32 phy_query_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask);
|
||||
void phy_set_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask, u32 data);
|
||||
u32 phy_query_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
|
||||
u32 reg_addr, u32 bit_mask);
|
||||
void phy_set_rf_reg(struct adapter *adapt, enum rf_radio_path rf_path,
|
||||
u32 reg_addr, u32 bit_mask, u32 data);
|
||||
|
||||
void phy_set_tx_power_level(struct adapter *adapt, u8 channel);
|
||||
|
||||
void phy_set_bw_mode(struct adapter *adapt, enum ht_channel_width bandwidth,
|
||||
unsigned char offset);
|
||||
void phy_sw_chnl(struct adapter *adapt, u8 channel);
|
||||
|
||||
void rtl88eu_dm_txpower_track_adjust(struct odm_dm_struct *dm_odm,
|
||||
u8 type, u8 *dir, u32 *out_write);
|
||||
|
||||
void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt);
|
||||
void rtl88eu_phy_iq_calibrate(struct adapter *adapter, bool recovery);
|
||||
void rtl88eu_phy_lc_calibrate(struct adapter *adapter);
|
341
include/pwrseq.h
Normal file
341
include/pwrseq.h
Normal file
|
@ -0,0 +1,341 @@
|
|||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __HAL8188EPWRSEQ_H__
|
||||
#define __HAL8188EPWRSEQ_H__
|
||||
|
||||
#include "pwrseqcmd.h"
|
||||
|
||||
/*
|
||||
Check document WM-20110607-Paul-RTL8188E_Power_Architecture-R02.vsd
|
||||
There are 6 HW Power States:
|
||||
0: POFF--Power Off
|
||||
1: PDN--Power Down
|
||||
2: CARDEMU--Card Emulation
|
||||
3: ACT--Active Mode
|
||||
4: LPS--Low Power State
|
||||
5: SUS--Suspend
|
||||
|
||||
The transision from different states are defined below
|
||||
TRANS_CARDEMU_TO_ACT
|
||||
TRANS_ACT_TO_CARDEMU
|
||||
TRANS_CARDEMU_TO_SUS
|
||||
TRANS_SUS_TO_CARDEMU
|
||||
TRANS_CARDEMU_TO_PDN
|
||||
TRANS_ACT_TO_LPS
|
||||
TRANS_LPS_TO_ACT
|
||||
|
||||
TRANS_END
|
||||
|
||||
PWR SEQ Version: rtl8188E_PwrSeq_V09.h
|
||||
*/
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS 10
|
||||
#define RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS 10
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS 10
|
||||
#define RTL8188E_TRANS_SUS_TO_CARDEMU_STEPS 10
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS 10
|
||||
#define RTL8188E_TRANS_PDN_TO_CARDEMU_STEPS 10
|
||||
#define RTL8188E_TRANS_ACT_TO_LPS_STEPS 15
|
||||
#define RTL8188E_TRANS_LPS_TO_ACT_STEPS 15
|
||||
#define RTL8188E_TRANS_END_STEPS 1
|
||||
|
||||
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_ACT \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value
|
||||
* },
|
||||
* comment here
|
||||
*/ \
|
||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, BIT1}, \
|
||||
/* wait till 0x04[17] = 1 power ready*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0|BIT1, 0}, \
|
||||
/* 0x02[1:0] = 0 reset BB*/ \
|
||||
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, \
|
||||
/*0x24[23] = 2b'01 schmit trigger */ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0}, \
|
||||
/* 0x04[15] = 0 disable HWPDN (control by DRV)*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4|BIT3, 0}, \
|
||||
/*0x04[12:11] = 2b'00 disable WL suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0}, \
|
||||
/*0x04[8] = 1 polling until return 0*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT0, 0}, \
|
||||
/*wait till 0x04[8] = 0*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, \
|
||||
/*LDO normal mode*/ \
|
||||
{0x0074, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, \
|
||||
/*SDIO Driving*/
|
||||
|
||||
#define RTL8188E_TRANS_ACT_TO_CARDEMU \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value
|
||||
* },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x001F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0}, \
|
||||
/*0x1F[7:0] = 0 turn off RF*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, \
|
||||
/*LDO Sleep mode*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1}, \
|
||||
/*0x04[9] = 1 turn off MAC by HW state machine*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, 0}, \
|
||||
/*wait till 0x04[9] = 0 polling until return 0 to disable*/
|
||||
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_SUS \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, BIT3|BIT4, BIT3}, \
|
||||
/* 0x04[12:11] = 2b'01enable WL suspend */ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3|BIT4}, \
|
||||
/* 0x04[12:11] = 2b'11enable WL suspend for PCIe */ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, 0xFF, BIT7}, \
|
||||
/* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */\
|
||||
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, BIT4, 0}, \
|
||||
/*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
||||
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, BIT4, BIT4}, \
|
||||
/*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0}, \
|
||||
/*Set SDIO suspend local register*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0}, \
|
||||
/*wait power state to suspend*/
|
||||
|
||||
#define RTL8188E_TRANS_SUS_TO_CARDEMU \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0}, \
|
||||
/*Set SDIO suspend local register*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1}, \
|
||||
/*wait power state to suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0}, \
|
||||
/*0x04[12:11] = 2b'01enable WL suspend*/
|
||||
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_CARDDIS \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, \
|
||||
/*0x24[23] = 2b'01 schmit trigger */ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, BIT3|BIT4, BIT3}, \
|
||||
/*0x04[12:11] = 2b'01 enable WL suspend*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, 0xFF, 0}, \
|
||||
/* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */\
|
||||
{0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
|
||||
PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, \
|
||||
PWR_CMD_WRITE, BIT4, 0}, \
|
||||
/*Clear SIC_EN register 0x40[12] = 1'b0 */ \
|
||||
{0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, \
|
||||
/*Set USB suspend enable local register 0xfe10[4]=1 */ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0}, \
|
||||
/*Set SDIO suspend local register*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0}, \
|
||||
/*wait power state to suspend*/
|
||||
|
||||
#define RTL8188E_TRANS_CARDDIS_TO_CARDEMU \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0}, \
|
||||
/*Set SDIO suspend local register*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1}, \
|
||||
/*wait power state to suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0}, \
|
||||
/*0x04[12:11] = 2b'01enable WL suspend*/
|
||||
|
||||
#define RTL8188E_TRANS_CARDEMU_TO_PDN \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0}, \
|
||||
/* 0x04[16] = 0*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7}, \
|
||||
/* 0x04[15] = 1*/
|
||||
|
||||
#define RTL8188E_TRANS_PDN_TO_CARDEMU \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0}, \
|
||||
/* 0x04[15] = 0*/
|
||||
|
||||
/* This is used by driver for LPSRadioOff Procedure, not for FW LPS Step */
|
||||
#define RTL8188E_TRANS_ACT_TO_LPS \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x7F},/*Tx Pause*/ \
|
||||
{0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0}, \
|
||||
/*Should be zero if no packet is transmitting*/ \
|
||||
{0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0}, \
|
||||
/*Should be zero if no packet is transmitting*/ \
|
||||
{0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0}, \
|
||||
/*Should be zero if no packet is transmitting*/ \
|
||||
{0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0}, \
|
||||
/*Should be zero if no packet is transmitting*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0}, \
|
||||
/*CCK and OFDM are disabled,and clock are gated*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, \
|
||||
PWRSEQ_DELAY_US},/*Delay 1us*/ \
|
||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x3F},/*Reset MAC TRX*/ \
|
||||
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0},/*check if removed later*/\
|
||||
{0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5}, \
|
||||
/*Respond TxOK to scheduler*/
|
||||
|
||||
|
||||
#define RTL8188E_TRANS_LPS_TO_ACT \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \
|
||||
PWR_BASEADDR_SDIO, PWR_CMD_WRITE, 0xFF, 0x84}, /*SDIO RPWM*/ \
|
||||
{0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84}, /*USB RPWM*/ \
|
||||
{0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84}, /*PCIe RPWM*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS}, /*Delay*/ \
|
||||
{0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0}, \
|
||||
/* 0x08[4] = 0 switch TSF to 40M */ \
|
||||
{0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT7, 0}, \
|
||||
/* Polling 0x109[7]=0 TSF in 40M */ \
|
||||
{0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6|BIT7, 0}, \
|
||||
/* 0x29[7:6] = 2b'00 enable BB clock */ \
|
||||
{0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1}, \
|
||||
/* 0x101[1] = 1 */ \
|
||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF}, \
|
||||
/* 0x100[7:0] = 0xFF enable WMAC TRX */ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0}, \
|
||||
/* 0x02[1:0] = 2b'11 enable BB macro */ \
|
||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
|
||||
PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0}, /*. 0x522 = 0*/
|
||||
|
||||
#define RTL8188E_TRANS_END \
|
||||
/* format
|
||||
* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk,
|
||||
* value },
|
||||
* comments here
|
||||
*/ \
|
||||
{0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, 0, \
|
||||
PWR_CMD_END, 0, 0},
|
||||
|
||||
|
||||
extern struct wl_pwr_cfg rtl8188E_power_on_flow
|
||||
[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS + RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_radio_off_flow
|
||||
[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_card_disable_flow
|
||||
[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS +
|
||||
RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_card_enable_flow
|
||||
[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS +
|
||||
RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_suspend_flow[
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
|
||||
RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS +
|
||||
RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_resume_flow
|
||||
[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
|
||||
RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS +
|
||||
RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_hwpdn_flow
|
||||
[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS + RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_enter_lps_flow
|
||||
[RTL8188E_TRANS_ACT_TO_LPS_STEPS + RTL8188E_TRANS_END_STEPS];
|
||||
extern struct wl_pwr_cfg rtl8188E_leave_lps_flow
|
||||
[RTL8188E_TRANS_LPS_TO_ACT_STEPS + RTL8188E_TRANS_END_STEPS];
|
||||
|
||||
#endif /* __HAL8188EPWRSEQ_H__ */
|
90
include/pwrseqcmd.h
Normal file
90
include/pwrseqcmd.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __HALPWRSEQCMD_H__
|
||||
#define __HALPWRSEQCMD_H__
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
/* The value of cmd: 4 bits */
|
||||
#define PWR_CMD_READ 0x00
|
||||
#define PWR_CMD_WRITE 0x01
|
||||
#define PWR_CMD_POLLING 0x02
|
||||
#define PWR_CMD_DELAY 0x03
|
||||
#define PWR_CMD_END 0x04
|
||||
|
||||
/* The value of base: 4 bits */
|
||||
/* define the base address of each block */
|
||||
#define PWR_BASEADDR_MAC 0x00
|
||||
#define PWR_BASEADDR_USB 0x01
|
||||
#define PWR_BASEADDR_PCIE 0x02
|
||||
#define PWR_BASEADDR_SDIO 0x03
|
||||
|
||||
/* The value of interface_msk: 4 bits */
|
||||
#define PWR_INTF_SDIO_MSK BIT(0)
|
||||
#define PWR_INTF_USB_MSK BIT(1)
|
||||
#define PWR_INTF_PCI_MSK BIT(2)
|
||||
#define PWR_INTF_ALL_MSK (BIT(0)|BIT(1)|BIT(2)|BIT(3))
|
||||
|
||||
/* The value of fab_msk: 4 bits */
|
||||
#define PWR_FAB_TSMC_MSK BIT(0)
|
||||
#define PWR_FAB_UMC_MSK BIT(1)
|
||||
#define PWR_FAB_ALL_MSK (BIT(0)|BIT(1)|BIT(2)|BIT(3))
|
||||
|
||||
/* The value of cut_msk: 8 bits */
|
||||
#define PWR_CUT_TESTCHIP_MSK BIT(0)
|
||||
#define PWR_CUT_A_MSK BIT(1)
|
||||
#define PWR_CUT_B_MSK BIT(2)
|
||||
#define PWR_CUT_C_MSK BIT(3)
|
||||
#define PWR_CUT_D_MSK BIT(4)
|
||||
#define PWR_CUT_E_MSK BIT(5)
|
||||
#define PWR_CUT_F_MSK BIT(6)
|
||||
#define PWR_CUT_G_MSK BIT(7)
|
||||
#define PWR_CUT_ALL_MSK 0xFF
|
||||
|
||||
|
||||
enum pwrseq_cmd_delat_unit {
|
||||
PWRSEQ_DELAY_US,
|
||||
PWRSEQ_DELAY_MS,
|
||||
};
|
||||
|
||||
struct wl_pwr_cfg {
|
||||
u16 offset;
|
||||
u8 cut_msk;
|
||||
u8 fab_msk:4;
|
||||
u8 interface_msk:4;
|
||||
u8 base:4;
|
||||
u8 cmd:4;
|
||||
u8 msk;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
#define GET_PWR_CFG_OFFSET(__PWR_CMD) __PWR_CMD.offset
|
||||
#define GET_PWR_CFG_CUT_MASK(__PWR_CMD) __PWR_CMD.cut_msk
|
||||
#define GET_PWR_CFG_FAB_MASK(__PWR_CMD) __PWR_CMD.fab_msk
|
||||
#define GET_PWR_CFG_INTF_MASK(__PWR_CMD) __PWR_CMD.interface_msk
|
||||
#define GET_PWR_CFG_BASE(__PWR_CMD) __PWR_CMD.base
|
||||
#define GET_PWR_CFG_CMD(__PWR_CMD) __PWR_CMD.cmd
|
||||
#define GET_PWR_CFG_MASK(__PWR_CMD) __PWR_CMD.msk
|
||||
#define GET_PWR_CFG_VALUE(__PWR_CMD) __PWR_CMD.value
|
||||
|
||||
u8 rtl88eu_pwrseqcmdparsing(struct adapter *padapter, u8 cut_vers, u8 fab_vers,
|
||||
u8 ifacetype, struct wl_pwr_cfg pwrcfgCmd[]);
|
||||
|
||||
#endif
|
|
@ -28,27 +28,22 @@ 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_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);
|
||||
void rtw_os_recv_resource_free(struct recv_priv *precvpriv);
|
||||
int rtw_os_recv_resource_alloc(struct adapter *adapt,
|
||||
struct recv_frame *recvfr);
|
||||
|
||||
int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
|
||||
int rtw_os_recvbuf_resource_free(struct adapter *adapt, struct recv_buf *buf);
|
||||
|
||||
void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf);
|
||||
|
||||
void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
|
||||
int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb);
|
||||
int _netdev_open(struct net_device *pnetdev);
|
||||
int netdev_open(struct net_device *pnetdev);
|
||||
int netdev_close(struct net_device *pnetdev);
|
||||
|
|
11
include/rf.h
Normal file
11
include/rf.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#define RF6052_MAX_TX_PWR 0x3F
|
||||
#define RF6052_MAX_REG 0x3F
|
||||
|
||||
void rtl88eu_phy_rf6052_set_bandwidth(struct adapter *adapt,
|
||||
enum ht_channel_width bandwidth);
|
||||
void rtl88eu_phy_rf6052_set_cck_txpower(struct adapter *adapt,
|
||||
u8 *powerlevel);
|
||||
void rtl88eu_phy_rf6052_set_ofdm_txpower(struct adapter *adapt,
|
||||
u8 *powerlevel_ofdm,
|
||||
u8 *powerlevel_bw20,
|
||||
u8 *powerlevel_bw40, u8 channel);
|
|
@ -112,11 +112,6 @@ u8 rtl8188e_set_raid_cmd(struct adapter *padapter, u32 mask);
|
|||
void rtl8188e_Add_RateATid(struct adapter *padapter, u32 bitmap, u8 arg,
|
||||
u8 rssi_level);
|
||||
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state);
|
||||
#endif /* CONFIG_88EU_P2P */
|
||||
|
||||
void CheckFwRsvdPageContent(struct adapter *adapt);
|
||||
void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt);
|
||||
|
||||
#endif/* __RTL8188E_CMD_H__ */
|
||||
|
|
|
@ -51,7 +51,6 @@ struct dm_priv {
|
|||
};
|
||||
|
||||
void rtl8188e_init_dm_priv(struct adapter *adapt);
|
||||
void rtl8188e_deinit_dm_priv(struct adapter *adapt);
|
||||
void rtl8188e_InitHalDm(struct adapter *adapt);
|
||||
void rtl8188e_HalDmWatchDog(struct adapter *adapt);
|
||||
|
||||
|
|
|
@ -25,15 +25,13 @@
|
|||
#include "rtl8188e_spec.h"
|
||||
#include "Hal8188EPhyReg.h"
|
||||
#include "Hal8188EPhyCfg.h"
|
||||
#include "rtl8188e_rf.h"
|
||||
#include "rtl8188e_dm.h"
|
||||
#include "rtl8188e_recv.h"
|
||||
#include "rtl8188e_xmit.h"
|
||||
#include "rtl8188e_cmd.h"
|
||||
#include "Hal8188EPwrSeq.h"
|
||||
#include "rtl8188e_sreset.h"
|
||||
#include "pwrseq.h"
|
||||
#include "rtw_efuse.h"
|
||||
|
||||
#include "rtw_sreset.h"
|
||||
#include "odm_precomp.h"
|
||||
|
||||
/* Fw Array */
|
||||
|
@ -71,45 +69,10 @@
|
|||
#define MAX_PAGE_SIZE 4096 /* @ page : 4k bytes */
|
||||
|
||||
#define IS_FW_HEADER_EXIST(_pFwHdr) \
|
||||
((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x92C0 || \
|
||||
(le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88C0 || \
|
||||
(le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x2300 || \
|
||||
(le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88E0)
|
||||
|
||||
/* This structure must be careful with byte-ordering */
|
||||
|
||||
struct rt_firmware_hdr {
|
||||
/* 8-byte alinment required */
|
||||
/* LONG WORD 0 ---- */
|
||||
__le16 Signature; /* 92C0: test chip; 92C,
|
||||
* 88C0: test chip; 88C1: MP A-cut;
|
||||
* 92C1: MP A-cut */
|
||||
u8 Category; /* AP/NIC and USB/PCI */
|
||||
u8 Function; /* Reserved for different FW function
|
||||
* indcation, for further use when
|
||||
* driver needs to download different
|
||||
* FW for different conditions */
|
||||
__le16 Version; /* FW Version */
|
||||
u8 Subversion; /* FW Subversion, default 0x00 */
|
||||
u16 Rsvd1;
|
||||
|
||||
/* LONG WORD 1 ---- */
|
||||
u8 Month; /* Release time Month field */
|
||||
u8 Date; /* Release time Date field */
|
||||
u8 Hour; /* Release time Hour field */
|
||||
u8 Minute; /* Release time Minute field */
|
||||
__le16 RamCodeSize; /* The size of RAM code */
|
||||
u8 Foundry;
|
||||
u8 Rsvd2;
|
||||
|
||||
/* LONG WORD 2 ---- */
|
||||
__le32 SvnIdx; /* The SVN entry index */
|
||||
u32 Rsvd3;
|
||||
|
||||
/* LONG WORD 3 ---- */
|
||||
u32 Rsvd4;
|
||||
u32 Rsvd5;
|
||||
};
|
||||
((le16_to_cpu(_pFwHdr->signature)&0xFFF0) == 0x92C0 || \
|
||||
(le16_to_cpu(_pFwHdr->signature)&0xFFF0) == 0x88C0 || \
|
||||
(le16_to_cpu(_pFwHdr->signature)&0xFFF0) == 0x2300 || \
|
||||
(le16_to_cpu(_pFwHdr->signature)&0xFFF0) == 0x88E0)
|
||||
|
||||
#define DRIVER_EARLY_INT_TIME 0x05
|
||||
#define BCN_DMA_ATIME_INT_TIME 0x02
|
||||
|
@ -241,10 +204,10 @@ enum rt_regulator_mode {
|
|||
|
||||
struct hal_data_8188e {
|
||||
struct HAL_VERSION VersionID;
|
||||
enum rt_multi_func MultiFunc; /* For multi-function consideration. */
|
||||
enum rt_regulator_mode RegulatorMode; /* switching regulator or LDO */
|
||||
u16 CustomerID;
|
||||
|
||||
u8 *pfirmware;
|
||||
u32 fwsize;
|
||||
u16 FirmwareVersion;
|
||||
u16 FirmwareVersionRev;
|
||||
u16 FirmwareSubVersion;
|
||||
|
@ -387,10 +350,6 @@ struct hal_data_8188e {
|
|||
|
||||
u16 EfuseUsedBytes;
|
||||
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
struct P2P_PS_Offload_t p2p_ps_offload;
|
||||
#endif
|
||||
|
||||
/* Auto FSM to Turn On, include clock, isolation, power control
|
||||
* for MAC only */
|
||||
u8 bMacPwrCtrlOn;
|
||||
|
@ -425,7 +384,6 @@ struct hal_data_8188e {
|
|||
(GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS)
|
||||
|
||||
/* rtl8188e_hal_init.c */
|
||||
s32 rtl8188e_FirmwareDownload(struct adapter *padapter);
|
||||
void _8051Reset88E(struct adapter *padapter);
|
||||
void rtl8188e_InitializeFirmwareVars(struct adapter *padapter);
|
||||
|
||||
|
@ -445,9 +403,9 @@ void rtl8188e_EfuseParseChnlPlan(struct adapter *padapter, u8 *hwinfo,
|
|||
bool AutoLoadFail);
|
||||
void Hal_EfuseParseCustomerID88E(struct adapter *padapter, u8 *hwinfo,
|
||||
bool AutoLoadFail);
|
||||
void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter,u8 *PROMContent,
|
||||
void Hal_ReadAntennaDiversity88E(struct adapter *pAdapter, u8 *PROMContent,
|
||||
bool AutoLoadFail);
|
||||
void Hal_ReadThermalMeter_88E(struct adapter * dapter, u8 *PROMContent,
|
||||
void Hal_ReadThermalMeter_88E(struct adapter *dapter, u8 *PROMContent,
|
||||
bool AutoloadFail);
|
||||
void Hal_EfuseParseXtal_8188E(struct adapter *pAdapter, u8 *hwinfo,
|
||||
bool AutoLoadFail);
|
||||
|
@ -456,21 +414,16 @@ void Hal_EfuseParseBoardType88E(struct adapter *pAdapter, u8 *hwinfo,
|
|||
void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo,
|
||||
bool AutoLoadFail);
|
||||
|
||||
bool HalDetectPwrDownMode88E(struct adapter *Adapter);
|
||||
|
||||
void Hal_InitChannelPlan(struct adapter *padapter);
|
||||
void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
|
||||
|
||||
/* register */
|
||||
void SetBcnCtrlReg(struct adapter *padapter, u8 SetBits, u8 ClearBits);
|
||||
|
||||
void rtl8188e_clone_haldata(struct adapter *dst, struct adapter *src);
|
||||
void rtl8188e_start_thread(struct adapter *padapter);
|
||||
void rtl8188e_stop_thread(struct adapter *padapter);
|
||||
|
||||
void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int len);
|
||||
s32 iol_execute(struct adapter *padapter, u8 control);
|
||||
void iol_mode_enable(struct adapter *padapter, u8 enable);
|
||||
s32 rtl8188e_iol_efuse_patch(struct adapter *padapter);
|
||||
void rtw_cancel_all_timer(struct adapter *padapter);
|
||||
void _ps_open_RF(struct adapter *adapt);
|
||||
|
||||
#endif /* __RTL8188E_HAL_H__ */
|
||||
|
|
|
@ -56,14 +56,14 @@ enum rx_packet_type {
|
|||
};
|
||||
|
||||
#define INTERRUPT_MSG_FORMAT_LEN 60
|
||||
void rtl8188eu_init_recvbuf(struct adapter *padapter, struct recv_buf *buf);
|
||||
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_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_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 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(struct recv_frame *fra, struct phy_stat *phy);
|
||||
void update_recvframe_attrib_88e(struct recv_frame *fra,
|
||||
struct recv_stat *stat);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
#define DISABLE_TRXPKT_BUF_ACCESS 0x0
|
||||
|
||||
|
||||
/* 0x0000h ~ 0x00FFh System Configuration */
|
||||
/* 0x0000h ~ 0x00FFh System Configuration */
|
||||
#define REG_SYS_ISO_CTRL 0x0000
|
||||
#define REG_SYS_FUNC_EN 0x0002
|
||||
#define REG_APS_FSMCO 0x0004
|
||||
|
@ -142,7 +142,7 @@
|
|||
|
||||
#define REG_MAC_PHY_CTRL_NORMAL 0x00f8
|
||||
|
||||
/* 0x0100h ~ 0x01FFh MACTOP General Configuration */
|
||||
/* 0x0100h ~ 0x01FFh MACTOP General Configuration */
|
||||
#define REG_CR 0x0100
|
||||
#define REG_PBP 0x0104
|
||||
#define REG_PKT_BUFF_ACCESS_CTRL 0x0106
|
||||
|
@ -188,7 +188,7 @@
|
|||
|
||||
#define REG_LLT_INIT 0x01E0
|
||||
|
||||
/* 0x0200h ~ 0x027Fh TXDMA Configuration */
|
||||
/* 0x0200h ~ 0x027Fh TXDMA Configuration */
|
||||
#define REG_RQPN 0x0200
|
||||
#define REG_FIFOPAGE 0x0204
|
||||
#define REG_TDECTRL 0x0208
|
||||
|
@ -196,12 +196,12 @@
|
|||
#define REG_TXDMA_STATUS 0x0210
|
||||
#define REG_RQPN_NPQ 0x0214
|
||||
|
||||
/* 0x0280h ~ 0x02FFh RXDMA Configuration */
|
||||
/* 0x0280h ~ 0x02FFh RXDMA Configuration */
|
||||
#define REG_RXDMA_AGG_PG_TH 0x0280
|
||||
#define REG_RXPKT_NUM 0x0284
|
||||
#define REG_RXDMA_STATUS 0x0288
|
||||
|
||||
/* 0x0300h ~ 0x03FFh PCIe */
|
||||
/* 0x0300h ~ 0x03FFh PCIe */
|
||||
#define REG_PCIE_CTRL_REG 0x0300
|
||||
#define REG_INT_MIG 0x0304 /* Interrupt Migration */
|
||||
#define REG_BCNQ_DESA 0x0308 /* TX Beacon Descr Address */
|
||||
|
@ -222,7 +222,7 @@
|
|||
#define REG_PCIE_HISR 0x03A0
|
||||
|
||||
/* spec version 11 */
|
||||
/* 0x0400h ~ 0x047Fh Protocol Configuration */
|
||||
/* 0x0400h ~ 0x047Fh Protocol Configuration */
|
||||
#define REG_VOQ_INFORMATION 0x0400
|
||||
#define REG_VIQ_INFORMATION 0x0404
|
||||
#define REG_BEQ_INFORMATION 0x0408
|
||||
|
@ -276,7 +276,7 @@
|
|||
#define REG_TX_RPT_TIME 0x04F0 /* 2 byte */
|
||||
#define REG_DUMMY 0x04FC
|
||||
|
||||
/* 0x0500h ~ 0x05FFh EDCA Configuration */
|
||||
/* 0x0500h ~ 0x05FFh EDCA Configuration */
|
||||
#define REG_EDCA_VO_PARAM 0x0500
|
||||
#define REG_EDCA_VI_PARAM 0x0504
|
||||
#define REG_EDCA_BE_PARAM 0x0508
|
||||
|
@ -294,16 +294,16 @@
|
|||
#define REG_DIS_TXREQ_CLR 0x0523
|
||||
#define REG_RD_CTRL 0x0524
|
||||
/* Format for offset 540h-542h: */
|
||||
/* [3:0]: TBTT prohibit setup in unit of 32us. The time for HW getting
|
||||
/* [3:0]: TBTT prohibit setup in unit of 32us. The time for HW getting
|
||||
* beacon content before TBTT. */
|
||||
/* [7:4]: Reserved. */
|
||||
/* [19:8]: TBTT prohibit hold in unit of 32us. The time for HW holding
|
||||
/* [7:4]: Reserved. */
|
||||
/* [19:8]: TBTT prohibit hold in unit of 32us. The time for HW holding
|
||||
* to send the beacon packet. */
|
||||
/* [23:20]: Reserved */
|
||||
/* [23:20]: Reserved */
|
||||
/* Description: */
|
||||
/* | */
|
||||
/* | */
|
||||
/* |<--Setup--|--Hold------------>| */
|
||||
/* --------------|---------------------- */
|
||||
/* --------------|---------------------- */
|
||||
/* | */
|
||||
/* TBTT */
|
||||
/* Note: We cannot update beacon content to HW or send any AC packets during
|
||||
|
@ -335,7 +335,7 @@
|
|||
#define REG_FW_RESET_TSF_CNT_0 0x05FD
|
||||
#define REG_FW_BCN_DIS_CNT 0x05FE
|
||||
|
||||
/* 0x0600h ~ 0x07FFh WMAC Configuration */
|
||||
/* 0x0600h ~ 0x07FFh WMAC Configuration */
|
||||
#define REG_APSD_CTRL 0x0600
|
||||
#define REG_BWOPMODE 0x0603
|
||||
#define REG_TCR 0x0604
|
||||
|
@ -382,7 +382,7 @@
|
|||
#define _RXERR_RPT_SEL(type) ((type) << 28)
|
||||
|
||||
/* Note: */
|
||||
/* The NAV upper value is very important to WiFi 11n 5.2.3 NAV test.
|
||||
/* The NAV upper value is very important to WiFi 11n 5.2.3 NAV test.
|
||||
* The default value is always too small, but the WiFi TestPlan test
|
||||
* by 25,000 microseconds of NAV through sending CTS in the air.
|
||||
* We must update this value greater than 25,000 microseconds to pass
|
||||
|
@ -422,7 +422,7 @@
|
|||
#define REG_MACID1 0x0700
|
||||
#define REG_BSSID1 0x0708
|
||||
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
#define REG_USB_INFO 0xFE17
|
||||
#define REG_USB_SPECIAL_OPTION 0xFE55
|
||||
#define REG_USB_DMA_AGG_TO 0xFE5B
|
||||
|
@ -689,13 +689,13 @@ Current IOREG MAP
|
|||
0x0600h ~ 0x07FFh WMAC Configuration (512 Bytes)
|
||||
0x2000h ~ 0x3FFFh 8051 FW Download Region (8196 Bytes)
|
||||
*/
|
||||
/* 8192C (TXPAUSE) transmission pause (Offset 0x522, 8 bits) */
|
||||
/* 8192C (TXPAUSE) transmission pause (Offset 0x522, 8 bits) */
|
||||
/* Note: */
|
||||
/* The bits of stopping AC(VO/VI/BE/BK) queue in datasheet
|
||||
/* The bits of stopping AC(VO/VI/BE/BK) queue in datasheet
|
||||
* RTL8192S/RTL8192C are wrong, */
|
||||
/* the correct arragement is VO - Bit0, VI - Bit1, BE - Bit2,
|
||||
/* the correct arragement is VO - Bit0, VI - Bit1, BE - Bit2,
|
||||
* and BK - Bit3. */
|
||||
/* 8723 and 88E may be not correct either in the earlier version. */
|
||||
/* 8723 and 88E may be not correct either in the earlier version. */
|
||||
#define StopBecon BIT6
|
||||
#define StopHigh BIT5
|
||||
#define StopMgt BIT4
|
||||
|
@ -733,7 +733,7 @@ Current IOREG MAP
|
|||
#define RCR_MXDMA_OFFSET 8
|
||||
#define RCR_FIFO_OFFSET 13
|
||||
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
#define REG_USB_INFO 0xFE17
|
||||
#define REG_USB_SPECIAL_OPTION 0xFE55
|
||||
#define REG_USB_DMA_AGG_TO 0xFE5B
|
||||
|
@ -743,7 +743,7 @@ Current IOREG MAP
|
|||
#define REG_USB_HRPWM 0xFE58
|
||||
#define REG_USB_HCPWM 0xFE57
|
||||
/* 8192C Regsiter Bit and Content definition */
|
||||
/* 0x0000h ~ 0x00FFh System Configuration */
|
||||
/* 0x0000h ~ 0x00FFh System Configuration */
|
||||
|
||||
/* 2 SYS_ISO_CTRL */
|
||||
#define ISO_MD2PP BIT(0)
|
||||
|
@ -914,7 +914,7 @@ Current IOREG MAP
|
|||
/* 2SYS_CFG */
|
||||
#define RTL_ID BIT(23) /* TestChip ID, 1:Test(RLE); 0:MP(RL) */
|
||||
|
||||
/* 0x0100h ~ 0x01FFh MACTOP General Configuration */
|
||||
/* 0x0100h ~ 0x01FFh MACTOP General Configuration */
|
||||
|
||||
/* 2 Function Enable Registers */
|
||||
/* 2 CR */
|
||||
|
@ -975,9 +975,9 @@ Current IOREG MAP
|
|||
#define _TXDMA_HIQ_MAP(x) (((x)&0x3) << 14)
|
||||
#define _TXDMA_MGQ_MAP(x) (((x)&0x3) << 12)
|
||||
#define _TXDMA_BKQ_MAP(x) (((x)&0x3) << 10)
|
||||
#define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8 )
|
||||
#define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6 )
|
||||
#define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4 )
|
||||
#define _TXDMA_BEQ_MAP(x) (((x)&0x3) << 8)
|
||||
#define _TXDMA_VIQ_MAP(x) (((x)&0x3) << 6)
|
||||
#define _TXDMA_VOQ_MAP(x) (((x)&0x3) << 4)
|
||||
|
||||
#define QUEUE_LOW 1
|
||||
#define QUEUE_NORMAL 2
|
||||
|
@ -995,7 +995,7 @@ Current IOREG MAP
|
|||
#define _LLT_OP(x) (((x) & 0x3) << 30)
|
||||
#define _LLT_OP_VALUE(x) (((x) >> 30) & 0x3)
|
||||
|
||||
/* 0x0200h ~ 0x027Fh TXDMA Configuration */
|
||||
/* 0x0200h ~ 0x027Fh TXDMA Configuration */
|
||||
/* 2RQPN */
|
||||
#define _HPQ(x) ((x) & 0xFF)
|
||||
#define _LPQ(x) (((x) & 0xFF) << 8)
|
||||
|
@ -1019,7 +1019,7 @@ Current IOREG MAP
|
|||
/* 2 TXDMA_OFFSET_CHK */
|
||||
#define DROP_DATA_EN BIT(9)
|
||||
|
||||
/* 0x0280h ~ 0x028Bh RX DMA Configuration */
|
||||
/* 0x0280h ~ 0x028Bh RX DMA Configuration */
|
||||
|
||||
/* REG_RXDMA_CONTROL, 0x0286h */
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ Current IOREG MAP
|
|||
#define RXDMA_IDLE BIT(17)
|
||||
#define RW_RELEASE_EN BIT(18)
|
||||
|
||||
/* 0x0400h ~ 0x047Fh Protocol Configuration */
|
||||
/* 0x0400h ~ 0x047Fh Protocol Configuration */
|
||||
/* 2 FWHW_TXQ_CTRL */
|
||||
#define EN_AMPDU_RTY_NEW BIT(7)
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ Current IOREG MAP
|
|||
#define RETRY_LIMIT_SHORT_SHIFT 8
|
||||
#define RETRY_LIMIT_LONG_SHIFT 0
|
||||
|
||||
/* 0x0500h ~ 0x05FFh EDCA Configuration */
|
||||
/* 0x0500h ~ 0x05FFh EDCA Configuration */
|
||||
|
||||
/* 2 EDCA setting */
|
||||
#define AC_PARAM_TXOP_LIMIT_OFFSET 16
|
||||
|
@ -1071,7 +1071,7 @@ Current IOREG MAP
|
|||
#define AcmHw_ViqStatus BIT(5)
|
||||
#define AcmHw_VoqStatus BIT(6)
|
||||
|
||||
/* 0x0600h ~ 0x07FFh WMAC Configuration */
|
||||
/* 0x0600h ~ 0x07FFh WMAC Configuration */
|
||||
/* 2APSD_CTRL */
|
||||
#define APSDOFF BIT(6)
|
||||
#define APSDOFF_STATUS BIT(7)
|
||||
|
@ -1128,7 +1128,7 @@ Current IOREG MAP
|
|||
#define SCR_TXBCUSEDK BIT(6) /* Force Tx Bcast pkt Use Default Key */
|
||||
#define SCR_RXBCUSEDK BIT(7) /* Force Rx Bcast pkt Use Default Key */
|
||||
|
||||
/* RTL8188E SDIO Configuration */
|
||||
/* RTL8188E SDIO Configuration */
|
||||
|
||||
/* I/O bus domain address mapping */
|
||||
#define SDIO_LOCAL_BASE 0x10250000
|
||||
|
@ -1264,7 +1264,7 @@ Current IOREG MAP
|
|||
#define SDIO_TX_FREE_PG_QUEUE 4
|
||||
#define SDIO_TX_FIFO_PAGE_SZ 128
|
||||
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
/* 0xFE00h ~ 0xFE55h USB Configuration */
|
||||
|
||||
/* 2 USB Information (0xFE17) */
|
||||
#define USB_IS_HIGH_SPEED 0
|
||||
|
@ -1331,7 +1331,7 @@ Current IOREG MAP
|
|||
|
||||
/* 8192C EEPROM/EFUSE share register definition. */
|
||||
|
||||
/* EEPROM/Efuse PG Offset for 88EE/88EU/88ES */
|
||||
/* EEPROM/Efuse PG Offset for 88EE/88EU/88ES */
|
||||
#define EEPROM_TX_PWR_INX_88E 0x10
|
||||
|
||||
#define EEPROM_ChannelPlan_88E 0xB8
|
||||
|
@ -1362,7 +1362,7 @@ Current IOREG MAP
|
|||
/* RTL88ES */
|
||||
#define EEPROM_MAC_ADDR_88ES 0x11A
|
||||
|
||||
/* EEPROM/Efuse Value Type */
|
||||
/* EEPROM/Efuse Value Type */
|
||||
#define EETYPE_TX_PWR 0x0
|
||||
|
||||
/* Default Value for EEPROM or EFUSE!!! */
|
||||
|
|
|
@ -159,7 +159,6 @@ struct txrpt_ccx_88e {
|
|||
void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
|
||||
u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
|
||||
s32 rtl8188eu_init_xmit_priv(struct adapter *padapter);
|
||||
void rtl8188eu_free_xmit_priv(struct adapter *padapter);
|
||||
s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
|
||||
s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
|
||||
s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
|
||||
|
|
|
@ -24,16 +24,11 @@
|
|||
#include <rtw_rf.h>
|
||||
#include <rtw_led.h>
|
||||
|
||||
#define C2H_MEM_SZ (16*1024)
|
||||
|
||||
#include <osdep_service.h>
|
||||
#include <ieee80211.h> /* <ieee80211/ieee80211.h> */
|
||||
|
||||
#define FREE_CMDOBJ_SZ 128
|
||||
|
||||
#define MAX_CMDSZ 1024
|
||||
#define MAX_RSPSZ 512
|
||||
#define MAX_EVTSZ 1024
|
||||
|
||||
#define CMDBUFF_ALIGN_SZ 512
|
||||
|
||||
|
@ -52,32 +47,13 @@ struct cmd_priv {
|
|||
struct semaphore cmd_queue_sema;
|
||||
struct semaphore terminate_cmdthread_sema;
|
||||
struct __queue cmd_queue;
|
||||
u8 cmd_seq;
|
||||
u8 *cmd_buf; /* shall be non-paged, and 4 bytes aligned */
|
||||
u8 *cmd_allocated_buf;
|
||||
u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */
|
||||
u8 *rsp_allocated_buf;
|
||||
u32 cmd_issued_cnt;
|
||||
u32 cmd_done_cnt;
|
||||
u32 rsp_cnt;
|
||||
u8 cmdthd_running;
|
||||
struct adapter *padapter;
|
||||
};
|
||||
|
||||
struct evt_priv {
|
||||
struct work_struct c2h_wk;
|
||||
bool c2h_wk_alive;
|
||||
struct rtw_cbuf *c2h_queue;
|
||||
#define C2H_QUEUE_MAX_LEN 10
|
||||
ATOMIC_T event_seq;
|
||||
u8 *evt_buf; /* shall be non-paged, and 4 bytes aligned */
|
||||
u8 *evt_allocated_buf;
|
||||
u32 evt_done_cnt;
|
||||
};
|
||||
|
||||
#define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
|
||||
do {\
|
||||
_rtw_init_listhead(&pcmd->list);\
|
||||
INIT_LIST_HEAD(&pcmd->list);\
|
||||
pcmd->cmdcode = code;\
|
||||
pcmd->parmbuf = (u8 *)(pparm);\
|
||||
pcmd->cmdsz = sizeof(*pparm);\
|
||||
|
@ -85,31 +61,13 @@ do {\
|
|||
pcmd->rspsz = 0;\
|
||||
} while (0)
|
||||
|
||||
struct c2h_evt_hdr {
|
||||
u8 id:4;
|
||||
u8 plen:4;
|
||||
u8 seq;
|
||||
u8 payload[0];
|
||||
};
|
||||
|
||||
#define c2h_evt_exist(c2h_evt) ((c2h_evt)->id || (c2h_evt)->plen)
|
||||
|
||||
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj);
|
||||
struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
|
||||
struct cmd_obj *rtw_dequeue_cmd(struct __queue *queue);
|
||||
void rtw_free_cmd_obj(struct cmd_obj *pcmd);
|
||||
|
||||
int rtw_cmd_thread(void *context);
|
||||
|
||||
u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
|
||||
void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv);
|
||||
|
||||
u32 rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
||||
void rtw_free_evt_priv(struct evt_priv *pevtpriv);
|
||||
void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv);
|
||||
void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType);
|
||||
#endif /* CONFIG_88EU_P2P */
|
||||
int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv);
|
||||
|
||||
enum rtw_drvextra_cmd_id {
|
||||
NONE_WK_CID,
|
||||
|
@ -146,39 +104,6 @@ enum RFINTFS {
|
|||
/*
|
||||
Caller Mode: Infra, Ad-HoC(C)
|
||||
|
||||
Notes: To enter USB suspend mode
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct usb_suspend_parm {
|
||||
u32 action;/* 1: sleep, 0:resume */
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-HoC
|
||||
|
||||
Notes: To join a known BSS.
|
||||
|
||||
Command-Event Mode
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-Hoc
|
||||
|
||||
Notes: To join the specified bss
|
||||
|
||||
Command Event Mode
|
||||
|
||||
*/
|
||||
struct joinbss_parm {
|
||||
struct wlan_bssid_ex network;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Infra, Ad-HoC(C)
|
||||
|
||||
Notes: To disconnect the current associated BSS
|
||||
|
||||
Command Mode
|
||||
|
@ -188,17 +113,6 @@ struct disconnect_parm {
|
|||
u32 deauth_timeout_ms;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: AP, Ad-HoC(M)
|
||||
|
||||
Notes: To create a BSS
|
||||
|
||||
Command Mode
|
||||
*/
|
||||
struct createbss_parm {
|
||||
struct wlan_bssid_ex network;
|
||||
};
|
||||
|
||||
struct setopmode_parm {
|
||||
u8 mode;
|
||||
u8 rsvd[3];
|
||||
|
@ -328,161 +242,6 @@ struct setstapwrstate_parm {
|
|||
u8 hwaddr[6];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To setup the basic rate of RTL8711
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setbasicrate_parm {
|
||||
u8 basicrates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To read the current basic rate
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getbasicrate_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getbasicrate_rsp {
|
||||
u8 basicrates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To setup the data rate of RTL8711
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setdatarate_parm {
|
||||
u8 mac_id;
|
||||
u8 datarates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To read the current data rate
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getdatarate_parm {
|
||||
u32 rsvd;
|
||||
|
||||
};
|
||||
struct getdatarate_rsp {
|
||||
u8 datarates[NumRates];
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
AP: AP can use the info for the contents of beacon frame
|
||||
Infra: STA can use the info when sitesurveying
|
||||
Ad-HoC(M): Like AP
|
||||
Ad-HoC(C): Like STA
|
||||
|
||||
Notes: To set the phy capability of the NIC
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
|
||||
struct setphyinfo_parm {
|
||||
struct regulatory_class class_sets[NUM_REGULATORYS];
|
||||
u8 status;
|
||||
};
|
||||
|
||||
struct getphyinfo_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getphyinfo_rsp {
|
||||
struct regulatory_class class_sets[NUM_REGULATORYS];
|
||||
u8 status;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To set the channel/modem/band
|
||||
This command will be used when channel/modem/band is changed.
|
||||
|
||||
Command Mode
|
||||
|
||||
*/
|
||||
struct setphy_parm {
|
||||
u8 rfchannel;
|
||||
u8 modem;
|
||||
};
|
||||
|
||||
/*
|
||||
Caller Mode: Any
|
||||
|
||||
Notes: To get the current setting of channel/modem/band
|
||||
|
||||
Command-Rsp Mode
|
||||
|
||||
*/
|
||||
struct getphy_parm {
|
||||
u32 rsvd;
|
||||
|
||||
};
|
||||
struct getphy_rsp {
|
||||
u8 rfchannel;
|
||||
u8 modem;
|
||||
};
|
||||
|
||||
struct readBB_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readBB_rsp {
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct readTSSI_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readTSSI_rsp {
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct writeBB_parm {
|
||||
u8 offset;
|
||||
u8 value;
|
||||
};
|
||||
|
||||
struct readRF_parm {
|
||||
u8 offset;
|
||||
};
|
||||
struct readRF_rsp {
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct writeRF_parm {
|
||||
u32 offset;
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct getrfintfs_parm {
|
||||
u8 rfintfs;
|
||||
};
|
||||
|
||||
struct Tx_Beacon_param
|
||||
{
|
||||
struct wlan_bssid_ex network;
|
||||
};
|
||||
|
||||
/*
|
||||
Notes: This command is used for H2C/C2H loopback testing
|
||||
|
||||
|
@ -541,167 +300,6 @@ struct drvextra_cmd_parm {
|
|||
unsigned char *pbuf;
|
||||
};
|
||||
|
||||
/*------------------- Below are used for RF/BB tunning ---------------------*/
|
||||
|
||||
struct setantenna_parm {
|
||||
u8 tx_antset;
|
||||
u8 rx_antset;
|
||||
u8 tx_antenna;
|
||||
u8 rx_antenna;
|
||||
};
|
||||
|
||||
struct enrateadaptive_parm {
|
||||
u32 en;
|
||||
};
|
||||
|
||||
struct settxagctbl_parm {
|
||||
u32 txagc[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct gettxagctbl_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
struct gettxagctbl_rsp {
|
||||
u32 txagc[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setagcctrl_parm {
|
||||
u32 agcctrl; /* 0: pure hw, 1: fw */
|
||||
};
|
||||
|
||||
struct setssup_parm {
|
||||
u32 ss_ForceUp[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssup_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getssup_rsp {
|
||||
u8 ss_ForceUp[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setssdlevel_parm {
|
||||
u8 ss_DLevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssdlevel_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getssdlevel_rsp {
|
||||
u8 ss_DLevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setssulevel_parm {
|
||||
u8 ss_ULevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getssulevel_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getssulevel_rsp {
|
||||
u8 ss_ULevel[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setcountjudge_parm {
|
||||
u8 count_judge[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct getcountjudge_parm {
|
||||
u32 rsvd;
|
||||
};
|
||||
|
||||
struct getcountjudge_rsp {
|
||||
u8 count_judge[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct setratable_parm {
|
||||
u8 ss_ForceUp[NumRates];
|
||||
u8 ss_ULevel[NumRates];
|
||||
u8 ss_DLevel[NumRates];
|
||||
u8 count_judge[NumRates];
|
||||
};
|
||||
|
||||
struct getratable_parm {
|
||||
uint rsvd;
|
||||
};
|
||||
|
||||
struct getratable_rsp {
|
||||
u8 ss_ForceUp[NumRates];
|
||||
u8 ss_ULevel[NumRates];
|
||||
u8 ss_DLevel[NumRates];
|
||||
u8 count_judge[NumRates];
|
||||
};
|
||||
|
||||
/* to get TX,RX retry count */
|
||||
|
||||
struct gettxretrycnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
|
||||
struct gettxretrycnt_rsp {
|
||||
unsigned long tx_retrycnt;
|
||||
};
|
||||
|
||||
struct getrxretrycnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
|
||||
struct getrxretrycnt_rsp {
|
||||
unsigned long rx_retrycnt;
|
||||
};
|
||||
|
||||
/* to get BCNOK,BCNERR count */
|
||||
struct getbcnokcnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
|
||||
struct getbcnokcnt_rsp {
|
||||
unsigned long bcnokcnt;
|
||||
};
|
||||
|
||||
struct getbcnerrcnt_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
|
||||
struct getbcnerrcnt_rsp {
|
||||
unsigned long bcnerrcnt;
|
||||
};
|
||||
|
||||
/* to get current TX power level */
|
||||
struct getcurtxpwrlevel_parm {
|
||||
unsigned int rsvd;
|
||||
};
|
||||
struct getcurtxpwrlevel_rspi {
|
||||
unsigned short tx_power;
|
||||
};
|
||||
|
||||
struct setprobereqextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setassocreqextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setproberspextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct setassocrspextraie_parm {
|
||||
unsigned char e_id;
|
||||
unsigned char ie_len;
|
||||
unsigned char ie[0];
|
||||
};
|
||||
|
||||
struct addBaReq_parm {
|
||||
unsigned int tid;
|
||||
u8 addr[ETH_ALEN];
|
||||
|
@ -715,30 +313,10 @@ struct set_ch_parm {
|
|||
};
|
||||
|
||||
/*H2C Handler index: 59 */
|
||||
struct SetChannelPlan_param
|
||||
{
|
||||
struct SetChannelPlan_param {
|
||||
u8 channel_plan;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 60 */
|
||||
struct LedBlink_param
|
||||
{
|
||||
struct LED_871x *pLed;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 61 */
|
||||
struct SetChannelSwitch_param
|
||||
{
|
||||
u8 new_ch_no;
|
||||
};
|
||||
|
||||
/*H2C Handler index: 62 */
|
||||
struct TDLSoption_param
|
||||
{
|
||||
u8 addr[ETH_ALEN];
|
||||
u8 option;
|
||||
};
|
||||
|
||||
#define GEN_CMD_CODE(cmd) cmd ## _CMD_
|
||||
|
||||
/*
|
||||
|
@ -752,75 +330,46 @@ Result:
|
|||
|
||||
*/
|
||||
|
||||
#define H2C_RSP_OFFSET 512
|
||||
|
||||
#define H2C_SUCCESS 0x00
|
||||
#define H2C_SUCCESS_RSP 0x01
|
||||
#define H2C_DUPLICATED 0x02
|
||||
#define H2C_DROPPED 0x03
|
||||
#define H2C_PARAMETERS_ERROR 0x04
|
||||
#define H2C_REJECTED 0x05
|
||||
#define H2C_CMD_OVERFLOW 0x06
|
||||
#define H2C_RESERVED 0x07
|
||||
|
||||
u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr);
|
||||
u8 rtw_setstandby_cmd(struct adapter *padapter, uint action);
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
|
||||
u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid,
|
||||
int ssid_num, struct rtw_ieee80211_channel *ch,
|
||||
int ch_num);
|
||||
u8 rtw_createbss_cmd(struct adapter *padapter);
|
||||
u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss,
|
||||
unsigned int sz);
|
||||
u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch);
|
||||
u8 rtw_createbss_cmd(struct adapter *padapter);
|
||||
u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key);
|
||||
u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue);
|
||||
u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork);
|
||||
u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueue);
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype);
|
||||
u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset);
|
||||
u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset);
|
||||
u8 rtw_setbbreg_cmd(struct adapter * padapter, u8 offset, u8 val);
|
||||
u8 rtw_setrfreg_cmd(struct adapter * padapter, u8 offset, u32 val);
|
||||
u8 rtw_getbbreg_cmd(struct adapter * padapter, u8 offset, u8 * pval);
|
||||
u8 rtw_getrfreg_cmd(struct adapter * padapter, u8 offset, u8 * pval);
|
||||
u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode);
|
||||
u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_table);
|
||||
u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval);
|
||||
|
||||
u8 rtw_gettssi_cmd(struct adapter *padapter, u8 offset,u8 *pval);
|
||||
u8 rtw_setfwdig_cmd(struct adapter*padapter, u8 type);
|
||||
u8 rtw_setfwra_cmd(struct adapter*padapter, u8 type);
|
||||
|
||||
u8 rtw_addbareq_cmd(struct adapter*padapter, u8 tid, u8 *addr);
|
||||
u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry,
|
||||
u8 enqueue);
|
||||
u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork);
|
||||
u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms,
|
||||
bool enqueue);
|
||||
u8 rtw_setopmode_cmd(struct adapter *padapter,
|
||||
enum ndis_802_11_network_infra networktype);
|
||||
u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr);
|
||||
|
||||
u8 rtw_dynamic_chk_wk_cmd(struct adapter *adapter);
|
||||
|
||||
u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue);
|
||||
u8 rtw_rpt_timer_cfg_cmd(struct adapter*padapter, u16 minRptTime);
|
||||
u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue);
|
||||
u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 minRptTime);
|
||||
|
||||
u8 rtw_antenna_select_cmd(struct adapter*padapter, u8 antenna,u8 enqueue);
|
||||
u8 rtw_ps_cmd(struct adapter*padapter);
|
||||
u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue);
|
||||
u8 rtw_ps_cmd(struct adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_88EU_AP_MODE
|
||||
u8 rtw_chk_hi_queue_cmd(struct adapter*padapter);
|
||||
u8 rtw_chk_hi_queue_cmd(struct adapter *padapter);
|
||||
#endif
|
||||
|
||||
u8 rtw_set_ch_cmd(struct adapter*padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue);
|
||||
u8 rtw_set_chplan_cmd(struct adapter*padapter, u8 chplan, u8 enqueue);
|
||||
u8 rtw_led_blink_cmd(struct adapter*padapter, struct LED_871x * pLed);
|
||||
u8 rtw_set_csa_cmd(struct adapter*padapter, u8 new_ch_no);
|
||||
u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option);
|
||||
|
||||
u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt);
|
||||
|
||||
u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue);
|
||||
u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf);
|
||||
|
||||
void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd);
|
||||
void rtw_createbss_cmd_callback(struct adapter *adapt, struct cmd_obj *pcmd);
|
||||
void rtw_getbbrfreg_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
|
||||
void rtw_readtssi_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
|
||||
void rtw_readtssi_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
|
||||
|
||||
void rtw_setstaKey_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cmd);
|
||||
void rtw_setassocsta_cmdrsp_callback(struct adapter *adapt, struct cmd_obj *cm);
|
||||
|
@ -832,159 +381,42 @@ struct _cmd_callback {
|
|||
};
|
||||
|
||||
enum rtw_h2c_cmd {
|
||||
GEN_CMD_CODE(_Read_MACREG), /*0*/
|
||||
GEN_CMD_CODE(_Write_MACREG),
|
||||
GEN_CMD_CODE(_Read_BBREG),
|
||||
GEN_CMD_CODE(_Write_BBREG),
|
||||
GEN_CMD_CODE(_Read_RFREG),
|
||||
GEN_CMD_CODE(_Write_RFREG), /*5*/
|
||||
GEN_CMD_CODE(_Read_EEPROM),
|
||||
GEN_CMD_CODE(_Write_EEPROM),
|
||||
GEN_CMD_CODE(_Read_EFUSE),
|
||||
GEN_CMD_CODE(_Write_EFUSE),
|
||||
|
||||
GEN_CMD_CODE(_Read_CAM), /*10*/
|
||||
GEN_CMD_CODE(_Write_CAM),
|
||||
GEN_CMD_CODE(_setBCNITV),
|
||||
GEN_CMD_CODE(_setMBIDCFG),
|
||||
GEN_CMD_CODE(_JoinBss), /*14*/
|
||||
GEN_CMD_CODE(_DisConnect), /*15*/
|
||||
GEN_CMD_CODE(_JoinBss),
|
||||
GEN_CMD_CODE(_DisConnect),
|
||||
GEN_CMD_CODE(_CreateBss),
|
||||
GEN_CMD_CODE(_SetOpMode),
|
||||
GEN_CMD_CODE(_SiteSurvey), /*18*/
|
||||
GEN_CMD_CODE(_SiteSurvey),
|
||||
GEN_CMD_CODE(_SetAuth),
|
||||
|
||||
GEN_CMD_CODE(_SetKey), /*20*/
|
||||
GEN_CMD_CODE(_SetKey),
|
||||
GEN_CMD_CODE(_SetStaKey),
|
||||
GEN_CMD_CODE(_SetAssocSta),
|
||||
GEN_CMD_CODE(_DelAssocSta),
|
||||
GEN_CMD_CODE(_SetStaPwrState),
|
||||
GEN_CMD_CODE(_SetBasicRate), /*25*/
|
||||
GEN_CMD_CODE(_GetBasicRate),
|
||||
GEN_CMD_CODE(_SetDataRate),
|
||||
GEN_CMD_CODE(_GetDataRate),
|
||||
GEN_CMD_CODE(_SetPhyInfo),
|
||||
|
||||
GEN_CMD_CODE(_GetPhyInfo), /*30*/
|
||||
GEN_CMD_CODE(_SetPhy),
|
||||
GEN_CMD_CODE(_GetPhy),
|
||||
GEN_CMD_CODE(_readRssi),
|
||||
GEN_CMD_CODE(_readGain),
|
||||
GEN_CMD_CODE(_SetAtim), /*35*/
|
||||
GEN_CMD_CODE(_SetPwrMode),
|
||||
GEN_CMD_CODE(_JoinbssRpt),
|
||||
GEN_CMD_CODE(_SetRaTable),
|
||||
GEN_CMD_CODE(_GetRaTable),
|
||||
|
||||
GEN_CMD_CODE(_GetCCXReport), /*40*/
|
||||
GEN_CMD_CODE(_GetDTMReport),
|
||||
GEN_CMD_CODE(_GetTXRateStatistics),
|
||||
GEN_CMD_CODE(_SetUsbSuspend),
|
||||
GEN_CMD_CODE(_SetH2cLbk),
|
||||
GEN_CMD_CODE(_AddBAReq), /*45*/
|
||||
GEN_CMD_CODE(_SetChannel), /*46*/
|
||||
GEN_CMD_CODE(_SetTxPower),
|
||||
GEN_CMD_CODE(_SwitchAntenna),
|
||||
GEN_CMD_CODE(_SetCrystalCap),
|
||||
GEN_CMD_CODE(_SetSingleCarrierTx), /*50*/
|
||||
|
||||
GEN_CMD_CODE(_SetSingleToneTx),/*51*/
|
||||
GEN_CMD_CODE(_SetCarrierSuppressionTx),
|
||||
GEN_CMD_CODE(_SetContinuousTx),
|
||||
GEN_CMD_CODE(_SwitchBandwidth), /*54*/
|
||||
GEN_CMD_CODE(_TX_Beacon), /*55*/
|
||||
|
||||
GEN_CMD_CODE(_Set_MLME_EVT), /*56*/
|
||||
GEN_CMD_CODE(_Set_Drv_Extra), /*57*/
|
||||
GEN_CMD_CODE(_Set_H2C_MSG), /*58*/
|
||||
|
||||
GEN_CMD_CODE(_SetChannelPlan), /*59*/
|
||||
GEN_CMD_CODE(_LedBlink), /*60*/
|
||||
|
||||
GEN_CMD_CODE(_SetChannelSwitch), /*61*/
|
||||
GEN_CMD_CODE(_TDLS), /*62*/
|
||||
GEN_CMD_CODE(_AddBAReq),
|
||||
GEN_CMD_CODE(_SetChannel),
|
||||
GEN_CMD_CODE(_TX_Beacon),
|
||||
GEN_CMD_CODE(_Set_MLME_EVT),
|
||||
GEN_CMD_CODE(_Set_Drv_Extra),
|
||||
GEN_CMD_CODE(_SetChannelPlan),
|
||||
|
||||
MAX_H2CCMD
|
||||
};
|
||||
|
||||
#define _GetBBReg_CMD_ _Read_BBREG_CMD_
|
||||
#define _SetBBReg_CMD_ _Write_BBREG_CMD_
|
||||
#define _GetRFReg_CMD_ _Read_RFREG_CMD_
|
||||
#define _SetRFReg_CMD_ _Write_RFREG_CMD_
|
||||
|
||||
#ifdef _RTW_CMD_C_
|
||||
static struct _cmd_callback rtw_cmd_callback[] =
|
||||
{
|
||||
{GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/
|
||||
{GEN_CMD_CODE(_Write_MACREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_BBREG), NULL},
|
||||
{GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
|
||||
{GEN_CMD_CODE(_Read_EEPROM), NULL},
|
||||
{GEN_CMD_CODE(_Write_EEPROM), NULL},
|
||||
{GEN_CMD_CODE(_Read_EFUSE), NULL},
|
||||
{GEN_CMD_CODE(_Write_EFUSE), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
|
||||
{GEN_CMD_CODE(_Write_CAM), NULL},
|
||||
{GEN_CMD_CODE(_setBCNITV), NULL},
|
||||
{GEN_CMD_CODE(_setMBIDCFG), NULL},
|
||||
{GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
|
||||
{GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
|
||||
static struct _cmd_callback rtw_cmd_callback[] = {
|
||||
{GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback},
|
||||
{GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback},
|
||||
{GEN_CMD_CODE(_CreateBss), &rtw_createbss_cmd_callback},
|
||||
{GEN_CMD_CODE(_SetOpMode), NULL},
|
||||
{GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
|
||||
{GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback},
|
||||
{GEN_CMD_CODE(_SetAuth), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_SetKey), NULL}, /*20*/
|
||||
{GEN_CMD_CODE(_SetKey), NULL},
|
||||
{GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
|
||||
{GEN_CMD_CODE(_DelAssocSta), NULL},
|
||||
{GEN_CMD_CODE(_SetStaPwrState), NULL},
|
||||
{GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
|
||||
{GEN_CMD_CODE(_GetBasicRate), NULL},
|
||||
{GEN_CMD_CODE(_SetDataRate), NULL},
|
||||
{GEN_CMD_CODE(_GetDataRate), NULL},
|
||||
{GEN_CMD_CODE(_SetPhyInfo), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
|
||||
{GEN_CMD_CODE(_SetPhy), NULL},
|
||||
{GEN_CMD_CODE(_GetPhy), NULL},
|
||||
{GEN_CMD_CODE(_readRssi), NULL},
|
||||
{GEN_CMD_CODE(_readGain), NULL},
|
||||
{GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
|
||||
{GEN_CMD_CODE(_SetPwrMode), NULL},
|
||||
{GEN_CMD_CODE(_JoinbssRpt), NULL},
|
||||
{GEN_CMD_CODE(_SetRaTable), NULL},
|
||||
{GEN_CMD_CODE(_GetRaTable), NULL},
|
||||
|
||||
{GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
|
||||
{GEN_CMD_CODE(_GetDTMReport), NULL},
|
||||
{GEN_CMD_CODE(_GetTXRateStatistics), NULL},
|
||||
{GEN_CMD_CODE(_SetUsbSuspend), NULL},
|
||||
{GEN_CMD_CODE(_SetH2cLbk), NULL},
|
||||
{GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
|
||||
{GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
|
||||
{GEN_CMD_CODE(_SetTxPower), NULL},
|
||||
{GEN_CMD_CODE(_SwitchAntenna), NULL},
|
||||
{GEN_CMD_CODE(_SetCrystalCap), NULL},
|
||||
{GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
|
||||
|
||||
{GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
|
||||
{GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
|
||||
{GEN_CMD_CODE(_SetContinuousTx), NULL},
|
||||
{GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
|
||||
{GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
|
||||
|
||||
{GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
|
||||
{GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
|
||||
{GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
|
||||
{GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
|
||||
{GEN_CMD_CODE(_LedBlink), NULL},/*60*/
|
||||
|
||||
{GEN_CMD_CODE(_SetChannelSwitch), NULL},/*61*/
|
||||
{GEN_CMD_CODE(_TDLS), NULL},/*62*/
|
||||
{GEN_CMD_CODE(_AddBAReq), NULL},
|
||||
{GEN_CMD_CODE(_SetChannel), NULL},
|
||||
{GEN_CMD_CODE(_TX_Beacon), NULL},
|
||||
{GEN_CMD_CODE(_Set_MLME_EVT), NULL},
|
||||
{GEN_CMD_CODE(_Set_Drv_Extra), NULL},
|
||||
{GEN_CMD_CODE(_SetChannelPlan), NULL},
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
|
||||
#define DRIVERVERSION "v4.1.4_6773.20130222"
|
||||
#define _drv_always_ 1
|
||||
#define _drv_emerg_ 2
|
||||
#define _drv_alert_ 3
|
||||
|
@ -75,7 +75,7 @@ extern u32 GlobalDebugLevel;
|
|||
#define DBG_88E_LEVEL(_level, fmt, arg...) \
|
||||
do { \
|
||||
if (_level <= GlobalDebugLevel) \
|
||||
pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg); \
|
||||
pr_info(DRIVER_PREFIX"Info " fmt, ##arg); \
|
||||
} while (0)
|
||||
|
||||
#define DBG_88E(...) \
|
||||
|
@ -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) { \
|
||||
|
@ -120,7 +106,7 @@ extern u32 GlobalDebugLevel;
|
|||
u8 *ptr = (u8 *)_hexdata; \
|
||||
pr_info("%s", DRIVER_PREFIX); \
|
||||
pr_info(_titlestring); \
|
||||
for (__i = 0; __i < (int)_hexdatalen; __i++ ) { \
|
||||
for (__i = 0; __i < (int)_hexdatalen; __i++) { \
|
||||
pr_info("%02X%s", ptr[__i], \
|
||||
(((__i + 1) % 4) == 0) ? \
|
||||
" " : " "); \
|
||||
|
@ -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__ */
|
||||
|
|
|
@ -108,7 +108,7 @@ enum RT_CUSTOMER_ID {
|
|||
RT_CID_CC_C = 38,
|
||||
RT_CID_819x_Xavi = 39,
|
||||
RT_CID_819x_FUNAI_TV = 40,
|
||||
RT_CID_819x_ALPHA_WD=41,
|
||||
RT_CID_819x_ALPHA_WD = 41,
|
||||
};
|
||||
|
||||
struct eeprom_priv {
|
||||
|
@ -118,7 +118,7 @@ struct eeprom_priv {
|
|||
u8 mac_addr[6]; /* PermanentAddress */
|
||||
u16 channel_plan;
|
||||
u8 EepromOrEfuse;
|
||||
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512] __aligned(4);
|
||||
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512];
|
||||
};
|
||||
|
||||
void eeprom_write16(struct adapter *padapter, u16 reg, u16 data);
|
||||
|
|
|
@ -99,52 +99,20 @@ struct efuse_hal {
|
|||
u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
|
||||
};
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
extern u8 fakeEfuseBank;
|
||||
extern u32 fakeEfuseUsedBytes;
|
||||
extern u8 fakeEfuseContent[];
|
||||
extern u8 fakeEfuseInitMap[];
|
||||
extern u8 fakeEfuseModifiedMap[];
|
||||
|
||||
extern u32 BTEfuseUsedBytes;
|
||||
extern u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
extern u8 BTEfuseInitMap[];
|
||||
extern u8 BTEfuseModifiedMap[];
|
||||
|
||||
extern u32 fakeBTEfuseUsedBytes;
|
||||
extern u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
|
||||
extern u8 fakeBTEfuseInitMap[];
|
||||
extern u8 fakeBTEfuseModifiedMap[];
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
||||
u8 efuse_GetCurrentSize(struct adapter *adapter, u16 *size);
|
||||
u16 efuse_GetMaxSize(struct adapter *adapter);
|
||||
u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
|
||||
u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
|
||||
u16 cnts, u8 *data);
|
||||
u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
|
||||
u16 cnts, u8 *data);
|
||||
u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
|
||||
u8 Efuse_CalculateWordCnts(u8 word_en);
|
||||
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
|
||||
void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
|
||||
void *out, bool bPseudoTest);
|
||||
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
|
||||
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
|
||||
void *out);
|
||||
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data);
|
||||
u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data);
|
||||
|
||||
void Efuse_PowerSwitch(struct adapter *adapt,u8 bWrite,u8 PwrState);
|
||||
int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
|
||||
int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
|
||||
bool test);
|
||||
void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset,
|
||||
u16 _size_byte, u8 *pbuf);
|
||||
void Efuse_PowerSwitch(struct adapter *adapt, u8 bWrite, u8 PwrState);
|
||||
int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data);
|
||||
bool Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data);
|
||||
void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
|
||||
u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
|
||||
u8 word_en, u8 *data, bool test);
|
||||
|
||||
u8 EFUSE_Read1Byte(struct adapter *adapter, u16 address);
|
||||
void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test);
|
||||
void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val);
|
||||
u8 word_en, u8 *data);
|
||||
|
||||
void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype);
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -25,26 +25,18 @@
|
|||
|
||||
typedef u8 NDIS_802_11_PMKID_VALUE[16];
|
||||
|
||||
u8 rtw_set_802_11_add_key(struct adapter *adapt, struct ndis_802_11_key *key);
|
||||
u8 rtw_set_802_11_authentication_mode(struct adapter *adapt,
|
||||
enum ndis_802_11_auth_mode authmode);
|
||||
u8 rtw_set_802_11_bssid(struct adapter*adapter, u8 *bssid);
|
||||
u8 rtw_set_802_11_bssid(struct adapter *adapter, u8 *bssid);
|
||||
u8 rtw_set_802_11_add_wep(struct adapter *adapter, struct ndis_802_11_wep *wep);
|
||||
u8 rtw_set_802_11_disassociate(struct adapter *adapter);
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter*adapter,
|
||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter *adapter,
|
||||
struct ndis_802_11_ssid *pssid,
|
||||
int ssid_max_num);
|
||||
u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
|
||||
enum ndis_802_11_network_infra type);
|
||||
u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
|
||||
u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
|
||||
u8 rtw_set_802_11_remove_key(struct adapter *adapt,
|
||||
struct ndis_802_11_remove_key *key);
|
||||
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
|
||||
u16 rtw_get_cur_max_rate(struct adapter *adapter);
|
||||
int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
|
||||
int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
|
||||
int rtw_set_country(struct adapter *adapter, const char *country_code);
|
||||
int rtw_change_ifname(struct adapter *padapter, const char *ifname);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,62 +23,6 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
#define IOREG_CMD_END_LEN 4
|
||||
|
||||
struct ioreg_cfg {
|
||||
u8 length;
|
||||
u8 cmd_id;
|
||||
__le16 address;
|
||||
__le32 data;
|
||||
__le32 mask;
|
||||
};
|
||||
|
||||
enum ioreg_cmd {
|
||||
IOREG_CMD_LLT = 0x01,
|
||||
IOREG_CMD_REFUSE = 0x02,
|
||||
IOREG_CMD_EFUSE_PATH = 0x03,
|
||||
IOREG_CMD_WB_REG = 0x04,
|
||||
IOREG_CMD_WW_REG = 0x05,
|
||||
IOREG_CMD_WD_REG = 0x06,
|
||||
IOREG_CMD_W_RF = 0x07,
|
||||
IOREG_CMD_DELAY_US = 0x10,
|
||||
IOREG_CMD_DELAY_MS = 0x11,
|
||||
IOREG_CMD_END = 0xFF,
|
||||
};
|
||||
|
||||
struct xmit_frame *rtw_IOL_accquire_xmit_frame(struct adapter *adapter);
|
||||
int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds,
|
||||
u32 cmd_len);
|
||||
int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary);
|
||||
int rtw_IOL_exec_cmds_sync(struct adapter *adapter,
|
||||
struct xmit_frame *xmit_frame, u32 max_wating_ms,
|
||||
u32 bndy_cnt);
|
||||
bool rtw_IOL_applied(struct adapter *adapter);
|
||||
int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us);
|
||||
int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms);
|
||||
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame);
|
||||
|
||||
void read_efuse_from_txpktbuf(struct adapter *adapter, int bcnhead,
|
||||
u8 *content, u16 *size);
|
||||
|
||||
int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr,
|
||||
u8 value, u8 mask);
|
||||
int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr,
|
||||
u16 value, u16 mask);
|
||||
int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr,
|
||||
u32 value, u32 mask);
|
||||
int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
|
||||
u16 addr, u32 value, u32 mask);
|
||||
#define rtw_IOL_append_WB_cmd(xmit_frame, addr, value, mask) \
|
||||
_rtw_IOL_append_WB_cmd((xmit_frame), (addr), (value) ,(mask))
|
||||
#define rtw_IOL_append_WW_cmd(xmit_frame, addr, value, mask) \
|
||||
_rtw_IOL_append_WW_cmd((xmit_frame), (addr), (value),(mask))
|
||||
#define rtw_IOL_append_WD_cmd(xmit_frame, addr, value, mask) \
|
||||
_rtw_IOL_append_WD_cmd((xmit_frame), (addr), (value), (mask))
|
||||
#define rtw_IOL_append_WRF_cmd(xmit_frame, rf_path, addr, value, mask) \
|
||||
_rtw_IOL_append_WRF_cmd((xmit_frame),(rf_path), (addr), (value), (mask))
|
||||
|
||||
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame);
|
||||
void rtw_IOL_cmd_buf_dump(struct adapter *Adapter,int buf_len,u8 *pbuf);
|
||||
|
||||
#endif /* __RTW_IOL_H_ */
|
||||
|
|
|
@ -23,92 +23,43 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
#define MSECS(t) (HZ * ((t) / 1000) + (HZ * ((t) % 1000)) / 1000)
|
||||
|
||||
#define LED_BLINK_NORMAL_INTERVAL 100
|
||||
#define LED_BLINK_SLOWLY_INTERVAL 200
|
||||
#define LED_BLINK_LONG_INTERVAL 400
|
||||
|
||||
#define LED_BLINK_NO_LINK_INTERVAL_ALPHA 1000
|
||||
#define LED_BLINK_LINK_INTERVAL_ALPHA 500 /* 500 */
|
||||
#define LED_BLINK_SCAN_INTERVAL_ALPHA 180 /* 150 */
|
||||
#define LED_BLINK_FASTER_INTERVAL_ALPHA 50
|
||||
#define LED_BLINK_WPS_SUCESS_INTERVAL_ALPHA 5000
|
||||
|
||||
#define LED_BLINK_NORMAL_INTERVAL_NETTRONIX 100
|
||||
#define LED_BLINK_SLOWLY_INTERVAL_NETTRONIX 2000
|
||||
|
||||
#define LED_BLINK_SLOWLY_INTERVAL_PORNET 1000
|
||||
#define LED_BLINK_NORMAL_INTERVAL_PORNET 100
|
||||
|
||||
#define LED_BLINK_FAST_INTERVAL_BITLAND 30
|
||||
|
||||
/* 060403, rcnjko: Customized for AzWave. */
|
||||
#define LED_CM2_BLINK_ON_INTERVAL 250
|
||||
#define LED_CM2_BLINK_OFF_INTERVAL 4750
|
||||
|
||||
#define LED_CM8_BLINK_INTERVAL 500 /* for QMI */
|
||||
#define LED_CM8_BLINK_OFF_INTERVAL 3750 /* for QMI */
|
||||
|
||||
/* 080124, lanhsin: Customized for RunTop */
|
||||
#define LED_RunTop_BLINK_INTERVAL 300
|
||||
|
||||
/* 060421, rcnjko: Customized for Sercomm Printer Server case. */
|
||||
#define LED_CM3_BLINK_INTERVAL 1500
|
||||
|
||||
enum LED_CTL_MODE {
|
||||
LED_CTL_POWER_ON = 1,
|
||||
LED_CTL_LINK = 2,
|
||||
LED_CTL_NO_LINK = 3,
|
||||
LED_CTL_TX = 4,
|
||||
LED_CTL_RX = 5,
|
||||
LED_CTL_SITE_SURVEY = 6,
|
||||
LED_CTL_POWER_OFF = 7,
|
||||
LED_CTL_START_TO_LINK = 8,
|
||||
LED_CTL_START_WPS = 9,
|
||||
LED_CTL_STOP_WPS = 10,
|
||||
LED_CTL_START_WPS_BOTTON = 11, /* added for runtop */
|
||||
LED_CTL_STOP_WPS_FAIL = 12, /* added for ALPHA */
|
||||
LED_CTL_STOP_WPS_FAIL_OVERLAP = 13, /* added for BELKIN */
|
||||
LED_CTL_CONNECTION_NO_TRANSFER = 14,
|
||||
LED_CTL_POWER_ON,
|
||||
LED_CTL_LINK,
|
||||
LED_CTL_NO_LINK,
|
||||
LED_CTL_TX,
|
||||
LED_CTL_RX ,
|
||||
LED_CTL_SITE_SURVEY,
|
||||
LED_CTL_POWER_OFF,
|
||||
LED_CTL_START_TO_LINK,
|
||||
LED_CTL_START_WPS,
|
||||
LED_CTL_STOP_WPS,
|
||||
LED_CTL_START_WPS_BOTTON,
|
||||
LED_CTL_STOP_WPS_FAIL
|
||||
};
|
||||
|
||||
enum LED_STATE_871x {
|
||||
LED_UNKNOWN = 0,
|
||||
RTW_LED_ON = 1,
|
||||
RTW_LED_OFF = 2,
|
||||
LED_BLINK_NORMAL = 3,
|
||||
LED_BLINK_SLOWLY = 4,
|
||||
LED_BLINK_POWER_ON = 5,
|
||||
LED_BLINK_SCAN = 6, /* LED is blinking during scanning period,
|
||||
* the # of times to blink is depend on time
|
||||
* for scanning. */
|
||||
LED_BLINK_NO_LINK = 7, /* LED is blinking during no link state. */
|
||||
LED_BLINK_StartToBlink = 8,/* Customzied for Sercomm Printer
|
||||
* Server case */
|
||||
LED_BLINK_TXRX = 9,
|
||||
LED_BLINK_WPS = 10, /* LED is blinkg during WPS communication */
|
||||
LED_BLINK_WPS_STOP = 11, /* for ALPHA */
|
||||
LED_BLINK_WPS_STOP_OVERLAP = 12, /* for BELKIN */
|
||||
LED_BLINK_RUNTOP = 13, /* Customized for RunTop */
|
||||
LED_BLINK_CAMEO = 14,
|
||||
LED_BLINK_XAVI = 15,
|
||||
LED_BLINK_ALWAYS_ON = 16,
|
||||
};
|
||||
|
||||
enum LED_PIN_871x {
|
||||
LED_PIN_NULL = 0,
|
||||
LED_PIN_LED0 = 1,
|
||||
LED_PIN_LED1 = 2,
|
||||
LED_PIN_LED2 = 3,
|
||||
LED_PIN_GPIO0 = 4,
|
||||
LED_UNKNOWN,
|
||||
RTW_LED_ON,
|
||||
RTW_LED_OFF,
|
||||
LED_BLINK_NORMAL,
|
||||
LED_BLINK_SLOWLY,
|
||||
LED_BLINK_POWER_ON,
|
||||
LED_BLINK_SCAN,
|
||||
LED_BLINK_TXRX,
|
||||
LED_BLINK_WPS,
|
||||
LED_BLINK_WPS_STOP
|
||||
};
|
||||
|
||||
struct LED_871x {
|
||||
struct adapter *padapter;
|
||||
|
||||
enum LED_PIN_871x LedPin; /* Identify how to implement this
|
||||
* SW led. */
|
||||
enum LED_STATE_871x CurrLedState; /* Current LED state. */
|
||||
enum LED_STATE_871x BlinkingLedState; /* Next state for blinking,
|
||||
* either RTW_LED_ON or RTW_LED_OFF are. */
|
||||
|
@ -139,34 +90,11 @@ struct LED_871x {
|
|||
((struct LED_871x *)_LED_871x)->CurrLedState == LED_BLINK_WPS_STOP || \
|
||||
((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress)
|
||||
|
||||
#define IS_LED_BLINKING(_LED_871x) \
|
||||
(((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress || \
|
||||
((struct LED_871x *)_LED_871x)->bLedScanBlinkInProgress)
|
||||
|
||||
/* LED customization. */
|
||||
|
||||
enum LED_STRATEGY_871x {
|
||||
SW_LED_MODE0 = 0, /* SW control 1 LED via GPIO0. It is default option.*/
|
||||
SW_LED_MODE1= 1, /* 2 LEDs, through LED0 and LED1. For ALPHA. */
|
||||
SW_LED_MODE2 = 2, /* SW control 1 LED via GPIO0, customized for AzWave
|
||||
* 8187 minicard. */
|
||||
SW_LED_MODE3 = 3, /* SW control 1 LED via GPIO0, customized for Sercomm
|
||||
* Printer Server case. */
|
||||
SW_LED_MODE4 = 4, /* for Edimax / Belkin */
|
||||
SW_LED_MODE5 = 5, /* for Sercomm / Belkin */
|
||||
SW_LED_MODE6 = 6, /* for 88CU minicard, porting from ce SW_LED_MODE7 */
|
||||
HW_LED = 50, /* HW control 2 LEDs, LED0 and LED1 (there are 4
|
||||
* different control modes, see MAC.CONFIG1 for details.)*/
|
||||
LED_ST_NONE = 99,
|
||||
};
|
||||
|
||||
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction);
|
||||
|
||||
struct led_priv{
|
||||
struct led_priv {
|
||||
/* add for led control */
|
||||
struct LED_871x SwLed0;
|
||||
struct LED_871x SwLed1;
|
||||
enum LED_STRATEGY_871x LedStrategy;
|
||||
u8 bRegUseLed;
|
||||
void (*LedControlHandler)(struct adapter *padapter,
|
||||
enum LED_CTL_MODE LedAction);
|
||||
|
@ -182,15 +110,14 @@ struct led_priv{
|
|||
void BlinkTimerCallback(void *data);
|
||||
void BlinkWorkItemCallback(struct work_struct *work);
|
||||
|
||||
void ResetLedStatus(struct LED_871x * pLed);
|
||||
void ResetLedStatus(struct LED_871x *pLed);
|
||||
|
||||
void InitLed871x(struct adapter *padapter, struct LED_871x *pLed,
|
||||
enum LED_PIN_871x LedPin);
|
||||
void InitLed871x(struct adapter *padapter, struct LED_871x *pLed);
|
||||
|
||||
void DeInitLed871x(struct LED_871x *pLed);
|
||||
|
||||
/* hal... */
|
||||
void BlinkHandler(struct LED_871x * pLed);
|
||||
void BlinkHandler(struct LED_871x *pLed);
|
||||
void SwLedOn(struct adapter *padapter, struct LED_871x *pLed);
|
||||
void SwLedOff(struct adapter *padapter, struct LED_871x *pLed);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -129,17 +122,17 @@ struct rt_link_detect {
|
|||
|
||||
struct profile_info {
|
||||
u8 ssidlen;
|
||||
u8 ssid[ WLAN_SSID_MAXLEN ];
|
||||
u8 peermac[ ETH_ALEN ];
|
||||
u8 ssid[WLAN_SSID_MAXLEN];
|
||||
u8 peermac[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct tx_invite_req_info {
|
||||
u8 token;
|
||||
u8 benable;
|
||||
u8 go_ssid[ WLAN_SSID_MAXLEN ];
|
||||
u8 go_ssid[WLAN_SSID_MAXLEN];
|
||||
u8 ssidlen;
|
||||
u8 go_bssid[ ETH_ALEN ];
|
||||
u8 peer_macaddr[ ETH_ALEN ];
|
||||
u8 go_bssid[ETH_ALEN];
|
||||
u8 peer_macaddr[ETH_ALEN];
|
||||
u8 operating_ch; /* This information will be set by using the
|
||||
* p2p_set op_ch=x */
|
||||
u8 peer_ch; /* The listen channel for peer P2P device */
|
||||
|
@ -182,9 +175,9 @@ struct tx_nego_req_info {
|
|||
};
|
||||
|
||||
struct group_id_info {
|
||||
u8 go_device_addr[ ETH_ALEN ]; /* The GO's device address of
|
||||
u8 go_device_addr[ETH_ALEN]; /* The GO's device address of
|
||||
* this P2P group */
|
||||
u8 ssid[ WLAN_SSID_MAXLEN ]; /* The SSID of this P2P group */
|
||||
u8 ssid[WLAN_SSID_MAXLEN]; /* The SSID of this P2P group */
|
||||
};
|
||||
|
||||
struct scan_limit_info {
|
||||
|
@ -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... */
|
||||
|
@ -388,7 +356,7 @@ struct mlme_priv {
|
|||
u8 *assoc_rsp;
|
||||
u32 assoc_rsp_len;
|
||||
|
||||
#if defined (CONFIG_88EU_AP_MODE)
|
||||
#if defined(CONFIG_88EU_AP_MODE)
|
||||
/* Number of associated Non-ERP stations (i.e., stations using 802.11b
|
||||
* in 802.11g BSS) */
|
||||
int num_sta_non_erp;
|
||||
|
@ -468,11 +436,9 @@ void indicate_wx_scan_complete_event(struct adapter *padapter);
|
|||
void rtw_indicate_wx_assoc_event(struct adapter *padapter);
|
||||
void rtw_indicate_wx_disassoc_event(struct adapter *padapter);
|
||||
int event_thread(void *context);
|
||||
void rtw_join_timeout_handler(void *FunctionContext);
|
||||
void _rtw_scan_timeout_handler(void *FunctionContext);
|
||||
void rtw_free_network_queue(struct adapter *adapter, u8 isfreeall);
|
||||
int rtw_init_mlme_priv(struct adapter *adapter);
|
||||
void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
|
||||
void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
||||
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
|
||||
int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv,
|
||||
int keyid, u8 set_tx);
|
||||
|
@ -508,7 +474,7 @@ static inline void set_fwstate(struct mlme_priv *pmlmepriv, int state)
|
|||
{
|
||||
pmlmepriv->fw_state |= state;
|
||||
/* FOR HW integration */
|
||||
if (_FW_UNDER_SURVEY==state)
|
||||
if (_FW_UNDER_SURVEY == state)
|
||||
pmlmepriv->bScanInProcess = true;
|
||||
}
|
||||
|
||||
|
@ -516,7 +482,7 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
|
|||
{
|
||||
pmlmepriv->fw_state &= ~state;
|
||||
/* FOR HW integration */
|
||||
if (_FW_UNDER_SURVEY==state)
|
||||
if (_FW_UNDER_SURVEY == state)
|
||||
pmlmepriv->bScanInProcess = false;
|
||||
}
|
||||
|
||||
|
@ -526,48 +492,38 @@ static inline void _clr_fwstate_(struct mlme_priv *pmlmepriv, int state)
|
|||
*/
|
||||
static inline void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
if (check_fwstate(pmlmepriv, state) == true)
|
||||
pmlmepriv->fw_state ^= state;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
_clr_fwstate_(pmlmepriv, state);
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned++;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned--;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
|
||||
{
|
||||
unsigned long irql;
|
||||
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_lock_bh(&pmlmepriv->lock);
|
||||
pmlmepriv->num_of_scanned = val;
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irql);
|
||||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
u16 rtw_get_capability(struct wlan_bssid_ex *bss);
|
||||
|
@ -582,7 +538,7 @@ struct wlan_network *rtw_get_oldest_wlan_network(struct __queue *scanned_queue);
|
|||
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue);
|
||||
void rtw_indicate_disconnect(struct adapter *adapter);
|
||||
void rtw_indicate_connect(struct adapter *adapter);
|
||||
void rtw_indicate_scan_done( struct adapter *padapter, bool aborted);
|
||||
void rtw_indicate_scan_done(struct adapter *padapter, bool aborted);
|
||||
void rtw_scan_abort(struct adapter *adapter);
|
||||
|
||||
int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie,
|
||||
|
@ -595,47 +551,27 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter);
|
|||
|
||||
void rtw_get_encrypt_decrypt_from_registrypriv(struct adapter *adapter);
|
||||
|
||||
void _rtw_join_timeout_handler(struct adapter *adapter);
|
||||
void rtw_scan_timeout_handler(struct adapter *adapter);
|
||||
void _rtw_join_timeout_handler(void *function_context);
|
||||
void rtw_scan_timeout_handler(void *function_context);
|
||||
|
||||
void rtw_dynamic_check_timer_handlder(struct adapter *adapter);
|
||||
void rtw_dynamic_check_timer_handlder(void *function_context);
|
||||
#define rtw_is_scan_deny(adapter) false
|
||||
#define rtw_clear_scan_deny(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
|
||||
#define rtw_set_scan_deny(adapter, ms) do {} while (0)
|
||||
|
||||
|
||||
int _rtw_init_mlme_priv(struct adapter *padapter);
|
||||
|
||||
void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
|
||||
|
||||
void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
||||
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
||||
|
||||
int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
|
||||
|
||||
struct wlan_network *_rtw_dequeue_network(struct __queue *queue);
|
||||
|
||||
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
||||
|
||||
|
||||
void _rtw_free_network(struct mlme_priv *pmlmepriv,
|
||||
struct wlan_network *pnetwork, u8 isfreeall);
|
||||
void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
|
||||
struct wlan_network *pnetwork);
|
||||
|
||||
|
||||
struct wlan_network* _rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||
|
||||
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall);
|
||||
|
||||
int rtw_if_up(struct adapter *padapter);
|
||||
|
||||
|
||||
u8 *rtw_get_capability_from_ie(u8 *ie);
|
||||
u8 *rtw_get_timestampe_from_ie(u8 *ie);
|
||||
u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
|
||||
|
||||
|
||||
void rtw_joinbss_reset(struct adapter *padapter);
|
||||
|
||||
unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie,
|
||||
|
@ -650,6 +586,6 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
|
|||
void rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network);
|
||||
void _rtw_roaming(struct adapter *padapter, struct wlan_network *tgt_network);
|
||||
|
||||
void rtw_stassoc_hw_rpt(struct adapter *adapter,struct sta_info *psta);
|
||||
void rtw_stassoc_hw_rpt(struct adapter *adapter, struct sta_info *psta);
|
||||
|
||||
#endif /* __RTL871X_MLME_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);
|
||||
char *str;
|
||||
unsigned int (*func)(struct adapter *adapt, struct recv_frame *frame);
|
||||
};
|
||||
|
||||
struct ss_res {
|
||||
|
@ -401,7 +401,7 @@ struct p2p_oper_class_map {
|
|||
struct mlme_ext_priv {
|
||||
struct adapter *padapter;
|
||||
u8 mlmeext_init;
|
||||
ATOMIC_T event_seq;
|
||||
atomic_t event_seq;
|
||||
u16 mgnt_seq;
|
||||
|
||||
unsigned char cur_channel;
|
||||
|
@ -448,7 +448,7 @@ struct mlme_ext_priv {
|
|||
|
||||
int init_mlme_ext_priv(struct adapter *adapter);
|
||||
int init_hw_mlme_ext(struct adapter *padapter);
|
||||
void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext);
|
||||
void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext);
|
||||
extern void init_mlme_ext_timer(struct adapter *padapter);
|
||||
extern void init_addba_retry_timer(struct adapter *adapt, struct sta_info *sta);
|
||||
extern struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv);
|
||||
|
@ -484,13 +484,13 @@ void write_cam(struct adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key);
|
|||
void clear_cam_entry(struct adapter *padapter, u8 entry);
|
||||
|
||||
void invalidate_cam_all(struct adapter *padapter);
|
||||
void CAM_empty_entry(struct adapter * Adapter, u8 ucIndex);
|
||||
void CAM_empty_entry(struct adapter *Adapter, u8 ucIndex);
|
||||
|
||||
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,15 +544,16 @@ 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);
|
||||
void report_add_sta_event(struct adapter *padapter, unsigned char* addr,
|
||||
void report_add_sta_event(struct adapter *padapter, unsigned char *addr,
|
||||
int cam_idx);
|
||||
|
||||
void beacon_timing_control(struct adapter *padapter);
|
||||
extern u8 set_tx_beacon_cmd(struct adapter*padapter);
|
||||
extern u8 set_tx_beacon_cmd(struct adapter *padapter);
|
||||
unsigned int setup_beacon_frame(struct adapter *padapter,
|
||||
unsigned char *beacon_frame);
|
||||
void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
|
||||
|
@ -564,18 +565,6 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter,
|
|||
s32 dump_mgntframe_and_wait_ack(struct adapter *padapter,
|
||||
struct xmit_frame *pmgntframe);
|
||||
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
void issue_probersp_p2p(struct adapter *padapter, unsigned char *da);
|
||||
void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid,
|
||||
u8 ussidlen, u8 *pdev_raddr);
|
||||
void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr);
|
||||
void issue_probereq_p2p(struct adapter *padapter, u8 *da);
|
||||
int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt,
|
||||
int wait_ms);
|
||||
void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr,
|
||||
u8 dialogToken, u8 success);
|
||||
void issue_p2p_invitation_request(struct adapter *padapter, u8* raddr);
|
||||
#endif /* CONFIG_88EU_P2P */
|
||||
void issue_beacon(struct adapter *padapter, int timeout_ms);
|
||||
void issue_probersp(struct adapter *padapter, unsigned char *da,
|
||||
u8 is_valid_p2p_probereq);
|
||||
|
@ -587,7 +576,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta,
|
|||
void issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *pssid,
|
||||
u8 *da);
|
||||
s32 issue_probereq_ex(struct adapter *adapter, struct ndis_802_11_ssid *pssid,
|
||||
u8* da, int try_cnt, int wait_ms);
|
||||
u8 *da, int try_cnt, int wait_ms);
|
||||
int issue_nulldata(struct adapter *padapter, unsigned char *da,
|
||||
unsigned int power_mode, int try_cnt, int wait_ms);
|
||||
int issue_qos_nulldata(struct adapter *padapter, unsigned char *da,
|
||||
|
@ -609,46 +598,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);
|
||||
|
@ -657,9 +646,9 @@ void mlmeext_sta_add_event_callback(struct adapter *padapter,
|
|||
|
||||
void linked_status_chk(struct adapter *padapter);
|
||||
|
||||
void survey_timer_hdl (struct adapter *padapter);
|
||||
void link_timer_hdl (struct adapter *padapter);
|
||||
void addba_timer_hdl(struct sta_info *psta);
|
||||
void survey_timer_hdl(void *function_context);
|
||||
void link_timer_hdl(void *funtion_context);
|
||||
void addba_timer_hdl(void *function_context);
|
||||
|
||||
#define set_survey_timer(mlmeext, ms) \
|
||||
do { \
|
||||
|
@ -719,78 +708,21 @@ u8 tdls_hdl(struct adapter *padapter, unsigned char *pbuf);
|
|||
#ifdef _RTW_CMD_C_
|
||||
|
||||
static struct cmd_hdl wlancmds[] = {
|
||||
GEN_DRV_CMD_HANDLER(0, NULL) /*0*/
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_DRV_CMD_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*10*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct joinbss_parm), join_cmd_hdl) /*14*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct disconnect_parm), disconnect_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct createbss_parm), createbss_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setopmode_parm), setopmode_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct sitesurvey_parm),
|
||||
sitesurvey_cmd_hdl) /*18*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setauth_parm), setauth_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setkey_parm), setkey_hdl) /*20*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct set_stakey_parm), set_stakey_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct set_assocsta_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct del_assocsta_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setstapwrstate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setbasicrate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct getbasicrate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setdatarate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct getdatarate_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setphyinfo_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct getphyinfo_parm), NULL) /*30*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct setphy_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof (struct getphy_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*40*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct wlan_bssid_ex), join_cmd_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct disconnect_parm), disconnect_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct wlan_bssid_ex), createbss_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setopmode_parm), setopmode_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct sitesurvey_parm), sitesurvey_cmd_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setauth_parm), setauth_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct setkey_parm), setkey_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_stakey_parm), set_stakey_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_assocsta_parm), NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct addBaReq_parm), add_ba_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_ch_parm), set_ch_hdl) /* 46 */
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL) /*50*/
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(0, NULL)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct Tx_Beacon_param),
|
||||
tx_beacon_hdl) /*55*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(0, mlme_evt_hdl) /*56*/
|
||||
GEN_MLME_EXT_HANDLER(0, rtw_drvextra_cmd_hdl) /*57*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(0, h2c_msg_hdl) /*58*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct SetChannelPlan_param),
|
||||
set_chplan_hdl) /*59*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct LedBlink_param),
|
||||
led_blink_hdl) /*60*/
|
||||
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct SetChannelSwitch_param),
|
||||
set_csa_hdl) /*61*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct TDLSoption_param),
|
||||
tdls_hdl) /*62*/
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct set_ch_parm), set_ch_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct wlan_bssid_ex), tx_beacon_hdl)
|
||||
GEN_MLME_EXT_HANDLER(0, mlme_evt_hdl)
|
||||
GEN_MLME_EXT_HANDLER(0, rtw_drvextra_cmd_hdl)
|
||||
GEN_MLME_EXT_HANDLER(sizeof(struct SetChannelPlan_param), set_chplan_hdl)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -855,7 +787,7 @@ static struct fwevent wlanevents[] = {
|
|||
{0, NULL},
|
||||
{0, NULL},
|
||||
{0, &rtw_survey_event_callback}, /*8*/
|
||||
{sizeof (struct surveydone_event), &rtw_surveydone_event_callback},/*9*/
|
||||
{sizeof(struct surveydone_event), &rtw_surveydone_event_callback},/*9*/
|
||||
{0, &rtw_joinbss_event_callback}, /*10*/
|
||||
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback},
|
||||
{sizeof(struct stadel_event), &rtw_stadel_event_callback},
|
||||
|
|
|
@ -99,12 +99,7 @@ struct reportpwrstate_parm {
|
|||
|
||||
static inline void _init_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_rtw_init_sema(plock, 1);
|
||||
}
|
||||
|
||||
static inline void _free_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_rtw_free_sema(plock);
|
||||
sema_init(plock, 1);
|
||||
}
|
||||
|
||||
static inline void _enter_pwrlock(struct semaphore *plock)
|
||||
|
@ -114,7 +109,7 @@ static inline void _enter_pwrlock(struct semaphore *plock)
|
|||
|
||||
static inline void _exit_pwrlock(struct semaphore *plock)
|
||||
{
|
||||
_rtw_up_sema(plock);
|
||||
up(plock);
|
||||
}
|
||||
|
||||
#define LPS_DELAY_TIME 1*HZ /* 1 sec */
|
||||
|
@ -197,7 +192,7 @@ struct pwrctrl_priv {
|
|||
u8 ips_mode_req; /* used to accept the mode setting request,
|
||||
* will update to ipsmode later */
|
||||
uint bips_processing;
|
||||
u32 ips_deny_time; /* will deny IPS when system time less than this */
|
||||
unsigned long ips_deny_time; /* will deny IPS when system time less than this */
|
||||
u8 ps_processing; /* temp used to mark whether in rtw_ps_processor */
|
||||
|
||||
u8 bLeisurePs;
|
||||
|
@ -211,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;
|
||||
|
@ -251,7 +242,6 @@ struct pwrctrl_priv {
|
|||
(pwrctrl)->pwr_state_check_interval)
|
||||
|
||||
void rtw_init_pwrctrl_priv(struct adapter *adapter);
|
||||
void rtw_free_pwrctrl_priv(struct adapter *adapter);
|
||||
|
||||
void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps,
|
||||
u8 bcn_ant_mode);
|
||||
|
@ -268,8 +258,6 @@ s32 LPS_RF_ON_check(struct adapter *adapter, u32 delay_ms);
|
|||
void LPS_Enter(struct adapter *adapter);
|
||||
void LPS_Leave(struct adapter *adapter);
|
||||
|
||||
u8 rtw_interface_ps_func(struct adapter *adapter,
|
||||
enum hal_intf_ps_func efunc_id, u8 *val);
|
||||
void rtw_set_ips_deny(struct adapter *adapter, u32 ms);
|
||||
int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms,
|
||||
const char *caller);
|
||||
|
|
|
@ -175,7 +175,6 @@ recv_thread(passive) ; returnpkt(dispatch)
|
|||
using enter_critical section to protect
|
||||
*/
|
||||
struct recv_priv {
|
||||
spinlock_t lock;
|
||||
struct __queue free_recv_queue;
|
||||
struct __queue recv_pending_queue;
|
||||
struct __queue uc_swdec_pending_queue;
|
||||
|
@ -189,11 +188,6 @@ struct recv_priv {
|
|||
u64 rx_drop;
|
||||
u64 last_rx_bytes;
|
||||
|
||||
uint rx_icv_err;
|
||||
uint rx_largepacket_crcerr;
|
||||
uint rx_smallpacket_crcerr;
|
||||
uint rx_middlepacket_crcerr;
|
||||
struct semaphore allrxreturnevt;
|
||||
uint ff_hwaddr;
|
||||
u8 rx_pending_cnt;
|
||||
|
||||
|
@ -213,9 +207,7 @@ struct recv_priv {
|
|||
u8 signal_strength;
|
||||
u8 signal_qual;
|
||||
u8 noise;
|
||||
int RxSNRdB[2];
|
||||
s8 RxRssi[2];
|
||||
int FalseAlmCnt_all;
|
||||
|
||||
struct timer_list signal_stat_timer;
|
||||
u32 signal_stat_sampling_interval;
|
||||
|
@ -235,22 +227,8 @@ struct sta_recv_priv {
|
|||
};
|
||||
|
||||
struct recv_buf {
|
||||
struct list_head list;
|
||||
spinlock_t recvbuf_lock;
|
||||
u32 ref_cnt;
|
||||
struct adapter *adapter;
|
||||
u8 *pbuf;
|
||||
u8 *pallocated_buf;
|
||||
u32 len;
|
||||
u8 *phead;
|
||||
u8 *pdata;
|
||||
u8 *ptail;
|
||||
u8 *pend;
|
||||
struct urb *purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
struct sk_buff *pskb;
|
||||
u8 reuse;
|
||||
};
|
||||
|
@ -270,94 +248,47 @@ 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;
|
||||
struct adapter *adapter;
|
||||
u8 fragcnt;
|
||||
int frame_tag;
|
||||
struct rx_pkt_attrib attrib;
|
||||
uint len;
|
||||
u8 *rx_head;
|
||||
u8 *rx_data;
|
||||
u8 *rx_tail;
|
||||
u8 *rx_end;
|
||||
void *precvbuf;
|
||||
struct sta_info *psta;
|
||||
/* for A-MPDU Rx reordering buffer control */
|
||||
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);
|
||||
int rtw_enqueue_recvbuf_to_head(struct recv_buf *buf, struct __queue *queue);
|
||||
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
/* append data before rx_data */
|
||||
|
||||
/* add data to the start of recv_frame
|
||||
*
|
||||
* This function extends the used data area of the recv_frame at the buffer
|
||||
* start. rx_data must be still larger than rx_head, after pushing.
|
||||
*/
|
||||
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;
|
||||
return NULL;
|
||||
}
|
||||
precvframe->u.hdr.len += sz;
|
||||
return precvframe->u.hdr.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 +297,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 +315,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 +335,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 +360,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
|
||||
|
|
|
@ -354,7 +354,7 @@ static const unsigned long K[64] = {
|
|||
#define RORc(x, y) \
|
||||
(((((unsigned long)(x) & 0xFFFFFFFFUL) >> (unsigned long)((y)&31)) | \
|
||||
((unsigned long)(x) << (unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
|
||||
#define Ch(x, y ,z) (z ^ (x & (y ^ z)))
|
||||
#define Ch(x, y , z) (z ^ (x & (y ^ z)))
|
||||
#define Maj(x, y, z) (((x | y) & z) | (x & y))
|
||||
#define S(x, n) RORc((x), (n))
|
||||
#define R(x, n) (((x)&0xFFFFFFFFUL)>>(n))
|
||||
|
@ -378,6 +378,5 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe);
|
|||
u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||
u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||
void rtw_wep_decrypt(struct adapter *padapter, u8 *precvframe);
|
||||
void rtw_use_tkipkey_handler(void *FunctionContext);
|
||||
|
||||
#endif /* __RTL871X_SECURITY_H_ */
|
||||
|
|
|
@ -24,11 +24,7 @@
|
|||
#include <drv_types.h>
|
||||
|
||||
struct sreset_priv {
|
||||
struct mutex silentreset_mutex;
|
||||
u8 silent_reset_inprogress;
|
||||
u8 Wifi_Error_Status;
|
||||
unsigned long last_tx_time;
|
||||
unsigned long last_tx_complete_time;
|
||||
};
|
||||
|
||||
#include <rtl8188e_hal.h>
|
||||
|
@ -43,7 +39,6 @@ struct sreset_priv {
|
|||
#define WIFI_IF_NOT_EXIST BIT6
|
||||
|
||||
void sreset_init_value(struct adapter *padapter);
|
||||
void sreset_reset_value(struct adapter *padapter);
|
||||
u8 sreset_get_wifi_status(struct adapter *padapter);
|
||||
void sreset_set_wifi_error_status(struct adapter *padapter, u32 status);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -182,21 +182,6 @@ struct sta_info {
|
|||
unsigned int sleepq_ac_len;
|
||||
#endif /* CONFIG_88EU_AP_MODE */
|
||||
|
||||
#ifdef CONFIG_88EU_P2P
|
||||
/* p2p priv data */
|
||||
u8 is_p2p_device;
|
||||
u8 p2p_status_code;
|
||||
|
||||
/* p2p client info */
|
||||
u8 dev_addr[ETH_ALEN];
|
||||
u8 dev_cap;
|
||||
u16 config_methods;
|
||||
u8 primary_dev_type[8];
|
||||
u8 num_of_secdev_type;
|
||||
u8 secdev_types_list[32];/* 32/8 == 4; */
|
||||
u16 dev_name_len;
|
||||
u8 dev_name[32];
|
||||
#endif /* CONFIG_88EU_P2P */
|
||||
u8 under_exist_checking;
|
||||
u8 keep_alive_trycnt;
|
||||
|
||||
|
|
|
@ -29,6 +29,16 @@
|
|||
|
||||
#define RTW_USB_BULKOUT_TIME 5000/* ms */
|
||||
|
||||
#define REALTEK_USB_VENQT_READ 0xC0
|
||||
#define REALTEK_USB_VENQT_WRITE 0x40
|
||||
|
||||
#define ALIGNMENT_UNIT 16
|
||||
#define MAX_VENDOR_REQ_CMD_SIZE 254 /* 8188cu SIE Support */
|
||||
#define MAX_USB_IO_CTL_SIZE (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
|
||||
|
||||
#define USB_HIGH_SPEED_BULK_SIZE 512
|
||||
#define USB_FULL_SPEED_BULK_SIZE 64
|
||||
|
||||
#define _usbctrl_vendorreq_async_callback(urb, regs) \
|
||||
_usbctrl_vendorreq_async_callback(urb)
|
||||
#define usb_bulkout_zero_complete(purb, regs) \
|
||||
|
@ -42,14 +52,36 @@
|
|||
#define usb_read_interrupt_complete(purb, regs) \
|
||||
usb_read_interrupt_complete(purb)
|
||||
|
||||
static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
|
||||
int buf_len)
|
||||
{
|
||||
u8 rst = true;
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
|
||||
if (pdvobjpriv->ishighspeed)
|
||||
rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
|
||||
true : false;
|
||||
else
|
||||
rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
|
||||
true : false;
|
||||
return rst;
|
||||
}
|
||||
|
||||
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
|
||||
|
||||
void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
|
||||
void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
|
||||
u8 usb_read8(struct adapter *adapter, u32 addr);
|
||||
u16 usb_read16(struct adapter *adapter, u32 addr);
|
||||
u32 usb_read32(struct adapter *adapter, u32 addr);
|
||||
|
||||
void usb_read_port_cancel(struct intf_hdl *pintfhdl);
|
||||
u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
void usb_read_port_cancel(struct adapter *adapter);
|
||||
|
||||
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
|
||||
void usb_write_port_cancel(struct intf_hdl *pintfhdl);
|
||||
int usb_write8(struct adapter *adapter, u32 addr, u8 val);
|
||||
int usb_write16(struct adapter *adapter, u32 addr, u16 val);
|
||||
int usb_write32(struct adapter *adapter, u32 addr, u32 val);
|
||||
int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata);
|
||||
|
||||
u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
|
||||
void usb_write_port_cancel(struct adapter *adapter);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
|
@ -766,27 +766,27 @@ enum ht_cap_ampdu_factor {
|
|||
#define OP_MODE_20MHZ_HT_STA_ASSOCED 2
|
||||
#define OP_MODE_MIXED 3
|
||||
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH ((u8) BIT(2))
|
||||
#define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3))
|
||||
#define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY ((u8) BIT(4))
|
||||
#define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY ((u8) BIT(5))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8)BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8)BIT(0))
|
||||
#define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8)BIT(0) | BIT(1))
|
||||
#define HT_INFO_HT_PARAM_REC_TRANS_CHNL_WIDTH ((u8)BIT(2))
|
||||
#define HT_INFO_HT_PARAM_RIFS_MODE ((u8)BIT(3))
|
||||
#define HT_INFO_HT_PARAM_CTRL_ACCESS_ONLY ((u8)BIT(4))
|
||||
#define HT_INFO_HT_PARAM_SRV_INTERVAL_GRANULARITY ((u8)BIT(5))
|
||||
|
||||
#define HT_INFO_OPERATION_MODE_OP_MODE_MASK \
|
||||
((u16) (0x0001 | 0x0002))
|
||||
((u16)(0x0001 | 0x0002))
|
||||
#define HT_INFO_OPERATION_MODE_OP_MODE_OFFSET 0
|
||||
#define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT ((u8) BIT(2))
|
||||
#define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT ((u8) BIT(3))
|
||||
#define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT ((u8) BIT(4))
|
||||
#define HT_INFO_OPERATION_MODE_NON_GF_DEVS_PRESENT ((u8)BIT(2))
|
||||
#define HT_INFO_OPERATION_MODE_TRANSMIT_BURST_LIMIT ((u8)BIT(3))
|
||||
#define HT_INFO_OPERATION_MODE_NON_HT_STA_PRESENT ((u8)BIT(4))
|
||||
|
||||
#define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16) BIT(6))
|
||||
#define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16) BIT(7))
|
||||
#define HT_INFO_STBC_PARAM_SECONDARY_BC ((u16) BIT(8))
|
||||
#define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED ((u16) BIT(9))
|
||||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16) BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16) BIT(11))
|
||||
#define HT_INFO_STBC_PARAM_DUAL_BEACON ((u16)BIT(6))
|
||||
#define HT_INFO_STBC_PARAM_DUAL_STBC_PROTECT ((u16)BIT(7))
|
||||
#define HT_INFO_STBC_PARAM_SECONDARY_BC ((u16)BIT(8))
|
||||
#define HT_INFO_STBC_PARAM_LSIG_TXOP_PROTECT_ALLOWED ((u16)BIT(9))
|
||||
#define HT_INFO_STBC_PARAM_PCO_ACTIVE ((u16)BIT(10))
|
||||
#define HT_INFO_STBC_PARAM_PCO_PHASE ((u16)BIT(11))
|
||||
|
||||
/* ===============WPS Section=============== */
|
||||
/* For WPSv1.0 */
|
||||
|
@ -1080,7 +1080,7 @@ enum P2P_PROTO_WK_ID {
|
|||
P2P_PRE_TX_PROVDISC_PROCESS_WK = 2,
|
||||
P2P_PRE_TX_NEGOREQ_PROCESS_WK = 3,
|
||||
P2P_PRE_TX_INVITEREQ_PROCESS_WK = 4,
|
||||
P2P_AP_P2P_CH_SWITCH_PROCESS_WK =5,
|
||||
P2P_AP_P2P_CH_SWITCH_PROCESS_WK = 5,
|
||||
P2P_RO_CH_WK = 6,
|
||||
};
|
||||
|
||||
|
|
|
@ -340,8 +340,4 @@ struct ndis_802_11_cap {
|
|||
struct ndis_802_11_auth_encrypt AuthenticationEncryptionSupported[1];
|
||||
};
|
||||
|
||||
u8 key_2char2num(u8 hch, u8 lch);
|
||||
u8 key_char2num(u8 ch);
|
||||
u8 str_2char2num(u8 hch, u8 lch);
|
||||
|
||||
#endif /* ifndef WLAN_BSSDEF_H_ */
|
||||
|
|
|
@ -32,10 +32,6 @@ struct pkt_file {
|
|||
size_t buf_len;
|
||||
};
|
||||
|
||||
extern int rtw_ht_enable;
|
||||
extern int rtw_cbw40_enable;
|
||||
extern int rtw_ampdu_enable;/* for enable tx_ampdu */
|
||||
|
||||
#define NR_XMITFRAME 256
|
||||
|
||||
struct xmit_priv;
|
||||
|
@ -53,8 +49,6 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter,
|
|||
void rtw_os_xmit_resource_free(struct adapter *padapter,
|
||||
struct xmit_buf *pxmitbuf, u32 free_sz);
|
||||
|
||||
void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pattrib);
|
||||
|
||||
uint rtw_remainder_len(struct pkt_file *pfile);
|
||||
void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||
uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue