Commit 25a84832 authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: remove define TCP_ENHANCEMENTS and it's related code



TCP_ENHANCEMENTS is always in use. Remove define TCP_ENHANCEMENTS, ifdef line,
ifndef line and codes inside ifndef.

Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarTony Cho <tony.cho@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fcc6ef92
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -1284,21 +1284,6 @@ int wlan_initialize_threads(perInterface_wlan_t *nic)
	}
#endif

#ifndef TCP_ENHANCEMENTS
	/* create rx task */
	PRINT_D(INIT_DBG, "Creating kthread for reception\n");
	g_linux_wlan->rxq_thread = kthread_run(linux_wlan_rxq_task, (void *)g_linux_wlan, "K_RXQ_TASK");
	if (g_linux_wlan->rxq_thread == 0) {
		PRINT_ER("couldn't create RXQ thread\n");
		ret = -ENOBUFS;
		goto _fail_1;
	}

	/* wait for RXQ task to start. */
	down(&g_linux_wlan->rxq_thread_started);

#endif

	/* create tx task */
	PRINT_D(INIT_DBG, "Creating kthread for transmission\n");
	g_linux_wlan->txq_thread = kthread_run(linux_wlan_txq_task, (void *)g_linux_wlan, "K_TXQ_TASK");
@@ -1327,9 +1312,6 @@ _fail_2:
	up(&g_linux_wlan->rxq_event);
	kthread_stop(g_linux_wlan->rxq_thread);

#ifndef TCP_ENHANCEMENTS
_fail_1:
#endif
	#if (RX_BH_TYPE == RX_BH_KTHREAD)
	/*De-Initialize 1st thread*/
	g_linux_wlan->close = 1;
@@ -1970,10 +1952,6 @@ void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset)
	int stats;
	unsigned char *buff_to_send = NULL;
	struct sk_buff *skb;
#ifndef TCP_ENHANCEMENTS
	char *pu8UdpBuffer;
	struct iphdr *ih;
#endif
	struct net_device *wilc_netdev;
	perInterface_wlan_t *nic;

@@ -2019,16 +1997,6 @@ void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset)
		/* nic = netdev_priv(wilc_netdev); */

		skb->protocol = eth_type_trans(skb, wilc_netdev);
			#ifndef TCP_ENHANCEMENTS
		/*get source and dest ip addresses*/
		ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr));

		pu8UdpBuffer = (char *)ih + sizeof(struct iphdr);
		if (buff_to_send[35] == 67 && buff_to_send[37] == 68)
			PRINT_D(RX_DBG, "DHCP Message received\n");
		if (buff_to_send[12] == 0x88 && buff_to_send[13] == 0x8e)
			PRINT_D(GENERIC_DBG, "eapol received\n");
			#endif
		/* Send the packet to the stack by giving it to the bridge */
		nic->netstats.rx_packets++;
		nic->netstats.rx_bytes += frame_len;
@@ -2036,10 +2004,6 @@ void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset)
		stats = netif_rx(skb);
		PRINT_D(RX_DBG, "netif_rx ret value is: %d\n", stats);
	}
		#ifndef TCP_ENHANCEMENTS
	else
		PRINT_ER("Discard sending packet with len = %d\n", size);
		#endif
}

void WILC_WFI_mgmt_rx(u8 *buff, u32 size)
+0 −2
Original line number Diff line number Diff line
@@ -1663,12 +1663,10 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
		sinfo->tx_failed	=  strStatistics.u32TxFailureCount;
		sinfo->txrate.legacy = strStatistics.u8LinkSpeed * 10;

#ifdef TCP_ENHANCEMENTS
		if ((strStatistics.u8LinkSpeed > TCP_ACK_FILTER_LINK_SPEED_THRESH) && (strStatistics.u8LinkSpeed != DEFAULT_LINK_SPEED))
			Enable_TCP_ACK_Filter(true);
		else if (strStatistics.u8LinkSpeed != DEFAULT_LINK_SPEED)
			Enable_TCP_ACK_Filter(false);
#endif

		PRINT_D(CORECONFIG_DBG, "*** stats[%d][%d][%d][%d][%d]\n", sinfo->signal, sinfo->rx_packets, sinfo->tx_packets,
			sinfo->tx_failed, sinfo->txrate.legacy);
+0 −2
Original line number Diff line number Diff line
@@ -101,10 +101,8 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size);
int WILC_WFI_deinit_mon_interface(void);
struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_device *real_dev);

#ifdef TCP_ENHANCEMENTS
#define TCP_ACK_FILTER_LINK_SPEED_THRESH	54
#define DEFAULT_LINK_SPEED			72
void Enable_TCP_ACK_Filter(bool value);
#endif

#endif
+1 −7
Original line number Diff line number Diff line
@@ -480,7 +480,6 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(void)
}
#endif

#ifdef TCP_ENHANCEMENTS
bool EnableTCPAckFilter = false;

void Enable_TCP_ACK_Filter(bool value)
@@ -492,7 +491,6 @@ bool is_TCP_ACK_Filter_Enabled(void)
{
	return EnableTCPAckFilter;
}
#endif

static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)
{
@@ -552,9 +550,7 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wi
	PRINT_D(TX_DBG, "Adding mgmt packet at the Queue tail\n");
#ifdef TCP_ACK_FILTER
	tqe->tcp_PendingAck_index = NOT_TCP_ACK;
#ifdef TCP_ENHANCEMENTS
	if (is_TCP_ACK_Filter_Enabled())
#endif
		tcp_process(tqe);
#endif
	wilc_wlan_txq_add_to_tail(tqe);
@@ -1410,9 +1406,7 @@ _end_:
#endif
		}
	}
#ifdef TCP_ENHANCEMENTS
	wilc_wlan_handle_rxq();
#endif
}

void wilc_handle_isr(void)
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
#define WILC_WLAN_IF_H

/*bug 3887: [AP] Allow Management frames to be passed to the host*/
#define TCP_ENHANCEMENTS
/* #define MEMORY_STATIC */
/* #define USE_OLD_SPI_SW */