Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79255
b: refs/heads/master
c: f15ebb6
h: refs/heads/master
i:
  79253: 7e9220a
  79251: e6032eb
  79247: 2f4ab4e
v: v3
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 95cf888 commit bf2b593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f59abf190b15350167bec5382dda205030ac9d0
refs/heads/master: f15ebb63b36eca5fa68fabd04ab2f7840bc67205
14 changes: 8 additions & 6 deletions trunk/drivers/net/wireless/libertas/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
#include "hostcmd.h"
#include "dev.h"

#define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) \
__lbs_cmd(priv, cmdnr, &(cmd)->hdr, sizeof(*(cmd)), cb, cb_arg)
/* lbs_cmd() infers the size of the buffer to copy data back into, from
the size of the target of the pointer. Since the command to be sent
may often be smaller, that size is set in cmd->size by the caller.*/
#define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) ({ \
uint16_t __sz = le16_to_cpu((cmd)->hdr.size); \
(cmd)->hdr.size = cpu_to_le16(sizeof(*(cmd))); \
__lbs_cmd(priv, cmdnr, &(cmd)->hdr, __sz, cb, cb_arg); \
})


/* lbs_cmd_with_response() infers the size of the command to be _sent_
and requires that the caller sets cmd->size to the (LE) size of
the _response_ buffer. */
#define lbs_cmd_with_response(priv, cmdnr, cmd) \
lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd))

Expand Down

0 comments on commit bf2b593

Please sign in to comment.