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>
This commit is contained in:
Holger Schurig
2007-12-05 17:58:11 +01:00
committed by David S. Miller
parent 0d61d04210
commit 675787e29f
4 changed files with 126 additions and 10 deletions

View File

@@ -16,6 +16,7 @@ struct lbs_adapter;
struct sk_buff;
struct net_device;
struct cmd_ctrl_node;
struct cmd_ds_command;
int lbs_set_mac_packet_filter(struct lbs_private *priv);
@@ -23,6 +24,11 @@ void lbs_send_tx_feedback(struct lbs_private *priv);
int lbs_free_cmd_buffer(struct lbs_private *priv);
int lbs_cmd(struct lbs_private *priv,
u16 command,
void *cmd, int cmd_size,
void *resp, int *resp_size);
int lbs_prepare_and_send_command(struct lbs_private *priv,
u16 cmd_no,
u16 cmd_action,