aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/hostcmd.h
diff options
context:
space:
mode:
authorHolger Schurig <h.schurig@mn-solutions.de>2007-12-05 11:58:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:04 -0500
commit675787e29fd97d08bf7e6253c89ab6de23bf7089 (patch)
tree81a51dd6696e5ba67a87e6b4bf2ee368854f23b7 /drivers/net/wireless/libertas/hostcmd.h
parent0d61d04210b617963c202a3c4dcbcd26a024d5d3 (diff)
libertas: handy function to call firmware commands
Using an arbitrary firmware command was actually very painful. One had to change big switch() statements in cmd.c, cmdresp.c, add structs to the big union in "struct cmd_ds_command" and add the define for the CMD_802_11_xxx to the proper place. With this function, this is now much easier. For now, it implements a blocking (a.k.a. CMD_OPTION_WAITFORRSP) way where one deals directly with command requests and response buffers. You can do everything in one place: Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/hostcmd.h')
-rw-r--r--drivers/net/wireless/libertas/hostcmd.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/hostcmd.h b/drivers/net/wireless/libertas/hostcmd.h
index f096d995194a..be69ae652923 100644
--- a/drivers/net/wireless/libertas/hostcmd.h
+++ b/drivers/net/wireless/libertas/hostcmd.h
@@ -66,13 +66,13 @@ struct rxpd {
66}; 66};
67 67
68struct cmd_ctrl_node { 68struct cmd_ctrl_node {
69 /* CMD link list */
70 struct list_head list; 69 struct list_head list;
71 /*CMD wait option: wait for finish or no wait */ 70 /* wait for finish or not */
72 u16 wait_option; 71 u16 wait_option;
73 /* command parameter */ 72 /* command response */
74 void *pdata_buf; 73 void *pdata_buf;
75 /*command data */ 74 int *pdata_size;
75 /* command data */
76 u8 *bufvirtualaddr; 76 u8 *bufvirtualaddr;
77 /* wait queue */ 77 /* wait queue */
78 u16 cmdwaitqwoken; 78 u16 cmdwaitqwoken;
@@ -100,9 +100,12 @@ struct cmd_ds_gen {
100 __le16 size; 100 __le16 size;
101 __le16 seqnum; 101 __le16 seqnum;
102 __le16 result; 102 __le16 result;
103 void *cmdresp[0];
103}; 104};
104 105
105#define S_DS_GEN sizeof(struct cmd_ds_gen) 106#define S_DS_GEN sizeof(struct cmd_ds_gen)
107
108
106/* 109/*
107 * Define data structure for CMD_GET_HW_SPEC 110 * Define data structure for CMD_GET_HW_SPEC
108 * This structure defines the response for the GET_HW_SPEC command 111 * This structure defines the response for the GET_HW_SPEC command