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