diff options
author | Xinming Hu <huxm@marvell.com> | 2017-05-23 10:12:33 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-05-31 16:54:09 +0300 |
commit | a2ca85ad721de50b90d50f3a11b67c4776a1236d (patch) | |
tree | e089ac38ac120b0c1909a5f0effd4e80f51ee4b5 /drivers/net/wireless/marvell/mwifiex/usb.h | |
parent | c59942938c6ab37f69658cafec6869eeb77e2e79 (diff) | |
download | linux-a2ca85ad721de50b90d50f3a11b67c4776a1236d.tar.xz |
mwifiex: usb: add timer to flush aggregation packets
Aggregation will wait for next packet until limit aggr size/number reach.
Packet might be drop and also packet dequeue will be stop in some cases.
This patch add timer to flush packets in aggregation list to avoid long
time waiting.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/usb.h')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/usb.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.h b/drivers/net/wireless/marvell/mwifiex/usb.h index b89b840e0142..37abd228a84f 100644 --- a/drivers/net/wireless/marvell/mwifiex/usb.h +++ b/drivers/net/wireless/marvell/mwifiex/usb.h @@ -64,10 +64,22 @@ struct urb_context { u8 ep; }; +#define MWIFIEX_USB_TX_AGGR_TMO_MIN 1 +#define MWIFIEX_USB_TX_AGGR_TMO_MAX 4 + +struct tx_aggr_tmr_cnxt { + struct mwifiex_adapter *adapter; + struct usb_tx_data_port *port; + struct timer_list hold_timer; + bool is_hold_timer_set; + u32 hold_tmo_msecs; +}; + struct usb_tx_aggr { struct sk_buff_head aggr_list; int aggr_len; int aggr_num; + struct tx_aggr_tmr_cnxt timer_cnxt; }; struct usb_tx_data_port { @@ -79,6 +91,8 @@ struct usb_tx_data_port { /* usb tx aggregation*/ struct usb_tx_aggr tx_aggr; struct sk_buff *skb_aggr[MWIFIEX_TX_DATA_URB]; + /* lock for protect tx aggregation data path*/ + spinlock_t tx_aggr_lock; }; struct usb_card_rec { |