]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - drivers/net/wireless/marvell/libertas/mesh.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-kernels.git] / drivers / net / wireless / marvell / libertas / mesh.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
8973a6e7
RD
2/*
3 * Contains all definitions needed for the Libertas' MESH implementation.
4 */
5e8e8b57
HS
5#ifndef _LBS_MESH_H_
6#define _LBS_MESH_H_
7
8
9#include <net/iw_handler.h>
ece1e3c6 10#include <net/lib80211.h>
5e8e8b57 11
a6bb1bce 12#include "host.h"
49fee692 13#include "dev.h"
5e8e8b57 14
4143a23d
HS
15#ifdef CONFIG_LIBERTAS_MESH
16
5e8e8b57 17struct net_device;
e0e42da3
HS
18
19int lbs_init_mesh(struct lbs_private *priv);
49fee692 20void lbs_start_mesh(struct lbs_private *priv);
e0e42da3
HS
21int lbs_deinit_mesh(struct lbs_private *priv);
22
e0e42da3
HS
23void lbs_remove_mesh(struct lbs_private *priv);
24
49fee692
DD
25static inline bool lbs_mesh_activated(struct lbs_private *priv)
26{
27 /* Mesh SSID is only programmed after successful init */
28 return priv->mesh_ssid_len != 0;
29}
30
31int lbs_mesh_set_channel(struct lbs_private *priv, u8 channel);
e0e42da3
HS
32
33/* Sending / Receiving */
34
35struct rxpd;
36struct txpd;
37
38struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
39 struct net_device *dev, struct rxpd *rxpd);
40void lbs_mesh_set_txpd(struct lbs_private *priv,
41 struct net_device *dev, struct txpd *txpd);
42
43
ece1e3c6
HS
44/* Command handling */
45
46struct cmd_ds_command;
55e1ff92
HS
47struct cmd_ds_mesh_access;
48struct cmd_ds_mesh_config;
ece1e3c6 49
e0e42da3 50
c7fe64cf
HS
51/* Ethtool statistics */
52
53struct ethtool_stats;
54
55void lbs_mesh_ethtool_get_stats(struct net_device *dev,
56 struct ethtool_stats *stats, uint64_t *data);
57int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
58void lbs_mesh_ethtool_get_strings(struct net_device *dev,
59 uint32_t stringset, uint8_t *s);
60
61
4143a23d
HS
62#else
63
64#define lbs_init_mesh(priv)
65#define lbs_deinit_mesh(priv)
49fee692 66#define lbs_start_mesh(priv)
4143a23d
HS
67#define lbs_add_mesh(priv)
68#define lbs_remove_mesh(priv)
69#define lbs_mesh_set_dev(priv, dev, rxpd) (dev)
70#define lbs_mesh_set_txpd(priv, dev, txpd)
49fee692
DD
71#define lbs_mesh_set_channel(priv, channel) (0)
72#define lbs_mesh_activated(priv) (false)
4143a23d
HS
73
74#endif
75
76
602114ae 77
5e8e8b57 78#endif