From a8bdcd71fd33e4a919f9f0cb32207c644b70853f Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 11 Dec 2007 12:40:35 -0500 Subject: libertas: add simple copyback command callback A simple callback which copies the response back into the command buffer that was used to send the command to the card. Will allow for direct command processing outside the mega-switches in cmd.c and cmdresp.c. Signed-off-by: Dan Williams Signed-off-by: David Woodhouse Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/cmd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/wireless/libertas/cmd.h') diff --git a/drivers/net/wireless/libertas/cmd.h b/drivers/net/wireless/libertas/cmd.h index 259d3e8..72857a1 100644 --- a/drivers/net/wireless/libertas/cmd.h +++ b/drivers/net/wireless/libertas/cmd.h @@ -10,9 +10,16 @@ __lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \ callback, callback_arg) +#define lbs_cmd_with_response(priv, cmdnr, cmd) \ + __lbs_cmd(priv, cmdnr, (struct cmd_header *) &cmd, sizeof(cmd), \ + lbs_cmd_copyback, (unsigned long) &cmd) + int __lbs_cmd(struct lbs_private *priv, uint16_t command, struct cmd_header *in_cmd, int in_cmd_size, int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *), unsigned long callback_arg); +int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra, + struct cmd_header *resp); + #endif /* _LBS_CMD_H */ -- cgit v1.1