decl.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * This file contains declaration referring to
  4. * functions defined in other source files
  5. */
  6. #ifndef _LBS_DECL_H_
  7. #define _LBS_DECL_H_
  8. #include <linux/netdevice.h>
  9. #include <linux/firmware.h>
  10. #include <linux/nl80211.h>
  11. /* Should be terminated by a NULL entry */
  12. struct lbs_fw_table {
  13. int model;
  14. const char *helper;
  15. const char *fwname;
  16. };
  17. struct lbs_private;
  18. typedef void (*lbs_fw_cb)(struct lbs_private *priv, int ret,
  19. const struct firmware *helper, const struct firmware *mainfw);
  20. struct lbs_private;
  21. struct sk_buff;
  22. struct net_device;
  23. struct cmd_ds_command;
  24. /* ethtool.c */
  25. extern const struct ethtool_ops lbs_ethtool_ops;
  26. /* tx.c */
  27. void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count);
  28. netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
  29. struct net_device *dev);
  30. /* rx.c */
  31. int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
  32. /* main.c */
  33. struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
  34. void lbs_remove_card(struct lbs_private *priv);
  35. int lbs_start_card(struct lbs_private *priv);
  36. void lbs_stop_card(struct lbs_private *priv);
  37. void lbs_host_to_card_done(struct lbs_private *priv);
  38. int lbs_start_iface(struct lbs_private *priv);
  39. int lbs_stop_iface(struct lbs_private *priv);
  40. int lbs_set_iface_type(struct lbs_private *priv, enum nl80211_iftype type);
  41. int lbs_rtap_supported(struct lbs_private *priv);
  42. int lbs_set_mac_address(struct net_device *dev, void *addr);
  43. void lbs_set_multicast_list(struct net_device *dev);
  44. void lbs_update_mcast(struct lbs_private *priv);
  45. int lbs_suspend(struct lbs_private *priv);
  46. int lbs_resume(struct lbs_private *priv);
  47. void lbs_queue_event(struct lbs_private *priv, u32 event);
  48. void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx);
  49. int lbs_enter_auto_deep_sleep(struct lbs_private *priv);
  50. int lbs_exit_auto_deep_sleep(struct lbs_private *priv);
  51. u32 lbs_fw_index_to_data_rate(u8 index);
  52. u8 lbs_data_rate_to_fw_index(u32 rate);
  53. int lbs_get_firmware(struct device *dev, u32 card_model,
  54. const struct lbs_fw_table *fw_table,
  55. const struct firmware **helper,
  56. const struct firmware **mainfw);
  57. int lbs_get_firmware_async(struct lbs_private *priv, struct device *device,
  58. u32 card_model, const struct lbs_fw_table *fw_table,
  59. lbs_fw_cb callback);
  60. void lbs_wait_for_firmware_load(struct lbs_private *priv);
  61. #endif