]> git.baikalelectronics.ru Git - kernel.git/commit
libertas: change inference about buffer size in lbs_cmd()
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 19 Dec 2007 13:03:19 +0000 (13:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:07:51 +0000 (15:07 -0800)
commit7790f3be8577844dcbd73972e581e130c12911fa
tree6b2952b6744062e8487646d08e55eb04c87e2d83
parentf36cc05822f49cf446bbcf000256c1be630db066
libertas: change inference about buffer size in lbs_cmd()

sizeof(*cmd) is going to give the total size of the data structure that
we allocated, more often than not. But the size of the command to be
_sent_ could be a lot smaller, as it is in the KEY_MATERIAL and
SUBSCRIBE_EVENT commands for example. So swap them round; let the caller
set the _command_ size explicitly in the header, and infer the
maximum response size from the data structure.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.h