mesh.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * Contains all definitions needed for the Libertas' MESH implementation.
  3. */
  4. #ifndef _LBS_MESH_H_
  5. #define _LBS_MESH_H_
  6. #include <net/iw_handler.h>
  7. /* Mesh statistics */
  8. struct lbs_mesh_stats {
  9. u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
  10. u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
  11. u32 fwd_drop_ttl; /* Fwd: TTL zero */
  12. u32 fwd_drop_rbt; /* Fwd: Recently Broadcasted */
  13. u32 fwd_drop_noroute; /* Fwd: No route to Destination */
  14. u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
  15. u32 drop_blind; /* Rx: Dropped by blinding table */
  16. u32 tx_failed_cnt; /* Tx: Failed transmissions */
  17. };
  18. struct net_device;
  19. struct lbs_private;
  20. int lbs_init_mesh(struct lbs_private *priv);
  21. int lbs_deinit_mesh(struct lbs_private *priv);
  22. int lbs_add_mesh(struct lbs_private *priv);
  23. void lbs_remove_mesh(struct lbs_private *priv);
  24. /* Sending / Receiving */
  25. struct rxpd;
  26. struct txpd;
  27. struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
  28. struct net_device *dev, struct rxpd *rxpd);
  29. void lbs_mesh_set_txpd(struct lbs_private *priv,
  30. struct net_device *dev, struct txpd *txpd);
  31. /* Persistent configuration */
  32. void lbs_persist_config_init(struct net_device *net);
  33. void lbs_persist_config_remove(struct net_device *net);
  34. /* WEXT handler */
  35. extern struct iw_handler_def mesh_handler_def;
  36. /* Ethtool statistics */
  37. struct ethtool_stats;
  38. void lbs_mesh_ethtool_get_stats(struct net_device *dev,
  39. struct ethtool_stats *stats, uint64_t *data);
  40. int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
  41. void lbs_mesh_ethtool_get_strings(struct net_device *dev,
  42. uint32_t stringset, uint8_t *s);
  43. #endif