blob: 40f56bb1eac8332aa9b172df9778d8778d2116e4 [file] [log] [blame]
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02001/**
2 * This file contains declaration referring to
3 * functions defined in other source files
4 */
5
6#ifndef _WLAN_DECL_H_
7#define _WLAN_DECL_H_
8
Dan Williams7732ca42007-05-25 13:13:25 -04009#include <linux/device.h>
10
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020011#include "defs.h"
12
13/** Function Prototype Declaration */
14struct wlan_private;
15struct sk_buff;
16struct net_device;
17
18extern char *libertas_fw_name;
19
20void libertas_free_adapter(wlan_private * priv);
21int libertas_set_mac_packet_filter(wlan_private * priv);
22
23int libertas_send_null_packet(wlan_private * priv, u8 pwr_mgmt);
24void libertas_send_tx_feedback(wlan_private * priv);
25u8 libertas_check_last_packet_indication(wlan_private * priv);
26
27int libertas_free_cmd_buffer(wlan_private * priv);
28struct cmd_ctrl_node;
29struct cmd_ctrl_node *libertas_get_free_cmd_ctrl_node(wlan_private * priv);
30
31void libertas_set_cmd_ctrl_node(wlan_private * priv,
32 struct cmd_ctrl_node *ptempnode,
33 u32 cmd_oid, u16 wait_option, void *pdata_buf);
34
35int libertas_prepare_and_send_command(wlan_private * priv,
36 u16 cmd_no,
37 u16 cmd_action,
38 u16 wait_option, u32 cmd_oid, void *pdata_buf);
39
40void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u8 addtail);
41
42int libertas_allocate_cmd_buffer(wlan_private * priv);
43int libertas_execute_next_command(wlan_private * priv);
44int libertas_process_event(wlan_private * priv);
45void libertas_interrupt(struct net_device *);
46int libertas_set_radio_control(wlan_private * priv);
47u32 libertas_index_to_data_rate(u8 index);
48u8 libertas_data_rate_to_index(u32 rate);
49void libertas_get_fwversion(wlan_adapter * adapter, char *fwversion, int maxlen);
50
Florin Malita3d4bd242007-05-18 16:04:33 -040051void libertas_upload_rx_packet(wlan_private * priv, struct sk_buff *skb);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020052
53/** The proc fs interface */
54int libertas_process_rx_command(wlan_private * priv);
55int libertas_process_tx(wlan_private * priv, struct sk_buff *skb);
56void libertas_cleanup_and_insert_cmd(wlan_private * priv,
57 struct cmd_ctrl_node *ptempcmd);
58void __libertas_cleanup_and_insert_cmd(wlan_private * priv,
59 struct cmd_ctrl_node *ptempcmd);
60
61int libertas_set_regiontable(wlan_private * priv, u8 region, u8 band);
62
63int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *);
64
65void libertas_ps_sleep(wlan_private * priv, int wait_option);
66void libertas_ps_confirm_sleep(wlan_private * priv, u16 psmode);
67void libertas_ps_wakeup(wlan_private * priv, int wait_option);
68
69void libertas_tx_runqueue(wlan_private *priv);
70
Holger Schuriged457032007-05-25 12:18:36 -040071struct chan_freq_power *libertas_find_cfp_by_band_and_channel(
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020072 wlan_adapter * adapter, u8 band, u16 channel);
73
Holger Schuriged457032007-05-25 12:18:36 -040074void libertas_mac_event_disconnected(wlan_private * priv);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020075
76void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
77
Holger Schuriged457032007-05-25 12:18:36 -040078/* fw.c */
Holger Schurig084708b2007-05-25 12:37:58 -040079int libertas_init_fw(wlan_private * priv, char *fw_name);
Holger Schuriged457032007-05-25 12:18:36 -040080
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020081/* main.c */
Holger Schuriged457032007-05-25 12:18:36 -040082struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020083 int *cfp_no);
Dan Williams7732ca42007-05-25 13:13:25 -040084wlan_private *libertas_add_card(void *card, struct device *dmdev);
Holger Schurig084708b2007-05-25 12:37:58 -040085int libertas_activate_card(wlan_private *priv, char *fw_name);
86int libertas_remove_card(wlan_private *priv);
Dan Williams7732ca42007-05-25 13:13:25 -040087int libertas_add_mesh(wlan_private *priv, struct device *dev);
Holger Schurig084708b2007-05-25 12:37:58 -040088void libertas_remove_mesh(wlan_private *priv);
Holger Schurig208fdd22007-05-25 12:17:06 -040089
90
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020091#endif /* _WLAN_DECL_H_ */