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: NDavid Woodhouse <dwmw2@infradead.org> Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Showing
想要评论请 注册 或 登录