blob: e800295479baf6a645f890a098f72939eb2317b8 [file] [log] [blame]
Dan Williams14e865b2007-12-10 15:11:23 -05001/* 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 Woodhouse689442d2007-12-12 16:00:42 -05009#define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) \
10 __lbs_cmd(priv, cmdnr, &(cmd)->hdr, sizeof(*(cmd)), cb, cb_arg)
Dan Williams14e865b2007-12-10 15:11:23 -050011
David Woodhouse689442d2007-12-12 16:00:42 -050012#define lbs_cmd_with_response(priv, cmdnr, cmd) \
13 lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd))
Dan Williamsa8bdcd72007-12-11 12:40:35 -050014
Dan Williams7ad994d2007-12-11 12:33:30 -050015int __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 Williams14e865b2007-12-10 15:11:23 -050018 unsigned long callback_arg);
19
Dan Williamsa8bdcd72007-12-11 12:40:35 -050020int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra,
21 struct cmd_header *resp);
22
Dan Williams6e66f032007-12-11 12:42:16 -050023int lbs_update_hw_spec(struct lbs_private *priv);
24
David Woodhouse301eacb2007-12-11 15:23:59 -050025int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
26 struct cmd_ds_mesh_access *cmd);
27
Dan Williams8e3c91b2007-12-11 15:50:59 -050028int lbs_get_data_rate(struct lbs_private *priv);
29int lbs_set_data_rate(struct lbs_private *priv, u8 rate);
30
Dan Williams2dd4b262007-12-11 16:54:15 -050031int lbs_get_channel(struct lbs_private *priv);
32int lbs_set_channel(struct lbs_private *priv, u8 channel);
33
David Woodhouse23a397a2007-12-11 18:56:42 -050034int lbs_mesh_config(struct lbs_private *priv, int enable);
35
David Woodhouse6ce4fd22007-12-12 15:19:29 -050036int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
37 uint8_t gpio, uint8_t gap);
38
Dan Williams14e865b2007-12-10 15:11:23 -050039#endif /* _LBS_CMD_H */