Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[cascardo/linux.git] / drivers / net / wireless / libertas / mesh.h
1 /*
2  * Contains all definitions needed for the Libertas' MESH implementation.
3  */
4 #ifndef _LBS_MESH_H_
5 #define _LBS_MESH_H_
6
7
8 #include <net/iw_handler.h>
9 #include <net/lib80211.h>
10
11 #include "host.h"
12
13 #ifdef CONFIG_LIBERTAS_MESH
14
15 /* Mesh statistics */
16 struct lbs_mesh_stats {
17         u32     fwd_bcast_cnt;          /* Fwd: Broadcast counter */
18         u32     fwd_unicast_cnt;        /* Fwd: Unicast counter */
19         u32     fwd_drop_ttl;           /* Fwd: TTL zero */
20         u32     fwd_drop_rbt;           /* Fwd: Recently Broadcasted */
21         u32     fwd_drop_noroute;       /* Fwd: No route to Destination */
22         u32     fwd_drop_nobuf;         /* Fwd: Run out of internal buffers */
23         u32     drop_blind;             /* Rx:  Dropped by blinding table */
24         u32     tx_failed_cnt;          /* Tx:  Failed transmissions */
25 };
26
27
28 struct net_device;
29 struct lbs_private;
30
31 int lbs_init_mesh(struct lbs_private *priv);
32 int lbs_deinit_mesh(struct lbs_private *priv);
33
34 void lbs_remove_mesh(struct lbs_private *priv);
35
36
37 /* Sending / Receiving */
38
39 struct rxpd;
40 struct txpd;
41
42 struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
43         struct net_device *dev, struct rxpd *rxpd);
44 void lbs_mesh_set_txpd(struct lbs_private *priv,
45         struct net_device *dev, struct txpd *txpd);
46
47
48 /* Command handling */
49
50 struct cmd_ds_command;
51 struct cmd_ds_mesh_access;
52 struct cmd_ds_mesh_config;
53
54
55 /* Ethtool statistics */
56
57 struct ethtool_stats;
58
59 void lbs_mesh_ethtool_get_stats(struct net_device *dev,
60         struct ethtool_stats *stats, uint64_t *data);
61 int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
62 void lbs_mesh_ethtool_get_strings(struct net_device *dev,
63         uint32_t stringset, uint8_t *s);
64
65
66 #else
67
68 #define lbs_init_mesh(priv)
69 #define lbs_deinit_mesh(priv)
70 #define lbs_add_mesh(priv)
71 #define lbs_remove_mesh(priv)
72 #define lbs_mesh_set_dev(priv, dev, rxpd) (dev)
73 #define lbs_mesh_set_txpd(priv, dev, txpd)
74 #define lbs_mesh_config(priv, enable, chan)
75
76 #endif
77
78
79
80 #endif