diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-09-04 12:09:35 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-10 18:06:51 +0200 |
commit | f31e5584dc555fd9a9135af8343983edf23e95f1 (patch) | |
tree | 8cade8ffb1bd186ffc05b7c46880a846a343e1ac /drivers/staging/wilc1000/wilc_wlan.c | |
parent | a3178da4520bbfac6a366a3a25df67f907a1213a (diff) |
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: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wlan.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 46db79012a3e..4c5a69e5c7d5 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -125,14 +125,14 @@ static inline int add_tcp_pending_ack(struct wilc_vif *vif, u32 ack, struct txq_entry_t *txqe) { 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) { - f->pending_acks_info[i].ack_num = ack; - f->pending_acks_info[i].txqe = txqe; - f->pending_acks_info[i].session_index = session_index; - txqe->tcp_pending_ack_idx = i; - f->pending_acks++; + f->pending_acks[i].ack_num = ack; + f->pending_acks[i].txqe = txqe; + f->pending_acks[i].session_index = session_index; + txqe->ack_idx = i; + f->pending_acks_idx++; } return 0; } @@ -200,24 +200,24 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) spin_lock_irqsave(&wilc->txq_spinlock, flags); 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 bigger_ack_num; if (i >= MAX_PENDING_ACKS) break; - index = f->pending_acks_info[i].session_index; + index = f->pending_acks[i].session_index; if (index >= 2 * MAX_TCP_SESSION) break; 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; - tqe = f->pending_acks_info[i].txqe; + tqe = f->pending_acks[i].txqe; if (tqe) { wilc_wlan_txq_remove(wilc, tqe); tqe->status = 1; @@ -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; if (f->pending_base == 0) @@ -275,7 +275,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer, tqe->buffer_size = buffer_size; tqe->tx_complete_func = 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)) { kfree(tqe); @@ -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->priv = priv; - tqe->tcp_pending_ack_idx = NOT_TCP_ACK; + tqe->ack_idx = NOT_TCP_ACK; if (vif->ack_filter.enabled) tcp_process(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, tqe->buffer_size = buffer_size; tqe->tx_complete_func = func; 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); return 1; } @@ -668,9 +668,9 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) tqe->status = 1; if (tqe->tx_complete_func) tqe->tx_complete_func(tqe->priv, tqe->status); - if (tqe->tcp_pending_ack_idx != NOT_TCP_ACK && - tqe->tcp_pending_ack_idx < MAX_PENDING_ACKS) - vif->ack_filter.pending_acks_info[tqe->tcp_pending_ack_idx].txqe = NULL; + if (tqe->ack_idx != NOT_TCP_ACK && + tqe->ack_idx < MAX_PENDING_ACKS) + vif->ack_filter.pending_acks[tqe->ack_idx].txqe = NULL; kfree(tqe); } while (--entries); |