Commit e9576e96 authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman

staging: wilc1000: remove define TCP_ACK_FILTER

This patch removes define TCP_ACK_FILTER and use it's feature codes.
Add argument wilc to wilc_wlan_txq_remove because compile error happens.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c6866cc4
...@@ -4,7 +4,6 @@ ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ ...@@ -4,7 +4,6 @@ ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \
-DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\" -DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\"
ccflags-y += -I$(src)/ -DWILC_ASIC_A0 -DWILC_DEBUGFS ccflags-y += -I$(src)/ -DWILC_ASIC_A0 -DWILC_DEBUGFS
#ccflags-y += -DTCP_ACK_FILTER
wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \ wilc1000-objs := wilc_wfi_cfgoperations.o linux_wlan.o linux_mon.o \
wilc_msgqueue.o \ wilc_msgqueue.o \
......
...@@ -36,8 +36,7 @@ static inline void release_bus(struct wilc *wilc, BUS_RELEASE_T release) ...@@ -36,8 +36,7 @@ static inline void release_bus(struct wilc *wilc, BUS_RELEASE_T release)
mutex_unlock(&wilc->hif_cs); mutex_unlock(&wilc->hif_cs);
} }
#ifdef TCP_ACK_FILTER static void wilc_wlan_txq_remove(struct wilc *wilc, struct txq_entry_t *tqe)
static void wilc_wlan_txq_remove(struct txq_entry_t *tqe)
{ {
if (tqe == wilc->txq_head) { if (tqe == wilc->txq_head) {
...@@ -54,7 +53,6 @@ static void wilc_wlan_txq_remove(struct txq_entry_t *tqe) ...@@ -54,7 +53,6 @@ static void wilc_wlan_txq_remove(struct txq_entry_t *tqe)
} }
wilc->txq_entries -= 1; wilc->txq_entries -= 1;
} }
#endif
static struct txq_entry_t * static struct txq_entry_t *
wilc_wlan_txq_remove_from_head(struct net_device *dev) wilc_wlan_txq_remove_from_head(struct net_device *dev)
...@@ -146,7 +144,6 @@ static int wilc_wlan_txq_add_to_head(struct wilc *wilc, struct txq_entry_t *tqe) ...@@ -146,7 +144,6 @@ static int wilc_wlan_txq_add_to_head(struct wilc *wilc, struct txq_entry_t *tqe)
return 0; return 0;
} }
#ifdef TCP_ACK_FILTER
struct ack_session_info; struct ack_session_info;
struct ack_session_info { struct ack_session_info {
u32 seq_num; u32 seq_num;
...@@ -308,7 +305,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) ...@@ -308,7 +305,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
pending_acks_info[i].ack_num); pending_acks_info[i].ack_num);
tqe = pending_acks_info[i].txqe; tqe = pending_acks_info[i].txqe;
if (tqe) { if (tqe) {
wilc_wlan_txq_remove(tqe); wilc_wlan_txq_remove(wilc, tqe);
tqe->status = 1; tqe->status = 1;
if (tqe->tx_complete_func) if (tqe->tx_complete_func)
tqe->tx_complete_func(tqe->priv, tqe->tx_complete_func(tqe->priv,
...@@ -335,7 +332,6 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) ...@@ -335,7 +332,6 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
return 1; return 1;
} }
#endif
static bool enabled = false; static bool enabled = false;
...@@ -344,12 +340,10 @@ void wilc_enable_tcp_ack_filter(bool value) ...@@ -344,12 +340,10 @@ void wilc_enable_tcp_ack_filter(bool value)
enabled = value; enabled = value;
} }
#ifdef TCP_ACK_FILTER
static bool is_tcp_ack_filter_enabled(void) static bool is_tcp_ack_filter_enabled(void)
{ {
return enabled; return enabled;
} }
#endif
static int wilc_wlan_txq_add_cfg_pkt(struct wilc *wilc, u8 *buffer, u32 buffer_size) static int wilc_wlan_txq_add_cfg_pkt(struct wilc *wilc, u8 *buffer, u32 buffer_size)
{ {
...@@ -373,9 +367,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc *wilc, u8 *buffer, u32 buffer_s ...@@ -373,9 +367,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc *wilc, u8 *buffer, u32 buffer_s
tqe->buffer_size = buffer_size; tqe->buffer_size = buffer_size;
tqe->tx_complete_func = NULL; tqe->tx_complete_func = NULL;
tqe->priv = NULL; tqe->priv = NULL;
#ifdef TCP_ACK_FILTER
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
#endif
PRINT_D(TX_DBG, "Adding the config packet at the Queue tail\n"); PRINT_D(TX_DBG, "Adding the config packet at the Queue tail\n");
if (wilc_wlan_txq_add_to_head(wilc, tqe)) if (wilc_wlan_txq_add_to_head(wilc, tqe))
...@@ -406,11 +398,9 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -406,11 +398,9 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
tqe->priv = priv; tqe->priv = priv;
PRINT_D(TX_DBG, "Adding mgmt packet at the Queue tail\n"); PRINT_D(TX_DBG, "Adding mgmt packet at the Queue tail\n");
#ifdef TCP_ACK_FILTER
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
if (is_tcp_ack_filter_enabled()) if (is_tcp_ack_filter_enabled())
tcp_process(dev, tqe); tcp_process(dev, tqe);
#endif
wilc_wlan_txq_add_to_tail(dev, tqe); wilc_wlan_txq_add_to_tail(dev, tqe);
return wilc->txq_entries; return wilc->txq_entries;
} }
...@@ -436,9 +426,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -436,9 +426,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
tqe->buffer_size = buffer_size; tqe->buffer_size = buffer_size;
tqe->tx_complete_func = func; tqe->tx_complete_func = func;
tqe->priv = priv; tqe->priv = priv;
#ifdef TCP_ACK_FILTER
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->tcp_pending_ack_idx = NOT_TCP_ACK;
#endif
PRINT_D(TX_DBG, "Adding Network packet at the Queue tail\n"); PRINT_D(TX_DBG, "Adding Network packet at the Queue tail\n");
wilc_wlan_txq_add_to_tail(dev, tqe); wilc_wlan_txq_add_to_tail(dev, tqe);
return 1; return 1;
...@@ -643,9 +631,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) ...@@ -643,9 +631,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
wilc_lock_timeout(wilc, &wilc->txq_add_to_head_cs, wilc_lock_timeout(wilc, &wilc->txq_add_to_head_cs,
CFG_PKTS_TIMEOUT); CFG_PKTS_TIMEOUT);
#ifdef TCP_ACK_FILTER
wilc_wlan_txq_filter_dup_tcp_ack(dev); wilc_wlan_txq_filter_dup_tcp_ack(dev);
#endif
PRINT_D(TX_DBG, "Getting the head of the TxQ\n"); PRINT_D(TX_DBG, "Getting the head of the TxQ\n");
tqe = wilc_wlan_txq_get_first(wilc); tqe = wilc_wlan_txq_get_first(wilc);
i = 0; i = 0;
...@@ -829,10 +815,8 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) ...@@ -829,10 +815,8 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
if (tqe->tx_complete_func) if (tqe->tx_complete_func)
tqe->tx_complete_func(tqe->priv, tqe->tx_complete_func(tqe->priv,
tqe->status); tqe->status);
#ifdef TCP_ACK_FILTER
if (tqe->tcp_pending_ack_idx != NOT_TCP_ACK) if (tqe->tcp_pending_ack_idx != NOT_TCP_ACK)
pending_acks_info[tqe->tcp_pending_ack_idx].txqe = NULL; pending_acks_info[tqe->tcp_pending_ack_idx].txqe = NULL;
#endif
kfree(tqe); kfree(tqe);
} else { } else {
break; break;
...@@ -1564,9 +1548,7 @@ int wilc_wlan_init(struct net_device *dev) ...@@ -1564,9 +1548,7 @@ int wilc_wlan_init(struct net_device *dev)
ret = -EIO; ret = -EIO;
goto _fail_; goto _fail_;
} }
#ifdef TCP_ACK_FILTER
init_tcp_tracking(); init_tcp_tracking();
#endif
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment