summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2012-04-12 08:27:25 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-13 11:37:36 -0400
commitece367d53a5bf46cc357163c7074a6546a0ec01c (patch)
tree741193e49df32040d03c9258c342a75eecfae9f1 /include
parent447648128ec22e294604674ffe1064aa3ec3b767 (diff)
downloadlinux-ece367d53a5bf46cc357163c7074a6546a0ec01c.tar.gz
linux-ece367d53a5bf46cc357163c7074a6546a0ec01c.tar.bz2
linux-ece367d53a5bf46cc357163c7074a6546a0ec01c.zip
caif-hsi: robust frame aggregation for HSI
Implement aggregation algorithm, combining more data into a single HSI transfer. 4 different traffic categories are supported: 1. TC_PRIO_CONTROL .. TC_PRIO_MAX (CTL) 2. TC_PRIO_INTERACTIVE (VO) 3. TC_PRIO_INTERACTIVE_BULK (VI) 4. TC_PRIO_BESTEFFORT, TC_PRIO_BULK, TC_PRIO_FILLER (BEBK) Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/caif/caif_hsi.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/net/caif/caif_hsi.h b/include/net/caif/caif_hsi.h
index 6db8ecf52aa2..439dadc8102f 100644
--- a/include/net/caif/caif_hsi.h
+++ b/include/net/caif/caif_hsi.h
@@ -123,12 +123,21 @@ struct cfhsi_rx_state {
bool piggy_desc;
};
+/* Priority mapping */
+enum {
+ CFHSI_PRIO_CTL = 0,
+ CFHSI_PRIO_VI,
+ CFHSI_PRIO_VO,
+ CFHSI_PRIO_BEBK,
+ CFHSI_PRIO_LAST,
+};
+
/* Structure implemented by CAIF HSI drivers. */
struct cfhsi {
struct caif_dev_common cfdev;
struct net_device *ndev;
struct platform_device *pdev;
- struct sk_buff_head qhead;
+ struct sk_buff_head qhead[CFHSI_PRIO_LAST];
struct cfhsi_drv drv;
struct cfhsi_dev *dev;
int tx_state;
@@ -151,8 +160,14 @@ struct cfhsi {
wait_queue_head_t wake_up_wait;
wait_queue_head_t wake_down_wait;
wait_queue_head_t flush_fifo_wait;
- struct timer_list timer;
+ struct timer_list inactivity_timer;
struct timer_list rx_slowpath_timer;
+
+ /* TX aggregation */
+ unsigned long aggregation_timeout;
+ int aggregation_len;
+ struct timer_list aggregation_timer;
+
unsigned long bits;
};