mesh.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. /* Mesh statistics */
  9. struct lbs_mesh_stats {
  10. u32 fwd_bcast_cnt; /* Fwd: Broadcast counter */
  11. u32 fwd_unicast_cnt; /* Fwd: Unicast counter */
  12. u32 fwd_drop_ttl; /* Fwd: TTL zero */
  13. u32 fwd_drop_rbt; /* Fwd: Recently Broadcasted */
  14. u32 fwd_drop_noroute; /* Fwd: No route to Destination */
  15. u32 fwd_drop_nobuf; /* Fwd: Run out of internal buffers */
  16. u32 drop_blind; /* Rx: Dropped by blinding table */
  17. u32 tx_failed_cnt; /* Tx: Failed transmissions */
  18. };
  19. struct net_device;
  20. struct lbs_private;
  21. int lbs_init_mesh(struct lbs_private *priv);
  22. int lbs_deinit_mesh(struct lbs_private *priv);
  23. int lbs_add_mesh(struct lbs_private *priv);
  24. void lbs_remove_mesh(struct lbs_private *priv);
  25. /* Sending / Receiving */
  26. struct rxpd;
  27. struct txpd;
  28. struct net_device *lbs_mesh_set_dev(struct lbs_private *priv,
  29. struct net_device *dev, struct rxpd *rxpd);
  30. void lbs_mesh_set_txpd(struct lbs_private *priv,
  31. struct net_device *dev, struct txpd *txpd);
  32. /* Command handling */
  33. struct cmd_ds_command;
  34. int lbs_cmd_bt_access(struct cmd_ds_command *cmd,
  35. u16 cmd_action, void *pdata_buf);
  36. int lbs_cmd_fwt_access(struct cmd_ds_command *cmd,
  37. u16 cmd_action, void *pdata_buf);
  38. /* Persistent configuration */
  39. void lbs_persist_config_init(struct net_device *net);
  40. void lbs_persist_config_remove(struct net_device *net);
  41. /* WEXT handler */
  42. extern struct iw_handler_def mesh_handler_def;
  43. /* Ethtool statistics */
  44. struct ethtool_stats;
  45. void lbs_mesh_ethtool_get_stats(struct net_device *dev,
  46. struct ethtool_stats *stats, uint64_t *data);
  47. int lbs_mesh_ethtool_get_sset_count(struct net_device *dev, int sset);
  48. void lbs_mesh_ethtool_get_strings(struct net_device *dev,
  49. uint32_t stringset, uint8_t *s);
  50. #endif