Commit | Line | Data |
---|---|---|
14e865ba DW |
1 | /* Copyright (C) 2007, Red Hat, Inc. */ |
2 | ||
3 | #ifndef _LBS_CMD_H_ | |
4 | #define _LBS_CMD_H_ | |
5 | ||
6 | #include "hostcmd.h" | |
7 | #include "dev.h" | |
8 | ||
f15ebb63 DW |
9 | /* lbs_cmd() infers the size of the buffer to copy data back into, from |
10 | the size of the target of the pointer. Since the command to be sent | |
11 | may often be smaller, that size is set in cmd->size by the caller.*/ | |
12 | #define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) ({ \ | |
13 | uint16_t __sz = le16_to_cpu((cmd)->hdr.size); \ | |
14 | (cmd)->hdr.size = cpu_to_le16(sizeof(*(cmd))); \ | |
15 | __lbs_cmd(priv, cmdnr, &(cmd)->hdr, __sz, cb, cb_arg); \ | |
16 | }) | |
14e865ba | 17 | |
689442dc DW |
18 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ |
19 | lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd)) | |
7e226272 | 20 | |
8db4a2b9 HS |
21 | void lbs_cmd_async(struct lbs_private *priv, uint16_t command, |
22 | struct cmd_header *in_cmd, int in_cmd_size); | |
23 | ||
7ad994de | 24 | int __lbs_cmd(struct lbs_private *priv, uint16_t command, |
7e226272 | 25 | struct cmd_header *in_cmd, int in_cmd_size, |
7ad994de | 26 | int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *), |
14e865ba DW |
27 | unsigned long callback_arg); |
28 | ||
0112c9e9 AN |
29 | int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0, |
30 | int8_t p1, int8_t p2); | |
31 | ||
32 | int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1, | |
33 | int8_t p2, int usesnr); | |
34 | ||
3ed6e080 AN |
35 | int lbs_set_power_adapt_cfg(struct lbs_private *priv, int enable, int8_t p0, |
36 | int8_t p1, int8_t p2); | |
37 | ||
38 | int lbs_set_tpc_cfg(struct lbs_private *priv, int enable, int8_t p0, int8_t p1, | |
39 | int8_t p2, int usesnr); | |
40 | ||
a8bdcd71 DW |
41 | int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra, |
42 | struct cmd_header *resp); | |
43 | ||
6e66f03f DW |
44 | int lbs_update_hw_spec(struct lbs_private *priv); |
45 | ||
301eacbf DW |
46 | int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, |
47 | struct cmd_ds_mesh_access *cmd); | |
48 | ||
8e3c91bb DW |
49 | int lbs_set_data_rate(struct lbs_private *priv, u8 rate); |
50 | ||
2dd4b262 DW |
51 | int lbs_get_channel(struct lbs_private *priv); |
52 | int lbs_set_channel(struct lbs_private *priv, u8 channel); | |
53 | ||
edaea5ce JC |
54 | int lbs_mesh_config_send(struct lbs_private *priv, |
55 | struct cmd_ds_mesh_config *cmd, | |
56 | uint16_t action, uint16_t type); | |
86062134 | 57 | int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan); |
23a397ac | 58 | |
582c1b53 AN |
59 | int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, |
60 | struct wol_config *p_wol_config); | |
ab25ecae | 61 | int lbs_suspend(struct lbs_private *priv); |
a63e5cb2 | 62 | void lbs_resume(struct lbs_private *priv); |
6ce4fd2a | 63 | |
85319f93 JC |
64 | int lbs_cmd_802_11_rate_adapt_rateset(struct lbs_private *priv, |
65 | uint16_t cmd_action); | |
6e5cc4fb DW |
66 | int lbs_cmd_802_11_inactivity_timeout(struct lbs_private *priv, |
67 | uint16_t cmd_action, uint16_t *timeout); | |
3fbe104c DW |
68 | int lbs_cmd_802_11_sleep_params(struct lbs_private *priv, uint16_t cmd_action, |
69 | struct sleep_params *sp); | |
f70dd451 DW |
70 | int lbs_cmd_802_11_set_wep(struct lbs_private *priv, uint16_t cmd_action, |
71 | struct assoc_request *assoc); | |
4f59abf1 DW |
72 | int lbs_cmd_802_11_enable_rsn(struct lbs_private *priv, uint16_t cmd_action, |
73 | uint16_t *enable); | |
9e1228d0 DW |
74 | int lbs_cmd_802_11_key_material(struct lbs_private *priv, uint16_t cmd_action, |
75 | struct assoc_request *assoc); | |
6e5cc4fb | 76 | |
87c8c72d DW |
77 | int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel, |
78 | s16 *maxlevel); | |
79 | int lbs_set_tx_power(struct lbs_private *priv, s16 dbm); | |
80 | ||
d5db2dfa DW |
81 | int lbs_set_radio(struct lbs_private *priv, u8 preamble, u8 radio_on); |
82 | ||
39fcf7a3 DW |
83 | int lbs_set_snmp_mib(struct lbs_private *priv, u32 oid, u16 val); |
84 | ||
85 | int lbs_get_snmp_mib(struct lbs_private *priv, u32 oid, u16 *out_val); | |
86 | ||
14e865ba | 87 | #endif /* _LBS_CMD_H */ |