Holger Schurig | 5e8e8b5 | 2009-11-25 13:09:32 +0100 | [diff] [blame] | 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 | |
| 10 | |
| 11 | /* Mesh statistics */ |
| 12 | struct lbs_mesh_stats { |
| 13 | u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */ |
| 14 | u32 fwd_unicast_cnt; /* Fwd: Unicast counter */ |
| 15 | u32 fwd_drop_ttl; /* Fwd: TTL zero */ |
| 16 | u32 fwd_drop_rbt; /* Fwd: Recently Broadcasted */ |
| 17 | u32 fwd_drop_noroute; /* Fwd: No route to Destination */ |
| 18 | u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */ |
| 19 | u32 drop_blind; /* Rx: Dropped by blinding table */ |
| 20 | u32 tx_failed_cnt; /* Tx: Failed transmissions */ |
| 21 | }; |
| 22 | |
| 23 | |
| 24 | struct net_device; |
Holger Schurig | e0e42da | 2009-11-25 13:10:15 +0100 | [diff] [blame] | 25 | struct lbs_private; |
| 26 | |
| 27 | int lbs_init_mesh(struct lbs_private *priv); |
| 28 | int lbs_deinit_mesh(struct lbs_private *priv); |
| 29 | |
| 30 | int lbs_add_mesh(struct lbs_private *priv); |
| 31 | void lbs_remove_mesh(struct lbs_private *priv); |
| 32 | |
| 33 | |
| 34 | /* Sending / Receiving */ |
| 35 | |
| 36 | struct rxpd; |
| 37 | struct txpd; |
| 38 | |
| 39 | struct net_device *lbs_mesh_set_dev(struct lbs_private *priv, |
| 40 | struct net_device *dev, struct rxpd *rxpd); |
| 41 | void lbs_mesh_set_txpd(struct lbs_private *priv, |
| 42 | struct net_device *dev, struct txpd *txpd); |
| 43 | |
| 44 | |
| 45 | /* Persistent configuration */ |
Holger Schurig | 5e8e8b5 | 2009-11-25 13:09:32 +0100 | [diff] [blame] | 46 | |
| 47 | void lbs_persist_config_init(struct net_device *net); |
| 48 | void lbs_persist_config_remove(struct net_device *net); |
| 49 | |
Holger Schurig | e0e42da | 2009-11-25 13:10:15 +0100 | [diff] [blame] | 50 | |
| 51 | /* WEXT handler */ |
| 52 | |
Holger Schurig | 5e8e8b5 | 2009-11-25 13:09:32 +0100 | [diff] [blame] | 53 | extern struct iw_handler_def mesh_handler_def; |
| 54 | |
| 55 | |
Holger Schurig | c7fe64c | 2009-11-25 13:10:49 +0100 | [diff] [blame^] | 56 | /* Ethtool statistics */ |
| 57 | |
| 58 | struct ethtool_stats; |
| 59 | |
| 60 | void lbs_mesh_ethtool_get_stats(struct net_device *dev, |
| 61 | struct ethtool_stats *stats, uint64_t *data); |
| 62 | int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset); |
| 63 | void lbs_mesh_ethtool_get_strings(struct net_device *dev, |
| 64 | uint32_t stringset, uint8_t *s); |
| 65 | |
| 66 | |
Holger Schurig | 5e8e8b5 | 2009-11-25 13:09:32 +0100 | [diff] [blame] | 67 | #endif |