mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-09 23:19:39 +00:00
rtl8188eu: Remove trailing white space from all source files
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
77e736c66a
commit
f5f3863bc5
205 changed files with 55371 additions and 55581 deletions
5203
core/rtw_ap.c
5203
core/rtw_ap.c
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -235,10 +235,10 @@ static unsigned char *scan_tlv(unsigned char *data, int len, unsigned char tag,
|
|||
{
|
||||
while (len > 0) {
|
||||
if (*data == tag && *(data+1) == len8b && len >= len8b*8)
|
||||
return data+2;
|
||||
|
||||
len -= (*(data+1))*8;
|
||||
data += (*(data+1))*8;
|
||||
return data+2;
|
||||
|
||||
len -= (*(data+1))*8;
|
||||
data += (*(data+1))*8;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -248,16 +248,16 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
{
|
||||
struct icmp6hdr *icmphdr = (struct icmp6hdr *)data;
|
||||
unsigned char *mac;
|
||||
|
||||
if (icmphdr->icmp6_type == NDISC_ROUTER_SOLICITATION) {
|
||||
|
||||
if (icmphdr->icmp6_type == NDISC_ROUTER_SOLICITATION) {
|
||||
if (len >= 8) {
|
||||
mac = scan_tlv(&data[8], len-8, 1, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Router Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,55 +266,55 @@ static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char
|
|||
mac = scan_tlv(&data[16], len-16, 1, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Router Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icmphdr->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) {
|
||||
if (len >= 24) {
|
||||
mac = scan_tlv(&data[24], len-24, 1, 1);
|
||||
if (mac) {
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Neighbor Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icmphdr->icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT) {
|
||||
if (len >= 24) {
|
||||
mac = scan_tlv(&data[24], len-24, 2, 1);
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Neighbor Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (icmphdr->icmp6_type == NDISC_REDIRECT) {
|
||||
if (len >= 40) {
|
||||
mac = scan_tlv(&data[40], len-40, 2, 1);
|
||||
if (mac) {
|
||||
if (mac) {
|
||||
_DEBUG_INFO("Redirect, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
mac[0],mac[1],mac[2],mac[3],mac[4],mac[5],
|
||||
replace_mac[0],replace_mac[1],replace_mac[2],replace_mac[3],replace_mac[4],replace_mac[5]);
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
memcpy(mac, replace_mac, 6);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
||||
{
|
||||
{
|
||||
struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN);
|
||||
unsigned char *dst_mac = skb->data;
|
||||
|
||||
|
@ -324,7 +324,7 @@ static void convert_ipv6_mac_to_mc(struct sk_buff *skb)
|
|||
dst_mac[0] = 0x33;
|
||||
dst_mac[1] = 0x33;
|
||||
memcpy(&dst_mac[2], &iph->daddr.s6_addr32[3], 4);
|
||||
#if defined(__LINUX_2_6__)
|
||||
#if defined(__LINUX_2_6__)
|
||||
/*modified by qinjunjie,warning:should not remove next line*/
|
||||
skb->pkt_type = PACKET_MULTICAST;
|
||||
#endif
|
||||
|
@ -376,10 +376,10 @@ static __inline__ int __nat25_network_hash(unsigned char *networkAddr)
|
|||
networkAddr[6] ^ networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10] ^
|
||||
networkAddr[11] ^ networkAddr[12] ^ networkAddr[13] ^ networkAddr[14] ^ networkAddr[15] ^
|
||||
networkAddr[16];
|
||||
|
||||
|
||||
return x & (NAT25_HASH_SIZE - 1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
else
|
||||
{
|
||||
unsigned long x = 0;
|
||||
|
@ -445,8 +445,8 @@ static int __nat25_db_network_lookup_and_replace(_adapter *priv,
|
|||
atomic_inc(&db->use_count);
|
||||
|
||||
#ifdef CL_IPV6_PASS
|
||||
DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x%02x%02x\n",
|
||||
DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x%02x%02x\n",
|
||||
db->macAddr[0],
|
||||
db->macAddr[1],
|
||||
db->macAddr[2],
|
||||
|
@ -470,7 +470,7 @@ static int __nat25_db_network_lookup_and_replace(_adapter *priv,
|
|||
db->networkAddr[14],
|
||||
db->networkAddr[15],
|
||||
db->networkAddr[16]);
|
||||
#else
|
||||
#else
|
||||
DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
|
||||
db->macAddr[0],
|
||||
db->macAddr[1],
|
||||
|
@ -637,7 +637,7 @@ void nat25_db_cleanup(_adapter *priv)
|
|||
int i;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
|
||||
|
||||
for (i=0; i<NAT25_HASH_SIZE; i++)
|
||||
{
|
||||
struct nat25_network_db_entry *f;
|
||||
|
@ -668,7 +668,7 @@ void nat25_db_expire(_adapter *priv)
|
|||
int i;
|
||||
_irqL irqL;
|
||||
_enter_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
|
||||
|
||||
//if (!priv->ethBrExtInfo.nat25_disable)
|
||||
{
|
||||
for (i=0; i<NAT25_HASH_SIZE; i++)
|
||||
|
@ -1410,7 +1410,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||
}
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/* Handle IPV6 frame */
|
||||
/* Handle IPV6 frame */
|
||||
/*---------------------------------------------------*/
|
||||
#ifdef CL_IPV6_PASS
|
||||
else if (protocol == __constant_htons(ETH_P_IPV6))
|
||||
|
@ -1427,13 +1427,13 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||
{
|
||||
case NAT25_CHECK:
|
||||
if (skb->data[0] & 1)
|
||||
return 0;
|
||||
return 0;
|
||||
return -1;
|
||||
|
||||
case NAT25_INSERT:
|
||||
{
|
||||
DEBUG_INFO("NAT25: Insert IP, SA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0],iph->saddr.s6_addr16[1],iph->saddr.s6_addr16[2],iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4],iph->saddr.s6_addr16[5],iph->saddr.s6_addr16[6],iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0],iph->daddr.s6_addr16[1],iph->daddr.s6_addr16[2],iph->daddr.s6_addr16[3],
|
||||
|
@ -1444,10 +1444,10 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||
__nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
|
||||
__nat25_db_print(priv);
|
||||
|
||||
if (iph->nexthdr == IPPROTO_ICMPV6 &&
|
||||
if (iph->nexthdr == IPPROTO_ICMPV6 &&
|
||||
skb->len > (ETH_HLEN + sizeof(*iph) + 4)) {
|
||||
if (update_nd_link_layer_addr(skb->data + ETH_HLEN + sizeof(*iph),
|
||||
skb->len - ETH_HLEN - sizeof(*iph), GET_MY_HWADDR(priv))) {
|
||||
if (update_nd_link_layer_addr(skb->data + ETH_HLEN + sizeof(*iph),
|
||||
skb->len - ETH_HLEN - sizeof(*iph), GET_MY_HWADDR(priv))) {
|
||||
struct icmp6hdr *hdr = (struct icmp6hdr *)(skb->data + ETH_HLEN + sizeof(*iph));
|
||||
hdr->icmp6_cksum = 0;
|
||||
hdr->icmp6_cksum = csum_ipv6_magic(&iph->saddr, &iph->daddr,
|
||||
|
@ -1455,26 +1455,26 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
|
|||
IPPROTO_ICMPV6,
|
||||
csum_partial((__u8 *)hdr, iph->payload_len, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
case NAT25_LOOKUP:
|
||||
DEBUG_INFO("NAT25: Lookup IP, SA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
" DA=%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
|
||||
iph->saddr.s6_addr16[0],iph->saddr.s6_addr16[1],iph->saddr.s6_addr16[2],iph->saddr.s6_addr16[3],
|
||||
iph->saddr.s6_addr16[4],iph->saddr.s6_addr16[5],iph->saddr.s6_addr16[6],iph->saddr.s6_addr16[7],
|
||||
iph->daddr.s6_addr16[0],iph->daddr.s6_addr16[1],iph->daddr.s6_addr16[2],iph->daddr.s6_addr16[3],
|
||||
iph->daddr.s6_addr16[4],iph->daddr.s6_addr16[5],iph->daddr.s6_addr16[6],iph->daddr.s6_addr16[7]);
|
||||
|
||||
|
||||
|
||||
__nat25_generate_ipv6_network_addr(networkAddr, (unsigned int *)&iph->daddr);
|
||||
if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
|
||||
#ifdef SUPPORT_RX_UNI2MCAST
|
||||
#ifdef SUPPORT_RX_UNI2MCAST
|
||||
if (iph->daddr.s6_addr[0] == 0xff)
|
||||
convert_ipv6_mac_to_mc(skb);
|
||||
#endif
|
||||
convert_ipv6_mac_to_mc(skb);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
@ -1535,12 +1535,12 @@ int nat25_handle_frame(_adapter *priv, struct sk_buff *skb)
|
|||
(*((unsigned short *)(skb->data+ETH_ALEN*2)) == __constant_htons(ETH_P_IP)) &&
|
||||
!memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) {
|
||||
memcpy(skb->data, priv->scdb_mac, ETH_ALEN);
|
||||
|
||||
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
}
|
||||
else {
|
||||
_exit_critical_bh(&priv->br_ext_lock, &irqL);
|
||||
|
||||
|
||||
retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
|
||||
}
|
||||
}
|
||||
|
@ -1669,4 +1669,3 @@ void *scdb_findEntry(_adapter *priv, unsigned char *macAddr,
|
|||
}
|
||||
|
||||
#endif // CONFIG_BR_EXT
|
||||
|
||||
|
|
789
core/rtw_cmd.c
789
core/rtw_cmd.c
File diff suppressed because it is too large
Load diff
335
core/rtw_debug.c
335
core/rtw_debug.c
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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.
|
||||
|
@ -67,11 +67,11 @@ int proc_get_drv_version(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "%s\n", DRIVERVERSION);
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
|
|||
{
|
||||
DBG_871X("argument size is less than 3\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%x %x %x", &addr, &val, &len);
|
||||
|
||||
|
@ -110,23 +110,23 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
|
|||
switch (len)
|
||||
{
|
||||
case 1:
|
||||
rtw_write8(padapter, addr, (u8)val);
|
||||
rtw_write8(padapter, addr, (u8)val);
|
||||
break;
|
||||
case 2:
|
||||
rtw_write16(padapter, addr, (u16)val);
|
||||
rtw_write16(padapter, addr, (u16)val);
|
||||
break;
|
||||
case 4:
|
||||
rtw_write32(padapter, addr, val);
|
||||
rtw_write32(padapter, addr, val);
|
||||
break;
|
||||
default:
|
||||
DBG_871X("error write length=%d", len);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
static u32 proc_get_read_addr=0xeeeeeeee;
|
||||
|
@ -135,21 +135,21 @@ static u32 proc_get_read_len=0x4;
|
|||
int proc_get_read_reg(char *page, char **start,
|
||||
off_t offset, int count,
|
||||
int *eof, void *data)
|
||||
{
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
int len = 0;
|
||||
|
||||
if (proc_get_read_addr==0xeeeeeeee)
|
||||
{
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
}
|
||||
|
||||
switch (proc_get_read_len)
|
||||
{
|
||||
case 1:
|
||||
case 1:
|
||||
len += snprintf(page + len, count - len, "rtw_read8(0x%x)=0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
|
||||
break;
|
||||
case 2:
|
||||
|
@ -178,9 +178,9 @@ int proc_set_read_reg(struct file *file, const char __user *buffer,
|
|||
{
|
||||
DBG_871X("argument size is less than 2\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%x %x", &addr, &len);
|
||||
|
||||
|
@ -190,10 +190,10 @@ int proc_set_read_reg(struct file *file, const char __user *buffer,
|
|||
}
|
||||
|
||||
proc_get_read_addr = addr;
|
||||
|
||||
|
||||
proc_get_read_len = len;
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
@ -205,11 +205,11 @@ int proc_get_fwstate(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "fwstate=0x%x\n", get_fwstate(pmlmepriv));
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -219,15 +219,15 @@ int proc_get_sec_info(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
|
||||
len += snprintf(page + len, count - len, "auth_alg=0x%x, enc_alg=0x%x, auth_type=0x%x, enc_type=0x%x\n",
|
||||
psecuritypriv->dot11AuthAlgrthm, psecuritypriv->dot11PrivacyAlgrthm,
|
||||
psecuritypriv->ndisauthtype, psecuritypriv->ndisencryptstatus);
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -237,14 +237,14 @@ int proc_get_mlmext_state(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "pmlmeinfo->state=0x%x\n", pmlmeinfo->state);
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -256,11 +256,11 @@ int proc_get_qos_option(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "qos_option=%d\n", pmlmepriv->qospriv.qos_option);
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
|
@ -273,7 +273,7 @@ int proc_get_ht_option(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
int len = 0;
|
||||
#ifdef CONFIG_80211N_HT
|
||||
len += snprintf(page + len, count - len, "ht_option=%d\n", pmlmepriv->htpriv.ht_option);
|
||||
|
@ -287,14 +287,14 @@ int proc_get_rf_info(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offet=%d\n",
|
||||
len += snprintf(page + len, count - len, "cur_ch=%d, cur_bw=%d, cur_ch_offet=%d\n",
|
||||
pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
|
||||
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
|
@ -318,31 +318,31 @@ int proc_get_ap_info(char *page, char **start,
|
|||
{
|
||||
int i;
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
|
||||
len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid);
|
||||
|
||||
len += snprintf(page + len, count - len, "SSID=%s\n", cur_network->network.Ssid.Ssid);
|
||||
len += snprintf(page + len, count - len, "sta's macaddr:" MAC_FMT "\n", MAC_ARG(psta->hwaddr));
|
||||
len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
len += snprintf(page + len, count - len, "cur_channel=%d, cur_bwmode=%d, cur_ch_offset=%d\n", pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset);
|
||||
len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
|
||||
for (i=0;i<16;i++)
|
||||
{
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
if (preorder_ctrl->enable)
|
||||
{
|
||||
len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", i, preorder_ctrl->indicate_seq);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
len += snprintf(page + len, count - len, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress));
|
||||
}
|
||||
|
||||
|
@ -358,15 +358,15 @@ int proc_get_adapter_state(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "bSurpriseRemoved=%d, bDriverStopped=%d\n",
|
||||
|
||||
len += snprintf(page + len, count - len, "bSurpriseRemoved=%d, bDriverStopped=%d\n",
|
||||
padapter->bSurpriseRemoved, padapter->bDriverStopped);
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int proc_get_trx_info(char *page, char **start,
|
||||
off_t offset, int count,
|
||||
int *eof, void *data)
|
||||
|
@ -376,8 +376,8 @@ int proc_get_trx_info(char *page, char **start,
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_ext_xmitbuf_cnt=%d, free_recvframe_cnt=%d\n",
|
||||
|
||||
len += snprintf(page + len, count - len, "free_xmitbuf_cnt=%d, free_xmitframe_cnt=%d, free_ext_xmitbuf_cnt=%d, free_recvframe_cnt=%d\n",
|
||||
pxmitpriv->free_xmitbuf_cnt, pxmitpriv->free_xmitframe_cnt,pxmitpriv->free_xmit_extbuf_cnt, precvpriv->free_recvframe_cnt);
|
||||
#ifdef CONFIG_USB_HCI
|
||||
len += snprintf(page + len, count - len, "rx_urb_pending_cn=%d\n", precvpriv->rx_pending_cnt);
|
||||
|
@ -400,10 +400,10 @@ int proc_get_mac_reg_dump1(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
|
||||
for (i=0x0;i<0x300;i+=4)
|
||||
{
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
|
@ -423,12 +423,12 @@ int proc_get_mac_reg_dump2(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
memset(page, 0, count);
|
||||
for (i=0x300;i<0x600;i+=4)
|
||||
{
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
|
@ -446,10 +446,10 @@ int proc_get_mac_reg_dump3(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "\n======= MAC REG =======\n");
|
||||
|
||||
for (i=0x600;i<0x800;i+=4)
|
||||
{
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
|
@ -462,19 +462,19 @@ int proc_get_bb_reg_dump1(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i,j=1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0x800;i<0xB00;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
int proc_get_bb_reg_dump2(char *page, char **start,
|
||||
|
@ -482,19 +482,19 @@ int proc_get_bb_reg_dump2(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i,j=1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0xB00;i<0xE00;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
int proc_get_bb_reg_dump3(char *page, char **start,
|
||||
|
@ -502,19 +502,19 @@ int proc_get_bb_reg_dump3(char *page, char **start,
|
|||
int *eof, void *data)
|
||||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1;
|
||||
int i,j=1;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n======= BB REG =======\n");
|
||||
for (i=0xE00;i<0x1000;i+=4)
|
||||
{
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
if (j%4==1) len += snprintf(page + len, count - len,"0x%02x",i);
|
||||
len += snprintf(page + len, count - len," 0x%08x ",rtw_read32(padapter,i));
|
||||
if ((j++)%4 == 0) len += snprintf(page + len, count - len,"\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
int proc_get_rf_reg_dump1(char *page, char **start,
|
||||
|
@ -526,21 +526,21 @@ int proc_get_rf_reg_dump1(char *page, char **start,
|
|||
int len = 0;
|
||||
int i,j=1,path;
|
||||
u32 value;
|
||||
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
path = 1;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0;i<0xC0;i++)
|
||||
{
|
||||
{
|
||||
//value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord);
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
@ -552,21 +552,21 @@ int proc_get_rf_reg_dump2(char *page, char **start,
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
u32 value;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
path = 1;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0xC0;i<0x100;i++)
|
||||
{
|
||||
{
|
||||
//value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord);
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
@ -578,22 +578,22 @@ int proc_get_rf_reg_dump3(char *page, char **start,
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
int len = 0;
|
||||
int i,j=1,path;
|
||||
u32 value;
|
||||
u32 value;
|
||||
|
||||
len += snprintf(page + len, count - len, "\n======= RF REG =======\n");
|
||||
path = 2;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0;i<0xC0;i++)
|
||||
{
|
||||
{
|
||||
//value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord);
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
len += snprintf(page + len, count - len, " 0x%08x ",value);
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
@ -611,7 +611,7 @@ int proc_get_rf_reg_dump4(char *page, char **start,
|
|||
path = 2;
|
||||
len += snprintf(page + len, count - len, "\nRF_Path(%x)\n",path);
|
||||
for (i=0xC0;i<0x100;i++)
|
||||
{
|
||||
{
|
||||
//value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord);
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) len += snprintf(page + len, count - len, "0x%02x ",i);
|
||||
|
@ -619,11 +619,11 @@ int proc_get_rf_reg_dump4(char *page, char **start,
|
|||
if ((j++)%4==0) len += snprintf(page + len, count - len, "\n");
|
||||
}
|
||||
*eof = 1;
|
||||
return len;
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int proc_get_rx_signal(char *page, char **start,
|
||||
off_t offset, int count,
|
||||
int *eof, void *data)
|
||||
|
@ -631,7 +631,7 @@ int proc_get_rx_signal(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len,
|
||||
|
@ -639,14 +639,14 @@ int proc_get_rx_signal(char *page, char **start,
|
|||
"rxpwdb:%d\n"
|
||||
"signal_strength:%u\n"
|
||||
"signal_qual:%u\n"
|
||||
"noise:%u\n",
|
||||
"noise:%u\n",
|
||||
padapter->recvpriv.rssi,
|
||||
padapter->recvpriv.rxpwdb,
|
||||
padapter->recvpriv.signal_strength,
|
||||
padapter->recvpriv.signal_qual,
|
||||
padapter->recvpriv.noise
|
||||
);
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -662,15 +662,15 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
|||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
|
||||
|
||||
is_signal_dbg = is_signal_dbg==0?0:1;
|
||||
|
||||
|
||||
if (is_signal_dbg && num!=2)
|
||||
return count;
|
||||
|
||||
|
||||
signal_strength = signal_strength>100?100:signal_strength;
|
||||
signal_strength = signal_strength<0?0:signal_strength;
|
||||
|
||||
|
@ -681,11 +681,11 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
|||
DBG_871X("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
|
||||
else
|
||||
DBG_871X("set %s\n", "HW_SIGNAL_STRENGTH");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
#ifdef CONFIG_80211N_HT
|
||||
|
||||
|
@ -696,9 +696,9 @@ int proc_get_ht_enable(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
|
||||
if (pregpriv)
|
||||
len += snprintf(page + len, count - len,
|
||||
"%d\n",
|
||||
|
@ -721,7 +721,7 @@ int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
|||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%d ", &mode);
|
||||
|
||||
|
@ -731,9 +731,9 @@ int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
|||
printk("ht_enable=%d\n", pregpriv->ht_enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int proc_get_cbw40_enable(char *page, char **start,
|
||||
|
@ -743,7 +743,7 @@ int proc_get_cbw40_enable(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
if (pregpriv)
|
||||
|
@ -768,7 +768,7 @@ int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
|||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%d ", &mode);
|
||||
|
||||
|
@ -780,9 +780,9 @@ int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int proc_get_ampdu_enable(char *page, char **start,
|
||||
|
@ -792,7 +792,7 @@ int proc_get_ampdu_enable(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
if (pregpriv)
|
||||
|
@ -817,7 +817,7 @@ int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
|||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%d ", &mode);
|
||||
|
||||
|
@ -828,9 +828,9 @@ int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
|
@ -840,9 +840,9 @@ int proc_get_two_path_rssi(char *page, char **start,
|
|||
{
|
||||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
|
||||
if (padapter)
|
||||
len += snprintf(page + len, count - len,
|
||||
"%d %d\n",
|
||||
|
@ -861,7 +861,7 @@ int proc_get_rx_stbc(char *page, char **start,
|
|||
struct net_device *dev = data;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
if (pregpriv)
|
||||
|
@ -886,7 +886,7 @@ int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
|||
if (count < 1)
|
||||
return -EFAULT;
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%d ", &mode);
|
||||
|
||||
|
@ -896,9 +896,9 @@ int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
|||
printk("rx_stbc=%d\n", mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
#endif //CONFIG_80211N_HT
|
||||
|
||||
|
@ -923,9 +923,9 @@ int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
|||
{
|
||||
DBG_8192C("argument size is less than 1\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||
|
||||
int num = sscanf(tmp, "%x", &enable);
|
||||
|
||||
|
@ -933,25 +933,25 @@ int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
|||
DBG_8192C("invalid set_rssi_disp parameter!\n");
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
if (enable)
|
||||
{
|
||||
{
|
||||
DBG_8192C("Turn On Rx RSSI Display Function\n");
|
||||
padapter->bRxRSSIDisplay = enable ;
|
||||
padapter->bRxRSSIDisplay = enable ;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_8192C("Turn Off Rx RSSI Display Function\n");
|
||||
padapter->bRxRSSIDisplay = 0 ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
int proc_get_all_sta_info(char *page, char **start,
|
||||
|
@ -966,18 +966,18 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
int i, j;
|
||||
_list *plist, *phead;
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
int len = 0;
|
||||
|
||||
int len = 0;
|
||||
|
||||
|
||||
len += snprintf(page + len, count - len, "sta_dz_bitmap=0x%x, tim_bitmap=0x%x\n", pstapriv->sta_dz_bitmap, pstapriv->tim_bitmap);
|
||||
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
for (i=0; i< NUM_STA; i++)
|
||||
{
|
||||
phead = &(pstapriv->sta_hash[i]);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
@ -990,9 +990,9 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "rtsen=%d, cts2slef=%d\n", psta->rtsen, psta->cts2self);
|
||||
len += snprintf(page + len, count - len, "state=0x%x, aid=%d, macid=%d, raid=%d\n", psta->state, psta->aid, psta->mac_id, psta->raid);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "qos_en=%d, ht_en=%d, init_rate=%d\n", psta->qos_option, psta->htpriv.ht_option, psta->init_rate);
|
||||
len += snprintf(page + len, count - len, "bwmode=%d, ch_offset=%d, sgi=%d\n", psta->htpriv.bwmode, psta->htpriv.ch_offset, psta->htpriv.sgi);
|
||||
len += snprintf(page + len, count - len, "ampdu_enable = %d\n", psta->htpriv.ampdu_enable);
|
||||
len += snprintf(page + len, count - len, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
|
||||
#endif //CONFIG_80211N_HT
|
||||
len += snprintf(page + len, count - len, "sleepq_len=%d\n", psta->sleepq_len);
|
||||
|
@ -1003,30 +1003,30 @@ int proc_get_all_sta_info(char *page, char **start,
|
|||
len += snprintf(page + len, count - len, "wpa2_pairwise_cipher=0x%x\n", psta->wpa2_pairwise_cipher);
|
||||
len += snprintf(page + len, count - len, "qos_info=0x%x\n", psta->qos_info);
|
||||
len += snprintf(page + len, count - len, "dot118021XPrivacy=0x%x\n", psta->dot118021XPrivacy);
|
||||
|
||||
|
||||
for (j=0;j<16;j++)
|
||||
{
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[j];
|
||||
if (preorder_ctrl->enable)
|
||||
{
|
||||
len += snprintf(page + len, count - len, "tid=%d, indicate_seq=%d\n", j, preorder_ctrl->indicate_seq);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DBG_MEMORY_LEAK
|
||||
#include <asm/atomic.h>
|
||||
|
@ -1037,12 +1037,12 @@ int proc_get_malloc_cnt(char *page, char **start,
|
|||
off_t offset, int count,
|
||||
int *eof, void *data)
|
||||
{
|
||||
|
||||
|
||||
int len = 0;
|
||||
|
||||
len += snprintf(page + len, count - len, "_malloc_cnt=%d\n", atomic_read(&_malloc_cnt));
|
||||
len += snprintf(page + len, count - len, "_malloc_size=%d\n", atomic_read(&_malloc_size));
|
||||
|
||||
|
||||
*eof = 1;
|
||||
return len;
|
||||
}
|
||||
|
@ -1064,8 +1064,8 @@ int proc_get_best_channel(char *page, char **start,
|
|||
index_24G = i;
|
||||
if ( pmlmeext->channel_set[i].ChannelNum == 36)
|
||||
index_5G = i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) {
|
||||
// 2.4G
|
||||
if ( pmlmeext->channel_set[i].ChannelNum == 6 ) {
|
||||
|
@ -1096,11 +1096,11 @@ int proc_get_best_channel(char *page, char **start,
|
|||
}
|
||||
}
|
||||
#if 1 // debug
|
||||
len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n",
|
||||
len += snprintf(page + len, count - len, "The rx cnt of channel %3d = %d\n",
|
||||
pmlmeext->channel_set[i].ChannelNum, pmlmeext->channel_set[i].rx_count);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
len += snprintf(page + len, count - len, "best_channel_5G = %d\n", best_channel_5G);
|
||||
len += snprintf(page + len, count - len, "best_channel_24G = %d\n", best_channel_24G);
|
||||
|
||||
|
@ -1156,9 +1156,9 @@ int proc_set_btcoex_dbg(struct file *file, const char __user *buffer,
|
|||
printk("btcoex_dbg=%d\n", BTCoexDbgLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1166,4 +1166,3 @@ int proc_set_btcoex_dbg(struct file *file, const char __user *buffer,
|
|||
#endif /* CONFIG_BT_COEXIST */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
206
core/rtw_efuse.c
206
core/rtw_efuse.c
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -77,12 +77,12 @@ BOOLEAN
|
|||
Efuse_Write1ByteToFakeContent(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 Offset,
|
||||
IN u8 Value );
|
||||
IN u8 Value );
|
||||
BOOLEAN
|
||||
Efuse_Write1ByteToFakeContent(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 Offset,
|
||||
IN u8 Value )
|
||||
IN u8 Value )
|
||||
{
|
||||
if (Offset >= EFUSE_MAX_HW_SIZE)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ Efuse_Write1ByteToFakeContent(
|
|||
/*-----------------------------------------------------------------------------
|
||||
* Function: Efuse_PowerSwitch
|
||||
*
|
||||
* Overview: When we want to enable write operation, we should change to
|
||||
* Overview: When we want to enable write operation, we should change to
|
||||
* pwr on state. When we stop write, we should switch to 500k mode
|
||||
* and disable LDO 2.5V.
|
||||
*
|
||||
|
@ -112,7 +112,7 @@ Efuse_Write1ByteToFakeContent(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/17/2008 MHC Create Version 0.
|
||||
* 11/17/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
VOID
|
||||
|
@ -122,7 +122,7 @@ Efuse_PowerSwitch(
|
|||
IN u8 PwrState)
|
||||
{
|
||||
pAdapter->HalFunc.EfusePowerSwitch(pAdapter, bWrite, PwrState);
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Function: efuse_GetCurrentSize
|
||||
|
@ -137,7 +137,7 @@ Efuse_PowerSwitch(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/16/2008 MHC Create Version 0.
|
||||
* 11/16/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
u16
|
||||
|
@ -179,9 +179,9 @@ Efuse_CalculateWordCnts(IN u8 word_en)
|
|||
VOID
|
||||
ReadEFuseByte(
|
||||
PADAPTER Adapter,
|
||||
u16 _offset,
|
||||
u8 *pbuf,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
u16 _offset,
|
||||
u8 *pbuf,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
{
|
||||
u32 value32;
|
||||
u8 readbyte;
|
||||
|
@ -195,14 +195,14 @@ ReadEFuseByte(
|
|||
}
|
||||
|
||||
//Write Address
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
|
||||
readbyte = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
|
||||
|
||||
//Write bit 32 0
|
||||
readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
|
||||
|
||||
readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
|
||||
|
||||
//Check bit 32 read-ready
|
||||
retry = 0;
|
||||
value32 = rtw_read32(Adapter, EFUSE_CTRL);
|
||||
|
@ -219,16 +219,16 @@ ReadEFuseByte(
|
|||
// result will always stay on last data we read.
|
||||
rtw_udelay_os(50);
|
||||
value32 = rtw_read32(Adapter, EFUSE_CTRL);
|
||||
|
||||
|
||||
*pbuf = (u8)(value32 & 0xff);
|
||||
//DBG_871X("ReadEFuseByte _offset:%08u, in %d ms\n",_offset ,rtw_get_passing_time_ms(start));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Description:
|
||||
// 1. Execute E-Fuse read byte operation according as map offset and
|
||||
// 1. Execute E-Fuse read byte operation according as map offset and
|
||||
// save to E-Fuse table.
|
||||
// 2. Refered from SD1 Richard.
|
||||
//
|
||||
|
@ -238,7 +238,7 @@ ReadEFuseByte(
|
|||
//
|
||||
// Created by Roger, 2008.10.21.
|
||||
//
|
||||
// 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description.
|
||||
// 2008/12/12 MH 1. Reorganize code flow and reserve bytes. and add description.
|
||||
// 2. Add efuse utilization collect.
|
||||
// 2008/12/22 MH Read Efuse must check if we write section 1 data again!!! Sec1
|
||||
// write addr must be after sec5.
|
||||
|
@ -249,8 +249,8 @@ efuse_ReadEFuse(
|
|||
PADAPTER Adapter,
|
||||
u8 efuseType,
|
||||
u16 _offset,
|
||||
u16 _size_byte,
|
||||
u8 *pbuf,
|
||||
u16 _size_byte,
|
||||
u8 *pbuf,
|
||||
IN BOOLEAN bPseudoTest
|
||||
);
|
||||
VOID
|
||||
|
@ -258,8 +258,8 @@ efuse_ReadEFuse(
|
|||
PADAPTER Adapter,
|
||||
u8 efuseType,
|
||||
u16 _offset,
|
||||
u16 _size_byte,
|
||||
u8 *pbuf,
|
||||
u16 _size_byte,
|
||||
u8 *pbuf,
|
||||
IN BOOLEAN bPseudoTest
|
||||
)
|
||||
{
|
||||
|
@ -291,12 +291,12 @@ EFUSE_GetEfuseDefinition(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 09/23/2008 MHC Copy from WMAC.
|
||||
* 09/23/2008 MHC Copy from WMAC.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
u8
|
||||
EFUSE_Read1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
EFUSE_Read1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
IN u16 Address)
|
||||
{
|
||||
u8 data;
|
||||
|
@ -310,12 +310,12 @@ EFUSE_Read1Byte(
|
|||
if (Address < contentLen) //E-fuse 512Byte
|
||||
{
|
||||
//Write E-fuse Register address bit0~7
|
||||
temp = Address & 0xFF;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
temp = Address & 0xFF;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
//Write E-fuse Register address bit8~9
|
||||
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
|
||||
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
|
||||
|
||||
//Write 0x30[31]=0
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
|
@ -325,7 +325,7 @@ EFUSE_Read1Byte(
|
|||
//Wait Write-ready (0x30[31]=1)
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
while (!(Bytetemp & 0x80))
|
||||
{
|
||||
{
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
k++;
|
||||
if (k==1000)
|
||||
|
@ -339,7 +339,7 @@ EFUSE_Read1Byte(
|
|||
}
|
||||
else
|
||||
return 0xFF;
|
||||
|
||||
|
||||
}/* EFUSE_Read1Byte */
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -355,18 +355,18 @@ EFUSE_Read1Byte(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 09/23/2008 MHC Copy from WMAC.
|
||||
* 09/23/2008 MHC Copy from WMAC.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
EFUSE_Write1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
void
|
||||
EFUSE_Write1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
IN u16 Address,
|
||||
IN u8 Value);
|
||||
void
|
||||
EFUSE_Write1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
void
|
||||
EFUSE_Write1Byte(
|
||||
IN PADAPTER Adapter,
|
||||
IN u16 Address,
|
||||
IN u8 Value)
|
||||
{
|
||||
|
@ -383,13 +383,13 @@ EFUSE_Write1Byte(
|
|||
rtw_write8(Adapter, EFUSE_CTRL, Value);
|
||||
|
||||
//Write E-fuse Register address bit0~7
|
||||
temp = Address & 0xFF;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
|
||||
temp = Address & 0xFF;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
|
||||
//Write E-fuse Register address bit8~9
|
||||
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
|
||||
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
|
||||
|
||||
//Write 0x30[31]=1
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
|
@ -400,7 +400,7 @@ EFUSE_Write1Byte(
|
|||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
while (Bytetemp & 0x80)
|
||||
{
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
k++;
|
||||
if (k==100)
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ EFUSE_Write1Byte(
|
|||
/* 11/16/2008 MH Read one byte from real Efuse. */
|
||||
u8
|
||||
efuse_OneByteRead(
|
||||
IN PADAPTER pAdapter,
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 addr,
|
||||
IN u8 *data,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
|
@ -428,35 +428,35 @@ efuse_OneByteRead(
|
|||
return bResult;
|
||||
}
|
||||
// -----------------e-fuse reg ctrl ---------------------------------
|
||||
//address
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) &0x03) ) |
|
||||
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC ));
|
||||
//address
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) &0x03) ) |
|
||||
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC ));
|
||||
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);//read cmd
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+3, 0x72);//read cmd
|
||||
|
||||
while (!(0x80 &rtw_read8(pAdapter, EFUSE_CTRL+3))&&(tmpidx<100))
|
||||
{
|
||||
tmpidx++;
|
||||
}
|
||||
if (tmpidx<100)
|
||||
{
|
||||
*data=rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
{
|
||||
*data=rtw_read8(pAdapter, EFUSE_CTRL);
|
||||
bResult = _TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
*data = 0xff;
|
||||
*data = 0xff;
|
||||
bResult = _FALSE;
|
||||
}
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
||||
/* 11/16/2008 MH Write one byte to reald Efuse. */
|
||||
u8
|
||||
efuse_OneByteWrite(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 addr,
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 addr,
|
||||
IN u8 data,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
{
|
||||
|
@ -472,29 +472,29 @@ efuse_OneByteWrite(
|
|||
|
||||
//return 0;
|
||||
|
||||
// -----------------e-fuse reg ctrl ---------------------------------
|
||||
//address
|
||||
// -----------------e-fuse reg ctrl ---------------------------------
|
||||
//address
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+2,
|
||||
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC )|(u8)((addr>>8)&0x03) );
|
||||
rtw_write8(pAdapter, EFUSE_CTRL, data);//data
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+2,
|
||||
(rtw_read8(pAdapter, EFUSE_CTRL+2)&0xFC )|(u8)((addr>>8)&0x03) );
|
||||
rtw_write8(pAdapter, EFUSE_CTRL, data);//data
|
||||
|
||||
rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);//write cmd
|
||||
|
||||
|
||||
while ((0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx<100) ){
|
||||
tmpidx++;
|
||||
}
|
||||
|
||||
|
||||
if (tmpidx<100)
|
||||
{
|
||||
{
|
||||
bResult = _TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
bResult = _FALSE;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -510,9 +510,9 @@ Efuse_PgPacketRead( IN PADAPTER pAdapter,
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
Efuse_PgPacketWrite(IN PADAPTER pAdapter,
|
||||
IN u8 offset,
|
||||
int
|
||||
Efuse_PgPacketWrite(IN PADAPTER pAdapter,
|
||||
IN u8 offset,
|
||||
IN u8 word_en,
|
||||
IN u8 *data,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
|
@ -525,9 +525,9 @@ Efuse_PgPacketWrite(IN PADAPTER pAdapter,
|
|||
}
|
||||
|
||||
|
||||
int
|
||||
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
||||
IN u8 offset,
|
||||
int
|
||||
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
||||
IN u8 offset,
|
||||
IN u8 word_en,
|
||||
IN u8 *data,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
|
@ -552,15 +552,15 @@ Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/16/2008 MHC Create Version 0.
|
||||
* 11/21/2008 MHC Fix Write bug when we only enable late word.
|
||||
* 11/16/2008 MHC Create Version 0.
|
||||
* 11/21/2008 MHC Fix Write bug when we only enable late word.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
void
|
||||
efuse_WordEnableDataRead(IN u8 word_en,
|
||||
IN u8 *sourdata,
|
||||
IN u8 *targetdata)
|
||||
{
|
||||
{
|
||||
if (!(word_en&BIT(0)))
|
||||
{
|
||||
targetdata[0] = sourdata[0];
|
||||
|
@ -587,14 +587,14 @@ efuse_WordEnableDataRead(IN u8 word_en,
|
|||
u8
|
||||
Efuse_WordEnableDataWrite( IN PADAPTER pAdapter,
|
||||
IN u16 efuse_addr,
|
||||
IN u8 word_en,
|
||||
IN u8 word_en,
|
||||
IN u8 *data,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
{
|
||||
u8 ret=0;
|
||||
|
||||
ret = pAdapter->HalFunc.Efuse_WordEnableDataWrite(pAdapter, efuse_addr, word_en, data, bPseudoTest);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -911,18 +911,18 @@ exit:
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/11/2008 MHC Create Version 0.
|
||||
* 11/11/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
VOID
|
||||
VOID
|
||||
Efuse_ReadAllMap(
|
||||
IN PADAPTER pAdapter,
|
||||
IN PADAPTER pAdapter,
|
||||
IN u8 efuseType,
|
||||
IN OUT u8 *Efuse,
|
||||
IN BOOLEAN bPseudoTest);
|
||||
VOID
|
||||
VOID
|
||||
Efuse_ReadAllMap(
|
||||
IN PADAPTER pAdapter,
|
||||
IN PADAPTER pAdapter,
|
||||
IN u8 efuseType,
|
||||
IN OUT u8 *Efuse,
|
||||
IN BOOLEAN bPseudoTest)
|
||||
|
@ -953,7 +953,7 @@ Efuse_ReadAllMap(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
static VOID
|
||||
|
@ -1014,7 +1014,7 @@ efuse_ShadowRead4Byte(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
#ifdef PLATFORM
|
||||
|
@ -1022,13 +1022,13 @@ static VOID
|
|||
efuse_ShadowWrite1Byte(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 Offset,
|
||||
IN u8 Value);
|
||||
IN u8 Value);
|
||||
#endif //PLATFORM
|
||||
static VOID
|
||||
efuse_ShadowWrite1Byte(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 Offset,
|
||||
IN u8 Value)
|
||||
IN u8 Value)
|
||||
{
|
||||
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ static VOID
|
|||
efuse_ShadowWrite2Byte(
|
||||
IN PADAPTER pAdapter,
|
||||
IN u16 Offset,
|
||||
IN u16 Value)
|
||||
IN u16 Value)
|
||||
{
|
||||
EEPROM_EFUSE_PRIV *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ efuse_ShadowWrite4Byte(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/13/2008 MHC Create Version 0.
|
||||
* 11/13/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
void EFUSE_ShadowMapUpdate(
|
||||
|
@ -1098,19 +1098,19 @@ void EFUSE_ShadowMapUpdate(
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
if (_SUCCESS != retriveAdaptorInfoFile(pAdapter->registrypriv.adaptor_info_caching_file_path, pEEPROM)) {
|
||||
#endif
|
||||
|
||||
|
||||
Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, bPseudoTest);
|
||||
|
||||
|
||||
#ifdef CONFIG_ADAPTOR_INFO_CACHING_FILE
|
||||
storeAdaptorInfoFile(pAdapter->registrypriv.adaptor_info_caching_file_path, pEEPROM);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//PlatformMoveMemory((PVOID)&pHalData->EfuseMap[EFUSE_MODIFY_MAP][0],
|
||||
//PlatformMoveMemory((PVOID)&pHalData->EfuseMap[EFUSE_MODIFY_MAP][0],
|
||||
//(PVOID)&pHalData->EfuseMap[EFUSE_INIT_MAP][0], mapLen);
|
||||
}// EFUSE_ShadowMapUpdate
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ void EFUSE_ShadowMapUpdate(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -1144,7 +1144,7 @@ EFUSE_ShadowRead(
|
|||
efuse_ShadowRead2Byte(pAdapter, Offset, (u16 *)Value);
|
||||
else if (Type == 4)
|
||||
efuse_ShadowRead4Byte(pAdapter, Offset, (u32 *)Value);
|
||||
|
||||
|
||||
} // EFUSE_ShadowRead
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
@ -1160,7 +1160,7 @@ EFUSE_ShadowRead(
|
|||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
* 11/12/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
VOID
|
||||
|
@ -1202,7 +1202,7 @@ Efuse_InitSomeVar(
|
|||
)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
|
||||
_rtw_memset((PVOID)&fakeEfuseContent[0], 0xff, EFUSE_MAX_HW_SIZE);
|
||||
_rtw_memset((PVOID)&fakeEfuseInitMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||
_rtw_memset((PVOID)&fakeEfuseModifiedMap[0], 0xff, EFUSE_MAX_MAP_LEN);
|
||||
|
@ -1253,11 +1253,11 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv)
|
|||
int ret = _SUCCESS;
|
||||
mm_segment_t oldfs;
|
||||
struct file *fp;
|
||||
|
||||
|
||||
if (path && eeprom_priv) {
|
||||
|
||||
ret = rtw_retrive_from_file(path, eeprom_priv->efuse_eeprom_data, EEPROM_MAX_SIZE);
|
||||
|
||||
|
||||
if (ret == EEPROM_MAX_SIZE)
|
||||
ret = _SUCCESS;
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -47,16 +47,16 @@ u8 RSN_CIPHER_SUITE_WRAP[] = { 0x00, 0x0f, 0xac, 3 };
|
|||
u8 RSN_CIPHER_SUITE_CCMP[] = { 0x00, 0x0f, 0xac, 4 };
|
||||
u8 RSN_CIPHER_SUITE_WEP104[] = { 0x00, 0x0f, 0xac, 5 };
|
||||
//-----------------------------------------------------------
|
||||
// for adhoc-master to generate ie and provide supported-rate to fw
|
||||
// for adhoc-master to generate ie and provide supported-rate to fw
|
||||
//-----------------------------------------------------------
|
||||
|
||||
static u8 WIFI_CCKRATES[] =
|
||||
static u8 WIFI_CCKRATES[] =
|
||||
{(IEEE80211_CCK_RATE_1MB | IEEE80211_BASIC_RATE_MASK),
|
||||
(IEEE80211_CCK_RATE_2MB | IEEE80211_BASIC_RATE_MASK),
|
||||
(IEEE80211_CCK_RATE_5MB | IEEE80211_BASIC_RATE_MASK),
|
||||
(IEEE80211_CCK_RATE_11MB | IEEE80211_BASIC_RATE_MASK)};
|
||||
|
||||
static u8 WIFI_OFDMRATES[] =
|
||||
static u8 WIFI_OFDMRATES[] =
|
||||
{(IEEE80211_OFDM_RATE_6MB),
|
||||
(IEEE80211_OFDM_RATE_9MB),
|
||||
(IEEE80211_OFDM_RATE_12MB),
|
||||
|
@ -81,17 +81,17 @@ int rtw_get_bit_value_from_ieee_value(u8 val)
|
|||
}
|
||||
|
||||
uint rtw_is_cckrates_included(u8 *rate)
|
||||
{
|
||||
u32 i = 0;
|
||||
{
|
||||
u32 i = 0;
|
||||
|
||||
while (rate[i]!=0)
|
||||
{
|
||||
if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
|
||||
return _TRUE;
|
||||
{
|
||||
if ( (((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
|
||||
(((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22) )
|
||||
return _TRUE;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
@ -105,11 +105,11 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
|||
if ( (((rate[i]) & 0x7f) != 2) && (((rate[i]) & 0x7f) != 4) &&
|
||||
(((rate[i]) & 0x7f) != 11) && (((rate[i]) & 0x7f) != 22) )
|
||||
|
||||
return _FALSE;
|
||||
return _FALSE;
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
return _TRUE;
|
||||
|
||||
}
|
||||
|
@ -122,17 +122,17 @@ int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
|||
return WIRELESS_INVALID;
|
||||
else
|
||||
return WIRELESS_11A;
|
||||
}
|
||||
}
|
||||
else // could be pure B, pure G, or B/G
|
||||
{
|
||||
if ((rtw_is_cckratesonly_included(rate)) == _TRUE)
|
||||
if ((rtw_is_cckratesonly_included(rate)) == _TRUE)
|
||||
return WIRELESS_11B;
|
||||
else if ((rtw_is_cckrates_included(rate)) == _TRUE)
|
||||
return WIRELESS_11BG;
|
||||
return WIRELESS_11BG;
|
||||
else
|
||||
return WIRELESS_11G;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source,
|
||||
|
@ -146,10 +146,10 @@ u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *sourc
|
|||
// rtw_set_ie will update frame length
|
||||
u8 *rtw_set_ie
|
||||
(
|
||||
u8 *pbuf,
|
||||
sint index,
|
||||
u8 *pbuf,
|
||||
sint index,
|
||||
uint len,
|
||||
u8 *source,
|
||||
u8 *source,
|
||||
uint *frlen //frame length
|
||||
)
|
||||
{
|
||||
|
@ -160,11 +160,11 @@ _func_enter_;
|
|||
|
||||
if (len > 0)
|
||||
_rtw_memcpy((void *)(pbuf + 2), (void *)source, len);
|
||||
|
||||
|
||||
*frlen = *frlen + (len + 2);
|
||||
|
||||
|
||||
return (pbuf + len + 2);
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
inline u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode,
|
||||
|
@ -229,7 +229,7 @@ u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
|
|||
u8 *p;
|
||||
_func_enter_;
|
||||
if (limit < 1){
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ _func_enter_;
|
|||
if (i >= limit)
|
||||
break;
|
||||
}
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -291,7 +291,7 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
|||
|
||||
if (ie)
|
||||
_rtw_memcpy(ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
|
||||
if (ielen)
|
||||
*ielen = in_ie[cnt+1]+2;
|
||||
|
||||
|
@ -299,10 +299,10 @@ u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, u
|
|||
}
|
||||
else
|
||||
{
|
||||
cnt+=in_ie[cnt+1]+2; //goto next
|
||||
}
|
||||
cnt+=in_ie[cnt+1]+2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return target_ie;
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o
|
|||
u32 target_ielen;
|
||||
u8 *start;
|
||||
uint search_len;
|
||||
|
||||
|
||||
if (!ies || !ies_len || *ies_len <= offset)
|
||||
goto exit;
|
||||
|
||||
|
@ -338,7 +338,7 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o
|
|||
u8 buf[MAX_IE_SZ] = {0};
|
||||
u8 *remain_ies = target_ie + target_ielen;
|
||||
uint remain_len = search_len - (remain_ies - start);
|
||||
|
||||
|
||||
_rtw_memcpy(buf, remain_ies, remain_len);
|
||||
_rtw_memcpy(target_ie, buf, remain_len);
|
||||
*ies_len = *ies_len - target_ielen;
|
||||
|
@ -354,25 +354,25 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void rtw_set_supported_rate(u8* SupportedRates, uint mode)
|
||||
void rtw_set_supported_rate(u8* SupportedRates, uint mode)
|
||||
{
|
||||
_func_enter_;
|
||||
|
||||
_rtw_memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
|
||||
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case WIRELESS_11B:
|
||||
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
||||
break;
|
||||
|
||||
|
||||
case WIRELESS_11G:
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11_5N:
|
||||
case WIRELESS_11A_5N://Todo: no basic rate for ofdm ?
|
||||
_rtw_memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
||||
break;
|
||||
|
||||
|
||||
case WIRELESS_11BG:
|
||||
case WIRELESS_11G_24N:
|
||||
case WIRELESS_11_24N:
|
||||
|
@ -380,64 +380,64 @@ _func_enter_;
|
|||
_rtw_memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
||||
_rtw_memcpy(SupportedRates + IEEE80211_CCK_RATE_LEN, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
uint rtw_get_rateset_len(u8 *rateset)
|
||||
{
|
||||
uint i = 0;
|
||||
_func_enter_;
|
||||
_func_enter_;
|
||||
while (1)
|
||||
{
|
||||
if ((rateset[i]) == 0)
|
||||
break;
|
||||
|
||||
|
||||
if (i > 12)
|
||||
break;
|
||||
|
||||
i++;
|
||||
|
||||
i++;
|
||||
}
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return i;
|
||||
}
|
||||
|
||||
int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
{
|
||||
u8 wireless_mode;
|
||||
int sz = 0, rateLen;
|
||||
int sz = 0, rateLen;
|
||||
WLAN_BSSID_EX* pdev_network = &pregistrypriv->dev_network;
|
||||
u8* ie = pdev_network->IEs;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
//timestamp will be inserted by hardware
|
||||
sz += 8;
|
||||
sz += 8;
|
||||
ie += sz;
|
||||
|
||||
|
||||
//beacon interval : 2bytes
|
||||
*(u16*)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);//BCN_INTERVAL;
|
||||
sz += 2;
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
||||
|
||||
//capability info
|
||||
*(u16*)ie = 0;
|
||||
|
||||
|
||||
*(u16*)ie |= cpu_to_le16(cap_IBSS);
|
||||
|
||||
if (pregistrypriv->preamble == PREAMBLE_SHORT)
|
||||
*(u16*)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
|
||||
|
||||
if (pdev_network->Privacy)
|
||||
*(u16*)ie |= cpu_to_le16(cap_Privacy);
|
||||
|
||||
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
||||
|
||||
//SSID
|
||||
ie = rtw_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
|
||||
|
||||
//supported rates
|
||||
if (pregistrypriv->wireless_mode == WIRELESS_11ABGN)
|
||||
{
|
||||
|
@ -450,9 +450,9 @@ _func_enter_;
|
|||
{
|
||||
wireless_mode = pregistrypriv->wireless_mode;
|
||||
}
|
||||
|
||||
|
||||
rtw_set_supported_rate(pdev_network->SupportedRates, wireless_mode) ;
|
||||
|
||||
|
||||
rateLen = rtw_get_rateset_len(pdev_network->SupportedRates);
|
||||
|
||||
if (rateLen > 8)
|
||||
|
@ -470,17 +470,17 @@ _func_enter_;
|
|||
|
||||
|
||||
//IBSS Parameter Set
|
||||
|
||||
|
||||
ie = rtw_set_ie(ie, _IBSS_PARA_IE_, 2, (u8 *)&(pdev_network->Configuration.ATIMWindow), &sz);
|
||||
|
||||
if (rateLen > 8)
|
||||
{
|
||||
{
|
||||
ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (pdev_network->SupportedRates + 8), &sz);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
//HT Cap.
|
||||
if (((pregistrypriv->wireless_mode&WIRELESS_11_5N)||(pregistrypriv->wireless_mode&WIRELESS_11_24N))
|
||||
if (((pregistrypriv->wireless_mode&WIRELESS_11_5N)||(pregistrypriv->wireless_mode&WIRELESS_11_24N))
|
||||
&& (pregistrypriv->ht_enable==_TRUE))
|
||||
{
|
||||
//todo:
|
||||
|
@ -505,7 +505,7 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit)
|
|||
u8 *pbuf = pie;
|
||||
int limit_new = limit;
|
||||
|
||||
while (1)
|
||||
while (1)
|
||||
{
|
||||
pbuf = rtw_get_ie(pbuf, _WPA_IE_ID_, &len, limit_new);
|
||||
|
||||
|
@ -553,7 +553,7 @@ check_next_ie:
|
|||
}
|
||||
|
||||
unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit)
|
||||
{
|
||||
{
|
||||
|
||||
return rtw_get_ie(pie, _WPA2_IE_ID_,rsn_ie_len, limit);
|
||||
|
||||
|
@ -604,59 +604,59 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) ||
|
||||
(_rtw_memcmp(wpa_ie+2, RTW_WPA_OUI_TYPE, WPA_SELECTOR_LEN) != _TRUE) )
|
||||
{
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
pos = wpa_ie;
|
||||
|
||||
pos += 8;
|
||||
left = wpa_ie_len - 8;
|
||||
left = wpa_ie_len - 8;
|
||||
|
||||
|
||||
//group_cipher
|
||||
if (left >= WPA_SELECTOR_LEN) {
|
||||
|
||||
*group_cipher = rtw_get_wpa_cipher_suite(pos);
|
||||
|
||||
|
||||
pos += WPA_SELECTOR_LEN;
|
||||
left -= WPA_SELECTOR_LEN;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (left > 0)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie length mismatch, %u too much", __func__, left));
|
||||
|
||||
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
//pairwise_cipher
|
||||
if (left >= 2)
|
||||
{
|
||||
//count = le16_to_cpu(*(u16*)pos);
|
||||
{
|
||||
//count = le16_to_cpu(*(u16*)pos);
|
||||
count = RTW_GET_LE16(pos);
|
||||
pos += 2;
|
||||
left -= 2;
|
||||
|
||||
|
||||
if (count == 0 || left < count * WPA_SELECTOR_LEN) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie count botch (pairwise), "
|
||||
"count %u left %u", __func__, count, left));
|
||||
"count %u left %u", __func__, count, left));
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
*pairwise_cipher |= rtw_get_wpa_cipher_suite(pos);
|
||||
|
||||
|
||||
pos += WPA_SELECTOR_LEN;
|
||||
left -= WPA_SELECTOR_LEN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (left == 1)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie too short (for key mgmt)", __func__));
|
||||
|
@ -672,9 +672,9 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x)
|
||||
|
@ -691,22 +691,22 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
|
||||
|
||||
if ((*rsn_ie!= _WPA2_IE_ID_) || (*(rsn_ie+1) != (u8)(rsn_ie_len - 2)))
|
||||
{
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
pos = rsn_ie;
|
||||
pos += 4;
|
||||
left = rsn_ie_len - 4;
|
||||
left = rsn_ie_len - 4;
|
||||
|
||||
//group_cipher
|
||||
if (left >= RSN_SELECTOR_LEN) {
|
||||
|
||||
*group_cipher = rtw_get_wpa2_cipher_suite(pos);
|
||||
|
||||
|
||||
pos += RSN_SELECTOR_LEN;
|
||||
left -= RSN_SELECTOR_LEN;
|
||||
|
||||
|
||||
} else if (left > 0) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie length mismatch, %u too much", __func__, left));
|
||||
return _FAIL;
|
||||
|
@ -714,7 +714,7 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
|
||||
//pairwise_cipher
|
||||
if (left >= 2)
|
||||
{
|
||||
{
|
||||
//count = le16_to_cpu(*(u16*)pos);
|
||||
count = RTW_GET_LE16(pos);
|
||||
pos += 2;
|
||||
|
@ -722,23 +722,23 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
|
||||
if (count == 0 || left < count * RSN_SELECTOR_LEN) {
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie count botch (pairwise), "
|
||||
"count %u left %u", __func__, count, left));
|
||||
"count %u left %u", __func__, count, left));
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
{
|
||||
*pairwise_cipher |= rtw_get_wpa2_cipher_suite(pos);
|
||||
|
||||
|
||||
pos += RSN_SELECTOR_LEN;
|
||||
left -= RSN_SELECTOR_LEN;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (left == 1)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("%s: ie too short (for key mgmt)", __func__));
|
||||
|
||||
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -753,14 +753,14 @@ int rtw_parse_wpa2_ie(u8* rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
|
|||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
int rtw_get_wapi_ie(u8 *in_ie,uint in_len,u8 *wapi_ie,u16 *wapi_len)
|
||||
{
|
||||
u8 authmode, i;
|
||||
uint cnt;
|
||||
uint cnt;
|
||||
u8 wapi_oui1[4]={0x0,0x14,0x72,0x01};
|
||||
u8 wapi_oui2[4]={0x0,0x14,0x72,0x02};
|
||||
|
||||
|
@ -772,7 +772,7 @@ _func_enter_;
|
|||
|
||||
//if (authmode==_WAPI_IE_)
|
||||
if (authmode==_WAPI_IE_ && (_rtw_memcmp(&in_ie[cnt+6], wapi_oui1,4)==_TRUE ||
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==_TRUE))
|
||||
_rtw_memcmp(&in_ie[cnt+6], wapi_oui2,4)==_TRUE))
|
||||
{
|
||||
if (wapi_ie) {
|
||||
_rtw_memcpy(wapi_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
|
@ -804,23 +804,23 @@ int rtw_get_sec_ie(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16
|
|||
{
|
||||
u8 authmode, sec_idx, i;
|
||||
u8 wpa_oui[4]={0x0,0x50,0xf2,0x01};
|
||||
uint cnt;
|
||||
|
||||
uint cnt;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
//Search required WPA or WPA2 IE and copy to sec_ie[ ]
|
||||
|
||||
|
||||
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
|
||||
|
||||
|
||||
sec_idx=0;
|
||||
|
||||
|
||||
while (cnt<in_len)
|
||||
{
|
||||
authmode=in_ie[cnt];
|
||||
|
||||
|
||||
if ((authmode==_WPA_IE_ID_)&&(_rtw_memcmp(&in_ie[cnt+2], &wpa_oui[0],4)==_TRUE))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n rtw_get_wpa_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
|
||||
if (wpa_ie) {
|
||||
_rtw_memcpy(wpa_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
|
@ -839,7 +839,7 @@ _func_enter_;
|
|||
{
|
||||
if (authmode==_WPA2_IE_ID_)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n get_rsn_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("\n get_rsn_ie: sec_idx=%d in_ie[cnt+1]+2=%d\n",sec_idx,in_ie[cnt+1]+2));
|
||||
|
||||
if (rsn_ie) {
|
||||
_rtw_memcpy(rsn_ie, &in_ie[cnt],in_ie[cnt+1]+2);
|
||||
|
@ -857,32 +857,32 @@ _func_enter_;
|
|||
else
|
||||
{
|
||||
cnt+=in_ie[cnt+1]+2; //get next
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return (*rsn_len+*wpa_len);
|
||||
|
||||
|
||||
}
|
||||
|
||||
u8 rtw_is_wps_ie(u8 *ie_ptr, uint *wps_ielen)
|
||||
{
|
||||
{
|
||||
u8 match = _FALSE;
|
||||
u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04};
|
||||
|
||||
|
||||
if (ie_ptr == NULL) return match;
|
||||
|
||||
|
||||
eid = ie_ptr[0];
|
||||
|
||||
|
||||
if ((eid==_WPA_IE_ID_)&&(_rtw_memcmp(&ie_ptr[2], wps_oui, 4)==_TRUE))
|
||||
{
|
||||
{
|
||||
//DBG_8192C("==> found WPS_IE.....\n");
|
||||
*wps_ielen = ie_ptr[1]+2;
|
||||
*wps_ielen = ie_ptr[1]+2;
|
||||
match=_TRUE;
|
||||
}
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
||||
|
@ -919,20 +919,20 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
|
|||
|
||||
if (wps_ie)
|
||||
_rtw_memcpy(wps_ie, &in_ie[cnt], in_ie[cnt+1]+2);
|
||||
|
||||
|
||||
if (wps_ielen)
|
||||
*wps_ielen = in_ie[cnt+1]+2;
|
||||
|
||||
|
||||
cnt+=in_ie[cnt+1]+2;
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cnt+=in_ie[cnt+1]+2; //goto next
|
||||
}
|
||||
cnt+=in_ie[cnt+1]+2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return wpsie_ptr;
|
||||
}
|
||||
|
@ -964,33 +964,33 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_att
|
|||
|
||||
// 6 = 1(Element ID) + 1(Length) + 4(WPS OUI)
|
||||
attr_ptr = wps_ie + 6; //goto first attr
|
||||
|
||||
|
||||
while (attr_ptr - wps_ie < wps_ielen)
|
||||
{
|
||||
// 4 = 2(Attribute ID) + 2(Length)
|
||||
u16 attr_id = RTW_GET_BE16(attr_ptr);
|
||||
u16 attr_data_len = RTW_GET_BE16(attr_ptr + 2);
|
||||
u16 attr_len = attr_data_len + 4;
|
||||
|
||||
|
||||
//DBG_871X("%s attr_ptr:%p, id:%u, length:%u\n", __func__, attr_ptr, attr_id, attr_data_len);
|
||||
if ( attr_id == target_attr_id )
|
||||
{
|
||||
target_attr_ptr = attr_ptr;
|
||||
|
||||
|
||||
if (buf_attr)
|
||||
_rtw_memcpy(buf_attr, attr_ptr, attr_len);
|
||||
|
||||
|
||||
if (len_attr)
|
||||
*len_attr = attr_len;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
attr_ptr += attr_len; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return target_attr_ptr;
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8
|
|||
|
||||
if (len_content)
|
||||
*len_content = 0;
|
||||
|
||||
|
||||
attr_ptr = rtw_get_wps_attr(wps_ie, wps_ielen, target_attr_id, NULL, &attr_len);
|
||||
|
||||
if (attr_ptr && attr_len)
|
||||
|
@ -1123,7 +1123,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
|||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1156,7 +1156,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
DBG_871X("IEEE 802.11 element "
|
||||
"parse failed (id=%d elen=%d "
|
||||
"left=%lu)\n",
|
||||
id, elen, (unsigned long) left);
|
||||
id, elen, (unsigned long) left);
|
||||
}
|
||||
return ParseFailed;
|
||||
}
|
||||
|
@ -1258,7 +1258,7 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
return ParseFailed;
|
||||
|
||||
return unknown ? ParseUnknown : ParseOK;
|
||||
|
||||
|
||||
}
|
||||
|
||||
static u8 key_char2num(u8 ch);
|
||||
|
@ -1296,7 +1296,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)
|
|||
{
|
||||
u8 mac[ETH_ALEN];
|
||||
if (mac_addr == NULL) return;
|
||||
|
||||
|
||||
if ( rtw_initmac )
|
||||
{ // Users specify the mac address
|
||||
int jj,kk;
|
||||
|
@ -1311,7 +1311,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)
|
|||
{ // Use the mac address stored in the Efuse
|
||||
_rtw_memcpy(mac, mac_addr, ETH_ALEN);
|
||||
}
|
||||
|
||||
|
||||
if (((mac[0]==0xff) &&(mac[1]==0xff) && (mac[2]==0xff) &&
|
||||
(mac[3]==0xff) && (mac[4]==0xff) &&(mac[5]==0xff)) ||
|
||||
((mac[0]==0x0) && (mac[1]==0x0) && (mac[2]==0x0) &&
|
||||
|
@ -1326,7 +1326,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)
|
|||
// use default mac addresss
|
||||
_rtw_memcpy(mac_addr, mac, ETH_ALEN);
|
||||
DBG_871X("MAC Address from efuse error, assign default one !!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
DBG_871X("rtw_macaddr_cfg MAC Address = "MAC_FMT"\n", MAC_ARG(mac_addr));
|
||||
}
|
||||
|
@ -1334,7 +1334,7 @@ void rtw_macaddr_cfg(u8 *mac_addr)
|
|||
void dump_ies(u8 *buf, u32 buf_len) {
|
||||
u8* pos = (u8*)buf;
|
||||
u8 id, len;
|
||||
|
||||
|
||||
while (pos-buf<=buf_len){
|
||||
id = *pos;
|
||||
len = *(pos+1);
|
||||
|
@ -1346,7 +1346,7 @@ void dump_ies(u8 *buf, u32 buf_len) {
|
|||
dump_wps_ie(pos, len);
|
||||
|
||||
pos+=(2+len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dump_wps_ie(u8 *ie, u32 ie_len) {
|
||||
|
@ -1356,7 +1356,7 @@ void dump_wps_ie(u8 *ie, u32 ie_len) {
|
|||
|
||||
u8 *wps_ie;
|
||||
uint wps_ielen;
|
||||
|
||||
|
||||
wps_ie = rtw_get_wps_ie(ie, ie_len, NULL, &wps_ielen);
|
||||
if (wps_ie != ie || wps_ielen == 0)
|
||||
return;
|
||||
|
@ -1369,7 +1369,7 @@ void dump_wps_ie(u8 *ie, u32 ie_len) {
|
|||
DBG_871X("%s ID:0x%04x, LEN:%u\n", __func__, id, len);
|
||||
|
||||
pos+=(4+len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
|
@ -1380,7 +1380,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len) {
|
|||
|
||||
u8 *p2p_ie;
|
||||
uint p2p_ielen;
|
||||
|
||||
|
||||
p2p_ie = rtw_get_p2p_ie(ie, ie_len, NULL, &p2p_ielen);
|
||||
if (p2p_ie != ie || p2p_ielen == 0)
|
||||
return;
|
||||
|
@ -1393,7 +1393,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len) {
|
|||
DBG_871X("%s ID:%u, LEN:%u\n", __func__, id, len);
|
||||
|
||||
pos+=(3+len);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1422,11 +1422,11 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
dump_stack();
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], p2p_oui, 4) == _TRUE ) )
|
||||
{
|
||||
p2p_ie_ptr = in_ie + cnt;
|
||||
|
||||
|
||||
if ( p2p_ie != NULL )
|
||||
{
|
||||
_rtw_memcpy( p2p_ie, &in_ie[ cnt ], in_ie[ cnt + 1 ] + 2 );
|
||||
|
@ -1436,17 +1436,17 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, int in_len, u8 *p2p_ie, uint *p2p_ielen)
|
|||
{
|
||||
*p2p_ielen = in_ie[ cnt + 1 ] + 2;
|
||||
}
|
||||
|
||||
|
||||
return p2p_ie_ptr;
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
cnt += in_ie[ cnt + 1 ] +2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
cnt += in_ie[ cnt + 1 ] +2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
|
@ -1479,33 +1479,33 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *buf_attr
|
|||
|
||||
// 6 = 1(Element ID) + 1(Length) + 3 (OUI) + 1(OUI Type)
|
||||
attr_ptr = p2p_ie + 6; //goto first attr
|
||||
|
||||
|
||||
while (attr_ptr - p2p_ie < p2p_ielen)
|
||||
{
|
||||
// 3 = 1(Attribute ID) + 2(Length)
|
||||
u8 attr_id = *attr_ptr;
|
||||
u16 attr_data_len = RTW_GET_LE16(attr_ptr + 1);
|
||||
u16 attr_len = attr_data_len + 3;
|
||||
|
||||
|
||||
//DBG_871X("%s attr_ptr:%p, id:%u, length:%u\n", __func__, attr_ptr, attr_id, attr_data_len);
|
||||
if ( attr_id == target_attr_id )
|
||||
{
|
||||
target_attr_ptr = attr_ptr;
|
||||
|
||||
|
||||
if (buf_attr)
|
||||
_rtw_memcpy(buf_attr, attr_ptr, attr_len);
|
||||
|
||||
|
||||
if (len_attr)
|
||||
*len_attr = attr_len;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
attr_ptr += attr_len; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return target_attr_ptr;
|
||||
}
|
||||
|
@ -1527,7 +1527,7 @@ u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *
|
|||
|
||||
if (len_content)
|
||||
*len_content = 0;
|
||||
|
||||
|
||||
attr_ptr = rtw_get_p2p_attr(p2p_ie, p2p_ielen, target_attr_id, NULL, &attr_len);
|
||||
|
||||
if (attr_ptr && attr_len)
|
||||
|
@ -1545,19 +1545,19 @@ u8 *rtw_get_p2p_attr_content(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id ,u8 *
|
|||
}
|
||||
|
||||
u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr)
|
||||
{
|
||||
{
|
||||
u32 a_len;
|
||||
|
||||
*pbuf = attr_id;
|
||||
|
||||
|
||||
//*(u16*)(pbuf + 1) = cpu_to_le16(attr_len);
|
||||
RTW_PUT_LE16(pbuf + 1, attr_len);
|
||||
|
||||
if (pdata_attr)
|
||||
_rtw_memcpy(pbuf + 3, pdata_attr, attr_len);
|
||||
|
||||
_rtw_memcpy(pbuf + 3, pdata_attr, attr_len);
|
||||
|
||||
a_len = attr_len + 3;
|
||||
|
||||
|
||||
return a_len;
|
||||
}
|
||||
|
||||
|
@ -1595,12 +1595,12 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||
u8 *p2p_ie;
|
||||
uint p2p_ielen, p2p_ielen_ori;
|
||||
int cnt;
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori)) )
|
||||
|
||||
if ( (p2p_ie=rtw_get_p2p_ie(bss_ex->IEs+_FIXED_IE_LENGTH_, bss_ex->IELength-_FIXED_IE_LENGTH_, NULL, &p2p_ielen_ori)) )
|
||||
{
|
||||
p2p_ielen=rtw_p2p_attr_remove(p2p_ie, p2p_ielen_ori, attr_id);
|
||||
if (p2p_ielen != p2p_ielen_ori) {
|
||||
|
||||
|
||||
u8 *next_ie_ori = p2p_ie+p2p_ielen_ori;
|
||||
u8 *next_ie = p2p_ie+p2p_ielen;
|
||||
uint remain_len = bss_ex->IELength-(next_ie_ori-bss_ex->IEs);
|
||||
|
@ -1618,7 +1618,7 @@ void rtw_WLAN_BSSID_EX_remove_p2p_attr(WLAN_BSSID_EX *bss_ex, u8 attr_id)
|
|||
int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
||||
{
|
||||
int match;
|
||||
uint cnt = 0;
|
||||
uint cnt = 0;
|
||||
u8 eid, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
|
@ -1632,13 +1632,13 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
while (cnt<in_len)
|
||||
{
|
||||
eid = in_ie[cnt];
|
||||
|
||||
|
||||
if ( ( eid == _VENDOR_SPECIFIC_IE_ ) && ( _rtw_memcmp( &in_ie[cnt+2], wfd_oui, 4) == _TRUE ) )
|
||||
{
|
||||
if ( wfd_ie != NULL )
|
||||
{
|
||||
_rtw_memcpy( wfd_ie, &in_ie[ cnt ], in_ie[ cnt + 1 ] + 2 );
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1647,12 +1647,12 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
*wfd_ielen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( wfd_ielen != NULL )
|
||||
{
|
||||
*wfd_ielen = in_ie[ cnt + 1 ] + 2;
|
||||
}
|
||||
|
||||
|
||||
cnt += in_ie[ cnt + 1 ] + 2;
|
||||
|
||||
match = _TRUE;
|
||||
|
@ -1660,16 +1660,16 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
}
|
||||
else
|
||||
{
|
||||
cnt += in_ie[ cnt + 1 ] +2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
cnt += in_ie[ cnt + 1 ] +2; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( match == _TRUE )
|
||||
{
|
||||
match = cnt;
|
||||
}
|
||||
|
||||
|
||||
return match;
|
||||
|
||||
}
|
||||
|
@ -1679,7 +1679,7 @@ int rtw_get_wfd_ie(u8 *in_ie, int in_len, u8 *wfd_ie, uint *wfd_ielen)
|
|||
int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *attr_content, uint *attr_contentlen)
|
||||
{
|
||||
int match;
|
||||
uint cnt = 0;
|
||||
uint cnt = 0;
|
||||
u8 attr_id, wfd_oui[4]={0x50,0x6F,0x9A,0x0A};
|
||||
|
||||
|
||||
|
@ -1696,17 +1696,17 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
while ( cnt < wfd_ielen )
|
||||
{
|
||||
u16 attrlen = RTW_GET_BE16(wfd_ie + cnt + 1);
|
||||
|
||||
|
||||
attr_id = wfd_ie[cnt];
|
||||
if ( attr_id == target_attr_id )
|
||||
{
|
||||
// 3 -> 1 byte for attribute ID field, 2 bytes for length field
|
||||
if (attr_content)
|
||||
_rtw_memcpy( attr_content, &wfd_ie[ cnt + 3 ], attrlen );
|
||||
|
||||
|
||||
if (attr_contentlen)
|
||||
*attr_contentlen = attrlen;
|
||||
|
||||
|
||||
cnt += attrlen + 3;
|
||||
|
||||
match = _TRUE;
|
||||
|
@ -1714,10 +1714,10 @@ int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *
|
|||
}
|
||||
else
|
||||
{
|
||||
cnt += attrlen + 3; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
cnt += attrlen + 3; //goto next
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return match;
|
||||
|
||||
|
@ -1871,7 +1871,7 @@ void rtw_get_bcn_info(struct wlan_network *pnetwork)
|
|||
u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40, unsigned char * MCS_rate)
|
||||
{
|
||||
u16 max_rate = 0;
|
||||
|
||||
|
||||
if (rf_type == RF_1T1R)
|
||||
{
|
||||
if (MCS_rate[0] & BIT(7))
|
||||
|
@ -1992,4 +1992,3 @@ const char *action_public_str(u8 action)
|
|||
action = (action >= ACT_PUBLIC_MAX) ? ACT_PUBLIC_MAX : action;
|
||||
return _action_public_str[action];
|
||||
}
|
||||
|
||||
|
|
|
@ -75,12 +75,12 @@ jackson@realtek.com.tw
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define rtw_le16_to_cpu(val) val
|
||||
#define rtw_le16_to_cpu(val) val
|
||||
#define rtw_le32_to_cpu(val) val
|
||||
#define rtw_cpu_to_le16(val) val
|
||||
#define rtw_cpu_to_le32(val) val
|
||||
#else
|
||||
#define rtw_le16_to_cpu(val) le16_to_cpu(val)
|
||||
#define rtw_le16_to_cpu(val) le16_to_cpu(val)
|
||||
#define rtw_le32_to_cpu(val) le32_to_cpu(val)
|
||||
#define rtw_cpu_to_le16(val) cpu_to_le16(val)
|
||||
#define rtw_cpu_to_le32(val) cpu_to_le32(val)
|
||||
|
@ -90,7 +90,7 @@ jackson@realtek.com.tw
|
|||
u8 _rtw_read8(_adapter *adapter, u32 addr)
|
||||
{
|
||||
u8 r_val;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
|
@ -105,10 +105,10 @@ u8 _rtw_read8(_adapter *adapter, u32 addr)
|
|||
u16 _rtw_read16(_adapter *adapter, u32 addr)
|
||||
{
|
||||
u16 r_val;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_func_enter_;
|
||||
_read16 = pintfhdl->io_ops._read16;
|
||||
|
||||
|
@ -120,10 +120,10 @@ u16 _rtw_read16(_adapter *adapter, u32 addr)
|
|||
u32 _rtw_read32(_adapter *adapter, u32 addr)
|
||||
{
|
||||
u32 r_val;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
|
||||
_func_enter_;
|
||||
_read32 = pintfhdl->io_ops._read32;
|
||||
|
||||
|
@ -135,7 +135,7 @@ u32 _rtw_read32(_adapter *adapter, u32 addr)
|
|||
|
||||
int _rtw_write8(_adapter *adapter, u32 addr, u8 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
|
@ -145,12 +145,12 @@ int _rtw_write8(_adapter *adapter, u32 addr, u8 val)
|
|||
|
||||
ret = _write8(pintfhdl, addr, val);
|
||||
_func_exit_;
|
||||
|
||||
|
||||
return RTW_STATUS_CODE(ret);
|
||||
}
|
||||
int _rtw_write16(_adapter *adapter, u32 addr, u16 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
|
@ -166,14 +166,14 @@ int _rtw_write16(_adapter *adapter, u32 addr, u16 val)
|
|||
}
|
||||
int _rtw_write32(_adapter *adapter, u32 addr, u32 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
int ret;
|
||||
_func_enter_;
|
||||
_write32 = pintfhdl->io_ops._write32;
|
||||
|
||||
|
||||
val = rtw_cpu_to_le32(val);
|
||||
ret = _write32(pintfhdl, addr, val);
|
||||
_func_exit_;
|
||||
|
@ -183,7 +183,7 @@ int _rtw_write32(_adapter *adapter, u32 addr, u32 val)
|
|||
|
||||
int _rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *pdata)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = (struct intf_hdl*)(&(pio_priv->intf));
|
||||
int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr,u32 length, u8 *pdata);
|
||||
|
@ -198,7 +198,7 @@ int _rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *pdata)
|
|||
}
|
||||
int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
|
||||
|
@ -213,7 +213,7 @@ int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val)
|
|||
}
|
||||
int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
|
||||
|
@ -228,7 +228,7 @@ int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val)
|
|||
}
|
||||
int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val)
|
||||
{
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
|
||||
|
@ -245,7 +245,7 @@ int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val)
|
|||
void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||
{
|
||||
void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
|
||||
|
@ -253,7 +253,7 @@ void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
|
||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
void _rtw_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||
{
|
||||
void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
|
||||
|
@ -285,7 +285,7 @@ void _rtw_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||
{
|
||||
u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
|
||||
|
@ -293,7 +293,7 @@ void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
|
||||
if ( (adapter->bDriverStopped ==_TRUE) || (adapter->bSurpriseRemoved == _TRUE))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
RT_TRACE(_module_rtl871x_io_c_, _drv_info_, ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)", adapter->bDriverStopped, adapter->bSurpriseRemoved));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ void _rtw_read_port_cancel(_adapter *adapter)
|
|||
u32 _rtw_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
||||
{
|
||||
u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
//struct io_queue *pio_queue = (struct io_queue *)adapter->pio_queue;
|
||||
struct io_priv *pio_priv = &adapter->iopriv;
|
||||
struct intf_hdl *pintfhdl = &(pio_priv->intf);
|
||||
u32 ret = _SUCCESS;
|
||||
|
@ -329,7 +329,7 @@ u32 _rtw_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
|
|||
_func_enter_;
|
||||
|
||||
_write_port = pintfhdl->io_ops._write_port;
|
||||
|
||||
|
||||
ret = _write_port(pintfhdl, addr, cnt, pmem);
|
||||
|
||||
_func_exit_;
|
||||
|
@ -388,12 +388,12 @@ int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(struct _io_ops *po
|
|||
|
||||
u16 read_sniff_ranges[][2] = {
|
||||
//{0x550, 0x551},
|
||||
};
|
||||
};
|
||||
|
||||
u16 write_sniff_ranges[][2] = {
|
||||
//{0x550, 0x551},
|
||||
//{0x4c, 0x4c},
|
||||
};
|
||||
};
|
||||
|
||||
int read_sniff_num = sizeof(read_sniff_ranges)/sizeof(u16)/2;
|
||||
int write_sniff_num = sizeof(write_sniff_ranges)/sizeof(u16)/2;
|
||||
|
@ -405,7 +405,7 @@ bool match_read_sniff_ranges(u16 addr, u16 len)
|
|||
if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ bool match_write_sniff_ranges(u16 addr, u16 len)
|
|||
if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1])
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@ u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line
|
|||
u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||
{
|
||||
u16 val = _rtw_read16(adapter, addr);
|
||||
|
||||
|
||||
if (match_read_sniff_ranges(addr, 2))
|
||||
DBG_871X("DBG_IO %s:%d rtw_read16(0x%04x) return 0x%04x\n", caller, line, addr, val);
|
||||
|
||||
|
@ -443,7 +443,7 @@ u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int li
|
|||
u32 dbg_rtw_read32(_adapter *adapter, u32 addr, const char *caller, const int line)
|
||||
{
|
||||
u32 val = _rtw_read32(adapter, addr);
|
||||
|
||||
|
||||
if (match_read_sniff_ranges(addr, 4))
|
||||
DBG_871X("DBG_IO %s:%d rtw_read32(0x%04x) return 0x%08x\n", caller, line, addr, val);
|
||||
|
||||
|
@ -454,21 +454,21 @@ int dbg_rtw_write8(_adapter *adapter, u32 addr, u8 val, const char *caller, cons
|
|||
{
|
||||
if (match_write_sniff_ranges(addr, 1))
|
||||
DBG_871X("DBG_IO %s:%d rtw_write8(0x%04x, 0x%02x)\n", caller, line, addr, val);
|
||||
|
||||
|
||||
return _rtw_write8(adapter, addr, val);
|
||||
}
|
||||
int dbg_rtw_write16(_adapter *adapter, u32 addr, u16 val, const char *caller, const int line)
|
||||
{
|
||||
if (match_write_sniff_ranges(addr, 2))
|
||||
DBG_871X("DBG_IO %s:%d rtw_write16(0x%04x, 0x%04x)\n", caller, line, addr, val);
|
||||
|
||||
|
||||
return _rtw_write16(adapter, addr, val);
|
||||
}
|
||||
int dbg_rtw_write32(_adapter *adapter, u32 addr, u32 val, const char *caller, const int line)
|
||||
{
|
||||
if (match_write_sniff_ranges(addr, 4))
|
||||
DBG_871X("DBG_IO %s:%d rtw_write32(0x%04x, 0x%08x)\n", caller, line, addr, val);
|
||||
|
||||
|
||||
return _rtw_write32(adapter, addr, val);
|
||||
}
|
||||
int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const char *caller, const int line)
|
||||
|
@ -479,5 +479,3 @@ int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const cha
|
|||
return _rtw_writeN(adapter, addr, length, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -37,23 +37,23 @@ query_802_11_capability(
|
|||
u32 * pulOutLen
|
||||
)
|
||||
{
|
||||
static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] =
|
||||
static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] =
|
||||
{
|
||||
{Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeOpen, Ndis802_11Encryption1Enabled},
|
||||
{Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeShared, Ndis802_11Encryption1Enabled},
|
||||
{Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption3Enabled}
|
||||
};
|
||||
};
|
||||
static ULONG ulNumOfPairSupported = sizeof(szAuthEnc)/sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
|
||||
NDIS_802_11_CAPABILITY * pCap = (NDIS_802_11_CAPABILITY *)pucBuf;
|
||||
u8* pucAuthEncryptionSupported = (u8*) pCap->AuthenticationEncryptionSupported;
|
||||
|
@ -61,10 +61,10 @@ query_802_11_capability(
|
|||
|
||||
pCap->Length = sizeof(NDIS_802_11_CAPABILITY);
|
||||
if (ulNumOfPairSupported > 1 )
|
||||
pCap->Length += (ulNumOfPairSupported-1) * sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
|
||||
|
||||
pCap->Version = 2;
|
||||
pCap->NoOfPMKIDs = NUM_PMKID_CACHE;
|
||||
pCap->Length += (ulNumOfPairSupported-1) * sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
|
||||
|
||||
pCap->Version = 2;
|
||||
pCap->NoOfPMKIDs = NUM_PMKID_CACHE;
|
||||
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
|
||||
|
||||
if ( sizeof (szAuthEnc) <= 240 ) // 240 = 256 - 4*4 // SecurityInfo.szCapability: only 256 bytes in size.
|
||||
|
@ -86,7 +86,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
struct wlan_network *tgt_network;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct security_priv *psecuritypriv=&(padapter->securitypriv);
|
||||
WLAN_BSSID_EX *psecnetwork=(WLAN_BSSID_EX*)&(psecuritypriv->sec_bss);
|
||||
WLAN_BSSID_EX *psecnetwork=(WLAN_BSSID_EX*)&(psecuritypriv->sec_bss);
|
||||
u8 * pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||
unsigned char i,*auth_ie,*supp_ie;
|
||||
|
||||
|
@ -99,7 +99,7 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
//------------------------------------------------------
|
||||
// Req_1. AvailableRequestFixedIEs
|
||||
if (psecnetwork!=NULL){
|
||||
|
||||
|
||||
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES|NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
|
||||
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short)* & psecnetwork->IEs[10];
|
||||
_rtw_memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
|
||||
|
@ -109,12 +109,12 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
|
||||
if (check_fwstate( pmlmepriv, _FW_UNDER_LINKING|_FW_LINKED)==_TRUE)
|
||||
{
|
||||
|
||||
|
||||
if (psecuritypriv->ndisauthtype>=Ndis802_11AuthModeWPA2)
|
||||
pDest[0] =48; //RSN Information Element
|
||||
else
|
||||
else
|
||||
pDest[0] =221; //WPA(SSN) Information Element
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n Adapter->ndisauthtype==Ndis802_11AuthModeWPA)?0xdd:0x30 [%d]",pDest[0]));
|
||||
supp_ie=&psecuritypriv->supplicant_ie[0];
|
||||
for (i=0;i<supp_ie[0];i++)
|
||||
|
@ -122,34 +122,34 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("IEs [%d] = 0x%x\n\n", i,supp_ie[i]));
|
||||
}
|
||||
|
||||
i=13; //0~11 is fixed information element
|
||||
i=13; //0~11 is fixed information element
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("i= %d tgt_network->network.IELength=%d\n\n", i,(int)psecnetwork->IELength));
|
||||
while ((i<supp_ie[0]) && (i<256)){
|
||||
if ((unsigned char)supp_ie[i]==pDest[0]){
|
||||
_rtw_memcpy((u8 *)(pDest),
|
||||
&supp_ie[i],
|
||||
&supp_ie[i],
|
||||
supp_ie[1+i]+2);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
i=i+supp_ie[i+1]+2;
|
||||
if (supp_ie[1+i]==0)
|
||||
i=i+1;
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("iteration i=%d IEs [%d] = 0x%x\n\n", i,i,supp_ie[i+1]));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
pAssocInfo->RequestIELength += (2 + supp_ie[1+i]);// (2 + psecnetwork->IEs[1+i]+4);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n psecnetwork != NULL,fwstate==_FW_UNDER_LINKING\n"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
// Association Response related information
|
||||
|
@ -177,20 +177,19 @@ u8 query_802_11_association_information( _adapter *padapter,PNDIS_802_11_ASSOCIA
|
|||
i=auth_ie[0]-12;
|
||||
if (i>0){
|
||||
_rtw_memcpy((u8 *)&pDest[0],&auth_ie[1],i);
|
||||
pAssocInfo->ResponseIELength =i;
|
||||
pAssocInfo->ResponseIELength =i;
|
||||
}
|
||||
|
||||
|
||||
pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength;
|
||||
pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength;
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n tgt_network != NULL,fwstate==_FW_LINKED\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
RT_TRACE(_module_rtl871x_ioctl_query_c_,_drv_info_,("\n exit query_802_11_association_information\n"));
|
||||
_func_exit_;
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
117
core/rtw_iol.c
117
core/rtw_iol.c
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -34,7 +34,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter)
|
|||
DBG_871X("%s rtw_alloc_xmitframe return null\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
if ((xmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL)
|
||||
{
|
||||
DBG_871X("%s rtw_alloc_xmitbuf return null\n", __func__);
|
||||
|
@ -42,7 +42,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter)
|
|||
xmit_frame=NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
xmit_frame->frame_tag = MGNT_FRAMETAG;
|
||||
xmit_frame->pxmitbuf = xmitbuf;
|
||||
xmit_frame->buf_addr = xmitbuf->pbuf;
|
||||
|
@ -50,8 +50,8 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter)
|
|||
|
||||
pattrib = &xmit_frame->attrib;
|
||||
update_mgntframe_attrib(adapter, pattrib);
|
||||
pattrib->qsel = 0x10;//Beacon
|
||||
pattrib->subtype = WIFI_BEACON;
|
||||
pattrib->qsel = 0x10;//Beacon
|
||||
pattrib->subtype = WIFI_BEACON;
|
||||
pattrib->pktlen = pattrib->last_txcmdsz = 0;
|
||||
|
||||
#else
|
||||
|
@ -93,11 +93,11 @@ int rtw_IOL_append_cmds(struct xmit_frame *xmit_frame, u8 *IOL_cmds, u32 cmd_len
|
|||
pattrib->last_txcmdsz += cmd_len;
|
||||
|
||||
//DBG_871X("%s ori:%u + cmd_len:%u = %u\n", __func__, ori_len, cmd_len, buf_offset+pattrib->pktlen);
|
||||
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
bool rtw_IOL_applied(ADAPTER *adapter)
|
||||
{
|
||||
{
|
||||
if (1 == adapter->registrypriv.fw_iol)
|
||||
return _TRUE;
|
||||
|
||||
|
@ -137,18 +137,18 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, u8
|
|||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WB_REG,0x0, 0x0,0x0};
|
||||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
cmd.data = cpu_to_le32(value);
|
||||
|
||||
|
||||
if (mask!=0xFF)
|
||||
{
|
||||
cmd.length = 12;
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __func__, addr,value,mask);
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
@ -158,65 +158,65 @@ int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, u
|
|||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WW_REG,0x0, 0x0,0x0};
|
||||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
cmd.data = cpu_to_le32(value);
|
||||
|
||||
|
||||
if (mask!=0xFFFF)
|
||||
{
|
||||
cmd.length = 12;
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __func__, addr,value,mask);
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
|
||||
}
|
||||
int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, u32 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_WD_REG,0x0, 0x0,0x0};
|
||||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = cpu_to_le16(addr);
|
||||
cmd.data = cpu_to_le32(value);
|
||||
|
||||
|
||||
if (mask!=0xFFFFFFFF)
|
||||
{
|
||||
cmd.length = 12;
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//DBG_871X("%s addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FU2NCTION__, addr,value,mask);
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr, u32 value, u32 mask)
|
||||
{
|
||||
struct ioreg_cfg cmd = {8,IOREG_CMD_W_RF,0x0, 0x0,0x0};
|
||||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = (rf_path<<8) |((addr) &0xFF);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, addr);
|
||||
//RTW_PUT_LE32((u8*)&cmd.value, (u32)value);
|
||||
cmd.address = (rf_path<<8) |((addr) &0xFF);
|
||||
cmd.data = cpu_to_le32(value);
|
||||
|
||||
|
||||
if (mask!=0x000FFFFF)
|
||||
{
|
||||
cmd.length = 12;
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
//RTW_PUT_LE32((u8*)&cmd.mask, (u32)mask);
|
||||
cmd.mask = cpu_to_le32(mask);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//DBG_871X("%s rf_path:0x%02x addr:0x%04x,value:0x%08x,mask:0x%08x\n", __FU2NCTION__,rf_path, addr,value,mask);
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, cmd.length);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -224,8 +224,8 @@ int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path, u16 addr,
|
|||
int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us)
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_DELAY_US,0x0, 0x0,0x0};
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, us);
|
||||
cmd.address = cpu_to_le16(us);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, us);
|
||||
cmd.address = cpu_to_le16(us);
|
||||
|
||||
//DBG_871X("%s %u\n", __func__, us);
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
|
||||
|
@ -235,29 +235,29 @@ int rtw_IOL_append_DELAY_MS_cmd(struct xmit_frame *xmit_frame, u16 ms)
|
|||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_DELAY_US,0x0, 0x0,0x0};
|
||||
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, ms);
|
||||
cmd.address = cpu_to_le16(ms);
|
||||
//RTW_PUT_LE16((u8*)&cmd.address, ms);
|
||||
cmd.address = cpu_to_le16(ms);
|
||||
|
||||
//DBG_871X("%s %u\n", __func__, ms);
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
|
||||
}
|
||||
int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame)
|
||||
{
|
||||
{
|
||||
struct ioreg_cfg cmd = {4,IOREG_CMD_END,0xFFFF, 0xFF,0x0};
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 4);
|
||||
|
||||
}
|
||||
|
||||
u8 rtw_IOL_cmd_boundary_handle(struct xmit_frame *pxmit_frame)
|
||||
{
|
||||
{
|
||||
u8 is_cmd_bndy = _FALSE;
|
||||
if (((pxmit_frame->attrib.pktlen+32)%256) + 8 >= 256){
|
||||
rtw_IOL_append_END_cmd(pxmit_frame);
|
||||
pxmit_frame->attrib.pktlen = ((((pxmit_frame->attrib.pktlen+32)/256)+1)*256 );
|
||||
|
||||
|
||||
//printk("==> %s, pktlen(%d)\n",__func__,pxmit_frame->attrib.pktlen);
|
||||
pxmit_frame->attrib.last_txcmdsz = pxmit_frame->attrib.pktlen;
|
||||
is_cmd_bndy = _TRUE;
|
||||
is_cmd_bndy = _TRUE;
|
||||
}
|
||||
return is_cmd_bndy;
|
||||
}
|
||||
|
@ -266,23 +266,23 @@ void rtw_IOL_cmd_buf_dump(ADAPTER *Adapter,int buf_len,u8 *pbuf)
|
|||
{
|
||||
int i;
|
||||
int j=1;
|
||||
|
||||
|
||||
printk("###### %s ######\n",__func__);
|
||||
for (i=0;i< buf_len;i++){
|
||||
printk("%02x-",*(pbuf+i));
|
||||
|
||||
if (j%32 ==0) printk("\n");j++;
|
||||
|
||||
if (j%32 ==0) printk("\n");j++;
|
||||
}
|
||||
printk("\n");
|
||||
printk("============= ioreg_cmd len = %d ===============\n",buf_len);
|
||||
printk("============= ioreg_cmd len = %d ===============\n",buf_len);
|
||||
}
|
||||
|
||||
|
||||
#else //CONFIG_IOL_NEW_GENERATION
|
||||
int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary)
|
||||
{
|
||||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_LLT, 0x0, 0x0};
|
||||
|
||||
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)page_boundary);
|
||||
|
||||
return rtw_IOL_append_cmds(xmit_frame, (u8*)&cmd, 8);
|
||||
|
@ -291,7 +291,7 @@ int rtw_IOL_append_LLT_cmd(struct xmit_frame *xmit_frame, u8 page_boundary)
|
|||
int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value)
|
||||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_WB_REG, 0x0, 0x0};
|
||||
|
||||
|
||||
RTW_PUT_BE16((u8*)&cmd.address, (u16)addr);
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)value);
|
||||
|
||||
|
@ -301,7 +301,7 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value)
|
|||
int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value)
|
||||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_WW_REG, 0x0, 0x0};
|
||||
|
||||
|
||||
RTW_PUT_BE16((u8*)&cmd.address, (u16)addr);
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)value);
|
||||
|
||||
|
@ -312,7 +312,7 @@ int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value)
|
|||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_WD_REG, 0x0, 0x0};
|
||||
u8* pos = (u8 *)&cmd;
|
||||
|
||||
|
||||
RTW_PUT_BE16((u8*)&cmd.address, (u16)addr);
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)value);
|
||||
|
||||
|
@ -348,7 +348,7 @@ int dbg_rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value
|
|||
int rtw_IOL_append_DELAY_US_cmd(struct xmit_frame *xmit_frame, u16 us)
|
||||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_DELAY_US, 0x0, 0x0};
|
||||
|
||||
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)us);
|
||||
|
||||
//DBG_871X("%s %u\n", __func__, us);
|
||||
|
@ -359,7 +359,7 @@ 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)
|
||||
{
|
||||
IOL_CMD cmd = {0x0, IOL_CMD_DELAY_MS, 0x0, 0x0};
|
||||
|
||||
|
||||
RTW_PUT_BE32((u8*)&cmd.value, (u32)ms);
|
||||
|
||||
//DBG_871X("%s %u\n", __func__, ms);
|
||||
|
@ -368,7 +368,7 @@ 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)
|
||||
{
|
||||
{
|
||||
IOL_CMD end_cmd = {0x0, IOL_CMD_END, 0x0, 0x0};
|
||||
|
||||
|
||||
|
@ -400,4 +400,3 @@ int rtw_IOL_exec_empty_cmds_sync(ADAPTER *adapter, u32 max_wating_ms)
|
|||
|
||||
|
||||
#endif //CONFIG_IOL
|
||||
|
||||
|
|
4843
core/rtw_led.c
4843
core/rtw_led.c
File diff suppressed because it is too large
Load diff
1193
core/rtw_mlme.c
1193
core/rtw_mlme.c
File diff suppressed because it is too large
Load diff
1785
core/rtw_mlme_ext.c
1785
core/rtw_mlme_ext.c
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -39,8 +39,8 @@
|
|||
#include "rtw_bt_mp.h"
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8188E
|
||||
#include "odm_precomp.h"
|
||||
#include "rtl8188e_hal.h"
|
||||
#include "odm_precomp.h"
|
||||
#include "rtl8188e_hal.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ u32 read_macreg(_adapter *padapter, u32 addr, u32 sz)
|
|||
}
|
||||
|
||||
return val;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz)
|
||||
|
@ -385,7 +385,7 @@ MPT_InitializeAdapter(
|
|||
pMptCtx->bMPh2c_timeout = _FALSE;
|
||||
pMptCtx->MptH2cRspEvent = _FALSE;
|
||||
pMptCtx->MptBtC2hEvent = _FALSE;
|
||||
|
||||
|
||||
_rtw_init_sema(&pMptCtx->MPh2c_Sema, 0);
|
||||
_init_timer( &pMptCtx->MPh2c_timeout_timer, pAdapter->pnetdev, MPh2c_timeout_handle, pAdapter );
|
||||
#endif
|
||||
|
@ -412,12 +412,12 @@ MPT_InitializeAdapter(
|
|||
{
|
||||
//rtw_write32(pAdapter, REG_LEDCFG0, 0x08080);
|
||||
ledsetting = rtw_read32(pAdapter, REG_LEDCFG0);
|
||||
|
||||
|
||||
#if defined (CONFIG_RTL8192C) || defined( CONFIG_RTL8192D )
|
||||
rtw_write32(pAdapter, REG_LEDCFG0, ledsetting & ~LED0DIS);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
PHY_IQCalibrate(pAdapter, _FALSE);
|
||||
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
||||
PHY_LCCalibrate(pAdapter);
|
||||
|
@ -561,7 +561,7 @@ s32 mp_start_test(PADAPTER padapter)
|
|||
|
||||
padapter->registrypriv.mp_mode = 1;
|
||||
pmppriv->bSetTxPower=0; //for manually set tx power
|
||||
|
||||
|
||||
//3 disable dynamic mechanism
|
||||
disable_dm(padapter);
|
||||
|
||||
|
@ -684,11 +684,11 @@ void mp_stop_test(PADAPTER padapter)
|
|||
struct sta_info *psta;
|
||||
|
||||
_irqL irqL;
|
||||
|
||||
|
||||
if (pmppriv->mode==MP_ON)
|
||||
{
|
||||
pmppriv->bSetTxPower=0;
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _FALSE)
|
||||
goto end_of_mp_stop_test;
|
||||
|
||||
|
@ -792,7 +792,7 @@ void SetAntennaPathPower(PADAPTER pAdapter)
|
|||
{
|
||||
Hal_SetAntennaPathPower(pAdapter);
|
||||
}
|
||||
|
||||
|
||||
void SetTxPower(PADAPTER pAdapter)
|
||||
{
|
||||
Hal_SetTxPower(pAdapter);
|
||||
|
@ -891,7 +891,7 @@ static void SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart)
|
|||
static void SetOFDMContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||
{
|
||||
PhySetTxPowerLevel(pAdapter);
|
||||
Hal_SetOFDMContinuousTx( pAdapter, bStart);
|
||||
Hal_SetOFDMContinuousTx( pAdapter, bStart);
|
||||
}/* mpt_StartOfdmContTx */
|
||||
|
||||
void SetContinuousTx(PADAPTER pAdapter, u8 bStart)
|
||||
|
@ -904,10 +904,10 @@ void SetContinuousTx(PADAPTER pAdapter, u8 bStart)
|
|||
void PhySetTxPowerLevel(PADAPTER pAdapter)
|
||||
{
|
||||
struct mp_priv *pmp_priv = &pAdapter->mppriv;
|
||||
|
||||
|
||||
if (pmp_priv->bSetTxPower==0) // for NO manually set power index
|
||||
{
|
||||
#ifdef CONFIG_RTL8188E
|
||||
#ifdef CONFIG_RTL8188E
|
||||
PHY_SetTxPowerLevel8188E(pAdapter,pmp_priv->channel);
|
||||
#elif defined(CONFIG_RTL8192D)
|
||||
PHY_SetTxPowerLevel8192D(pAdapter,pmp_priv->channel);
|
||||
|
@ -983,7 +983,7 @@ static thread_return mp_xmit_packet_thread(thread_context context)
|
|||
|
||||
_rtw_memcpy((u8 *)(pxmitframe->buf_addr+TXDESC_OFFSET), pmptx->buf, pmptx->write_size);
|
||||
_rtw_memcpy(&(pxmitframe->attrib), &(pmptx->attrib), sizeof(struct pkt_attrib));
|
||||
|
||||
|
||||
dump_mpframe(padapter, pxmitframe);
|
||||
|
||||
pmptx->sended++;
|
||||
|
@ -1010,7 +1010,7 @@ exit:
|
|||
}
|
||||
|
||||
void fill_txdesc_for_mp(PADAPTER padapter, struct tx_desc *ptxdesc)
|
||||
{
|
||||
{
|
||||
struct mp_priv *pmp_priv = &padapter->mppriv;
|
||||
_rtw_memcpy(ptxdesc, &(pmp_priv->tx.desc), TXDESC_SIZE);
|
||||
}
|
||||
|
@ -1080,14 +1080,14 @@ void SetPacketTx(PADAPTER padapter)
|
|||
desc->txdw1 |= cpu_to_le32((0x01 << 26) & 0xff000000);
|
||||
#endif
|
||||
// offset 4
|
||||
#ifndef CONFIG_RTL8188E
|
||||
#ifndef CONFIG_RTL8188E
|
||||
desc->txdw1 |= cpu_to_le32(BK); // don't aggregate(AMPDU)
|
||||
desc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x1F); //CAM_ID(MAC_ID)
|
||||
#else
|
||||
desc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x3F); //CAM_ID(MAC_ID)
|
||||
#endif
|
||||
desc->txdw1 |= cpu_to_le32((pattrib->qsel << QSEL_SHT) & 0x00001F00); // Queue Select, TID
|
||||
|
||||
|
||||
#ifdef CONFIG_RTL8188E
|
||||
desc->txdw1 |= cpu_to_le32((pattrib->raid << RATE_ID_SHT) & 0x000F0000); // Rate Adaptive ID
|
||||
#else
|
||||
|
@ -1128,7 +1128,7 @@ void SetPacketTx(PADAPTER padapter)
|
|||
}
|
||||
#ifdef CONFIG_RTL8188E
|
||||
desc->txdw5 |= cpu_to_le32(RTY_LMT_EN); // retry limit enable
|
||||
desc->txdw5 |= cpu_to_le32(0x00180000); // DATA/RTS Rate Fallback Limit
|
||||
desc->txdw5 |= cpu_to_le32(0x00180000); // DATA/RTS Rate Fallback Limit
|
||||
#else
|
||||
desc->txdw5 |= cpu_to_le32(0x0001FF00); // DATA/RTS Rate Fallback Limit
|
||||
#endif
|
||||
|
@ -1192,11 +1192,11 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx)
|
|||
#if 1
|
||||
//ndef CONFIG_RTL8723A
|
||||
pHalData->ReceiveConfig = AAP | APM | AM | AB | APP_ICV | ADF | AMF | HTC_LOC_CTRL | APP_MIC | APP_PHYSTS;
|
||||
|
||||
|
||||
pHalData->ReceiveConfig |= ACRC32;
|
||||
|
||||
|
||||
rtw_write32(pAdapter, REG_RCR, pHalData->ReceiveConfig);
|
||||
|
||||
|
||||
// Accept all data frames
|
||||
rtw_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
|
||||
#else
|
||||
|
@ -1311,7 +1311,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data)
|
|||
if (strlen(data) == 0) { //default value
|
||||
psd_pts = 128;
|
||||
psd_start = 64;
|
||||
psd_stop = 128;
|
||||
psd_stop = 128;
|
||||
} else {
|
||||
sscanf(data, "pts=%d,start=%d,stop=%d", &psd_pts, &psd_start, &psd_stop);
|
||||
}
|
||||
|
@ -1347,7 +1347,7 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
_adapter *padapter = pxmitpriv->adapter;
|
||||
struct xmit_frame *pxmitframe = (struct xmit_frame*) pxmitpriv->pxmit_frame_buf;
|
||||
struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
|
||||
|
||||
|
||||
u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
|
||||
u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
|
||||
if (padapter->registrypriv.mp_mode ==0)
|
||||
|
@ -1365,7 +1365,7 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
for (i=0; i<num_xmit_extbuf; i++)
|
||||
{
|
||||
rtw_os_xmit_resource_free(padapter, pxmitbuf,(max_xmit_extbuf_size + XMITBUF_ALIGN_SZ));
|
||||
|
||||
|
||||
pxmitbuf++;
|
||||
}
|
||||
|
||||
|
@ -1383,12 +1383,12 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
|
||||
num_xmit_extbuf = NR_XMIT_EXTBUFF;
|
||||
}
|
||||
|
||||
|
||||
// Init xmit extension buff
|
||||
_rtw_init_queue(&pxmitpriv->free_xmit_extbuf_queue);
|
||||
|
||||
pxmitpriv->pallocated_xmit_extbuf = rtw_zvmalloc(num_xmit_extbuf * sizeof(struct xmit_buf) + 4);
|
||||
|
||||
|
||||
if (pxmitpriv->pallocated_xmit_extbuf == NULL){
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("alloc xmit_extbuf fail!\n"));
|
||||
res= _FAIL;
|
||||
|
@ -1416,13 +1416,13 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
}
|
||||
|
||||
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), 4);
|
||||
*/
|
||||
*/
|
||||
|
||||
if ((res=rtw_os_xmit_resource_alloc(padapter, pxmitbuf,max_xmit_extbuf_size + XMITBUF_ALIGN_SZ)) == _FAIL) {
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
pxmitbuf->phead = pxmitbuf->pbuf;
|
||||
pxmitbuf->pend = pxmitbuf->pbuf + max_xmit_extbuf_size;
|
||||
|
@ -1435,7 +1435,7 @@ void _rtw_mp_xmit_priv (struct xmit_priv *pxmitpriv)
|
|||
pxmitbuf->no=i;
|
||||
#endif
|
||||
pxmitbuf++;
|
||||
|
||||
|
||||
}
|
||||
|
||||
pxmitpriv->free_xmit_extbuf_cnt = num_xmit_extbuf;
|
||||
|
@ -1446,4 +1446,3 @@ exit:
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -176,7 +176,7 @@ _func_enter_;
|
|||
path, offset, value));
|
||||
|
||||
_irqlevel_changed_(&oldirql, LOWER);
|
||||
write_rfreg(Adapter, path, offset, value);
|
||||
write_rfreg(Adapter, path, offset, value);
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
||||
_func_exit_;
|
||||
|
@ -828,7 +828,7 @@ NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv
|
|||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 bStartTest;
|
||||
u32 bStartTest;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
|
@ -888,7 +888,7 @@ NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
|||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
pRW_Reg RegRWStruct;
|
||||
pRW_Reg RegRWStruct;
|
||||
u32 offset, width;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
@ -940,7 +940,7 @@ NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
|||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
pRW_Reg RegRWStruct;
|
||||
pRW_Reg RegRWStruct;
|
||||
u32 offset, width, value;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
@ -1596,7 +1596,7 @@ _func_enter_;
|
|||
//CALL the power_down function
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if defined(CONFIG_RTL8712) //Linux MP insmod unknown symbol
|
||||
dev_power_down(padapter,bpwrup);
|
||||
dev_power_down(padapter,bpwrup);
|
||||
#endif
|
||||
#endif
|
||||
_irqlevel_changed_(&oldirql, RAISE);
|
||||
|
@ -1613,4 +1613,3 @@ NDIS_STATUS oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
607
core/rtw_p2p.c
607
core/rtw_p2p.c
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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.
|
||||
|
@ -43,38 +43,38 @@ void ips_enter(_adapter * padapter)
|
|||
if (pxmit_priv->free_xmitbuf_cnt != NR_XMITBUFF ||
|
||||
pxmit_priv->free_xmit_extbuf_cnt != NR_XMIT_EXTBUFF) {
|
||||
DBG_871X_LEVEL(_drv_always_, "There are some pkts to transmit\n");
|
||||
DBG_871X_LEVEL(_drv_info_, "free_xmitbuf_cnt: %d, free_xmit_extbuf_cnt: %d\n",
|
||||
pxmit_priv->free_xmitbuf_cnt, pxmit_priv->free_xmit_extbuf_cnt);
|
||||
DBG_871X_LEVEL(_drv_info_, "free_xmitbuf_cnt: %d, free_xmit_extbuf_cnt: %d\n",
|
||||
pxmit_priv->free_xmitbuf_cnt, pxmit_priv->free_xmit_extbuf_cnt);
|
||||
return;
|
||||
}
|
||||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
pwrpriv->bips_processing = _TRUE;
|
||||
|
||||
// syn ips_mode with request
|
||||
pwrpriv->ips_mode = pwrpriv->ips_mode_req;
|
||||
|
||||
pwrpriv->ips_enter_cnts++;
|
||||
|
||||
pwrpriv->ips_enter_cnts++;
|
||||
DBG_871X("==>ips_enter cnts:%d\n",pwrpriv->ips_enter_cnts);
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
BTDM_TurnOffBtCoexistBeforeEnterIPS(padapter);
|
||||
#endif
|
||||
if (rf_off == pwrpriv->change_rfpwrstate )
|
||||
{
|
||||
{
|
||||
pwrpriv->bpower_saving = _TRUE;
|
||||
DBG_871X_LEVEL(_drv_always_, "nolinked power save enter\n");
|
||||
|
||||
if (pwrpriv->ips_mode == IPS_LEVEL_2)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
|
||||
|
||||
rtw_ips_pwr_down(padapter);
|
||||
pwrpriv->rf_pwrstate = rf_off;
|
||||
}
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
|
||||
}
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
|
||||
_exit_pwrlock(&pwrpriv->lock);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int ips_leave(_adapter * padapter)
|
||||
|
@ -103,7 +103,7 @@ int ips_leave(_adapter * padapter)
|
|||
if ((_WEP40_ == psecuritypriv->dot11PrivacyAlgrthm) ||(_WEP104_ == psecuritypriv->dot11PrivacyAlgrthm))
|
||||
{
|
||||
DBG_871X("==>%s,channel(%d),processing(%x)\n",__func__,padapter->mlmeextpriv.cur_channel,pwrpriv->bips_processing);
|
||||
set_channel_bwmode(padapter, padapter->mlmeextpriv.cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
set_channel_bwmode(padapter, padapter->mlmeextpriv.cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
for (keyid=0;keyid<4;keyid++){
|
||||
if (pmlmepriv->key_mask & BIT(keyid)){
|
||||
if (keyid == psecuritypriv->dot11PrivacyKeyIndex)
|
||||
|
@ -113,7 +113,7 @@ int ips_leave(_adapter * padapter)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DBG_871X("==> ips_leave.....LED(0x%08x)...\n",rtw_read32(padapter,0x4c));
|
||||
pwrpriv->bips_processing = _FALSE;
|
||||
|
||||
|
@ -130,7 +130,7 @@ int ips_leave(_adapter * padapter)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
extern void autosuspend_enter(_adapter* padapter);
|
||||
extern void autosuspend_enter(_adapter* padapter);
|
||||
extern int autoresume_enter(_adapter* padapter);
|
||||
#endif
|
||||
|
||||
|
@ -216,9 +216,9 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
if (pwrpriv->bips_processing == _TRUE)
|
||||
goto exit;
|
||||
|
||||
//DBG_871X("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca));
|
||||
if (padapter->pwrctrlpriv.bHWPwrPindetect)
|
||||
|
||||
//DBG_871X("==> fw report state(0x%x)\n",rtw_read8(padapter,0x1ca));
|
||||
if (padapter->pwrctrlpriv.bHWPwrPindetect)
|
||||
{
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (padapter->registrypriv.usbss_enable)
|
||||
|
@ -235,14 +235,14 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
if (rfpwrstate == rf_off)
|
||||
{
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
|
||||
autosuspend_enter(padapter);
|
||||
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_AUTOSUSPEND
|
||||
|
@ -253,21 +253,21 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
if (rfpwrstate!= pwrpriv->rf_pwrstate)
|
||||
{
|
||||
if (rfpwrstate == rf_off)
|
||||
{
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
{
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
pwrpriv->brfoffbyhw = _TRUE;
|
||||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
rtw_hw_suspend(padapter );
|
||||
rtw_hw_suspend(padapter );
|
||||
}
|
||||
else
|
||||
{
|
||||
pwrpriv->change_rfpwrstate = rf_on;
|
||||
rtw_hw_resume(padapter );
|
||||
rtw_hw_resume(padapter );
|
||||
}
|
||||
DBG_871X("current rf_pwrstate(%s)\n",(pwrpriv->rf_pwrstate == rf_off)?"rf_off":"rf_on");
|
||||
}
|
||||
}
|
||||
pwrpriv->pwr_state_check_cnts ++;
|
||||
pwrpriv->pwr_state_check_cnts ++;
|
||||
}
|
||||
#endif //SUPPORT_HW_RFOFF_DETECTED
|
||||
|
||||
|
@ -291,9 +291,9 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (padapter->registrypriv.usbss_enable)
|
||||
{
|
||||
if (pwrpriv->bHWPwrPindetect)
|
||||
if (pwrpriv->bHWPwrPindetect)
|
||||
pwrpriv->bkeepfwalive = _TRUE;
|
||||
|
||||
|
||||
if (padapter->net_closed == _TRUE)
|
||||
pwrpriv->ps_flag = _TRUE;
|
||||
|
||||
|
@ -305,12 +305,12 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
DBG_871X("<==%s .pwrpriv->bInternalAutoSuspend)(%x) call autosuspend_enter\n",__func__,pwrpriv->bInternalAutoSuspend);
|
||||
autosuspend_enter(padapter);
|
||||
}
|
||||
}
|
||||
#else
|
||||
padapter->bCardDisableWOHSM = _TRUE;
|
||||
autosuspend_enter(padapter);
|
||||
#endif //if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
}
|
||||
else if (pwrpriv->bHWPwrPindetect)
|
||||
{
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
#endif //defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
ips_enter(padapter);
|
||||
ips_enter(padapter);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -448,11 +448,11 @@ u8 PS_RDY_CHECK(_adapter * padapter)
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
|
||||
curr_time = rtw_get_current_time();
|
||||
curr_time = rtw_get_current_time();
|
||||
delta_time = curr_time -pwrpriv->DelayLPSLastTimeStamp;
|
||||
|
||||
if (delta_time < LPS_DELAY_TIME)
|
||||
{
|
||||
{
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
|
@ -479,7 +479,7 @@ u8 PS_RDY_CHECK(_adapter * padapter)
|
|||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
if (!rtw_cfg80211_pwr_mgmt(padapter))
|
||||
return _FALSE;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
|
@ -681,11 +681,11 @@ _func_enter_;
|
|||
struct mlme_priv *b_pmlmepriv = &(buddy->mlmepriv);
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info *b_pwdinfo = &(buddy->wdinfo);
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct cfg80211_wifidirect_info *b_pcfg80211_wdinfo = &buddy->cfg80211_wdinfo;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR)
|
||||
|| check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS)
|
||||
|| check_fwstate(b_pmlmepriv, WIFI_AP_STATE)
|
||||
|
@ -708,7 +708,7 @@ _func_enter_;
|
|||
if (_TRUE == pwrpriv->bLeisurePs)
|
||||
{
|
||||
// Idle for a while if we connect to AP a while ago.
|
||||
if (pwrpriv->LpsIdleCount >= 2) // 4 Sec
|
||||
if (pwrpriv->LpsIdleCount >= 2) // 4 Sec
|
||||
{
|
||||
if (pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
{
|
||||
|
@ -769,7 +769,7 @@ _func_exit_;
|
|||
|
||||
//
|
||||
// Description: Leave all power save mode: LPS, FwLPS, IPS if needed.
|
||||
// Move code to function by tynli. 2010.03.26.
|
||||
// Move code to function by tynli. 2010.03.26.
|
||||
//
|
||||
void LeaveAllPowerSaveMode(IN PADAPTER Adapter)
|
||||
{
|
||||
|
@ -795,7 +795,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
LPS_Leave_check(Adapter);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -817,12 +817,12 @@ _func_enter_;
|
|||
#ifdef CONFIG_IPS
|
||||
if (_FALSE == ips_leave(Adapter))
|
||||
{
|
||||
DBG_871X("======> ips_leave fail.............\n");
|
||||
DBG_871X("======> ips_leave fail.............\n");
|
||||
}
|
||||
#endif
|
||||
#endif //CONFIG_PLATFORM_SPRD && CONFIG_RTL8188E
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
|
@ -844,7 +844,7 @@ _func_enter_;
|
|||
start_time = rtw_get_current_time();
|
||||
|
||||
rtw_yield_os();
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
@ -1020,13 +1020,13 @@ __inline static void unregister_task_alive(struct pwrctrl_priv *pwrctrl, u32 tag
|
|||
|
||||
/*
|
||||
* Caller: rtw_xmit_thread
|
||||
*
|
||||
*
|
||||
* Check if the fw_pwrstate is okay for xmit.
|
||||
* If not (cpwm is less than S3), then the sub-routine
|
||||
* will raise the cpwm to be greater than or equal to S3.
|
||||
* will raise the cpwm to be greater than or equal to S3.
|
||||
*
|
||||
* Calling Context: Passive
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* _SUCCESS rtw_xmit_thread can write fifo/txcmd afterwards.
|
||||
* _FAIL rtw_xmit_thread can not do anything.
|
||||
|
@ -1073,7 +1073,7 @@ _func_enter_;
|
|||
|
||||
_func_exit_;
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1347,7 +1347,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
pwrctrlpriv->pwr_state_check_interval = (pwrctrlpriv->bHWPwrPindetect) ?1000:2000;
|
||||
pwrctrlpriv->pwr_state_check_interval = (pwrctrlpriv->bHWPwrPindetect) ?1000:2000;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ _func_enter_;
|
|||
//pwrctrlpriv->FWCtrlPSMode =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
pwrctrlpriv->power_mgnt =PS_MODE_ACTIVE ;
|
||||
else
|
||||
else
|
||||
pwrctrlpriv->power_mgnt =padapter->registrypriv.power_mgnt;// PS_MODE_MIN;
|
||||
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt)?_TRUE:_FALSE;
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ _func_enter_;
|
|||
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
if (pwrctrlpriv->rtw_workqueue) {
|
||||
if (pwrctrlpriv->rtw_workqueue) {
|
||||
flush_workqueue(pwrctrlpriv->rtw_workqueue);
|
||||
destroy_workqueue(pwrctrlpriv->rtw_workqueue);
|
||||
}
|
||||
|
@ -1444,16 +1444,16 @@ static void resume_workitem_callback(struct work_struct *work)
|
|||
#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
rtw_resume_process(adapter);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv)
|
||||
{
|
||||
// accquire system's suspend lock preventing from falliing asleep while resume in workqueue
|
||||
rtw_lock_suspend();
|
||||
|
||||
|
||||
#if 1
|
||||
queue_work(pwrpriv->rtw_workqueue, &pwrpriv->resume_work);
|
||||
queue_work(pwrpriv->rtw_workqueue, &pwrpriv->resume_work);
|
||||
#else
|
||||
_set_workitem(&pwrpriv->resume_work);
|
||||
#endif
|
||||
|
@ -1468,7 +1468,7 @@ static void rtw_early_suspend(struct early_suspend *h)
|
|||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
DBG_871X("%s\n",__func__);
|
||||
|
||||
|
||||
//jeff: do nothing but set do_late_resume to false
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
}
|
||||
|
@ -1495,9 +1495,9 @@ void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
pwrpriv->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20;
|
||||
pwrpriv->early_suspend.suspend = rtw_early_suspend;
|
||||
pwrpriv->early_suspend.resume = rtw_late_resume;
|
||||
register_early_suspend(&pwrpriv->early_suspend);
|
||||
register_early_suspend(&pwrpriv->early_suspend);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
||||
|
@ -1506,7 +1506,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
||||
pwrpriv->early_suspend.suspend = NULL;
|
||||
|
@ -1522,7 +1522,7 @@ static void rtw_early_suspend(android_early_suspend_t *h)
|
|||
{
|
||||
struct pwrctrl_priv *pwrpriv = container_of(h, struct pwrctrl_priv, early_suspend);
|
||||
DBG_871X("%s\n",__func__);
|
||||
|
||||
|
||||
//jeff: do nothing but set do_late_resume to false
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
}
|
||||
|
@ -1549,7 +1549,7 @@ void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
pwrpriv->early_suspend.level = ANDROID_EARLY_SUSPEND_LEVEL_BLANK_SCREEN - 20;
|
||||
pwrpriv->early_suspend.suspend = rtw_early_suspend;
|
||||
pwrpriv->early_suspend.resume = rtw_late_resume;
|
||||
android_register_early_suspend(&pwrpriv->early_suspend);
|
||||
android_register_early_suspend(&pwrpriv->early_suspend);
|
||||
}
|
||||
|
||||
void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
||||
|
@ -1558,7 +1558,7 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv)
|
|||
|
||||
pwrpriv->do_late_resume = _FALSE;
|
||||
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
if (pwrpriv->early_suspend.suspend)
|
||||
android_unregister_early_suspend(&pwrpriv->early_suspend);
|
||||
|
||||
pwrpriv->early_suspend.suspend = NULL;
|
||||
|
@ -1570,7 +1570,7 @@ u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val)
|
|||
{
|
||||
u8 bResult = _TRUE;
|
||||
rtw_hal_intf_ps_func(padapter,efunc_id,val);
|
||||
|
||||
|
||||
return bResult;
|
||||
}
|
||||
|
||||
|
@ -1591,7 +1591,7 @@ inline void rtw_set_ips_deny(_adapter *padapter, u32 ms)
|
|||
int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
||||
{
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -1639,12 +1639,12 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
if (_TRUE==pwrpriv->bInternalAutoSuspend){
|
||||
if (0==pwrpriv->autopm_cnt){
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
|
||||
if (usb_autopm_get_interface(adapter_to_dvobj(padapter)->pusbintf) < 0)
|
||||
{
|
||||
DBG_871X( "can't get autopm:\n");
|
||||
}
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))
|
||||
}
|
||||
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))
|
||||
usb_autopm_disable(adapter_to_dvobj(padapter)->pusbintf);
|
||||
#else
|
||||
usb_autoresume_device(adapter_to_dvobj(padapter)->pusbdev, 1);
|
||||
|
@ -1657,9 +1657,9 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
#endif //#if defined (CONFIG_BT_COEXIST)&& defined (CONFIG_AUTOSUSPEND)
|
||||
}
|
||||
}
|
||||
if (rf_off == pwrpriv->rf_pwrstate )
|
||||
{
|
||||
{
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
if (pwrpriv->brfoffbyhw==_TRUE)
|
||||
|
@ -1676,7 +1676,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
DBG_8192C("======> autoresume fail.............\n");
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -1701,9 +1701,9 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
){
|
||||
DBG_8192C("%s: bDriverStopped=%d, bup=%d, hw_init_completed=%u\n"
|
||||
, caller
|
||||
, padapter->bDriverStopped
|
||||
, padapter->bup
|
||||
, padapter->hw_init_completed);
|
||||
, padapter->bDriverStopped
|
||||
, padapter->bup
|
||||
, padapter->hw_init_completed);
|
||||
ret= _FALSE;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1717,9 +1717,9 @@ exit:
|
|||
|
||||
int rtw_pm_set_lps(_adapter *padapter, u8 mode)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 0;
|
||||
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
|
||||
|
||||
|
||||
if ( mode < PS_MODE_NUM )
|
||||
{
|
||||
if (pwrctrlpriv->power_mgnt !=mode)
|
||||
|
@ -1752,7 +1752,7 @@ int rtw_pm_set_ips(_adapter *padapter, u8 mode)
|
|||
rtw_ips_mode_req(pwrctrlpriv, mode);
|
||||
DBG_871X("%s %s\n", __func__, mode == IPS_NORMAL?"IPS_NORMAL":"IPS_LEVEL_2");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (mode ==IPS_NONE){
|
||||
rtw_ips_mode_req(pwrctrlpriv, mode);
|
||||
DBG_871X("%s %s\n", __func__, "IPS_NONE");
|
||||
|
@ -1764,5 +1764,3 @@ int rtw_pm_set_ips(_adapter *padapter, u8 mode)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
299
core/rtw_recv.c
299
core/rtw_recv.c
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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.
|
||||
|
@ -90,7 +90,7 @@ _func_enter_;
|
|||
rtw_os_recv_resource_init(precvpriv, padapter);
|
||||
|
||||
precvpriv->pallocated_frame_buf = rtw_zvmalloc(NR_RECVFRAME * sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
|
||||
|
||||
|
||||
if (precvpriv->pallocated_frame_buf==NULL){
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
|
@ -154,7 +154,7 @@ void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv);
|
|||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv)
|
||||
{
|
||||
_rtw_spinlock_free(&precvpriv->lock);
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
_rtw_free_sema(&precvpriv->recv_sema);
|
||||
_rtw_free_sema(&precvpriv->terminate_recvthread_sema);
|
||||
#endif
|
||||
|
@ -231,7 +231,7 @@ union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
|||
{
|
||||
_irqL irqL;
|
||||
union recv_frame *precvframe;
|
||||
|
||||
|
||||
_enter_critical_bh(&pfree_recv_queue->lock, &irqL);
|
||||
|
||||
precvframe = _rtw_alloc_recvframe(pfree_recv_queue);
|
||||
|
@ -263,8 +263,8 @@ _func_enter_;
|
|||
padapter = padapter->pbuddy_adapter;//get primary_padapter
|
||||
precvpriv = &padapter->recvpriv;
|
||||
pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||
precvframe->u.hdr.adapter = padapter;
|
||||
}
|
||||
precvframe->u.hdr.adapter = padapter;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -338,7 +338,7 @@ sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
|||
{
|
||||
sint ret;
|
||||
_irqL irqL;
|
||||
|
||||
|
||||
//_spinlock(&pfree_recv_queue->lock);
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
ret = _rtw_enqueue_recvframe(precvframe, queue);
|
||||
|
@ -368,7 +368,7 @@ using spinlock to protect
|
|||
|
||||
void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
||||
{
|
||||
union recv_frame *precvframe;
|
||||
union recv_frame *precvframe;
|
||||
_list *plist, *phead;
|
||||
|
||||
_func_enter_;
|
||||
|
@ -424,7 +424,7 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
|||
|
||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
||||
{
|
||||
_irqL irqL;
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
|
@ -434,27 +434,27 @@ sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
|||
rtw_list_delete(&precvbuf->list);
|
||||
|
||||
rtw_list_insert_tail(&precvbuf->list, get_list_head(queue));
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_exit_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_exit_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
return _SUCCESS;
|
||||
|
||||
|
||||
}
|
||||
|
||||
struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
||||
{
|
||||
_irqL irqL;
|
||||
struct recv_buf *precvbuf;
|
||||
_list *plist, *phead;
|
||||
_list *plist, *phead;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
#else
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
#endif/*#ifdef CONFIG_SDIO_HCI*/
|
||||
|
||||
|
||||
if (_rtw_queue_empty(queue) == _TRUE)
|
||||
{
|
||||
precvbuf = NULL;
|
||||
|
@ -468,7 +468,7 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
|||
precvbuf = LIST_CONTAINOR(plist, struct recv_buf, list);
|
||||
|
||||
rtw_list_delete(&precvbuf->list);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
|
@ -493,7 +493,7 @@ sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe){
|
|||
//u8 *iv,rxdata_key_idx=0;
|
||||
struct sta_info *stainfo;
|
||||
struct rx_pkt_attrib *prxattrib=&precvframe->u.hdr.attrib;
|
||||
struct security_priv *psecuritypriv=&adapter->securitypriv;
|
||||
struct security_priv *psecuritypriv=&adapter->securitypriv;
|
||||
|
||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -516,11 +516,11 @@ _func_enter_;
|
|||
//iv = precvframe->u.hdr.rx_data+prxattrib->hdrlen;
|
||||
//rxdata_key_idx =( ((iv[3])>>6)&0x3) ;
|
||||
mickey=&psecuritypriv->dot118021XGrprxmickey[prxattrib->key_index].skey[0];
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("\n recvframe_chkmic: bcmc key\n"));
|
||||
//DBG_871X("\n recvframe_chkmic: bcmc key psecuritypriv->dot118021XGrpKeyid(%d),pmlmeinfo->key_index(%d) ,recv key_id(%d)\n",
|
||||
// psecuritypriv->dot118021XGrpKeyid,pmlmeinfo->key_index,rxdata_key_idx);
|
||||
|
||||
|
||||
if (psecuritypriv->binstallGrpkey==_FALSE)
|
||||
{
|
||||
res=_FAIL;
|
||||
|
@ -585,7 +585,7 @@ _func_enter_;
|
|||
// cannot compare with psecuritypriv->dot118021XGrpKeyid also cause timing issue
|
||||
if ((IS_MCAST(prxattrib->ra)==_TRUE) && (prxattrib->key_index != pmlmeinfo->key_index ))
|
||||
brpt_micerror = _FALSE;
|
||||
|
||||
|
||||
if ((prxattrib->bdecrypted ==_TRUE)&& (brpt_micerror == _TRUE))
|
||||
{
|
||||
rtw_handle_tkip_mic_err(adapter,(u8)IS_MCAST(prxattrib->ra));
|
||||
|
@ -654,13 +654,13 @@ _func_enter_;
|
|||
case _WEP104_:
|
||||
prxattrib->key_index = psecuritypriv->dot11PrivacyKeyIndex;
|
||||
break;
|
||||
case _TKIP_:
|
||||
case _AES_:
|
||||
case _TKIP_:
|
||||
case _AES_:
|
||||
default:
|
||||
prxattrib->key_index = psecuritypriv->dot118021XGrpKeyid;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==_TRUE)))
|
||||
|
@ -668,7 +668,7 @@ _func_enter_;
|
|||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!IS_MCAST(prxattrib->ra))//bc/mc packets use sw decryption for concurrent mode
|
||||
#endif
|
||||
#endif
|
||||
psecuritypriv->hw_decrypted=_FALSE;
|
||||
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
|
@ -714,12 +714,12 @@ _func_enter_;
|
|||
, prxattrib->bdecrypted ,prxattrib->encrypt, psecuritypriv->hw_decrypted);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (res == _FAIL)
|
||||
{
|
||||
rtw_free_recvframe(return_packet,&padapter->recvpriv.free_recv_queue);
|
||||
rtw_free_recvframe(return_packet,&padapter->recvpriv.free_recv_queue);
|
||||
return_packet = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
|
@ -738,7 +738,7 @@ union recv_frame * portctrl(_adapter *adapter,union recv_frame * precv_frame)
|
|||
struct sta_priv *pstapriv ;
|
||||
union recv_frame *prtnframe;
|
||||
u16 ether_type=0;
|
||||
u16 eapol_type = 0x888e;//for Funia BD's WPA issue
|
||||
u16 eapol_type = 0x888e;//for Funia BD's WPA issue
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
|
||||
_func_enter_;
|
||||
|
@ -902,13 +902,13 @@ void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_frame)
|
|||
void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
#ifdef CONFIG_AP_MODE
|
||||
#ifdef CONFIG_AP_MODE
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta=NULL;
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, pattrib->src);
|
||||
|
||||
|
||||
if (!psta) return;
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
|
@ -921,15 +921,15 @@ void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
if (!(psta->qos_info&0xf))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
}
|
||||
#endif //CONFIG_TDLS
|
||||
#endif //CONFIG_TDLS
|
||||
|
||||
if (psta->state&WIFI_SLEEP_STATE)
|
||||
{
|
||||
u8 wmmps_ac=0;
|
||||
|
||||
u8 wmmps_ac=0;
|
||||
|
||||
switch (pattrib->priority)
|
||||
{
|
||||
case 1:
|
||||
|
@ -948,7 +948,7 @@ void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame)
|
|||
case 3:
|
||||
default:
|
||||
wmmps_ac = psta->uapsd_be&BIT(1);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (wmmps_ac)
|
||||
|
@ -964,11 +964,11 @@ void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame)
|
|||
issue_qos_nulldata(padapter, psta->hwaddr, (u16)pattrib->priority, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@ -985,11 +985,11 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
struct tdls_info *ptdlsinfo = &(adapter->tdlsinfo);
|
||||
|
||||
//point to action field
|
||||
paction+=pattrib->hdrlen
|
||||
+ pattrib->iv_len
|
||||
+ SNAP_SIZE
|
||||
+ ETH_TYPE_LEN
|
||||
+ PAYLOAD_TYPE_LEN
|
||||
paction+=pattrib->hdrlen
|
||||
+ pattrib->iv_len
|
||||
+ SNAP_SIZE
|
||||
+ ETH_TYPE_LEN
|
||||
+ PAYLOAD_TYPE_LEN
|
||||
+ category_field;
|
||||
|
||||
if (ptdlsinfo->enable == 0)
|
||||
|
@ -999,14 +999,14 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
ret = _FAIL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
switch (*paction){
|
||||
case TDLS_SETUP_REQUEST:
|
||||
DBG_871X("recv tdls setup request frame\n");
|
||||
ret=On_TDLS_Setup_Req(adapter, precv_frame);
|
||||
break;
|
||||
case TDLS_SETUP_RESPONSE:
|
||||
DBG_871X("recv tdls setup response frame\n");
|
||||
DBG_871X("recv tdls setup response frame\n");
|
||||
ret=On_TDLS_Setup_Rsp(adapter, precv_frame);
|
||||
break;
|
||||
case TDLS_SETUP_CONFIRM:
|
||||
|
@ -1033,7 +1033,7 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
DBG_871X("recv tdls channel switch response frame\n");
|
||||
ret=On_TDLS_Ch_Switch_Rsp(adapter, precv_frame);
|
||||
break;
|
||||
#ifdef CONFIG_WFD
|
||||
#ifdef CONFIG_WFD
|
||||
case 0x50: //First byte of WFA OUI
|
||||
if ( _rtw_memcmp(WFA_OUI, (paction), 3) )
|
||||
{
|
||||
|
@ -1061,7 +1061,7 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame)
|
|||
|
||||
exit:
|
||||
return ret;
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1112,14 +1112,14 @@ sint sta2sta_data_frame(
|
|||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
sint ret = _SUCCESS;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
u8 *mybssid = get_bssid(pmlmepriv);
|
||||
u8 *myhwaddr = myid(&adapter->eeprompriv);
|
||||
u8 * sta_addr = NULL;
|
||||
sint bmcast = IS_MCAST(pattrib->dst);
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS
|
||||
struct tdls_info *ptdlsinfo = &adapter->tdlsinfo;
|
||||
struct sta_info *ptdls_sta=NULL;
|
||||
u8 *psnap_type=ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
|
||||
|
@ -1232,12 +1232,12 @@ _func_enter_;
|
|||
ret= OnTDLS(adapter, precv_frame);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
sta_addr = pattrib->src;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_TDLS
|
||||
{
|
||||
|
@ -1333,7 +1333,7 @@ sint ap2sta_data_frame(
|
|||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
sint ret = _SUCCESS;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
u8 *mybssid = get_bssid(pmlmepriv);
|
||||
u8 *myhwaddr = myid(&adapter->eeprompriv);
|
||||
|
@ -1342,7 +1342,7 @@ sint ap2sta_data_frame(
|
|||
_func_enter_;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_STATION_STATE) == _TRUE)
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE
|
||||
&& (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE
|
||||
|| check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == _TRUE )
|
||||
)
|
||||
{
|
||||
|
@ -1353,7 +1353,7 @@ _func_enter_;
|
|||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s SA="MAC_FMT", myhwaddr="MAC_FMT"\n",
|
||||
__func__, MAC_ARG(pattrib->src), MAC_ARG(myhwaddr));
|
||||
#endif
|
||||
#endif
|
||||
ret= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1459,11 +1459,11 @@ _func_enter_;
|
|||
if (*psta == NULL)
|
||||
{
|
||||
DBG_871X("issue_deauth to the ap=" MAC_FMT " for the reason(7)\n", MAC_ARG(pattrib->bssid));
|
||||
|
||||
|
||||
issue_deauth(adapter, pattrib->bssid, WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ret = _FAIL;
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s fw_state:0x%x\n", __func__, get_fwstate(pmlmepriv));
|
||||
|
@ -1489,9 +1489,9 @@ sint sta2ap_data_frame(
|
|||
{
|
||||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
unsigned char *mybssid = get_bssid(pmlmepriv);
|
||||
unsigned char *mybssid = get_bssid(pmlmepriv);
|
||||
sint ret=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
@ -1558,11 +1558,11 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 *pframe = precv_frame->u.hdr.rx_data;
|
||||
//uint len = precv_frame->u.hdr.len;
|
||||
|
||||
|
||||
//DBG_871X("+validate_recv_ctrl_frame\n");
|
||||
|
||||
if (GetFrameType(pframe) != WIFI_CTRL_TYPE)
|
||||
{
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
|
@ -1576,12 +1576,12 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
if (GetFrameSubType(pframe) == WIFI_PSPOLL)
|
||||
{
|
||||
u16 aid;
|
||||
u8 wmmps_ac=0;
|
||||
u8 wmmps_ac=0;
|
||||
struct sta_info *psta=NULL;
|
||||
|
||||
|
||||
aid = GetAid(pframe);
|
||||
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
|
||||
|
||||
|
||||
if ((psta==NULL) || (psta->aid!=aid))
|
||||
{
|
||||
return _FAIL;
|
||||
|
@ -1608,32 +1608,32 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
case 3:
|
||||
default:
|
||||
wmmps_ac = psta->uapsd_be&BIT(0);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (wmmps_ac)
|
||||
return _FAIL;
|
||||
|
||||
if (psta->state & WIFI_STA_ALIVE_CHK_STATE)
|
||||
{
|
||||
{
|
||||
DBG_871X("%s alive check-rx ps-poll\n", __func__);
|
||||
psta->expire_to = pstapriv->expire_to;
|
||||
psta->state ^= WIFI_STA_ALIVE_CHK_STATE;
|
||||
}
|
||||
}
|
||||
|
||||
if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid)))
|
||||
{
|
||||
_irqL irqL;
|
||||
_irqL irqL;
|
||||
_list *xmitframe_plist, *xmitframe_phead;
|
||||
struct xmit_frame *pxmitframe=NULL;
|
||||
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
xmitframe_phead = get_list_head(&psta->sleep_q);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE)
|
||||
{
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
||||
xmitframe_plist = get_next(xmitframe_plist);
|
||||
|
@ -1651,12 +1651,12 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
|
||||
//DBG_871X("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap);
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
if (rtw_hal_xmit(padapter, pxmitframe) == _TRUE)
|
||||
{
|
||||
{
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);
|
||||
}
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
_enter_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
if (psta->sleepq_len==0)
|
||||
{
|
||||
|
@ -1665,10 +1665,10 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
//DBG_871X("after handling ps-poll, tim=%x\n", pstapriv->tim_bitmap);
|
||||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1685,24 +1685,24 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
else
|
||||
{
|
||||
DBG_871X("error!psta->sleepq_len=%d\n", psta->sleepq_len);
|
||||
psta->sleepq_len=0;
|
||||
psta->sleepq_len=0;
|
||||
}
|
||||
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
pstapriv->tim_bitmap &= ~BIT(psta->aid);
|
||||
|
||||
//upate BCN for TIM IE
|
||||
//update_BCNTIM(padapter);
|
||||
update_beacon(padapter, _TIM_IE_, NULL, _FALSE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
|
||||
_exit_critical_bh(&psta->sleep_q.lock, &irqL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
return _FAIL;
|
||||
|
@ -1738,7 +1738,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
else if (is_broadcast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data))
|
||||
|| is_multicast_mac_addr(GetAddr1Ptr(precv_frame->u.hdr.rx_data)))
|
||||
psta->sta_stats.rx_probersp_bm_pkts++;
|
||||
else
|
||||
else
|
||||
psta->sta_stats.rx_probersp_uo_pkts++;
|
||||
}
|
||||
}
|
||||
|
@ -1750,7 +1750,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
struct rx_pkt_attrib * pattrib=&precv_frame->u.hdr.attrib;
|
||||
struct recv_stat* prxstat=( struct recv_stat * ) precv_frame->u.hdr.rx_head ;
|
||||
u8 * pda,*psa,*pbssid,*ptr;
|
||||
ptr=precv_frame->u.hdr.rx_data;
|
||||
ptr=precv_frame->u.hdr.rx_data;
|
||||
pda = get_da(ptr);
|
||||
psa = get_sa(ptr);
|
||||
pbssid = get_hdr_bssid(ptr);
|
||||
|
@ -1787,7 +1787,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
pattrib->priority=0;
|
||||
pattrib->hdrlen = pattrib->to_fr_ds==3 ? 30 : 24;
|
||||
|
||||
|
@ -1808,8 +1808,8 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
|||
struct sta_info *psta = NULL;
|
||||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
sint ret = _SUCCESS;
|
||||
#ifdef CONFIG_TDLS
|
||||
struct tdls_info *ptdlsinfo = &adapter->tdlsinfo;
|
||||
|
@ -1886,11 +1886,11 @@ _func_enter_;
|
|||
ret= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
//psta->rssi = prxcmd->rssi;
|
||||
//psta->signal_quality= prxcmd->sq;
|
||||
precv_frame->u.hdr.psta = psta;
|
||||
|
||||
|
||||
|
||||
pattrib->amsdu=0;
|
||||
pattrib->ack_policy = 0;
|
||||
|
@ -2056,7 +2056,7 @@ _func_enter_;
|
|||
if (bDumpRxPkt ==1){//dump all rx packets
|
||||
int i;
|
||||
DBG_871X("#############################\n");
|
||||
|
||||
|
||||
for (i=0; i<64;i=i+8)
|
||||
DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr+i),
|
||||
*(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
|
||||
|
@ -2077,7 +2077,7 @@ _func_enter_;
|
|||
if (type== WIFI_DATA_TYPE){
|
||||
int i;
|
||||
DBG_871X("#############################\n");
|
||||
|
||||
|
||||
for (i=0; i<64;i=i+8)
|
||||
DBG_871X("%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X:\n", *(ptr+i),
|
||||
*(ptr+i+1), *(ptr+i+2) ,*(ptr+i+3) ,*(ptr+i+4),*(ptr+i+5), *(ptr+i+6), *(ptr+i+7));
|
||||
|
@ -2110,7 +2110,7 @@ _func_enter_;
|
|||
external_len = 2;
|
||||
else
|
||||
external_len= 0;
|
||||
|
||||
|
||||
wai_pkt = rtw_wapi_is_wai_packet(adapter,ptr);
|
||||
|
||||
phdr->bIsWaiPacket = wai_pkt;
|
||||
|
@ -2175,7 +2175,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
u8 bsnaphdr;
|
||||
u8 *psnap_type;
|
||||
struct ieee80211_snap_hdr *psnap;
|
||||
|
||||
|
||||
sint ret=_SUCCESS;
|
||||
_adapter *adapter =precvframe->u.hdr.adapter;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
@ -2186,7 +2186,7 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
|||
_func_enter_;
|
||||
|
||||
if (pattrib->encrypt){
|
||||
recvframe_pull_tail(precvframe, pattrib->icv_len);
|
||||
recvframe_pull_tail(precvframe, pattrib->icv_len);
|
||||
}
|
||||
|
||||
psnap=(struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
|
||||
|
@ -2194,7 +2194,7 @@ _func_enter_;
|
|||
/* convert hdr + possible LLC headers into Ethernet header */
|
||||
//eth_type = (psnap_type[0] << 8) | psnap_type[1];
|
||||
if ((_rtw_memcmp(psnap, rtw_rfc1042_header, SNAP_SIZE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_IPX, 2) == _FALSE) &&
|
||||
(_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_AARP, 2)==_FALSE) )||
|
||||
//eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
|
||||
_rtw_memcmp(psnap, rtw_bridge_tunnel_header, SNAP_SIZE)){
|
||||
|
@ -2215,9 +2215,9 @@ _func_enter_;
|
|||
eth_type= ntohs((unsigned short )eth_type); //pattrib->ether_type
|
||||
pattrib->eth_type = eth_type;
|
||||
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))
|
||||
if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
*(ptr+1) = 0x12;
|
||||
|
||||
|
@ -2239,7 +2239,7 @@ _func_enter_;
|
|||
_rtw_memcpy(ptr+12, &len, 2);
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
@ -2269,7 +2269,7 @@ _func_enter_;
|
|||
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
||||
{
|
||||
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
bsnaphdr=_TRUE;//wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042;
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
bsnaphdr=_TRUE; //wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK;
|
||||
|
@ -2661,9 +2661,9 @@ _func_exit_;
|
|||
|
||||
int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
||||
{
|
||||
#if defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) //for amsdu TP improvement,Creator: Thomas
|
||||
#if defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD) //for amsdu TP improvement,Creator: Thomas
|
||||
int a_len, padding_len;
|
||||
u16 eth_type, nSubframe_Length;
|
||||
u16 eth_type, nSubframe_Length;
|
||||
u8 nr_subframes, i;
|
||||
unsigned char *pdata;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
|
@ -2675,7 +2675,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
_queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
|
||||
int ret = _SUCCESS;
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct mbuf *sub_m=NULL, *subframes[MAX_SUBFRAME_COUNT];
|
||||
struct mbuf *sub_m=NULL, *subframes[MAX_SUBFRAME_COUNT];
|
||||
u8 *ptr,offset;
|
||||
#endif //PLATFORM_FREEBSD
|
||||
nr_subframes = 0;
|
||||
|
@ -2683,7 +2683,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
||||
recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen);
|
||||
|
||||
|
||||
if (prframe->u.hdr.attrib.iv_len >0)
|
||||
{
|
||||
recvframe_pull(prframe, prframe->u.hdr.attrib.iv_len);
|
||||
|
@ -2694,7 +2694,7 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
pdata = prframe->u.hdr.rx_data;
|
||||
|
||||
while (a_len > ETH_HLEN) {
|
||||
|
||||
|
||||
/* Offset 12 denote 2 mac address */
|
||||
//nSubframe_Length = ntohs(*((u16*)(pdata + 12)));
|
||||
nSubframe_Length = RTW_GET_BE16(pdata + 12);
|
||||
|
@ -2738,13 +2738,13 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
#else // PLATFORM_FREEBSD
|
||||
|
||||
//PLATFORM_FREEBSD
|
||||
//Allocate a mbuff,
|
||||
//Allocate a mbuff,
|
||||
//sub_m =m_devget(pdata, nSubframe_Length+12, 12, padapter->pifp,NULL);
|
||||
sub_m =m_devget(pdata, nSubframe_Length+ETH_HLEN, ETHER_ALIGN, padapter->pifp,NULL);
|
||||
|
||||
pdata += ETH_HLEN;
|
||||
a_len -= ETH_HLEN;
|
||||
#endif // PLATFORM_FREEBSD
|
||||
#endif // PLATFORM_FREEBSD
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
//sub_skb->dev = padapter->pnetdev;
|
||||
|
@ -2823,14 +2823,14 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
//priv->ext_stats.rx_data_drops++;
|
||||
//DEBUG_ERR("RX DROP: nat25_handle_frame fail!\n");
|
||||
//return FAIL;
|
||||
|
||||
|
||||
#if 1
|
||||
// bypass this frame to upper layer!!
|
||||
#else
|
||||
dev_kfree_skb_any(sub_skb);
|
||||
continue;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_BR_EXT
|
||||
|
||||
|
@ -2891,9 +2891,9 @@ int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
|||
taskqueue_enqueue(taskqueue_thread, &precvpriv->rx_indicate_tasklet);
|
||||
}
|
||||
#else // CONFIG_RX_INDICATE_QUEUE
|
||||
(*padapter->pifp->if_input)(padapter->pifp, sub_m);
|
||||
(*padapter->pifp->if_input)(padapter->pifp, sub_m);
|
||||
#endif // CONFIG_RX_INDICATE_QUEUE
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PLATFORM_FREEBSD
|
||||
}
|
||||
|
@ -2902,9 +2902,9 @@ exit:
|
|||
|
||||
prframe->u.hdr.len=0;
|
||||
rtw_free_recvframe(prframe, pfree_recv_queue);//free this recv_frame
|
||||
|
||||
|
||||
return ret;
|
||||
#else // || defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
|
||||
#else // || defined (PLATFORM_LINUX) || defined (PLATFORM_FREEBSD)
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_irqL irql;
|
||||
#endif //PLATFORM_WINDOWS
|
||||
|
@ -3071,7 +3071,7 @@ exit:
|
|||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
_pkt *pskb = pnrframe->u.hdr.pkt;
|
||||
#endif //PLATFORM_LINUX
|
||||
#endif //PLATFORM_LINUX
|
||||
_rtw_init_listhead(&pnrframe_new->u.hdr.list);
|
||||
|
||||
pnrframe_new->u.hdr.len=0;
|
||||
|
@ -3154,7 +3154,7 @@ int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
|||
//DbgPrint("CheckRxTsIndicateSeq(): Packet Drop! IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num);
|
||||
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("%s IndicateSeq: %d > NewSeq: %d\n", __func__,
|
||||
DBG_871X("%s IndicateSeq: %d > NewSeq: %d\n", __func__,
|
||||
preorder_ctrl->indicate_seq, seq_num);
|
||||
#endif
|
||||
|
||||
|
@ -3277,7 +3277,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
//_enter_critical_ex(&ppending_recvframe_queue->lock, &irql);
|
||||
//_rtw_spinlock_ex(&ppending_recvframe_queue->lock);
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
// Handling some condition for forced indicate case.
|
||||
|
@ -3285,10 +3285,10 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
{
|
||||
if (rtw_is_list_empty(phead))
|
||||
return _TRUE;
|
||||
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__,
|
||||
preorder_ctrl->indicate_seq, pattrib->seq_num);
|
||||
|
@ -3299,7 +3299,7 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
// Check if there is any packet need indicate.
|
||||
while (!rtw_is_list_empty(phead))
|
||||
{
|
||||
|
||||
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
pattrib = &prframe->u.hdr.attrib;
|
||||
|
||||
|
@ -3329,9 +3329,9 @@ int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ctrl *pre
|
|||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
{
|
||||
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);//indicate this recv_frame
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else if (pattrib->amsdu==1)
|
||||
|
@ -3412,34 +3412,34 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s pattrib->qos !=1\n", __func__);
|
||||
#endif
|
||||
|
||||
|
||||
return _FAIL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (preorder_ctrl->enable == _FALSE)
|
||||
{
|
||||
//indicate this recv_frame
|
||||
//indicate this recv_frame
|
||||
preorder_ctrl->indicate_seq = pattrib->seq_num;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__,
|
||||
preorder_ctrl->indicate_seq, pattrib->seq_num);
|
||||
#endif
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1)%4096;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d, NewSeq: %d\n", __func__, __LINE__,
|
||||
preorder_ctrl->indicate_seq, pattrib->seq_num);
|
||||
#endif
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_RECV_REORDERING_CTRL
|
||||
//indicate this recv_frame
|
||||
|
@ -3498,11 +3498,11 @@ int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prframe)
|
|||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s check_indicate_seq fail\n", __func__);
|
||||
#endif
|
||||
|
||||
|
||||
rtw_recv_indicatepkt(padapter, prframe);
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
||||
|
||||
goto _success_exit;
|
||||
}
|
||||
|
||||
|
@ -3574,7 +3574,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
|||
|
||||
if (recv_indicatepkts_in_order(padapter, preorder_ctrl, _TRUE)==_TRUE)
|
||||
{
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irql);
|
||||
|
@ -3598,7 +3598,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
|
||||
#ifdef CONFIG_TDLS
|
||||
if ( (phtpriv->ht_option==_TRUE) ||
|
||||
((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
((psta->tdls_sta_state & TDLS_LINKED_STATE) &&
|
||||
(psta->htpriv.ht_option==_TRUE) &&
|
||||
(psta->htpriv.ampdu_enable==_TRUE))) //B/G/N Mode
|
||||
#else
|
||||
|
@ -3612,7 +3612,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
|
|||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s recv_indicatepkt_reorder error!\n", __func__);
|
||||
#endif
|
||||
|
||||
|
||||
if ((padapter->bDriverStopped == _FALSE) &&
|
||||
(padapter->bSurpriseRemoved == _FALSE))
|
||||
{
|
||||
|
@ -3663,7 +3663,7 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
|
|||
struct rx_pkt_attrib *pattrib = &rframe->u.hdr.attrib;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
#endif //CONFIG_MP_INCLUDED
|
||||
|
@ -3708,7 +3708,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
|||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_TDLS
|
||||
u8 *psnap_type, *pcategory;
|
||||
|
@ -3748,7 +3748,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
|||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s recvframe_chk_defrag: drop pkt\n", __func__);
|
||||
#endif
|
||||
goto _recv_data_drop;
|
||||
goto _recv_data_drop;
|
||||
}
|
||||
|
||||
prframe=portctrl(padapter, prframe);
|
||||
|
@ -3804,7 +3804,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
|
|||
//indicate this recv_frame
|
||||
ret = rtw_recv_indicatepkt(padapter, prframe);
|
||||
if (ret != _SUCCESS)
|
||||
{
|
||||
{
|
||||
#ifdef DBG_RX_DROP_FRAME
|
||||
DBG_871X("DBG_RX_DROP_FRAME %s rtw_recv_indicatepkt fail!\n", __func__);
|
||||
#endif
|
||||
|
@ -3879,7 +3879,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
|||
ret = recv_func_prehandle(padapter, rframe);
|
||||
|
||||
if (ret == _SUCCESS) {
|
||||
|
||||
|
||||
/* check if need to enqueue into uc_swdec_pending_queue*/
|
||||
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) &&
|
||||
!IS_MCAST(prxattrib->ra) && prxattrib->encrypt>0 &&
|
||||
|
@ -3890,7 +3890,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
|
|||
DBG_871X("%s: no key, enqueue uc_swdec_pending_queue\n", __func__);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
ret = recv_func_posthandle(padapter, rframe);
|
||||
}
|
||||
|
||||
|
@ -3945,7 +3945,7 @@ _func_exit_;
|
|||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||
|
||||
|
||||
u32 tmp_s, tmp_q;
|
||||
u8 avg_signal_strength = 0;
|
||||
u8 avg_signal_qual = 0;
|
||||
|
@ -3965,7 +3965,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
// after avg_vals are accquired, we can re-stat the signal values
|
||||
recvpriv->signal_strength_data.update_req = 1;
|
||||
}
|
||||
|
||||
|
||||
if (recvpriv->signal_qual_data.update_req == 0) {// update_req is clear, means we got rx
|
||||
avg_signal_qual = recvpriv->signal_qual_data.avg_val;
|
||||
num_signal_qual = recvpriv->signal_qual_data.total_num;
|
||||
|
@ -4009,9 +4009,6 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
}
|
||||
}
|
||||
rtw_set_signal_stat_timer(recvpriv);
|
||||
|
||||
|
||||
}
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -92,4 +92,3 @@ u32 rtw_freq2ch(u32 freq)
|
|||
|
||||
return ch;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,87 +1,85 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include<rtw_sreset.h>
|
||||
|
||||
#if defined(DBG_CONFIG_ERROR_DETECT)
|
||||
void sreset_init_value(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
_rtw_mutex_init(&psrtpriv->silentreset_mutex);
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
}
|
||||
void sreset_reset_value(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
}
|
||||
|
||||
u8 sreset_get_wifi_status(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
u8 status = WIFI_STATUS_SUCCESS;
|
||||
u32 val32 = 0;
|
||||
_irqL irqL;
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
val32 =rtw_read32(padapter,REG_TXDMA_STATUS);
|
||||
if (val32==0xeaeaeaea){
|
||||
psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
|
||||
}
|
||||
else if (val32!=0){
|
||||
DBG_8192C("txdmastatu(%x)\n",val32);
|
||||
psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
|
||||
}
|
||||
|
||||
if (WIFI_STATUS_SUCCESS !=psrtpriv->Wifi_Error_Status)
|
||||
{
|
||||
DBG_8192C("==>%s error_status(0x%x)\n",__func__,psrtpriv->Wifi_Error_Status);
|
||||
status = (psrtpriv->Wifi_Error_Status &( ~(USB_READ_PORT_FAIL|USB_WRITE_PORT_FAIL)));
|
||||
}
|
||||
DBG_8192C("==> %s wifi_status(0x%x)\n",__func__,status);
|
||||
|
||||
//status restore
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void sreset_set_wifi_error_status(_adapter *padapter, u32 status)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.Wifi_Error_Status = status;
|
||||
}
|
||||
#endif /* defined(DBG_CONFIG_ERROR_DETECT) */
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include<rtw_sreset.h>
|
||||
|
||||
#if defined(DBG_CONFIG_ERROR_DETECT)
|
||||
void sreset_init_value(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
_rtw_mutex_init(&psrtpriv->silentreset_mutex);
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
}
|
||||
void sreset_reset_value(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
psrtpriv->last_tx_time =0;
|
||||
psrtpriv->last_tx_complete_time =0;
|
||||
}
|
||||
|
||||
u8 sreset_get_wifi_status(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
u8 status = WIFI_STATUS_SUCCESS;
|
||||
u32 val32 = 0;
|
||||
_irqL irqL;
|
||||
if (psrtpriv->silent_reset_inprogress == _TRUE)
|
||||
{
|
||||
return status;
|
||||
}
|
||||
val32 =rtw_read32(padapter,REG_TXDMA_STATUS);
|
||||
if (val32==0xeaeaeaea){
|
||||
psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
|
||||
}
|
||||
else if (val32!=0){
|
||||
DBG_8192C("txdmastatu(%x)\n",val32);
|
||||
psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
|
||||
}
|
||||
|
||||
if (WIFI_STATUS_SUCCESS !=psrtpriv->Wifi_Error_Status)
|
||||
{
|
||||
DBG_8192C("==>%s error_status(0x%x)\n",__func__,psrtpriv->Wifi_Error_Status);
|
||||
status = (psrtpriv->Wifi_Error_Status &( ~(USB_READ_PORT_FAIL|USB_WRITE_PORT_FAIL)));
|
||||
}
|
||||
DBG_8192C("==> %s wifi_status(0x%x)\n",__func__,status);
|
||||
|
||||
//status restore
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void sreset_set_wifi_error_status(_adapter *padapter, u32 status)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.Wifi_Error_Status = status;
|
||||
}
|
||||
#endif /* defined(DBG_CONFIG_ERROR_DETECT) */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -48,24 +48,24 @@ _func_enter_;
|
|||
_rtw_init_listhead(&psta->hash_list);
|
||||
//_rtw_init_listhead(&psta->asoc_list);
|
||||
//_rtw_init_listhead(&psta->sleep_list);
|
||||
//_rtw_init_listhead(&psta->wakeup_list);
|
||||
//_rtw_init_listhead(&psta->wakeup_list);
|
||||
|
||||
_rtw_init_queue(&psta->sleep_q);
|
||||
psta->sleepq_len = 0;
|
||||
|
||||
_rtw_init_sta_xmit_priv(&psta->sta_xmitpriv);
|
||||
_rtw_init_sta_recv_priv(&psta->sta_recvpriv);
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
_rtw_init_listhead(&psta->asoc_list);
|
||||
|
||||
_rtw_init_listhead(&psta->auth_list);
|
||||
|
||||
|
||||
psta->expire_to = 0;
|
||||
|
||||
|
||||
psta->flags = 0;
|
||||
|
||||
|
||||
psta->capability = 0;
|
||||
|
||||
psta->bpairwise_key_installed = _FALSE;
|
||||
|
@ -78,17 +78,17 @@ _func_enter_;
|
|||
psta->no_ht_gf_set = 0;
|
||||
psta->no_ht_set = 0;
|
||||
psta->ht_20mhz_set = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
psta->under_exist_checking = 0;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
|
||||
psta->keep_alive_trycnt = 0;
|
||||
|
||||
#endif // CONFIG_AP_MODE
|
||||
|
||||
_func_exit_;
|
||||
#endif // CONFIG_AP_MODE
|
||||
|
||||
_func_exit_;
|
||||
|
||||
}
|
||||
|
||||
|
@ -97,20 +97,20 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
struct sta_info *psta;
|
||||
s32 i;
|
||||
|
||||
_func_enter_;
|
||||
_func_enter_;
|
||||
|
||||
pstapriv->pallocated_stainfo_buf = rtw_zvmalloc (sizeof(struct sta_info) * NUM_STA+ 4);
|
||||
|
||||
|
||||
if (!pstapriv->pallocated_stainfo_buf)
|
||||
return _FAIL;
|
||||
|
||||
pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 -
|
||||
pstapriv->pstainfo_buf = pstapriv->pallocated_stainfo_buf + 4 -
|
||||
((SIZE_PTR)(pstapriv->pallocated_stainfo_buf ) & 3);
|
||||
|
||||
_rtw_init_queue(&pstapriv->free_sta_queue);
|
||||
|
||||
_rtw_spinlock_init(&pstapriv->sta_hash_lock);
|
||||
|
||||
|
||||
//_rtw_init_queue(&pstapriv->asoc_q);
|
||||
pstapriv->asoc_sta_count = 0;
|
||||
_rtw_init_queue(&pstapriv->sleep_q);
|
||||
|
@ -118,7 +118,7 @@ _func_enter_;
|
|||
|
||||
psta = (struct sta_info *)(pstapriv->pstainfo_buf);
|
||||
|
||||
|
||||
|
||||
for (i = 0; i < NUM_STA; i++)
|
||||
{
|
||||
_rtw_init_stainfo(psta);
|
||||
|
@ -130,7 +130,7 @@ _func_enter_;
|
|||
psta++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
|
@ -144,7 +144,7 @@ _func_enter_;
|
|||
pstapriv->asoc_list_cnt = 0;
|
||||
pstapriv->auth_list_cnt = 0;
|
||||
|
||||
pstapriv->auth_to = 3; // 3*2 = 6 sec
|
||||
pstapriv->auth_to = 3; // 3*2 = 6 sec
|
||||
pstapriv->assoc_to = 3;
|
||||
//pstapriv->expire_to = 900;// 900*2 = 1800 sec = 30 min, expire after no any traffic.
|
||||
//pstapriv->expire_to = 30;// 30*2 = 60 sec = 1 min, expire after no any traffic.
|
||||
|
@ -152,15 +152,15 @@ _func_enter_;
|
|||
pstapriv->expire_to = 3; // 3*2 = 6 sec
|
||||
#else
|
||||
pstapriv->expire_to = 60;// 60*2 = 120 sec = 2 min, expire after no any traffic.
|
||||
#endif
|
||||
pstapriv->max_num_sta = NUM_STA;
|
||||
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
pstapriv->max_num_sta = NUM_STA;
|
||||
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
|
||||
}
|
||||
|
||||
inline int rtw_stainfo_offset(struct sta_priv *stapriv, struct sta_info *sta)
|
||||
|
@ -192,12 +192,12 @@ _func_enter_;
|
|||
_rtw_spinlock_free(&(psta_xmitpriv->bk_q.sta_pending.lock));
|
||||
_rtw_spinlock_free(&(psta_xmitpriv->vi_q.sta_pending.lock));
|
||||
_rtw_spinlock_free(&(psta_xmitpriv->vo_q.sta_pending.lock));
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
static void _rtw_free_sta_recv_priv_lock(struct sta_recv_priv *psta_recvpriv)
|
||||
{
|
||||
_func_enter_;
|
||||
_func_enter_;
|
||||
|
||||
_rtw_spinlock_free(&psta_recvpriv->lock);
|
||||
|
||||
|
@ -217,8 +217,8 @@ _func_enter_;
|
|||
|
||||
_rtw_free_sta_xmit_priv_lock(&psta->sta_xmitpriv);
|
||||
_rtw_free_sta_recv_priv_lock(&psta->sta_recvpriv);
|
||||
|
||||
_func_exit_;
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,14 +229,14 @@ void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
|||
_irqL irqL;
|
||||
_list *plist, *phead;
|
||||
struct sta_info *psta = NULL;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
phead = get_list_head(&pstapriv->free_sta_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,list);
|
||||
|
@ -244,10 +244,10 @@ _func_enter_;
|
|||
|
||||
rtw_mfree_stainfo(psta);
|
||||
}
|
||||
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
|
||||
}
|
||||
|
||||
|
@ -276,53 +276,53 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
|
|||
|
||||
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
_irqL irqL;
|
||||
_list *phead, *plist;
|
||||
struct sta_info *psta = NULL;
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
int index;
|
||||
int index;
|
||||
|
||||
_func_enter_;
|
||||
if (pstapriv){
|
||||
|
||||
/* delete all reordering_ctrl_timer */
|
||||
/* delete all reordering_ctrl_timer */
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
for (index = 0; index < NUM_STA; index++)
|
||||
{
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
plist = get_next(plist);
|
||||
|
||||
for (i=0; i < 16 ; i++)
|
||||
{
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
}
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
/*===============================*/
|
||||
|
||||
|
||||
rtw_mfree_sta_priv_lock(pstapriv);
|
||||
|
||||
if (pstapriv->pallocated_stainfo_buf) {
|
||||
rtw_vmfree(pstapriv->pallocated_stainfo_buf, sizeof(struct sta_info)*NUM_STA+4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_func_exit_;
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//struct sta_info *rtw_alloc_stainfo(_queue *pfree_sta_queue, unsigned char *hwaddr)
|
||||
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||
{
|
||||
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||
{
|
||||
_irqL irqL, irqL2;
|
||||
uint tmp_aid;
|
||||
s32 index;
|
||||
|
@ -332,11 +332,11 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
int i = 0;
|
||||
u16 wRxSeqInitialValue = 0xffff;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||
|
||||
|
||||
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||
|
||||
if (_rtw_queue_empty(pfree_sta_queue) == _TRUE)
|
||||
|
@ -347,13 +347,13 @@ _func_enter_;
|
|||
else
|
||||
{
|
||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
||||
|
||||
rtw_list_delete(&(psta->list));
|
||||
|
||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||
|
||||
tmp_aid = psta->aid;
|
||||
|
||||
|
||||
tmp_aid = psta->aid;
|
||||
|
||||
_rtw_init_stainfo(psta);
|
||||
|
||||
_rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
||||
|
@ -364,7 +364,7 @@ _func_enter_;
|
|||
|
||||
if (index >= NUM_STA){
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("ERROR=> rtw_alloc_stainfo: index >= NUM_STA"));
|
||||
psta= NULL;
|
||||
psta= NULL;
|
||||
goto exit;
|
||||
}
|
||||
phash_list = &(pstapriv->sta_hash[index]);
|
||||
|
@ -387,7 +387,7 @@ _func_enter_;
|
|||
_rtw_memcpy( &psta->sta_recvpriv.rxcache.tid_rxseq[ i ], &wRxSeqInitialValue, 2 );
|
||||
}
|
||||
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("alloc number_%d stainfo with hwaddr = %x %x %x %x %x %x \n",
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("alloc number_%d stainfo with hwaddr = %x %x %x %x %x %x \n",
|
||||
pstapriv->asoc_sta_count , hwaddr[0], hwaddr[1], hwaddr[2],hwaddr[3],hwaddr[4],hwaddr[5]));
|
||||
|
||||
init_addba_retry_timer(pstapriv->padapter, psta);
|
||||
|
@ -408,15 +408,15 @@ _func_enter_;
|
|||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
||||
preorder_ctrl->padapter = pstapriv->padapter;
|
||||
|
||||
|
||||
preorder_ctrl->enable = _FALSE;
|
||||
|
||||
|
||||
preorder_ctrl->indicate_seq = 0xffff;
|
||||
#ifdef DBG_RX_SEQ
|
||||
DBG_871X("DBG_RX_SEQ %s:%d IndicateSeq: %d\n", __func__, __LINE__,
|
||||
preorder_ctrl->indicate_seq);
|
||||
#endif
|
||||
preorder_ctrl->wend_b= 0xffff;
|
||||
preorder_ctrl->wend_b= 0xffff;
|
||||
//preorder_ctrl->wsize_b = (NR_RECVBUFF-2);
|
||||
preorder_ctrl->wsize_b = 64;//64;
|
||||
|
||||
|
@ -429,11 +429,11 @@ _func_enter_;
|
|||
//init for DM
|
||||
psta->rssi_stat.UndecoratedSmoothedPWDB = (-1);
|
||||
psta->rssi_stat.UndecoratedSmoothedCCK = (-1);
|
||||
|
||||
|
||||
/* init for the sequence number of received management frame */
|
||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
}
|
||||
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
@ -446,7 +446,7 @@ _func_exit_;
|
|||
|
||||
// using pstapriv->sta_hash_lock to protect
|
||||
u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
_irqL irqL0;
|
||||
_queue *pfree_sta_queue;
|
||||
|
@ -456,8 +456,8 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
if (psta == NULL)
|
||||
goto exit;
|
||||
|
||||
|
@ -465,16 +465,16 @@ _func_enter_;
|
|||
|
||||
|
||||
pstaxmitpriv = &psta->sta_xmitpriv;
|
||||
|
||||
|
||||
//rtw_list_delete(&psta->sleep_list);
|
||||
|
||||
|
||||
//rtw_list_delete(&psta->wakeup_list);
|
||||
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
|
||||
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
|
||||
psta->sleepq_len = 0;
|
||||
|
||||
|
||||
//_enter_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0);
|
||||
|
||||
rtw_free_xmitframe_queue( pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
|
||||
|
@ -482,7 +482,7 @@ _func_enter_;
|
|||
rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
|
||||
//_exit_critical_bh(&(pxmitpriv->vo_pending.lock), &irqL0);
|
||||
|
||||
|
||||
|
||||
//_enter_critical_bh(&(pxmitpriv->vi_pending.lock), &irqL0);
|
||||
|
||||
|
@ -508,14 +508,14 @@ _func_enter_;
|
|||
rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
|
||||
|
||||
//_exit_critical_bh(&(pxmitpriv->be_pending.lock), &irqL0);
|
||||
|
||||
|
||||
_exit_critical_bh(&pxmitpriv->lock, &irqL0);
|
||||
|
||||
|
||||
rtw_list_delete(&psta->hash_list);
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("\n free number_%d stainfo with hwaddr = 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x \n",pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2],psta->hwaddr[3],psta->hwaddr[4],psta->hwaddr[5]));
|
||||
pstapriv->asoc_sta_count --;
|
||||
|
||||
|
||||
|
||||
|
||||
// re-init sta_info; 20061114
|
||||
_rtw_init_sta_xmit_priv(&psta->sta_xmitpriv);
|
||||
_rtw_init_sta_recv_priv(&psta->sta_recvpriv);
|
||||
|
@ -539,42 +539,42 @@ _func_enter_;
|
|||
union recv_frame *prframe;
|
||||
_queue *ppending_recvframe_queue;
|
||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
|
||||
|
||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||
|
||||
_cancel_timer_ex(&preorder_ctrl->reordering_ctrl_timer);
|
||||
|
||||
|
||||
ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||
|
||||
_enter_critical_bh(&ppending_recvframe_queue->lock, &irqL);
|
||||
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
phead = get_list_head(ppending_recvframe_queue);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while (!rtw_is_list_empty(phead))
|
||||
{
|
||||
{
|
||||
prframe = LIST_CONTAINOR(plist, union recv_frame, u);
|
||||
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
|
||||
rtw_list_delete(&(prframe->u.hdr.list));
|
||||
|
||||
rtw_free_recvframe(prframe, pfree_recv_queue);
|
||||
}
|
||||
|
||||
_exit_critical_bh(&ppending_recvframe_queue->lock, &irqL);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!(psta->state & WIFI_AP_STATE))
|
||||
rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, _FALSE);
|
||||
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
/*
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
rtw_list_delete(&psta->asoc_list);
|
||||
_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL0);
|
||||
*/
|
||||
_enter_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
|
@ -583,9 +583,9 @@ _func_enter_;
|
|||
pstapriv->auth_list_cnt--;
|
||||
}
|
||||
_exit_critical_bh(&pstapriv->auth_list_lock, &irqL0);
|
||||
|
||||
|
||||
psta->expire_to = 0;
|
||||
|
||||
|
||||
psta->sleepq_ac_len = 0;
|
||||
psta->qos_info = 0;
|
||||
|
||||
|
@ -598,9 +598,9 @@ _func_enter_;
|
|||
psta->has_legacy_ac = 0;
|
||||
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
|
||||
|
||||
pstapriv->sta_dz_bitmap &=~BIT(psta->aid);
|
||||
pstapriv->tim_bitmap &=~BIT(psta->aid);
|
||||
pstapriv->tim_bitmap &=~BIT(psta->aid);
|
||||
|
||||
//rtw_indicate_sta_disassoc_event(padapter, psta);
|
||||
|
||||
|
@ -608,26 +608,26 @@ _func_enter_;
|
|||
{
|
||||
pstapriv->sta_aid[psta->aid - 1] = NULL;
|
||||
psta->aid = 0;
|
||||
}
|
||||
|
||||
#endif // CONFIG_NATIVEAP_MLME
|
||||
}
|
||||
|
||||
#endif // CONFIG_NATIVEAP_MLME
|
||||
|
||||
#ifdef CONFIG_TX_MCAST2UNI
|
||||
psta->under_exist_checking = 0;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#endif // CONFIG_AP_MODE
|
||||
#endif // CONFIG_AP_MODE
|
||||
|
||||
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL0);
|
||||
rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
|
||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL0);
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// free all stainfo which in sta_hash[all]
|
||||
|
@ -639,8 +639,8 @@ void rtw_free_all_stainfo(_adapter *padapter)
|
|||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info* pbcmc_stainfo =rtw_get_bcmc_stainfo( padapter);
|
||||
|
||||
_func_enter_;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
if (pstapriv->asoc_sta_count==1)
|
||||
goto exit;
|
||||
|
@ -651,24 +651,24 @@ _func_enter_;
|
|||
{
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
|
||||
if (pbcmc_stainfo!=psta)
|
||||
if (pbcmc_stainfo!=psta)
|
||||
rtw_free_stainfo(padapter , psta);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
||||
}
|
||||
|
||||
|
@ -681,7 +681,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
_list *plist, *phead;
|
||||
|
||||
struct sta_info *psta = NULL;
|
||||
|
||||
|
||||
u32 index;
|
||||
|
||||
u8 *addr;
|
||||
|
@ -692,7 +692,7 @@ _func_enter_;
|
|||
|
||||
if (hwaddr==NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
if (IS_MCAST(hwaddr))
|
||||
{
|
||||
addr = bc_addr;
|
||||
|
@ -705,17 +705,17 @@ _func_enter_;
|
|||
index = wifi_mac_hash(addr);
|
||||
|
||||
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
|
||||
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
plist = get_next(phead);
|
||||
|
||||
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
|
||||
|
||||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== _TRUE)
|
||||
|
||||
if ((_rtw_memcmp(psta->hwaddr, addr, ETH_ALEN))== _TRUE)
|
||||
{ // if found the matched address
|
||||
break;
|
||||
}
|
||||
|
@ -724,26 +724,26 @@ _func_enter_;
|
|||
}
|
||||
|
||||
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return psta;
|
||||
|
||||
|
||||
}
|
||||
|
||||
u32 rtw_init_bcmc_stainfo(_adapter* padapter)
|
||||
{
|
||||
|
||||
struct sta_info *psta;
|
||||
struct sta_info *psta;
|
||||
struct tx_servq *ptxservq;
|
||||
u32 res=_SUCCESS;
|
||||
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
|
||||
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
//_queue *pstapending = &padapter->xmitpriv.bm_pending;
|
||||
|
||||
//_queue *pstapending = &padapter->xmitpriv.bm_pending;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
psta = rtw_alloc_stainfo(pstapriv, bcast_addr);
|
||||
|
||||
|
||||
if (psta==NULL){
|
||||
res=_FAIL;
|
||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("rtw_alloc_stainfo fail"));
|
||||
|
@ -763,9 +763,9 @@ _func_enter_;
|
|||
|
||||
_exit_critical(&pstapending->lock, &irqL0);
|
||||
*/
|
||||
|
||||
|
||||
exit:
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return _SUCCESS;
|
||||
|
||||
}
|
||||
|
@ -773,12 +773,12 @@ _func_exit_;
|
|||
|
||||
struct sta_info* rtw_get_bcmc_stainfo(_adapter* padapter)
|
||||
{
|
||||
struct sta_info *psta;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||
_func_enter_;
|
||||
psta = rtw_get_stainfo(pstapriv, bc_addr);
|
||||
_func_exit_;
|
||||
_func_exit_;
|
||||
return psta;
|
||||
|
||||
}
|
||||
|
@ -794,10 +794,10 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
|||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||
|
||||
|
||||
_enter_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
plist = get_next(phead);
|
||||
plist = get_next(phead);
|
||||
while ((rtw_end_of_queue_search(phead, plist)) == _FALSE)
|
||||
{
|
||||
paclnode = LIST_CONTAINOR(plist, struct rtw_wlan_acl_node, list);
|
||||
|
@ -810,15 +810,15 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
|||
match = _TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_exit_critical_bh(&(pacl_node_q->lock), &irqL);
|
||||
|
||||
|
||||
|
||||
if (pacl_list->mode == 1)//accept unless in deny list
|
||||
{
|
||||
res = (match == _TRUE) ? _FALSE:_TRUE;
|
||||
}
|
||||
}
|
||||
else if (pacl_list->mode == 2)//deny unless in accept list
|
||||
{
|
||||
res = (match == _TRUE) ? _TRUE:_FALSE;
|
||||
|
@ -826,11 +826,10 @@ u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr)
|
|||
else
|
||||
{
|
||||
res = _TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
|
|
5881
core/rtw_tdls.c
5881
core/rtw_tdls.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
679
core/rtw_xmit.c
679
core/rtw_xmit.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,97 +1,96 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "Hal8188EPwrSeq.h"
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
/*
|
||||
drivers should parse below arrays and do the corresponding actions
|
||||
*/
|
||||
//3 Power on Array
|
||||
WLAN_PWR_CFG rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Radio off Array
|
||||
WLAN_PWR_CFG rtl8188E_radio_off_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Card Disable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_disable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_CARDDIS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Card Enable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_enable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDDIS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Suspend Array
|
||||
WLAN_PWR_CFG rtl8188E_suspend_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_SUS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Resume Array
|
||||
WLAN_PWR_CFG rtl8188E_resume_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_SUS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
|
||||
//3HWPDN Array
|
||||
WLAN_PWR_CFG rtl8188E_hwpdn_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Enter LPS
|
||||
WLAN_PWR_CFG rtl8188E_enter_lps_flow[RTL8188E_TRANS_ACT_TO_LPS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_ACT_TO_LPS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Leave LPS
|
||||
WLAN_PWR_CFG rtl8188E_leave_lps_flow[RTL8188E_TRANS_LPS_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_LPS_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "Hal8188EPwrSeq.h"
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
/*
|
||||
drivers should parse below arrays and do the corresponding actions
|
||||
*/
|
||||
//3 Power on Array
|
||||
WLAN_PWR_CFG rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Radio off Array
|
||||
WLAN_PWR_CFG rtl8188E_radio_off_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Card Disable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_disable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_CARDDIS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Card Enable Array
|
||||
WLAN_PWR_CFG rtl8188E_card_enable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_CARDDIS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3Suspend Array
|
||||
WLAN_PWR_CFG rtl8188E_suspend_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_SUS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Resume Array
|
||||
WLAN_PWR_CFG rtl8188E_resume_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_SUS_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
|
||||
//3HWPDN Array
|
||||
WLAN_PWR_CFG rtl8188E_hwpdn_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
RTL8188E_TRANS_ACT_TO_CARDEMU
|
||||
RTL8188E_TRANS_CARDEMU_TO_PDN
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Enter LPS
|
||||
WLAN_PWR_CFG rtl8188E_enter_lps_flow[RTL8188E_TRANS_ACT_TO_LPS_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_ACT_TO_LPS
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
||||
//3 Leave LPS
|
||||
WLAN_PWR_CFG rtl8188E_leave_lps_flow[RTL8188E_TRANS_LPS_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS]=
|
||||
{
|
||||
//FW behavior
|
||||
RTL8188E_TRANS_LPS_TO_ACT
|
||||
RTL8188E_TRANS_END
|
||||
};
|
||||
|
|
|
@ -3,19 +3,19 @@ Copyright (c) Realtek Semiconductor Corp. All rights reserved.
|
|||
|
||||
Module Name:
|
||||
RateAdaptive.c
|
||||
|
||||
|
||||
Abstract:
|
||||
Implement Rate Adaptive functions for common operations.
|
||||
|
||||
|
||||
Major Change History:
|
||||
When Who What
|
||||
---------- --------------- -------------------------------
|
||||
2011-08-12 Page Create.
|
||||
---------- --------------- -------------------------------
|
||||
2011-08-12 Page Create.
|
||||
|
||||
--*/
|
||||
#include "odm_precomp.h"
|
||||
|
||||
//#if ( DM_ODM_SUPPORT_TYPE == ODM_MP)
|
||||
//#if ( DM_ODM_SUPPORT_TYPE == ODM_MP)
|
||||
//#include "Mp_Precomp.h"
|
||||
//#endif
|
||||
|
||||
|
@ -61,19 +61,19 @@ static u1Byte RETRY_PENALTY_UP[RETRYSIZE+1]={49,44,16,16,0,48}; // 12% for rate
|
|||
|
||||
static u1Byte PT_PENALTY[RETRYSIZE+1]={34,31,30,24,0,32};
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
static u1Byte RETRY_PENALTY_IDX[2][RATESIZE] = {{4,4,4,5,4,4,5,7,7,7,8,0x0a, // SS>TH
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
static u1Byte RETRY_PENALTY_IDX[2][RATESIZE] = {{4,4,4,5,4,4,5,7,7,7,8,0x0a, // SS>TH
|
||||
4,4,4,4,6,0x0a,0x0b,0x0d,
|
||||
5,5,7,7,8,0x0b,0x0d,0x0f}, // 0329 R01
|
||||
5,5,7,7,8,0x0b,0x0d,0x0f}, // 0329 R01
|
||||
{0x0a,0x0a,0x0a,0x0a,0x0c,0x0c,0x0e,0x10,0x11,0x12,0x12,0x13, // SS<TH
|
||||
0x0e,0x0f,0x10,0x10,0x11,0x14,0x14,0x15,
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
|
||||
static u1Byte RETRY_PENALTY_UP_IDX[RATESIZE] = {0x10,0x10,0x10,0x10,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x14, // SS>TH
|
||||
static u1Byte RETRY_PENALTY_UP_IDX[RATESIZE] = {0x10,0x10,0x10,0x10,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x14, // SS>TH
|
||||
0x13,0x13,0x14,0x14,0x15,0x15,0x15,0x15,
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
|
||||
static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
0x13,0x15,0x17,0x18,0x1a,0x1c,0x1d,0x1f,
|
||||
0,0,0,0x1f,0x23,0x28,0x2a,0x2c};
|
||||
|
@ -82,21 +82,21 @@ static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
|||
// wilson modify
|
||||
static u1Byte RETRY_PENALTY_IDX[2][RATESIZE] = {{4,4,4,5,4,4,5,7,7,7,8,0x0a, // SS>TH
|
||||
4,4,4,4,6,0x0a,0x0b,0x0d,
|
||||
5,5,7,7,8,0x0b,0x0d,0x0f}, // 0329 R01
|
||||
5,5,7,7,8,0x0b,0x0d,0x0f}, // 0329 R01
|
||||
{0x0a,0x0a,0x0b,0x0c,0x0a,0x0a,0x0b,0x0c,0x0d,0x10,0x13,0x14, // SS<TH
|
||||
0x0b,0x0c,0x0d,0x0e,0x0f,0x11,0x13,0x15,
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
9,9,9,9,0x0c,0x0e,0x11,0x13}};
|
||||
|
||||
static u1Byte RETRY_PENALTY_UP_IDX[RATESIZE] = {0x0c,0x0d,0x0d,0x0f,0x0d,0x0e,0x0f,0x0f,0x10,0x12,0x13,0x14, // SS>TH
|
||||
0x0f,0x10,0x10,0x12,0x12,0x13,0x14,0x15,
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
0x11,0x11,0x12,0x13,0x13,0x13,0x14,0x15};
|
||||
|
||||
static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
0x18,0x1a,0x1d,0x1f,0x21,0x27,0x29,0x2a,
|
||||
0,0,0,0x1f,0x23,0x28,0x2a,0x2c};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*static u1Byte RSSI_THRESHOLD[RATESIZE] = {0,0,0,0,
|
||||
0,0,0,0,0,0x24,0x26,0x2a,
|
||||
|
@ -106,7 +106,7 @@ static u2Byte N_THRESHOLD_HIGH[RATESIZE] = {4,4,8,16,
|
|||
24,36,48,72,96,144,192,216,
|
||||
60,80,100,160,240,400,560,640,
|
||||
300,320,480,720,1000,1200,1600,2000};
|
||||
static u2Byte N_THRESHOLD_LOW[RATESIZE] = {2,2,4,8,
|
||||
static u2Byte N_THRESHOLD_LOW[RATESIZE] = {2,2,4,8,
|
||||
12,18,24,36,48,72,96,108,
|
||||
30,40,50,80,120,200,280,320,
|
||||
150,160,240,360,500,600,800,1000};
|
||||
|
@ -137,18 +137,18 @@ static u4Byte INIT_RATE_FALLBACK_TABLE[16]={0x0f8ff015, // 0: 40M BGN mode
|
|||
0, // 13:
|
||||
0, // 14:
|
||||
0, // 15:
|
||||
|
||||
|
||||
};
|
||||
static u1Byte PendingForRateUpFail[5]={2,10,24,40,60};
|
||||
static u2Byte DynamicTxRPTTiming[6]={0x186a, 0x30d4, 0x493e, 0x61a8, 0x7a12 ,0x927c}; // 200ms-1200ms
|
||||
|
||||
// End Rate adaptive parameters
|
||||
|
||||
static void
|
||||
static void
|
||||
odm_SetTxRPTTiming_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo,
|
||||
IN u1Byte extend
|
||||
IN PODM_RA_INFO_T pRaInfo,
|
||||
IN u1Byte extend
|
||||
)
|
||||
{
|
||||
u1Byte idx = 0;
|
||||
|
@ -169,14 +169,14 @@ odm_SetTxRPTTiming_8188E(
|
|||
idx-=1;
|
||||
}
|
||||
pRaInfo->RptTime=DynamicTxRPTTiming[idx];
|
||||
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("pRaInfo->RptTime=0x%x\n", pRaInfo->RptTime));
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
odm_RateDown_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{
|
||||
u1Byte RateID, LowestRate, HighestRate;
|
||||
|
@ -192,8 +192,8 @@ odm_RateDown_8188E(
|
|||
LowestRate = pRaInfo->LowestRate;
|
||||
HighestRate = pRaInfo->HighestRate;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" RateID=%d LowestRate=%d HighestRate=%d RateSGI=%d\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" RateID=%d LowestRate=%d HighestRate=%d RateSGI=%d\n",
|
||||
RateID, LowestRate, HighestRate, pRaInfo->RateSGI));
|
||||
if (RateID > HighestRate)
|
||||
{
|
||||
|
@ -213,7 +213,7 @@ odm_RateDown_8188E(
|
|||
{
|
||||
RateID=i;
|
||||
goto RateDownFinish;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ RateDownFinish:
|
|||
|
||||
if (pRaInfo->RAPendingCounter>=4)
|
||||
pRaInfo->RAPendingCounter=4;
|
||||
|
||||
|
||||
pRaInfo->DecisionRate=RateID;
|
||||
odm_SetTxRPTTiming_8188E(pDM_Odm,pRaInfo, 2);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("Rate down, RPT Timing default\n"));
|
||||
|
@ -246,10 +246,10 @@ RateDownFinish:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
odm_RateUp_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{
|
||||
u1Byte RateID, HighestRate;
|
||||
|
@ -263,20 +263,20 @@ odm_RateUp_8188E(
|
|||
}
|
||||
RateID = pRaInfo->PreRate;
|
||||
HighestRate = pRaInfo->HighestRate;
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" RateID=%d HighestRate=%d\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" RateID=%d HighestRate=%d\n",
|
||||
RateID, HighestRate));
|
||||
if (pRaInfo->RAWaitingCounter==1){
|
||||
pRaInfo->RAWaitingCounter=0;
|
||||
pRaInfo->RAPendingCounter=0;
|
||||
}
|
||||
}
|
||||
else if (pRaInfo->RAWaitingCounter>1){
|
||||
pRaInfo->PreRssiStaRA=pRaInfo->RssiStaRA;
|
||||
goto RateUpfinish;
|
||||
}
|
||||
odm_SetTxRPTTiming_8188E(pDM_Odm,pRaInfo, 0);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("odm_RateUp_8188E():Decrease RPT Timing\n"));
|
||||
|
||||
|
||||
if (RateID < HighestRate)
|
||||
{
|
||||
for (i=RateID+1; i<=HighestRate; i++)
|
||||
|
@ -298,7 +298,7 @@ odm_RateUp_8188E(
|
|||
else //if ((sta_info_ra->Decision_rate) > (sta_info_ra->Highest_rate))
|
||||
{
|
||||
RateID = HighestRate;
|
||||
|
||||
|
||||
}
|
||||
RateUpfinish:
|
||||
//if (pRaInfo->RAWaitingCounter==10)
|
||||
|
@ -321,18 +321,18 @@ static void odm_ResetRaCounter_8188E( IN PODM_RA_INFO_T pRaInfo){
|
|||
pRaInfo->NscDown=(N_THRESHOLD_HIGH[RateID]+N_THRESHOLD_LOW[RateID])>>1;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
odm_RateDecision_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{
|
||||
u1Byte RateID = 0, RtyPtID = 0, PenaltyID1 = 0, PenaltyID2 = 0;
|
||||
//u4Byte pool_retry;
|
||||
static u1Byte DynamicTxRPTTimingCounter=0;
|
||||
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ("=====>odm_RateDecision_8188E()\n"));
|
||||
|
||||
|
||||
if (pRaInfo->Active && (pRaInfo->TOTAL > 0)) // STA used and data packet exits
|
||||
{
|
||||
if ( (pRaInfo->RssiStaRA<(pRaInfo->PreRssiStaRA-3))|| (pRaInfo->RssiStaRA>(pRaInfo->PreRssiStaRA+3))){
|
||||
|
@ -342,15 +342,15 @@ odm_RateDecision_8188E(
|
|||
// Start RA decision
|
||||
if (pRaInfo->PreRate > pRaInfo->HighestRate)
|
||||
RateID = pRaInfo->HighestRate;
|
||||
else
|
||||
else
|
||||
RateID = pRaInfo->PreRate;
|
||||
if (pRaInfo->RssiStaRA > RSSI_THRESHOLD[RateID])
|
||||
RtyPtID=0;
|
||||
else
|
||||
RtyPtID=1;
|
||||
PenaltyID1 = RETRY_PENALTY_IDX[RtyPtID][RateID]; //TODO by page
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" NscDown init is %d\n", pRaInfo->NscDown));
|
||||
//pool_retry=pRaInfo->RTY[2]+pRaInfo->RTY[3]+pRaInfo->RTY[4]+pRaInfo->DROP;
|
||||
pRaInfo->NscDown += pRaInfo->RTY[0] * RETRY_PENALTY[PenaltyID1][0];
|
||||
|
@ -358,33 +358,33 @@ odm_RateDecision_8188E(
|
|||
pRaInfo->NscDown += pRaInfo->RTY[2] * RETRY_PENALTY[PenaltyID1][2];
|
||||
pRaInfo->NscDown += pRaInfo->RTY[3] * RETRY_PENALTY[PenaltyID1][3];
|
||||
pRaInfo->NscDown += pRaInfo->RTY[4] * RETRY_PENALTY[PenaltyID1][4];
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" NscDown is %d, total*penalty[5] is %d\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" NscDown is %d, total*penalty[5] is %d\n",
|
||||
pRaInfo->NscDown, (pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID1][5])));
|
||||
if (pRaInfo->NscDown > (pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID1][5]))
|
||||
pRaInfo->NscDown -= pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID1][5];
|
||||
else
|
||||
pRaInfo->NscDown=0;
|
||||
|
||||
|
||||
// rate up
|
||||
PenaltyID2 = RETRY_PENALTY_UP_IDX[RateID];
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" NscUp init is %d\n", pRaInfo->NscUp));
|
||||
pRaInfo->NscUp += pRaInfo->RTY[0] * RETRY_PENALTY[PenaltyID2][0];
|
||||
pRaInfo->NscUp += pRaInfo->RTY[1] * RETRY_PENALTY[PenaltyID2][1];
|
||||
pRaInfo->NscUp += pRaInfo->RTY[2] * RETRY_PENALTY[PenaltyID2][2];
|
||||
pRaInfo->NscUp += pRaInfo->RTY[3] * RETRY_PENALTY[PenaltyID2][3];
|
||||
pRaInfo->NscUp += pRaInfo->RTY[4] * RETRY_PENALTY[PenaltyID2][4];
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
("NscUp is %d, total*up[5] is %d\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
("NscUp is %d, total*up[5] is %d\n",
|
||||
pRaInfo->NscUp, (pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID2][5])));
|
||||
if (pRaInfo->NscUp > (pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID2][5]))
|
||||
pRaInfo->NscUp -= pRaInfo->TOTAL * RETRY_PENALTY[PenaltyID2][5];
|
||||
else
|
||||
pRaInfo->NscUp = 0;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE|ODM_COMP_INIT, ODM_DBG_LOUD,
|
||||
(" RssiStaRa= %d RtyPtID=%d PenaltyID1=0x%x PenaltyID2=0x%x RateID=%d NscDown=%d NscUp=%d SGI=%d\n",
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE|ODM_COMP_INIT, ODM_DBG_LOUD,
|
||||
(" RssiStaRa= %d RtyPtID=%d PenaltyID1=0x%x PenaltyID2=0x%x RateID=%d NscDown=%d NscUp=%d SGI=%d\n",
|
||||
pRaInfo->RssiStaRA,RtyPtID, PenaltyID1,PenaltyID2, RateID, pRaInfo->NscDown, pRaInfo->NscUp, pRaInfo->RateSGI));
|
||||
if ((pRaInfo->NscDown < N_THRESHOLD_LOW[RateID]) ||(pRaInfo->DROP>DROPING_NECESSARY[RateID]))
|
||||
odm_RateDown_8188E(pDM_Odm,pRaInfo);
|
||||
|
@ -394,8 +394,8 @@ odm_RateDecision_8188E(
|
|||
|
||||
if (pRaInfo->DecisionRate > pRaInfo->HighestRate)
|
||||
pRaInfo->DecisionRate = pRaInfo->HighestRate;
|
||||
|
||||
if ((pRaInfo->DecisionRate)==(pRaInfo->PreRate))
|
||||
|
||||
if ((pRaInfo->DecisionRate)==(pRaInfo->PreRate))
|
||||
DynamicTxRPTTimingCounter+=1;
|
||||
else
|
||||
DynamicTxRPTTimingCounter=0;
|
||||
|
@ -413,10 +413,10 @@ odm_RateDecision_8188E(
|
|||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE, ("<=====odm_RateDecision_8188E()\n"));
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
odm_ARFBRefresh_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{ // Wilson 2011/10/26
|
||||
u4Byte MaskFromReg;
|
||||
|
@ -444,7 +444,7 @@ odm_ARFBRefresh_8188E(
|
|||
case RATR_INX_WIRELESS_B:
|
||||
pRaInfo->RAUseRate=(pRaInfo->RateMask)&0x0000000d;
|
||||
break;
|
||||
case 12:
|
||||
case 12:
|
||||
MaskFromReg=ODM_Read4Byte(pDM_Odm, REG_ARFR0);
|
||||
pRaInfo->RAUseRate=(pRaInfo->RateMask)&MaskFromReg;
|
||||
break;
|
||||
|
@ -460,7 +460,7 @@ odm_ARFBRefresh_8188E(
|
|||
MaskFromReg=ODM_Read4Byte(pDM_Odm, REG_ARFR3);
|
||||
pRaInfo->RAUseRate=(pRaInfo->RateMask)&MaskFromReg;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
pRaInfo->RAUseRate=(pRaInfo->RateMask);
|
||||
break;
|
||||
|
@ -492,7 +492,7 @@ odm_ARFBRefresh_8188E(
|
|||
else{
|
||||
pRaInfo->LowestRate=0;
|
||||
}
|
||||
|
||||
|
||||
#if POWER_TRAINING_ACTIVE == 1
|
||||
if (pRaInfo->HighestRate >0x13)
|
||||
pRaInfo->PTModeSS=3;
|
||||
|
@ -502,41 +502,41 @@ odm_ARFBRefresh_8188E(
|
|||
pRaInfo->PTModeSS=1;
|
||||
else
|
||||
pRaInfo->PTModeSS=0;
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("ODM_ARFBRefresh_8188E(): PTModeSS=%d\n", pRaInfo->PTModeSS));
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
if (pRaInfo->DecisionRate > pRaInfo->HighestRate)
|
||||
pRaInfo->DecisionRate = pRaInfo->HighestRate;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("ODM_ARFBRefresh_8188E(): RateID=%d RateMask=%8.8x RAUseRate=%8.8x HighestRate=%d,DecisionRate=%d\n",
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("ODM_ARFBRefresh_8188E(): RateID=%d RateMask=%8.8x RAUseRate=%8.8x HighestRate=%d,DecisionRate=%d\n",
|
||||
pRaInfo->RateID, pRaInfo->RateMask, pRaInfo->RAUseRate, pRaInfo->HighestRate,pRaInfo->DecisionRate));
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if POWER_TRAINING_ACTIVE == 1
|
||||
static void
|
||||
static void
|
||||
odm_PTTryState_8188E(
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{
|
||||
pRaInfo->PTTryState=0;
|
||||
switch (pRaInfo->PTModeSS)
|
||||
{
|
||||
case 3:
|
||||
if (pRaInfo->DecisionRate>=0x19)
|
||||
case 3:
|
||||
if (pRaInfo->DecisionRate>=0x19)
|
||||
pRaInfo->PTTryState=1;
|
||||
break;
|
||||
case 2:
|
||||
if (pRaInfo->DecisionRate>=0x11)
|
||||
pRaInfo->PTTryState=1;
|
||||
break;
|
||||
break;
|
||||
case 1:
|
||||
if (pRaInfo->DecisionRate>=0x0a)
|
||||
pRaInfo->PTTryState=1;
|
||||
break;
|
||||
break;
|
||||
case 0:
|
||||
if (pRaInfo->DecisionRate>=0x03)
|
||||
pRaInfo->PTTryState=1;
|
||||
|
@ -563,7 +563,7 @@ odm_PTTryState_8188E(
|
|||
|
||||
pRaInfo->PTPreRssi=pRaInfo->RssiStaRA;
|
||||
pRaInfo->PTStopCount=0;
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
pRaInfo->RAstage=0;
|
||||
|
@ -577,9 +577,9 @@ odm_PTTryState_8188E(
|
|||
pRaInfo->PTPreRate=pRaInfo->DecisionRate;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
odm_PTDecision_8188E(
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
IN PODM_RA_INFO_T pRaInfo
|
||||
)
|
||||
{
|
||||
u1Byte stage_BUF;
|
||||
|
@ -588,7 +588,7 @@ odm_PTDecision_8188E(
|
|||
u4Byte numsc;
|
||||
u4Byte num_total;
|
||||
u1Byte stage_id;
|
||||
|
||||
|
||||
stage_BUF=pRaInfo->PTStage;
|
||||
numsc = 0;
|
||||
num_total= pRaInfo->TOTAL* PT_PENALTY[5];
|
||||
|
@ -605,7 +605,7 @@ odm_PTDecision_8188E(
|
|||
stage_id=temp_stage-j;
|
||||
else
|
||||
stage_id=0;
|
||||
|
||||
|
||||
pRaInfo->PTSmoothFactor=(pRaInfo->PTSmoothFactor>>1) + (pRaInfo->PTSmoothFactor>>2) + stage_id*16+2;
|
||||
if (pRaInfo->PTSmoothFactor>192)
|
||||
pRaInfo->PTSmoothFactor=192;
|
||||
|
@ -623,31 +623,31 @@ odm_PTDecision_8188E(
|
|||
static VOID
|
||||
odm_RATxRPTTimerSetting(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
IN u2Byte minRptTime
|
||||
)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,(" =====>odm_RATxRPTTimerSetting()\n"));
|
||||
|
||||
|
||||
|
||||
|
||||
if (pDM_Odm->CurrminRptTime != minRptTime){
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
(" CurrminRptTime =0x%04x minRptTime=0x%04x\n", pDM_Odm->CurrminRptTime, minRptTime));
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_MP|ODM_AP))
|
||||
ODM_RA_Set_TxRPT_Time(pDM_Odm,minRptTime);
|
||||
ODM_RA_Set_TxRPT_Time(pDM_Odm,minRptTime);
|
||||
#else
|
||||
rtw_rpt_timer_cfg_cmd(pDM_Odm->Adapter,minRptTime);
|
||||
#endif
|
||||
#endif
|
||||
pDM_Odm->CurrminRptTime = minRptTime;
|
||||
}
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,(" <=====odm_RATxRPTTimerSetting()\n"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
VOID
|
||||
ODM_RASupport_Init(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("=====>ODM_RASupport_Init()\n"));
|
||||
|
||||
// 2012/02/14 MH Be noticed, the init must be after IC type is recognized!!!!!
|
||||
|
@ -658,10 +658,10 @@ ODM_RASupport_Init(
|
|||
|
||||
|
||||
|
||||
int
|
||||
int
|
||||
ODM_RAInfo_Init(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
PODM_RA_INFO_T pRaInfo = &pDM_Odm->RAInfo[MacID];
|
||||
|
@ -669,7 +669,7 @@ ODM_RAInfo_Init(
|
|||
u1Byte WirelessMode=0xFF; //invalid value
|
||||
u1Byte max_rate_idx = 0x13; //MCS7
|
||||
if (pDM_Odm->pWirelessMode!=NULL){
|
||||
WirelessMode=*(pDM_Odm->pWirelessMode);
|
||||
WirelessMode=*(pDM_Odm->pWirelessMode);
|
||||
}
|
||||
|
||||
if (WirelessMode != 0xFF ){
|
||||
|
@ -680,19 +680,19 @@ ODM_RAInfo_Init(
|
|||
else if (WirelessMode & ODM_WM_B)
|
||||
max_rate_idx = 0x03;
|
||||
}
|
||||
|
||||
|
||||
//printk("%s ==>WirelessMode:0x%08x ,max_raid_idx:0x%02x\n ",__func__,WirelessMode,max_rate_idx);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("ODM_RAInfo_Init(): WirelessMode:0x%08x ,max_raid_idx:0x%02x\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("ODM_RAInfo_Init(): WirelessMode:0x%08x ,max_raid_idx:0x%02x\n",
|
||||
WirelessMode,max_rate_idx));
|
||||
|
||||
|
||||
pRaInfo->DecisionRate = max_rate_idx;
|
||||
pRaInfo->PreRate = max_rate_idx;
|
||||
pRaInfo->HighestRate=max_rate_idx;
|
||||
#else
|
||||
pRaInfo->DecisionRate = 0x13;
|
||||
pRaInfo->PreRate = 0x13;
|
||||
pRaInfo->HighestRate= 0x13;
|
||||
#else
|
||||
pRaInfo->DecisionRate = 0x13;
|
||||
pRaInfo->PreRate = 0x13;
|
||||
pRaInfo->HighestRate= 0x13;
|
||||
#endif
|
||||
pRaInfo->LowestRate=0;
|
||||
pRaInfo->RateID=0;
|
||||
|
@ -729,7 +729,7 @@ ODM_RAInfo_Init(
|
|||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
ODM_RAInfo_Init_all(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
|
@ -748,21 +748,21 @@ ODM_RAInfo_Init_all(
|
|||
|
||||
u1Byte
|
||||
ODM_RA_GetShortGI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM))
|
||||
return 0;
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
("MacID=%d SGI=%d\n", MacID, pDM_Odm->RAInfo[MacID].RateSGI));
|
||||
return pDM_Odm->RAInfo[MacID].RateSGI;
|
||||
}
|
||||
|
||||
u1Byte
|
||||
u1Byte
|
||||
ODM_RA_GetDecisionRate_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
u1Byte DecisionRate = 0;
|
||||
|
@ -770,43 +770,43 @@ ODM_RA_GetDecisionRate_8188E(
|
|||
if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM))
|
||||
return 0;
|
||||
DecisionRate = (pDM_Odm->RAInfo[MacID].DecisionRate);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" MacID=%d DecisionRate=0x%x\n", MacID, DecisionRate));
|
||||
return DecisionRate;
|
||||
}
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetHwPwrStatus_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
u1Byte PTStage = 5;
|
||||
if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM))
|
||||
return 0;
|
||||
PTStage = (pDM_Odm->RAInfo[MacID].PTStage);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
("MacID=%d PTStage=0x%x\n", MacID, PTStage));
|
||||
return PTStage;
|
||||
}
|
||||
|
||||
VOID
|
||||
VOID
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte RateID,
|
||||
IN u1Byte RateID,
|
||||
IN u4Byte RateMask,
|
||||
IN u1Byte SGIEnable
|
||||
)
|
||||
{
|
||||
PODM_RA_INFO_T pRaInfo = NULL;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("MacID=%d RateID=0x%x RateMask=0x%x SGIEnable=%d\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("MacID=%d RateID=0x%x RateMask=0x%x SGIEnable=%d\n",
|
||||
MacID, RateID, RateMask, SGIEnable));
|
||||
if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM))
|
||||
return;
|
||||
|
||||
|
||||
pRaInfo = &(pDM_Odm->RAInfo[MacID]);
|
||||
pRaInfo->RateID = RateID;
|
||||
pRaInfo->RateMask = RateMask;
|
||||
|
@ -814,16 +814,16 @@ ODM_RA_UpdateRateInfo_8188E(
|
|||
odm_ARFBRefresh_8188E(pDM_Odm, pRaInfo);
|
||||
}
|
||||
|
||||
VOID
|
||||
VOID
|
||||
ODM_RA_SetRSSI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
)
|
||||
{
|
||||
PODM_RA_INFO_T pRaInfo = NULL;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_TRACE,
|
||||
(" MacID=%d Rssi=%d\n", MacID, Rssi));
|
||||
if ((NULL == pDM_Odm) || (MacID >= ASSOCIATE_ENTRY_NUM))
|
||||
return;
|
||||
|
@ -832,10 +832,10 @@ ODM_RA_SetRSSI_8188E(
|
|||
pRaInfo->RssiStaRA = Rssi;
|
||||
}
|
||||
|
||||
VOID
|
||||
VOID
|
||||
ODM_RA_Set_TxRPT_Time(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
IN u2Byte minRptTime
|
||||
)
|
||||
{
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
|
@ -846,7 +846,7 @@ ODM_RA_Set_TxRPT_Time(
|
|||
|
||||
|
||||
VOID
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN pu1Byte TxRPT_Buf,
|
||||
IN u2Byte TxRPT_Len,
|
||||
|
@ -858,11 +858,11 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
u1Byte MacId = 0;
|
||||
pu1Byte pBuffer = NULL;
|
||||
u4Byte valid = 0, ItemNum = 0;
|
||||
u2Byte minRptTime = 0x927c;
|
||||
u2Byte minRptTime = 0x927c;
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("=====>ODM_RA_TxRPT2Handle_8188E(): valid0=%d valid1=%d BufferLength=%d\n",
|
||||
MacIDValidEntry0, MacIDValidEntry1, TxRPT_Len));
|
||||
|
||||
|
||||
ItemNum = TxRPT_Len >> 3;
|
||||
pBuffer = TxRPT_Buf;
|
||||
|
||||
|
@ -902,8 +902,8 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
pRAInfo->DROP;
|
||||
if (pRAInfo->TOTAL != 0)
|
||||
{
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("macid=%d Total=%d R0=%d R1=%d R2=%d R3=%d R4=%d D0=%d valid0=%x valid1=%x\n",
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD,
|
||||
("macid=%d Total=%d R0=%d R1=%d R2=%d R3=%d R4=%d D0=%d valid0=%x valid1=%x\n",
|
||||
MacId,
|
||||
pRAInfo->TOTAL,
|
||||
pRAInfo->RTY[0],
|
||||
|
@ -945,11 +945,11 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
#ifdef DETECT_STA_EXISTANCE
|
||||
void RTL8188E_DetectSTAExistance(PDM_ODM_T pDM_Odm, PODM_RA_INFO_T pRAInfo, int MacID);
|
||||
RTL8188E_DetectSTAExistance(pDM_Odm, pRAInfo, MacId);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
|
||||
("macid=%d R0=%d R1=%d R2=%d R3=%d R4=%d drop=%d valid0=%x RateID=%d SGI=%d\n",
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
|
||||
("macid=%d R0=%d R1=%d R2=%d R3=%d R4=%d drop=%d valid0=%x RateID=%d SGI=%d\n",
|
||||
MacId,
|
||||
pRAInfo->RTY[0],
|
||||
pRAInfo->RTY[1],
|
||||
|
@ -966,14 +966,14 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
}
|
||||
|
||||
if (minRptTime > pRAInfo->RptTime)
|
||||
minRptTime = pRAInfo->RptTime;
|
||||
minRptTime = pRAInfo->RptTime;
|
||||
|
||||
pBuffer += TX_RPT2_ITEM_SIZE;
|
||||
MacId++;
|
||||
}while (MacId < ItemNum);
|
||||
|
||||
|
||||
odm_RATxRPTTimerSetting(pDM_Odm,minRptTime);
|
||||
|
||||
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_RATE_ADAPTIVE, ODM_DBG_LOUD, ("<===== ODM_RA_TxRPT2Handle_8188E()\n"));
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
static VOID
|
||||
odm_RATxRPTTimerSetting(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
IN u2Byte minRptTime
|
||||
)
|
||||
{
|
||||
return;
|
||||
|
@ -992,22 +992,22 @@ odm_RATxRPTTimerSetting(
|
|||
|
||||
VOID
|
||||
ODM_RASupport_Init(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
ODM_RAInfo_Init(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
ODM_RAInfo_Init_all(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
|
@ -1015,37 +1015,37 @@ ODM_RAInfo_Init_all(
|
|||
return 0;
|
||||
}
|
||||
|
||||
u1Byte
|
||||
u1Byte
|
||||
ODM_RA_GetShortGI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
u1Byte
|
||||
u1Byte
|
||||
ODM_RA_GetDecisionRate_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
u1Byte
|
||||
ODM_RA_GetHwPwrStatus_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
VOID
|
||||
VOID
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte RateID,
|
||||
IN u1Byte RateID,
|
||||
IN u4Byte RateMask,
|
||||
IN u1Byte SGIEnable
|
||||
)
|
||||
|
@ -1053,27 +1053,27 @@ ODM_RA_UpdateRateInfo_8188E(
|
|||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
VOID
|
||||
ODM_RA_SetRSSI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
ODM_RA_Set_TxRPT_Time(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
ODM_RA_Set_TxRPT_Time(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN pu1Byte TxRPT_Buf,
|
||||
IN u2Byte TxRPT_Len,
|
||||
|
@ -1083,7 +1083,6 @@ ODM_RA_TxRPT2Handle_8188E(
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,329 +1,328 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "odm_precomp.h"
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
#include <rtw_iol.h>
|
||||
#endif
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
static BOOLEAN
|
||||
CheckCondition(
|
||||
const u4Byte Condition,
|
||||
const u4Byte Hex
|
||||
)
|
||||
{
|
||||
u4Byte _board = (Hex & 0x000000FF);
|
||||
u4Byte _interface = (Hex & 0x0000FF00) >> 8;
|
||||
u4Byte _platform = (Hex & 0x00FF0000) >> 16;
|
||||
u4Byte cond = Condition;
|
||||
|
||||
if ( Condition == 0xCDCDCDCD )
|
||||
return TRUE;
|
||||
|
||||
cond = Condition & 0x000000FF;
|
||||
if ( (_board == cond) && cond != 0x00)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x0000FF00;
|
||||
cond = cond >> 8;
|
||||
if ( (_interface & cond) == 0 && cond != 0x07)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x00FF0000;
|
||||
cond = cond >> 16;
|
||||
if ( (_platform & cond) == 0 && cond != 0x0F)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* MAC_REG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
u4Byte Array_MAC_REG_8188E[] = {
|
||||
0x026, 0x00000041,
|
||||
0x027, 0x00000035,
|
||||
0x428, 0x0000000A,
|
||||
0x429, 0x00000010,
|
||||
0x430, 0x00000000,
|
||||
0x431, 0x00000001,
|
||||
0x432, 0x00000002,
|
||||
0x433, 0x00000004,
|
||||
0x434, 0x00000005,
|
||||
0x435, 0x00000006,
|
||||
0x436, 0x00000007,
|
||||
0x437, 0x00000008,
|
||||
0x438, 0x00000000,
|
||||
0x439, 0x00000000,
|
||||
0x43A, 0x00000001,
|
||||
0x43B, 0x00000002,
|
||||
0x43C, 0x00000004,
|
||||
0x43D, 0x00000005,
|
||||
0x43E, 0x00000006,
|
||||
0x43F, 0x00000007,
|
||||
0x440, 0x0000005D,
|
||||
0x441, 0x00000001,
|
||||
0x442, 0x00000000,
|
||||
0x444, 0x00000015,
|
||||
0x445, 0x000000F0,
|
||||
0x446, 0x0000000F,
|
||||
0x447, 0x00000000,
|
||||
0x458, 0x00000041,
|
||||
0x459, 0x000000A8,
|
||||
0x45A, 0x00000072,
|
||||
0x45B, 0x000000B9,
|
||||
0x460, 0x00000066,
|
||||
0x461, 0x00000066,
|
||||
0x480, 0x00000008,
|
||||
0x4C8, 0x000000FF,
|
||||
0x4C9, 0x00000008,
|
||||
0x4CC, 0x000000FF,
|
||||
0x4CD, 0x000000FF,
|
||||
0x4CE, 0x00000001,
|
||||
0x4D3, 0x00000001,
|
||||
0x500, 0x00000026,
|
||||
0x501, 0x000000A2,
|
||||
0x502, 0x0000002F,
|
||||
0x503, 0x00000000,
|
||||
0x504, 0x00000028,
|
||||
0x505, 0x000000A3,
|
||||
0x506, 0x0000005E,
|
||||
0x507, 0x00000000,
|
||||
0x508, 0x0000002B,
|
||||
0x509, 0x000000A4,
|
||||
0x50A, 0x0000005E,
|
||||
0x50B, 0x00000000,
|
||||
0x50C, 0x0000004F,
|
||||
0x50D, 0x000000A4,
|
||||
0x50E, 0x00000000,
|
||||
0x50F, 0x00000000,
|
||||
0x512, 0x0000001C,
|
||||
0x514, 0x0000000A,
|
||||
0x516, 0x0000000A,
|
||||
0x525, 0x0000004F,
|
||||
0x550, 0x00000010,
|
||||
0x551, 0x00000010,
|
||||
0x559, 0x00000002,
|
||||
0x55D, 0x000000FF,
|
||||
0x605, 0x00000030,
|
||||
0x608, 0x0000000E,
|
||||
0x609, 0x0000002A,
|
||||
0x620, 0x000000FF,
|
||||
0x621, 0x000000FF,
|
||||
0x622, 0x000000FF,
|
||||
0x623, 0x000000FF,
|
||||
0x624, 0x000000FF,
|
||||
0x625, 0x000000FF,
|
||||
0x626, 0x000000FF,
|
||||
0x627, 0x000000FF,
|
||||
0x652, 0x00000020,
|
||||
0x63C, 0x0000000A,
|
||||
0x63D, 0x0000000A,
|
||||
0x63E, 0x0000000E,
|
||||
0x63F, 0x0000000E,
|
||||
0x640, 0x00000040,
|
||||
0x66E, 0x00000005,
|
||||
0x700, 0x00000021,
|
||||
0x701, 0x00000043,
|
||||
0x702, 0x00000065,
|
||||
0x703, 0x00000087,
|
||||
0x708, 0x00000021,
|
||||
0x709, 0x00000043,
|
||||
0x70A, 0x00000065,
|
||||
0x70B, 0x00000087,
|
||||
};
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_MAC_REG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
|
||||
|
||||
u4Byte hex = 0;
|
||||
u4Byte i = 0;
|
||||
u2Byte count = 0;
|
||||
pu4Byte ptr_array = NULL;
|
||||
u1Byte platform = pDM_Odm->SupportPlatform;
|
||||
u1Byte interfaceValue = pDM_Odm->SupportInterface;
|
||||
u1Byte board = pDM_Odm->BoardType;
|
||||
u4Byte ArrayLen = sizeof(Array_MAC_REG_8188E)/sizeof(u4Byte);
|
||||
pu4Byte Array = Array_MAC_REG_8188E;
|
||||
BOOLEAN biol = FALSE;
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
struct xmit_frame *pxmit_frame;
|
||||
u8 bndy_cnt = 1;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
struct cmd_cmp cmpdata[ArrayLen];
|
||||
u4Byte cmpdata_idx=0;
|
||||
#endif
|
||||
#endif //CONFIG_IOL_IOREG_CFG
|
||||
HAL_STATUS rst =HAL_STATUS_SUCCESS;
|
||||
hex += board;
|
||||
hex += interfaceValue << 8;
|
||||
hex += platform << 16;
|
||||
hex += 0xFF000000;
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
biol = rtw_IOL_applied(Adapter);
|
||||
|
||||
if (biol){
|
||||
if ((pxmit_frame=rtw_IOL_accquire_xmit_frame(Adapter)) == NULL)
|
||||
{
|
||||
printk("rtw_IOL_accquire_xmit_frame failed\n");
|
||||
return HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif //CONFIG_IOL_IOREG_CFG
|
||||
|
||||
for (i = 0; i < ArrayLen; i += 2 )
|
||||
{
|
||||
u4Byte v1 = Array[i];
|
||||
u4Byte v2 = Array[i+1];
|
||||
|
||||
// This (offset, data) pair meets the condition.
|
||||
if ( v1 < 0xCDCDCDCD )
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
|
||||
if (biol){
|
||||
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
rtw_IOL_append_WB_cmd(pxmit_frame,(u2Byte)v1, (u1Byte)v2,0xFF);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif //endif CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigMAC_8188E(pDM_Odm, v1, (u1Byte)v2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{ // This line is the start line of branch.
|
||||
if ( !CheckCondition(Array[i], hex) )
|
||||
{ // Discard the following (offset, data) pairs.
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while ( v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
i -= 2; // prevent from for-loop += 2
|
||||
}
|
||||
else // Configure matched pairs and skip to end of if-else.
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while ( v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
rtw_IOL_append_WB_cmd(pxmit_frame,(u2Byte)v1, (u1Byte)v2,0xFF);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigMAC_8188E(pDM_Odm, v1, (u1Byte)v2);
|
||||
}
|
||||
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
while (v2 != 0xDEAD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
//printk("==> %s, pktlen = %d,bndy_cnt = %d\n",__func__,pxmit_frame->attrib.pktlen+4+32,bndy_cnt);
|
||||
|
||||
if (rtw_IOL_exec_cmds_sync(pDM_Odm->Adapter, pxmit_frame, 1000, bndy_cnt))
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
printk("~~~ IOL Config MAC Success !!!\n");
|
||||
//compare writed data
|
||||
{
|
||||
u4Byte idx;
|
||||
u1Byte cdata;
|
||||
// HAL_STATUS_FAILURE;
|
||||
printk(" MAC data compare => array_len:%d\n",cmpdata_idx);
|
||||
for (idx=0;idx< cmpdata_idx;idx++)
|
||||
{
|
||||
cdata = ODM_Read1Byte(pDM_Odm, cmpdata[idx].addr);
|
||||
if (cdata != cmpdata[idx].value){
|
||||
printk("### MAC data compared failed !! addr:0x%04x, data:(0x%02x : 0x%02x) ###\n",
|
||||
cmpdata[idx].addr,cmpdata[idx].value,cdata);
|
||||
//rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//dump data from TX packet buffer
|
||||
//if (rst == HAL_STATUS_FAILURE)
|
||||
{
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
|
||||
}
|
||||
else{
|
||||
printk("~~~ MAC IOL_exec_cmds Failed !!!\n");
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
{
|
||||
//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
}
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
return rst;
|
||||
}
|
||||
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "odm_precomp.h"
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
#include <rtw_iol.h>
|
||||
#endif
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
static BOOLEAN
|
||||
CheckCondition(
|
||||
const u4Byte Condition,
|
||||
const u4Byte Hex
|
||||
)
|
||||
{
|
||||
u4Byte _board = (Hex & 0x000000FF);
|
||||
u4Byte _interface = (Hex & 0x0000FF00) >> 8;
|
||||
u4Byte _platform = (Hex & 0x00FF0000) >> 16;
|
||||
u4Byte cond = Condition;
|
||||
|
||||
if ( Condition == 0xCDCDCDCD )
|
||||
return TRUE;
|
||||
|
||||
cond = Condition & 0x000000FF;
|
||||
if ( (_board == cond) && cond != 0x00)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x0000FF00;
|
||||
cond = cond >> 8;
|
||||
if ( (_interface & cond) == 0 && cond != 0x07)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x00FF0000;
|
||||
cond = cond >> 16;
|
||||
if ( (_platform & cond) == 0 && cond != 0x0F)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* MAC_REG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
u4Byte Array_MAC_REG_8188E[] = {
|
||||
0x026, 0x00000041,
|
||||
0x027, 0x00000035,
|
||||
0x428, 0x0000000A,
|
||||
0x429, 0x00000010,
|
||||
0x430, 0x00000000,
|
||||
0x431, 0x00000001,
|
||||
0x432, 0x00000002,
|
||||
0x433, 0x00000004,
|
||||
0x434, 0x00000005,
|
||||
0x435, 0x00000006,
|
||||
0x436, 0x00000007,
|
||||
0x437, 0x00000008,
|
||||
0x438, 0x00000000,
|
||||
0x439, 0x00000000,
|
||||
0x43A, 0x00000001,
|
||||
0x43B, 0x00000002,
|
||||
0x43C, 0x00000004,
|
||||
0x43D, 0x00000005,
|
||||
0x43E, 0x00000006,
|
||||
0x43F, 0x00000007,
|
||||
0x440, 0x0000005D,
|
||||
0x441, 0x00000001,
|
||||
0x442, 0x00000000,
|
||||
0x444, 0x00000015,
|
||||
0x445, 0x000000F0,
|
||||
0x446, 0x0000000F,
|
||||
0x447, 0x00000000,
|
||||
0x458, 0x00000041,
|
||||
0x459, 0x000000A8,
|
||||
0x45A, 0x00000072,
|
||||
0x45B, 0x000000B9,
|
||||
0x460, 0x00000066,
|
||||
0x461, 0x00000066,
|
||||
0x480, 0x00000008,
|
||||
0x4C8, 0x000000FF,
|
||||
0x4C9, 0x00000008,
|
||||
0x4CC, 0x000000FF,
|
||||
0x4CD, 0x000000FF,
|
||||
0x4CE, 0x00000001,
|
||||
0x4D3, 0x00000001,
|
||||
0x500, 0x00000026,
|
||||
0x501, 0x000000A2,
|
||||
0x502, 0x0000002F,
|
||||
0x503, 0x00000000,
|
||||
0x504, 0x00000028,
|
||||
0x505, 0x000000A3,
|
||||
0x506, 0x0000005E,
|
||||
0x507, 0x00000000,
|
||||
0x508, 0x0000002B,
|
||||
0x509, 0x000000A4,
|
||||
0x50A, 0x0000005E,
|
||||
0x50B, 0x00000000,
|
||||
0x50C, 0x0000004F,
|
||||
0x50D, 0x000000A4,
|
||||
0x50E, 0x00000000,
|
||||
0x50F, 0x00000000,
|
||||
0x512, 0x0000001C,
|
||||
0x514, 0x0000000A,
|
||||
0x516, 0x0000000A,
|
||||
0x525, 0x0000004F,
|
||||
0x550, 0x00000010,
|
||||
0x551, 0x00000010,
|
||||
0x559, 0x00000002,
|
||||
0x55D, 0x000000FF,
|
||||
0x605, 0x00000030,
|
||||
0x608, 0x0000000E,
|
||||
0x609, 0x0000002A,
|
||||
0x620, 0x000000FF,
|
||||
0x621, 0x000000FF,
|
||||
0x622, 0x000000FF,
|
||||
0x623, 0x000000FF,
|
||||
0x624, 0x000000FF,
|
||||
0x625, 0x000000FF,
|
||||
0x626, 0x000000FF,
|
||||
0x627, 0x000000FF,
|
||||
0x652, 0x00000020,
|
||||
0x63C, 0x0000000A,
|
||||
0x63D, 0x0000000A,
|
||||
0x63E, 0x0000000E,
|
||||
0x63F, 0x0000000E,
|
||||
0x640, 0x00000040,
|
||||
0x66E, 0x00000005,
|
||||
0x700, 0x00000021,
|
||||
0x701, 0x00000043,
|
||||
0x702, 0x00000065,
|
||||
0x703, 0x00000087,
|
||||
0x708, 0x00000021,
|
||||
0x709, 0x00000043,
|
||||
0x70A, 0x00000065,
|
||||
0x70B, 0x00000087,
|
||||
};
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_MAC_REG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
|
||||
|
||||
u4Byte hex = 0;
|
||||
u4Byte i = 0;
|
||||
u2Byte count = 0;
|
||||
pu4Byte ptr_array = NULL;
|
||||
u1Byte platform = pDM_Odm->SupportPlatform;
|
||||
u1Byte interfaceValue = pDM_Odm->SupportInterface;
|
||||
u1Byte board = pDM_Odm->BoardType;
|
||||
u4Byte ArrayLen = sizeof(Array_MAC_REG_8188E)/sizeof(u4Byte);
|
||||
pu4Byte Array = Array_MAC_REG_8188E;
|
||||
BOOLEAN biol = FALSE;
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
struct xmit_frame *pxmit_frame;
|
||||
u8 bndy_cnt = 1;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
struct cmd_cmp cmpdata[ArrayLen];
|
||||
u4Byte cmpdata_idx=0;
|
||||
#endif
|
||||
#endif //CONFIG_IOL_IOREG_CFG
|
||||
HAL_STATUS rst =HAL_STATUS_SUCCESS;
|
||||
hex += board;
|
||||
hex += interfaceValue << 8;
|
||||
hex += platform << 16;
|
||||
hex += 0xFF000000;
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
biol = rtw_IOL_applied(Adapter);
|
||||
|
||||
if (biol){
|
||||
if ((pxmit_frame=rtw_IOL_accquire_xmit_frame(Adapter)) == NULL)
|
||||
{
|
||||
printk("rtw_IOL_accquire_xmit_frame failed\n");
|
||||
return HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif //CONFIG_IOL_IOREG_CFG
|
||||
|
||||
for (i = 0; i < ArrayLen; i += 2 )
|
||||
{
|
||||
u4Byte v1 = Array[i];
|
||||
u4Byte v2 = Array[i+1];
|
||||
|
||||
// This (offset, data) pair meets the condition.
|
||||
if ( v1 < 0xCDCDCDCD )
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
|
||||
if (biol){
|
||||
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
rtw_IOL_append_WB_cmd(pxmit_frame,(u2Byte)v1, (u1Byte)v2,0xFF);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif //endif CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigMAC_8188E(pDM_Odm, v1, (u1Byte)v2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{ // This line is the start line of branch.
|
||||
if ( !CheckCondition(Array[i], hex) )
|
||||
{ // Discard the following (offset, data) pairs.
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while ( v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
i -= 2; // prevent from for-loop += 2
|
||||
}
|
||||
else // Configure matched pairs and skip to end of if-else.
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while ( v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
rtw_IOL_append_WB_cmd(pxmit_frame,(u2Byte)v1, (u1Byte)v2,0xFF);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigMAC_8188E(pDM_Odm, v1, (u1Byte)v2);
|
||||
}
|
||||
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
while (v2 != 0xDEAD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
//printk("==> %s, pktlen = %d,bndy_cnt = %d\n",__func__,pxmit_frame->attrib.pktlen+4+32,bndy_cnt);
|
||||
|
||||
if (rtw_IOL_exec_cmds_sync(pDM_Odm->Adapter, pxmit_frame, 1000, bndy_cnt))
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
printk("~~~ IOL Config MAC Success !!!\n");
|
||||
//compare writed data
|
||||
{
|
||||
u4Byte idx;
|
||||
u1Byte cdata;
|
||||
// HAL_STATUS_FAILURE;
|
||||
printk(" MAC data compare => array_len:%d\n",cmpdata_idx);
|
||||
for (idx=0;idx< cmpdata_idx;idx++)
|
||||
{
|
||||
cdata = ODM_Read1Byte(pDM_Odm, cmpdata[idx].addr);
|
||||
if (cdata != cmpdata[idx].value){
|
||||
printk("### MAC data compared failed !! addr:0x%04x, data:(0x%02x : 0x%02x) ###\n",
|
||||
cmpdata[idx].addr,cmpdata[idx].value,cdata);
|
||||
//rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//dump data from TX packet buffer
|
||||
//if (rst == HAL_STATUS_FAILURE)
|
||||
{
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
|
||||
}
|
||||
else{
|
||||
printk("~~~ MAC IOL_exec_cmds Failed !!!\n");
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
{
|
||||
//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
}
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
return rst;
|
||||
}
|
||||
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
|
@ -1,377 +1,376 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
#include <rtw_iol.h>
|
||||
#endif
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
static BOOLEAN
|
||||
CheckCondition(
|
||||
const u4Byte Condition,
|
||||
const u4Byte Hex
|
||||
)
|
||||
{
|
||||
u4Byte _board = (Hex & 0x000000FF);
|
||||
u4Byte _interface = (Hex & 0x0000FF00) >> 8;
|
||||
u4Byte _platform = (Hex & 0x00FF0000) >> 16;
|
||||
u4Byte cond = Condition;
|
||||
|
||||
if ( Condition == 0xCDCDCDCD )
|
||||
return TRUE;
|
||||
|
||||
cond = Condition & 0x000000FF;
|
||||
if ( (_board == cond) && cond != 0x00)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x0000FF00;
|
||||
cond = cond >> 8;
|
||||
if ( (_interface & cond) == 0 && cond != 0x07)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x00FF0000;
|
||||
cond = cond >> 16;
|
||||
if ( (_platform & cond) == 0 && cond != 0x0F)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* RadioA_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
u4Byte Array_RadioA_1T_8188E[] = {
|
||||
0x000, 0x00030000,
|
||||
0x008, 0x00084000,
|
||||
0x018, 0x00000407,
|
||||
0x019, 0x00000012,
|
||||
0x01E, 0x00080009,
|
||||
0x01F, 0x00000880,
|
||||
0x02F, 0x0001A060,
|
||||
0x03F, 0x00000000,
|
||||
0x042, 0x000060C0,
|
||||
0x057, 0x000D0000,
|
||||
0x058, 0x000BE180,
|
||||
0x067, 0x00001552,
|
||||
0x083, 0x00000000,
|
||||
0x0B0, 0x000FF8FC,
|
||||
0x0B1, 0x00054400,
|
||||
0x0B2, 0x000CCC19,
|
||||
0x0B4, 0x00043003,
|
||||
0x0B6, 0x0004953E,
|
||||
0x0B7, 0x0001C718,
|
||||
0x0B8, 0x000060FF,
|
||||
0x0B9, 0x00080001,
|
||||
0x0BA, 0x00040000,
|
||||
0x0BB, 0x00000400,
|
||||
0x0BF, 0x000C0000,
|
||||
0x0C2, 0x00002400,
|
||||
0x0C3, 0x00000009,
|
||||
0x0C4, 0x00040C91,
|
||||
0x0C5, 0x00099999,
|
||||
0x0C6, 0x000000A3,
|
||||
0x0C7, 0x00088820,
|
||||
0x0C8, 0x00076C06,
|
||||
0x0C9, 0x00000000,
|
||||
0x0CA, 0x00080000,
|
||||
0x0DF, 0x00000180,
|
||||
0x0EF, 0x000001A0,
|
||||
0x051, 0x0006B27D,
|
||||
0xFF0F041F, 0xABCD,
|
||||
0x052, 0x0007E4DD,
|
||||
0xCDCDCDCD, 0xCDCD,
|
||||
0x052, 0x0007E49D,
|
||||
0xFF0F041F, 0xDEAD,
|
||||
0x053, 0x00000073,
|
||||
0x056, 0x00051FF3,
|
||||
0x035, 0x00000086,
|
||||
0x035, 0x00000186,
|
||||
0x035, 0x00000286,
|
||||
0x036, 0x00001C25,
|
||||
0x036, 0x00009C25,
|
||||
0x036, 0x00011C25,
|
||||
0x036, 0x00019C25,
|
||||
0x0B6, 0x00048538,
|
||||
0x018, 0x00000C07,
|
||||
0x05A, 0x0004BD00,
|
||||
0x019, 0x000739D0,
|
||||
0x034, 0x0000ADF3,
|
||||
0x034, 0x00009DF0,
|
||||
0x034, 0x00008DED,
|
||||
0x034, 0x00007DEA,
|
||||
0x034, 0x00006DE7,
|
||||
0x034, 0x000054EE,
|
||||
0x034, 0x000044EB,
|
||||
0x034, 0x000034E8,
|
||||
0x034, 0x0000246B,
|
||||
0x034, 0x00001468,
|
||||
0x034, 0x0000006D,
|
||||
0x000, 0x00030159,
|
||||
0x084, 0x00068200,
|
||||
0x086, 0x000000CE,
|
||||
0x087, 0x00048A00,
|
||||
0x08E, 0x00065540,
|
||||
0x08F, 0x00088000,
|
||||
0x0EF, 0x000020A0,
|
||||
0x03B, 0x000F02B0,
|
||||
0x03B, 0x000EF7B0,
|
||||
0x03B, 0x000D4FB0,
|
||||
0x03B, 0x000CF060,
|
||||
0x03B, 0x000B0090,
|
||||
0x03B, 0x000A0080,
|
||||
0x03B, 0x00090080,
|
||||
0x03B, 0x0008F780,
|
||||
0x03B, 0x000722B0,
|
||||
0x03B, 0x0006F7B0,
|
||||
0x03B, 0x00054FB0,
|
||||
0x03B, 0x0004F060,
|
||||
0x03B, 0x00030090,
|
||||
0x03B, 0x00020080,
|
||||
0x03B, 0x00010080,
|
||||
0x03B, 0x0000F780,
|
||||
0x0EF, 0x000000A0,
|
||||
0x000, 0x00010159,
|
||||
0x018, 0x0000F407,
|
||||
0xFFE, 0x00000000,
|
||||
0xFFE, 0x00000000,
|
||||
0x01F, 0x00080003,
|
||||
0xFFE, 0x00000000,
|
||||
0xFFE, 0x00000000,
|
||||
0x01E, 0x00000001,
|
||||
0x01F, 0x00080000,
|
||||
0x000, 0x00033E60,
|
||||
};
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_RadioA_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
|
||||
|
||||
u4Byte hex = 0;
|
||||
u4Byte i = 0;
|
||||
u2Byte count = 0;
|
||||
pu4Byte ptr_array = NULL;
|
||||
u1Byte platform = pDM_Odm->SupportPlatform;
|
||||
u1Byte interfaceValue = pDM_Odm->SupportInterface;
|
||||
u1Byte board = pDM_Odm->BoardType;
|
||||
u4Byte ArrayLen = sizeof(Array_RadioA_1T_8188E)/sizeof(u4Byte);
|
||||
pu4Byte Array = Array_RadioA_1T_8188E;
|
||||
BOOLEAN biol = FALSE;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
struct xmit_frame *pxmit_frame;
|
||||
u8 bndy_cnt = 1;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
struct cmd_cmp cmpdata[ArrayLen];
|
||||
u4Byte cmpdata_idx=0;
|
||||
#endif
|
||||
#endif//#ifdef CONFIG_IOL_IOREG_CFG
|
||||
HAL_STATUS rst =HAL_STATUS_SUCCESS;
|
||||
|
||||
hex += board;
|
||||
hex += interfaceValue << 8;
|
||||
hex += platform << 16;
|
||||
hex += 0xFF000000;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
biol = rtw_IOL_applied(Adapter);
|
||||
|
||||
if (biol){
|
||||
if ((pxmit_frame=rtw_IOL_accquire_xmit_frame(Adapter)) == NULL)
|
||||
{
|
||||
printk("rtw_IOL_accquire_xmit_frame failed\n");
|
||||
return HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif//#ifdef CONFIG_IOL_IOREG_CFG
|
||||
|
||||
for (i = 0; i < ArrayLen; i += 2 )
|
||||
{
|
||||
u4Byte v1 = Array[i];
|
||||
u4Byte v2 = Array[i+1];
|
||||
|
||||
// This (offset, data) pair meets the condition.
|
||||
if ( v1 < 0xCDCDCDCD )
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
|
||||
if (v1 == 0xffe)
|
||||
{
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfd){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xfc){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,1);
|
||||
}
|
||||
else if (v1 == 0xfb){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfa){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xf9){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,1);
|
||||
}
|
||||
else{
|
||||
rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A,(u2Byte)v1, v2,bRFRegOffsetMask) ;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{ // This line is the start line of branch.
|
||||
if ( !CheckCondition(Array[i], hex) )
|
||||
{ // Discard the following (offset, data) pairs.
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while (v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
i -= 2; // prevent from for-loop += 2
|
||||
}
|
||||
else // Configure matched pairs and skip to end of if-else.
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while (v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
|
||||
if (v1 == 0xffe)
|
||||
{
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfd){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xfc){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,1);
|
||||
}
|
||||
else if (v1 == 0xfb){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfa){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xf9){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,1);
|
||||
}
|
||||
else{
|
||||
rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A,(u2Byte)v1, v2,bRFRegOffsetMask) ;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
|
||||
}
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
while (v2 != 0xDEAD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
//printk("==> %s, pktlen = %d,bndy_cnt = %d\n",__func__,pxmit_frame->attrib.pktlen+4+32,bndy_cnt);
|
||||
if (rtw_IOL_exec_cmds_sync(pDM_Odm->Adapter, pxmit_frame, 1000, bndy_cnt))
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
printk("~~~ %s Success !!!\n",__func__);
|
||||
{
|
||||
u4Byte idx;
|
||||
u4Byte cdata;
|
||||
printk(" %s data compare => array_len:%d\n",__func__,cmpdata_idx);
|
||||
printk("### %s data compared !!###\n",__func__);
|
||||
for (idx=0;idx< cmpdata_idx;idx++)
|
||||
{
|
||||
cdata = ODM_GetRFReg(pDM_Odm, ODM_RF_PATH_A,cmpdata[idx].addr,bRFRegOffsetMask);
|
||||
if (cdata != cmpdata[idx].value){
|
||||
printk("addr:0x%04x, data:(0x%02x : 0x%02x)\n",
|
||||
cmpdata[idx].addr,cmpdata[idx].value,cdata);
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
printk("### %s data compared !!###\n",__func__);
|
||||
//if (rst == HAL_STATUS_FAILURE)
|
||||
{//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
|
||||
}
|
||||
else{
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
printk("~~~ IOL Config %s Failed !!!\n",__func__);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
{
|
||||
//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
return rst;
|
||||
}
|
||||
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
#include <rtw_iol.h>
|
||||
#endif
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
static BOOLEAN
|
||||
CheckCondition(
|
||||
const u4Byte Condition,
|
||||
const u4Byte Hex
|
||||
)
|
||||
{
|
||||
u4Byte _board = (Hex & 0x000000FF);
|
||||
u4Byte _interface = (Hex & 0x0000FF00) >> 8;
|
||||
u4Byte _platform = (Hex & 0x00FF0000) >> 16;
|
||||
u4Byte cond = Condition;
|
||||
|
||||
if ( Condition == 0xCDCDCDCD )
|
||||
return TRUE;
|
||||
|
||||
cond = Condition & 0x000000FF;
|
||||
if ( (_board == cond) && cond != 0x00)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x0000FF00;
|
||||
cond = cond >> 8;
|
||||
if ( (_interface & cond) == 0 && cond != 0x07)
|
||||
return FALSE;
|
||||
|
||||
cond = Condition & 0x00FF0000;
|
||||
cond = cond >> 16;
|
||||
if ( (_platform & cond) == 0 && cond != 0x0F)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* RadioA_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
u4Byte Array_RadioA_1T_8188E[] = {
|
||||
0x000, 0x00030000,
|
||||
0x008, 0x00084000,
|
||||
0x018, 0x00000407,
|
||||
0x019, 0x00000012,
|
||||
0x01E, 0x00080009,
|
||||
0x01F, 0x00000880,
|
||||
0x02F, 0x0001A060,
|
||||
0x03F, 0x00000000,
|
||||
0x042, 0x000060C0,
|
||||
0x057, 0x000D0000,
|
||||
0x058, 0x000BE180,
|
||||
0x067, 0x00001552,
|
||||
0x083, 0x00000000,
|
||||
0x0B0, 0x000FF8FC,
|
||||
0x0B1, 0x00054400,
|
||||
0x0B2, 0x000CCC19,
|
||||
0x0B4, 0x00043003,
|
||||
0x0B6, 0x0004953E,
|
||||
0x0B7, 0x0001C718,
|
||||
0x0B8, 0x000060FF,
|
||||
0x0B9, 0x00080001,
|
||||
0x0BA, 0x00040000,
|
||||
0x0BB, 0x00000400,
|
||||
0x0BF, 0x000C0000,
|
||||
0x0C2, 0x00002400,
|
||||
0x0C3, 0x00000009,
|
||||
0x0C4, 0x00040C91,
|
||||
0x0C5, 0x00099999,
|
||||
0x0C6, 0x000000A3,
|
||||
0x0C7, 0x00088820,
|
||||
0x0C8, 0x00076C06,
|
||||
0x0C9, 0x00000000,
|
||||
0x0CA, 0x00080000,
|
||||
0x0DF, 0x00000180,
|
||||
0x0EF, 0x000001A0,
|
||||
0x051, 0x0006B27D,
|
||||
0xFF0F041F, 0xABCD,
|
||||
0x052, 0x0007E4DD,
|
||||
0xCDCDCDCD, 0xCDCD,
|
||||
0x052, 0x0007E49D,
|
||||
0xFF0F041F, 0xDEAD,
|
||||
0x053, 0x00000073,
|
||||
0x056, 0x00051FF3,
|
||||
0x035, 0x00000086,
|
||||
0x035, 0x00000186,
|
||||
0x035, 0x00000286,
|
||||
0x036, 0x00001C25,
|
||||
0x036, 0x00009C25,
|
||||
0x036, 0x00011C25,
|
||||
0x036, 0x00019C25,
|
||||
0x0B6, 0x00048538,
|
||||
0x018, 0x00000C07,
|
||||
0x05A, 0x0004BD00,
|
||||
0x019, 0x000739D0,
|
||||
0x034, 0x0000ADF3,
|
||||
0x034, 0x00009DF0,
|
||||
0x034, 0x00008DED,
|
||||
0x034, 0x00007DEA,
|
||||
0x034, 0x00006DE7,
|
||||
0x034, 0x000054EE,
|
||||
0x034, 0x000044EB,
|
||||
0x034, 0x000034E8,
|
||||
0x034, 0x0000246B,
|
||||
0x034, 0x00001468,
|
||||
0x034, 0x0000006D,
|
||||
0x000, 0x00030159,
|
||||
0x084, 0x00068200,
|
||||
0x086, 0x000000CE,
|
||||
0x087, 0x00048A00,
|
||||
0x08E, 0x00065540,
|
||||
0x08F, 0x00088000,
|
||||
0x0EF, 0x000020A0,
|
||||
0x03B, 0x000F02B0,
|
||||
0x03B, 0x000EF7B0,
|
||||
0x03B, 0x000D4FB0,
|
||||
0x03B, 0x000CF060,
|
||||
0x03B, 0x000B0090,
|
||||
0x03B, 0x000A0080,
|
||||
0x03B, 0x00090080,
|
||||
0x03B, 0x0008F780,
|
||||
0x03B, 0x000722B0,
|
||||
0x03B, 0x0006F7B0,
|
||||
0x03B, 0x00054FB0,
|
||||
0x03B, 0x0004F060,
|
||||
0x03B, 0x00030090,
|
||||
0x03B, 0x00020080,
|
||||
0x03B, 0x00010080,
|
||||
0x03B, 0x0000F780,
|
||||
0x0EF, 0x000000A0,
|
||||
0x000, 0x00010159,
|
||||
0x018, 0x0000F407,
|
||||
0xFFE, 0x00000000,
|
||||
0xFFE, 0x00000000,
|
||||
0x01F, 0x00080003,
|
||||
0xFFE, 0x00000000,
|
||||
0xFFE, 0x00000000,
|
||||
0x01E, 0x00000001,
|
||||
0x01F, 0x00080000,
|
||||
0x000, 0x00033E60,
|
||||
};
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_RadioA_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
#define READ_NEXT_PAIR(v1, v2, i) do { i += 2; v1 = Array[i]; v2 = Array[i+1]; } while (0)
|
||||
|
||||
u4Byte hex = 0;
|
||||
u4Byte i = 0;
|
||||
u2Byte count = 0;
|
||||
pu4Byte ptr_array = NULL;
|
||||
u1Byte platform = pDM_Odm->SupportPlatform;
|
||||
u1Byte interfaceValue = pDM_Odm->SupportInterface;
|
||||
u1Byte board = pDM_Odm->BoardType;
|
||||
u4Byte ArrayLen = sizeof(Array_RadioA_1T_8188E)/sizeof(u4Byte);
|
||||
pu4Byte Array = Array_RadioA_1T_8188E;
|
||||
BOOLEAN biol = FALSE;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
struct xmit_frame *pxmit_frame;
|
||||
u8 bndy_cnt = 1;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
struct cmd_cmp cmpdata[ArrayLen];
|
||||
u4Byte cmpdata_idx=0;
|
||||
#endif
|
||||
#endif//#ifdef CONFIG_IOL_IOREG_CFG
|
||||
HAL_STATUS rst =HAL_STATUS_SUCCESS;
|
||||
|
||||
hex += board;
|
||||
hex += interfaceValue << 8;
|
||||
hex += platform << 16;
|
||||
hex += 0xFF000000;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
biol = rtw_IOL_applied(Adapter);
|
||||
|
||||
if (biol){
|
||||
if ((pxmit_frame=rtw_IOL_accquire_xmit_frame(Adapter)) == NULL)
|
||||
{
|
||||
printk("rtw_IOL_accquire_xmit_frame failed\n");
|
||||
return HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif//#ifdef CONFIG_IOL_IOREG_CFG
|
||||
|
||||
for (i = 0; i < ArrayLen; i += 2 )
|
||||
{
|
||||
u4Byte v1 = Array[i];
|
||||
u4Byte v2 = Array[i+1];
|
||||
|
||||
// This (offset, data) pair meets the condition.
|
||||
if ( v1 < 0xCDCDCDCD )
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
|
||||
if (v1 == 0xffe)
|
||||
{
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfd){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xfc){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,1);
|
||||
}
|
||||
else if (v1 == 0xfb){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfa){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xf9){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,1);
|
||||
}
|
||||
else{
|
||||
rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A,(u2Byte)v1, v2,bRFRegOffsetMask) ;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{ // This line is the start line of branch.
|
||||
if ( !CheckCondition(Array[i], hex) )
|
||||
{ // Discard the following (offset, data) pairs.
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while (v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
i -= 2; // prevent from for-loop += 2
|
||||
}
|
||||
else // Configure matched pairs and skip to end of if-else.
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
while (v2 != 0xDEAD &&
|
||||
v2 != 0xCDEF &&
|
||||
v2 != 0xCDCD && i < ArrayLen -2)
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
if (rtw_IOL_cmd_boundary_handle(pxmit_frame))
|
||||
bndy_cnt++;
|
||||
|
||||
if (v1 == 0xffe)
|
||||
{
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfd){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xfc){
|
||||
rtw_IOL_append_DELAY_MS_cmd(pxmit_frame,1);
|
||||
}
|
||||
else if (v1 == 0xfb){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,50);
|
||||
}
|
||||
else if (v1 == 0xfa){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,5);
|
||||
}
|
||||
else if (v1 == 0xf9){
|
||||
rtw_IOL_append_DELAY_US_cmd(pxmit_frame,1);
|
||||
}
|
||||
else{
|
||||
rtw_IOL_append_WRF_cmd(pxmit_frame, ODM_RF_PATH_A,(u2Byte)v1, v2,bRFRegOffsetMask) ;
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
cmpdata[cmpdata_idx].addr = v1;
|
||||
cmpdata[cmpdata_idx].value= v2;
|
||||
cmpdata_idx++;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
{
|
||||
odm_ConfigRF_RadioA_8188E(pDM_Odm, v1, v2);
|
||||
}
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
while (v2 != 0xDEAD && i < ArrayLen -2)
|
||||
{
|
||||
READ_NEXT_PAIR(v1, v2, i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_IOL_IOREG_CFG
|
||||
if (biol){
|
||||
//printk("==> %s, pktlen = %d,bndy_cnt = %d\n",__func__,pxmit_frame->attrib.pktlen+4+32,bndy_cnt);
|
||||
if (rtw_IOL_exec_cmds_sync(pDM_Odm->Adapter, pxmit_frame, 1000, bndy_cnt))
|
||||
{
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
printk("~~~ %s Success !!!\n",__func__);
|
||||
{
|
||||
u4Byte idx;
|
||||
u4Byte cdata;
|
||||
printk(" %s data compare => array_len:%d\n",__func__,cmpdata_idx);
|
||||
printk("### %s data compared !!###\n",__func__);
|
||||
for (idx=0;idx< cmpdata_idx;idx++)
|
||||
{
|
||||
cdata = ODM_GetRFReg(pDM_Odm, ODM_RF_PATH_A,cmpdata[idx].addr,bRFRegOffsetMask);
|
||||
if (cdata != cmpdata[idx].value){
|
||||
printk("addr:0x%04x, data:(0x%02x : 0x%02x)\n",
|
||||
cmpdata[idx].addr,cmpdata[idx].value,cdata);
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
printk("### %s data compared !!###\n",__func__);
|
||||
//if (rst == HAL_STATUS_FAILURE)
|
||||
{//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
|
||||
}
|
||||
else{
|
||||
rst = HAL_STATUS_FAILURE;
|
||||
printk("~~~ IOL Config %s Failed !!!\n",__func__);
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
{
|
||||
//dump data from TX packet buffer
|
||||
rtw_IOL_cmd_tx_pkt_buf_dump(pDM_Odm->Adapter,pxmit_frame->attrib.pktlen+32);
|
||||
}
|
||||
#endif //CONFIG_IOL_IOREG_CFG_DBG
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif //#ifdef CONFIG_IOL_IOREG_CFG
|
||||
return rst;
|
||||
}
|
||||
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
609
hal/HalPhyRf.c
609
hal/HalPhyRf.c
File diff suppressed because it is too large
Load diff
6774
hal/HalPhyRf_8188e.c
6774
hal/HalPhyRf_8188e.c
File diff suppressed because it is too large
Load diff
|
@ -1,187 +1,185 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
/*++
|
||||
Copyright (c) Realtek Semiconductor Corp. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
HalPwrSeqCmd.c
|
||||
|
||||
Abstract:
|
||||
Implement HW Power sequence configuration CMD handling routine for Realtek devices.
|
||||
|
||||
Major Change History:
|
||||
When Who What
|
||||
---------- --------------- -------------------------------
|
||||
2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
|
||||
2011-07-07 Roger Create.
|
||||
|
||||
--*/
|
||||
#include <HalPwrSeqCmd.h>
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <sdio_ops.h>
|
||||
#elif defined(CONFIG_GSPI_HCI)
|
||||
#include <gspi_ops.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Description:
|
||||
// This routine deal with the Power Configuration CMDs parsing for RTL8723/RTL8188E Series IC.
|
||||
//
|
||||
// Assumption:
|
||||
// We should follow specific format which was released from HW SD.
|
||||
//
|
||||
// 2011.07.07, added by Roger.
|
||||
//
|
||||
u8 HalPwrSeqCmdParsing(
|
||||
PADAPTER padapter,
|
||||
u8 CutVersion,
|
||||
u8 FabVersion,
|
||||
u8 InterfaceType,
|
||||
WLAN_PWR_CFG PwrSeqCmd[])
|
||||
{
|
||||
WLAN_PWR_CFG PwrCfgCmd = {0};
|
||||
u8 bPollingBit = _FALSE;
|
||||
u32 AryIdx = 0;
|
||||
u8 value = 0;
|
||||
u32 offset = 0;
|
||||
u32 pollingCount = 0; // polling autoload done.
|
||||
u32 maxPollingCnt = 5000;
|
||||
|
||||
do {
|
||||
PwrCfgCmd = PwrSeqCmd[AryIdx];
|
||||
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_,
|
||||
("HalPwrSeqCmdParsing: offset(%#x) cut_msk(%#x) fab_msk(%#x) interface_msk(%#x) base(%#x) cmd(%#x) msk(%#x) value(%#x)\n",
|
||||
GET_PWR_CFG_OFFSET(PwrCfgCmd),
|
||||
GET_PWR_CFG_CUT_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_FAB_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_INTF_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_BASE(PwrCfgCmd),
|
||||
GET_PWR_CFG_CMD(PwrCfgCmd),
|
||||
GET_PWR_CFG_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_VALUE(PwrCfgCmd)));
|
||||
|
||||
//2 Only Handle the command whose FAB, CUT, and Interface are matched
|
||||
if ((GET_PWR_CFG_FAB_MASK(PwrCfgCmd) & FabVersion) &&
|
||||
(GET_PWR_CFG_CUT_MASK(PwrCfgCmd) & CutVersion) &&
|
||||
(GET_PWR_CFG_INTF_MASK(PwrCfgCmd) & InterfaceType))
|
||||
{
|
||||
switch (GET_PWR_CFG_CMD(PwrCfgCmd))
|
||||
{
|
||||
case PWR_CMD_READ:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_READ\n"));
|
||||
break;
|
||||
|
||||
case PWR_CMD_WRITE:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_WRITE\n"));
|
||||
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
//
|
||||
// <Roger_Notes> We should deal with interface specific address mapping for some interfaces, e.g., SDIO interface
|
||||
// 2011.07.07.
|
||||
//
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
{
|
||||
// Read Back SDIO Local value
|
||||
value = SdioLocalCmd52Read1Byte(padapter, offset);
|
||||
|
||||
value &= ~(GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
value |= (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
|
||||
// Write Back SDIO Local value
|
||||
SdioLocalCmd52Write1Byte(padapter, offset, value);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
offset = SPI_LOCAL_OFFSET | offset;
|
||||
#endif
|
||||
// Read the value from system register
|
||||
value = rtw_read8(padapter, offset);
|
||||
|
||||
value &= ~(GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
value |= (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
|
||||
// Write the value back to sytem register
|
||||
rtw_write8(padapter, offset, value);
|
||||
}
|
||||
break;
|
||||
|
||||
case PWR_CMD_POLLING:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_POLLING\n"));
|
||||
|
||||
bPollingBit = _FALSE;
|
||||
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
offset = SPI_LOCAL_OFFSET | offset;
|
||||
#endif
|
||||
do {
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
value = SdioLocalCmd52Read1Byte(padapter, offset);
|
||||
else
|
||||
#endif
|
||||
value = rtw_read8(padapter, offset);
|
||||
|
||||
value &= GET_PWR_CFG_MASK(PwrCfgCmd);
|
||||
if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd)))
|
||||
bPollingBit = _TRUE;
|
||||
else
|
||||
rtw_udelay_os(10);
|
||||
|
||||
if (pollingCount++ > maxPollingCnt) {
|
||||
DBG_871X("Fail to polling Offset[%#x]\n", offset);
|
||||
return _FALSE;
|
||||
}
|
||||
} while (!bPollingBit);
|
||||
|
||||
break;
|
||||
|
||||
case PWR_CMD_DELAY:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_DELAY\n"));
|
||||
if (GET_PWR_CFG_VALUE(PwrCfgCmd) == PWRSEQ_DELAY_US)
|
||||
rtw_udelay_os(GET_PWR_CFG_OFFSET(PwrCfgCmd));
|
||||
else
|
||||
rtw_udelay_os(GET_PWR_CFG_OFFSET(PwrCfgCmd)*1000);
|
||||
break;
|
||||
|
||||
case PWR_CMD_END:
|
||||
// When this command is parsed, end the process
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_END\n"));
|
||||
return _TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_err_, ("HalPwrSeqCmdParsing: Unknown CMD!!\n"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AryIdx++;//Add Array Index
|
||||
}while (1);
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
/*++
|
||||
Copyright (c) Realtek Semiconductor Corp. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
HalPwrSeqCmd.c
|
||||
|
||||
Abstract:
|
||||
Implement HW Power sequence configuration CMD handling routine for Realtek devices.
|
||||
|
||||
Major Change History:
|
||||
When Who What
|
||||
---------- --------------- -------------------------------
|
||||
2011-10-26 Lucas Modify to be compatible with SD4-CE driver.
|
||||
2011-07-07 Roger Create.
|
||||
|
||||
--*/
|
||||
#include <HalPwrSeqCmd.h>
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include <sdio_ops.h>
|
||||
#elif defined(CONFIG_GSPI_HCI)
|
||||
#include <gspi_ops.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Description:
|
||||
// This routine deal with the Power Configuration CMDs parsing for RTL8723/RTL8188E Series IC.
|
||||
//
|
||||
// Assumption:
|
||||
// We should follow specific format which was released from HW SD.
|
||||
//
|
||||
// 2011.07.07, added by Roger.
|
||||
//
|
||||
u8 HalPwrSeqCmdParsing(
|
||||
PADAPTER padapter,
|
||||
u8 CutVersion,
|
||||
u8 FabVersion,
|
||||
u8 InterfaceType,
|
||||
WLAN_PWR_CFG PwrSeqCmd[])
|
||||
{
|
||||
WLAN_PWR_CFG PwrCfgCmd = {0};
|
||||
u8 bPollingBit = _FALSE;
|
||||
u32 AryIdx = 0;
|
||||
u8 value = 0;
|
||||
u32 offset = 0;
|
||||
u32 pollingCount = 0; // polling autoload done.
|
||||
u32 maxPollingCnt = 5000;
|
||||
|
||||
do {
|
||||
PwrCfgCmd = PwrSeqCmd[AryIdx];
|
||||
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_,
|
||||
("HalPwrSeqCmdParsing: offset(%#x) cut_msk(%#x) fab_msk(%#x) interface_msk(%#x) base(%#x) cmd(%#x) msk(%#x) value(%#x)\n",
|
||||
GET_PWR_CFG_OFFSET(PwrCfgCmd),
|
||||
GET_PWR_CFG_CUT_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_FAB_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_INTF_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_BASE(PwrCfgCmd),
|
||||
GET_PWR_CFG_CMD(PwrCfgCmd),
|
||||
GET_PWR_CFG_MASK(PwrCfgCmd),
|
||||
GET_PWR_CFG_VALUE(PwrCfgCmd)));
|
||||
|
||||
//2 Only Handle the command whose FAB, CUT, and Interface are matched
|
||||
if ((GET_PWR_CFG_FAB_MASK(PwrCfgCmd) & FabVersion) &&
|
||||
(GET_PWR_CFG_CUT_MASK(PwrCfgCmd) & CutVersion) &&
|
||||
(GET_PWR_CFG_INTF_MASK(PwrCfgCmd) & InterfaceType))
|
||||
{
|
||||
switch (GET_PWR_CFG_CMD(PwrCfgCmd))
|
||||
{
|
||||
case PWR_CMD_READ:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_READ\n"));
|
||||
break;
|
||||
|
||||
case PWR_CMD_WRITE:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_WRITE\n"));
|
||||
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
//
|
||||
// <Roger_Notes> We should deal with interface specific address mapping for some interfaces, e.g., SDIO interface
|
||||
// 2011.07.07.
|
||||
//
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
{
|
||||
// Read Back SDIO Local value
|
||||
value = SdioLocalCmd52Read1Byte(padapter, offset);
|
||||
|
||||
value &= ~(GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
value |= (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
|
||||
// Write Back SDIO Local value
|
||||
SdioLocalCmd52Write1Byte(padapter, offset, value);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
offset = SPI_LOCAL_OFFSET | offset;
|
||||
#endif
|
||||
// Read the value from system register
|
||||
value = rtw_read8(padapter, offset);
|
||||
|
||||
value &= ~(GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
value |= (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd));
|
||||
|
||||
// Write the value back to sytem register
|
||||
rtw_write8(padapter, offset, value);
|
||||
}
|
||||
break;
|
||||
|
||||
case PWR_CMD_POLLING:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_POLLING\n"));
|
||||
|
||||
bPollingBit = _FALSE;
|
||||
offset = GET_PWR_CFG_OFFSET(PwrCfgCmd);
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
offset = SPI_LOCAL_OFFSET | offset;
|
||||
#endif
|
||||
do {
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
if (GET_PWR_CFG_BASE(PwrCfgCmd) == PWR_BASEADDR_SDIO)
|
||||
value = SdioLocalCmd52Read1Byte(padapter, offset);
|
||||
else
|
||||
#endif
|
||||
value = rtw_read8(padapter, offset);
|
||||
|
||||
value &= GET_PWR_CFG_MASK(PwrCfgCmd);
|
||||
if (value == (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd)))
|
||||
bPollingBit = _TRUE;
|
||||
else
|
||||
rtw_udelay_os(10);
|
||||
|
||||
if (pollingCount++ > maxPollingCnt) {
|
||||
DBG_871X("Fail to polling Offset[%#x]\n", offset);
|
||||
return _FALSE;
|
||||
}
|
||||
} while (!bPollingBit);
|
||||
|
||||
break;
|
||||
|
||||
case PWR_CMD_DELAY:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_DELAY\n"));
|
||||
if (GET_PWR_CFG_VALUE(PwrCfgCmd) == PWRSEQ_DELAY_US)
|
||||
rtw_udelay_os(GET_PWR_CFG_OFFSET(PwrCfgCmd));
|
||||
else
|
||||
rtw_udelay_os(GET_PWR_CFG_OFFSET(PwrCfgCmd)*1000);
|
||||
break;
|
||||
|
||||
case PWR_CMD_END:
|
||||
// When this command is parsed, end the process
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_END\n"));
|
||||
return _TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
RT_TRACE(_module_hal_init_c_ , _drv_err_, ("HalPwrSeqCmdParsing: Unknown CMD!!\n"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AryIdx++;//Add Array Index
|
||||
}while (1);
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -114,7 +114,7 @@ hal_com_get_channel_plan(
|
|||
u8 MRateToHwRate(u8 rate)
|
||||
{
|
||||
u8 ret = DESC_RATE1M;
|
||||
|
||||
|
||||
switch (rate)
|
||||
{
|
||||
// CCK and OFDM non-HT rates
|
||||
|
@ -158,9 +158,9 @@ void HalSetBrateCfg(
|
|||
{
|
||||
is_brate = mBratesOS[i] & IEEE80211_BASIC_RATE_MASK;
|
||||
brate = mBratesOS[i] & 0x7f;
|
||||
|
||||
|
||||
if ( is_brate )
|
||||
{
|
||||
{
|
||||
switch (brate)
|
||||
{
|
||||
case IEEE80211_CCK_RATE_1MB: *pBrateCfg |= RATE_1M; break;
|
||||
|
@ -191,7 +191,7 @@ _OneOutPipeMapping(
|
|||
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];//VI
|
||||
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[0];//BE
|
||||
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[0];//BK
|
||||
|
||||
|
||||
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];//BCN
|
||||
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];//MGT
|
||||
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];//HIGH
|
||||
|
@ -201,89 +201,89 @@ _OneOutPipeMapping(
|
|||
static VOID
|
||||
_TwoOutPipeMapping(
|
||||
IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bWIFICfg
|
||||
IN BOOLEAN bWIFICfg
|
||||
)
|
||||
{
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter);
|
||||
|
||||
if (bWIFICfg){ //WMM
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 0, 1, 0, 1, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:L
|
||||
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 0, 1, 0, 1, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:L
|
||||
|
||||
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[1];//VO
|
||||
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];//VI
|
||||
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[1];//BE
|
||||
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[0];//BK
|
||||
|
||||
|
||||
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];//BCN
|
||||
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];//MGT
|
||||
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];//HIGH
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
|
||||
|
||||
}
|
||||
else{//typical setting
|
||||
|
||||
|
||||
//BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 1, 1, 0, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:L
|
||||
|
||||
|
||||
//BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 1, 1, 0, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:L
|
||||
|
||||
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];//VO
|
||||
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];//VI
|
||||
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[1];//BE
|
||||
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[1];//BK
|
||||
|
||||
|
||||
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];//BCN
|
||||
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];//MGT
|
||||
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];//HIGH
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static VOID _ThreeOutPipeMapping(
|
||||
IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bWIFICfg
|
||||
IN BOOLEAN bWIFICfg
|
||||
)
|
||||
{
|
||||
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(pAdapter);
|
||||
|
||||
if (bWIFICfg){//for WMM
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 1, 2, 1, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:N, 2:L
|
||||
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 1, 2, 1, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:N, 2:L
|
||||
|
||||
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];//VO
|
||||
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[1];//VI
|
||||
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[2];//BE
|
||||
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[1];//BK
|
||||
|
||||
|
||||
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];//BCN
|
||||
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];//MGT
|
||||
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];//HIGH
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
|
||||
|
||||
}
|
||||
else{//typical setting
|
||||
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 2, 2, 1, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:N, 2:L
|
||||
|
||||
|
||||
// BK, BE, VI, VO, BCN, CMD,MGT,HIGH,HCCA
|
||||
//{ 2, 2, 1, 0, 0, 0, 0, 0, 0 };
|
||||
//0:H, 1:N, 2:L
|
||||
|
||||
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];//VO
|
||||
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[1];//VI
|
||||
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[2];//BE
|
||||
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[2];//BK
|
||||
|
||||
|
||||
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];//BCN
|
||||
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];//MGT
|
||||
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];//HIGH
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];//TXCMD
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ Hal_MappingOutPipe(
|
|||
struct registry_priv *pregistrypriv = &pAdapter->registrypriv;
|
||||
|
||||
BOOLEAN bWIFICfg = (pregistrypriv->wifi_spec) ?_TRUE:_FALSE;
|
||||
|
||||
|
||||
BOOLEAN result = _TRUE;
|
||||
|
||||
switch (NumOutPipe)
|
||||
|
@ -317,7 +317,7 @@ Hal_MappingOutPipe(
|
|||
}
|
||||
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void hal_init_macaddr(_adapter *adapter)
|
||||
|
@ -329,10 +329,10 @@ void hal_init_macaddr(_adapter *adapter)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* C2H event format:
|
||||
* Field TRIGGER CONTENT CMD_SEQ CMD_LEN CMD_ID
|
||||
* BITS [127:120] [119:16] [15:8] [7:4] [3:0]
|
||||
* Field TRIGGER CONTENT CMD_SEQ CMD_LEN CMD_ID
|
||||
* BITS [127:120] [119:16] [15:8] [7:4] [3:0]
|
||||
*/
|
||||
|
||||
void c2h_evt_clear(_adapter *adapter)
|
||||
|
@ -363,7 +363,7 @@ s32 c2h_evt_read(_adapter *adapter, u8 *buf)
|
|||
_rtw_memset(c2h_evt, 0, 16);
|
||||
|
||||
*buf = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
|
||||
*(buf+1) = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
|
||||
*(buf+1) = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
|
||||
|
||||
RT_PRINT_DATA(_module_hal_init_c_, _drv_info_, "c2h_evt_read(): ",
|
||||
&c2h_evt , sizeof(c2h_evt));
|
||||
|
@ -383,7 +383,7 @@ s32 c2h_evt_read(_adapter *adapter, u8 *buf)
|
|||
ret = _SUCCESS;
|
||||
|
||||
clear_evt:
|
||||
/*
|
||||
/*
|
||||
* Clear event to notify FW we have read the command.
|
||||
* If this field isn't clear, the FW won't update the next command message.
|
||||
*/
|
||||
|
@ -391,4 +391,3 @@ clear_evt:
|
|||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
101
hal/hal_intf.c
101
hal/hal_intf.c
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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.
|
||||
|
@ -70,7 +70,7 @@ void rtw_hal_dm_deinit(_adapter *padapter)
|
|||
{
|
||||
// cancel dm timer
|
||||
if (padapter->HalFunc.dm_deinit)
|
||||
padapter->HalFunc.dm_deinit(padapter);
|
||||
padapter->HalFunc.dm_deinit(padapter);
|
||||
}
|
||||
void rtw_hal_sw_led_init(_adapter *padapter)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ u32 rtw_hal_power_on(_adapter *padapter)
|
|||
}
|
||||
|
||||
|
||||
uint rtw_hal_init(_adapter *padapter)
|
||||
uint rtw_hal_init(_adapter *padapter)
|
||||
{
|
||||
uint status = _SUCCESS;
|
||||
|
||||
|
@ -113,12 +113,12 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
}
|
||||
else
|
||||
{
|
||||
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
|
||||
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
|
||||
if (status == _SUCCESS){
|
||||
padapter->pbuddy_adapter->hw_init_completed = _TRUE;
|
||||
}
|
||||
else{
|
||||
padapter->pbuddy_adapter->hw_init_completed = _FALSE;
|
||||
padapter->pbuddy_adapter->hw_init_completed = _FALSE;
|
||||
RT_TRACE(_module_hal_init_c_,_drv_err_,("rtw_hal_init: hal__init fail(pbuddy_adapter)\n"));
|
||||
DBG_871X("rtw_hal_init: hal__init fail(pbuddy_adapter)\n");
|
||||
return status;
|
||||
|
@ -133,14 +133,14 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
|
||||
if (status == _SUCCESS){
|
||||
padapter->hw_init_completed = _TRUE;
|
||||
|
||||
|
||||
if (padapter->registrypriv.notch_filter == 1)
|
||||
rtw_hal_notch_filter(padapter, 1);
|
||||
|
||||
rtw_hal_reset_security_engine(padapter);
|
||||
}
|
||||
else{
|
||||
padapter->hw_init_completed = _FALSE;
|
||||
padapter->hw_init_completed = _FALSE;
|
||||
DBG_871X("rtw_hal_init: hal__init fail\n");
|
||||
}
|
||||
|
||||
|
@ -148,12 +148,12 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
|
||||
return status;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
uint rtw_hal_deinit(_adapter *padapter)
|
||||
{
|
||||
uint status = _SUCCESS;
|
||||
|
||||
|
||||
_func_enter_;
|
||||
|
||||
status = padapter->HalFunc.hal_deinit(padapter);
|
||||
|
@ -165,9 +165,9 @@ _func_enter_;
|
|||
{
|
||||
DBG_871X("\n rtw_hal_deinit: hal_init fail\n");
|
||||
}
|
||||
|
||||
|
||||
_func_exit_;
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -184,17 +184,17 @@ void rtw_hal_get_hwreg(_adapter *padapter, u8 variable, u8 *val)
|
|||
}
|
||||
|
||||
u8 rtw_hal_set_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, PVOID pValue)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.SetHalDefVarHandler)
|
||||
return padapter->HalFunc.SetHalDefVarHandler(padapter,eVariable,pValue);
|
||||
return _FAIL;
|
||||
}
|
||||
u8 rtw_hal_get_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, PVOID pValue)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.GetHalDefVarHandler)
|
||||
return padapter->HalFunc.GetHalDefVarHandler(padapter,eVariable,pValue);
|
||||
return _FAIL;
|
||||
}
|
||||
return _FAIL;
|
||||
}
|
||||
|
||||
void rtw_hal_set_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, PVOID pValue1,BOOLEAN bSet)
|
||||
{
|
||||
|
@ -211,43 +211,43 @@ void rtw_hal_enable_interrupt(_adapter *padapter)
|
|||
{
|
||||
if (padapter->HalFunc.enable_interrupt)
|
||||
padapter->HalFunc.enable_interrupt(padapter);
|
||||
else
|
||||
else
|
||||
DBG_871X("%s: HalFunc.enable_interrupt is NULL!\n", __func__);
|
||||
|
||||
|
||||
}
|
||||
void rtw_hal_disable_interrupt(_adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.disable_interrupt)
|
||||
padapter->HalFunc.disable_interrupt(padapter);
|
||||
else
|
||||
else
|
||||
DBG_871X("%s: HalFunc.disable_interrupt is NULL!\n", __func__);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
u32 rtw_hal_inirp_init(_adapter *padapter)
|
||||
{
|
||||
u32 rst = _FAIL;
|
||||
if (padapter->HalFunc.inirp_init)
|
||||
rst = padapter->HalFunc.inirp_init(padapter);
|
||||
else
|
||||
DBG_871X(" %s HalFunc.inirp_init is NULL!!!\n",__func__);
|
||||
if (padapter->HalFunc.inirp_init)
|
||||
rst = padapter->HalFunc.inirp_init(padapter);
|
||||
else
|
||||
DBG_871X(" %s HalFunc.inirp_init is NULL!!!\n",__func__);
|
||||
return rst;
|
||||
}
|
||||
|
||||
|
||||
u32 rtw_hal_inirp_deinit(_adapter *padapter)
|
||||
{
|
||||
|
||||
|
||||
if (padapter->HalFunc.inirp_deinit)
|
||||
return padapter->HalFunc.inirp_deinit(padapter);
|
||||
|
||||
return _FAIL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
u8 rtw_hal_intf_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id, u8* val)
|
||||
{
|
||||
if (padapter->HalFunc.interface_ps_func)
|
||||
{
|
||||
if (padapter->HalFunc.interface_ps_func)
|
||||
return padapter->HalFunc.interface_ps_func(padapter,efunc_id,val);
|
||||
return _FAIL;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ s32 rtw_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
if (padapter->HalFunc.hal_xmit)
|
||||
return padapter->HalFunc.hal_xmit(padapter, pxmitframe);
|
||||
|
||||
return _FALSE;
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
||||
|
@ -269,7 +269,7 @@ s32 rtw_hal_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe)
|
|||
}
|
||||
|
||||
s32 rtw_hal_init_xmit_priv(_adapter *padapter)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.init_xmit_priv != NULL)
|
||||
return padapter->HalFunc.init_xmit_priv(padapter);
|
||||
return _FAIL;
|
||||
|
@ -281,14 +281,14 @@ void rtw_hal_free_xmit_priv(_adapter *padapter)
|
|||
}
|
||||
|
||||
s32 rtw_hal_init_recv_priv(_adapter *padapter)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.init_recv_priv)
|
||||
return padapter->HalFunc.init_recv_priv(padapter);
|
||||
|
||||
return _FAIL;
|
||||
}
|
||||
void rtw_hal_free_recv_priv(_adapter *padapter)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.free_recv_priv)
|
||||
padapter->HalFunc.free_recv_priv(padapter);
|
||||
}
|
||||
|
@ -300,19 +300,19 @@ void rtw_hal_update_ra_mask(_adapter *padapter, u32 mac_id, u8 rssi_level)
|
|||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE)
|
||||
{
|
||||
struct sta_info *psta = NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
#ifdef CONFIG_NATIVEAP_MLME
|
||||
if ((mac_id-1)>0)
|
||||
psta = pstapriv->sta_aid[(mac_id-1) - 1];
|
||||
psta = pstapriv->sta_aid[(mac_id-1) - 1];
|
||||
#endif
|
||||
if (psta)
|
||||
add_RATid(padapter, psta, 0);//todo: based on rssi_level
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.UpdateRAMaskHandler)
|
||||
padapter->HalFunc.UpdateRAMaskHandler(padapter,mac_id,rssi_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void rtw_hal_add_ra_tid(_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level)
|
||||
|
@ -320,7 +320,7 @@ void rtw_hal_add_ra_tid(_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level)
|
|||
if (padapter->HalFunc.Add_RateATid)
|
||||
padapter->HalFunc.Add_RateATid(padapter, bitmap, arg, rssi_level);
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void rtw_hal_clone_data(_adapter *dst_padapter, _adapter *src_padapter)
|
||||
{
|
||||
if (dst_padapter->HalFunc.clone_haldata)
|
||||
|
@ -363,7 +363,7 @@ u32 rtw_hal_read_rfreg(_adapter *padapter, u32 eRFPath, u32 RegAddr, u32 BitMask
|
|||
void rtw_hal_write_rfreg(_adapter *padapter, u32 eRFPath, u32 RegAddr, u32 BitMask, u32 Data)
|
||||
{
|
||||
if (padapter->HalFunc.write_rfreg)
|
||||
padapter->HalFunc.write_rfreg(padapter, eRFPath, RegAddr, BitMask, Data);
|
||||
padapter->HalFunc.write_rfreg(padapter, eRFPath, RegAddr, BitMask, Data);
|
||||
}
|
||||
|
||||
s32 rtw_hal_interrupt_handler(_adapter *padapter)
|
||||
|
@ -390,7 +390,7 @@ void rtw_hal_dm_watchdog(_adapter *padapter)
|
|||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
#endif
|
||||
if (padapter->HalFunc.hal_dm_watchdog)
|
||||
padapter->HalFunc.hal_dm_watchdog(padapter);
|
||||
}
|
||||
|
@ -398,16 +398,16 @@ void rtw_hal_dm_watchdog(_adapter *padapter)
|
|||
void rtw_hal_bcn_related_reg_setting(_adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.SetBeaconRelatedRegistersHandler)
|
||||
padapter->HalFunc.SetBeaconRelatedRegistersHandler(padapter);
|
||||
padapter->HalFunc.SetBeaconRelatedRegistersHandler(padapter);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
u8 rtw_hal_antdiv_before_linked(_adapter *padapter)
|
||||
{
|
||||
{
|
||||
if (padapter->HalFunc.AntDivBeforeLinkHandler)
|
||||
return padapter->HalFunc.AntDivBeforeLinkHandler(padapter);
|
||||
return _FALSE;
|
||||
return _FALSE;
|
||||
}
|
||||
void rtw_hal_antdiv_rssi_compared(_adapter *padapter, WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src)
|
||||
{
|
||||
|
@ -429,12 +429,12 @@ s32 rtw_hal_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
void rtw_hal_sreset_init(_adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.sreset_init_value)
|
||||
padapter->HalFunc.sreset_init_value(padapter);
|
||||
padapter->HalFunc.sreset_init_value(padapter);
|
||||
}
|
||||
void rtw_hal_sreset_reset(_adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.silentreset)
|
||||
padapter->HalFunc.silentreset(padapter);
|
||||
padapter->HalFunc.silentreset(padapter);
|
||||
}
|
||||
|
||||
void rtw_hal_sreset_reset_value(_adapter *padapter)
|
||||
|
@ -450,18 +450,18 @@ void rtw_hal_sreset_xmit_status_check(_adapter *padapter)
|
|||
return;
|
||||
#endif
|
||||
if (padapter->HalFunc.sreset_xmit_status_check)
|
||||
padapter->HalFunc.sreset_xmit_status_check(padapter);
|
||||
padapter->HalFunc.sreset_xmit_status_check(padapter);
|
||||
}
|
||||
void rtw_hal_sreset_linked_status_check(_adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.sreset_linked_status_check)
|
||||
padapter->HalFunc.sreset_linked_status_check(padapter);
|
||||
padapter->HalFunc.sreset_linked_status_check(padapter);
|
||||
}
|
||||
u8 rtw_hal_sreset_get_wifi_status(_adapter *padapter)
|
||||
{
|
||||
u8 status = 0;
|
||||
if (padapter->HalFunc.sreset_get_wifi_status)
|
||||
status = padapter->HalFunc.sreset_get_wifi_status(padapter);
|
||||
if (padapter->HalFunc.sreset_get_wifi_status)
|
||||
status = padapter->HalFunc.sreset_get_wifi_status(padapter);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -488,7 +488,7 @@ s32 rtw_hal_xmit_thread_handler(_adapter *padapter)
|
|||
void rtw_hal_notch_filter(_adapter *adapter, bool enable)
|
||||
{
|
||||
if (adapter->HalFunc.hal_notch_filter)
|
||||
adapter->HalFunc.hal_notch_filter(adapter,enable);
|
||||
adapter->HalFunc.hal_notch_filter(adapter,enable);
|
||||
}
|
||||
|
||||
void rtw_hal_reset_security_engine(_adapter * adapter)
|
||||
|
@ -509,4 +509,3 @@ c2h_id_filter rtw_hal_c2h_id_filter_ccx(_adapter *adapter)
|
|||
{
|
||||
return adapter->HalFunc.c2h_id_filter_ccx;
|
||||
}
|
||||
|
||||
|
|
2313
hal/odm_HWConfig.c
2313
hal/odm_HWConfig.c
File diff suppressed because it is too large
Load diff
2457
hal/odm_RTL8188E.c
2457
hal/odm_RTL8188E.c
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -20,22 +20,22 @@
|
|||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
|
||||
void
|
||||
odm_ConfigRFReg_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data,
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data,
|
||||
IN ODM_RF_RADIO_PATH_E RF_PATH,
|
||||
IN u4Byte RegAddr
|
||||
)
|
||||
{
|
||||
if (Addr == 0xffe)
|
||||
{
|
||||
{
|
||||
#ifdef CONFIG_LONG_DELAY_ISSUE
|
||||
ODM_sleep_ms(50);
|
||||
#else
|
||||
#else
|
||||
ODM_delay_ms(50);
|
||||
#endif
|
||||
}
|
||||
|
@ -64,15 +64,15 @@ odm_ConfigRFReg_8188E(
|
|||
ODM_SetRFReg(pDM_Odm, RF_PATH, RegAddr, bRFRegOffsetMask, Data);
|
||||
// Add 1us delay between BB/RF register setting.
|
||||
ODM_delay_us(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
odm_ConfigRF_RadioA_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data
|
||||
)
|
||||
{
|
||||
u4Byte content = 0x1000; // RF_Content: radioa_txt
|
||||
|
@ -83,60 +83,60 @@ odm_ConfigRF_RadioA_8188E(
|
|||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigRFWithHeaderFile: [RadioA] %08X %08X\n", Addr, Data));
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
odm_ConfigRF_RadioB_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Data
|
||||
)
|
||||
{
|
||||
u4Byte content = 0x1001; // RF_Content: radiob_txt
|
||||
u4Byte maskforPhySet= (u4Byte)(content&0xE000);
|
||||
|
||||
odm_ConfigRFReg_8188E(pDM_Odm, Addr, Data, ODM_RF_PATH_B, Addr|maskforPhySet);
|
||||
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigRFWithHeaderFile: [RadioB] %08X %08X\n", Addr, Data));
|
||||
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
odm_ConfigMAC_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u1Byte Data
|
||||
)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u1Byte Data
|
||||
)
|
||||
{
|
||||
ODM_Write1Byte(pDM_Odm, Addr, Data);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigMACWithHeaderFile: [MAC_REG] %08X %08X\n", Addr, Data));
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
odm_ConfigBB_AGC_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
)
|
||||
{
|
||||
ODM_SetBBReg(pDM_Odm, Addr, Bitmask, Data);
|
||||
ODM_SetBBReg(pDM_Odm, Addr, Bitmask, Data);
|
||||
// Add 1us delay between BB/RF register setting.
|
||||
ODM_delay_us(1);
|
||||
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigBBWithHeaderFile: [AGC_TAB] %08X %08X\n", Addr, Data));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
odm_ConfigBB_PHY_REG_PG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
)
|
||||
{
|
||||
{
|
||||
if (Addr == 0xfe){
|
||||
#ifdef CONFIG_LONG_DELAY_ISSUE
|
||||
ODM_sleep_ms(50);
|
||||
#else
|
||||
#else
|
||||
ODM_delay_ms(50);
|
||||
#endif
|
||||
}
|
||||
|
@ -165,18 +165,18 @@ odm_ConfigBB_PHY_REG_PG_8188E(
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
odm_ConfigBB_PHY_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u4Byte Addr,
|
||||
IN u4Byte Bitmask,
|
||||
IN u4Byte Data
|
||||
)
|
||||
{
|
||||
{
|
||||
if (Addr == 0xfe){
|
||||
#ifdef CONFIG_LONG_DELAY_ISSUE
|
||||
ODM_sleep_ms(50);
|
||||
#else
|
||||
#else
|
||||
ODM_delay_ms(50);
|
||||
#endif
|
||||
}
|
||||
|
@ -197,13 +197,12 @@ odm_ConfigBB_PHY_8188E(
|
|||
}
|
||||
else{
|
||||
if (Addr == 0xa24)
|
||||
pDM_Odm->RFCalibrateInfo.RegA24 = Data;
|
||||
ODM_SetBBReg(pDM_Odm, Addr, Bitmask, Data);
|
||||
|
||||
pDM_Odm->RFCalibrateInfo.RegA24 = Data;
|
||||
ODM_SetBBReg(pDM_Odm, Addr, Bitmask, Data);
|
||||
|
||||
// Add 1us delay between BB/RF register setting.
|
||||
ODM_delay_us(1);
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigBBWithHeaderFile: [PHY_REG] %08X %08X\n", Addr, Data));
|
||||
ODM_RT_TRACE(pDM_Odm,ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigBBWithHeaderFile: [PHY_REG] %08X %08X\n", Addr, Data));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
//============================================================
|
||||
// include files
|
||||
//============================================================
|
||||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
VOID
|
||||
ODM_InitDebugSetting(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
pDM_Odm->DebugLevel = ODM_DBG_TRACE;
|
||||
|
||||
pDM_Odm->DebugComponents =
|
||||
\
|
||||
0;
|
||||
}
|
||||
|
||||
u32 GlobalDebugLevel;
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
//============================================================
|
||||
// include files
|
||||
//============================================================
|
||||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
VOID
|
||||
ODM_InitDebugSetting(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
)
|
||||
{
|
||||
pDM_Odm->DebugLevel = ODM_DBG_TRACE;
|
||||
|
||||
pDM_Odm->DebugComponents =
|
||||
\
|
||||
0;
|
||||
}
|
||||
|
||||
u32 GlobalDebugLevel;
|
||||
|
|
1327
hal/odm_interface.c
1327
hal/odm_interface.c
File diff suppressed because it is too large
Load diff
2398
hal/rtl8188e_cmd.c
2398
hal/rtl8188e_cmd.c
File diff suppressed because it is too large
Load diff
1225
hal/rtl8188e_dm.c
1225
hal/rtl8188e_dm.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2124
hal/rtl8188e_mp.c
2124
hal/rtl8188e_mp.c
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -48,7 +48,7 @@ static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
|||
//DBG_8192C("process_rssi=> pattrib->rssil(%d) signal_strength(%d)\n ",pattrib->RecvSignalPower,pattrib->signal_strength);
|
||||
//if (pRfd->Status.bPacketToSelf || pRfd->Status.bPacketBeacon)
|
||||
{
|
||||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if (signal_stat->update_req) {
|
||||
signal_stat->total_num = 0;
|
||||
|
@ -58,9 +58,9 @@ static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
|||
|
||||
signal_stat->total_num++;
|
||||
signal_stat->total_val += pattrib->phy_info.SignalStrength;
|
||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
||||
#else //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
||||
|
||||
//Adapter->RxStats.RssiCalculateCnt++; //For antenna Test
|
||||
if (padapter->recvpriv.signal_strength_data.total_num++ >= PHY_RSSI_SLID_WIN_MAX)
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
|||
|
||||
|
||||
tmp_val = padapter->recvpriv.signal_strength_data.total_val/padapter->recvpriv.signal_strength_data.total_num;
|
||||
|
||||
|
||||
if (padapter->recvpriv.is_signal_dbg) {
|
||||
padapter->recvpriv.signal_strength= padapter->recvpriv.signal_strength_dbg;
|
||||
padapter->recvpriv.rssi=(s8)translate2dbm((u8)padapter->recvpriv.signal_strength_dbg);
|
||||
|
@ -96,7 +96,7 @@ static void process_rssi(_adapter *padapter,union recv_frame *prframe)
|
|||
static void process_link_qual(_adapter *padapter,union recv_frame *prframe)
|
||||
{
|
||||
u32 last_evm=0, tmpVal;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
struct rx_pkt_attrib *pattrib;
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
struct signal_stat * signal_stat;
|
||||
#endif //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
|
@ -122,7 +122,7 @@ static void process_link_qual(_adapter *padapter,union recv_frame *prframe)
|
|||
signal_stat->total_num++;
|
||||
signal_stat->total_val += pattrib->phy_info.SignalQuality;
|
||||
signal_stat->avg_val = signal_stat->total_val / signal_stat->total_num;
|
||||
|
||||
|
||||
#else //CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
if (pattrib->phy_info.SignalQuality != 0)
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ void rtl8188e_process_phy_info(_adapter *padapter, void *prframe)
|
|||
//
|
||||
// Check PWDB.
|
||||
//
|
||||
//process_PWDB(padapter, precvframe);
|
||||
//process_PWDB(padapter, precvframe);
|
||||
|
||||
//UpdateRxSignalStatistics8192C(Adapter, pRfd);
|
||||
//
|
||||
|
@ -202,17 +202,17 @@ void update_recvframe_attrib_88e(
|
|||
pattrib = &precvframe->u.hdr.attrib;
|
||||
_rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
|
||||
|
||||
pattrib->crc_err = (u8)((report.rxdw0 >> 14) & 0x1);;//(u8)prxreport->crc32;
|
||||
|
||||
pattrib->crc_err = (u8)((report.rxdw0 >> 14) & 0x1);;//(u8)prxreport->crc32;
|
||||
|
||||
// update rx report to recv_frame attribute
|
||||
pattrib->pkt_rpt_type = (u8)((report.rxdw3 >> 14) & 0x3);//prxreport->rpt_sel;
|
||||
|
||||
if (pattrib->pkt_rpt_type == NORMAL_RX)//Normal rx packet
|
||||
|
||||
if (pattrib->pkt_rpt_type == NORMAL_RX)//Normal rx packet
|
||||
{
|
||||
pattrib->pkt_len = (u16)(report.rxdw0 &0x00003fff);//(u16)prxreport->pktlen;
|
||||
pattrib->drvinfo_sz = (u8)((report.rxdw0 >> 16) & 0xf) * 8;//(u8)(prxreport->drvinfosize << 3);
|
||||
|
||||
pattrib->physt = (u8)((report.rxdw0 >> 26) & 0x1);//(u8)prxreport->physt;
|
||||
|
||||
pattrib->physt = (u8)((report.rxdw0 >> 26) & 0x1);//(u8)prxreport->physt;
|
||||
|
||||
pattrib->bdecrypted = (report.rxdw0 & BIT(27))? 0:1;//(u8)(prxreport->swdec ? 0 : 1);
|
||||
pattrib->encrypt = (u8)((report.rxdw0 >> 20) & 0x7);//(u8)prxreport->security;
|
||||
|
@ -229,10 +229,10 @@ void update_recvframe_attrib_88e(
|
|||
|
||||
pattrib->mcs_rate = (u8)(report.rxdw3 & 0x3f);//(u8)prxreport->rxmcs;
|
||||
pattrib->rxht = (u8)((report.rxdw3 >> 6) & 0x1);//(u8)prxreport->rxht;
|
||||
|
||||
|
||||
pattrib->icv_err = (u8)((report.rxdw0 >> 15) & 0x1);//(u8)prxreport->icverr;
|
||||
pattrib->shift_sz = (u8)((report.rxdw0 >> 24) & 0x3);
|
||||
|
||||
|
||||
}
|
||||
else if (pattrib->pkt_rpt_type == TX_REPORT1)//CCX
|
||||
{
|
||||
|
@ -249,13 +249,13 @@ void update_recvframe_attrib_88e(
|
|||
//
|
||||
pattrib->MacIDValidEntry[0] = report.rxdw4;
|
||||
pattrib->MacIDValidEntry[1] = report.rxdw5;
|
||||
|
||||
|
||||
}
|
||||
else if (pattrib->pkt_rpt_type == HIS_REPORT)// USB HISR RPT
|
||||
{
|
||||
pattrib->pkt_len = (u16)(report.rxdw0 &0x00003fff);//(u16)prxreport->pktlen;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -267,21 +267,21 @@ void update_recvframe_phyinfo_88e(
|
|||
union recv_frame *precvframe,
|
||||
struct phy_stat *pphy_status)
|
||||
{
|
||||
PADAPTER padapter = precvframe->u.hdr.adapter;
|
||||
PADAPTER padapter = precvframe->u.hdr.adapter;
|
||||
struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
PODM_PHY_INFO_T pPHYInfo = (PODM_PHY_INFO_T)(&pattrib->phy_info);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
PODM_PHY_INFO_T pPHYInfo = (PODM_PHY_INFO_T)(&pattrib->phy_info);
|
||||
u8 *wlanhdr;
|
||||
ODM_PACKET_INFO_T pkt_info;
|
||||
u8 *sa;
|
||||
struct sta_priv *pstapriv;
|
||||
struct sta_info *psta;
|
||||
//_irqL irqL;
|
||||
|
||||
|
||||
pkt_info.bPacketMatchBSSID =_FALSE;
|
||||
pkt_info.bPacketToSelf = _FALSE;
|
||||
pkt_info.bPacketBeacon = _FALSE;
|
||||
|
||||
|
||||
wlanhdr = get_recvframe_data(precvframe);
|
||||
|
||||
pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
|
||||
|
@ -293,57 +293,56 @@ void update_recvframe_phyinfo_88e(
|
|||
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID && (GetFrameSubType(wlanhdr) == WIFI_BEACON);
|
||||
|
||||
if (pkt_info.bPacketBeacon){
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == _TRUE){
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_STATION_STATE) == _TRUE){
|
||||
sa = padapter->mlmepriv.cur_network.network.MacAddress;
|
||||
}
|
||||
//to do Ad-hoc
|
||||
}
|
||||
else{
|
||||
sa = get_sa(wlanhdr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pstapriv = &padapter->stapriv;
|
||||
pkt_info.StationID = 0xFF;
|
||||
psta = rtw_get_stainfo(pstapriv, sa);
|
||||
if (psta)
|
||||
{
|
||||
pkt_info.StationID = psta->mac_id;
|
||||
pkt_info.StationID = psta->mac_id;
|
||||
//DBG_8192C("%s ==> StationID(%d)\n",__func__,pkt_info.StationID);
|
||||
}
|
||||
pkt_info.Rate = pattrib->mcs_rate;
|
||||
}
|
||||
pkt_info.Rate = pattrib->mcs_rate;
|
||||
//rtl8188e_query_rx_phy_status(precvframe, pphy_status);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//get Primary adapter's odmpriv
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER){
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
//_enter_critical_bh(&pHalData->odm_stainfo_lock, &irqL);
|
||||
//_enter_critical_bh(&pHalData->odm_stainfo_lock, &irqL);
|
||||
ODM_PhyStatusQuery(&pHalData->odmpriv,pPHYInfo,(u8 *)pphy_status,&(pkt_info));
|
||||
//_exit_critical_bh(&pHalData->odm_stainfo_lock, &irqL);
|
||||
|
||||
precvframe->u.hdr.psta = NULL;
|
||||
if (pkt_info.bPacketMatchBSSID &&
|
||||
(check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == _TRUE))
|
||||
{
|
||||
{
|
||||
if (psta)
|
||||
{
|
||||
{
|
||||
precvframe->u.hdr.psta = psta;
|
||||
rtl8188e_process_phy_info(padapter, precvframe);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon)
|
||||
{
|
||||
if (check_fwstate(&padapter->mlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == _TRUE)
|
||||
{
|
||||
{
|
||||
if (psta)
|
||||
{
|
||||
{
|
||||
precvframe->u.hdr.psta = psta;
|
||||
}
|
||||
}
|
||||
rtl8188e_process_phy_info(padapter, precvframe);
|
||||
rtl8188e_process_phy_info(padapter, precvframe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,241 +1,240 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188E_SRESET_C_
|
||||
|
||||
#include <rtl8188e_sreset.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
extern void rtw_cancel_all_timer(_adapter *padapter);
|
||||
static void _restore_security_setting(_adapter *padapter)
|
||||
{
|
||||
u8 EntryId = 0;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &padapter->mlmeextpriv.mlmext_info;
|
||||
|
||||
(pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)
|
||||
? rtw_write8(padapter, REG_SECCFG, 0xcc)
|
||||
: rtw_write8(padapter, REG_SECCFG, 0xcf);
|
||||
|
||||
if ( ( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP40_ ) ||
|
||||
( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP104_ ))
|
||||
{
|
||||
|
||||
for (EntryId=0; EntryId<4; EntryId++)
|
||||
{
|
||||
if (EntryId == psecuritypriv->dot11PrivacyKeyIndex)
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 1);
|
||||
else
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 0);
|
||||
}
|
||||
|
||||
}
|
||||
else if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_))
|
||||
{
|
||||
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
|
||||
if (psta == NULL) {
|
||||
//DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//pairwise key
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, _TRUE);
|
||||
//group key
|
||||
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void _restore_network_status(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network));
|
||||
unsigned short caps;
|
||||
u8 join_type;
|
||||
#if 1
|
||||
|
||||
//=======================================================
|
||||
// reset related register of Beacon control
|
||||
|
||||
//set MSR to nolink
|
||||
Set_MSR(padapter, _HW_STATE_NOLINK_);
|
||||
// reject all data frame
|
||||
rtw_write16(padapter, REG_RXFLTMAP2,0x00);
|
||||
//reset TSF
|
||||
rtw_write8(padapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1)));
|
||||
|
||||
// disable update TSF
|
||||
SetBcnCtrlReg(padapter, BIT(4), 0);
|
||||
|
||||
//=======================================================
|
||||
rtw_joinbss_reset(padapter);
|
||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
//pmlmeinfo->assoc_AP_vendor = maxAP;
|
||||
|
||||
if (padapter->registrypriv.wifi_spec) {
|
||||
// for WiFi test, follow WMM test plan spec
|
||||
rtw_write32(padapter, REG_EDCA_VO_PARAM, 0x002F431C);
|
||||
rtw_write32(padapter, REG_EDCA_VI_PARAM, 0x005E541C);
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x0000A525);
|
||||
rtw_write32(padapter, REG_EDCA_BK_PARAM, 0x0000A549);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
// for WiFi test, mixed mode with intel STA under bg mode throughput issue
|
||||
if (padapter->mlmepriv.htpriv.ht_option == 0)
|
||||
#endif //CONFIG_80211N_HT
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x00004320);
|
||||
|
||||
} else {
|
||||
rtw_write32(padapter, REG_EDCA_VO_PARAM, 0x002F3217);
|
||||
rtw_write32(padapter, REG_EDCA_VI_PARAM, 0x005E4317);
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x00105320);
|
||||
rtw_write32(padapter, REG_EDCA_BK_PARAM, 0x0000A444);
|
||||
}
|
||||
|
||||
//disable dynamic functions, such as high power, DIG
|
||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
||||
#endif
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
||||
join_type = 0;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
|
||||
|
||||
Set_MSR(padapter, (pmlmeinfo->state & 0x3));
|
||||
|
||||
mlmeext_joinbss_event_callback(padapter, 1);
|
||||
//restore Sequence No.
|
||||
rtw_write8(padapter,0x4dc,padapter->xmitpriv.nqos_ssn);
|
||||
}
|
||||
|
||||
void rtl8188e_silentreset_for_specific_platform(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
_irqL irqL;
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_RESET
|
||||
|
||||
DBG_871X("%s\n", __func__);
|
||||
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
|
||||
if (!netif_queue_stopped(padapter->pnetdev))
|
||||
netif_stop_queue(padapter->pnetdev);
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
||||
|
||||
_enter_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||
psrtpriv->silent_reset_inprogress = _TRUE;
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
#ifdef CONFIG_IPS
|
||||
ips_enter(padapter);
|
||||
ips_leave(padapter);
|
||||
#endif
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE)
|
||||
{
|
||||
_restore_network_status(padapter);
|
||||
_restore_security_setting(padapter);
|
||||
}
|
||||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
_exit_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
|
||||
if (netif_queue_stopped(padapter->pnetdev))
|
||||
netif_wake_queue(padapter->pnetdev);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtl8188e_sreset_xmit_status_check(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
unsigned long current_time;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
unsigned int diff_time;
|
||||
u32 txdma_status;
|
||||
|
||||
if ( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){
|
||||
DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status);
|
||||
rtw_write32(padapter,REG_TXDMA_STATUS,txdma_status);
|
||||
rtl8188e_silentreset_for_specific_platform(padapter);
|
||||
}
|
||||
#ifdef CONFIG_USB_HCI
|
||||
//total xmit irp = 4
|
||||
//DBG_8192C("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__func__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
|
||||
//if (pxmitpriv->txirp_cnt == NR_XMITBUFF+1)
|
||||
current_time = rtw_get_current_time();
|
||||
if (0==pxmitpriv->free_xmitbuf_cnt)
|
||||
{
|
||||
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
|
||||
|
||||
if (diff_time > 2000){
|
||||
if (psrtpriv->last_tx_complete_time==0){
|
||||
psrtpriv->last_tx_complete_time = current_time;
|
||||
}
|
||||
else{
|
||||
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_complete_time);
|
||||
if (diff_time > 4000){
|
||||
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
|
||||
DBG_8192C("%s tx hang\n", __func__);
|
||||
rtl8188e_silentreset_for_specific_platform(padapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_USB_HCI
|
||||
}
|
||||
|
||||
void rtl8188e_sreset_linked_status_check(_adapter *padapter)
|
||||
{
|
||||
u32 rx_dma_status = 0;
|
||||
u8 fw_status=0;
|
||||
rx_dma_status = rtw_read32(padapter,REG_RXDMA_STATUS);
|
||||
if (rx_dma_status!= 0x00){
|
||||
DBG_8192C("%s REG_RXDMA_STATUS:0x%08x\n",__func__,rx_dma_status);
|
||||
rtw_write32(padapter,REG_RXDMA_STATUS,rx_dma_status);
|
||||
}
|
||||
fw_status = rtw_read8(padapter,REG_FMETHR);
|
||||
if (fw_status != 0x00)
|
||||
{
|
||||
if (fw_status == 1)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !! \n",__func__,fw_status);
|
||||
else if (fw_status == 2)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Condition_No_Match !! \n",__func__,fw_status);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#define _RTL8188E_SRESET_C_
|
||||
|
||||
#include <rtl8188e_sreset.h>
|
||||
#include <rtl8188e_hal.h>
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
extern void rtw_cancel_all_timer(_adapter *padapter);
|
||||
static void _restore_security_setting(_adapter *padapter)
|
||||
{
|
||||
u8 EntryId = 0;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &padapter->mlmeextpriv.mlmext_info;
|
||||
|
||||
(pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)
|
||||
? rtw_write8(padapter, REG_SECCFG, 0xcc)
|
||||
: rtw_write8(padapter, REG_SECCFG, 0xcf);
|
||||
|
||||
if ( ( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP40_ ) ||
|
||||
( padapter->securitypriv.dot11PrivacyAlgrthm == _WEP104_ ))
|
||||
{
|
||||
|
||||
for (EntryId=0; EntryId<4; EntryId++)
|
||||
{
|
||||
if (EntryId == psecuritypriv->dot11PrivacyKeyIndex)
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 1);
|
||||
else
|
||||
rtw_set_key(padapter,&padapter->securitypriv, EntryId, 0);
|
||||
}
|
||||
|
||||
}
|
||||
else if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) ||
|
||||
(padapter->securitypriv.dot11PrivacyAlgrthm == _AES_))
|
||||
{
|
||||
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
|
||||
if (psta == NULL) {
|
||||
//DEBUG_ERR( ("Set wpa_set_encryption: Obtain Sta_info fail\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//pairwise key
|
||||
rtw_setstakey_cmd(padapter, (unsigned char *)psta, _TRUE);
|
||||
//group key
|
||||
rtw_set_key(padapter,&padapter->securitypriv,padapter->securitypriv.dot118021XGrpKeyid, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void _restore_network_status(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network));
|
||||
unsigned short caps;
|
||||
u8 join_type;
|
||||
#if 1
|
||||
|
||||
//=======================================================
|
||||
// reset related register of Beacon control
|
||||
|
||||
//set MSR to nolink
|
||||
Set_MSR(padapter, _HW_STATE_NOLINK_);
|
||||
// reject all data frame
|
||||
rtw_write16(padapter, REG_RXFLTMAP2,0x00);
|
||||
//reset TSF
|
||||
rtw_write8(padapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1)));
|
||||
|
||||
// disable update TSF
|
||||
SetBcnCtrlReg(padapter, BIT(4), 0);
|
||||
|
||||
//=======================================================
|
||||
rtw_joinbss_reset(padapter);
|
||||
set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
//pmlmeinfo->assoc_AP_vendor = maxAP;
|
||||
|
||||
if (padapter->registrypriv.wifi_spec) {
|
||||
// for WiFi test, follow WMM test plan spec
|
||||
rtw_write32(padapter, REG_EDCA_VO_PARAM, 0x002F431C);
|
||||
rtw_write32(padapter, REG_EDCA_VI_PARAM, 0x005E541C);
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x0000A525);
|
||||
rtw_write32(padapter, REG_EDCA_BK_PARAM, 0x0000A549);
|
||||
#ifdef CONFIG_80211N_HT
|
||||
// for WiFi test, mixed mode with intel STA under bg mode throughput issue
|
||||
if (padapter->mlmepriv.htpriv.ht_option == 0)
|
||||
#endif //CONFIG_80211N_HT
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x00004320);
|
||||
|
||||
} else {
|
||||
rtw_write32(padapter, REG_EDCA_VO_PARAM, 0x002F3217);
|
||||
rtw_write32(padapter, REG_EDCA_VI_PARAM, 0x005E4317);
|
||||
rtw_write32(padapter, REG_EDCA_BE_PARAM, 0x00105320);
|
||||
rtw_write32(padapter, REG_EDCA_BK_PARAM, 0x0000A444);
|
||||
}
|
||||
|
||||
//disable dynamic functions, such as high power, DIG
|
||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE);
|
||||
#endif
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
|
||||
join_type = 0;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
|
||||
|
||||
Set_MSR(padapter, (pmlmeinfo->state & 0x3));
|
||||
|
||||
mlmeext_joinbss_event_callback(padapter, 1);
|
||||
//restore Sequence No.
|
||||
rtw_write8(padapter,0x4dc,padapter->xmitpriv.nqos_ssn);
|
||||
}
|
||||
|
||||
void rtl8188e_silentreset_for_specific_platform(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
_irqL irqL;
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_RESET
|
||||
|
||||
DBG_871X("%s\n", __func__);
|
||||
|
||||
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
|
||||
|
||||
if (!netif_queue_stopped(padapter->pnetdev))
|
||||
netif_stop_queue(padapter->pnetdev);
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
tasklet_kill(&pxmitpriv->xmit_tasklet);
|
||||
|
||||
_enter_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||
psrtpriv->silent_reset_inprogress = _TRUE;
|
||||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
#ifdef CONFIG_IPS
|
||||
ips_enter(padapter);
|
||||
ips_leave(padapter);
|
||||
#endif
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED)== _TRUE)
|
||||
{
|
||||
_restore_network_status(padapter);
|
||||
_restore_security_setting(padapter);
|
||||
}
|
||||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
|
||||
|
||||
psrtpriv->silent_reset_inprogress = _FALSE;
|
||||
_exit_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
|
||||
|
||||
tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
|
||||
if (netif_queue_stopped(padapter->pnetdev))
|
||||
netif_wake_queue(padapter->pnetdev);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtl8188e_sreset_xmit_status_check(_adapter *padapter)
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
|
||||
|
||||
unsigned long current_time;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
unsigned int diff_time;
|
||||
u32 txdma_status;
|
||||
|
||||
if ( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){
|
||||
DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status);
|
||||
rtw_write32(padapter,REG_TXDMA_STATUS,txdma_status);
|
||||
rtl8188e_silentreset_for_specific_platform(padapter);
|
||||
}
|
||||
#ifdef CONFIG_USB_HCI
|
||||
//total xmit irp = 4
|
||||
//DBG_8192C("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__func__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
|
||||
//if (pxmitpriv->txirp_cnt == NR_XMITBUFF+1)
|
||||
current_time = rtw_get_current_time();
|
||||
if (0==pxmitpriv->free_xmitbuf_cnt)
|
||||
{
|
||||
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
|
||||
|
||||
if (diff_time > 2000){
|
||||
if (psrtpriv->last_tx_complete_time==0){
|
||||
psrtpriv->last_tx_complete_time = current_time;
|
||||
}
|
||||
else{
|
||||
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_complete_time);
|
||||
if (diff_time > 4000){
|
||||
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
|
||||
DBG_8192C("%s tx hang\n", __func__);
|
||||
rtl8188e_silentreset_for_specific_platform(padapter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif //CONFIG_USB_HCI
|
||||
}
|
||||
|
||||
void rtl8188e_sreset_linked_status_check(_adapter *padapter)
|
||||
{
|
||||
u32 rx_dma_status = 0;
|
||||
u8 fw_status=0;
|
||||
rx_dma_status = rtw_read32(padapter,REG_RXDMA_STATUS);
|
||||
if (rx_dma_status!= 0x00){
|
||||
DBG_8192C("%s REG_RXDMA_STATUS:0x%08x\n",__func__,rx_dma_status);
|
||||
rtw_write32(padapter,REG_RXDMA_STATUS,rx_dma_status);
|
||||
}
|
||||
fw_status = rtw_read8(padapter,REG_FMETHR);
|
||||
if (fw_status != 0x00)
|
||||
{
|
||||
if (fw_status == 1)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !! \n",__func__,fw_status);
|
||||
else if (fw_status == 2)
|
||||
DBG_8192C("%s REG_FW_STATUS (0x%02x), Condition_No_Match !! \n",__func__,fw_status);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -39,7 +39,7 @@ void dump_txrpt_ccx_88e(void *buf)
|
|||
, __func__
|
||||
, txrpt_ccx->tag1, txrpt_ccx->pkt_num, txrpt_ccx->txdma_underflow, txrpt_ccx->int_bt, txrpt_ccx->int_tri, txrpt_ccx->int_ccx
|
||||
, txrpt_ccx->mac_id, txrpt_ccx->pkt_ok, txrpt_ccx->bmc
|
||||
, txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over, txrpt_ccx->retry_over
|
||||
, txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over, txrpt_ccx->retry_over
|
||||
, txrpt_ccx_qtime_88e(txrpt_ccx)
|
||||
, txrpt_ccx->final_data_rate
|
||||
, txrpt_ccx->qsel, txrpt_ccx_sw_88e(txrpt_ccx)
|
||||
|
@ -71,16 +71,16 @@ void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,struct tx_desc *ptxdesc)
|
|||
|
||||
if (bDumpTxPkt ==1){//dump txdesc for data frame
|
||||
DBG_871X("dump tx_desc for data frame\n");
|
||||
if ((frame_tag&0x0f) == DATA_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
if ((frame_tag&0x0f) == DATA_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bDumpTxPkt ==2){//dump txdesc for mgnt frame
|
||||
DBG_871X("dump tx_desc for mgnt frame\n");
|
||||
if ((frame_tag&0x0f) == MGNT_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
if ((frame_tag&0x0f) == MGNT_FRAMETAG){
|
||||
bDumpTxDesc = _TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bDumpTxPkt ==3){//dump early info
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,struct tx_desc *ptxdesc)
|
|||
|
||||
//#define DBG_EMINFO
|
||||
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
#define EARLY_MODE_MAX_PKT_NUM 10
|
||||
#else
|
||||
#define EARLY_MODE_MAX_PKT_NUM 5
|
||||
|
@ -122,7 +122,7 @@ void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,struct tx_desc *ptxdesc)
|
|||
|
||||
|
||||
struct EMInfo{
|
||||
u8 EMPktNum;
|
||||
u8 EMPktNum;
|
||||
u16 EMPktLen[EARLY_MODE_MAX_PKT_NUM];
|
||||
};
|
||||
|
||||
|
@ -152,7 +152,7 @@ InsertEMContent_8188E(
|
|||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if RTL8188E_EARLY_MODE_PKT_NUM_10 == 1
|
||||
SET_EARLYMODE_PKTNUM(VirtualAddress, pEMInfo->EMPktNum);
|
||||
|
||||
|
@ -197,7 +197,7 @@ InsertEMContent_8188E(
|
|||
dwtmp += pEMInfo->EMPktLen[9];
|
||||
}
|
||||
SET_EARLYMODE_LEN4(VirtualAddress, dwtmp);
|
||||
#else
|
||||
#else
|
||||
SET_EARLYMODE_PKTNUM(VirtualAddress, pEMInfo->EMPktNum);
|
||||
SET_EARLYMODE_LEN0(VirtualAddress, pEMInfo->EMPktLen[0]);
|
||||
SET_EARLYMODE_LEN1(VirtualAddress, pEMInfo->EMPktLen[1]);
|
||||
|
@ -205,7 +205,7 @@ InsertEMContent_8188E(
|
|||
SET_EARLYMODE_LEN2_2(VirtualAddress, pEMInfo->EMPktLen[2]>>4);
|
||||
SET_EARLYMODE_LEN3(VirtualAddress, pEMInfo->EMPktLen[3]);
|
||||
SET_EARLYMODE_LEN4(VirtualAddress, pEMInfo->EMPktLen[4]);
|
||||
#endif
|
||||
#endif
|
||||
//RT_PRINT_DATA(COMP_SEND, DBG_LOUD, "EMHdr:", VirtualAddress, 8);
|
||||
|
||||
}
|
||||
|
@ -218,34 +218,34 @@ void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmit
|
|||
int index,j;
|
||||
u16 offset,pktlen;
|
||||
PTXDESC ptxdesc;
|
||||
|
||||
|
||||
u8 *pmem,*pEMInfo_mem;
|
||||
s8 node_num_0=0,node_num_1=0;
|
||||
struct EMInfo eminfo;
|
||||
struct agg_pkt_info *paggpkt;
|
||||
struct xmit_frame *pframe = (struct xmit_frame*)pxmitbuf->priv_data;
|
||||
pmem= pframe->buf_addr;
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
struct xmit_frame *pframe = (struct xmit_frame*)pxmitbuf->priv_data;
|
||||
pmem= pframe->buf_addr;
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
DBG_8192C("\n%s ==> agg_num:%d\n",__func__, pframe->agg_num);
|
||||
for (index=0;index<pframe->agg_num;index++){
|
||||
offset = pxmitpriv->agg_pkt[index].offset;
|
||||
offset = pxmitpriv->agg_pkt[index].offset;
|
||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||
DBG_8192C("%s ==> agg_pkt[%d].offset=%d\n",__func__,index,offset);
|
||||
DBG_8192C("%s ==> agg_pkt[%d].pkt_len=%d\n",__func__,index,pktlen);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if ( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM)
|
||||
{
|
||||
{
|
||||
node_num_0 = pframe->agg_num;
|
||||
node_num_1= EARLY_MODE_MAX_PKT_NUM-1;
|
||||
}
|
||||
|
||||
|
||||
for (index=0;index<pframe->agg_num;index++){
|
||||
|
||||
offset = pxmitpriv->agg_pkt[index].offset;
|
||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||
pktlen = pxmitpriv->agg_pkt[index].pkt_len;
|
||||
|
||||
_rtw_memset(&eminfo,0,sizeof(struct EMInfo));
|
||||
if ( pframe->agg_num > EARLY_MODE_MAX_PKT_NUM){
|
||||
|
@ -255,38 +255,36 @@ void UpdateEarlyModeInfo8188E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmit
|
|||
}
|
||||
else{
|
||||
eminfo.EMPktNum = node_num_1;
|
||||
node_num_1--;
|
||||
}
|
||||
node_num_1--;
|
||||
}
|
||||
}
|
||||
else{
|
||||
eminfo.EMPktNum = pframe->agg_num-(index+1);
|
||||
}
|
||||
eminfo.EMPktNum = pframe->agg_num-(index+1);
|
||||
}
|
||||
for (j=0;j< eminfo.EMPktNum ;j++){
|
||||
eminfo.EMPktLen[j] = pxmitpriv->agg_pkt[index+1+j].pkt_len+4;// 4 bytes CRC
|
||||
}
|
||||
|
||||
|
||||
if (pmem){
|
||||
if (index==0){
|
||||
ptxdesc = (PTXDESC)(pmem);
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
}
|
||||
else{
|
||||
pmem = pmem + pxmitpriv->agg_pkt[index-1].offset;
|
||||
ptxdesc = (PTXDESC)(pmem);
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
pEMInfo_mem = ((u8 *)ptxdesc)+TXDESC_SIZE;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DBG_EMINFO
|
||||
DBG_8192C("%s ==> desc.pkt_len=%d\n",__func__,ptxdesc->pktlen);
|
||||
#endif
|
||||
InsertEMContent_8188E(&eminfo,pEMInfo_mem);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
_rtw_memset(pxmitpriv->agg_pkt,0,sizeof(struct agg_pkt_info)*MAX_AGG_PKT_NUM);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
//================================================================================
|
||||
// LED_819xUsb routines.
|
||||
// LED_819xUsb routines.
|
||||
//================================================================================
|
||||
|
||||
//
|
||||
|
@ -53,7 +53,7 @@ void SwLedOn(_adapter *padapter, PLED_871x pLed)
|
|||
|
||||
LedCfg = rtw_read8(padapter, REG_LEDCFG2);
|
||||
switch (pLed->LedPin)
|
||||
{
|
||||
{
|
||||
case LED_PIN_LED0:
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg&0xf0)|BIT5|BIT6); // SW control led0 on.
|
||||
break;
|
||||
|
@ -65,7 +65,7 @@ void SwLedOn(_adapter *padapter, PLED_871x pLed)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
pLed->bLedOn = _TRUE;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
|||
u8 LedCfg;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if ((padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
if ((padapter->bSurpriseRemoved == _TRUE) || ( padapter->bDriverStopped == _TRUE))
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
@ -92,11 +92,11 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
|||
case LED_PIN_LED0:
|
||||
if (pHalData->bLedOpenDrain == _TRUE) // Open-drain arrangement for controlling the LED)
|
||||
{
|
||||
LedCfg &= 0x90; // Set to software control.
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
|
||||
LedCfg &= 0x90; // Set to software control.
|
||||
rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
|
||||
LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
|
||||
LedCfg &= 0xFE;
|
||||
rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
|
||||
rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ void SwLedOff(_adapter *padapter, PLED_871x pLed)
|
|||
}
|
||||
exit:
|
||||
pLed->bLedOn = _FALSE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
|
@ -159,4 +159,3 @@ rtl8188eu_DeInitSwLeds(
|
|||
DeInitLed871x( &(ledpriv->SwLed0) );
|
||||
DeInitLed871x( &(ledpriv->SwLed1) );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -64,7 +64,7 @@ int rtl8188eu_init_recv_priv(_adapter *padapter)
|
|||
int i, res = _SUCCESS;
|
||||
struct recv_buf *precvbuf;
|
||||
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
#ifdef CONFIG_RECV_THREAD_MODE
|
||||
_rtw_init_sema(&precvpriv->recv_sema, 0);//will be removed
|
||||
_rtw_init_sema(&precvpriv->terminate_recvthread_sema, 0);//will be removed
|
||||
#endif
|
||||
|
@ -235,5 +235,3 @@ void rtl8188eu_free_recv_priv (_adapter *padapter)
|
|||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -58,10 +58,10 @@ u8 urb_zero_packet_chk(_adapter *padapter, int sz)
|
|||
u8 blnSetTxDescOffset;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
blnSetTxDescOffset = (((sz + TXDESC_SIZE) % pHalData->UsbBulkOutSize) ==0)?1:0;
|
||||
|
||||
|
||||
#else
|
||||
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
if ( pdvobj->ishighspeed )
|
||||
{
|
||||
if ( ( (sz + TXDESC_SIZE) % 512 ) == 0 ) {
|
||||
|
@ -72,15 +72,15 @@ u8 urb_zero_packet_chk(_adapter *padapter, int sz)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( ( (sz + TXDESC_SIZE) % 64 ) == 0 ) {
|
||||
if ( ( (sz + TXDESC_SIZE) % 64 ) == 0 ) {
|
||||
blnSetTxDescOffset = 1;
|
||||
} else {
|
||||
blnSetTxDescOffset = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return blnSetTxDescOffset;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
|
||||
|
@ -92,12 +92,12 @@ void rtl8188eu_cal_txdesc_chksum(struct tx_desc *ptxdesc)
|
|||
|
||||
//Clear first
|
||||
ptxdesc->txdw7 &= cpu_to_le32(0xffff0000);
|
||||
|
||||
|
||||
for (index = 0 ; index < count ; index++){
|
||||
checksum = checksum ^ le16_to_cpu(*(usPtr + index));
|
||||
}
|
||||
|
||||
ptxdesc->txdw7 |= cpu_to_le32(0x0000ffff&checksum);
|
||||
ptxdesc->txdw7 |= cpu_to_le32(0x0000ffff&checksum);
|
||||
|
||||
}
|
||||
//
|
||||
|
@ -160,15 +160,15 @@ void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxdesc)
|
|||
if ((pattrib->encrypt > 0) && !pattrib->bswenc)
|
||||
{
|
||||
switch (pattrib->encrypt)
|
||||
{
|
||||
{
|
||||
//SEC_TYPE : 0:NO_ENC,1:WEP40/TKIP,2:WAPI,3:AES
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
ptxdesc->txdw1 |= cpu_to_le32((0x01<<SEC_TYPE_SHT)&0x00c00000);
|
||||
ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT);
|
||||
break;
|
||||
break;
|
||||
case _TKIP_:
|
||||
case _TKIP_WTMIC_:
|
||||
case _TKIP_WTMIC_:
|
||||
ptxdesc->txdw1 |= cpu_to_le32((0x01<<SEC_TYPE_SHT)&0x00c00000);
|
||||
ptxdesc->txdw2 |= cpu_to_le32(0x7 << AMPDU_DENSITY_SHT);
|
||||
break;
|
||||
|
@ -185,16 +185,16 @@ void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxdesc)
|
|||
case _NO_PRIVACY_:
|
||||
default:
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw)
|
||||
{
|
||||
//DBG_8192C("cvs_mode=%d\n", pattrib->vcs_mode);
|
||||
//DBG_8192C("cvs_mode=%d\n", pattrib->vcs_mode);
|
||||
|
||||
switch (pattrib->vcs_mode)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw)
|
|||
break;
|
||||
case NONE_VCS:
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pattrib->vcs_mode) {
|
||||
|
@ -238,7 +238,7 @@ void fill_txdesc_phy(struct pkt_attrib *pattrib, u32 *pdw)
|
|||
*pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40)? cpu_to_le32(BIT(25)):0;
|
||||
|
||||
if (pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER)
|
||||
*pdw |= cpu_to_le32((0x01<<DATA_SC_SHT)&0x003f0000);
|
||||
*pdw |= cpu_to_le32((0x01<<DATA_SC_SHT)&0x003f0000);
|
||||
else if (pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_UPPER)
|
||||
*pdw |= cpu_to_le32((0x02<<DATA_SC_SHT)&0x003f0000);
|
||||
else if (pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_DONT_CARE)
|
||||
|
@ -250,12 +250,12 @@ void fill_txdesc_phy(struct pkt_attrib *pattrib, u32 *pdw)
|
|||
|
||||
|
||||
static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bagg_pkt)
|
||||
{
|
||||
{
|
||||
int pull=0;
|
||||
uint qsel;
|
||||
u8 data_rate,pwr_status,offset;
|
||||
_adapter *padapter = pxmitframe->padapter;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
//struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
|
@ -263,21 +263,21 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter) && padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
if (rtw_buddy_adapter_up(padapter) && padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (padapter->registrypriv.mp_mode == 0)
|
||||
{
|
||||
if ((!bagg_pkt) &&(urb_zero_packet_chk(padapter, sz)==0))//(sz %512) != 0
|
||||
//if ((!bagg_pkt) &&(rtw_usb_bulk_size_boundary(padapter,TXDESC_SIZE+sz)==_FALSE))
|
||||
//if ((!bagg_pkt) &&(rtw_usb_bulk_size_boundary(padapter,TXDESC_SIZE+sz)==_FALSE))
|
||||
{
|
||||
ptxdesc = (struct tx_desc *)(pmem+PACKET_OFFSET_SZ);
|
||||
//DBG_8192C("==> non-agg-pkt,shift pointer...\n");
|
||||
|
@ -287,17 +287,17 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
_rtw_memset(ptxdesc, 0, sizeof(struct tx_desc));
|
||||
|
||||
|
||||
//4 offset 0
|
||||
ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
|
||||
//DBG_8192C("%s==> pkt_len=%d,bagg_pkt=%02x\n",__func__,sz,bagg_pkt);
|
||||
ptxdesc->txdw0 |= cpu_to_le32(sz & 0x0000ffff);//update TXPKTSIZE
|
||||
|
||||
offset = TXDESC_SIZE + OFFSET_SZ;
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
if (bagg_pkt){
|
||||
offset += EARLY_MODE_INFO_SIZE ;//0x28
|
||||
offset = TXDESC_SIZE + OFFSET_SZ;
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
if (bagg_pkt){
|
||||
offset += EARLY_MODE_INFO_SIZE ;//0x28
|
||||
}
|
||||
#endif
|
||||
//DBG_8192C("%s==>offset(0x%02x) \n",__func__,offset);
|
||||
|
@ -309,11 +309,11 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
if (padapter->registrypriv.mp_mode == 0)
|
||||
{
|
||||
if (!bagg_pkt){
|
||||
if ((pull) && (pxmitframe->pkt_offset>0)) {
|
||||
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
|
||||
if ((pull) && (pxmitframe->pkt_offset>0)) {
|
||||
pxmitframe->pkt_offset = pxmitframe->pkt_offset -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//DBG_8192C("%s, pkt_offset=0x%02x\n",__func__,pxmitframe->pkt_offset);
|
||||
|
||||
|
@ -326,7 +326,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
|
||||
if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
|
||||
{
|
||||
//DBG_8192C("pxmitframe->frame_tag == DATA_FRAMETAG\n");
|
||||
//DBG_8192C("pxmitframe->frame_tag == DATA_FRAMETAG\n");
|
||||
|
||||
//offset 4
|
||||
ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x3F);
|
||||
|
@ -341,20 +341,20 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
|
||||
if (pattrib->ampdu_en==_TRUE){
|
||||
ptxdesc->txdw2 |= cpu_to_le32(AGG_EN);//AGG EN
|
||||
|
||||
|
||||
//SET_TX_DESC_MAX_AGG_NUM_88E(pDesc, 0x1F);
|
||||
//SET_TX_DESC_MCSG1_MAX_LEN_88E(pDesc, 0x6);
|
||||
//SET_TX_DESC_MCSG2_MAX_LEN_88E(pDesc, 0x6);
|
||||
//SET_TX_DESC_MCSG3_MAX_LEN_88E(pDesc, 0x6);
|
||||
//SET_TX_DESC_MCS7_SGI_MAX_LEN_88E(pDesc, 0x6);
|
||||
ptxdesc->txdw6 = 0x6666f800;
|
||||
ptxdesc->txdw6 = 0x6666f800;
|
||||
}
|
||||
else{
|
||||
ptxdesc->txdw2 |= cpu_to_le32(AGG_BK);//AGG BK
|
||||
}
|
||||
|
||||
|
||||
//offset 8
|
||||
|
||||
|
||||
|
||||
//offset 12
|
||||
ptxdesc->txdw3 |= cpu_to_le32((pattrib->seqnum<< SEQ_SHT)&0x0FFF0000);
|
||||
|
@ -378,38 +378,38 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
(pattrib->dhcp_pkt != 1))
|
||||
{
|
||||
//Non EAP & ARP & DHCP type data packet
|
||||
|
||||
|
||||
fill_txdesc_vcs(pattrib, &ptxdesc->txdw4);
|
||||
fill_txdesc_phy(pattrib, &ptxdesc->txdw4);
|
||||
|
||||
ptxdesc->txdw4 |= cpu_to_le32(0x00000008);//RTS Rate=24M
|
||||
ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);//DATA/RTS Rate FB LMT
|
||||
ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);//DATA/RTS Rate FB LMT
|
||||
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
#if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
if (pattrib->ht_en){
|
||||
if ( ODM_RA_GetShortGI_8188E(&pHalData->odmpriv,pattrib->mac_id))
|
||||
ptxdesc->txdw5 |= cpu_to_le32(SGI);//SGI
|
||||
}
|
||||
|
||||
data_rate =ODM_RA_GetDecisionRate_8188E(&pHalData->odmpriv,pattrib->mac_id);
|
||||
|
||||
data_rate =ODM_RA_GetDecisionRate_8188E(&pHalData->odmpriv,pattrib->mac_id);
|
||||
ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F);
|
||||
|
||||
#if (POWER_TRAINING_ACTIVE==1)
|
||||
pwr_status = ODM_RA_GetHwPwrStatus_8188E(&pHalData->odmpriv,pattrib->mac_id);
|
||||
ptxdesc->txdw4 |=cpu_to_le32( (pwr_status & 0x7)<< PWR_STATUS_SHT);
|
||||
#endif //(POWER_TRAINING_ACTIVE==1)
|
||||
#else//if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
|
||||
#else//if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
|
||||
if (pattrib->ht_en)
|
||||
ptxdesc->txdw5 |= cpu_to_le32(SGI);//SGI
|
||||
|
||||
data_rate = 0x13; //default rate: MCS7
|
||||
data_rate = 0x13; //default rate: MCS7
|
||||
if (padapter->fix_rate!= 0xFF){//rate control by iwpriv
|
||||
data_rate = padapter->fix_rate;
|
||||
data_rate = padapter->fix_rate;
|
||||
}
|
||||
ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F);
|
||||
ptxdesc->txdw5 |= cpu_to_le32(data_rate & 0x3F);
|
||||
|
||||
#endif//if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
#endif//if (RATE_ADAPTIVE_SUPPORT == 1)
|
||||
|
||||
}
|
||||
else
|
||||
|
@ -418,7 +418,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
// Use the 1M data rate to send the EAP/ARP packet.
|
||||
// This will maybe make the handshake smooth.
|
||||
|
||||
ptxdesc->txdw2 |= cpu_to_le32(AGG_BK);//AGG BK
|
||||
ptxdesc->txdw2 |= cpu_to_le32(AGG_BK);//AGG BK
|
||||
|
||||
if (pmlmeinfo->preamble_mode == PREAMBLE_SHORT)
|
||||
ptxdesc->txdw4 |= cpu_to_le32(BIT(24));// DATA_SHORT
|
||||
|
@ -438,19 +438,19 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
}
|
||||
else if ((pxmitframe->frame_tag&0x0f)== MGNT_FRAMETAG)
|
||||
{
|
||||
//DBG_8192C("pxmitframe->frame_tag == MGNT_FRAMETAG\n");
|
||||
|
||||
//offset 4
|
||||
//DBG_8192C("pxmitframe->frame_tag == MGNT_FRAMETAG\n");
|
||||
|
||||
//offset 4
|
||||
ptxdesc->txdw1 |= cpu_to_le32(pattrib->mac_id&0x3f);
|
||||
|
||||
|
||||
qsel = (uint)(pattrib->qsel&0x0000001f);
|
||||
ptxdesc->txdw1 |= cpu_to_le32((qsel<<QSEL_SHT)&0x00001f00);
|
||||
|
||||
ptxdesc->txdw1 |= cpu_to_le32((pattrib->raid<< RATE_ID_SHT) & 0x000f0000);
|
||||
|
||||
|
||||
//fill_txdesc_sectype(pattrib, ptxdesc);
|
||||
|
||||
//offset 8
|
||||
|
||||
//offset 8
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
//CCX-TXRPT ack for xmit mgmt frames.
|
||||
if (pxmitframe->ack_report) {
|
||||
|
@ -466,7 +466,7 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
|
||||
//offset 12
|
||||
ptxdesc->txdw3 |= cpu_to_le32((pattrib->seqnum<<SEQ_SHT)&0x0FFF0000);
|
||||
|
||||
|
||||
//offset 20
|
||||
ptxdesc->txdw5 |= cpu_to_le32(RTY_LMT_EN);//retry limit enable
|
||||
if (pattrib->retry_ctrl == _TRUE)
|
||||
|
@ -500,12 +500,12 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
{
|
||||
DBG_8192C("pxmitframe->frame_tag = %d\n", pxmitframe->frame_tag);
|
||||
|
||||
//offset 4
|
||||
//offset 4
|
||||
ptxdesc->txdw1 |= cpu_to_le32((4)&0x3f);//CAM_ID(MAC_ID)
|
||||
|
||||
ptxdesc->txdw1 |= cpu_to_le32((6<< RATE_ID_SHT) & 0x000f0000);//raid
|
||||
|
||||
//offset 8
|
||||
//offset 8
|
||||
|
||||
//offset 12
|
||||
ptxdesc->txdw3 |= cpu_to_le32((pattrib->seqnum<<SEQ_SHT)&0x0fff0000);
|
||||
|
@ -523,23 +523,23 @@ if (padapter->registrypriv.mp_mode == 0)
|
|||
// (3) Use HW Qos SEQ to control the seq num of Ext port non-Qos packets.
|
||||
// 2010.06.23. Added by tynli.
|
||||
if (!pattrib->qos_en)
|
||||
{
|
||||
{
|
||||
//ptxdesc->txdw4 |= cpu_to_le32(BIT(7)); // Hw set sequence number
|
||||
//ptxdesc->txdw3 |= cpu_to_le32((8 <<28)); //set bit3 to 1. Suugested by TimChen. 2009.12.29.
|
||||
|
||||
ptxdesc->txdw3 |= cpu_to_le32(EN_HWSEQ); // Hw set sequence number
|
||||
ptxdesc->txdw4 |= cpu_to_le32(HW_SSN); // Hw set sequence number
|
||||
|
||||
ptxdesc->txdw4 |= cpu_to_le32(HW_SSN); // Hw set sequence number
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HW_ANTENNA_DIVERSITY //CONFIG_ANTENNA_DIVERSITY
|
||||
#ifdef CONFIG_HW_ANTENNA_DIVERSITY //CONFIG_ANTENNA_DIVERSITY
|
||||
ODM_SetTxAntByTxInfo_88E(&pHalData->odmpriv, pmem, pattrib->mac_id);
|
||||
#endif
|
||||
|
||||
rtl8188eu_cal_txdesc_chksum(ptxdesc);
|
||||
_dbg_dump_tx_info(padapter,pxmitframe->frame_tag,ptxdesc);
|
||||
_dbg_dump_tx_info(padapter,pxmitframe->frame_tag,ptxdesc);
|
||||
return pull;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -634,18 +634,18 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
mem_addr = pxmitframe->buf_addr;
|
||||
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_dump_xframe()\n"));
|
||||
|
||||
|
||||
for (t = 0; t < pattrib->nr_frags; t++)
|
||||
{
|
||||
if (inner_ret != _SUCCESS && ret == _SUCCESS)
|
||||
ret = _FAIL;
|
||||
|
||||
|
||||
if (t != (pattrib->nr_frags - 1))
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("pattrib->nr_frags=%d\n", pattrib->nr_frags));
|
||||
|
||||
sz = pxmitpriv->frag_len;
|
||||
sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : pattrib->icv_len);
|
||||
sz = sz - 4 - (psecuritypriv->sw_encrypt ? 0 : pattrib->icv_len);
|
||||
}
|
||||
else //no frag
|
||||
{
|
||||
|
@ -653,12 +653,12 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
}
|
||||
|
||||
pull = update_txdesc(pxmitframe, mem_addr, sz, _FALSE);
|
||||
|
||||
|
||||
if (pull)
|
||||
{
|
||||
mem_addr += PACKET_OFFSET_SZ; //pull txdesc head
|
||||
|
||||
//pxmitbuf ->pbuf = mem_addr;
|
||||
|
||||
//pxmitbuf ->pbuf = mem_addr;
|
||||
pxmitframe->buf_addr = mem_addr;
|
||||
|
||||
w_sz = sz + TXDESC_SIZE;
|
||||
|
@ -666,10 +666,10 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
else
|
||||
{
|
||||
w_sz = sz + TXDESC_SIZE + PACKET_OFFSET_SZ;
|
||||
}
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
}
|
||||
#ifdef CONFIG_IOL_IOREG_CFG_DBG
|
||||
rtw_IOL_cmd_buf_dump(padapter,w_sz,pxmitframe->buf_addr);
|
||||
#endif
|
||||
#endif
|
||||
ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
|
||||
|
||||
#ifdef CONFIG_XMIT_THREAD_MODE
|
||||
|
@ -683,19 +683,19 @@ static s32 rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
rtw_count_tx_stats(padapter, pxmitframe, sz);
|
||||
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_write_port, w_sz=%d\n", w_sz));
|
||||
//DBG_8192C("rtw_write_port, w_sz=%d, sz=%d, txdesc_sz=%d, tid=%d\n", w_sz, sz, w_sz-sz, pattrib->priority);
|
||||
//DBG_8192C("rtw_write_port, w_sz=%d, sz=%d, txdesc_sz=%d, tid=%d\n", w_sz, sz, w_sz-sz, pattrib->priority);
|
||||
|
||||
mem_addr += w_sz;
|
||||
|
||||
mem_addr = (u8 *)RND4(((SIZE_PTR)(mem_addr)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
|
||||
if (ret != _SUCCESS)
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_UNKNOWN);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -764,7 +764,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
//3 1. pick up first frame
|
||||
do {
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
|
||||
pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
|
||||
if (pxmitframe == NULL) {
|
||||
// no more xmit frame, release xmit buffer
|
||||
|
@ -872,7 +872,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
xmitframe_phead = get_list_head(&ptxservq->sta_pending);
|
||||
xmitframe_plist = get_next(xmitframe_phead);
|
||||
|
||||
|
||||
while (rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist) == _FALSE)
|
||||
{
|
||||
pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list);
|
||||
|
@ -883,17 +883,17 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
pxmitframe->pkt_offset = 1;// not first frame of aggregation,reserve offset for EM Info
|
||||
#else
|
||||
pxmitframe->pkt_offset = 0; // not first frame of aggregation, no need to reserve offset
|
||||
#endif
|
||||
#endif
|
||||
|
||||
len = xmitframe_need_length(pxmitframe) + TXDESC_SIZE +(pxmitframe->pkt_offset*PACKET_OFFSET_SZ);
|
||||
|
||||
|
||||
if (_RND8(pbuf + len) > MAX_XMITBUF_SZ)
|
||||
//if (_RND8(pbuf + len) > (MAX_XMITBUF_SZ/2))//to do : for TX TP finial tune , Georgia 2012-0323
|
||||
{
|
||||
//DBG_8192C("%s....len> MAX_XMITBUF_SZ\n",__func__);
|
||||
pxmitframe->agg_num = 1;
|
||||
pxmitframe->pkt_offset = 1;
|
||||
break;
|
||||
pxmitframe->pkt_offset = 1;
|
||||
break;
|
||||
}
|
||||
rtw_list_delete(&pxmitframe->list);
|
||||
ptxservq->qcnt--;
|
||||
|
@ -922,7 +922,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
// pxmitframe->pxmitbuf = pxmitbuf;
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf + pbuf;
|
||||
|
||||
|
||||
#ifdef IDEA_CONDITION
|
||||
rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
#else
|
||||
|
@ -939,7 +939,7 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
// (len - TXDESC_SIZE) == pxmitframe->attrib.last_txcmdsz
|
||||
update_txdesc(pxmitframe, pxmitframe->buf_addr, pxmitframe->attrib.last_txcmdsz,_TRUE);
|
||||
|
||||
|
||||
// don't need xmitframe any more
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
|
||||
|
@ -949,9 +949,9 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
|
||||
pfirstframe->agg_num++;
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].offset = _RND8(len);
|
||||
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].pkt_len = pxmitframe->attrib.last_txcmdsz;
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].offset = _RND8(len);
|
||||
pxmitpriv->agg_pkt[pfirstframe->agg_num-1].pkt_len = pxmitframe->attrib.last_txcmdsz;
|
||||
#endif
|
||||
if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num)
|
||||
break;
|
||||
|
@ -992,15 +992,15 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
#endif // CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
||||
update_txdesc(pfirstframe, pfirstframe->buf_addr, pfirstframe->attrib.last_txcmdsz,_TRUE);
|
||||
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
//prepare EM info for first frame, agg_num value start from 1
|
||||
pxmitpriv->agg_pkt[0].offset = _RND8(pfirstframe->attrib.last_txcmdsz +TXDESC_SIZE +(pfirstframe->pkt_offset*PACKET_OFFSET_SZ));
|
||||
pxmitpriv->agg_pkt[0].pkt_len = pfirstframe->attrib.last_txcmdsz;//get from rtw_xmitframe_coalesce
|
||||
pxmitpriv->agg_pkt[0].pkt_len = pfirstframe->attrib.last_txcmdsz;//get from rtw_xmitframe_coalesce
|
||||
|
||||
UpdateEarlyModeInfo8188E(pxmitpriv,pxmitbuf );
|
||||
#endif
|
||||
|
||||
|
||||
//3 4. write xmit buffer to USB FIFO
|
||||
ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);
|
||||
//DBG_8192C("%s ===================================== write port,buf_size(%d)\n",__func__,pbuf_tail);
|
||||
|
@ -1011,8 +1011,8 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
//3 5. update statisitc
|
||||
pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE);
|
||||
pbuf_tail -= (pfirstframe->pkt_offset * PACKET_OFFSET_SZ);
|
||||
|
||||
|
||||
|
||||
|
||||
rtw_count_tx_stats(padapter, pfirstframe, pbuf_tail);
|
||||
|
||||
rtw_free_xmitframe(pxmitpriv, pfirstframe);
|
||||
|
@ -1023,11 +1023,11 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
#else
|
||||
|
||||
s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||
{
|
||||
{
|
||||
|
||||
struct hw_xmit *phwxmits;
|
||||
sint hwentry;
|
||||
struct xmit_frame *pxmitframe=NULL;
|
||||
struct xmit_frame *pxmitframe=NULL;
|
||||
int res=_SUCCESS, xcnt = 0;
|
||||
|
||||
phwxmits = pxmitpriv->hwxmits;
|
||||
|
@ -1037,65 +1037,65 @@ s32 rtl8188eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv
|
|||
|
||||
if (pxmitbuf==NULL)
|
||||
{
|
||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
if (!pxmitbuf)
|
||||
{
|
||||
return _FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
{
|
||||
pxmitframe = rtw_dequeue_xframe(pxmitpriv, phwxmits, hwentry);
|
||||
|
||||
|
||||
if (pxmitframe)
|
||||
{
|
||||
pxmitframe->pxmitbuf = pxmitbuf;
|
||||
pxmitframe->pxmitbuf = pxmitbuf;
|
||||
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf;
|
||||
|
||||
pxmitbuf->priv_data = pxmitframe;
|
||||
pxmitbuf->priv_data = pxmitframe;
|
||||
|
||||
if ((pxmitframe->frame_tag&0x0f) == DATA_FRAMETAG)
|
||||
{
|
||||
{
|
||||
if (pxmitframe->attrib.priority<=15)//TID0~15
|
||||
{
|
||||
res = rtw_xmitframe_coalesce(padapter, pxmitframe->pkt, pxmitframe);
|
||||
}
|
||||
}
|
||||
//DBG_8192C("==> pxmitframe->attrib.priority:%d\n",pxmitframe->attrib.priority);
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);//always return ndis_packet after rtw_xmitframe_coalesce
|
||||
rtw_os_xmit_complete(padapter, pxmitframe);//always return ndis_packet after rtw_xmitframe_coalesce
|
||||
}
|
||||
|
||||
|
||||
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("xmitframe_complete(): rtw_dump_xframe\n"));
|
||||
|
||||
|
||||
|
||||
if (res == _SUCCESS)
|
||||
{
|
||||
rtw_dump_xframe(padapter, pxmitframe);
|
||||
rtw_dump_xframe(padapter, pxmitframe);
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
rtw_free_xmitframe(pxmitpriv, pxmitframe);
|
||||
}
|
||||
|
||||
|
||||
xcnt++;
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
|
||||
return _FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
}while (0/*xcnt < (NR_XMITFRAME >> 3)*/);
|
||||
|
||||
return _TRUE;
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1130,11 +1130,11 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
#endif
|
||||
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
//DBG_8192C("==> %s\n",__func__);
|
||||
|
@ -1149,7 +1149,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
||||
goto enqueue;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == _TRUE)
|
||||
goto enqueue;
|
||||
#endif
|
||||
|
@ -1206,37 +1206,37 @@ s32 rtl8188eu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
#ifdef CONFIG_HOSTAPD_MLME
|
||||
|
||||
static void rtl8188eu_hostap_mgnt_xmit_cb(struct urb *urb)
|
||||
{
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sk_buff *skb = (struct sk_buff *)urb->context;
|
||||
|
||||
//DBG_8192C("%s\n", __func__);
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
||||
{
|
||||
#ifdef PLATFORM_LINUX
|
||||
u16 fc;
|
||||
int rc, len, pipe;
|
||||
int rc, len, pipe;
|
||||
unsigned int bmcst, tid, qsel;
|
||||
struct sk_buff *skb, *pxmit_skb;
|
||||
struct urb *urb;
|
||||
unsigned char *pxmitbuf;
|
||||
struct tx_desc *ptxdesc;
|
||||
struct rtw_ieee80211_hdr *tx_hdr;
|
||||
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
|
||||
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
|
||||
struct net_device *pnetdev = padapter->pnetdev;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||
|
||||
|
||||
|
||||
//DBG_8192C("%s\n", __func__);
|
||||
|
||||
skb = pkt;
|
||||
|
||||
|
||||
len = skb->len;
|
||||
tx_hdr = (struct rtw_ieee80211_hdr *)(skb->data);
|
||||
fc = le16_to_cpu(tx_hdr->frame_ctl);
|
||||
|
@ -1246,10 +1246,10 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
goto _exit;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) // http://www.mail-archive.com/netdev@vger.kernel.org/msg17214.html
|
||||
pxmit_skb = dev_alloc_skb(len + TXDESC_SIZE);
|
||||
#else
|
||||
pxmit_skb = dev_alloc_skb(len + TXDESC_SIZE);
|
||||
#else
|
||||
pxmit_skb = netdev_alloc_skb(pnetdev, len + TXDESC_SIZE);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (!pxmit_skb)
|
||||
goto _exit;
|
||||
|
@ -1261,42 +1261,42 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
goto _exit;
|
||||
}
|
||||
|
||||
// ----- fill tx desc -----
|
||||
ptxdesc = (struct tx_desc *)pxmitbuf;
|
||||
// ----- fill tx desc -----
|
||||
ptxdesc = (struct tx_desc *)pxmitbuf;
|
||||
_rtw_memset(ptxdesc, 0, sizeof(*ptxdesc));
|
||||
|
||||
//offset 0
|
||||
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
|
||||
|
||||
//offset 0
|
||||
ptxdesc->txdw0 |= cpu_to_le32(len&0x0000ffff);
|
||||
ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000);//default = 32 bytes for TX Desc
|
||||
ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
|
||||
|
||||
if (bmcst)
|
||||
if (bmcst)
|
||||
{
|
||||
ptxdesc->txdw0 |= cpu_to_le32(BIT(24));
|
||||
}
|
||||
}
|
||||
|
||||
//offset 4
|
||||
//offset 4
|
||||
ptxdesc->txdw1 |= cpu_to_le32(0x00);//MAC_ID
|
||||
|
||||
ptxdesc->txdw1 |= cpu_to_le32((0x12<<QSEL_SHT)&0x00001f00);
|
||||
|
||||
ptxdesc->txdw1 |= cpu_to_le32((0x06<< 16) & 0x000f0000);//b mode
|
||||
|
||||
//offset 8
|
||||
//offset 8
|
||||
|
||||
//offset 12
|
||||
//offset 12
|
||||
ptxdesc->txdw3 |= cpu_to_le32((le16_to_cpu(tx_hdr->seq_ctl)<<16)&0xffff0000);
|
||||
|
||||
//offset 16
|
||||
//offset 16
|
||||
ptxdesc->txdw4 |= cpu_to_le32(BIT(8));//driver uses rate
|
||||
|
||||
|
||||
//offset 20
|
||||
|
||||
|
||||
//HW append seq
|
||||
ptxdesc->txdw4 |= cpu_to_le32(BIT(7)); // Hw set sequence number
|
||||
ptxdesc->txdw3 |= cpu_to_le32((8 <<28)); //set bit3 to 1. Suugested by TimChen. 2009.12.29.
|
||||
|
||||
|
||||
|
||||
rtl8188eu_cal_txdesc_chksum(ptxdesc);
|
||||
// ----- end of fill tx desc -----
|
||||
|
@ -1310,14 +1310,14 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
|
||||
|
||||
// ----- prepare urb for submit -----
|
||||
|
||||
|
||||
//translate DMA FIFO addr to pipehandle
|
||||
//pipe = ffaddr2pipehdl(pdvobj, MGT_QUEUE_INX);
|
||||
pipe = usb_sndbulkpipe(pdvobj->pusbdev, pHalData->Queue2EPNum[(u8)MGT_QUEUE_INX]&0x0f);
|
||||
|
||||
|
||||
usb_fill_bulk_urb(urb, pdvobj->pusbdev, pipe,
|
||||
pxmit_skb->data, pxmit_skb->len, rtl8192cu_hostap_mgnt_xmit_cb, pxmit_skb);
|
||||
|
||||
|
||||
urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
usb_anchor_urb(urb, &phostapdpriv->anchored);
|
||||
rc = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
|
@ -1327,9 +1327,9 @@ s32 rtl8188eu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt)
|
|||
}
|
||||
usb_free_urb(urb);
|
||||
|
||||
|
||||
_exit:
|
||||
|
||||
|
||||
_exit:
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
#endif
|
||||
|
@ -1338,4 +1338,3 @@ _exit:
|
|||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,29 +1,28 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8188E_FW_IMG_H
|
||||
#define __INC_HAL8188E_FW_IMG_H
|
||||
|
||||
//V10(1641)
|
||||
#define Rtl8188EFWImgArrayLength 13904
|
||||
|
||||
extern const u8 Rtl8188EFwImgArray[Rtl8188EFWImgArrayLength];
|
||||
|
||||
#endif //__INC_HAL8188E_FW_IMG_H
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8188E_FW_IMG_H
|
||||
#define __INC_HAL8188E_FW_IMG_H
|
||||
|
||||
//V10(1641)
|
||||
#define Rtl8188EFWImgArrayLength 13904
|
||||
|
||||
extern const u8 Rtl8188EFwImgArray[Rtl8188EFWImgArrayLength];
|
||||
|
||||
#endif //__INC_HAL8188E_FW_IMG_H
|
||||
|
|
|
@ -1,427 +1,426 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8188EPHYCFG_H__
|
||||
#define __INC_HAL8188EPHYCFG_H__
|
||||
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define LOOP_LIMIT 5
|
||||
#define MAX_STALL_TIME 50 //us
|
||||
#define AntennaDiversityValue 0x80 //(Adapter->bSoftwareAntennaDiversity ? 0x00:0x80)
|
||||
#define MAX_TXPWR_IDX_NMODE_92S 63
|
||||
#define Reset_Cnt_Limit 3
|
||||
|
||||
#define IQK_MAC_REG_NUM 4
|
||||
#define IQK_ADDA_REG_NUM 16
|
||||
#define IQK_BB_REG_NUM 9
|
||||
#define HP_THERMAL_NUM 8
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define MAX_AGGR_NUM 0x0B
|
||||
#else
|
||||
#define MAX_AGGR_NUM 0x07
|
||||
#endif // CONFIG_PCI_HCI
|
||||
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef enum _SwChnlCmdID{
|
||||
CmdID_End,
|
||||
CmdID_SetTxPowerLevel,
|
||||
CmdID_BBRegWrite10,
|
||||
CmdID_WritePortUlong,
|
||||
CmdID_WritePortUshort,
|
||||
CmdID_WritePortUchar,
|
||||
CmdID_RF_WriteReg,
|
||||
}SwChnlCmdID;
|
||||
|
||||
|
||||
/* 1. Switch channel related */
|
||||
typedef struct _SwChnlCmd{
|
||||
SwChnlCmdID CmdID;
|
||||
u32 Para1;
|
||||
u32 Para2;
|
||||
u32 msDelay;
|
||||
}SwChnlCmd;
|
||||
|
||||
typedef enum _HW90_BLOCK{
|
||||
HW90_BLOCK_MAC = 0,
|
||||
HW90_BLOCK_PHY0 = 1,
|
||||
HW90_BLOCK_PHY1 = 2,
|
||||
HW90_BLOCK_RF = 3,
|
||||
HW90_BLOCK_MAXIMUM = 4, // Never use this
|
||||
}HW90_BLOCK_E, *PHW90_BLOCK_E;
|
||||
|
||||
typedef enum _RF_RADIO_PATH{
|
||||
RF_PATH_A = 0, //Radio Path A
|
||||
RF_PATH_B = 1, //Radio Path B
|
||||
RF_PATH_C = 2, //Radio Path C
|
||||
RF_PATH_D = 3, //Radio Path D
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
}RF_RADIO_PATH_E, *PRF_RADIO_PATH_E;
|
||||
|
||||
#define MAX_PG_GROUP 13
|
||||
|
||||
#define RF_PATH_MAX 2
|
||||
#define MAX_RF_PATH RF_PATH_MAX
|
||||
#define MAX_TX_COUNT 4 //path numbers
|
||||
|
||||
#define CHANNEL_MAX_NUMBER 14 // 14 is the max channel number
|
||||
#define MAX_CHNL_GROUP_24G 6 // ch1~2, ch3~5, ch6~8,ch9~11,ch12~13,CH 14 total three groups
|
||||
#define CHANNEL_GROUP_MAX_88E 6
|
||||
|
||||
typedef enum _WIRELESS_MODE {
|
||||
WIRELESS_MODE_UNKNOWN = 0x00,
|
||||
WIRELESS_MODE_A = BIT2,
|
||||
WIRELESS_MODE_B = BIT0,
|
||||
WIRELESS_MODE_G = BIT1,
|
||||
WIRELESS_MODE_AUTO = BIT5,
|
||||
WIRELESS_MODE_N_24G = BIT3,
|
||||
WIRELESS_MODE_N_5G = BIT4,
|
||||
WIRELESS_MODE_AC = BIT6
|
||||
} WIRELESS_MODE;
|
||||
|
||||
|
||||
typedef enum _PHY_Rate_Tx_Power_Offset_Area{
|
||||
RA_OFFSET_LEGACY_OFDM1,
|
||||
RA_OFFSET_LEGACY_OFDM2,
|
||||
RA_OFFSET_HT_OFDM1,
|
||||
RA_OFFSET_HT_OFDM2,
|
||||
RA_OFFSET_HT_OFDM3,
|
||||
RA_OFFSET_HT_OFDM4,
|
||||
RA_OFFSET_HT_CCK,
|
||||
}RA_OFFSET_AREA,*PRA_OFFSET_AREA;
|
||||
|
||||
|
||||
/* BB/RF related */
|
||||
typedef enum _RF_TYPE_8190P{
|
||||
RF_TYPE_MIN, // 0
|
||||
RF_8225=1, // 1 11b/g RF for verification only
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8258=3, // 3 11a/b/g/n RF
|
||||
RF_6052=4, // 4 11b/g/n RF
|
||||
//RF_6052=5, // 4 11b/g/n RF
|
||||
// TODO: We sholud remove this psudo PHY RF after we get new RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
}RF_TYPE_8190P_E,*PRF_TYPE_8190P_E;
|
||||
|
||||
|
||||
typedef struct _BB_REGISTER_DEFINITION{
|
||||
u32 rfintfs; // set software control:
|
||||
// 0x870~0x877[8 bytes]
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
// 0x8e0~0x8e7[8 bytes]
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rf3wireOffset; // LSSI data:
|
||||
// 0x840~0x84f [16 bytes]
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
// 0x878~0x87f [8 bytes]
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
// 0x80c~0x80f [4 bytes]
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
// 0x820~0x823,0x828~0x82b, 0x830~0x833, 0x838~0x83b [16 bytes]
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
// 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
// 0x858~0x85f [16 bytes]
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
// 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [16 bytes]
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
// 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, 0xc28~0xc2b [16 bytes]
|
||||
|
||||
u32 rfTxIQImbalance; //OFDM Tx IQ imbalance matrix
|
||||
// 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, 0xc98~0xc9b [16 bytes]
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
// 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, 0xc9c~0xc9f [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
// 0x8a0~0x8af [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
|
||||
}BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
u32 r_ant_l:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_ht1:4;
|
||||
u32 r_ant_ht2:4;
|
||||
u32 r_ant_ht_s1:4;
|
||||
u32 r_ant_non_ht_s1:4;
|
||||
u32 OFDM_TXSC:2;
|
||||
u32 Reserved:2;
|
||||
}R_ANTENNA_SELECT_OFDM;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_CCK{
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable:2;
|
||||
u8 r_ccktx_enable:4;
|
||||
}R_ANTENNA_SELECT_CCK;
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export Marco Definition---------------------------*/
|
||||
/*------------------------Export Marco Definition---------------------------*/
|
||||
|
||||
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
//
|
||||
// BB and RF register read/write
|
||||
//
|
||||
u32 rtl8188e_PHY_QueryBBReg( IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask );
|
||||
void rtl8188e_PHY_SetBBReg( IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data );
|
||||
u32 rtl8188e_PHY_QueryRFReg( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask );
|
||||
void rtl8188e_PHY_SetRFReg( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data );
|
||||
|
||||
//
|
||||
// Initialization related function
|
||||
//
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_MACConfig8188E(IN PADAPTER Adapter );
|
||||
int PHY_BBConfig8188E(IN PADAPTER Adapter );
|
||||
int PHY_RFConfig8188E(IN PADAPTER Adapter );
|
||||
|
||||
/* RF config */
|
||||
int rtl8188e_PHY_ConfigRFWithParaFile(IN PADAPTER Adapter, IN u8 * pFileName, RF_RADIO_PATH_E eRFPath);
|
||||
int rtl8188e_PHY_ConfigRFWithHeaderFile( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath);
|
||||
|
||||
/* Read initi reg value for tx power setting. */
|
||||
void rtl8192c_PHY_GetHWRegOriginalValue( IN PADAPTER Adapter );
|
||||
|
||||
//
|
||||
// RF Power setting
|
||||
//
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
// IN RT_RF_POWER_STATE eRFPowerState);
|
||||
|
||||
//
|
||||
// BB TX Power R/W
|
||||
//
|
||||
void PHY_GetTxPowerLevel8188E( IN PADAPTER Adapter,
|
||||
OUT u32* powerlevel );
|
||||
void PHY_SetTxPowerLevel8188E( IN PADAPTER Adapter,
|
||||
IN u8 channel );
|
||||
BOOLEAN PHY_UpdateTxPowerDbm8188E( IN PADAPTER Adapter,
|
||||
IN int powerInDbm );
|
||||
|
||||
//
|
||||
VOID
|
||||
PHY_ScanOperationBackup8188E(IN PADAPTER Adapter,
|
||||
IN u8 Operation );
|
||||
|
||||
//
|
||||
// Switch bandwidth for 8192S
|
||||
//
|
||||
//extern void PHY_SetBWModeCallback8192C( IN PRT_TIMER pTimer );
|
||||
void PHY_SetBWMode8188E( IN PADAPTER pAdapter,
|
||||
IN HT_CHANNEL_WIDTH ChnlWidth,
|
||||
IN unsigned char Offset );
|
||||
|
||||
//
|
||||
// Set FW CMD IO for 8192S.
|
||||
//
|
||||
//extern BOOLEAN HalSetIO8192C( IN PADAPTER Adapter,
|
||||
// IN IO_TYPE IOType);
|
||||
|
||||
//
|
||||
// Set A2 entry to fw for 8192S
|
||||
//
|
||||
extern void FillA2Entry8192C( IN PADAPTER Adapter,
|
||||
IN u8 index,
|
||||
IN u8* val);
|
||||
|
||||
|
||||
//
|
||||
// channel switch related funciton
|
||||
//
|
||||
//extern void PHY_SwChnlCallback8192C( IN PRT_TIMER pTimer );
|
||||
void PHY_SwChnl8188E( IN PADAPTER pAdapter,
|
||||
IN u8 channel );
|
||||
// Call after initialization
|
||||
void PHY_SwChnlPhy8192C( IN PADAPTER pAdapter,
|
||||
IN u8 channel );
|
||||
|
||||
void ChkFwCmdIoDone( IN PADAPTER Adapter);
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
void PHY_SetMonitorMode8192C(IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bEnableMonitorMode );
|
||||
|
||||
BOOLEAN PHY_CheckIsLegalRfPath8192C(IN PADAPTER pAdapter,
|
||||
IN u32 eRFPath );
|
||||
|
||||
VOID PHY_SetRFPathSwitch_8188E(IN PADAPTER pAdapter, IN BOOLEAN bMain);
|
||||
|
||||
extern VOID
|
||||
PHY_SwitchEphyParameter(
|
||||
IN PADAPTER Adapter
|
||||
);
|
||||
|
||||
extern VOID
|
||||
PHY_EnableHostClkReq(
|
||||
IN PADAPTER Adapter
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
SetAntennaConfig92C(
|
||||
IN PADAPTER Adapter,
|
||||
IN u8 DefaultAnt
|
||||
);
|
||||
|
||||
#ifdef CONFIG_PHY_SETTING_WITH_ODM
|
||||
VOID
|
||||
storePwrIndexDiffRateOffset(
|
||||
IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data
|
||||
);
|
||||
#endif //CONFIG_PHY_SETTING_WITH_ODM
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
|
||||
#define PHY_QueryBBReg(Adapter, RegAddr, BitMask) rtl8188e_PHY_QueryBBReg((Adapter), (RegAddr), (BitMask))
|
||||
#define PHY_SetBBReg(Adapter, RegAddr, BitMask, Data) rtl8188e_PHY_SetBBReg((Adapter), (RegAddr), (BitMask), (Data))
|
||||
#define PHY_QueryRFReg(Adapter, eRFPath, RegAddr, BitMask) rtl8188e_PHY_QueryRFReg((Adapter), (eRFPath), (RegAddr), (BitMask))
|
||||
#define PHY_SetRFReg(Adapter, eRFPath, RegAddr, BitMask, Data) rtl8188e_PHY_SetRFReg((Adapter), (eRFPath), (RegAddr), (BitMask), (Data))
|
||||
|
||||
#define PHY_SetMacReg PHY_SetBBReg
|
||||
|
||||
|
||||
//
|
||||
// Initialization related function
|
||||
//
|
||||
/* MAC/BB/RF HAL config */
|
||||
//extern s32 PHY_MACConfig8723(PADAPTER padapter);
|
||||
//s32 PHY_BBConfig8723(PADAPTER padapter);
|
||||
//s32 PHY_RFConfig8723(PADAPTER padapter);
|
||||
|
||||
|
||||
|
||||
//==================================================================
|
||||
// Note: If SIC_ENABLE under PCIE, because of the slow operation
|
||||
// you should
|
||||
// 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows
|
||||
// 3) "#define RTL8190_Download_Firmware_From_Header 0" in Precomp.h.WlanE.Windows if needed.
|
||||
//
|
||||
#if (RTL8188E_SUPPORT == 1) && (RTL8188E_FPGA_TRUE_PHY_VERIFICATION == 1)
|
||||
#define SIC_ENABLE 1
|
||||
#define SIC_HW_SUPPORT 1
|
||||
#else
|
||||
#define SIC_ENABLE 0
|
||||
#define SIC_HW_SUPPORT 0
|
||||
#endif
|
||||
//==================================================================
|
||||
|
||||
|
||||
#define SIC_MAX_POLL_CNT 5
|
||||
|
||||
#if (SIC_HW_SUPPORT == 1)
|
||||
#define SIC_CMD_READY 0
|
||||
#define SIC_CMD_PREWRITE 0x1
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#define SIC_CMD_WRITE 0x40
|
||||
#define SIC_CMD_PREREAD 0x2
|
||||
#define SIC_CMD_READ 0x80
|
||||
#define SIC_CMD_INIT 0xf0
|
||||
#define SIC_INIT_VAL 0xff
|
||||
|
||||
#define SIC_INIT_REG 0x1b7
|
||||
#define SIC_CMD_REG 0x1EB // 1byte
|
||||
#define SIC_ADDR_REG 0x1E8 // 1b4~1b5, 2 bytes
|
||||
#define SIC_DATA_REG 0x1EC // 1b0~1b3
|
||||
#else
|
||||
#define SIC_CMD_WRITE 0x11
|
||||
#define SIC_CMD_PREREAD 0x2
|
||||
#define SIC_CMD_READ 0x12
|
||||
#define SIC_CMD_INIT 0x1f
|
||||
#define SIC_INIT_VAL 0xff
|
||||
|
||||
#define SIC_INIT_REG 0x1b7
|
||||
#define SIC_CMD_REG 0x1b6 // 1byte
|
||||
#define SIC_ADDR_REG 0x1b4 // 1b4~1b5, 2 bytes
|
||||
#define SIC_DATA_REG 0x1b0 // 1b0~1b3
|
||||
#endif
|
||||
#else
|
||||
#define SIC_CMD_READY 0
|
||||
#define SIC_CMD_WRITE 1
|
||||
#define SIC_CMD_READ 2
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#define SIC_CMD_REG 0x1EB // 1byte
|
||||
#define SIC_ADDR_REG 0x1E8 // 1b9~1ba, 2 bytes
|
||||
#define SIC_DATA_REG 0x1EC // 1bc~1bf
|
||||
#else
|
||||
#define SIC_CMD_REG 0x1b8 // 1byte
|
||||
#define SIC_ADDR_REG 0x1b9 // 1b9~1ba, 2 bytes
|
||||
#define SIC_DATA_REG 0x1bc // 1bc~1bf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (SIC_ENABLE == 1)
|
||||
VOID SIC_Init(IN PADAPTER Adapter);
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __INC_HAL8192CPHYCFG_H
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8188EPHYCFG_H__
|
||||
#define __INC_HAL8188EPHYCFG_H__
|
||||
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define LOOP_LIMIT 5
|
||||
#define MAX_STALL_TIME 50 //us
|
||||
#define AntennaDiversityValue 0x80 //(Adapter->bSoftwareAntennaDiversity ? 0x00:0x80)
|
||||
#define MAX_TXPWR_IDX_NMODE_92S 63
|
||||
#define Reset_Cnt_Limit 3
|
||||
|
||||
#define IQK_MAC_REG_NUM 4
|
||||
#define IQK_ADDA_REG_NUM 16
|
||||
#define IQK_BB_REG_NUM 9
|
||||
#define HP_THERMAL_NUM 8
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define MAX_AGGR_NUM 0x0B
|
||||
#else
|
||||
#define MAX_AGGR_NUM 0x07
|
||||
#endif // CONFIG_PCI_HCI
|
||||
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef enum _SwChnlCmdID{
|
||||
CmdID_End,
|
||||
CmdID_SetTxPowerLevel,
|
||||
CmdID_BBRegWrite10,
|
||||
CmdID_WritePortUlong,
|
||||
CmdID_WritePortUshort,
|
||||
CmdID_WritePortUchar,
|
||||
CmdID_RF_WriteReg,
|
||||
}SwChnlCmdID;
|
||||
|
||||
|
||||
/* 1. Switch channel related */
|
||||
typedef struct _SwChnlCmd{
|
||||
SwChnlCmdID CmdID;
|
||||
u32 Para1;
|
||||
u32 Para2;
|
||||
u32 msDelay;
|
||||
}SwChnlCmd;
|
||||
|
||||
typedef enum _HW90_BLOCK{
|
||||
HW90_BLOCK_MAC = 0,
|
||||
HW90_BLOCK_PHY0 = 1,
|
||||
HW90_BLOCK_PHY1 = 2,
|
||||
HW90_BLOCK_RF = 3,
|
||||
HW90_BLOCK_MAXIMUM = 4, // Never use this
|
||||
}HW90_BLOCK_E, *PHW90_BLOCK_E;
|
||||
|
||||
typedef enum _RF_RADIO_PATH{
|
||||
RF_PATH_A = 0, //Radio Path A
|
||||
RF_PATH_B = 1, //Radio Path B
|
||||
RF_PATH_C = 2, //Radio Path C
|
||||
RF_PATH_D = 3, //Radio Path D
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
}RF_RADIO_PATH_E, *PRF_RADIO_PATH_E;
|
||||
|
||||
#define MAX_PG_GROUP 13
|
||||
|
||||
#define RF_PATH_MAX 2
|
||||
#define MAX_RF_PATH RF_PATH_MAX
|
||||
#define MAX_TX_COUNT 4 //path numbers
|
||||
|
||||
#define CHANNEL_MAX_NUMBER 14 // 14 is the max channel number
|
||||
#define MAX_CHNL_GROUP_24G 6 // ch1~2, ch3~5, ch6~8,ch9~11,ch12~13,CH 14 total three groups
|
||||
#define CHANNEL_GROUP_MAX_88E 6
|
||||
|
||||
typedef enum _WIRELESS_MODE {
|
||||
WIRELESS_MODE_UNKNOWN = 0x00,
|
||||
WIRELESS_MODE_A = BIT2,
|
||||
WIRELESS_MODE_B = BIT0,
|
||||
WIRELESS_MODE_G = BIT1,
|
||||
WIRELESS_MODE_AUTO = BIT5,
|
||||
WIRELESS_MODE_N_24G = BIT3,
|
||||
WIRELESS_MODE_N_5G = BIT4,
|
||||
WIRELESS_MODE_AC = BIT6
|
||||
} WIRELESS_MODE;
|
||||
|
||||
|
||||
typedef enum _PHY_Rate_Tx_Power_Offset_Area{
|
||||
RA_OFFSET_LEGACY_OFDM1,
|
||||
RA_OFFSET_LEGACY_OFDM2,
|
||||
RA_OFFSET_HT_OFDM1,
|
||||
RA_OFFSET_HT_OFDM2,
|
||||
RA_OFFSET_HT_OFDM3,
|
||||
RA_OFFSET_HT_OFDM4,
|
||||
RA_OFFSET_HT_CCK,
|
||||
}RA_OFFSET_AREA,*PRA_OFFSET_AREA;
|
||||
|
||||
|
||||
/* BB/RF related */
|
||||
typedef enum _RF_TYPE_8190P{
|
||||
RF_TYPE_MIN, // 0
|
||||
RF_8225=1, // 1 11b/g RF for verification only
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8258=3, // 3 11a/b/g/n RF
|
||||
RF_6052=4, // 4 11b/g/n RF
|
||||
//RF_6052=5, // 4 11b/g/n RF
|
||||
// TODO: We sholud remove this psudo PHY RF after we get new RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
}RF_TYPE_8190P_E,*PRF_TYPE_8190P_E;
|
||||
|
||||
|
||||
typedef struct _BB_REGISTER_DEFINITION{
|
||||
u32 rfintfs; // set software control:
|
||||
// 0x870~0x877[8 bytes]
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
// 0x8e0~0x8e7[8 bytes]
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rf3wireOffset; // LSSI data:
|
||||
// 0x840~0x84f [16 bytes]
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
// 0x878~0x87f [8 bytes]
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
// 0x80c~0x80f [4 bytes]
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
// 0x820~0x823,0x828~0x82b, 0x830~0x833, 0x838~0x83b [16 bytes]
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
// 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
// 0x858~0x85f [16 bytes]
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
// 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [16 bytes]
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
// 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, 0xc28~0xc2b [16 bytes]
|
||||
|
||||
u32 rfTxIQImbalance; //OFDM Tx IQ imbalance matrix
|
||||
// 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, 0xc98~0xc9b [16 bytes]
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
// 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, 0xc9c~0xc9f [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
// 0x8a0~0x8af [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
|
||||
}BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
u32 r_ant_l:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_ht1:4;
|
||||
u32 r_ant_ht2:4;
|
||||
u32 r_ant_ht_s1:4;
|
||||
u32 r_ant_non_ht_s1:4;
|
||||
u32 OFDM_TXSC:2;
|
||||
u32 Reserved:2;
|
||||
}R_ANTENNA_SELECT_OFDM;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_CCK{
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable:2;
|
||||
u8 r_ccktx_enable:4;
|
||||
}R_ANTENNA_SELECT_CCK;
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export Marco Definition---------------------------*/
|
||||
/*------------------------Export Marco Definition---------------------------*/
|
||||
|
||||
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
//
|
||||
// BB and RF register read/write
|
||||
//
|
||||
u32 rtl8188e_PHY_QueryBBReg( IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask );
|
||||
void rtl8188e_PHY_SetBBReg( IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data );
|
||||
u32 rtl8188e_PHY_QueryRFReg( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask );
|
||||
void rtl8188e_PHY_SetRFReg( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data );
|
||||
|
||||
//
|
||||
// Initialization related function
|
||||
//
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_MACConfig8188E(IN PADAPTER Adapter );
|
||||
int PHY_BBConfig8188E(IN PADAPTER Adapter );
|
||||
int PHY_RFConfig8188E(IN PADAPTER Adapter );
|
||||
|
||||
/* RF config */
|
||||
int rtl8188e_PHY_ConfigRFWithParaFile(IN PADAPTER Adapter, IN u8 * pFileName, RF_RADIO_PATH_E eRFPath);
|
||||
int rtl8188e_PHY_ConfigRFWithHeaderFile( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath);
|
||||
|
||||
/* Read initi reg value for tx power setting. */
|
||||
void rtl8192c_PHY_GetHWRegOriginalValue( IN PADAPTER Adapter );
|
||||
|
||||
//
|
||||
// RF Power setting
|
||||
//
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
// IN RT_RF_POWER_STATE eRFPowerState);
|
||||
|
||||
//
|
||||
// BB TX Power R/W
|
||||
//
|
||||
void PHY_GetTxPowerLevel8188E( IN PADAPTER Adapter,
|
||||
OUT u32* powerlevel );
|
||||
void PHY_SetTxPowerLevel8188E( IN PADAPTER Adapter,
|
||||
IN u8 channel );
|
||||
BOOLEAN PHY_UpdateTxPowerDbm8188E( IN PADAPTER Adapter,
|
||||
IN int powerInDbm );
|
||||
|
||||
//
|
||||
VOID
|
||||
PHY_ScanOperationBackup8188E(IN PADAPTER Adapter,
|
||||
IN u8 Operation );
|
||||
|
||||
//
|
||||
// Switch bandwidth for 8192S
|
||||
//
|
||||
//extern void PHY_SetBWModeCallback8192C( IN PRT_TIMER pTimer );
|
||||
void PHY_SetBWMode8188E( IN PADAPTER pAdapter,
|
||||
IN HT_CHANNEL_WIDTH ChnlWidth,
|
||||
IN unsigned char Offset );
|
||||
|
||||
//
|
||||
// Set FW CMD IO for 8192S.
|
||||
//
|
||||
//extern BOOLEAN HalSetIO8192C( IN PADAPTER Adapter,
|
||||
// IN IO_TYPE IOType);
|
||||
|
||||
//
|
||||
// Set A2 entry to fw for 8192S
|
||||
//
|
||||
extern void FillA2Entry8192C( IN PADAPTER Adapter,
|
||||
IN u8 index,
|
||||
IN u8* val);
|
||||
|
||||
|
||||
//
|
||||
// channel switch related funciton
|
||||
//
|
||||
//extern void PHY_SwChnlCallback8192C( IN PRT_TIMER pTimer );
|
||||
void PHY_SwChnl8188E( IN PADAPTER pAdapter,
|
||||
IN u8 channel );
|
||||
// Call after initialization
|
||||
void PHY_SwChnlPhy8192C( IN PADAPTER pAdapter,
|
||||
IN u8 channel );
|
||||
|
||||
void ChkFwCmdIoDone( IN PADAPTER Adapter);
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
void PHY_SetMonitorMode8192C(IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bEnableMonitorMode );
|
||||
|
||||
BOOLEAN PHY_CheckIsLegalRfPath8192C(IN PADAPTER pAdapter,
|
||||
IN u32 eRFPath );
|
||||
|
||||
VOID PHY_SetRFPathSwitch_8188E(IN PADAPTER pAdapter, IN BOOLEAN bMain);
|
||||
|
||||
extern VOID
|
||||
PHY_SwitchEphyParameter(
|
||||
IN PADAPTER Adapter
|
||||
);
|
||||
|
||||
extern VOID
|
||||
PHY_EnableHostClkReq(
|
||||
IN PADAPTER Adapter
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
SetAntennaConfig92C(
|
||||
IN PADAPTER Adapter,
|
||||
IN u8 DefaultAnt
|
||||
);
|
||||
|
||||
#ifdef CONFIG_PHY_SETTING_WITH_ODM
|
||||
VOID
|
||||
storePwrIndexDiffRateOffset(
|
||||
IN PADAPTER Adapter,
|
||||
IN u32 RegAddr,
|
||||
IN u32 BitMask,
|
||||
IN u32 Data
|
||||
);
|
||||
#endif //CONFIG_PHY_SETTING_WITH_ODM
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
|
||||
#define PHY_QueryBBReg(Adapter, RegAddr, BitMask) rtl8188e_PHY_QueryBBReg((Adapter), (RegAddr), (BitMask))
|
||||
#define PHY_SetBBReg(Adapter, RegAddr, BitMask, Data) rtl8188e_PHY_SetBBReg((Adapter), (RegAddr), (BitMask), (Data))
|
||||
#define PHY_QueryRFReg(Adapter, eRFPath, RegAddr, BitMask) rtl8188e_PHY_QueryRFReg((Adapter), (eRFPath), (RegAddr), (BitMask))
|
||||
#define PHY_SetRFReg(Adapter, eRFPath, RegAddr, BitMask, Data) rtl8188e_PHY_SetRFReg((Adapter), (eRFPath), (RegAddr), (BitMask), (Data))
|
||||
|
||||
#define PHY_SetMacReg PHY_SetBBReg
|
||||
|
||||
|
||||
//
|
||||
// Initialization related function
|
||||
//
|
||||
/* MAC/BB/RF HAL config */
|
||||
//extern s32 PHY_MACConfig8723(PADAPTER padapter);
|
||||
//s32 PHY_BBConfig8723(PADAPTER padapter);
|
||||
//s32 PHY_RFConfig8723(PADAPTER padapter);
|
||||
|
||||
|
||||
|
||||
//==================================================================
|
||||
// Note: If SIC_ENABLE under PCIE, because of the slow operation
|
||||
// you should
|
||||
// 2) "#define RTL8723_FPGA_VERIFICATION 1" in Precomp.h.WlanE.Windows
|
||||
// 3) "#define RTL8190_Download_Firmware_From_Header 0" in Precomp.h.WlanE.Windows if needed.
|
||||
//
|
||||
#if (RTL8188E_SUPPORT == 1) && (RTL8188E_FPGA_TRUE_PHY_VERIFICATION == 1)
|
||||
#define SIC_ENABLE 1
|
||||
#define SIC_HW_SUPPORT 1
|
||||
#else
|
||||
#define SIC_ENABLE 0
|
||||
#define SIC_HW_SUPPORT 0
|
||||
#endif
|
||||
//==================================================================
|
||||
|
||||
|
||||
#define SIC_MAX_POLL_CNT 5
|
||||
|
||||
#if (SIC_HW_SUPPORT == 1)
|
||||
#define SIC_CMD_READY 0
|
||||
#define SIC_CMD_PREWRITE 0x1
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#define SIC_CMD_WRITE 0x40
|
||||
#define SIC_CMD_PREREAD 0x2
|
||||
#define SIC_CMD_READ 0x80
|
||||
#define SIC_CMD_INIT 0xf0
|
||||
#define SIC_INIT_VAL 0xff
|
||||
|
||||
#define SIC_INIT_REG 0x1b7
|
||||
#define SIC_CMD_REG 0x1EB // 1byte
|
||||
#define SIC_ADDR_REG 0x1E8 // 1b4~1b5, 2 bytes
|
||||
#define SIC_DATA_REG 0x1EC // 1b0~1b3
|
||||
#else
|
||||
#define SIC_CMD_WRITE 0x11
|
||||
#define SIC_CMD_PREREAD 0x2
|
||||
#define SIC_CMD_READ 0x12
|
||||
#define SIC_CMD_INIT 0x1f
|
||||
#define SIC_INIT_VAL 0xff
|
||||
|
||||
#define SIC_INIT_REG 0x1b7
|
||||
#define SIC_CMD_REG 0x1b6 // 1byte
|
||||
#define SIC_ADDR_REG 0x1b4 // 1b4~1b5, 2 bytes
|
||||
#define SIC_DATA_REG 0x1b0 // 1b0~1b3
|
||||
#endif
|
||||
#else
|
||||
#define SIC_CMD_READY 0
|
||||
#define SIC_CMD_WRITE 1
|
||||
#define SIC_CMD_READ 2
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#define SIC_CMD_REG 0x1EB // 1byte
|
||||
#define SIC_ADDR_REG 0x1E8 // 1b9~1ba, 2 bytes
|
||||
#define SIC_DATA_REG 0x1EC // 1bc~1bf
|
||||
#else
|
||||
#define SIC_CMD_REG 0x1b8 // 1byte
|
||||
#define SIC_ADDR_REG 0x1b9 // 1b9~1ba, 2 bytes
|
||||
#define SIC_DATA_REG 0x1bc // 1bc~1bf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (SIC_ENABLE == 1)
|
||||
VOID SIC_Init(IN PADAPTER Adapter);
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __INC_HAL8192CPHYCFG_H
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,177 +1,176 @@
|
|||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 "HalPwrSeqCmd.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 }, // comments 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 WLAN_PWR_CFG rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_radio_off_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_card_disable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_card_enable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_suspend_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_resume_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_hwpdn_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_enter_lps_flow[RTL8188E_TRANS_ACT_TO_LPS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_leave_lps_flow[RTL8188E_TRANS_LPS_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
|
||||
#endif //__HAL8188EPWRSEQ_H__
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 "HalPwrSeqCmd.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 }, // comments 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 WLAN_PWR_CFG rtl8188E_power_on_flow[RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_radio_off_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_card_disable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_card_enable_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_suspend_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_resume_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_hwpdn_flow[RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS+RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_enter_lps_flow[RTL8188E_TRANS_ACT_TO_LPS_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8188E_leave_lps_flow[RTL8188E_TRANS_LPS_TO_ACT_STEPS+RTL8188E_TRANS_END_STEPS];
|
||||
|
||||
#endif //__HAL8188EPWRSEQ_H__
|
||||
|
|
|
@ -1,108 +1,107 @@
|
|||
#ifndef __INC_RA_H
|
||||
#define __INC_RA_H
|
||||
/*++
|
||||
Copyright (c) Realtek Semiconductor Corp. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
RateAdaptive.h
|
||||
|
||||
Abstract:
|
||||
Prototype of RA and related data structure.
|
||||
|
||||
Major Change History:
|
||||
When Who What
|
||||
---------- --------------- -------------------------------
|
||||
2011-08-12 Page Create.
|
||||
--*/
|
||||
|
||||
// Rate adaptive define
|
||||
#define PERENTRY 23
|
||||
#define RETRYSIZE 5
|
||||
#define RATESIZE 28
|
||||
#define TX_RPT2_ITEM_SIZE 8
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE != ODM_MP)
|
||||
//
|
||||
// TX report 2 format in Rx desc
|
||||
//
|
||||
#define GET_TX_RPT2_DESC_PKT_LEN_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc, 0, 9)
|
||||
#define GET_TX_RPT2_DESC_MACID_VALID_1_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+16, 0, 32)
|
||||
#define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+20, 0, 32)
|
||||
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr) LE_BITS_TO_4BYTE( __pAddr, 0, 16)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) LE_BITS_TO_1BYTE( __pAddr+3, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_3(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_4(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+1, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_DROP_0(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_DROP_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+3, 0, 8)
|
||||
#endif
|
||||
|
||||
// End rate adaptive define
|
||||
|
||||
VOID
|
||||
ODM_RASupport_Init(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init_all(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetShortGI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetDecisionRate_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetHwPwrStatus_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
VOID
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte RateID,
|
||||
IN u4Byte RateMask,
|
||||
IN u1Byte SGIEnable
|
||||
);
|
||||
|
||||
VOID
|
||||
ODM_RA_SetRSSI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
);
|
||||
|
||||
VOID
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN pu1Byte TxRPT_Buf,
|
||||
IN u2Byte TxRPT_Len,
|
||||
IN u4Byte MacIDValidEntry0,
|
||||
IN u4Byte MacIDValidEntry1
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
ODM_RA_Set_TxRPT_Time(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
);
|
||||
#endif
|
||||
|
||||
#ifndef __INC_RA_H
|
||||
#define __INC_RA_H
|
||||
/*++
|
||||
Copyright (c) Realtek Semiconductor Corp. All rights reserved.
|
||||
|
||||
Module Name:
|
||||
RateAdaptive.h
|
||||
|
||||
Abstract:
|
||||
Prototype of RA and related data structure.
|
||||
|
||||
Major Change History:
|
||||
When Who What
|
||||
---------- --------------- -------------------------------
|
||||
2011-08-12 Page Create.
|
||||
--*/
|
||||
|
||||
// Rate adaptive define
|
||||
#define PERENTRY 23
|
||||
#define RETRYSIZE 5
|
||||
#define RATESIZE 28
|
||||
#define TX_RPT2_ITEM_SIZE 8
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE != ODM_MP)
|
||||
//
|
||||
// TX report 2 format in Rx desc
|
||||
//
|
||||
#define GET_TX_RPT2_DESC_PKT_LEN_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc, 0, 9)
|
||||
#define GET_TX_RPT2_DESC_MACID_VALID_1_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+16, 0, 32)
|
||||
#define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__pRxStatusDesc) LE_BITS_TO_4BYTE( __pRxStatusDesc+20, 0, 32)
|
||||
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_0(__pAddr) LE_BITS_TO_4BYTE( __pAddr, 0, 16)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_2(__pAddr) LE_BITS_TO_1BYTE( __pAddr+3, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_3(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_RERTY_4(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+1, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_DROP_0(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+2, 0, 8)
|
||||
#define GET_TX_REPORT_TYPE1_DROP_1(__pAddr) LE_BITS_TO_1BYTE( __pAddr+4+3, 0, 8)
|
||||
#endif
|
||||
|
||||
// End rate adaptive define
|
||||
|
||||
VOID
|
||||
ODM_RASupport_Init(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init_all(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
int
|
||||
ODM_RAInfo_Init(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetShortGI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetDecisionRate_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
|
||||
u1Byte
|
||||
ODM_RA_GetHwPwrStatus_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID
|
||||
);
|
||||
VOID
|
||||
ODM_RA_UpdateRateInfo_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte RateID,
|
||||
IN u4Byte RateMask,
|
||||
IN u1Byte SGIEnable
|
||||
);
|
||||
|
||||
VOID
|
||||
ODM_RA_SetRSSI_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u1Byte MacID,
|
||||
IN u1Byte Rssi
|
||||
);
|
||||
|
||||
VOID
|
||||
ODM_RA_TxRPT2Handle_8188E(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN pu1Byte TxRPT_Buf,
|
||||
IN u2Byte TxRPT_Len,
|
||||
IN u4Byte MacIDValidEntry0,
|
||||
IN u4Byte MacIDValidEntry1
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
ODM_RA_Set_TxRPT_Time(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
IN u2Byte minRptTime
|
||||
);
|
||||
#endif
|
||||
|
|
|
@ -1,47 +1,46 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
//============================================================
|
||||
// File Name: Hal8188EReg.h
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
// This file is for RTL8188E register definition.
|
||||
//
|
||||
//
|
||||
//============================================================
|
||||
#ifndef __HAL_8188E_REG_H__
|
||||
#define __HAL_8188E_REG_H__
|
||||
|
||||
//
|
||||
// Register Definition
|
||||
//
|
||||
#define TRX_ANTDIV_PATH 0x860
|
||||
#define RX_ANTDIV_PATH 0xb2c
|
||||
#define ODM_R_A_AGC_CORE1_8188E 0xc50
|
||||
|
||||
|
||||
//
|
||||
// Bitmap Definition
|
||||
//
|
||||
#define BIT_FA_RESET_8188E BIT0
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
//============================================================
|
||||
// File Name: Hal8188EReg.h
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
// This file is for RTL8188E register definition.
|
||||
//
|
||||
//
|
||||
//============================================================
|
||||
#ifndef __HAL_8188E_REG_H__
|
||||
#define __HAL_8188E_REG_H__
|
||||
|
||||
//
|
||||
// Register Definition
|
||||
//
|
||||
#define TRX_ANTDIV_PATH 0x860
|
||||
#define RX_ANTDIV_PATH 0xb2c
|
||||
#define ODM_R_A_AGC_CORE1_8188E 0xc50
|
||||
|
||||
|
||||
//
|
||||
// Bitmap Definition
|
||||
//
|
||||
#define BIT_FA_RESET_8188E BIT0
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -21,18 +21,18 @@
|
|||
* Module: __INC_HAL8192CPHYCFG_H
|
||||
*
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
*
|
||||
* Export: Constants, macro, functions(API), global variables(None).
|
||||
*
|
||||
* Abbrev:
|
||||
* Abbrev:
|
||||
*
|
||||
* History:
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* 2. Reorganize code architecture.
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
/* Check to see if the file has been included already. */
|
||||
#ifndef __INC_HAL8192CPHYCFG_H
|
||||
|
@ -79,7 +79,7 @@
|
|||
/*--------------------------Define Parameters-------------------------------*/
|
||||
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef enum _SwChnlCmdID{
|
||||
CmdID_End,
|
||||
CmdID_SetTxPowerLevel,
|
||||
|
@ -112,7 +112,7 @@ typedef enum _RF_RADIO_PATH{
|
|||
RF_PATH_B = 1, //Radio Path B
|
||||
RF_PATH_C = 2, //Radio Path C
|
||||
RF_PATH_D = 3, //Radio Path D
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
}RF_RADIO_PATH_E, *PRF_RADIO_PATH_E;
|
||||
|
||||
#define RF_PATH_MAX 2
|
||||
|
@ -122,12 +122,12 @@ typedef enum _RF_RADIO_PATH{
|
|||
|
||||
typedef enum _WIRELESS_MODE {
|
||||
WIRELESS_MODE_UNKNOWN = 0x00,
|
||||
WIRELESS_MODE_A = BIT2,
|
||||
WIRELESS_MODE_B = BIT0,
|
||||
WIRELESS_MODE_G = BIT1,
|
||||
WIRELESS_MODE_AUTO = BIT5,
|
||||
WIRELESS_MODE_N_24G = BIT3,
|
||||
WIRELESS_MODE_N_5G = BIT4,
|
||||
WIRELESS_MODE_A = BIT2,
|
||||
WIRELESS_MODE_B = BIT0,
|
||||
WIRELESS_MODE_G = BIT1,
|
||||
WIRELESS_MODE_AUTO = BIT5,
|
||||
WIRELESS_MODE_N_24G = BIT3,
|
||||
WIRELESS_MODE_N_5G = BIT4,
|
||||
WIRELESS_MODE_AC = BIT6
|
||||
} WIRELESS_MODE;
|
||||
|
||||
|
@ -152,75 +152,75 @@ typedef enum _PHY_Rate_Tx_Power_Offset_Area{
|
|||
typedef enum _RF_TYPE_8190P{
|
||||
RF_TYPE_MIN, // 0
|
||||
RF_8225=1, // 1 11b/g RF for verification only
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8258=3, // 3 11a/b/g/n RF
|
||||
RF_6052=4, // 4 11b/g/n RF
|
||||
//RF_6052=5, // 4 11b/g/n RF
|
||||
// TODO: We sholud remove this psudo PHY RF after we get new RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
}RF_TYPE_8190P_E,*PRF_TYPE_8190P_E;
|
||||
|
||||
|
||||
typedef struct _BB_REGISTER_DEFINITION{
|
||||
u32 rfintfs; // set software control:
|
||||
u32 rfintfs; // set software control:
|
||||
// 0x870~0x877[8 bytes]
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
// 0x8e0~0x8e7[8 bytes]
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
|
||||
u32 rf3wireOffset; // LSSI data:
|
||||
// 0x840~0x84f [16 bytes]
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
// 0x878~0x87f [8 bytes]
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
// 0x80c~0x80f [4 bytes]
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
// 0x820~0x823,0x828~0x82b, 0x830~0x833, 0x838~0x83b [16 bytes]
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
// 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
// 0x858~0x85f [16 bytes]
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
// 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [16 bytes]
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
// 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, 0xc28~0xc2b [16 bytes]
|
||||
|
||||
|
||||
u32 rfTxIQImbalance; //OFDM Tx IQ imbalance matrix
|
||||
// 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, 0xc98~0xc9b [16 bytes]
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
// 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, 0xc9c~0xc9f [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
// 0x8a0~0x8af [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
|
||||
}BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
u32 r_ant_l:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_ht1:4;
|
||||
u32 r_ant_ht2:4;
|
||||
u32 r_ant_ht_s1:4;
|
||||
|
@ -230,12 +230,12 @@ typedef struct _R_ANTENNA_SELECT_OFDM{
|
|||
}R_ANTENNA_SELECT_OFDM;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_CCK{
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable:2;
|
||||
u8 r_ccktx_enable:4;
|
||||
}R_ANTENNA_SELECT_CCK;
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
@ -276,7 +276,7 @@ int PHY_BBConfig8192C( IN PADAPTER Adapter );
|
|||
int PHY_RFConfig8192C( IN PADAPTER Adapter );
|
||||
/* RF config */
|
||||
int rtl8192c_PHY_ConfigRFWithParaFile( IN PADAPTER Adapter,
|
||||
IN u8* pFileName,
|
||||
IN u8* pFileName,
|
||||
IN RF_RADIO_PATH_E eRFPath);
|
||||
int rtl8192c_PHY_ConfigRFWithHeaderFile( IN PADAPTER Adapter,
|
||||
IN RF_RADIO_PATH_E eRFPath);
|
||||
|
@ -291,21 +291,21 @@ void rtl8192c_PHY_GetHWRegOriginalValue( IN PADAPTER Adapter );
|
|||
//
|
||||
// RF Power setting
|
||||
//
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
// IN RT_RF_POWER_STATE eRFPowerState);
|
||||
|
||||
//
|
||||
// BB TX Power R/W
|
||||
//
|
||||
void PHY_GetTxPowerLevel8192C( IN PADAPTER Adapter,
|
||||
OUT u32* powerlevel );
|
||||
OUT u32* powerlevel );
|
||||
void PHY_SetTxPowerLevel8192C( IN PADAPTER Adapter,
|
||||
IN u8 channel );
|
||||
BOOLEAN PHY_UpdateTxPowerDbm8192C( IN PADAPTER Adapter,
|
||||
IN int powerInDbm );
|
||||
|
||||
//
|
||||
VOID
|
||||
VOID
|
||||
PHY_ScanOperationBackup8192C(IN PADAPTER Adapter,
|
||||
IN u8 Operation );
|
||||
|
||||
|
@ -342,7 +342,7 @@ void PHY_SwChnlPhy8192C( IN PADAPTER pAdapter,
|
|||
IN u8 channel );
|
||||
|
||||
void ChkFwCmdIoDone( IN PADAPTER Adapter);
|
||||
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
|
@ -358,7 +358,7 @@ VOID rtl8192c_PHY_SetRFPathSwitch(IN PADAPTER pAdapter, IN BOOLEAN bMain);
|
|||
//
|
||||
// Modify the value of the hw register when beacon interval be changed.
|
||||
//
|
||||
void
|
||||
void
|
||||
rtl8192c_PHY_SetBeaconHwReg( IN PADAPTER Adapter,
|
||||
IN u16 BeaconInterval );
|
||||
|
||||
|
@ -376,7 +376,7 @@ PHY_EnableHostClkReq(
|
|||
BOOLEAN
|
||||
SetAntennaConfig92C(
|
||||
IN PADAPTER Adapter,
|
||||
IN u8 DefaultAnt
|
||||
IN u8 DefaultAnt
|
||||
);
|
||||
|
||||
#ifdef RTL8192C_RECONFIG_TO_1T1R
|
||||
|
@ -392,4 +392,3 @@ extern void PHY_Reconfig_To_1T1R(_adapter *padapter);
|
|||
#define PHY_SetMacReg PHY_SetBBReg
|
||||
|
||||
#endif // __INC_HAL8192CPHYCFG_H
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -27,18 +27,18 @@
|
|||
* 3. PMAC/BB register bit mask.
|
||||
* 4. RF reg bit mask.
|
||||
* 5. Other BB/RF relative definition.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Export: Constants, macro, functions(API), global variables(None).
|
||||
*
|
||||
* Abbrev:
|
||||
* Abbrev:
|
||||
*
|
||||
* History:
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* 2. Reorganize code architecture.
|
||||
* 09/25/2008 MH 1. Add RL6052 register definition
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __INC_HAL8192CPHYREG_H
|
||||
#define __INC_HAL8192CPHYREG_H
|
||||
|
@ -179,8 +179,8 @@
|
|||
#define rCCK0_AFESetting 0xa04 // Disable init gain now // Select RX path by RSSI
|
||||
#define rCCK0_CCA 0xa08 // Disable init gain now // Init gain
|
||||
|
||||
#define rCCK0_RxAGC1 0xa0c //AGC default value, saturation level // Antenna Diversity, RX AGC, LNA Threshold, RX LNA Threshold useless now. Not the same as 90 series
|
||||
#define rCCK0_RxAGC2 0xa10 //AGC & DAGC
|
||||
#define rCCK0_RxAGC1 0xa0c //AGC default value, saturation level // Antenna Diversity, RX AGC, LNA Threshold, RX LNA Threshold useless now. Not the same as 90 series
|
||||
#define rCCK0_RxAGC2 0xa10 //AGC & DAGC
|
||||
|
||||
#define rCCK0_RxHP 0xa14
|
||||
|
||||
|
@ -191,20 +191,20 @@
|
|||
#define rCCK0_TxFilter2 0xa24
|
||||
#define rCCK0_DebugPort 0xa28 //debug port and Tx filter3
|
||||
#define rCCK0_FalseAlarmReport 0xa2c //0xa2d useless now 0xa30-a4f channel report
|
||||
#define rCCK0_TRSSIReport 0xa50
|
||||
#define rCCK0_RxReport 0xa54 //0xa57
|
||||
#define rCCK0_FACounterLower 0xa5c //0xa5b
|
||||
#define rCCK0_FACounterUpper 0xa58 //0xa5c
|
||||
#define rCCK0_TRSSIReport 0xa50
|
||||
#define rCCK0_RxReport 0xa54 //0xa57
|
||||
#define rCCK0_FACounterLower 0xa5c //0xa5b
|
||||
#define rCCK0_FACounterUpper 0xa58 //0xa5c
|
||||
//
|
||||
// PageB(0xB00)
|
||||
//
|
||||
#define rPdp_AntA 0xb00
|
||||
#define rPdp_AntA_4 0xb04
|
||||
#define rConfig_Pmpd_AntA 0xb28
|
||||
#define rConfig_AntA 0xb68
|
||||
#define rConfig_AntB 0xb6c
|
||||
#define rPdp_AntB 0xb70
|
||||
#define rPdp_AntB_4 0xb74
|
||||
#define rPdp_AntA 0xb00
|
||||
#define rPdp_AntA_4 0xb04
|
||||
#define rConfig_Pmpd_AntA 0xb28
|
||||
#define rConfig_AntA 0xb68
|
||||
#define rConfig_AntB 0xb6c
|
||||
#define rPdp_AntB 0xb70
|
||||
#define rPdp_AntB_4 0xb74
|
||||
#define rConfig_Pmpd_AntB 0xb98
|
||||
#define rAPK 0xbd8
|
||||
|
||||
|
@ -218,16 +218,16 @@
|
|||
#define rOFDM0_TRSWIsolation 0xc0c
|
||||
|
||||
#define rOFDM0_XARxAFE 0xc10 //RxIQ DC offset, Rx digital filter, DC notch filter
|
||||
#define rOFDM0_XARxIQImbalance 0xc14 //RxIQ imblance matrix
|
||||
#define rOFDM0_XBRxAFE 0xc18
|
||||
#define rOFDM0_XBRxIQImbalance 0xc1c
|
||||
#define rOFDM0_XCRxAFE 0xc20
|
||||
#define rOFDM0_XCRxIQImbalance 0xc24
|
||||
#define rOFDM0_XDRxAFE 0xc28
|
||||
#define rOFDM0_XDRxIQImbalance 0xc2c
|
||||
#define rOFDM0_XARxIQImbalance 0xc14 //RxIQ imblance matrix
|
||||
#define rOFDM0_XBRxAFE 0xc18
|
||||
#define rOFDM0_XBRxIQImbalance 0xc1c
|
||||
#define rOFDM0_XCRxAFE 0xc20
|
||||
#define rOFDM0_XCRxIQImbalance 0xc24
|
||||
#define rOFDM0_XDRxAFE 0xc28
|
||||
#define rOFDM0_XDRxIQImbalance 0xc2c
|
||||
|
||||
#define rOFDM0_RxDetector1 0xc30 //PD,BW & SBD // DM tune init gain
|
||||
#define rOFDM0_RxDetector2 0xc34 //SBD & Fame Sync.
|
||||
#define rOFDM0_RxDetector2 0xc34 //SBD & Fame Sync.
|
||||
#define rOFDM0_RxDetector3 0xc38 //Frame Sync.
|
||||
#define rOFDM0_RxDetector4 0xc3c //PD, SBD, Frame Sync & Short-GI
|
||||
|
||||
|
@ -255,7 +255,7 @@
|
|||
#define rOFDM0_XBTxIQImbalance 0xc88
|
||||
#define rOFDM0_XBTxAFE 0xc8c
|
||||
#define rOFDM0_XCTxIQImbalance 0xc90
|
||||
#define rOFDM0_XCTxAFE 0xc94
|
||||
#define rOFDM0_XCTxAFE 0xc94
|
||||
#define rOFDM0_XDTxIQImbalance 0xc98
|
||||
#define rOFDM0_XDTxAFE 0xc9c
|
||||
|
||||
|
@ -298,8 +298,8 @@
|
|||
#define rOFDM_LongCFOCD 0xdb8
|
||||
#define rOFDM_TailCFOAB 0xdbc
|
||||
#define rOFDM_TailCFOCD 0xdc0
|
||||
#define rOFDM_PWMeasure1 0xdc4
|
||||
#define rOFDM_PWMeasure2 0xdc8
|
||||
#define rOFDM_PWMeasure1 0xdc4
|
||||
#define rOFDM_PWMeasure2 0xdc8
|
||||
#define rOFDM_BWReport 0xdcc
|
||||
#define rOFDM_AGCReport 0xdd0
|
||||
#define rOFDM_RxSNR 0xdd4
|
||||
|
@ -324,7 +324,7 @@
|
|||
#define rTx_IQK_PI_A 0xe38
|
||||
#define rRx_IQK_PI_A 0xe3c
|
||||
|
||||
#define rTx_IQK 0xe40
|
||||
#define rTx_IQK 0xe40
|
||||
#define rRx_IQK 0xe44
|
||||
#define rIQK_AGC_Pts 0xe48
|
||||
#define rIQK_AGC_Rsp 0xe4c
|
||||
|
@ -361,10 +361,10 @@
|
|||
#define rRx_Power_After_IQK_B_2 0xecc
|
||||
|
||||
#define rRx_OFDM 0xed0
|
||||
#define rRx_Wait_RIFS 0xed4
|
||||
#define rRx_TO_Rx 0xed8
|
||||
#define rStandby 0xedc
|
||||
#define rSleep 0xee0
|
||||
#define rRx_Wait_RIFS 0xed4
|
||||
#define rRx_TO_Rx 0xed8
|
||||
#define rStandby 0xedc
|
||||
#define rSleep 0xee0
|
||||
#define rPMPD_ANAEN 0xeec
|
||||
|
||||
//
|
||||
|
@ -398,56 +398,56 @@
|
|||
//
|
||||
// RL6052 Register definition
|
||||
//
|
||||
#define RF_AC 0x00 //
|
||||
#define RF_AC 0x00 //
|
||||
|
||||
#define RF_IQADJ_G1 0x01 //
|
||||
#define RF_IQADJ_G2 0x02 //
|
||||
#define RF_IQADJ_G1 0x01 //
|
||||
#define RF_IQADJ_G2 0x02 //
|
||||
#define RF_BS_PA_APSET_G1_G4 0x03
|
||||
#define RF_BS_PA_APSET_G5_G8 0x04
|
||||
#define RF_POW_TRSW 0x05 //
|
||||
#define RF_POW_TRSW 0x05 //
|
||||
|
||||
#define RF_GAIN_RX 0x06 //
|
||||
#define RF_GAIN_TX 0x07 //
|
||||
#define RF_GAIN_RX 0x06 //
|
||||
#define RF_GAIN_TX 0x07 //
|
||||
|
||||
#define RF_TXM_IDAC 0x08 //
|
||||
#define RF_IPA_G 0x09 //
|
||||
#define RF_TXM_IDAC 0x08 //
|
||||
#define RF_IPA_G 0x09 //
|
||||
#define RF_TXBIAS_G 0x0A
|
||||
#define RF_TXPA_AG 0x0B
|
||||
#define RF_IPA_A 0x0C //
|
||||
#define RF_IPA_A 0x0C //
|
||||
#define RF_TXBIAS_A 0x0D
|
||||
#define RF_BS_PA_APSET_G9_G11 0x0E
|
||||
#define RF_BS_IQGEN 0x0F //
|
||||
#define RF_BS_IQGEN 0x0F //
|
||||
|
||||
#define RF_MODE1 0x10 //
|
||||
#define RF_MODE2 0x11 //
|
||||
#define RF_MODE1 0x10 //
|
||||
#define RF_MODE2 0x11 //
|
||||
|
||||
#define RF_RX_AGC_HP 0x12 //
|
||||
#define RF_TX_AGC 0x13 //
|
||||
#define RF_BIAS 0x14 //
|
||||
#define RF_IPA 0x15 //
|
||||
#define RF_RX_AGC_HP 0x12 //
|
||||
#define RF_TX_AGC 0x13 //
|
||||
#define RF_BIAS 0x14 //
|
||||
#define RF_IPA 0x15 //
|
||||
#define RF_TXBIAS 0x16 //
|
||||
#define RF_POW_ABILITY 0x17 //
|
||||
#define RF_MODE_AG 0x18 //
|
||||
#define RF_POW_ABILITY 0x17 //
|
||||
#define RF_MODE_AG 0x18 //
|
||||
#define rRfChannel 0x18 // RF channel and BW switch
|
||||
#define RF_CHNLBW 0x18 // RF channel and BW switch
|
||||
#define RF_TOP 0x19 //
|
||||
#define RF_TOP 0x19 //
|
||||
|
||||
#define RF_RX_G1 0x1A //
|
||||
#define RF_RX_G2 0x1B //
|
||||
#define RF_RX_G1 0x1A //
|
||||
#define RF_RX_G2 0x1B //
|
||||
|
||||
#define RF_RX_BB2 0x1C //
|
||||
#define RF_RX_BB1 0x1D //
|
||||
#define RF_RX_BB2 0x1C //
|
||||
#define RF_RX_BB1 0x1D //
|
||||
|
||||
#define RF_RCK1 0x1E //
|
||||
#define RF_RCK2 0x1F //
|
||||
#define RF_RCK1 0x1E //
|
||||
#define RF_RCK2 0x1F //
|
||||
|
||||
#define RF_TX_G1 0x20 //
|
||||
#define RF_TX_G2 0x21 //
|
||||
#define RF_TX_G3 0x22 //
|
||||
#define RF_TX_G1 0x20 //
|
||||
#define RF_TX_G2 0x21 //
|
||||
#define RF_TX_G3 0x22 //
|
||||
|
||||
#define RF_TX_BB1 0x23 //
|
||||
#define RF_TX_BB1 0x23 //
|
||||
|
||||
#define RF_T_METER 0x24 //
|
||||
#define RF_T_METER 0x24 //
|
||||
|
||||
#define RF_SYN_G1 0x25 // RF TX Power control
|
||||
#define RF_SYN_G2 0x26 // RF TX Power control
|
||||
|
@ -513,7 +513,7 @@
|
|||
#define bCCKTxStatus 0x1
|
||||
#define bOFDMTxStatus 0x2
|
||||
|
||||
#define IS_BB_REG_OFFSET_92S(_Offset) ((_Offset >= 0x800) && (_Offset <= 0xfff))
|
||||
#define IS_BB_REG_OFFSET_92S(_Offset) ((_Offset >= 0x800) && (_Offset <= 0xfff))
|
||||
|
||||
// 2. Page8(0x800)
|
||||
#define bRFMOD 0x1 // Reg 0x800 rFPGA0_RFMOD
|
||||
|
@ -522,157 +522,157 @@
|
|||
#define bCCKEn 0x1000000
|
||||
#define bOFDMEn 0x2000000
|
||||
|
||||
#define bOFDMRxADCPhase 0x10000 // Useless now
|
||||
#define bOFDMTxDACPhase 0x40000
|
||||
#define bXATxAGC 0x3f
|
||||
#define bOFDMRxADCPhase 0x10000 // Useless now
|
||||
#define bOFDMTxDACPhase 0x40000
|
||||
#define bXATxAGC 0x3f
|
||||
|
||||
#define bAntennaSelect 0x0300
|
||||
#define bAntennaSelect 0x0300
|
||||
|
||||
#define bXBTxAGC 0xf00 // Reg 80c rFPGA0_TxGainStage
|
||||
#define bXCTxAGC 0xf000
|
||||
#define bXDTxAGC 0xf0000
|
||||
|
||||
#define bPAStart 0xf0000000 // Useless now
|
||||
#define bTRStart 0x00f00000
|
||||
#define bRFStart 0x0000f000
|
||||
#define bBBStart 0x000000f0
|
||||
#define bBBCCKStart 0x0000000f
|
||||
#define bPAEnd 0xf //Reg0x814
|
||||
#define bTREnd 0x0f000000
|
||||
#define bRFEnd 0x000f0000
|
||||
#define bCCAMask 0x000000f0 //T2R
|
||||
#define bR2RCCAMask 0x00000f00
|
||||
#define bHSSI_R2TDelay 0xf8000000
|
||||
#define bHSSI_T2RDelay 0xf80000
|
||||
#define bContTxHSSI 0x400 //chane gain at continue Tx
|
||||
#define bIGFromCCK 0x200
|
||||
#define bAGCAddress 0x3f
|
||||
#define bRxHPTx 0x7000
|
||||
#define bRxHPT2R 0x38000
|
||||
#define bRxHPCCKIni 0xc0000
|
||||
#define bAGCTxCode 0xc00000
|
||||
#define bAGCRxCode 0x300000
|
||||
#define bXBTxAGC 0xf00 // Reg 80c rFPGA0_TxGainStage
|
||||
#define bXCTxAGC 0xf000
|
||||
#define bXDTxAGC 0xf0000
|
||||
|
||||
#define b3WireDataLength 0x800 // Reg 0x820~84f rFPGA0_XA_HSSIParameter1
|
||||
#define b3WireAddressLength 0x400
|
||||
#define bPAStart 0xf0000000 // Useless now
|
||||
#define bTRStart 0x00f00000
|
||||
#define bRFStart 0x0000f000
|
||||
#define bBBStart 0x000000f0
|
||||
#define bBBCCKStart 0x0000000f
|
||||
#define bPAEnd 0xf //Reg0x814
|
||||
#define bTREnd 0x0f000000
|
||||
#define bRFEnd 0x000f0000
|
||||
#define bCCAMask 0x000000f0 //T2R
|
||||
#define bR2RCCAMask 0x00000f00
|
||||
#define bHSSI_R2TDelay 0xf8000000
|
||||
#define bHSSI_T2RDelay 0xf80000
|
||||
#define bContTxHSSI 0x400 //chane gain at continue Tx
|
||||
#define bIGFromCCK 0x200
|
||||
#define bAGCAddress 0x3f
|
||||
#define bRxHPTx 0x7000
|
||||
#define bRxHPT2R 0x38000
|
||||
#define bRxHPCCKIni 0xc0000
|
||||
#define bAGCTxCode 0xc00000
|
||||
#define bAGCRxCode 0x300000
|
||||
|
||||
#define b3WireRFPowerDown 0x1 // Useless now
|
||||
//#define bHWSISelect 0x8
|
||||
#define b5GPAPEPolarity 0x40000000
|
||||
#define b2GPAPEPolarity 0x80000000
|
||||
#define bRFSW_TxDefaultAnt 0x3
|
||||
#define bRFSW_TxOptionAnt 0x30
|
||||
#define bRFSW_RxDefaultAnt 0x300
|
||||
#define bRFSW_RxOptionAnt 0x3000
|
||||
#define bRFSI_3WireData 0x1
|
||||
#define bRFSI_3WireClock 0x2
|
||||
#define bRFSI_3WireLoad 0x4
|
||||
#define bRFSI_3WireRW 0x8
|
||||
#define bRFSI_3Wire 0xf
|
||||
#define b3WireDataLength 0x800 // Reg 0x820~84f rFPGA0_XA_HSSIParameter1
|
||||
#define b3WireAddressLength 0x400
|
||||
|
||||
#define bRFSI_RFENV 0x10 // Reg 0x870 rFPGA0_XAB_RFInterfaceSW
|
||||
#define b3WireRFPowerDown 0x1 // Useless now
|
||||
//#define bHWSISelect 0x8
|
||||
#define b5GPAPEPolarity 0x40000000
|
||||
#define b2GPAPEPolarity 0x80000000
|
||||
#define bRFSW_TxDefaultAnt 0x3
|
||||
#define bRFSW_TxOptionAnt 0x30
|
||||
#define bRFSW_RxDefaultAnt 0x300
|
||||
#define bRFSW_RxOptionAnt 0x3000
|
||||
#define bRFSI_3WireData 0x1
|
||||
#define bRFSI_3WireClock 0x2
|
||||
#define bRFSI_3WireLoad 0x4
|
||||
#define bRFSI_3WireRW 0x8
|
||||
#define bRFSI_3Wire 0xf
|
||||
|
||||
#define bRFSI_TRSW 0x20 // Useless now
|
||||
#define bRFSI_TRSWB 0x40
|
||||
#define bRFSI_ANTSW 0x100
|
||||
#define bRFSI_ANTSWB 0x200
|
||||
#define bRFSI_PAPE 0x400
|
||||
#define bRFSI_PAPE5G 0x800
|
||||
#define bBandSelect 0x1
|
||||
#define bHTSIG2_GI 0x80
|
||||
#define bHTSIG2_Smoothing 0x01
|
||||
#define bHTSIG2_Sounding 0x02
|
||||
#define bHTSIG2_Aggreaton 0x08
|
||||
#define bHTSIG2_STBC 0x30
|
||||
#define bHTSIG2_AdvCoding 0x40
|
||||
#define bHTSIG2_NumOfHTLTF 0x300
|
||||
#define bHTSIG2_CRC8 0x3fc
|
||||
#define bHTSIG1_MCS 0x7f
|
||||
#define bHTSIG1_BandWidth 0x80
|
||||
#define bHTSIG1_HTLength 0xffff
|
||||
#define bLSIG_Rate 0xf
|
||||
#define bLSIG_Reserved 0x10
|
||||
#define bLSIG_Length 0x1fffe
|
||||
#define bLSIG_Parity 0x20
|
||||
#define bCCKRxPhase 0x4
|
||||
#define bRFSI_RFENV 0x10 // Reg 0x870 rFPGA0_XAB_RFInterfaceSW
|
||||
|
||||
#define bLSSIReadAddress 0x7f800000 // T65 RF
|
||||
#define bRFSI_TRSW 0x20 // Useless now
|
||||
#define bRFSI_TRSWB 0x40
|
||||
#define bRFSI_ANTSW 0x100
|
||||
#define bRFSI_ANTSWB 0x200
|
||||
#define bRFSI_PAPE 0x400
|
||||
#define bRFSI_PAPE5G 0x800
|
||||
#define bBandSelect 0x1
|
||||
#define bHTSIG2_GI 0x80
|
||||
#define bHTSIG2_Smoothing 0x01
|
||||
#define bHTSIG2_Sounding 0x02
|
||||
#define bHTSIG2_Aggreaton 0x08
|
||||
#define bHTSIG2_STBC 0x30
|
||||
#define bHTSIG2_AdvCoding 0x40
|
||||
#define bHTSIG2_NumOfHTLTF 0x300
|
||||
#define bHTSIG2_CRC8 0x3fc
|
||||
#define bHTSIG1_MCS 0x7f
|
||||
#define bHTSIG1_BandWidth 0x80
|
||||
#define bHTSIG1_HTLength 0xffff
|
||||
#define bLSIG_Rate 0xf
|
||||
#define bLSIG_Reserved 0x10
|
||||
#define bLSIG_Length 0x1fffe
|
||||
#define bLSIG_Parity 0x20
|
||||
#define bCCKRxPhase 0x4
|
||||
|
||||
#define bLSSIReadEdge 0x80000000 //LSSI "Read" edge signal
|
||||
#define bLSSIReadAddress 0x7f800000 // T65 RF
|
||||
|
||||
#define bLSSIReadBackData 0xfffff // T65 RF
|
||||
#define bLSSIReadEdge 0x80000000 //LSSI "Read" edge signal
|
||||
|
||||
#define bLSSIReadOKFlag 0x1000 // Useless now
|
||||
#define bCCKSampleRate 0x8 //0: 44MHz, 1:88MHz
|
||||
#define bRegulator0Standby 0x1
|
||||
#define bRegulatorPLLStandby 0x2
|
||||
#define bRegulator1Standby 0x4
|
||||
#define bPLLPowerUp 0x8
|
||||
#define bDPLLPowerUp 0x10
|
||||
#define bDA10PowerUp 0x20
|
||||
#define bAD7PowerUp 0x200
|
||||
#define bDA6PowerUp 0x2000
|
||||
#define bXtalPowerUp 0x4000
|
||||
#define b40MDClkPowerUP 0x8000
|
||||
#define bDA6DebugMode 0x20000
|
||||
#define bDA6Swing 0x380000
|
||||
#define bLSSIReadBackData 0xfffff // T65 RF
|
||||
|
||||
#define bADClkPhase 0x4000000 // Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ
|
||||
#define bLSSIReadOKFlag 0x1000 // Useless now
|
||||
#define bCCKSampleRate 0x8 //0: 44MHz, 1:88MHz
|
||||
#define bRegulator0Standby 0x1
|
||||
#define bRegulatorPLLStandby 0x2
|
||||
#define bRegulator1Standby 0x4
|
||||
#define bPLLPowerUp 0x8
|
||||
#define bDPLLPowerUp 0x10
|
||||
#define bDA10PowerUp 0x20
|
||||
#define bAD7PowerUp 0x200
|
||||
#define bDA6PowerUp 0x2000
|
||||
#define bXtalPowerUp 0x4000
|
||||
#define b40MDClkPowerUP 0x8000
|
||||
#define bDA6DebugMode 0x20000
|
||||
#define bDA6Swing 0x380000
|
||||
|
||||
#define b80MClkDelay 0x18000000 // Useless
|
||||
#define bAFEWatchDogEnable 0x20000000
|
||||
#define bADClkPhase 0x4000000 // Reg 0x880 rFPGA0_AnalogParameter1 20/40 CCK support switch 40/80 BB MHZ
|
||||
|
||||
#define bXtalCap01 0xc0000000 // Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap
|
||||
#define bXtalCap23 0x3
|
||||
#define b80MClkDelay 0x18000000 // Useless
|
||||
#define bAFEWatchDogEnable 0x20000000
|
||||
|
||||
#define bXtalCap01 0xc0000000 // Reg 0x884 rFPGA0_AnalogParameter2 Crystal cap
|
||||
#define bXtalCap23 0x3
|
||||
#define bXtalCap92x 0x0f000000
|
||||
#define bXtalCap 0x0f000000
|
||||
#define bXtalCap 0x0f000000
|
||||
|
||||
#define bIntDifClkEnable 0x400 // Useless
|
||||
#define bExtSigClkEnable 0x800
|
||||
#define bBandgapMbiasPowerUp 0x10000
|
||||
#define bAD11SHGain 0xc0000
|
||||
#define bAD11InputRange 0x700000
|
||||
#define bAD11OPCurrent 0x3800000
|
||||
#define bIPathLoopback 0x4000000
|
||||
#define bQPathLoopback 0x8000000
|
||||
#define bAFELoopback 0x10000000
|
||||
#define bDA10Swing 0x7e0
|
||||
#define bDA10Reverse 0x800
|
||||
#define bDAClkSource 0x1000
|
||||
#define bAD7InputRange 0x6000
|
||||
#define bAD7Gain 0x38000
|
||||
#define bAD7OutputCMMode 0x40000
|
||||
#define bAD7InputCMMode 0x380000
|
||||
#define bAD7Current 0xc00000
|
||||
#define bRegulatorAdjust 0x7000000
|
||||
#define bAD11PowerUpAtTx 0x1
|
||||
#define bDA10PSAtTx 0x10
|
||||
#define bAD11PowerUpAtRx 0x100
|
||||
#define bDA10PSAtRx 0x1000
|
||||
#define bCCKRxAGCFormat 0x200
|
||||
#define bPSDFFTSamplepPoint 0xc000
|
||||
#define bPSDAverageNum 0x3000
|
||||
#define bIQPathControl 0xc00
|
||||
#define bPSDFreq 0x3ff
|
||||
#define bPSDAntennaPath 0x30
|
||||
#define bPSDIQSwitch 0x40
|
||||
#define bPSDRxTrigger 0x400000
|
||||
#define bPSDTxTrigger 0x80000000
|
||||
#define bPSDSineToneScale 0x7f000000
|
||||
#define bPSDReport 0xffff
|
||||
#define bIntDifClkEnable 0x400 // Useless
|
||||
#define bExtSigClkEnable 0x800
|
||||
#define bBandgapMbiasPowerUp 0x10000
|
||||
#define bAD11SHGain 0xc0000
|
||||
#define bAD11InputRange 0x700000
|
||||
#define bAD11OPCurrent 0x3800000
|
||||
#define bIPathLoopback 0x4000000
|
||||
#define bQPathLoopback 0x8000000
|
||||
#define bAFELoopback 0x10000000
|
||||
#define bDA10Swing 0x7e0
|
||||
#define bDA10Reverse 0x800
|
||||
#define bDAClkSource 0x1000
|
||||
#define bAD7InputRange 0x6000
|
||||
#define bAD7Gain 0x38000
|
||||
#define bAD7OutputCMMode 0x40000
|
||||
#define bAD7InputCMMode 0x380000
|
||||
#define bAD7Current 0xc00000
|
||||
#define bRegulatorAdjust 0x7000000
|
||||
#define bAD11PowerUpAtTx 0x1
|
||||
#define bDA10PSAtTx 0x10
|
||||
#define bAD11PowerUpAtRx 0x100
|
||||
#define bDA10PSAtRx 0x1000
|
||||
#define bCCKRxAGCFormat 0x200
|
||||
#define bPSDFFTSamplepPoint 0xc000
|
||||
#define bPSDAverageNum 0x3000
|
||||
#define bIQPathControl 0xc00
|
||||
#define bPSDFreq 0x3ff
|
||||
#define bPSDAntennaPath 0x30
|
||||
#define bPSDIQSwitch 0x40
|
||||
#define bPSDRxTrigger 0x400000
|
||||
#define bPSDTxTrigger 0x80000000
|
||||
#define bPSDSineToneScale 0x7f000000
|
||||
#define bPSDReport 0xffff
|
||||
|
||||
// 3. Page9(0x900)
|
||||
#define bOFDMTxSC 0x30000000 // Useless
|
||||
#define bCCKTxOn 0x1
|
||||
#define bOFDMTxOn 0x2
|
||||
#define bDebugPage 0xfff //reset debug page and also HWord, LWord
|
||||
#define bDebugItem 0xff //reset debug page and LWord
|
||||
#define bAntL 0x10
|
||||
#define bAntNonHT 0x100
|
||||
#define bAntHT1 0x1000
|
||||
#define bAntHT2 0x10000
|
||||
#define bAntHT1S1 0x100000
|
||||
#define bAntNonHTS1 0x1000000
|
||||
#define bOFDMTxSC 0x30000000 // Useless
|
||||
#define bCCKTxOn 0x1
|
||||
#define bOFDMTxOn 0x2
|
||||
#define bDebugPage 0xfff //reset debug page and also HWord, LWord
|
||||
#define bDebugItem 0xff //reset debug page and LWord
|
||||
#define bAntL 0x10
|
||||
#define bAntNonHT 0x100
|
||||
#define bAntHT1 0x1000
|
||||
#define bAntHT2 0x10000
|
||||
#define bAntHT1S1 0x100000
|
||||
#define bAntNonHTS1 0x1000000
|
||||
|
||||
// 4. PageA(0xA00)
|
||||
#define bCCKBBMode 0x3 // Useless
|
||||
|
@ -716,7 +716,7 @@
|
|||
#define bCCKRxAGCSatCount 0xe0
|
||||
#define bCCKRxRFSettle 0x1f //AGCsamp_dly
|
||||
#define bCCKFixedRxAGC 0x8000
|
||||
//#define bCCKRxAGCFormat 0x4000 //remove to HSSI register 0x824
|
||||
//#define bCCKRxAGCFormat 0x4000 //remove to HSSI register 0x824
|
||||
#define bCCKAntennaPolarity 0x2000
|
||||
#define bCCKTxFilterType 0x0c00
|
||||
#define bCCKRxAGCReportType 0x0300
|
||||
|
@ -748,9 +748,9 @@
|
|||
#define bCCKRxFACounterLower 0xff
|
||||
#define bCCKRxFACounterUpper 0xff000000
|
||||
#define bCCKRxHPAGCStart 0xe000
|
||||
#define bCCKRxHPAGCFinal 0x1c00
|
||||
#define bCCKRxHPAGCFinal 0x1c00
|
||||
#define bCCKRxFalseAlarmEnable 0x8000
|
||||
#define bCCKFACounterFreeze 0x4000
|
||||
#define bCCKFACounterFreeze 0x4000
|
||||
#define bCCKTxPathSel 0x10000000
|
||||
#define bCCKDefaultRxPath 0xc000000
|
||||
#define bCCKOptionRxPath 0x3000000
|
||||
|
@ -902,16 +902,16 @@
|
|||
#define bRxSGI_TH 0xc0000000
|
||||
#define bDFSCnt0 0xff
|
||||
#define bDFSCnt1 0xff00
|
||||
#define bDFSFlag 0xf0000
|
||||
#define bDFSFlag 0xf0000
|
||||
#define bMFWeightSum 0x300000
|
||||
#define bMinIdxTH 0x7f000000
|
||||
#define bDAFormat 0x40000
|
||||
#define bTxChEmuEnable 0x01000000
|
||||
#define bMinIdxTH 0x7f000000
|
||||
#define bDAFormat 0x40000
|
||||
#define bTxChEmuEnable 0x01000000
|
||||
#define bTRSWIsolation_A 0x7f
|
||||
#define bTRSWIsolation_B 0x7f00
|
||||
#define bTRSWIsolation_C 0x7f0000
|
||||
#define bTRSWIsolation_D 0x7f000000
|
||||
#define bExtLNAGain 0x7c00
|
||||
#define bTRSWIsolation_D 0x7f000000
|
||||
#define bExtLNAGain 0x7c00
|
||||
|
||||
// 6. PageE(0xE00)
|
||||
#define bSTBCEn 0x4 // Useless
|
||||
|
@ -948,7 +948,7 @@
|
|||
#define bLongCFOFLength 11
|
||||
#define bTailCFO 0x1fff
|
||||
#define bTailCFOTLength 13
|
||||
#define bTailCFOFLength 12
|
||||
#define bTailCFOFLength 12
|
||||
#define bmax_en_pwdB 0xffff
|
||||
#define bCC_power_dB 0xffff0000
|
||||
#define bnoise_pwdB 0xffff
|
||||
|
@ -956,27 +956,27 @@
|
|||
#define bPowerMeasFLength 3
|
||||
#define bRx_HT_BW 0x1
|
||||
#define bRxSC 0x6
|
||||
#define bRx_HT 0x8
|
||||
#define bRx_HT 0x8
|
||||
#define bNB_intf_det_on 0x1
|
||||
#define bIntf_win_len_cfg 0x30
|
||||
#define bNB_Intf_TH_cfg 0x1c0
|
||||
#define bNB_Intf_TH_cfg 0x1c0
|
||||
#define bRFGain 0x3f
|
||||
#define bTableSel 0x40
|
||||
#define bTRSW 0x80
|
||||
#define bTRSW 0x80
|
||||
#define bRxSNR_A 0xff
|
||||
#define bRxSNR_B 0xff00
|
||||
#define bRxSNR_C 0xff0000
|
||||
#define bRxSNR_D 0xff000000
|
||||
#define bSNREVMTLength 8
|
||||
#define bSNREVMFLength 1
|
||||
#define bSNREVMFLength 1
|
||||
#define bCSI1st 0xff
|
||||
#define bCSI2nd 0xff00
|
||||
#define bRxEVM1st 0xff0000
|
||||
#define bRxEVM2nd 0xff000000
|
||||
#define bRxEVM2nd 0xff000000
|
||||
#define bSIGEVM 0xff
|
||||
#define bPWDB 0xff00
|
||||
#define bSGIEN 0x10000
|
||||
|
||||
|
||||
#define bSFactorQAM1 0xf // Useless
|
||||
#define bSFactorQAM2 0xf0
|
||||
#define bSFactorQAM3 0xf00
|
||||
|
@ -987,7 +987,7 @@
|
|||
#define bSFactorQAM8 0xf000000
|
||||
#define bSFactorQAM9 0xf0000000
|
||||
#define bCSIScheme 0x100000
|
||||
|
||||
|
||||
#define bNoiseLvlTopSet 0x3 // Useless
|
||||
#define bChSmooth 0x4
|
||||
#define bChSmoothCfg1 0x38
|
||||
|
@ -996,7 +996,7 @@
|
|||
#define bChSmoothCfg4 0x7000
|
||||
#define bMRCMode 0x800000
|
||||
#define bTHEVMCfg 0x7000000
|
||||
|
||||
|
||||
#define bLoopFitType 0x1 // Useless
|
||||
#define bUpdCFO 0x40
|
||||
#define bUpdCFOOffData 0x80
|
||||
|
@ -1070,24 +1070,24 @@
|
|||
#define bMaskLWord 0x0000ffff
|
||||
#define bMaskDWord 0xffffffff
|
||||
#define bMask12Bits 0xfff
|
||||
#define bMaskH4Bits 0xf0000000
|
||||
#define bMaskH4Bits 0xf0000000
|
||||
#define bMaskOFDM_D 0xffc00000
|
||||
#define bMaskCCK 0x3f3f3f3f
|
||||
|
||||
//for PutRFRegsetting & GetRFRegSetting BitMask
|
||||
//#define bMask12Bits 0xfffff // RF Reg mask bits
|
||||
//#define bMask20Bits 0xfffff // RF Reg mask bits T65 RF
|
||||
#define bRFRegOffsetMask 0xfffff
|
||||
|
||||
#define bRFRegOffsetMask 0xfffff
|
||||
|
||||
#define bEnable 0x1 // Useless
|
||||
#define bDisable 0x0
|
||||
|
||||
|
||||
#define LeftAntenna 0x0 // Useless
|
||||
#define RightAntenna 0x1
|
||||
|
||||
|
||||
#define tCheckTxStatus 500 //500ms // Useless
|
||||
#define tUpdateRxCounter 100 //100ms
|
||||
|
||||
|
||||
#define rateCCK 0 // Useless
|
||||
#define rateOFDM 1
|
||||
#define rateHT 2
|
||||
|
@ -1110,7 +1110,7 @@
|
|||
#define bPMACControl 0x0 // Useless
|
||||
#define bWMACControl 0x1
|
||||
#define bWNICControl 0x2
|
||||
|
||||
|
||||
#define PathA 0x0 // Useless
|
||||
#define PathB 0x1
|
||||
#define PathC 0x2
|
||||
|
@ -1120,4 +1120,3 @@
|
|||
|
||||
|
||||
#endif //__INC_HAL8192SPHYREG_H
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -22,18 +22,18 @@
|
|||
* Module: __INC_HAL8192DPHYCFG_H
|
||||
*
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
* Note:
|
||||
*
|
||||
*
|
||||
* Export: Constants, macro, functions(API), global variables(None).
|
||||
*
|
||||
* Abbrev:
|
||||
* Abbrev:
|
||||
*
|
||||
* History:
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* Data Who Remark
|
||||
* 08/07/2007 MHC 1. Porting from 9x series PHYCFG.h.
|
||||
* 2. Reorganize code architecture.
|
||||
*
|
||||
*
|
||||
*****************************************************************************/
|
||||
/* Check to see if the file has been included already. */
|
||||
#ifndef __INC_HAL8192DPHYCFG_H
|
||||
|
@ -74,7 +74,7 @@
|
|||
/*--------------------------Define Parameters-------------------------------*/
|
||||
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
typedef enum _SwChnlCmdID{
|
||||
CmdID_End,
|
||||
CmdID_SetTxPowerLevel,
|
||||
|
@ -115,7 +115,7 @@ typedef enum _RF_RADIO_PATH{
|
|||
RF_PATH_B = 1, //Radio Path B
|
||||
RF_PATH_C = 2, //Radio Path C
|
||||
RF_PATH_D = 3, //Radio Path D
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
//RF_PATH_MAX //Max RF number 90 support
|
||||
}RF_RADIO_PATH_E, *PRF_RADIO_PATH_E;
|
||||
|
||||
#define RF_PATH_MAX 2
|
||||
|
@ -150,8 +150,8 @@ typedef enum _WIRELESS_MODE {
|
|||
|
||||
#if (RTL8192D_DUAL_MAC_MODE_SWITCH == 1)
|
||||
typedef enum _BaseBand_Config_Type{
|
||||
BaseBand_Config_PHY_REG = 0,
|
||||
BaseBand_Config_AGC_TAB = 1,
|
||||
BaseBand_Config_PHY_REG = 0,
|
||||
BaseBand_Config_AGC_TAB = 1,
|
||||
BaseBand_Config_AGC_TAB_2G = 2,
|
||||
BaseBand_Config_AGC_TAB_5G = 3,
|
||||
}BaseBand_Config_Type, *PBaseBand_Config_Type;
|
||||
|
@ -166,7 +166,7 @@ typedef enum _BaseBand_Config_Type{
|
|||
typedef enum _MACPHY_MODE_8192D{
|
||||
SINGLEMAC_SINGLEPHY, //SMSP
|
||||
DUALMAC_DUALPHY, //DMDP
|
||||
DUALMAC_SINGLEPHY, //DMSP
|
||||
DUALMAC_SINGLEPHY, //DMSP
|
||||
}MACPHY_MODE_8192D,*PMACPHY_MODE_8192D;
|
||||
|
||||
typedef enum _MACPHY_MODE_CHANGE_ACTION{
|
||||
|
@ -180,7 +180,7 @@ typedef enum _MACPHY_MODE_CHANGE_ACTION{
|
|||
}MACPHY_MODE_CHANGE_ACTION,*PMACPHY_MODE_CHANGE_ACTION;
|
||||
|
||||
typedef enum _BAND_TYPE{
|
||||
BAND_ON_2_4G = 1,
|
||||
BAND_ON_2_4G = 1,
|
||||
BAND_ON_5G = 2,
|
||||
BAND_ON_BOTH,
|
||||
BANDMAX
|
||||
|
@ -201,77 +201,77 @@ typedef enum _PHY_Rate_Tx_Power_Offset_Area{
|
|||
typedef enum _RF_TYPE_8190P{
|
||||
RF_TYPE_MIN, // 0
|
||||
RF_8225=1, // 1 11b/g RF for verification only
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8256=2, // 2 11b/g/n
|
||||
RF_8258=3, // 3 11a/b/g/n RF
|
||||
RF_6052=4, // 4 11b/g/n RF
|
||||
//RF_6052=5, // 4 11b/g/n RF
|
||||
// TODO: We sholud remove this psudo PHY RF after we get new RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
RF_PSEUDO_11N=5, // 5, It is a temporality RF.
|
||||
}RF_TYPE_8190P_E,*PRF_TYPE_8190P_E;
|
||||
|
||||
|
||||
|
||||
typedef struct _BB_REGISTER_DEFINITION{
|
||||
u32 rfintfs; // set software control:
|
||||
u32 rfintfs; // set software control:
|
||||
// 0x870~0x877[8 bytes]
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
|
||||
u32 rfintfi; // readback data:
|
||||
// 0x8e0~0x8e7[8 bytes]
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
|
||||
u32 rfintfo; // output data:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
|
||||
u32 rfintfe; // output enable:
|
||||
// 0x860~0x86f [16 bytes]
|
||||
|
||||
|
||||
u32 rf3wireOffset; // LSSI data:
|
||||
// 0x840~0x84f [16 bytes]
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
|
||||
u32 rfLSSI_Select; // BB Band Select:
|
||||
// 0x878~0x87f [8 bytes]
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
|
||||
u32 rfTxGainStage; // Tx gain stage:
|
||||
// 0x80c~0x80f [4 bytes]
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
|
||||
u32 rfHSSIPara1; // wire parameter control1 :
|
||||
// 0x820~0x823,0x828~0x82b, 0x830~0x833, 0x838~0x83b [16 bytes]
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
|
||||
u32 rfHSSIPara2; // wire parameter control2 :
|
||||
// 0x824~0x827,0x82c~0x82f, 0x834~0x837, 0x83c~0x83f [16 bytes]
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
|
||||
u32 rfSwitchControl; //Tx Rx antenna control :
|
||||
// 0x858~0x85f [16 bytes]
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
|
||||
u32 rfAGCControl1; //AGC parameter control1 :
|
||||
// 0xc50~0xc53,0xc58~0xc5b, 0xc60~0xc63, 0xc68~0xc6b [16 bytes]
|
||||
|
||||
u32 rfAGCControl2; //AGC parameter control2 :
|
||||
// 0xc54~0xc57,0xc5c~0xc5f, 0xc64~0xc67, 0xc6c~0xc6f [16 bytes]
|
||||
|
||||
u32 rfRxIQImbalance; //OFDM Rx IQ imbalance matrix :
|
||||
// 0xc14~0xc17,0xc1c~0xc1f, 0xc24~0xc27, 0xc2c~0xc2f [16 bytes]
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
|
||||
u32 rfRxAFE; //Rx IQ DC ofset and Rx digital filter, Rx DC notch filter :
|
||||
// 0xc10~0xc13,0xc18~0xc1b, 0xc20~0xc23, 0xc28~0xc2b [16 bytes]
|
||||
|
||||
|
||||
u32 rfTxIQImbalance; //OFDM Tx IQ imbalance matrix
|
||||
// 0xc80~0xc83,0xc88~0xc8b, 0xc90~0xc93, 0xc98~0xc9b [16 bytes]
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
|
||||
u32 rfTxAFE; //Tx IQ DC Offset and Tx DFIR type
|
||||
// 0xc84~0xc87,0xc8c~0xc8f, 0xc94~0xc97, 0xc9c~0xc9f [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
|
||||
u32 rfLSSIReadBack; //LSSI RF readback data SI mode
|
||||
// 0x8a0~0x8af [16 bytes]
|
||||
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
u32 rfLSSIReadBackPi; //LSSI RF readback data PI mode 0x8b8-8bc for Path A and B
|
||||
|
||||
}BB_REGISTER_DEFINITION_T, *PBB_REGISTER_DEFINITION_T;
|
||||
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
typedef struct _R_ANTENNA_SELECT_OFDM{
|
||||
u32 r_tx_antenna:4;
|
||||
u32 r_ant_l:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_non_ht:4;
|
||||
u32 r_ant_ht1:4;
|
||||
u32 r_ant_ht2:4;
|
||||
u32 r_ant_ht_s1:4;
|
||||
|
@ -281,12 +281,12 @@ typedef struct _R_ANTENNA_SELECT_OFDM{
|
|||
}R_ANTENNA_SELECT_OFDM;
|
||||
|
||||
typedef struct _R_ANTENNA_SELECT_CCK{
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable_2:2;
|
||||
u8 r_cckrx_enable:2;
|
||||
u8 r_ccktx_enable:4;
|
||||
}R_ANTENNA_SELECT_CCK;
|
||||
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
/*------------------------------Define structure----------------------------*/
|
||||
|
||||
|
||||
/*------------------------Export global variable----------------------------*/
|
||||
|
@ -329,7 +329,7 @@ extern int PHY_BBConfig8192D( IN PADAPTER Adapter );
|
|||
extern int PHY_RFConfig8192D( IN PADAPTER Adapter );
|
||||
/* RF config */
|
||||
int rtl8192d_PHY_ConfigRFWithParaFile( IN PADAPTER Adapter,
|
||||
IN u8* pFileName,
|
||||
IN u8* pFileName,
|
||||
IN RF_RADIO_PATH_E eRFPath);
|
||||
int rtl8192d_PHY_ConfigRFWithHeaderFile( IN PADAPTER Adapter,
|
||||
IN RF_CONTENT Content,
|
||||
|
@ -344,21 +344,21 @@ void rtl8192d_PHY_GetHWRegOriginalValue( IN PADAPTER Adapter );
|
|||
//
|
||||
// RF Power setting
|
||||
//
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
//extern BOOLEAN PHY_SetRFPowerState(IN PADAPTER Adapter,
|
||||
// IN RT_RF_POWER_STATE eRFPowerState);
|
||||
|
||||
//
|
||||
// BB TX Power R/W
|
||||
//
|
||||
void PHY_GetTxPowerLevel8192D( IN PADAPTER Adapter,
|
||||
OUT u32* powerlevel );
|
||||
OUT u32* powerlevel );
|
||||
void PHY_SetTxPowerLevel8192D( IN PADAPTER Adapter,
|
||||
IN u8 channel );
|
||||
BOOLEAN PHY_UpdateTxPowerDbm8192D( IN PADAPTER Adapter,
|
||||
IN int powerInDbm );
|
||||
|
||||
//
|
||||
VOID
|
||||
VOID
|
||||
PHY_ScanOperationBackup8192D(IN PADAPTER Adapter,
|
||||
IN u8 Operation );
|
||||
|
||||
|
@ -396,7 +396,7 @@ void PHY_SwChnlPhy8192D( IN PADAPTER pAdapter,
|
|||
|
||||
extern void ChkFwCmdIoDone( IN PADAPTER Adapter);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
|
@ -410,7 +410,7 @@ BOOLEAN PHY_CheckIsLegalRfPath8192D(IN PADAPTER pAdapter,
|
|||
//
|
||||
// Modify the value of the hw register when beacon interval be changed.
|
||||
//
|
||||
void
|
||||
void
|
||||
rtl8192d_PHY_SetBeaconHwReg( IN PADAPTER Adapter,
|
||||
IN u16 BeaconInterval );
|
||||
|
||||
|
@ -428,7 +428,7 @@ PHY_EnableHostClkReq(
|
|||
BOOLEAN
|
||||
SetAntennaConfig92C(
|
||||
IN PADAPTER Adapter,
|
||||
IN u8 DefaultAnt
|
||||
IN u8 DefaultAnt
|
||||
);
|
||||
|
||||
VOID
|
||||
|
@ -439,7 +439,7 @@ PHY_UpdateBBRFConfiguration8192D(
|
|||
|
||||
VOID PHY_ReadMacPhyMode92D(
|
||||
IN PADAPTER Adapter,
|
||||
IN BOOLEAN AutoloadFail
|
||||
IN BOOLEAN AutoloadFail
|
||||
);
|
||||
|
||||
VOID PHY_ConfigMacPhyMode92D(
|
||||
|
@ -460,7 +460,7 @@ rtl8192d_PHY_InitRxSetting(
|
|||
);
|
||||
|
||||
|
||||
VOID
|
||||
VOID
|
||||
rtl8192d_PHY_SetRFPathSwitch(IN PADAPTER pAdapter, IN BOOLEAN bMain);
|
||||
|
||||
VOID
|
||||
|
@ -469,7 +469,7 @@ HalChangeCCKStatus8192D(
|
|||
IN BOOLEAN bCCKDisable
|
||||
);
|
||||
|
||||
VOID
|
||||
VOID
|
||||
PHY_InitPABias92D(IN PADAPTER Adapter);
|
||||
|
||||
/*--------------------------Exported Function prototype---------------------*/
|
||||
|
@ -483,4 +483,3 @@ PHY_InitPABias92D(IN PADAPTER Adapter);
|
|||
#define PHY_SetMacReg PHY_SetBBReg
|
||||
|
||||
#endif // __INC_HAL8192SPHYCFG_H
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,30 +1,29 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8723PHYCFG_H__
|
||||
#define __INC_HAL8723PHYCFG_H__
|
||||
|
||||
#include <Hal8192CPhyCfg.h>
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_BBConfig8723A( IN PADAPTER Adapter );
|
||||
int PHY_RFConfig8723A( IN PADAPTER Adapter );
|
||||
s32 PHY_MACConfig8723A(PADAPTER padapter);
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8723PHYCFG_H__
|
||||
#define __INC_HAL8723PHYCFG_H__
|
||||
|
||||
#include <Hal8192CPhyCfg.h>
|
||||
/* MAC/BB/RF HAL config */
|
||||
int PHY_BBConfig8723A( IN PADAPTER Adapter );
|
||||
int PHY_RFConfig8723A( IN PADAPTER Adapter );
|
||||
s32 PHY_MACConfig8723A(PADAPTER padapter);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,74 +1,73 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8723APHYREG_H__
|
||||
#define __INC_HAL8723APHYREG_H__
|
||||
|
||||
#include <Hal8192CPhyReg.h>
|
||||
|
||||
//
|
||||
// PageB(0xB00)
|
||||
//
|
||||
#define rPdp_AntA 0xb00
|
||||
#define rPdp_AntA_4 0xb04
|
||||
#define rPdp_AntA_8 0xb08
|
||||
#define rPdp_AntA_C 0xb0c
|
||||
#define rPdp_AntA_10 0xb10
|
||||
#define rPdp_AntA_14 0xb14
|
||||
#define rPdp_AntA_18 0xb18
|
||||
#define rPdp_AntA_1C 0xb1c
|
||||
#define rPdp_AntA_20 0xb20
|
||||
#define rPdp_AntA_24 0xb24
|
||||
|
||||
#define rConfig_Pmpd_AntA 0xb28
|
||||
#define rConfig_ram64x16 0xb2c
|
||||
|
||||
#define rBndA 0xb30
|
||||
#define rHssiPar 0xb34
|
||||
|
||||
#define rConfig_AntA 0xb68
|
||||
#define rConfig_AntB 0xb6c
|
||||
|
||||
#define rPdp_AntB 0xb70
|
||||
#define rPdp_AntB_4 0xb74
|
||||
#define rPdp_AntB_8 0xb78
|
||||
#define rPdp_AntB_C 0xb7c
|
||||
#define rPdp_AntB_10 0xb80
|
||||
#define rPdp_AntB_14 0xb84
|
||||
#define rPdp_AntB_18 0xb88
|
||||
#define rPdp_AntB_1C 0xb8c
|
||||
#define rPdp_AntB_20 0xb90
|
||||
#define rPdp_AntB_24 0xb94
|
||||
|
||||
#define rConfig_Pmpd_AntB 0xb98
|
||||
|
||||
#define rBndB 0xba0
|
||||
|
||||
#define rAPK 0xbd8
|
||||
#define rPm_Rx0_AntA 0xbdc
|
||||
#define rPm_Rx1_AntA 0xbe0
|
||||
#define rPm_Rx2_AntA 0xbe4
|
||||
#define rPm_Rx3_AntA 0xbe8
|
||||
#define rPm_Rx0_AntB 0xbec
|
||||
#define rPm_Rx1_AntB 0xbf0
|
||||
#define rPm_Rx2_AntB 0xbf4
|
||||
#define rPm_Rx3_AntB 0xbf8
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __INC_HAL8723APHYREG_H__
|
||||
#define __INC_HAL8723APHYREG_H__
|
||||
|
||||
#include <Hal8192CPhyReg.h>
|
||||
|
||||
//
|
||||
// PageB(0xB00)
|
||||
//
|
||||
#define rPdp_AntA 0xb00
|
||||
#define rPdp_AntA_4 0xb04
|
||||
#define rPdp_AntA_8 0xb08
|
||||
#define rPdp_AntA_C 0xb0c
|
||||
#define rPdp_AntA_10 0xb10
|
||||
#define rPdp_AntA_14 0xb14
|
||||
#define rPdp_AntA_18 0xb18
|
||||
#define rPdp_AntA_1C 0xb1c
|
||||
#define rPdp_AntA_20 0xb20
|
||||
#define rPdp_AntA_24 0xb24
|
||||
|
||||
#define rConfig_Pmpd_AntA 0xb28
|
||||
#define rConfig_ram64x16 0xb2c
|
||||
|
||||
#define rBndA 0xb30
|
||||
#define rHssiPar 0xb34
|
||||
|
||||
#define rConfig_AntA 0xb68
|
||||
#define rConfig_AntB 0xb6c
|
||||
|
||||
#define rPdp_AntB 0xb70
|
||||
#define rPdp_AntB_4 0xb74
|
||||
#define rPdp_AntB_8 0xb78
|
||||
#define rPdp_AntB_C 0xb7c
|
||||
#define rPdp_AntB_10 0xb80
|
||||
#define rPdp_AntB_14 0xb84
|
||||
#define rPdp_AntB_18 0xb88
|
||||
#define rPdp_AntB_1C 0xb8c
|
||||
#define rPdp_AntB_20 0xb90
|
||||
#define rPdp_AntB_24 0xb94
|
||||
|
||||
#define rConfig_Pmpd_AntB 0xb98
|
||||
|
||||
#define rBndB 0xba0
|
||||
|
||||
#define rAPK 0xbd8
|
||||
#define rPm_Rx0_AntA 0xbdc
|
||||
#define rPm_Rx1_AntA 0xbe0
|
||||
#define rPm_Rx2_AntA 0xbe4
|
||||
#define rPm_Rx3_AntA 0xbe8
|
||||
#define rPm_Rx0_AntB 0xbec
|
||||
#define rPm_Rx1_AntB 0xbf0
|
||||
#define rPm_Rx2_AntB 0xbf4
|
||||
#define rPm_Rx3_AntB 0xbf8
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,171 +1,170 @@
|
|||
#ifndef __HAL8723PWRSEQ_H__
|
||||
#define __HAL8723PWRSEQ_H__
|
||||
/*
|
||||
Check document WM-20110607-Paul-RTL8723A_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
|
||||
*/
|
||||
#include "HalPwrSeqCmd.h"
|
||||
#include "rtl8723a_spec.h"
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_ACT_STEPS 15
|
||||
#define RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS 15
|
||||
#define RTL8723A_TRANS_SUS_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS 15
|
||||
#define RTL8723A_TRANS_PDN_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_ACT_TO_LPS_STEPS 15
|
||||
#define RTL8723A_TRANS_LPS_TO_ACT_STEPS 15
|
||||
#define RTL8723A_TRANS_END_STEPS 1
|
||||
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_ACT \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0}, /*0x20[0] = 1b'1 enable LDOA12 MACRO block for all interface*/ \
|
||||
{0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x67[0] = 0 to disable BT_GPS_SEL pins*/ \
|
||||
{0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS},/*Delay 1ms*/ \
|
||||
{0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT5, 0}, /*0x00[5] = 1b'0 release analog Ips to digital ,1:isolation*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT2, 0},/* disable SW LPS 0x04[10]=0*/ \
|
||||
{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*/ \
|
||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0},/* release WLON reset 0x04[16]=1*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0},/* disable HWPDN 0x04[15]=0*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, (BIT4|BIT3), 0},/* disable WL suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0},/* 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},/**/ \
|
||||
{0x004E, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 1},/*0x4C[23] = 0x4E[7] = 1, switch DPDT_SEL_P output from WL BB */\
|
||||
|
||||
#define RTL8723A_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*/ \
|
||||
{0x004E, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0},/*0x4C[23] = 0x4E[7] = 0, switch DPDT_SEL_P output from register 0x65[2] */\
|
||||
{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*/ \
|
||||
{0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT5, BIT5}, /*0x00[5] = 1b'1 analog Ips to digital ,1:isolation*/ \
|
||||
{0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0}, /*0x20[0] = 1b'0 disable LDOA12 MACRO block*/ \
|
||||
|
||||
|
||||
#define RTL8723A_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_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4|BIT3, (BIT4|BIT3)}, /*0x04[12:11] = 2b'11 enable WL suspend for PCIe*/ \
|
||||
{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*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07[7:0] = 0x20 SDIO SOP option to disable BG/MB/ACK/SWR*/ \
|
||||
{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'11 enable WL suspend for PCIe*/ \
|
||||
{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 RTL8723A_TRANS_SUS_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, BIT3 | BIT7, 0}, /*clear suspend enable and power down enable*/ \
|
||||
{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*/\
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x23[4] = 1b'0 12H LDO enter normal mode*/ \
|
||||
{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 RTL8723A_TRANS_CARDEMU_TO_CARDDIS \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07=0x20 , SOP option to disable BG/MB*/ \
|
||||
{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*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT2, BIT2}, /*0x04[10] = 1, enable SW LPS*/ \
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 1}, /*0x48[16] = 1 to enable GPIO9 as EXT WAKEUP*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{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 RTL8723A_TRANS_CARDDIS_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, BIT3 | BIT7, 0}, /*clear suspend enable and power down enable*/ \
|
||||
{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*/\
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0}, /*0x48[16] = 0 to disable GPIO9 as EXT WAKEUP*/ \
|
||||
{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*/\
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x23[4] = 1b'0 12H LDO enter normal mode*/ \
|
||||
{0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0},/*PCIe DMA start*/
|
||||
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_PDN \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK|PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07[7:0] = 0x20 SOP option to disable BG/MB/ACK/SWR*/ \
|
||||
{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 RTL8723A_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*/
|
||||
|
||||
#define RTL8723A_TRANS_ACT_TO_LPS \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF},/*PCIe DMA stop*/ \
|
||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF},/*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*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, 0},/*Whole BB is reset*/ \
|
||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x03},/*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*/ \
|
||||
{0x0093, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x00},/*When driver enter Sus/ Disable, enable LOP for BT*/ \
|
||||
{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 RTL8723A_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 RTL8723A_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 WLAN_PWR_CFG rtl8723A_power_on_flow[RTL8723A_TRANS_CARDEMU_TO_ACT_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_radio_off_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_card_disable_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_card_enable_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_suspend_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_resume_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_hwpdn_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_enter_lps_flow[RTL8723A_TRANS_ACT_TO_LPS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_leave_lps_flow[RTL8723A_TRANS_LPS_TO_ACT_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __HAL8723PWRSEQ_H__
|
||||
#define __HAL8723PWRSEQ_H__
|
||||
/*
|
||||
Check document WM-20110607-Paul-RTL8723A_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
|
||||
*/
|
||||
#include "HalPwrSeqCmd.h"
|
||||
#include "rtl8723a_spec.h"
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_ACT_STEPS 15
|
||||
#define RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS 15
|
||||
#define RTL8723A_TRANS_SUS_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS 15
|
||||
#define RTL8723A_TRANS_PDN_TO_CARDEMU_STEPS 15
|
||||
#define RTL8723A_TRANS_ACT_TO_LPS_STEPS 15
|
||||
#define RTL8723A_TRANS_LPS_TO_ACT_STEPS 15
|
||||
#define RTL8723A_TRANS_END_STEPS 1
|
||||
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_ACT \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0}, /*0x20[0] = 1b'1 enable LDOA12 MACRO block for all interface*/ \
|
||||
{0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x67[0] = 0 to disable BT_GPS_SEL pins*/ \
|
||||
{0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS},/*Delay 1ms*/ \
|
||||
{0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT5, 0}, /*0x00[5] = 1b'0 release analog Ips to digital ,1:isolation*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT2, 0},/* disable SW LPS 0x04[10]=0*/ \
|
||||
{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*/ \
|
||||
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0},/* release WLON reset 0x04[16]=1*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0},/* disable HWPDN 0x04[15]=0*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, (BIT4|BIT3), 0},/* disable WL suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, BIT0},/* 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},/**/ \
|
||||
{0x004E, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 1},/*0x4C[23] = 0x4E[7] = 1, switch DPDT_SEL_P output from WL BB */\
|
||||
|
||||
#define RTL8723A_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*/ \
|
||||
{0x004E, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT7, 0},/*0x4C[23] = 0x4E[7] = 0, switch DPDT_SEL_P output from register 0x65[2] */\
|
||||
{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*/ \
|
||||
{0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT5, BIT5}, /*0x00[5] = 1b'1 analog Ips to digital ,1:isolation*/ \
|
||||
{0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0}, /*0x20[0] = 1b'0 disable LDOA12 MACRO block*/ \
|
||||
|
||||
|
||||
#define RTL8723A_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_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4|BIT3, (BIT4|BIT3)}, /*0x04[12:11] = 2b'11 enable WL suspend for PCIe*/ \
|
||||
{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*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07[7:0] = 0x20 SDIO SOP option to disable BG/MB/ACK/SWR*/ \
|
||||
{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'11 enable WL suspend for PCIe*/ \
|
||||
{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 RTL8723A_TRANS_SUS_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, BIT3 | BIT7, 0}, /*clear suspend enable and power down enable*/ \
|
||||
{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*/\
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x23[4] = 1b'0 12H LDO enter normal mode*/ \
|
||||
{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 RTL8723A_TRANS_CARDEMU_TO_CARDDIS \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07=0x20 , SOP option to disable BG/MB*/ \
|
||||
{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*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT2, BIT2}, /*0x04[10] = 1, enable SW LPS*/ \
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 1}, /*0x48[16] = 1 to enable GPIO9 as EXT WAKEUP*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{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 RTL8723A_TRANS_CARDDIS_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, BIT3 | BIT7, 0}, /*clear suspend enable and power down enable*/ \
|
||||
{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*/\
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT0, 0}, /*0x48[16] = 0 to disable GPIO9 as EXT WAKEUP*/ \
|
||||
{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*/\
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, 0}, /*0x23[4] = 1b'0 12H LDO enter normal mode*/ \
|
||||
{0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0},/*PCIe DMA start*/
|
||||
|
||||
|
||||
#define RTL8723A_TRANS_CARDEMU_TO_PDN \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK|PWR_INTF_USB_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07[7:0] = 0x20 SOP option to disable BG/MB/ACK/SWR*/ \
|
||||
{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 RTL8723A_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*/
|
||||
|
||||
#define RTL8723A_TRANS_ACT_TO_LPS \
|
||||
/* format */ \
|
||||
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, // comments here*/ \
|
||||
{0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF},/*PCIe DMA stop*/ \
|
||||
{0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0xFF},/*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*/ \
|
||||
{0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, BIT1, 0},/*Whole BB is reset*/ \
|
||||
{0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x03},/*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*/ \
|
||||
{0x0093, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,PWR_BASEADDR_MAC,PWR_CMD_WRITE, 0xFF, 0x00},/*When driver enter Sus/ Disable, enable LOP for BT*/ \
|
||||
{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 RTL8723A_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 RTL8723A_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 WLAN_PWR_CFG rtl8723A_power_on_flow[RTL8723A_TRANS_CARDEMU_TO_ACT_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_radio_off_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_card_disable_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_card_enable_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_suspend_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_resume_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_hwpdn_flow[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS+RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_enter_lps_flow[RTL8723A_TRANS_ACT_TO_LPS_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
extern WLAN_PWR_CFG rtl8723A_leave_lps_flow[RTL8723A_TRANS_LPS_TO_ACT_STEPS+RTL8723A_TRANS_END_STEPS];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,56 +1,55 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_BB_8188E_HW_IMG_H
|
||||
#define __INC_BB_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* AGC_TAB_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_AGC_TAB_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_PHY_REG_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_PG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_BB_8188E_HW_IMG_H
|
||||
#define __INC_BB_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* AGC_TAB_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_AGC_TAB_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_PHY_REG_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
/******************************************************************************
|
||||
* PHY_REG_PG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_FW_8188E_HW_IMG_H
|
||||
#define __INC_FW_8188E_HW_IMG_H
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* FW_AP.TXT
|
||||
******************************************************************************/
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
void
|
||||
ODM_ReadFirmware_8188E_FW_AP(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
OUT u1Byte *pFirmware,
|
||||
OUT u4Byte *pFirmwareSize
|
||||
);
|
||||
|
||||
#else
|
||||
/******************************************************************************
|
||||
* FW_WoWLAN.TXT
|
||||
******************************************************************************/
|
||||
#define ArrayLength_8188E_FW_WoWLAN 15764
|
||||
extern const u8 Array_8188E_FW_WoWLAN[ArrayLength_8188E_FW_WoWLAN];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_FW_8188E_HW_IMG_H
|
||||
#define __INC_FW_8188E_HW_IMG_H
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* FW_AP.TXT
|
||||
******************************************************************************/
|
||||
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
|
||||
void
|
||||
ODM_ReadFirmware_8188E_FW_AP(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
OUT u1Byte *pFirmware,
|
||||
OUT u4Byte *pFirmwareSize
|
||||
);
|
||||
|
||||
#else
|
||||
/******************************************************************************
|
||||
* FW_WoWLAN.TXT
|
||||
******************************************************************************/
|
||||
#define ArrayLength_8188E_FW_WoWLAN 15764
|
||||
extern const u8 Array_8188E_FW_WoWLAN[ArrayLength_8188E_FW_WoWLAN];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
|
@ -1,38 +1,37 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_MAC_8188E_HW_IMG_H
|
||||
#define __INC_MAC_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* MAC_REG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_MAC_REG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_MAC_8188E_HW_IMG_H
|
||||
#define __INC_MAC_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* MAC_REG.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_MAC_REG_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
|
@ -1,38 +1,37 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_RF_8188E_HW_IMG_H
|
||||
#define __INC_RF_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* RadioA_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_RadioA_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#if (RTL8188E_SUPPORT == 1)
|
||||
#ifndef __INC_RF_8188E_HW_IMG_H
|
||||
#define __INC_RF_8188E_HW_IMG_H
|
||||
|
||||
//static BOOLEAN CheckCondition(const u4Byte Condition, const u4Byte Hex);
|
||||
|
||||
/******************************************************************************
|
||||
* RadioA_1T.TXT
|
||||
******************************************************************************/
|
||||
|
||||
HAL_STATUS
|
||||
ODM_ReadAndConfig_RadioA_1T_8188E(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif // end of HWIMG_SUPPORT
|
||||
|
|
|
@ -17,40 +17,40 @@
|
|||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#ifndef __HAL_PHY_RF_H__
|
||||
#define __HAL_PHY_RF_H__
|
||||
|
||||
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_MP)
|
||||
#define MAX_TOLERANCE 5
|
||||
#define IQK_DELAY_TIME 1 //ms
|
||||
|
||||
|
||||
//
|
||||
// BB/MAC/RF other monitor API
|
||||
//
|
||||
|
||||
void PHY_SetMonitorMode8192C(IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bEnableMonitorMode );
|
||||
|
||||
|
||||
//
|
||||
// IQ calibrate
|
||||
//
|
||||
void
|
||||
PHY_IQCalibrate_8192C( IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bReCovery);
|
||||
|
||||
void
|
||||
PHY_IQCalibrate_8192C( IN PADAPTER pAdapter,
|
||||
IN BOOLEAN bReCovery);
|
||||
|
||||
//
|
||||
// LC calibrate
|
||||
//
|
||||
void
|
||||
void
|
||||
PHY_LCCalibrate_8192C( IN PADAPTER pAdapter);
|
||||
|
||||
//
|
||||
// AP calibrate
|
||||
//
|
||||
void
|
||||
void
|
||||
PHY_APCalibrate_8192C( IN PADAPTER pAdapter,
|
||||
IN s1Byte delta);
|
||||
IN s1Byte delta);
|
||||
#endif
|
||||
|
||||
#define ODM_TARGET_CHNL_NUM_2G_5G 59
|
||||
|
@ -58,13 +58,12 @@ PHY_APCalibrate_8192C( IN PADAPTER pAdapter,
|
|||
|
||||
VOID
|
||||
ODM_ResetIQKResult(
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
);
|
||||
u1Byte
|
||||
u1Byte
|
||||
ODM_GetRightChnlPlaceforIQK(
|
||||
IN u1Byte chnl
|
||||
);
|
||||
|
||||
|
||||
#endif // #ifndef __HAL_PHY_RF_H__
|
||||
|
||||
|
|
|
@ -1,135 +1,134 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __HAL_PHY_RF_8188E_H__
|
||||
#define __HAL_PHY_RF_8188E_H__
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define IQK_DELAY_TIME_88E 10 //ms
|
||||
#define index_mapping_NUM_88E 15
|
||||
#define AVG_THERMAL_NUM_88E 4
|
||||
|
||||
|
||||
VOID
|
||||
ODM_TxPwrTrackAdjust88E(
|
||||
PDM_ODM_T pDM_Odm,
|
||||
u1Byte Type, // 0 = OFDM, 1 = CCK
|
||||
pu1Byte pDirection, // 1 = +(increase) 2 = -(decrease)
|
||||
pu4Byte pOutWriteVal // Tx tracking CCK/OFDM BB swing index adjust
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
//1 7. IQK
|
||||
|
||||
void
|
||||
PHY_IQCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER Adapter,
|
||||
#endif
|
||||
IN BOOLEAN bReCovery);
|
||||
|
||||
|
||||
//
|
||||
// LC calibrate
|
||||
//
|
||||
void
|
||||
PHY_LCCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER pAdapter
|
||||
#endif
|
||||
);
|
||||
|
||||
//
|
||||
// AP calibrate
|
||||
//
|
||||
void
|
||||
PHY_APCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN s1Byte delta);
|
||||
void
|
||||
PHY_DigitalPredistortion_8188E( IN PADAPTER pAdapter);
|
||||
|
||||
|
||||
VOID
|
||||
_PHY_SaveADDARegisters(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte ADDAReg,
|
||||
IN pu4Byte ADDABackup,
|
||||
IN u4Byte RegisterNum
|
||||
);
|
||||
|
||||
VOID
|
||||
_PHY_PathADDAOn(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte ADDAReg,
|
||||
IN BOOLEAN isPathAOn,
|
||||
IN BOOLEAN is2T
|
||||
);
|
||||
|
||||
VOID
|
||||
_PHY_MACSettingCalibration(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte MACReg,
|
||||
IN pu4Byte MACBackup
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
_PHY_PathAStandBy(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER pAdapter
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
#endif // #ifndef __HAL_PHY_RF_8188E_H__
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __HAL_PHY_RF_8188E_H__
|
||||
#define __HAL_PHY_RF_8188E_H__
|
||||
|
||||
/*--------------------------Define Parameters-------------------------------*/
|
||||
#define IQK_DELAY_TIME_88E 10 //ms
|
||||
#define index_mapping_NUM_88E 15
|
||||
#define AVG_THERMAL_NUM_88E 4
|
||||
|
||||
|
||||
VOID
|
||||
ODM_TxPwrTrackAdjust88E(
|
||||
PDM_ODM_T pDM_Odm,
|
||||
u1Byte Type, // 0 = OFDM, 1 = CCK
|
||||
pu1Byte pDirection, // 1 = +(increase) 2 = -(decrease)
|
||||
pu4Byte pOutWriteVal // Tx tracking CCK/OFDM BB swing index adjust
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER Adapter
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
//1 7. IQK
|
||||
|
||||
void
|
||||
PHY_IQCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER Adapter,
|
||||
#endif
|
||||
IN BOOLEAN bReCovery);
|
||||
|
||||
|
||||
//
|
||||
// LC calibrate
|
||||
//
|
||||
void
|
||||
PHY_LCCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER pAdapter
|
||||
#endif
|
||||
);
|
||||
|
||||
//
|
||||
// AP calibrate
|
||||
//
|
||||
void
|
||||
PHY_APCalibrate_8188E(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN s1Byte delta);
|
||||
void
|
||||
PHY_DigitalPredistortion_8188E( IN PADAPTER pAdapter);
|
||||
|
||||
|
||||
VOID
|
||||
_PHY_SaveADDARegisters(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte ADDAReg,
|
||||
IN pu4Byte ADDABackup,
|
||||
IN u4Byte RegisterNum
|
||||
);
|
||||
|
||||
VOID
|
||||
_PHY_PathADDAOn(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte ADDAReg,
|
||||
IN BOOLEAN isPathAOn,
|
||||
IN BOOLEAN is2T
|
||||
);
|
||||
|
||||
VOID
|
||||
_PHY_MACSettingCalibration(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
#else
|
||||
IN PADAPTER pAdapter,
|
||||
#endif
|
||||
IN pu4Byte MACReg,
|
||||
IN pu4Byte MACBackup
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
_PHY_PathAStandBy(
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
IN PDM_ODM_T pDM_Odm
|
||||
#else
|
||||
IN PADAPTER pAdapter
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
#endif // #ifndef __HAL_PHY_RF_8188E_H__
|
||||
|
|
|
@ -1,138 +1,137 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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>
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 The value of cmd: 4 bits
|
||||
/*---------------------------------------------*/
|
||||
#define PWR_CMD_READ 0x00
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the read value
|
||||
// value: N/A, left by 0
|
||||
// note: dirver shall implement this function by read & msk
|
||||
|
||||
#define PWR_CMD_WRITE 0x01
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the write bits
|
||||
// value: write value
|
||||
// note: driver shall implement this cmd by read & msk after write
|
||||
|
||||
#define PWR_CMD_POLLING 0x02
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the polled value
|
||||
// value: the value to be polled, masked by the msd field.
|
||||
// note: driver shall implement this cmd by
|
||||
// do{
|
||||
// if ( (Read(offset) & msk) == (value & msk) )
|
||||
// break;
|
||||
// } while (not timeout);
|
||||
|
||||
#define PWR_CMD_DELAY 0x03
|
||||
// offset: the value to delay
|
||||
// msk: N/A
|
||||
// value: the unit of delay, 0: us, 1: ms
|
||||
|
||||
#define PWR_CMD_END 0x04
|
||||
// offset: N/A
|
||||
// msk: N/A
|
||||
// value: N/A
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 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
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 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))
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//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))
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//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
|
||||
|
||||
|
||||
typedef enum _PWRSEQ_CMD_DELAY_UNIT_
|
||||
{
|
||||
PWRSEQ_DELAY_US,
|
||||
PWRSEQ_DELAY_MS,
|
||||
} PWRSEQ_DELAY_UNIT;
|
||||
|
||||
typedef 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;
|
||||
} WLAN_PWR_CFG, *PWLAN_PWR_CFG;
|
||||
|
||||
|
||||
#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
|
||||
|
||||
|
||||
//================================================================================
|
||||
// Prototype of protected function.
|
||||
//================================================================================
|
||||
u8 HalPwrSeqCmdParsing(
|
||||
PADAPTER padapter,
|
||||
u8 CutVersion,
|
||||
u8 FabVersion,
|
||||
u8 InterfaceType,
|
||||
WLAN_PWR_CFG PwrCfgCmd[]);
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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>
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 The value of cmd: 4 bits
|
||||
/*---------------------------------------------*/
|
||||
#define PWR_CMD_READ 0x00
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the read value
|
||||
// value: N/A, left by 0
|
||||
// note: dirver shall implement this function by read & msk
|
||||
|
||||
#define PWR_CMD_WRITE 0x01
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the write bits
|
||||
// value: write value
|
||||
// note: driver shall implement this cmd by read & msk after write
|
||||
|
||||
#define PWR_CMD_POLLING 0x02
|
||||
// offset: the read register offset
|
||||
// msk: the mask of the polled value
|
||||
// value: the value to be polled, masked by the msd field.
|
||||
// note: driver shall implement this cmd by
|
||||
// do{
|
||||
// if ( (Read(offset) & msk) == (value & msk) )
|
||||
// break;
|
||||
// } while (not timeout);
|
||||
|
||||
#define PWR_CMD_DELAY 0x03
|
||||
// offset: the value to delay
|
||||
// msk: N/A
|
||||
// value: the unit of delay, 0: us, 1: ms
|
||||
|
||||
#define PWR_CMD_END 0x04
|
||||
// offset: N/A
|
||||
// msk: N/A
|
||||
// value: N/A
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 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
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//3 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))
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//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))
|
||||
|
||||
/*---------------------------------------------*/
|
||||
//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
|
||||
|
||||
|
||||
typedef enum _PWRSEQ_CMD_DELAY_UNIT_
|
||||
{
|
||||
PWRSEQ_DELAY_US,
|
||||
PWRSEQ_DELAY_MS,
|
||||
} PWRSEQ_DELAY_UNIT;
|
||||
|
||||
typedef 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;
|
||||
} WLAN_PWR_CFG, *PWLAN_PWR_CFG;
|
||||
|
||||
|
||||
#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
|
||||
|
||||
|
||||
//================================================================================
|
||||
// Prototype of protected function.
|
||||
//================================================================================
|
||||
u8 HalPwrSeqCmdParsing(
|
||||
PADAPTER padapter,
|
||||
u8 CutVersion,
|
||||
u8 FabVersion,
|
||||
u8 InterfaceType,
|
||||
WLAN_PWR_CFG PwrCfgCmd[]);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -20,56 +20,56 @@
|
|||
#ifndef __HAL_VERSION_DEF_H__
|
||||
#define __HAL_VERSION_DEF_H__
|
||||
|
||||
#define TRUE _TRUE
|
||||
#define TRUE _TRUE
|
||||
#define FALSE _FALSE
|
||||
|
||||
// HAL_IC_TYPE_E
|
||||
typedef enum tag_HAL_IC_Type_Definition
|
||||
{
|
||||
CHIP_8192S = 0,
|
||||
CHIP_8188C = 1,
|
||||
CHIP_8192C = 2,
|
||||
CHIP_8192D = 3,
|
||||
CHIP_8723A = 4,
|
||||
CHIP_8188E = 5,
|
||||
CHIP_8881A = 6,
|
||||
CHIP_8812A = 7,
|
||||
CHIP_8821A = 8,
|
||||
CHIP_8723B = 9,
|
||||
CHIP_8192E = 10,
|
||||
CHIP_8192S = 0,
|
||||
CHIP_8188C = 1,
|
||||
CHIP_8192C = 2,
|
||||
CHIP_8192D = 3,
|
||||
CHIP_8723A = 4,
|
||||
CHIP_8188E = 5,
|
||||
CHIP_8881A = 6,
|
||||
CHIP_8812A = 7,
|
||||
CHIP_8821A = 8,
|
||||
CHIP_8723B = 9,
|
||||
CHIP_8192E = 10,
|
||||
}HAL_IC_TYPE_E;
|
||||
|
||||
//HAL_CHIP_TYPE_E
|
||||
typedef enum tag_HAL_CHIP_Type_Definition
|
||||
{
|
||||
TEST_CHIP = 0,
|
||||
NORMAL_CHIP = 1,
|
||||
TEST_CHIP = 0,
|
||||
NORMAL_CHIP = 1,
|
||||
FPGA = 2,
|
||||
}HAL_CHIP_TYPE_E;
|
||||
|
||||
//HAL_CUT_VERSION_E
|
||||
typedef enum tag_HAL_Cut_Version_Definition
|
||||
{
|
||||
A_CUT_VERSION = 0,
|
||||
B_CUT_VERSION = 1,
|
||||
C_CUT_VERSION = 2,
|
||||
D_CUT_VERSION = 3,
|
||||
E_CUT_VERSION = 4,
|
||||
F_CUT_VERSION = 5,
|
||||
G_CUT_VERSION = 6,
|
||||
A_CUT_VERSION = 0,
|
||||
B_CUT_VERSION = 1,
|
||||
C_CUT_VERSION = 2,
|
||||
D_CUT_VERSION = 3,
|
||||
E_CUT_VERSION = 4,
|
||||
F_CUT_VERSION = 5,
|
||||
G_CUT_VERSION = 6,
|
||||
}HAL_CUT_VERSION_E;
|
||||
|
||||
// HAL_Manufacturer
|
||||
typedef enum tag_HAL_Manufacturer_Version_Definition
|
||||
{
|
||||
CHIP_VENDOR_TSMC = 0,
|
||||
CHIP_VENDOR_UMC = 1,
|
||||
CHIP_VENDOR_TSMC = 0,
|
||||
CHIP_VENDOR_UMC = 1,
|
||||
}HAL_VENDOR_E;
|
||||
|
||||
typedef enum tag_HAL_RF_Type_Definition
|
||||
{
|
||||
RF_TYPE_1T1R = 0,
|
||||
RF_TYPE_1T2R = 1,
|
||||
RF_TYPE_1T1R = 0,
|
||||
RF_TYPE_1T2R = 1,
|
||||
RF_TYPE_2T2R = 2,
|
||||
RF_TYPE_2T3R = 3,
|
||||
RF_TYPE_2T4R = 4,
|
||||
|
@ -84,7 +84,7 @@ typedef struct tag_HAL_VERSION
|
|||
HAL_CHIP_TYPE_E ChipType;
|
||||
HAL_CUT_VERSION_E CUTVersion;
|
||||
HAL_VENDOR_E VendorType;
|
||||
HAL_RF_TYPE_E RFType;
|
||||
HAL_RF_TYPE_E RFType;
|
||||
u8 ROMVer;
|
||||
}HAL_VERSION,*PHAL_VERSION;
|
||||
|
||||
|
@ -137,7 +137,7 @@ typedef struct tag_HAL_VERSION
|
|||
//----------------------------------------------------------------------------
|
||||
#define IS_81XXC_TEST_CHIP(version) ((IS_81XXC(version) && (!IS_NORMAL_CHIP(version)))? TRUE: FALSE)
|
||||
|
||||
#define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? TRUE : FALSE)
|
||||
#define IS_92C_SERIAL(version) ((IS_81XXC(version) && IS_2T2R(version)) ? TRUE : FALSE)
|
||||
#define IS_81xxC_VENDOR_UMC_A_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_A_CUT(version) ? TRUE : FALSE) : FALSE): FALSE)
|
||||
#define IS_81xxC_VENDOR_UMC_B_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_B_CUT(version) ? TRUE : FALSE) : FALSE): FALSE)
|
||||
#define IS_81xxC_VENDOR_UMC_C_CUT(version) (IS_81XXC(version)?(IS_CHIP_VENDOR_UMC(version) ? (IS_C_CUT(version) ? TRUE : FALSE) : FALSE): FALSE)
|
||||
|
@ -153,4 +153,3 @@ typedef struct tag_HAL_VERSION
|
|||
#define IS_8723A_B_CUT(version) ((IS_8723_SERIES(version)) ? ( IS_B_CUT(version)?TRUE : FALSE) : FALSE)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -33,24 +33,24 @@
|
|||
#define RTL871X_MODULE_NAME "88EU"
|
||||
#define DRV_NAME "rtl8188eu"
|
||||
|
||||
#define CONFIG_USB_HCI
|
||||
#define CONFIG_USB_HCI
|
||||
|
||||
#define CONFIG_RTL8188E
|
||||
#define CONFIG_RTL8188E
|
||||
|
||||
#define PLATFORM_LINUX
|
||||
#define PLATFORM_LINUX
|
||||
|
||||
//#define CONFIG_IOCTL_CFG80211
|
||||
//#define CONFIG_IOCTL_CFG80211
|
||||
|
||||
#if defined( CONFIG_PLATFORM_ARM_SUNxI) || defined(CONFIG_PLATFORM_ACTIONS_ATM702X)
|
||||
#ifndef CONFIG_IOCTL_CFG80211
|
||||
#define CONFIG_IOCTL_CFG80211
|
||||
#ifndef CONFIG_IOCTL_CFG80211
|
||||
#define CONFIG_IOCTL_CFG80211
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
//#define RTW_USE_CFG80211_STA_EVENT /* Opne this for Android 4.1's wpa_supplicant */
|
||||
#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
|
||||
//#define CONFIG_DEBUG_CFG80211
|
||||
//#define CONFIG_DEBUG_CFG80211
|
||||
//#define CONFIG_DRV_ISSUE_PROV_REQ // IOT FOR S2
|
||||
#define CONFIG_SET_SCAN_DENY_TIMER
|
||||
|
||||
|
@ -62,38 +62,38 @@
|
|||
|
||||
//#define CONFIG_H2CLBK
|
||||
|
||||
#define CONFIG_EMBEDDED_FWIMG
|
||||
#define CONFIG_EMBEDDED_FWIMG
|
||||
//#define CONFIG_FILE_FWIMG
|
||||
|
||||
#define CONFIG_XMIT_ACK
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
#define CONFIG_ACTIVE_KEEP_ALIVE_CHECK
|
||||
#endif
|
||||
#define CONFIG_80211N_HT
|
||||
#define CONFIG_80211N_HT
|
||||
|
||||
#define CONFIG_RECV_REORDERING_CTRL
|
||||
#define CONFIG_RECV_REORDERING_CTRL
|
||||
|
||||
//#define CONFIG_TCP_CSUM_OFFLOAD_RX
|
||||
//#define CONFIG_TCP_CSUM_OFFLOAD_RX
|
||||
|
||||
//#define CONFIG_DRVEXT_MODULE
|
||||
//#define CONFIG_DRVEXT_MODULE
|
||||
|
||||
#define CONFIG_SUPPORT_USB_INT
|
||||
#ifdef CONFIG_SUPPORT_USB_INT
|
||||
//#define CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
//#define CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#endif
|
||||
|
||||
//#ifndef CONFIG_MP_INCLUDED
|
||||
#define CONFIG_IPS
|
||||
#define CONFIG_IPS
|
||||
#ifdef CONFIG_IPS
|
||||
//#define CONFIG_IPS_LEVEL_2 //enable this to set default IPS mode to IPS_LEVEL_2
|
||||
#endif
|
||||
#define SUPPORT_HW_RFOFF_DETECTED
|
||||
#define SUPPORT_HW_RFOFF_DETECTED
|
||||
|
||||
#define CONFIG_LPS
|
||||
#define CONFIG_LPS
|
||||
#if defined(CONFIG_LPS) && defined(CONFIG_SUPPORT_USB_INT)
|
||||
|
||||
|
||||
//#define CONFIG_LPS_LCLK
|
||||
//#define CONFIG_LPS_LCLK
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LPS_LCLK
|
||||
|
@ -104,23 +104,23 @@
|
|||
#define CONFIG_ANTENNA_DIVERSITY
|
||||
|
||||
//after link
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
#define CONFIG_HW_ANTENNA_DIVERSITY
|
||||
#ifdef CONFIG_ANTENNA_DIVERSITY
|
||||
#define CONFIG_HW_ANTENNA_DIVERSITY
|
||||
#endif
|
||||
|
||||
|
||||
//#define CONFIG_CONCURRENT_MODE
|
||||
//#define CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//#define CONFIG_HWPORT_SWAP //Port0->Sec , Port1 -> Pri
|
||||
#define CONFIG_TSF_RESET_OFFLOAD // For 2 PORT TSF SYNC.
|
||||
#define CONFIG_TSF_RESET_OFFLOAD // For 2 PORT TSF SYNC.
|
||||
#endif
|
||||
|
||||
#define CONFIG_IOL
|
||||
//#else //#ifndef CONFIG_MP_INCLUDED
|
||||
|
||||
//#endif //#ifndef CONFIG_MP_INCLUDED
|
||||
//#else //#ifndef CONFIG_MP_INCLUDED
|
||||
|
||||
#define CONFIG_AP_MODE
|
||||
//#endif //#ifndef CONFIG_MP_INCLUDED
|
||||
|
||||
#define CONFIG_AP_MODE
|
||||
#ifdef CONFIG_AP_MODE
|
||||
//#define CONFIG_INTERRUPT_BASED_TXBCN // Tx Beacon when driver BCN_OK ,BCN_ERR interrupt occurs
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN)
|
||||
|
@ -128,22 +128,22 @@
|
|||
#endif
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
//#define CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
#define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
#define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
#endif
|
||||
|
||||
|
||||
#define CONFIG_NATIVEAP_MLME
|
||||
#ifndef CONFIG_NATIVEAP_MLME
|
||||
#define CONFIG_HOSTAPD_MLME
|
||||
#endif
|
||||
#define CONFIG_FIND_BEST_CHANNEL
|
||||
//#define CONFIG_NO_WIRELESS_HANDLERS
|
||||
#define CONFIG_HOSTAPD_MLME
|
||||
#endif
|
||||
#define CONFIG_FIND_BEST_CHANNEL
|
||||
//#define CONFIG_NO_WIRELESS_HANDLERS
|
||||
#endif
|
||||
|
||||
#define CONFIG_P2P
|
||||
#define CONFIG_P2P
|
||||
#ifdef CONFIG_P2P
|
||||
//The CONFIG_WFD is for supporting the Wi-Fi display
|
||||
//#define CONFIG_WFD
|
||||
|
||||
//#define CONFIG_WFD
|
||||
|
||||
#ifndef CONFIG_WIFI_TEST
|
||||
#define CONFIG_P2P_REMOVE_GROUP_INFO
|
||||
#endif
|
||||
|
@ -154,13 +154,13 @@
|
|||
#endif
|
||||
|
||||
// Added by Kurt 20110511
|
||||
//#define CONFIG_TDLS
|
||||
//#define CONFIG_TDLS
|
||||
#ifdef CONFIG_TDLS
|
||||
// #ifndef CONFIG_WFD
|
||||
// #define CONFIG_WFD
|
||||
// #define CONFIG_WFD
|
||||
// #endif
|
||||
// #define CONFIG_TDLS_AUTOSETUP
|
||||
// #define CONFIG_TDLS_AUTOCHECKALIVE
|
||||
// #define CONFIG_TDLS_AUTOSETUP
|
||||
// #define CONFIG_TDLS_AUTOCHECKALIVE
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -179,9 +179,9 @@
|
|||
#define CONFIG_IOL_READ_EFUSE_MAP
|
||||
//#define DBG_IOL_READ_EFUSE_MAP
|
||||
#define CONFIG_IOL_LLT
|
||||
#define CONFIG_IOL_EFUSE_PATCH
|
||||
#define CONFIG_IOL_EFUSE_PATCH
|
||||
#define CONFIG_IOL_IOREG_CFG
|
||||
//#define CONFIG_IOL_IOREG_CFG_DBG
|
||||
//#define CONFIG_IOL_IOREG_CFG_DBG
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -204,35 +204,35 @@
|
|||
#endif // CONFIG_BR_EXT
|
||||
|
||||
#define CONFIG_TX_MCAST2UNI // Support IP multicast->unicast
|
||||
//#define CONFIG_CHECK_AC_LIFETIME // Check packet lifetime of 4 ACs.
|
||||
//#define CONFIG_CHECK_AC_LIFETIME // Check packet lifetime of 4 ACs.
|
||||
|
||||
|
||||
/*
|
||||
* Interface Related Config
|
||||
/*
|
||||
* Interface Related Config
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define CONFIG_USB_TX_AGGREGATION
|
||||
#define CONFIG_USB_RX_AGGREGATION
|
||||
#define CONFIG_USB_TX_AGGREGATION
|
||||
#define CONFIG_USB_RX_AGGREGATION
|
||||
#endif
|
||||
|
||||
#define CONFIG_PREALLOC_RECV_SKB
|
||||
#define CONFIG_PREALLOC_RECV_SKB
|
||||
//#define CONFIG_REDUCE_USB_TX_INT // Trade-off: Improve performance, but may cause TX URBs blocked by USB Host/Bus driver on few platforms.
|
||||
//#define CONFIG_EASY_REPLACEMENT
|
||||
//#define CONFIG_EASY_REPLACEMENT
|
||||
|
||||
/*
|
||||
/*
|
||||
* CONFIG_USE_USB_BUFFER_ALLOC_XX uses Linux USB Buffer alloc API and is for Linux platform only now!
|
||||
*/
|
||||
//#define CONFIG_USE_USB_BUFFER_ALLOC_TX // Trade-off: For TX path, improve stability on some platforms, but may cause performance degrade on other platforms.
|
||||
//#define CONFIG_USE_USB_BUFFER_ALLOC_RX // For RX path
|
||||
//#define CONFIG_USE_USB_BUFFER_ALLOC_TX // Trade-off: For TX path, improve stability on some platforms, but may cause performance degrade on other platforms.
|
||||
//#define CONFIG_USE_USB_BUFFER_ALLOC_RX // For RX path
|
||||
|
||||
#ifdef CONFIG_PLATFORM_ARM_SUNxI
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
#define CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
/*
|
||||
* USB VENDOR REQ BUFFER ALLOCATION METHOD
|
||||
* if not set we'll use function local variable (stack memory)
|
||||
*/
|
||||
|
@ -242,7 +242,7 @@
|
|||
#define CONFIG_USB_VENDOR_REQ_MUTEX
|
||||
#define CONFIG_VENDOR_REQ_RETRY
|
||||
|
||||
//#define CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
//#define CONFIG_USB_SUPPORT_ASYNC_VDN_REQ
|
||||
|
||||
|
||||
/*
|
||||
|
@ -261,7 +261,7 @@
|
|||
#define ENABLE_USB_DROP_INCORRECT_OUT 0
|
||||
|
||||
|
||||
//#define RTL8192CU_ADHOC_WORKAROUND_SETTING
|
||||
//#define RTL8192CU_ADHOC_WORKAROUND_SETTING
|
||||
|
||||
#define DISABLE_BB_RF 0
|
||||
|
||||
|
@ -269,7 +269,7 @@
|
|||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
#define MP_DRIVER 1
|
||||
#define CONFIG_MP_IWPRIV_SUPPORT
|
||||
#define CONFIG_MP_IWPRIV_SUPPORT
|
||||
//#undef CONFIG_USB_TX_AGGREGATION
|
||||
//#undef CONFIG_USB_RX_AGGREGATION
|
||||
#else
|
||||
|
@ -282,8 +282,8 @@
|
|||
*/
|
||||
#ifdef CONFIG_PLATFORM_MN10300
|
||||
#define CONFIG_SPECIAL_SETTING_FOR_FUNAI_TV
|
||||
#define CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
#define CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
||||
#if defined (CONFIG_SW_ANTENNA_DIVERSITY)
|
||||
#undef CONFIG_SW_ANTENNA_DIVERSITY
|
||||
#define CONFIG_HW_ANTENNA_DIVERSITY
|
||||
|
@ -292,18 +292,18 @@
|
|||
#if defined (CONFIG_POWER_SAVING)
|
||||
#undef CONFIG_POWER_SAVING
|
||||
#endif
|
||||
|
||||
|
||||
#endif//CONFIG_PLATFORM_MN10300
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_PLATFORM_TI_DM365
|
||||
#define CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
#define CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_PLATFORM_ACTIONS_ATM702X)
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
#undef CONFIG_USB_TX_AGGREGATION
|
||||
#endif
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
|
@ -319,20 +319,20 @@
|
|||
* Outsource Related Config
|
||||
*/
|
||||
|
||||
#define RTL8192CE_SUPPORT 0
|
||||
#define RTL8192CU_SUPPORT 0
|
||||
#define RTL8192C_SUPPORT (RTL8192CE_SUPPORT|RTL8192CU_SUPPORT)
|
||||
#define RTL8192CE_SUPPORT 0
|
||||
#define RTL8192CU_SUPPORT 0
|
||||
#define RTL8192C_SUPPORT (RTL8192CE_SUPPORT|RTL8192CU_SUPPORT)
|
||||
|
||||
#define RTL8192DE_SUPPORT 0
|
||||
#define RTL8192DU_SUPPORT 0
|
||||
#define RTL8192D_SUPPORT (RTL8192DE_SUPPORT|RTL8192DU_SUPPORT)
|
||||
#define RTL8192DE_SUPPORT 0
|
||||
#define RTL8192DU_SUPPORT 0
|
||||
#define RTL8192D_SUPPORT (RTL8192DE_SUPPORT|RTL8192DU_SUPPORT)
|
||||
|
||||
#define RTL8723AU_SUPPORT 0
|
||||
#define RTL8723AS_SUPPORT 0
|
||||
#define RTL8723AE_SUPPORT 0
|
||||
#define RTL8723A_SUPPORT (RTL8723AU_SUPPORT|RTL8723AS_SUPPORT|RTL8723AE_SUPPORT)
|
||||
#define RTL8723AU_SUPPORT 0
|
||||
#define RTL8723AS_SUPPORT 0
|
||||
#define RTL8723AE_SUPPORT 0
|
||||
#define RTL8723A_SUPPORT (RTL8723AU_SUPPORT|RTL8723AS_SUPPORT|RTL8723AE_SUPPORT)
|
||||
|
||||
#define RTL8723_FPGA_VERIFICATION 0
|
||||
#define RTL8723_FPGA_VERIFICATION 0
|
||||
|
||||
#define RTL8188EE_SUPPORT 0
|
||||
#define RTL8188EU_SUPPORT 1
|
||||
|
@ -340,13 +340,13 @@
|
|||
#define RTL8188E_SUPPORT (RTL8188EE_SUPPORT|RTL8188EU_SUPPORT|RTL8188ES_SUPPORT)
|
||||
#define RTL8188E_FOR_TEST_CHIP 0
|
||||
//#if (RTL8188E_SUPPORT==1)
|
||||
#define RATE_ADAPTIVE_SUPPORT 1
|
||||
#define RATE_ADAPTIVE_SUPPORT 1
|
||||
#define POWER_TRAINING_ACTIVE 1
|
||||
|
||||
//#endif
|
||||
|
||||
#ifdef CONFIG_USB_TX_AGGREGATION
|
||||
//#define CONFIG_TX_EARLY_MODE
|
||||
//#define CONFIG_TX_EARLY_MODE
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TX_EARLY_MODE
|
||||
|
@ -391,10 +391,9 @@
|
|||
|
||||
//#define DBG_HAL_INIT_PROFILING
|
||||
|
||||
//#define DBG_MEMORY_LEAK
|
||||
//#define DBG_MEMORY_LEAK
|
||||
|
||||
//TX use 1 urb
|
||||
//#define CONFIG_SINGLE_XMIT_BUF
|
||||
//RX use 1 urb
|
||||
//#define CONFIG_SINGLE_RECV_BUF
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -29,13 +29,13 @@
|
|||
#ifndef TRUE
|
||||
#define _TRUE 1
|
||||
#else
|
||||
#define _TRUE TRUE
|
||||
#define _TRUE TRUE
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
|
||||
#ifndef FALSE
|
||||
#define _FALSE 0
|
||||
#else
|
||||
#define _FALSE FALSE
|
||||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
typedef signed long s32;
|
||||
typedef unsigned long u32;
|
||||
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
typedef unsigned long long u64;
|
||||
|
||||
#ifdef NDIS50_MINIPORT
|
||||
|
||||
|
||||
#define NDIS_MAJOR_VERSION 5
|
||||
#define NDIS_MINOR_VERSION 0
|
||||
|
||||
|
@ -96,14 +96,14 @@
|
|||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
#define ULONG u32
|
||||
|
||||
typedef void (*proc_t)(void*);
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
typedef long atomic_t;
|
||||
|
@ -129,7 +129,7 @@
|
|||
#define VOID void
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void * PVOID;
|
||||
//#define PVOID (void *)
|
||||
|
@ -138,17 +138,17 @@
|
|||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
#define ULONG u32
|
||||
|
||||
typedef void (*proc_t)(void*);
|
||||
|
||||
|
||||
typedef unsigned int __kernel_size_t;
|
||||
typedef int __kernel_ssize_t;
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s,field) ((SSIZE_T)&((s*)(0))->field)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||
|
@ -170,8 +170,8 @@
|
|||
//
|
||||
// Byte Swapping routine.
|
||||
//
|
||||
#define EF1Byte
|
||||
#define EF2Byte le16_to_cpu
|
||||
#define EF1Byte
|
||||
#define EF2Byte le16_to_cpu
|
||||
#define EF4Byte le32_to_cpu
|
||||
|
||||
//
|
||||
|
@ -186,7 +186,7 @@
|
|||
//
|
||||
#define WriteEF1Byte(_ptr, _val) (*((u8 *)(_ptr)))=EF1Byte(_val)
|
||||
#define WriteEF2Byte(_ptr, _val) (*((u16 *)(_ptr)))=EF2Byte(_val)
|
||||
#define WriteEF4Byte(_ptr, _val) (*((u32 *)(_ptr)))=EF4Byte(_val)
|
||||
#define WriteEF4Byte(_ptr, _val) (*((u32 *)(_ptr)))=EF4Byte(_val)
|
||||
|
||||
//
|
||||
// Example:
|
||||
|
@ -203,7 +203,7 @@
|
|||
// BIT_OFFSET_LEN_MASK_32(16, 2) => 0x00030000
|
||||
//
|
||||
#define BIT_OFFSET_LEN_MASK_32(__BitOffset, __BitLen) \
|
||||
(BIT_LEN_MASK_32(__BitLen) << (__BitOffset))
|
||||
(BIT_LEN_MASK_32(__BitLen) << (__BitOffset))
|
||||
|
||||
//
|
||||
// Description:
|
||||
|
@ -227,7 +227,7 @@
|
|||
|
||||
//
|
||||
// Description:
|
||||
// Mask subfield (continuous bits in little-endian) of 4-byte value in litten byte oredering
|
||||
// Mask subfield (continuous bits in little-endian) of 4-byte value in litten byte oredering
|
||||
// and return the result in 4-byte value in host byte ordering.
|
||||
//
|
||||
#define LE_BITS_CLEARED_TO_4BYTE(__pStart, __BitOffset, __BitLen) \
|
||||
|
@ -239,7 +239,7 @@
|
|||
|
||||
//
|
||||
// Description:
|
||||
// Set subfield of little-endian 4-byte value to specified value.
|
||||
// Set subfield of little-endian 4-byte value to specified value.
|
||||
//
|
||||
#define SET_BITS_TO_LE_4BYTE(__pStart, __BitOffset, __BitLen, __Value) \
|
||||
*((u32 *)(__pStart)) = \
|
||||
|
@ -249,23 +249,23 @@
|
|||
( (((u32)__Value) & BIT_LEN_MASK_32(__BitLen)) << (__BitOffset) ) \
|
||||
);
|
||||
|
||||
|
||||
|
||||
#define BIT_LEN_MASK_16(__BitLen) \
|
||||
(0xFFFF >> (16 - (__BitLen)))
|
||||
|
||||
|
||||
#define BIT_OFFSET_LEN_MASK_16(__BitOffset, __BitLen) \
|
||||
(BIT_LEN_MASK_16(__BitLen) << (__BitOffset))
|
||||
|
||||
|
||||
#define LE_P2BYTE_TO_HOST_2BYTE(__pStart) \
|
||||
(EF2Byte(*((u16 *)(__pStart))))
|
||||
|
||||
|
||||
#define LE_BITS_TO_2BYTE(__pStart, __BitOffset, __BitLen) \
|
||||
( \
|
||||
( LE_P2BYTE_TO_HOST_2BYTE(__pStart) >> (__BitOffset) ) \
|
||||
& \
|
||||
BIT_LEN_MASK_16(__BitLen) \
|
||||
)
|
||||
|
||||
|
||||
#define LE_BITS_CLEARED_TO_2BYTE(__pStart, __BitOffset, __BitLen) \
|
||||
( \
|
||||
LE_P2BYTE_TO_HOST_2BYTE(__pStart) \
|
||||
|
@ -280,7 +280,7 @@
|
|||
| \
|
||||
( (((u16)__Value) & BIT_LEN_MASK_16(__BitLen)) << (__BitOffset) ) \
|
||||
);
|
||||
|
||||
|
||||
#define BIT_LEN_MASK_8(__BitLen) \
|
||||
(0xFF >> (8 - (__BitLen)))
|
||||
|
||||
|
@ -335,4 +335,3 @@
|
|||
typedef unsigned char BOOLEAN,*PBOOLEAN;
|
||||
|
||||
#endif //__BASIC_TYPES_H__
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -25,4 +25,3 @@
|
|||
#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
|
||||
|
||||
#endif //_CIRC_BUF_H_
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -33,4 +33,3 @@ extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj);
|
|||
extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -67,7 +67,7 @@
|
|||
#endif
|
||||
|
||||
//About USB VENDOR REQ
|
||||
#if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
|
||||
#if defined(CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC) && !defined(CONFIG_USB_VENDOR_REQ_MUTEX)
|
||||
#warning "define CONFIG_USB_VENDOR_REQ_MUTEX for CONFIG_USB_VENDOR_REQ_BUFFER_PREALLOC automatically"
|
||||
#define CONFIG_USB_VENDOR_REQ_MUTEX
|
||||
#endif
|
||||
|
|
|
@ -128,7 +128,7 @@ struct registry_priv
|
|||
u8 network_mode; //infra, ad-hoc, auto
|
||||
u8 channel;//ad-hoc support requirement
|
||||
u8 wireless_mode;//A, B, G, auto
|
||||
u8 scan_mode;//active, passive
|
||||
u8 scan_mode;//active, passive
|
||||
u8 radio_enable;
|
||||
u8 preamble;//long, short, auto
|
||||
u8 vrtl_carrier_sense;//Enable, Disable, Auto
|
||||
|
@ -166,7 +166,7 @@ struct registry_priv
|
|||
u8 ht_enable;
|
||||
u8 cbw40_enable;
|
||||
u8 ampdu_enable;//for tx
|
||||
u8 rx_stbc;
|
||||
u8 rx_stbc;
|
||||
u8 ampdu_amsdu;//A-MPDU Supports A-MSDU is permitted
|
||||
#endif
|
||||
u8 lowrate_two_xmit;
|
||||
|
@ -353,10 +353,10 @@ struct dvobj_priv
|
|||
u8 const_hwsw_rfoff_d3;
|
||||
u8 const_support_pciaspm;
|
||||
// pci-e bridge */
|
||||
u8 const_hostpci_aspm_setting;
|
||||
u8 const_hostpci_aspm_setting;
|
||||
// pci-e device */
|
||||
u8 const_devicepci_aspm_setting;
|
||||
u8 b_support_aspm; // If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00.
|
||||
u8 const_devicepci_aspm_setting;
|
||||
u8 b_support_aspm; // If it supports ASPM, Offset[560h] = 0x40, otherwise Offset[560h] = 0x00.
|
||||
u8 b_support_backdoor;
|
||||
u8 bdma64;
|
||||
#endif//PLATFORM_LINUX
|
||||
|
@ -453,7 +453,7 @@ struct _ADAPTER{
|
|||
int DriverState;// for disable driver using module, use dongle to 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 chip_type;
|
||||
u16 HardwareType;
|
||||
u16 interface_type;//USB,SDIO,SPI,PCI
|
||||
|
||||
|
@ -463,20 +463,20 @@ struct _ADAPTER{
|
|||
struct cmd_priv cmdpriv;
|
||||
struct evt_priv evtpriv;
|
||||
//struct io_queue *pio_queue;
|
||||
struct io_priv iopriv;
|
||||
struct io_priv iopriv;
|
||||
struct xmit_priv xmitpriv;
|
||||
struct recv_priv recvpriv;
|
||||
struct sta_priv stapriv;
|
||||
struct security_priv securitypriv;
|
||||
struct registry_priv registrypriv;
|
||||
struct pwrctrl_priv pwrctrlpriv;
|
||||
struct eeprom_priv eeprompriv;
|
||||
struct eeprom_priv eeprompriv;
|
||||
struct led_priv ledpriv;
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
//Check BT status for BT Hung.
|
||||
struct workqueue_struct *priv_checkbt_wq;
|
||||
struct delayed_work checkbt_work;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
struct mp_priv mppriv;
|
||||
#endif
|
||||
|
@ -663,4 +663,3 @@ __inline static u8 *myid(struct eeprom_priv *peepriv)
|
|||
|
||||
|
||||
#endif //__DRV_TYPES_H__
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -49,7 +49,7 @@ typedef struct _MP_REG_ENTRY
|
|||
u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString
|
||||
uint FieldOffset; // offset to MP_ADAPTER field
|
||||
uint FieldSize; // size (in bytes) of the field
|
||||
|
||||
|
||||
#ifdef UNDER_AMD64
|
||||
u64 Default;
|
||||
#else
|
||||
|
@ -64,7 +64,7 @@ typedef struct _MP_REG_ENTRY
|
|||
typedef struct _USB_EXTENSION {
|
||||
LPCUSB_FUNCS _lpUsbFuncs;
|
||||
USB_HANDLE _hDevice;
|
||||
PVOID pAdapter;
|
||||
PVOID pAdapter;
|
||||
} USB_EXTENSION, *PUSB_EXTENSION;
|
||||
#endif
|
||||
|
||||
|
@ -79,4 +79,3 @@ typedef struct _OCTET_STRING{
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,49 +1,48 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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 __DRV_TYPES_GSPI_H__
|
||||
#define __DRV_TYPES_GSPI_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
|
||||
// SPI Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/spi/spi.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data
|
||||
{
|
||||
u8 func_number;
|
||||
|
||||
u8 tx_block_mode;
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct spi_device *func;
|
||||
|
||||
struct workqueue_struct *priv_wq;
|
||||
struct delayed_work irq_work;
|
||||
#endif
|
||||
} GSPI_DATA, *PGSPI_DATA;
|
||||
|
||||
#endif // #ifndef __DRV_TYPES_GSPI_H__
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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 __DRV_TYPES_GSPI_H__
|
||||
#define __DRV_TYPES_GSPI_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
|
||||
// SPI Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/spi/spi.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct gspi_data
|
||||
{
|
||||
u8 func_number;
|
||||
|
||||
u8 tx_block_mode;
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct spi_device *func;
|
||||
|
||||
struct workqueue_struct *priv_wq;
|
||||
struct delayed_work irq_work;
|
||||
#endif
|
||||
} GSPI_DATA, *PGSPI_DATA;
|
||||
|
||||
#endif // #ifndef __DRV_TYPES_GSPI_H__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -22,4 +22,3 @@
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,71 +1,70 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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 __DRV_TYPES_SDIO_H__
|
||||
#define __DRV_TYPES_SDIO_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
|
||||
// SDIO Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct sdio_data
|
||||
{
|
||||
u8 func_number;
|
||||
|
||||
u8 tx_block_mode;
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sdio_func *func;
|
||||
_thread_hdl_ sys_sdio_irq_thd;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PDEVICE_OBJECT pphysdevobj;
|
||||
PDEVICE_OBJECT pfuncdevobj;
|
||||
PDEVICE_OBJECT pnextdevobj;
|
||||
SDBUS_INTERFACE_STANDARD sdbusinft;
|
||||
u8 nextdevstacksz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
SD_DEVICE_HANDLE hDevice;
|
||||
SD_CARD_RCA sd_rca;
|
||||
SD_CARD_INTERFACE card_intf;
|
||||
BOOLEAN enableIsarWithStatus;
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH];
|
||||
SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap;
|
||||
#endif
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* 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 __DRV_TYPES_SDIO_H__
|
||||
#define __DRV_TYPES_SDIO_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
|
||||
// SDIO Header Files
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/mmc/sdio_func.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct sdio_data
|
||||
{
|
||||
u8 func_number;
|
||||
|
||||
u8 tx_block_mode;
|
||||
u8 rx_block_mode;
|
||||
u32 block_transfer_len;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct sdio_func *func;
|
||||
_thread_hdl_ sys_sdio_irq_thd;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PDEVICE_OBJECT pphysdevobj;
|
||||
PDEVICE_OBJECT pfuncdevobj;
|
||||
PDEVICE_OBJECT pnextdevobj;
|
||||
SDBUS_INTERFACE_STANDARD sdbusinft;
|
||||
u8 nextdevstacksz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
SD_DEVICE_HANDLE hDevice;
|
||||
SD_CARD_RCA sd_rca;
|
||||
SD_CARD_INTERFACE card_intf;
|
||||
BOOLEAN enableIsarWithStatus;
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH];
|
||||
SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap;
|
||||
#endif
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -70,7 +70,7 @@ typedef struct _MP_REG_ENTRY
|
|||
u8 Type; // NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString
|
||||
uint FieldOffset; // offset to MP_ADAPTER field
|
||||
uint FieldSize; // size (in bytes) of the field
|
||||
|
||||
|
||||
#ifdef UNDER_AMD64
|
||||
u64 Default;
|
||||
#else
|
||||
|
@ -92,4 +92,3 @@ typedef struct _OCTET_STRING{
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
/*! \file */
|
||||
/*! \file */
|
||||
#ifndef __INC_ETHERNET_H
|
||||
#define __INC_ETHERNET_H
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#define RT_ETH_IS_MULTICAST(_pAddr) ((((UCHAR *)(_pAddr))[0]&0x01)!=0) //!< Is Multicast Address?
|
||||
#define RT_ETH_IS_BROADCAST(_pAddr) ( \
|
||||
((UCHAR *)(_pAddr))[0]==0xff && \
|
||||
((UCHAR *)(_pAddr))[0]==0xff && \
|
||||
((UCHAR *)(_pAddr))[1]==0xff && \
|
||||
((UCHAR *)(_pAddr))[2]==0xff && \
|
||||
((UCHAR *)(_pAddr))[3]==0xff && \
|
||||
|
@ -39,4 +39,3 @@
|
|||
|
||||
|
||||
#endif // #ifndef __INC_ETHERNET_H
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -33,4 +33,3 @@ void _lbk_rsp(PADAPTER Adapter);
|
|||
void _lbk_evt(IN PADAPTER Adapter);
|
||||
|
||||
void h2c_event_callback(unsigned char *dev, unsigned char *pbuf);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -28,7 +28,7 @@
|
|||
#define RATR_2M 0x00000002
|
||||
#define RATR_55M 0x00000004
|
||||
#define RATR_11M 0x00000008
|
||||
//OFDM
|
||||
//OFDM
|
||||
#define RATR_6M 0x00000010
|
||||
#define RATR_9M 0x00000020
|
||||
#define RATR_12M 0x00000040
|
||||
|
@ -37,7 +37,7 @@
|
|||
#define RATR_36M 0x00000200
|
||||
#define RATR_48M 0x00000400
|
||||
#define RATR_54M 0x00000800
|
||||
//MCS 1 Spatial Stream
|
||||
//MCS 1 Spatial Stream
|
||||
#define RATR_MCS0 0x00001000
|
||||
#define RATR_MCS1 0x00002000
|
||||
#define RATR_MCS2 0x00004000
|
||||
|
@ -61,7 +61,7 @@
|
|||
#define RATE_2M BIT(1)
|
||||
#define RATE_5_5M BIT(2)
|
||||
#define RATE_11M BIT(3)
|
||||
//OFDM
|
||||
//OFDM
|
||||
#define RATE_6M BIT(4)
|
||||
#define RATE_9M BIT(5)
|
||||
#define RATE_12M BIT(6)
|
||||
|
@ -90,15 +90,15 @@
|
|||
#define RATE_MCS15 BIT(27)
|
||||
|
||||
// ALL CCK Rate
|
||||
#define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M
|
||||
#define RATE_ALL_CCK RATR_1M|RATR_2M|RATR_55M|RATR_11M
|
||||
#define RATE_ALL_OFDM_AG RATR_6M|RATR_9M|RATR_12M|RATR_18M|RATR_24M|\
|
||||
RATR_36M|RATR_48M|RATR_54M
|
||||
RATR_36M|RATR_48M|RATR_54M
|
||||
#define RATE_ALL_OFDM_1SS RATR_MCS0|RATR_MCS1|RATR_MCS2|RATR_MCS3 |\
|
||||
RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7
|
||||
RATR_MCS4|RATR_MCS5|RATR_MCS6 |RATR_MCS7
|
||||
#define RATE_ALL_OFDM_2SS RATR_MCS8|RATR_MCS9 |RATR_MCS10|RATR_MCS11|\
|
||||
RATR_MCS12|RATR_MCS13|RATR_MCS14|RATR_MCS15
|
||||
|
||||
/*------------------------------ Tx Desc definition Macro ------------------------*/
|
||||
/*------------------------------ Tx Desc definition Macro ------------------------*/
|
||||
//#pragma mark -- Tx Desc related definition. --
|
||||
//----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------
|
||||
|
@ -179,4 +179,3 @@ void c2h_evt_clear(_adapter *adapter);
|
|||
s32 c2h_evt_read(_adapter *adapter, u8 *buf);
|
||||
|
||||
#endif //__HAL_COMMON_H__
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 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.
|
||||
|
@ -31,8 +31,8 @@
|
|||
|
||||
enum RTL871X_HCI_TYPE {
|
||||
RTW_PCIE = BIT0,
|
||||
RTW_USB = BIT1,
|
||||
RTW_SDIO = BIT2,
|
||||
RTW_USB = BIT1,
|
||||
RTW_SDIO = BIT2,
|
||||
RTW_GSPI = BIT3,
|
||||
};
|
||||
|
||||
|
@ -43,7 +43,7 @@ enum _CHIP_TYPE {
|
|||
RTL8188C_8192C,
|
||||
RTL8192D,
|
||||
RTL8723A,
|
||||
RTL8188E,
|
||||
RTL8188E,
|
||||
MAX_CHIP_TYPE
|
||||
};
|
||||
|
||||
|
@ -98,7 +98,7 @@ typedef enum _HW_VARIABLES{
|
|||
HW_VAR_INITIAL_GAIN,
|
||||
HW_VAR_TRIGGER_GPIO_0,
|
||||
HW_VAR_BT_SET_COEXIST,
|
||||
HW_VAR_BT_ISSUE_DELBA,
|
||||
HW_VAR_BT_ISSUE_DELBA,
|
||||
HW_VAR_CURRENT_ANTENNA,
|
||||
HW_VAR_ANTENNA_DIVERSITY_LINK,
|
||||
HW_VAR_ANTENNA_DIVERSITY_SELECT,
|
||||
|
@ -117,7 +117,7 @@ typedef enum _HW_VARIABLES{
|
|||
#endif
|
||||
HW_VAR_NAV_UPPER,
|
||||
HW_VAR_RPT_TIMER_SETTING,
|
||||
HW_VAR_TX_RPT_MAX_MACID,
|
||||
HW_VAR_TX_RPT_MAX_MACID,
|
||||
HW_VAR_H2C_MEDIA_STATUS_RPT,
|
||||
HW_VAR_CHK_HI_QUEUE_EMPTY,
|
||||
}HW_VARIABLES;
|
||||
|
@ -142,7 +142,7 @@ typedef enum _HAL_DEF_VARIABLE{
|
|||
}HAL_DEF_VARIABLE;
|
||||
|
||||
typedef enum _HAL_ODM_VARIABLE{
|
||||
HAL_ODM_STA_INFO,
|
||||
HAL_ODM_STA_INFO,
|
||||
HAL_ODM_P2P_STATE,
|
||||
HAL_ODM_WIFI_DISPLAY_STATE,
|
||||
}HAL_ODM_VARIABLE;
|
||||
|
@ -205,7 +205,7 @@ struct hal_ops {
|
|||
void (*SetBeaconRelatedRegistersHandler)(_adapter *padapter);
|
||||
|
||||
void (*Add_RateATid)(_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void (*clone_haldata)(_adapter *dst_padapter, _adapter *src_padapter);
|
||||
#endif
|
||||
void (*run_thread)(_adapter *padapter);
|
||||
|
@ -233,14 +233,14 @@ struct hal_ops {
|
|||
void (*ReadEFuse)(_adapter *padapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, BOOLEAN bPseudoTest);
|
||||
void (*EFUSEGetEfuseDefinition)(_adapter *padapter, u8 efuseType, u8 type, void *pOut, BOOLEAN bPseudoTest);
|
||||
u16 (*EfuseGetCurrentSize)(_adapter *padapter, u8 efuseType, BOOLEAN bPseudoTest);
|
||||
int (*Efuse_PgPacketRead)(_adapter *padapter, u8 offset, u8 *data, BOOLEAN bPseudoTest);
|
||||
int (*Efuse_PgPacketWrite)(_adapter *padapter, u8 offset, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
int (*Efuse_PgPacketRead)(_adapter *padapter, u8 offset, u8 *data, BOOLEAN bPseudoTest);
|
||||
int (*Efuse_PgPacketWrite)(_adapter *padapter, u8 offset, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
u8 (*Efuse_WordEnableDataWrite)(_adapter *padapter, u16 efuse_addr, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
BOOLEAN (*Efuse_PgPacketWrite_BT)(_adapter *padapter, u8 offset, u8 word_en, u8 *data, BOOLEAN bPseudoTest);
|
||||
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
void (*sreset_init_value)(_adapter *padapter);
|
||||
void (*sreset_reset_value)(_adapter *padapter);
|
||||
void (*sreset_reset_value)(_adapter *padapter);
|
||||
void (*silentreset)(_adapter *padapter);
|
||||
void (*sreset_xmit_status_check)(_adapter *padapter);
|
||||
void (*sreset_linked_status_check) (_adapter *padapter);
|
||||
|
@ -262,8 +262,8 @@ struct hal_ops {
|
|||
void (*hal_init_checkbthang_workqueue)(_adapter * padapter);
|
||||
void (*hal_free_checkbthang_workqueue)(_adapter * padapter);
|
||||
void (*hal_cancel_checkbthang_workqueue)(_adapter * padapter);
|
||||
void (*hal_checke_bt_hang)(_adapter * padapter);
|
||||
#endif
|
||||
void (*hal_checke_bt_hang)(_adapter * padapter);
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef enum _RT_EEPROM_TYPE{
|
||||
|
@ -275,10 +275,10 @@ typedef enum _RT_EEPROM_TYPE{
|
|||
|
||||
|
||||
#define RF_CHANGE_BY_INIT 0
|
||||
#define RF_CHANGE_BY_IPS BIT28
|
||||
#define RF_CHANGE_BY_PS BIT29
|
||||
#define RF_CHANGE_BY_HW BIT30
|
||||
#define RF_CHANGE_BY_SW BIT31
|
||||
#define RF_CHANGE_BY_IPS BIT28
|
||||
#define RF_CHANGE_BY_PS BIT29
|
||||
#define RF_CHANGE_BY_HW BIT30
|
||||
#define RF_CHANGE_BY_SW BIT31
|
||||
|
||||
typedef enum _HARDWARE_TYPE{
|
||||
HARDWARE_TYPE_RTL8180,
|
||||
|
@ -400,7 +400,7 @@ u8 rtw_hal_get_def_var(_adapter *padapter, HAL_DEF_VARIABLE eVariable, PVOID pVa
|
|||
|
||||
void rtw_hal_set_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, PVOID pValue1,BOOLEAN bSet);
|
||||
void rtw_hal_get_odm_var(_adapter *padapter, HAL_ODM_VARIABLE eVariable, PVOID pValue1,BOOLEAN bSet);
|
||||
|
||||
|
||||
void rtw_hal_enable_interrupt(_adapter *padapter);
|
||||
void rtw_hal_disable_interrupt(_adapter *padapter);
|
||||
|
||||
|
@ -448,7 +448,7 @@ s32 rtw_hal_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt);
|
|||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT
|
||||
void rtw_hal_sreset_init(_adapter *padapter);
|
||||
void rtw_hal_sreset_reset(_adapter *padapter);
|
||||
void rtw_hal_sreset_reset(_adapter *padapter);
|
||||
void rtw_hal_sreset_reset_value(_adapter *padapter);
|
||||
void rtw_hal_sreset_xmit_status_check(_adapter *padapter);
|
||||
void rtw_hal_sreset_linked_status_check (_adapter *padapter);
|
||||
|
@ -470,4 +470,3 @@ s32 rtw_hal_c2h_handler(_adapter *adapter, struct c2h_evt_hdr *c2h_evt);
|
|||
c2h_id_filter rtw_hal_c2h_id_filter_ccx(_adapter *adapter);
|
||||
|
||||
#endif //__HAL_INTF_H__
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -35,7 +35,7 @@
|
|||
#include <linux/wireless.h>
|
||||
#endif
|
||||
#else
|
||||
|
||||
|
||||
#include <list.h>
|
||||
|
||||
#endif
|
||||
|
@ -127,11 +127,11 @@ enum {
|
|||
|
||||
#define IEEE_CRYPT_ALG_NAME_LEN 16
|
||||
|
||||
#define WPA_CIPHER_NONE BIT(0)
|
||||
#define WPA_CIPHER_WEP40 BIT(1)
|
||||
#define WPA_CIPHER_NONE BIT(0)
|
||||
#define WPA_CIPHER_WEP40 BIT(1)
|
||||
#define WPA_CIPHER_WEP104 BIT(2)
|
||||
#define WPA_CIPHER_TKIP BIT(3)
|
||||
#define WPA_CIPHER_CCMP BIT(4)
|
||||
#define WPA_CIPHER_TKIP BIT(3)
|
||||
#define WPA_CIPHER_CCMP BIT(4)
|
||||
|
||||
|
||||
|
||||
|
@ -183,8 +183,8 @@ enum NETWORK_TYPE
|
|||
WIRELESS_11A = BIT(2), // tx: ofdm only, rx: ofdm only, hw: ofdm only
|
||||
WIRELESS_11_24N = BIT(3), // tx: MCS only, rx: MCS & cck, hw: MCS & cck
|
||||
WIRELESS_11_5N = BIT(4), // tx: MCS only, rx: MCS & ofdm, hw: ofdm only
|
||||
//WIRELESS_AUTO = BIT(5),
|
||||
WIRELESS_AC = BIT(6),
|
||||
//WIRELESS_AUTO = BIT(5),
|
||||
WIRELESS_AC = BIT(6),
|
||||
|
||||
//Combination
|
||||
WIRELESS_11BG = (WIRELESS_11B|WIRELESS_11G), // tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm
|
||||
|
@ -210,7 +210,7 @@ enum NETWORK_TYPE
|
|||
|
||||
#define IsSupportedTxCCK(NetType) ((NetType) & (WIRELESS_11B) ? _TRUE : _FALSE)
|
||||
#define IsSupportedTxOFDM(NetType) ((NetType) & (WIRELESS_11G|WIRELESS_11A) ? _TRUE : _FALSE)
|
||||
#define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? _TRUE : _FALSE)
|
||||
#define IsSupportedTxMCS(NetType) ((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? _TRUE : _FALSE)
|
||||
|
||||
|
||||
typedef struct ieee_param {
|
||||
|
@ -228,7 +228,7 @@ typedef struct ieee_param {
|
|||
} wpa_ie;
|
||||
struct{
|
||||
int command;
|
||||
int reason_code;
|
||||
int reason_code;
|
||||
} mlme;
|
||||
struct {
|
||||
u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
|
||||
|
@ -244,7 +244,7 @@ typedef struct ieee_param {
|
|||
u16 aid;
|
||||
u16 capability;
|
||||
int flags;
|
||||
u8 tx_supp_rates[16];
|
||||
u8 tx_supp_rates[16];
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
} add_sta;
|
||||
struct {
|
||||
|
@ -253,7 +253,7 @@ typedef struct ieee_param {
|
|||
} bcn_ie;
|
||||
#endif
|
||||
|
||||
} u;
|
||||
} u;
|
||||
}ieee_param;
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
@ -268,7 +268,7 @@ struct sta_data{
|
|||
u16 capability;
|
||||
int flags;
|
||||
u32 sta_set;
|
||||
u8 tx_supp_rates[16];
|
||||
u8 tx_supp_rates[16];
|
||||
u32 tx_supp_rates_len;
|
||||
struct rtw_ieee80211_ht_cap ht_cap;
|
||||
u64 rx_pkts;
|
||||
|
@ -315,7 +315,7 @@ struct ieee_ibss_seq {
|
|||
_list list;
|
||||
};
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)||defined(PLATFORM_FREEBSD)
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW)||defined(PLATFORM_FREEBSD)
|
||||
|
||||
struct rtw_ieee80211_hdr {
|
||||
u16 frame_ctl;
|
||||
|
@ -452,7 +452,7 @@ enum eap_type {
|
|||
|
||||
/* management */
|
||||
#define RTW_IEEE80211_STYPE_ASSOC_REQ 0x0000
|
||||
#define RTW_IEEE80211_STYPE_ASSOC_RESP 0x0010
|
||||
#define RTW_IEEE80211_STYPE_ASSOC_RESP 0x0010
|
||||
#define RTW_IEEE80211_STYPE_REASSOC_REQ 0x0020
|
||||
#define RTW_IEEE80211_STYPE_REASSOC_RESP 0x0030
|
||||
#define RTW_IEEE80211_STYPE_PROBE_REQ 0x0040
|
||||
|
@ -665,7 +665,7 @@ struct ieee80211_snap_hdr {
|
|||
#define IEEE80211_24GHZ_BAND (1<<0)
|
||||
#define IEEE80211_52GHZ_BAND (1<<1)
|
||||
|
||||
#define IEEE80211_CCK_RATE_LEN 4
|
||||
#define IEEE80211_CCK_RATE_LEN 4
|
||||
#define IEEE80211_NUM_OFDM_RATESLEN 8
|
||||
|
||||
|
||||
|
@ -673,7 +673,7 @@ struct ieee80211_snap_hdr {
|
|||
#define IEEE80211_CCK_RATE_2MB 0x04
|
||||
#define IEEE80211_CCK_RATE_5MB 0x0B
|
||||
#define IEEE80211_CCK_RATE_11MB 0x16
|
||||
#define IEEE80211_OFDM_RATE_LEN 8
|
||||
#define IEEE80211_OFDM_RATE_LEN 8
|
||||
#define IEEE80211_OFDM_RATE_6MB 0x0C
|
||||
#define IEEE80211_OFDM_RATE_9MB 0x12
|
||||
#define IEEE80211_OFDM_RATE_12MB 0x18
|
||||
|
@ -1101,7 +1101,7 @@ enum ieee80211_state {
|
|||
|
||||
/* the card is not linked at all */
|
||||
IEEE80211_NOLINK = 0,
|
||||
|
||||
|
||||
/* IEEE80211_ASSOCIATING* are for BSS client mode
|
||||
* the driver shall not perform RX filtering unless
|
||||
* the state is LINKED.
|
||||
|
@ -1109,31 +1109,31 @@ enum ieee80211_state {
|
|||
* defaults to NOLINK for ALL the other states (including
|
||||
* LINKED_SCANNING)
|
||||
*/
|
||||
|
||||
|
||||
/* the association procedure will start (wq scheduling)*/
|
||||
IEEE80211_ASSOCIATING,
|
||||
IEEE80211_ASSOCIATING_RETRY,
|
||||
|
||||
|
||||
/* the association procedure is sending AUTH request*/
|
||||
IEEE80211_ASSOCIATING_AUTHENTICATING,
|
||||
|
||||
|
||||
/* the association procedure has successfully authentcated
|
||||
* and is sending association request
|
||||
*/
|
||||
IEEE80211_ASSOCIATING_AUTHENTICATED,
|
||||
|
||||
|
||||
/* the link is ok. the card associated to a BSS or linked
|
||||
* to a ibss cell or acting as an AP and creating the bss
|
||||
*/
|
||||
IEEE80211_LINKED,
|
||||
|
||||
|
||||
/* same as LINKED, but the driver shall apply RX filter
|
||||
* rules as we are in NO_LINK mode. As the card is still
|
||||
* logically linked, but it is doing a syncro site survey
|
||||
* then it will be back to LINKED state.
|
||||
*/
|
||||
IEEE80211_LINKED_SCANNING,
|
||||
|
||||
|
||||
};
|
||||
#endif //PLATFORM_FREEBSD
|
||||
|
||||
|
@ -1325,7 +1325,7 @@ enum rtw_ieee80211_back_parties {
|
|||
RTW_IEEE80211_CHAN_NO_HT40PLUS = 1<<4,
|
||||
RTW_IEEE80211_CHAN_NO_HT40MINUS = 1<<5,
|
||||
};
|
||||
|
||||
|
||||
#define RTW_IEEE80211_CHAN_NO_HT40 \
|
||||
(RTW_IEEE80211_CHAN_NO_HT40PLUS | RTW_IEEE80211_CHAN_NO_HT40MINUS)
|
||||
|
||||
|
@ -1342,7 +1342,7 @@ struct rtw_ieee80211_channel {
|
|||
//u32 orig_flags;
|
||||
//int orig_mag;
|
||||
//int orig_mpwr;
|
||||
};
|
||||
};
|
||||
|
||||
#define CHAN_FMT \
|
||||
/*"band:%d, "*/ \
|
||||
|
@ -1355,7 +1355,7 @@ struct rtw_ieee80211_channel {
|
|||
/*"beacon_found:%u\n"*/ \
|
||||
/*"orig_flags:0x%08x\n"*/ \
|
||||
/*"orig_mag:%d\n"*/ \
|
||||
/*"orig_mpwr:%d\n"*/
|
||||
/*"orig_mpwr:%d\n"*/
|
||||
|
||||
#define CHAN_ARG(channel) \
|
||||
/*(channel)->band*/ \
|
||||
|
@ -1511,4 +1511,3 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
|
|||
const char *action_public_str(u8 action);
|
||||
|
||||
#endif /* IEEE80211_H */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -16,409 +16,408 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __IEEE80211_EXT_H
|
||||
#define __IEEE80211_EXT_H
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
#define WMM_OUI_TYPE 2
|
||||
#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
#define WMM_VERSION 1
|
||||
|
||||
#define WPA_PROTO_WPA BIT(0)
|
||||
#define WPA_PROTO_RSN BIT(1)
|
||||
|
||||
#define WPA_KEY_MGMT_IEEE8021X BIT(0)
|
||||
#define WPA_KEY_MGMT_PSK BIT(1)
|
||||
#define WPA_KEY_MGMT_NONE BIT(2)
|
||||
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
|
||||
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
|
||||
|
||||
|
||||
#define WPA_CAPABILITY_PREAUTH BIT(0)
|
||||
#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION BIT(6)
|
||||
#define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9)
|
||||
|
||||
|
||||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
|
||||
struct wme_ac_parameter {
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
/* byte 1 */
|
||||
u8 aifsn:4,
|
||||
acm:1,
|
||||
aci:2,
|
||||
reserved:1;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmin:4,
|
||||
eCWmax:4;
|
||||
#elif defined(__BIG_ENDIAN)
|
||||
/* byte 1 */
|
||||
u8 reserved:1,
|
||||
aci:2,
|
||||
acm:1,
|
||||
aifsn:4;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmax:4,
|
||||
eCWmin:4;
|
||||
#else
|
||||
#error "Please fix <endian.h>"
|
||||
#endif
|
||||
|
||||
/* bytes 3 & 4 */
|
||||
u16 txopLimit;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct wme_parameter_element {
|
||||
/* required fields for WME version 1 */
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
u8 oui_subtype;
|
||||
u8 version;
|
||||
u8 acInfo;
|
||||
u8 reserved;
|
||||
struct wme_ac_parameter ac[4];
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(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); \
|
||||
} 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); \
|
||||
} while (0)
|
||||
|
||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val))
|
||||
//#define RSN_SELECTOR_PUT(a, val) WPA_PUT_LE32((u8 *) (a), (val))
|
||||
|
||||
|
||||
|
||||
/* Action category code */
|
||||
enum ieee80211_category {
|
||||
WLAN_CATEGORY_SPECTRUM_MGMT = 0,
|
||||
WLAN_CATEGORY_QOS = 1,
|
||||
WLAN_CATEGORY_DLS = 2,
|
||||
WLAN_CATEGORY_BACK = 3,
|
||||
WLAN_CATEGORY_HT = 7,
|
||||
WLAN_CATEGORY_WMM = 17,
|
||||
};
|
||||
|
||||
/* SPECTRUM_MGMT action code */
|
||||
enum ieee80211_spectrum_mgmt_actioncode {
|
||||
WLAN_ACTION_SPCT_MSR_REQ = 0,
|
||||
WLAN_ACTION_SPCT_MSR_RPRT = 1,
|
||||
WLAN_ACTION_SPCT_TPC_REQ = 2,
|
||||
WLAN_ACTION_SPCT_TPC_RPRT = 3,
|
||||
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
|
||||
WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5,
|
||||
};
|
||||
|
||||
/* BACK action code */
|
||||
enum ieee80211_back_actioncode {
|
||||
WLAN_ACTION_ADDBA_REQ = 0,
|
||||
WLAN_ACTION_ADDBA_RESP = 1,
|
||||
WLAN_ACTION_DELBA = 2,
|
||||
};
|
||||
|
||||
/* HT features action code */
|
||||
enum ieee80211_ht_actioncode {
|
||||
WLAN_ACTION_NOTIFY_CH_WIDTH = 0,
|
||||
WLAN_ACTION_SM_PS = 1,
|
||||
WLAN_ACTION_PSPM = 2,
|
||||
WLAN_ACTION_PCO_PHASE = 3,
|
||||
WLAN_ACTION_MIMO_CSI_MX = 4,
|
||||
WLAN_ACTION_MIMO_NONCP_BF = 5,
|
||||
WLAN_ACTION_MIMP_CP_BF = 6,
|
||||
WLAN_ACTION_ASEL_INDICATES_FB = 7,
|
||||
WLAN_ACTION_HI_INFO_EXCHG = 8,
|
||||
};
|
||||
|
||||
/* BACK (block-ack) parties */
|
||||
enum ieee80211_back_parties {
|
||||
WLAN_BACK_RECIPIENT = 0,
|
||||
WLAN_BACK_INITIATOR = 1,
|
||||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) disassoc;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) beacon;
|
||||
struct {
|
||||
/* only variable items: SSID, Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_req;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_resp;
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) wme_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} __attribute__ ((packed)) addba_req;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} __attribute__ ((packed)) addba_resp;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) delba;
|
||||
struct{
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) plink_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) mesh_action;
|
||||
} __attribute__ ((packed)) u;
|
||||
} __attribute__ ((packed)) action;
|
||||
} __attribute__ ((packed)) u;
|
||||
}__attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} disassoc;
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} wme_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} addba_req;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} addba_resp;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} delba;
|
||||
struct{
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} plink_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} mesh_action;
|
||||
} u;
|
||||
} action;
|
||||
} u;
|
||||
} ;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
******************************************************************************/
|
||||
#ifndef __IEEE80211_EXT_H
|
||||
#define __IEEE80211_EXT_H
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
#define WMM_OUI_TYPE 2
|
||||
#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
#define WMM_VERSION 1
|
||||
|
||||
#define WPA_PROTO_WPA BIT(0)
|
||||
#define WPA_PROTO_RSN BIT(1)
|
||||
|
||||
#define WPA_KEY_MGMT_IEEE8021X BIT(0)
|
||||
#define WPA_KEY_MGMT_PSK BIT(1)
|
||||
#define WPA_KEY_MGMT_NONE BIT(2)
|
||||
#define WPA_KEY_MGMT_IEEE8021X_NO_WPA BIT(3)
|
||||
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
|
||||
|
||||
|
||||
#define WPA_CAPABILITY_PREAUTH BIT(0)
|
||||
#define WPA_CAPABILITY_MGMT_FRAME_PROTECTION BIT(6)
|
||||
#define WPA_CAPABILITY_PEERKEY_ENABLED BIT(9)
|
||||
|
||||
|
||||
#define PMKID_LEN 16
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
}__attribute__ ((packed));
|
||||
|
||||
struct wme_ac_parameter {
|
||||
#if defined(__LITTLE_ENDIAN)
|
||||
/* byte 1 */
|
||||
u8 aifsn:4,
|
||||
acm:1,
|
||||
aci:2,
|
||||
reserved:1;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmin:4,
|
||||
eCWmax:4;
|
||||
#elif defined(__BIG_ENDIAN)
|
||||
/* byte 1 */
|
||||
u8 reserved:1,
|
||||
aci:2,
|
||||
acm:1,
|
||||
aifsn:4;
|
||||
|
||||
/* byte 2 */
|
||||
u8 eCWmax:4,
|
||||
eCWmin:4;
|
||||
#else
|
||||
#error "Please fix <endian.h>"
|
||||
#endif
|
||||
|
||||
/* bytes 3 & 4 */
|
||||
u16 txopLimit;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct wme_parameter_element {
|
||||
/* required fields for WME version 1 */
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
u8 oui_subtype;
|
||||
u8 version;
|
||||
u8 acInfo;
|
||||
u8 reserved;
|
||||
struct wme_ac_parameter ac[4];
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct wpa_ie_hdr {
|
||||
u8 elem_id;
|
||||
u8 len;
|
||||
u8 oui[4]; /* 24-bit OUI followed by 8-bit OUI type */
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
struct rsn_ie_hdr {
|
||||
u8 elem_id; /* WLAN_EID_RSN */
|
||||
u8 len;
|
||||
u8 version[2]; /* little endian */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
#define WPA_PUT_LE16(a, val) \
|
||||
do { \
|
||||
(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); \
|
||||
} 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); \
|
||||
} while (0)
|
||||
|
||||
#define RSN_SELECTOR_PUT(a, val) WPA_PUT_BE32((u8 *) (a), (val))
|
||||
//#define RSN_SELECTOR_PUT(a, val) WPA_PUT_LE32((u8 *) (a), (val))
|
||||
|
||||
|
||||
|
||||
/* Action category code */
|
||||
enum ieee80211_category {
|
||||
WLAN_CATEGORY_SPECTRUM_MGMT = 0,
|
||||
WLAN_CATEGORY_QOS = 1,
|
||||
WLAN_CATEGORY_DLS = 2,
|
||||
WLAN_CATEGORY_BACK = 3,
|
||||
WLAN_CATEGORY_HT = 7,
|
||||
WLAN_CATEGORY_WMM = 17,
|
||||
};
|
||||
|
||||
/* SPECTRUM_MGMT action code */
|
||||
enum ieee80211_spectrum_mgmt_actioncode {
|
||||
WLAN_ACTION_SPCT_MSR_REQ = 0,
|
||||
WLAN_ACTION_SPCT_MSR_RPRT = 1,
|
||||
WLAN_ACTION_SPCT_TPC_REQ = 2,
|
||||
WLAN_ACTION_SPCT_TPC_RPRT = 3,
|
||||
WLAN_ACTION_SPCT_CHL_SWITCH = 4,
|
||||
WLAN_ACTION_SPCT_EXT_CHL_SWITCH = 5,
|
||||
};
|
||||
|
||||
/* BACK action code */
|
||||
enum ieee80211_back_actioncode {
|
||||
WLAN_ACTION_ADDBA_REQ = 0,
|
||||
WLAN_ACTION_ADDBA_RESP = 1,
|
||||
WLAN_ACTION_DELBA = 2,
|
||||
};
|
||||
|
||||
/* HT features action code */
|
||||
enum ieee80211_ht_actioncode {
|
||||
WLAN_ACTION_NOTIFY_CH_WIDTH = 0,
|
||||
WLAN_ACTION_SM_PS = 1,
|
||||
WLAN_ACTION_PSPM = 2,
|
||||
WLAN_ACTION_PCO_PHASE = 3,
|
||||
WLAN_ACTION_MIMO_CSI_MX = 4,
|
||||
WLAN_ACTION_MIMO_NONCP_BF = 5,
|
||||
WLAN_ACTION_MIMP_CP_BF = 6,
|
||||
WLAN_ACTION_ASEL_INDICATES_FB = 7,
|
||||
WLAN_ACTION_HI_INFO_EXCHG = 8,
|
||||
};
|
||||
|
||||
/* BACK (block-ack) parties */
|
||||
enum ieee80211_back_parties {
|
||||
WLAN_BACK_RECIPIENT = 0,
|
||||
WLAN_BACK_INITIATOR = 1,
|
||||
WLAN_BACK_TIMER = 2,
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) disassoc;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params, TIM */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) beacon;
|
||||
struct {
|
||||
/* only variable items: SSID, Supported rates */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_req;
|
||||
struct {
|
||||
__le64 timestamp;
|
||||
u16 beacon_int;
|
||||
u16 capab_info;
|
||||
/* followed by some of SSID, Supported rates,
|
||||
* FH Params, DS Params, CF Params, IBSS Params */
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) probe_resp;
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) wme_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} __attribute__ ((packed)) addba_req;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} __attribute__ ((packed)) addba_resp;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} __attribute__ ((packed)) delba;
|
||||
struct{
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) plink_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} __attribute__ ((packed)) mesh_action;
|
||||
} __attribute__ ((packed)) u;
|
||||
} __attribute__ ((packed)) action;
|
||||
} __attribute__ ((packed)) u;
|
||||
}__attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
u16 frame_control;
|
||||
u16 duration;
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
u8 bssid[6];
|
||||
u16 seq_ctrl;
|
||||
union {
|
||||
struct {
|
||||
u16 auth_alg;
|
||||
u16 auth_transaction;
|
||||
u16 status_code;
|
||||
/* possibly followed by Challenge text */
|
||||
u8 variable[0];
|
||||
} auth;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} deauth;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_req;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 status_code;
|
||||
u16 aid;
|
||||
/* followed by Supported rates */
|
||||
u8 variable[0];
|
||||
} assoc_resp, reassoc_resp;
|
||||
struct {
|
||||
u16 capab_info;
|
||||
u16 listen_interval;
|
||||
u8 current_ap[6];
|
||||
/* followed by SSID and Supported rates */
|
||||
u8 variable[0];
|
||||
} reassoc_req;
|
||||
struct {
|
||||
u16 reason_code;
|
||||
} disassoc;
|
||||
struct {
|
||||
u8 category;
|
||||
union {
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u8 status_code;
|
||||
u8 variable[0];
|
||||
} wme_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
u16 start_seq_num;
|
||||
} addba_req;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
u16 status;
|
||||
u16 capab;
|
||||
u16 timeout;
|
||||
} addba_resp;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u16 params;
|
||||
u16 reason_code;
|
||||
} delba;
|
||||
struct{
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
u16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} plink_action;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
} mesh_action;
|
||||
} u;
|
||||
} action;
|
||||
} u;
|
||||
} ;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/* mgmt header + 1 byte category code */
|
||||
#define IEEE80211_MIN_ACTION_SIZE FIELD_OFFSET(struct ieee80211_mgmt, u.action.u)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -17,13 +17,13 @@
|
|||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#ifndef _LINUX_IF_ETHER_H
|
||||
#define _LINUX_IF_ETHER_H
|
||||
|
||||
/*
|
||||
* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
|
||||
* and FCS/CRC (frame check sequence).
|
||||
* and FCS/CRC (frame check sequence).
|
||||
*/
|
||||
|
||||
#define ETH_ALEN 6 /* Octets in one ethernet addr */
|
||||
|
@ -69,18 +69,18 @@
|
|||
/*
|
||||
* Non DIX types. Won't clash for 1500 types.
|
||||
*/
|
||||
|
||||
|
||||
#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */
|
||||
#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */
|
||||
#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
|
||||
#define ETH_P_802_2 0x0004 /* 802.2 frames */
|
||||
#define ETH_P_802_2 0x0004 /* 802.2 frames */
|
||||
#define ETH_P_SNAP 0x0005 /* Internal only */
|
||||
#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */
|
||||
#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
|
||||
#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
|
||||
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
|
||||
#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
|
||||
#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
|
||||
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
|
||||
#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
|
||||
#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
|
||||
#define ETH_P_CONTROL 0x0016 /* Card specific control frames */
|
||||
#define ETH_P_IRDA 0x0017 /* Linux-IrDA */
|
||||
|
@ -89,8 +89,8 @@
|
|||
/*
|
||||
* This is an Ethernet frame header.
|
||||
*/
|
||||
|
||||
struct ethhdr
|
||||
|
||||
struct ethhdr
|
||||
{
|
||||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
||||
|
@ -110,4 +110,3 @@ struct _vlan {
|
|||
|
||||
|
||||
#endif /* _LINUX_IF_ETHER_H */
|
||||
|
||||
|
|
|
@ -1,115 +1,114 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __IOCTL_CFG80211_H__
|
||||
#define __IOCTL_CFG80211_H__
|
||||
|
||||
|
||||
#if defined(RTW_USE_CFG80211_STA_EVENT)
|
||||
#undef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
|
||||
#endif
|
||||
|
||||
struct rtw_wdev_invit_info {
|
||||
u8 token;
|
||||
u8 flags;
|
||||
u8 status;
|
||||
u8 req_op_ch;
|
||||
u8 rsp_op_ch;
|
||||
};
|
||||
|
||||
#define rtw_wdev_invit_info_init(invit_info) \
|
||||
do { \
|
||||
(invit_info)->token = 0; \
|
||||
(invit_info)->flags = 0x00; \
|
||||
(invit_info)->status = 0xff; \
|
||||
(invit_info)->req_op_ch = 0; \
|
||||
(invit_info)->rsp_op_ch = 0; \
|
||||
} while (0)
|
||||
|
||||
struct rtw_wdev_priv
|
||||
{
|
||||
struct wireless_dev *rtw_wdev;
|
||||
|
||||
_adapter *padapter;
|
||||
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
_lock scan_req_lock;
|
||||
|
||||
struct net_device *pmon_ndev;//for monitor interface
|
||||
char ifname_mon[IFNAMSIZ + 1]; //interface name for monitor interface
|
||||
|
||||
u8 p2p_enabled;
|
||||
|
||||
u8 provdisc_req_issued;
|
||||
|
||||
struct rtw_wdev_invit_info invit_info;
|
||||
|
||||
u8 bandroid_scan;
|
||||
bool block;
|
||||
bool power_mgmt;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_T ro_ch_to;
|
||||
ATOMIC_T switch_ch_to;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
|
||||
|
||||
#define wiphy_to_adapter(x) (_adapter *)(((struct rtw_wdev_priv*)wiphy_priv(x))->padapter)
|
||||
|
||||
#define wiphy_to_wdev(x) (struct wireless_dev *)(((struct rtw_wdev_priv*)wiphy_priv(x))->rtw_wdev)
|
||||
|
||||
int rtw_wdev_alloc(_adapter *padapter, struct device *dev);
|
||||
void rtw_wdev_free(struct wireless_dev *wdev);
|
||||
void rtw_wdev_unregister(struct wireless_dev *wdev);
|
||||
|
||||
void rtw_cfg80211_init_wiphy(_adapter *padapter);
|
||||
|
||||
void rtw_cfg80211_surveydone_event_callback(_adapter *padapter);
|
||||
|
||||
void rtw_cfg80211_indicate_connect(_adapter *padapter);
|
||||
void rtw_cfg80211_indicate_disconnect(_adapter *padapter);
|
||||
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, unsigned short reason);
|
||||
#endif //CONFIG_AP_MODE
|
||||
|
||||
void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, size_t len);
|
||||
void rtw_cfg80211_rx_p2p_action_public(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_rx_action(_adapter *adapter, u8 *frame, uint frame_len, const char*msg);
|
||||
|
||||
int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, int type);
|
||||
|
||||
bool rtw_cfg80211_pwr_mgmt(_adapter *adapter);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && !defined(COMPAT_KERNEL_RELEASE)
|
||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, buf, len, gfp)
|
||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, buf, len)
|
||||
#else
|
||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)
|
||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, bss, buf, len)
|
||||
#endif
|
||||
|
||||
#endif //__IOCTL_CFG80211_H__
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __IOCTL_CFG80211_H__
|
||||
#define __IOCTL_CFG80211_H__
|
||||
|
||||
|
||||
#if defined(RTW_USE_CFG80211_STA_EVENT)
|
||||
#undef CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
|
||||
#endif
|
||||
|
||||
struct rtw_wdev_invit_info {
|
||||
u8 token;
|
||||
u8 flags;
|
||||
u8 status;
|
||||
u8 req_op_ch;
|
||||
u8 rsp_op_ch;
|
||||
};
|
||||
|
||||
#define rtw_wdev_invit_info_init(invit_info) \
|
||||
do { \
|
||||
(invit_info)->token = 0; \
|
||||
(invit_info)->flags = 0x00; \
|
||||
(invit_info)->status = 0xff; \
|
||||
(invit_info)->req_op_ch = 0; \
|
||||
(invit_info)->rsp_op_ch = 0; \
|
||||
} while (0)
|
||||
|
||||
struct rtw_wdev_priv
|
||||
{
|
||||
struct wireless_dev *rtw_wdev;
|
||||
|
||||
_adapter *padapter;
|
||||
|
||||
struct cfg80211_scan_request *scan_request;
|
||||
_lock scan_req_lock;
|
||||
|
||||
struct net_device *pmon_ndev;//for monitor interface
|
||||
char ifname_mon[IFNAMSIZ + 1]; //interface name for monitor interface
|
||||
|
||||
u8 p2p_enabled;
|
||||
|
||||
u8 provdisc_req_issued;
|
||||
|
||||
struct rtw_wdev_invit_info invit_info;
|
||||
|
||||
u8 bandroid_scan;
|
||||
bool block;
|
||||
bool power_mgmt;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_T ro_ch_to;
|
||||
ATOMIC_T switch_ch_to;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
|
||||
|
||||
#define wiphy_to_adapter(x) (_adapter *)(((struct rtw_wdev_priv*)wiphy_priv(x))->padapter)
|
||||
|
||||
#define wiphy_to_wdev(x) (struct wireless_dev *)(((struct rtw_wdev_priv*)wiphy_priv(x))->rtw_wdev)
|
||||
|
||||
int rtw_wdev_alloc(_adapter *padapter, struct device *dev);
|
||||
void rtw_wdev_free(struct wireless_dev *wdev);
|
||||
void rtw_wdev_unregister(struct wireless_dev *wdev);
|
||||
|
||||
void rtw_cfg80211_init_wiphy(_adapter *padapter);
|
||||
|
||||
void rtw_cfg80211_surveydone_event_callback(_adapter *padapter);
|
||||
|
||||
void rtw_cfg80211_indicate_connect(_adapter *padapter);
|
||||
void rtw_cfg80211_indicate_disconnect(_adapter *padapter);
|
||||
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted);
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, unsigned short reason);
|
||||
#endif //CONFIG_AP_MODE
|
||||
|
||||
void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, size_t len);
|
||||
void rtw_cfg80211_rx_p2p_action_public(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_len);
|
||||
void rtw_cfg80211_rx_action(_adapter *adapter, u8 *frame, uint frame_len, const char*msg);
|
||||
|
||||
int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, int type);
|
||||
|
||||
bool rtw_cfg80211_pwr_mgmt(_adapter *adapter);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && !defined(COMPAT_KERNEL_RELEASE)
|
||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, buf, len, gfp)
|
||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, buf, len)
|
||||
#else
|
||||
#define rtw_cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt(dev, freq, sig_dbm, buf, len, gfp)
|
||||
#define rtw_cfg80211_send_rx_assoc(dev, bss, buf, len) cfg80211_send_rx_assoc(dev, bss, buf, len)
|
||||
#endif
|
||||
|
||||
#endif //__IOCTL_CFG80211_H__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -102,7 +102,7 @@ struct ip_options {
|
|||
is_data:1, /* Options in __data, rather than skb */
|
||||
is_strictroute:1, /* Strict source route */
|
||||
srr_is_hit:1, /* Packet destination addr was our one */
|
||||
is_changed:1, /* IP checksum more not valid */
|
||||
is_changed:1, /* IP checksum more not valid */
|
||||
rr_needaddr:1, /* Need to record addr of outgoing dev */
|
||||
ts_needtime:1, /* Need to record timestamp */
|
||||
ts_needaddr:1; /* Need to record addr of outgoing dev */
|
||||
|
@ -121,7 +121,7 @@ struct iphdr {
|
|||
version:4;
|
||||
#elif defined (__BIG_ENDIAN_BITFIELD)
|
||||
__u8 version:4,
|
||||
ihl:4;
|
||||
ihl:4;
|
||||
#else
|
||||
#error "Please fix <asm/byteorder.h>"
|
||||
#endif
|
||||
|
@ -138,4 +138,3 @@ struct iphdr {
|
|||
};
|
||||
|
||||
#endif /* _LINUX_IP_H */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -37,4 +37,3 @@ extern void rtw_report_sec_ie(_adapter *adapter,u8 authmode,u8 *sec_ie);
|
|||
void rtw_reset_securitypriv( _adapter *adapter );
|
||||
|
||||
#endif //_MLME_OSDEP_H_
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#define OID_RT_PRO_RESET_DUT 0xFF818000
|
||||
#define OID_RT_PRO_SET_DATA_RATE 0xFF818001
|
||||
#define OID_RT_PRO_START_TEST 0xFF818002
|
||||
#define OID_RT_PRO_STOP_TEST 0xFF818003
|
||||
#define OID_RT_PRO_STOP_TEST 0xFF818003
|
||||
#define OID_RT_PRO_SET_PREAMBLE 0xFF818004
|
||||
#define OID_RT_PRO_SET_SCRAMBLER 0xFF818005
|
||||
#define OID_RT_PRO_SET_FILTER_BB 0xFF818006
|
||||
|
@ -71,7 +71,7 @@
|
|||
#define OID_RT_PRO_READ_EEPROM 0xFF818022
|
||||
#define OID_RT_PRO_RESET_TX_PACKET_SENT 0xFF818023
|
||||
#define OID_RT_PRO_QUERY_TX_PACKET_SENT 0xFF818024
|
||||
#define OID_RT_PRO_RESET_RX_PACKET_RECEIVED 0xFF818025
|
||||
#define OID_RT_PRO_RESET_RX_PACKET_RECEIVED 0xFF818025
|
||||
#define OID_RT_PRO_QUERY_RX_PACKET_RECEIVED 0xFF818026
|
||||
#define OID_RT_PRO_QUERY_RX_PACKET_CRC32_ERROR 0xFF818027
|
||||
#define OID_RT_PRO_QUERY_CURRENT_ADDRESS 0xFF818028
|
||||
|
@ -84,7 +84,7 @@
|
|||
#define OID_RT_PRO_SET_MODULATION 0xFF81802F
|
||||
//
|
||||
|
||||
//Sean
|
||||
//Sean
|
||||
#define OID_RT_DRIVER_OPTION 0xFF818080
|
||||
#define OID_RT_RF_OFF 0xFF818081
|
||||
#define OID_RT_AUTH_STATUS 0xFF818082
|
||||
|
@ -114,15 +114,15 @@
|
|||
#define OID_RT_WIRELESS_MODE_STARTING_ADHOC 0xFF818503
|
||||
//
|
||||
|
||||
#define OID_RT_GET_CONNECT_STATE 0xFF030001
|
||||
#define OID_RT_RESCAN 0xFF030002
|
||||
#define OID_RT_GET_CONNECT_STATE 0xFF030001
|
||||
#define OID_RT_RESCAN 0xFF030002
|
||||
#define OID_RT_SET_KEY_LENGTH 0xFF030003
|
||||
#define OID_RT_SET_DEFAULT_KEY_ID 0xFF030004
|
||||
|
||||
#define OID_RT_SET_CHANNEL 0xFF010182
|
||||
#define OID_RT_SET_SNIFFER_MODE 0xFF010183
|
||||
#define OID_RT_GET_SIGNAL_QUALITY 0xFF010184
|
||||
#define OID_RT_GET_SMALL_PACKET_CRC 0xFF010185
|
||||
#define OID_RT_SET_SNIFFER_MODE 0xFF010183
|
||||
#define OID_RT_GET_SIGNAL_QUALITY 0xFF010184
|
||||
#define OID_RT_GET_SMALL_PACKET_CRC 0xFF010185
|
||||
#define OID_RT_GET_MIDDLE_PACKET_CRC 0xFF010186
|
||||
#define OID_RT_GET_LARGE_PACKET_CRC 0xFF010187
|
||||
#define OID_RT_GET_TX_RETRY 0xFF010188
|
||||
|
@ -239,8 +239,8 @@
|
|||
#define OID_RT_PRO_READ_REGISTER 0xFF871101 //Q
|
||||
#define OID_RT_PRO_WRITE_REGISTER 0xFF871102 //S
|
||||
|
||||
#define OID_RT_PRO_BURST_READ_REGISTER 0xFF871103 //Q
|
||||
#define OID_RT_PRO_BURST_WRITE_REGISTER 0xFF871104 //S
|
||||
#define OID_RT_PRO_BURST_READ_REGISTER 0xFF871103 //Q
|
||||
#define OID_RT_PRO_BURST_WRITE_REGISTER 0xFF871104 //S
|
||||
|
||||
#define OID_RT_PRO_WRITE_TXCMD 0xFF871105 //S
|
||||
|
||||
|
@ -283,9 +283,9 @@
|
|||
#define OID_RT_PRO_READ_TSSI 0xFF871123//S
|
||||
#define OID_RT_PRO_SET_POWER_TRACKING 0xFF871124//S
|
||||
|
||||
|
||||
|
||||
#define OID_RT_PRO_QRY_PWRSTATE 0xFF871150 //Q
|
||||
#define OID_RT_PRO_SET_PWRSTATE 0xFF871151 //S
|
||||
#define OID_RT_PRO_SET_PWRSTATE 0xFF871151 //S
|
||||
|
||||
//Method 2 , using workitem
|
||||
#define OID_RT_SET_READ_REG 0xFF871181 //S
|
||||
|
@ -299,7 +299,7 @@
|
|||
|
||||
//For SDIO INTERFACE only
|
||||
#define OID_RT_PRO_SYNCPAGERW_SRAM 0xFF8711A0 //Q, S
|
||||
#define OID_RT_PRO_871X_DRV_EXT 0xFF8711A1
|
||||
#define OID_RT_PRO_871X_DRV_EXT 0xFF8711A1
|
||||
|
||||
//For USB INTERFACE only
|
||||
#define OID_RT_PRO_USB_VENDOR_REQ 0xFF8711B0 //Q, S
|
||||
|
@ -314,8 +314,8 @@
|
|||
|
||||
#define OID_RT_PRO_ENCRYPTION_CTRL 0xFF871200 //Q, S
|
||||
#define OID_RT_PRO_ADD_STA_INFO 0xFF871201 //S
|
||||
#define OID_RT_PRO_DELE_STA_INFO 0xFF871202 //S
|
||||
#define OID_RT_PRO_QUERY_DR_VARIABLE 0xFF871203 //Q
|
||||
#define OID_RT_PRO_DELE_STA_INFO 0xFF871202 //S
|
||||
#define OID_RT_PRO_QUERY_DR_VARIABLE 0xFF871203 //Q
|
||||
|
||||
#define OID_RT_PRO_RX_PACKET_TYPE 0xFF871204 //Q, S
|
||||
|
||||
|
@ -327,7 +327,7 @@
|
|||
#define OID_RT_SET_BANDWIDTH 0xFF871209 //S
|
||||
#define OID_RT_SET_CRYSTAL_CAP 0xFF87120A //S
|
||||
|
||||
#define OID_RT_SET_RX_PACKET_TYPE 0xFF87120B //S
|
||||
#define OID_RT_SET_RX_PACKET_TYPE 0xFF87120B //S
|
||||
|
||||
#define OID_RT_GET_EFUSE_MAX_SIZE 0xFF87120C //Q
|
||||
|
||||
|
@ -351,4 +351,3 @@
|
|||
#define OID_RT_PRO_EFUSE_MAP 0xFF871217 //Q, S
|
||||
|
||||
#endif //#ifndef __CUSTOM_OID_H
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* 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.
|
||||
|
@ -16,7 +16,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#ifndef __NIC_SPEC_H__
|
||||
|
@ -44,4 +44,3 @@
|
|||
|
||||
|
||||
#endif // __RTL8711_SPEC_H__
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue