blob: 9304e6fc421f064eeacfd5ce5419f39302a64ce8 [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>
Dan Williams7732ca42007-05-25 13:13:25 -040012
Dan Williams72f7a662010-08-07 21:14:33 -050013/* Should be terminated by a NULL entry */
14struct lbs_fw_table {
15 int model;
16 const char *helper;
17 const char *fwname;
18};
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020019
Holger Schurig10078322007-11-15 18:05:47 -050020struct lbs_private;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020021struct sk_buff;
22struct net_device;
Kiran Divekar1047d5e2010-06-04 23:20:42 -070023struct cmd_ds_command;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020024
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020025
Holger Schurige93156e2009-10-22 15:30:58 +020026/* ethtool.c */
27extern const struct ethtool_ops lbs_ethtool_ops;
28
29
30/* tx.c */
Holger Schurig7919b892008-04-01 14:50:43 +020031void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count);
Stephen Hemmingerd0cf9c02009-08-31 19:50:57 +000032netdev_tx_t lbs_hard_start_xmit(struct sk_buff *skb,
33 struct net_device *dev);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020034
Holger Schurige93156e2009-10-22 15:30:58 +020035/* rx.c */
Holger Schurig69f90322007-11-23 15:43:44 +010036int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020037
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020038
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020039/* main.c */
Holger Schurig69f90322007-11-23 15:43:44 +010040struct lbs_private *lbs_add_card(void *card, struct device *dmdev);
Holger Schuriga63e5cb2008-04-30 10:50:39 +020041void lbs_remove_card(struct lbs_private *priv);
Holger Schurig69f90322007-11-23 15:43:44 +010042int lbs_start_card(struct lbs_private *priv);
Holger Schuriga63e5cb2008-04-30 10:50:39 +020043void lbs_stop_card(struct lbs_private *priv);
David Woodhousee775ed72007-12-06 14:36:11 +000044void lbs_host_to_card_done(struct lbs_private *priv);
Holger Schurig208fdd22007-05-25 12:17:06 -040045
Daniel Draked2e7b342011-08-01 16:43:13 +010046int lbs_start_iface(struct lbs_private *priv);
47int lbs_stop_iface(struct lbs_private *priv);
48
Kiran Divekare86dc1c2010-06-14 22:01:26 +053049int lbs_rtap_supported(struct lbs_private *priv);
50
Holger Schurige0e42da2009-11-25 13:10:15 +010051int lbs_set_mac_address(struct net_device *dev, void *addr);
52void lbs_set_multicast_list(struct net_device *dev);
Daniel Draked2e7b342011-08-01 16:43:13 +010053void lbs_update_mcast(struct lbs_private *priv);
Holger Schurige0e42da2009-11-25 13:10:15 +010054
Holger Schurige93156e2009-10-22 15:30:58 +020055int lbs_suspend(struct lbs_private *priv);
Amitkumar Karwar66fceb62010-05-19 03:24:38 -070056int lbs_resume(struct lbs_private *priv);
Holger Schurige93156e2009-10-22 15:30:58 +020057
58void lbs_queue_event(struct lbs_private *priv, u32 event);
59void lbs_notify_command_response(struct lbs_private *priv, u8 resp_idx);
60
61int lbs_enter_auto_deep_sleep(struct lbs_private *priv);
62int lbs_exit_auto_deep_sleep(struct lbs_private *priv);
63
64u32 lbs_fw_index_to_data_rate(u8 index);
65u8 lbs_data_rate_to_fw_index(u32 rate);
66
Dan Williams72f7a662010-08-07 21:14:33 -050067int lbs_get_firmware(struct device *dev, const char *user_helper,
68 const char *user_mainfw, u32 card_model,
69 const struct lbs_fw_table *fw_table,
70 const struct firmware **helper,
71 const struct firmware **mainfw);
72
Holger Schurig10078322007-11-15 18:05:47 -050073#endif