aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mediatek/eemcs/eemcs_statistics.h
blob: 777b5c1108600d8acb3630bb4533e45377ba17ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "eemcs_ccci.h"
#include <mach/mtk_eemcs_helper.h>

typedef struct{
    unsigned int drop[2];
    unsigned int cnt[2];
    unsigned int queue[2];
}CCCI_PORT_STATISTICS;


enum STATISTIC_TYPE{
    NORMAL = 0,
    DROP,
    QUEUE,
};

typedef struct{
    int md_id;
    int start;
    unsigned int inteval;
    struct timeval time;
    CCCI_PORT_STATISTICS port[CCCI_PORT_NUM_MAX];
    CCCI_PORT_STATISTICS port_total[CCCI_PORT_NUM_MAX];
}EEMCS_STATISTICS;

extern EEMCS_STATISTICS *eemcs_statistics[MAX_EXT_MD_NUM];
void eemcs_update_statistics_number(int md_id, int port, int tx_rx, int type, int number);
void eemcs_update_statistics(int md_id, int port, int tx_rx, int drop);
void eemcs_statistics_reset(void);
int eemcs_statistics_init(void);
void eemcs_statistics_exit(void);