Linux 4.16.11
[linux/fpc-iii.git] / drivers / net / wireless / marvell / libertas / mesh.h
blobdfe22c91aade03122db5bcc4d09dd8ce56089e94
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Contains all definitions needed for the Libertas' MESH implementation.
4 */
5 #ifndef _LBS_MESH_H_
6 #define _LBS_MESH_H_
9 #include <net/iw_handler.h>
10 #include <net/lib80211.h>
12 #include "host.h"
13 #include "dev.h"
15 #ifdef CONFIG_LIBERTAS_MESH
17 struct net_device;
19 int lbs_init_mesh(struct lbs_private *priv);
20 void lbs_start_mesh(struct lbs_private *priv);
21 int lbs_deinit_mesh(struct lbs_private *priv);
23 void lbs_remove_mesh(struct lbs_private *priv);
25 static inline bool lbs_mesh_activated(struct lbs_private *priv)
27 /* Mesh SSID is only programmed after successful init */
28 return priv->mesh_ssid_len != 0;
31 int lbs_mesh_set_channel(struct lbs_private *priv, u8 channel);
33 /* Sending / Receiving */
35 struct rxpd;
36 struct txpd;
38 struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
39 struct net_device *dev, struct rxpd *rxpd);
40 void lbs_mesh_set_txpd(struct lbs_private *priv,
41 struct net_device *dev, struct txpd *txpd);
44 /* Command handling */
46 struct cmd_ds_command;
47 struct cmd_ds_mesh_access;
48 struct cmd_ds_mesh_config;
51 /* Ethtool statistics */
53 struct ethtool_stats;
55 void lbs_mesh_ethtool_get_stats(struct net_device *dev,
56 struct ethtool_stats *stats, uint64_t *data);
57 int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
58 void lbs_mesh_ethtool_get_strings(struct net_device *dev,
59 uint32_t stringset, uint8_t *s);
62 #else
64 #define lbs_init_mesh(priv)
65 #define lbs_deinit_mesh(priv)
66 #define lbs_start_mesh(priv)
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)
71 #define lbs_mesh_set_channel(priv, channel) (0)
72 #define lbs_mesh_activated(priv) (false)
74 #endif
78 #endif