rtl8188eu: Remove trailing white space from all source files

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-05-18 23:28:07 -05:00
parent 77e736c66a
commit f5f3863bc5
205 changed files with 55371 additions and 55581 deletions

View file

@ -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