Dan Williams | 14e865b | 2007-12-10 15:11:23 -0500 | [diff] [blame] | 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 | |
David Woodhouse | 689442d | 2007-12-12 16:00:42 -0500 | [diff] [blame^] | 9 | #define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) \ |
| 10 | __lbs_cmd(priv, cmdnr, &(cmd)->hdr, sizeof(*(cmd)), cb, cb_arg) |
Dan Williams | 14e865b | 2007-12-10 15:11:23 -0500 | [diff] [blame] | 11 | |
David Woodhouse | 689442d | 2007-12-12 16:00:42 -0500 | [diff] [blame^] | 12 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ |
| 13 | lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd)) |
Dan Williams | a8bdcd7 | 2007-12-11 12:40:35 -0500 | [diff] [blame] | 14 | |
Dan Williams | 7ad994d | 2007-12-11 12:33:30 -0500 | [diff] [blame] | 15 | int __lbs_cmd(struct lbs_private *priv, uint16_t command, |
| 16 | struct cmd_header *in_cmd, int in_cmd_size, |
| 17 | int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *), |
Dan Williams | 14e865b | 2007-12-10 15:11:23 -0500 | [diff] [blame] | 18 | unsigned long callback_arg); |
| 19 | |
Dan Williams | a8bdcd7 | 2007-12-11 12:40:35 -0500 | [diff] [blame] | 20 | int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra, |
| 21 | struct cmd_header *resp); |
| 22 | |
Dan Williams | 6e66f03 | 2007-12-11 12:42:16 -0500 | [diff] [blame] | 23 | int lbs_update_hw_spec(struct lbs_private *priv); |
| 24 | |
David Woodhouse | 301eacb | 2007-12-11 15:23:59 -0500 | [diff] [blame] | 25 | int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, |
| 26 | struct cmd_ds_mesh_access *cmd); |
| 27 | |
Dan Williams | 8e3c91b | 2007-12-11 15:50:59 -0500 | [diff] [blame] | 28 | int lbs_get_data_rate(struct lbs_private *priv); |
| 29 | int lbs_set_data_rate(struct lbs_private *priv, u8 rate); |
| 30 | |
Dan Williams | 2dd4b26 | 2007-12-11 16:54:15 -0500 | [diff] [blame] | 31 | int lbs_get_channel(struct lbs_private *priv); |
| 32 | int lbs_set_channel(struct lbs_private *priv, u8 channel); |
| 33 | |
David Woodhouse | 23a397a | 2007-12-11 18:56:42 -0500 | [diff] [blame] | 34 | int lbs_mesh_config(struct lbs_private *priv, int enable); |
| 35 | |
David Woodhouse | 6ce4fd2 | 2007-12-12 15:19:29 -0500 | [diff] [blame] | 36 | int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, |
| 37 | uint8_t gpio, uint8_t gap); |
| 38 | |
Dan Williams | 14e865b | 2007-12-10 15:11:23 -0500 | [diff] [blame] | 39 | #endif /* _LBS_CMD_H */ |