aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/mwifiex/sta_cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c
index 9c2404cd755f..9208a8816b80 100644
--- a/drivers/net/wireless/mwifiex/sta_cmd.c
+++ b/drivers/net/wireless/mwifiex/sta_cmd.c
@@ -1170,8 +1170,9 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
1170 strncmp(prop->name, prefix, len)) 1170 strncmp(prop->name, prefix, len))
1171 continue; 1171 continue;
1172 1172
1173 /* property header is 6 bytes */ 1173 /* property header is 6 bytes, data must fit in cmd buffer */
1174 if (prop && prop->value && prop->length > 6) { 1174 if (prop && prop->value && prop->length > 6 &&
1175 prop->length <= MWIFIEX_SIZE_OF_CMD_BUFFER - S_DS_GEN) {
1175 ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_CFG_DATA, 1176 ret = mwifiex_send_cmd_sync(priv, HostCmd_CMD_CFG_DATA,
1176 HostCmd_ACT_GEN_SET, 0, 1177 HostCmd_ACT_GEN_SET, 0,
1177 prop); 1178 prop);