0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _LBS_DECL_H_
0009 #define _LBS_DECL_H_
0010
0011 #include <linux/netdevice.h>
0012 #include <linux/firmware.h>
0013 #include <linux/nl80211.h>
0014
0015
0016 struct lbs_fw_table {
0017 int model;
0018 const char *helper;
0019 const char *fwname;
0020 };
0021
0022 struct lbs_private;
0023 typedef void (*lbs_fw_cb)(struct lbs_private *priv, int ret,
0024 const struct firmware *helper, const struct firmware *mainfw);
0025
0026 struct sk_buff;
0027 struct net_device;
0028 struct cmd_ds_command;
0029
0030
0031
0032 extern const struct ethtool_ops lbs_ethtool_ops;
0033
0034
0035
0036 void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count);
0037 netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
0038 struct net_device *dev);
0039
0040
0041 int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
0042
0043
0044
0045 struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
0046 void lbs_remove_card(struct lbs_private *priv);
0047 int lbs_start_card(struct lbs_private *priv);
0048 void lbs_stop_card(struct lbs_private *priv);
0049 void lbs_host_to_card_done(struct lbs_private *priv);
0050
0051 int lbs_start_iface(struct lbs_private *priv);
0052 int lbs_stop_iface(struct lbs_private *priv);
0053 int lbs_set_iface_type(struct lbs_private *priv, enum nl80211_iftype type);
0054
0055 int lbs_rtap_supported(struct lbs_private *priv);
0056
0057 int lbs_set_mac_address(struct net_device *dev, void *addr);
0058 void lbs_set_multicast_list(struct net_device *dev);
0059 void lbs_update_mcast(struct lbs_private *priv);
0060
0061 int lbs_suspend(struct lbs_private *priv);
0062 int lbs_resume(struct lbs_private *priv);
0063
0064 void lbs_queue_event(struct lbs_private *priv, u32 event);
0065 void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx);
0066
0067 int lbs_enter_auto_deep_sleep(struct lbs_private *priv);
0068 int lbs_exit_auto_deep_sleep(struct lbs_private *priv);
0069
0070 u32 lbs_fw_index_to_data_rate(u8 index);
0071 u8 lbs_data_rate_to_fw_index(u32 rate);
0072
0073 int lbs_get_firmware(struct device *dev, u32 card_model,
0074 const struct lbs_fw_table *fw_table,
0075 const struct firmware **helper,
0076 const struct firmware **mainfw);
0077 int lbs_get_firmware_async(struct lbs_private *priv, struct device *device,
0078 u32 card_model, const struct lbs_fw_table *fw_table,
0079 lbs_fw_cb callback);
0080 void lbs_wait_for_firmware_load(struct lbs_private *priv);
0081
0082 #endif