mesh.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #include <net/lib80211.h>
  8. #include "host.h"
  9. #ifdef CONFIG_LIBERTAS_MESH
  10. /* Mesh statistics */
  11. struct lbs_mesh_stats {
  12. u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
  13. u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
  14. u32 fwd_drop_ttl; /* Fwd: TTL zero */
  15. u32 fwd_drop_rbt; /* Fwd: Recently Broadcasted */
  16. u32 fwd_drop_noroute; /* Fwd: No route to Destination */
  17. u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
  18. u32 drop_blind; /* Rx: Dropped by blinding table */
  19. u32 tx_failed_cnt; /* Tx: Failed transmissions */
  20. };
  21. struct net_device;
  22. struct lbs_private;
  23. int lbs_init_mesh(struct lbs_private *priv);
  24. int lbs_deinit_mesh(struct lbs_private *priv);
  25. void lbs_remove_mesh(struct lbs_private *priv);
  26. /* Sending / Receiving */
  27. struct rxpd;
  28. struct txpd;
  29. struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
  30. struct net_device *dev, struct rxpd *rxpd);
  31. void lbs_mesh_set_txpd(struct lbs_private *priv,
  32. struct net_device *dev, struct txpd *txpd);
  33. /* Command handling */
  34. struct cmd_ds_command;
  35. struct cmd_ds_mesh_access;
  36. struct cmd_ds_mesh_config;
  37. /* Ethtool statistics */
  38. struct ethtool_stats;
  39. void lbs_mesh_ethtool_get_stats(struct net_device *dev,
  40. struct ethtool_stats *stats, uint64_t *data);
  41. int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
  42. void lbs_mesh_ethtool_get_strings(struct net_device *dev,
  43. uint32_t stringset, uint8_t *s);
  44. #else
  45. #define lbs_init_mesh(priv)
  46. #define lbs_deinit_mesh(priv)
  47. #define lbs_add_mesh(priv)
  48. #define lbs_remove_mesh(priv)
  49. #define lbs_mesh_set_dev(priv, dev, rxpd) (dev)
  50. #define lbs_mesh_set_txpd(priv, dev, txpd)
  51. #define lbs_mesh_config(priv, enable, chan)
  52. #endif
  53. #endif