[golan] Add Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support
[ipxe.git] / src / drivers / infiniband / mlx_utils / mlx_lib / mlx_wol_rol / mlx_wol_rol.h
1 #ifndef MLX_WOL_ROL_H_
2 #define MLX_WOL_ROL_H_
3
4 /*
5 * Copyright (C) 2015 Mellanox Technologies Ltd.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the
10 * License, or any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 * 02110-1301, USA.
21 */
22
23 FILE_LICENCE ( GPL2_OR_LATER );
24
25
26 #include "mlx_utils.h"
27
28 typedef enum {
29 WOL_MODE_DISABLE = 0x0,
30 WOL_MODE_SECURE = 0x2,
31 WOL_MODE_MAGIC = 0x4,
32 WOL_MODE_ARP = 0x8,
33 WOL_MODE_BC = 0x10,
34 WOL_MODE_MC = 0x20,
35 WOL_MODE_UC = 0x40,
36 WOL_MODE_PHY = 0x80,
37 } WOL_MODE;
38
39 struct mlx_wol_rol {
40 mlx_uint32 reserved0 :32;
41 mlx_uint32 reserved1 :32;
42 mlx_uint32 wol_mode :8;
43 mlx_uint32 rol_mode :8;
44 mlx_uint32 reserved3 :14;
45 mlx_uint32 wol_mode_valid :1;
46 mlx_uint32 rol_mode_valid :1;
47 };
48
49 mlx_status
50 mlx_set_wol (
51 IN mlx_utils *utils,
52 IN mlx_uint8 wol_mask
53 );
54
55 mlx_status
56 mlx_query_wol (
57 IN mlx_utils *utils,
58 OUT mlx_uint8 *wol_mask
59 );
60
61 #endif /* MLX_WOL_ROL_H_ */