Commit f31e5584 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: use short names to fix over 80 issue in tcp_process()

Use short variable names to avoid line over 80 chars checkpatch warning
in tcp_process().

struct pending_acks_info     --> struct pending_ack
int tcp_pending_ack_idx      --> int ack_idx
u32 pending_ack              --> u32 pending_ack_idx
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3178da4
...@@ -115,7 +115,7 @@ struct ack_session_info { ...@@ -115,7 +115,7 @@ struct ack_session_info {
u16 status; u16 status;
}; };
struct pending_acks_info { struct pending_acks {
u32 ack_num; u32 ack_num;
u32 session_index; u32 session_index;
struct txq_entry_t *txqe; struct txq_entry_t *txqe;
...@@ -123,10 +123,10 @@ struct pending_acks_info { ...@@ -123,10 +123,10 @@ struct pending_acks_info {
struct tcp_ack_filter { struct tcp_ack_filter {
struct ack_session_info ack_session_info[2 * MAX_TCP_SESSION]; struct ack_session_info ack_session_info[2 * MAX_TCP_SESSION];
struct pending_acks_info pending_acks_info[MAX_PENDING_ACKS]; struct pending_acks pending_acks[MAX_PENDING_ACKS];
u32 pending_base; u32 pending_base;
u32 tcp_session; u32 tcp_session;
u32 pending_acks; u32 pending_acks_idx;
bool enabled; bool enabled;
}; };
......
...@@ -125,14 +125,14 @@ static inline int add_tcp_pending_ack(struct wilc_vif *vif, u32 ack, ...@@ -125,14 +125,14 @@ static inline int add_tcp_pending_ack(struct wilc_vif *vif, u32 ack,
struct txq_entry_t *txqe) struct txq_entry_t *txqe)
{ {
struct tcp_ack_filter *f = &vif->ack_filter; struct tcp_ack_filter *f = &vif->ack_filter;
u32 i = f->pending_base + f->pending_acks; u32 i = f->pending_base + f->pending_acks_idx;
if (i < MAX_PENDING_ACKS) { if (i < MAX_PENDING_ACKS) {
f->pending_acks_info[i].ack_num = ack; f->pending_acks[i].ack_num = ack;
f->pending_acks_info[i].txqe = txqe; f->pending_acks[i].txqe = txqe;
f->pending_acks_info[i].session_index = session_index; f->pending_acks[i].session_index = session_index;
txqe->tcp_pending_ack_idx = i; txqe->ack_idx = i;
f->pending_acks++; f->pending_acks_idx++;
} }
return 0; return 0;
} }
...@@ -200,24 +200,24 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) ...@@ -200,24 +200,24 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
spin_lock_irqsave(&wilc->txq_spinlock, flags); spin_lock_irqsave(&wilc->txq_spinlock, flags);
for (i = f->pending_base; for (i = f->pending_base;
i < (f->pending_base + f->pending_acks); i++) { i < (f->pending_base + f->pending_acks_idx); i++) {
u32 index; u32 index;
u32 bigger_ack_num; u32 bigger_ack_num;
if (i >= MAX_PENDING_ACKS) if (i >= MAX_PENDING_ACKS)
break; break;
index = f->pending_acks_info[i].session_index; index = f->pending_acks[i].session_index;
if (index >= 2 * MAX_TCP_SESSION) if (index >= 2 * MAX_TCP_SESSION)
break; break;
bigger_ack_num = f->ack_session_info[index].bigger_ack_num; bigger_ack_num = f->ack_session_info[index].bigger_ack_num;
if (f->pending_acks_info[i].ack_num < bigger_ack_num) { if (f->pending_acks[i].ack_num < bigger_ack_num) {
struct txq_entry_t *tqe; struct txq_entry_t *tqe;
tqe = f->pending_acks_info[i].txqe; tqe = f->pending_acks[i].txqe;
if (tqe) { if (tqe) {
wilc_wlan_txq_remove(wilc, tqe); wilc_wlan_txq_remove(wilc, tqe);
tqe->status = 1; tqe->status = 1;
...@@ -229,7 +229,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) ...@@ -229,7 +229,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
} }
} }
} }
f->pending_acks = 0; f->pending_acks_idx = 0;
f->tcp_session = 0; f->tcp_session = 0;
if (f->pending_base == 0) if (f->pending_base == 0)
...@@ -275,7 +275,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer, ...@@ -275,7 +275,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
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;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->ack_idx = NOT_TCP_ACK;
if (wilc_wlan_txq_add_to_head(vif, tqe)) { if (wilc_wlan_txq_add_to_head(vif, tqe)) {
kfree(tqe); kfree(tqe);
...@@ -307,7 +307,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -307,7 +307,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
tqe->tx_complete_func = func; tqe->tx_complete_func = func;
tqe->priv = priv; tqe->priv = priv;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->ack_idx = NOT_TCP_ACK;
if (vif->ack_filter.enabled) if (vif->ack_filter.enabled)
tcp_process(dev, tqe); tcp_process(dev, tqe);
wilc_wlan_txq_add_to_tail(dev, tqe); wilc_wlan_txq_add_to_tail(dev, tqe);
...@@ -335,7 +335,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, ...@@ -335,7 +335,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;
tqe->tcp_pending_ack_idx = NOT_TCP_ACK; tqe->ack_idx = NOT_TCP_ACK;
wilc_wlan_txq_add_to_tail(dev, tqe); wilc_wlan_txq_add_to_tail(dev, tqe);
return 1; return 1;
} }
...@@ -668,9 +668,9 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) ...@@ -668,9 +668,9 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
tqe->status = 1; tqe->status = 1;
if (tqe->tx_complete_func) if (tqe->tx_complete_func)
tqe->tx_complete_func(tqe->priv, tqe->status); tqe->tx_complete_func(tqe->priv, tqe->status);
if (tqe->tcp_pending_ack_idx != NOT_TCP_ACK && if (tqe->ack_idx != NOT_TCP_ACK &&
tqe->tcp_pending_ack_idx < MAX_PENDING_ACKS) tqe->ack_idx < MAX_PENDING_ACKS)
vif->ack_filter.pending_acks_info[tqe->tcp_pending_ack_idx].txqe = NULL; vif->ack_filter.pending_acks[tqe->ack_idx].txqe = NULL;
kfree(tqe); kfree(tqe);
} while (--entries); } while (--entries);
......
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
struct txq_entry_t { struct txq_entry_t {
struct list_head list; struct list_head list;
int type; int type;
int tcp_pending_ack_idx; int ack_idx;
u8 *buffer; u8 *buffer;
int buffer_size; int buffer_size;
void *priv; void *priv;
......
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