• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #ifndef __WAL_LINUX_FLOWCTL_H__
20 #define __WAL_LINUX_FLOWCTL_H__
21 
22 /* ****************************************************************************
23   1 其他头文件包含
24 **************************************************************************** */
25 #include "oal_ext_if.h"
26 
27 #ifdef __cplusplus
28 #if __cplusplus
29 extern "C" {
30 #endif
31 #endif
32 
33 #ifdef _PRE_WLAN_FEATURE_FLOWCTL
34 
35 /* ****************************************************************************
36   2 宏定义
37 **************************************************************************** */
38 #define WAL_NETDEV_USER_MAX_NUM (WLAN_ACTIVE_USER_MAX_NUM + 4)
39 #define WAL_NETDEV_SUBQUEUE_PER_USE 4
40 #define WAL_NETDEV_SUBQUEUE_MAX_NUM ((WAL_NETDEV_USER_MAX_NUM) * (WAL_NETDEV_SUBQUEUE_PER_USE))
41 
42 /* ****************************************************************************
43   3 枚举定义
44 **************************************************************************** */
45 /* ****************************************************************************
46   4 全局变量声明
47 **************************************************************************** */
48 /* ****************************************************************************
49   5 消息头定义
50 **************************************************************************** */
51 /* ****************************************************************************
52   6 消息定义
53 **************************************************************************** */
54 /* ****************************************************************************
55   7 STRUCT定义
56 **************************************************************************** */
57 typedef struct {
58     hi_u8 auc_mac_addr[OAL_MAC_ADDR_LEN];
59 } wal_macaddr_subq_stru;
60 
61 /* ****************************************************************************
62   8 UNION定义
63 **************************************************************************** */
64 /* ****************************************************************************
65   9 OTHERS定义
66 **************************************************************************** */
67 /* ****************************************************************************
68   10 函数声明
69 **************************************************************************** */
70 hi_u16 wal_netdev_select_queue(oal_net_device_stru *netdev, oal_netbuf_stru *netbuf);
71 hi_u32 wal_flowctl_backp_event_handler(frw_event_mem_stru *event_mem);
72 
73 #endif /* endif for _PRE_WLAN_FEATURE_FLOWCTL */
74 
75 #ifdef _PRE_WLAN_FEATURE_OFFLOAD_FLOWCTL
76 hi_u16 wal_netdev_select_queue(oal_net_device_stru *netdev, oal_netbuf_stru *netbuf, hi_void *accel_priv,
77     select_queue_fallback_t fallback);
78 #endif /* end if for _PRE_WLAN_FEATURE_OFFLOAD_FLOWCTL */
79 
80 #ifdef __cplusplus
81 #if __cplusplus
82 }
83 #endif
84 #endif
85 
86 #endif /* end of wal_linux_flowctl.h */
87