diff options
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 3079b3f24764..c3d7f60f93f2 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) | |||
115 | struct cmd_ds_host_sleep cmd_config; | 115 | struct cmd_ds_host_sleep cmd_config; |
116 | int ret; | 116 | int ret; |
117 | 117 | ||
118 | cmd_config.hdr.size = cpu_to_le16(sizeof(cmd_config)); | ||
118 | cmd_config.criteria = cpu_to_le32(criteria); | 119 | cmd_config.criteria = cpu_to_le32(criteria); |
119 | cmd_config.gpio = priv->wol_gpio; | 120 | cmd_config.gpio = priv->wol_gpio; |
120 | cmd_config.gap = priv->wol_gap; | 121 | cmd_config.gap = priv->wol_gap; |
@@ -1101,7 +1102,7 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, | |||
1101 | lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); | 1102 | lbs_deb_enter_args(LBS_DEB_CMD, "action %d", cmd_action); |
1102 | 1103 | ||
1103 | cmd->hdr.command = cpu_to_le16(CMD_MESH_ACCESS); | 1104 | cmd->hdr.command = cpu_to_le16(CMD_MESH_ACCESS); |
1104 | cmd->hdr.size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN); | 1105 | cmd->hdr.size = cpu_to_le16(sizeof(*cmd)); |
1105 | cmd->hdr.result = 0; | 1106 | cmd->hdr.result = 0; |
1106 | 1107 | ||
1107 | cmd->action = cpu_to_le16(cmd_action); | 1108 | 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) | |||
1121 | cmd.action = cpu_to_le16(enable); | 1122 | cmd.action = cpu_to_le16(enable); |
1122 | cmd.channel = cpu_to_le16(chan); | 1123 | cmd.channel = cpu_to_le16(chan); |
1123 | cmd.type = cpu_to_le16(priv->mesh_tlv); | 1124 | cmd.type = cpu_to_le16(priv->mesh_tlv); |
1125 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | ||
1124 | 1126 | ||
1125 | if (enable) { | 1127 | if (enable) { |
1126 | cmd.length = cpu_to_le16(priv->mesh_ssid_len); | 1128 | cmd.length = cpu_to_le16(priv->mesh_ssid_len); |
diff --git a/drivers/net/wireless/libertas/cmd.h b/drivers/net/wireless/libertas/cmd.h index 2f4c1ec50392..e334f0e623af 100644 --- a/drivers/net/wireless/libertas/cmd.h +++ b/drivers/net/wireless/libertas/cmd.h | |||
@@ -9,6 +9,10 @@ | |||
9 | #define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) \ | 9 | #define lbs_cmd(priv, cmdnr, cmd, cb, cb_arg) \ |
10 | __lbs_cmd(priv, cmdnr, &(cmd)->hdr, sizeof(*(cmd)), cb, cb_arg) | 10 | __lbs_cmd(priv, cmdnr, &(cmd)->hdr, sizeof(*(cmd)), cb, cb_arg) |
11 | 11 | ||
12 | |||
13 | /* lbs_cmd_with_response() infers the size of the command to be _sent_ | ||
14 | and requires that the caller sets cmd->size to the (LE) size of | ||
15 | the _response_ buffer. */ | ||
12 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ | 16 | #define lbs_cmd_with_response(priv, cmdnr, cmd) \ |
13 | lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd)) | 17 | lbs_cmd(priv, cmdnr, cmd, lbs_cmd_copyback, (unsigned long) (cmd)) |
14 | 18 | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index cf882517ceaf..8bc23b3ae640 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -106,6 +106,7 @@ static void if_usb_set_boot2_ver(struct lbs_private *priv) | |||
106 | { | 106 | { |
107 | struct cmd_ds_set_boot2_ver b2_cmd; | 107 | struct cmd_ds_set_boot2_ver b2_cmd; |
108 | 108 | ||
109 | b2_cmd.hdr.size = cpu_to_le16(sizeof(b2_cmd)); | ||
109 | b2_cmd.action = 0; | 110 | b2_cmd.action = 0; |
110 | b2_cmd.version = priv->boot2_version; | 111 | b2_cmd.version = priv->boot2_version; |
111 | 112 | ||