diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-15 03:46:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:07:37 -0800 |
commit | 9fae899c2b5dc224042da63b14118abdb22ae9b6 (patch) | |
tree | 861ff7fc3577fe495d7a267578d977533a454c2e /drivers/net/wireless/libertas/cmd.c | |
parent | 3399ea5f239d49522212db179bca4de9e84b09df (diff) |
libertas: ensure response buffer size is always set for lbs_cmd_with_response
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 3079b3f2476..c3d7f60f93f 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -115,6 +115,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria) struct cmd_ds_host_sleep cmd_config; int ret; + cmd_config.hdr.size = cpu_to_le16(sizeof(cmd_config)); cmd_config.criteria = cpu_to_le32(criteria); cmd_config.gpio = priv->wol_gpio; cmd_config.gap = priv->wol_gap; @@ -1101,7 +1102,7 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); cmd->hdr.command = cpu_to_le16(CMD_MESH_ACCESS); - cmd->hdr.size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN); + cmd->hdr.size = cpu_to_le16(sizeof(*cmd)); cmd->hdr.result = 0; cmd->action = cpu_to_le16(cmd_action); @@ -1121,6 +1122,7 @@ int lbs_mesh_config(struct lbs_private *priv, uint16_t enable, uint16_t chan) cmd.action = cpu_to_le16(enable); cmd.channel = cpu_to_le16(chan); cmd.type = cpu_to_le16(priv->mesh_tlv); + cmd.hdr.size = cpu_to_le16(sizeof(cmd)); if (enable) { cmd.length = cpu_to_le16(priv->mesh_ssid_len); |