blob: 84a3aa7ac5705c300e11fad5df4cccde1405101d [file] [log] [blame]
Kiran Divekare86dc1c2010-06-14 22:01:26 +05301
Randy Dunlap8973a6e2011-04-26 15:25:29 -07002/*
3 * This file contains declaration referring to
4 * functions defined in other source files
5 */
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02006
Holger Schurig10078322007-11-15 18:05:47 -05007#ifndef _LBS_DECL_H_
8#define _LBS_DECL_H_
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02009
Stephen Hemmingerd0cf9c02009-08-31 19:50:57 +000010#include <linux/netdevice.h>
Dan Williams72f7a662010-08-07 21:14:33 -050011#include <linux/firmware.h>
Daniel Drake5c1381a2011-10-14 12:05:26 +010012#include <linux/nl80211.h>
Dan Williams7732ca42007-05-25 13:13:25 -040013
Dan Williams72f7a662010-08-07 21:14:33 -050014/* Should be terminated by a NULL entry */
15struct lbs_fw_table {
16 int model;
17 const char *helper;
18 const char *fwname;
19};
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020020
Holger Schurig10078322007-11-15 18:05:47 -050021struct lbs_private;
Daniel Drake534111c2012-04-16 23:53:26 +010022typedef void (*lbs_fw_cb)(struct lbs_private *priv, int ret,
23 const struct firmware *helper, const struct firmware *mainfw);
24
25struct lbs_private;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020026struct sk_buff;
27struct net_device;
Kiran Divekar1047d5e2010-06-04 23:20:42 -070028struct cmd_ds_command;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020029
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020030
Holger Schurige93156e2009-10-22 15:30:58 +020031/* ethtool.c */
32extern const struct ethtool_ops lbs_ethtool_ops;
33
34
35/* tx.c */
Holger Schurig7919b892008-04-01 14:50:43 +020036void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count);
Stephen Hemmingerd0cf9c02009-08-31 19:50:57 +000037netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
38 struct net_device *dev);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020039
Holger Schurige93156e2009-10-22 15:30:58 +020040/* rx.c */
Holger Schurig69f90322007-11-23 15:43:44 +010041int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020042
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020043
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020044/* main.c */
Holger Schurig69f90322007-11-23 15:43:44 +010045struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
Holger Schuriga63e5cb2008-04-30 10:50:39 +020046void lbs_remove_card(struct lbs_private *priv);
Holger Schurig69f90322007-11-23 15:43:44 +010047int lbs_start_card(struct lbs_private *priv);
Holger Schuriga63e5cb2008-04-30 10:50:39 +020048void lbs_stop_card(struct lbs_private *priv);
David Woodhousee775ed72007-12-06 14:36:11 +000049void lbs_host_to_card_done(struct lbs_private *priv);
Holger Schurig208fdd22007-05-25 12:17:06 -040050
Daniel Draked2e7b342011-08-01 16:43:13 +010051int lbs_start_iface(struct lbs_private *priv);
52int lbs_stop_iface(struct lbs_private *priv);
Daniel Drake5c1381a2011-10-14 12:05:26 +010053int lbs_set_iface_type(struct lbs_private *priv, enum nl80211_iftype type);
Daniel Draked2e7b342011-08-01 16:43:13 +010054
Kiran Divekare86dc1c2010-06-14 22:01:26 +053055int lbs_rtap_supported(struct lbs_private *priv);
56
Holger Schurige0e42da2009-11-25 13:10:15 +010057int lbs_set_mac_address(struct net_device *dev, void *addr);
58void lbs_set_multicast_list(struct net_device *dev);
Daniel Draked2e7b342011-08-01 16:43:13 +010059void lbs_update_mcast(struct lbs_private *priv);
Holger Schurige0e42da2009-11-25 13:10:15 +010060
Holger Schurige93156e2009-10-22 15:30:58 +020061int lbs_suspend(struct lbs_private *priv);
Amitkumar Karwar66fceb62010-05-19 03:24:38 -070062int lbs_resume(struct lbs_private *priv);
Holger Schurige93156e2009-10-22 15:30:58 +020063
64void lbs_queue_event(struct lbs_private *priv, u32 event);
65void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx);
66
67int lbs_enter_auto_deep_sleep(struct lbs_private *priv);
68int lbs_exit_auto_deep_sleep(struct lbs_private *priv);
69
70u32 lbs_fw_index_to_data_rate(u8 index);
71u8 lbs_data_rate_to_fw_index(u32 rate);
72
Daniel Drake370803c2012-04-16 23:52:42 +010073int lbs_get_firmware(struct device *dev, u32 card_model,
Dan Williams72f7a662010-08-07 21:14:33 -050074 const struct lbs_fw_table *fw_table,
75 const struct firmware **helper,
76 const struct firmware **mainfw);
Daniel Drake534111c2012-04-16 23:53:26 +010077int lbs_get_firmware_async(struct lbs_private *priv, struct device *device,
78 u32 card_model, const struct lbs_fw_table *fw_table,
79 lbs_fw_cb callback);
80void lbs_wait_for_firmware_load(struct lbs_private *priv);
Dan Williams72f7a662010-08-07 21:14:33 -050081
Holger Schurig10078322007-11-15 18:05:47 -050082#endif