|
@@ -936,12 +936,12 @@ static s32 handle_connect(struct wilc_vif *vif,
|
|
}
|
|
}
|
|
|
|
|
|
if (conn_attr->bssid) {
|
|
if (conn_attr->bssid) {
|
|
- hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL);
|
|
|
|
|
|
+ hif_drv->usr_conn_req.bssid = kmemdup(conn_attr->bssid, 6,
|
|
|
|
+ GFP_KERNEL);
|
|
if (!hif_drv->usr_conn_req.bssid) {
|
|
if (!hif_drv->usr_conn_req.bssid) {
|
|
result = -ENOMEM;
|
|
result = -ENOMEM;
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
- memcpy(hif_drv->usr_conn_req.bssid, conn_attr->bssid, 6);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
hif_drv->usr_conn_req.ssid_len = conn_attr->ssid_len;
|
|
hif_drv->usr_conn_req.ssid_len = conn_attr->ssid_len;
|
|
@@ -960,15 +960,13 @@ static s32 handle_connect(struct wilc_vif *vif,
|
|
|
|
|
|
hif_drv->usr_conn_req.ies_len = conn_attr->ies_len;
|
|
hif_drv->usr_conn_req.ies_len = conn_attr->ies_len;
|
|
if (conn_attr->ies) {
|
|
if (conn_attr->ies) {
|
|
- hif_drv->usr_conn_req.ies = kmalloc(conn_attr->ies_len,
|
|
|
|
|
|
+ hif_drv->usr_conn_req.ies = kmemdup(conn_attr->ies,
|
|
|
|
+ conn_attr->ies_len,
|
|
GFP_KERNEL);
|
|
GFP_KERNEL);
|
|
if (!hif_drv->usr_conn_req.ies) {
|
|
if (!hif_drv->usr_conn_req.ies) {
|
|
result = -ENOMEM;
|
|
result = -ENOMEM;
|
|
goto error;
|
|
goto error;
|
|
}
|
|
}
|
|
- memcpy(hif_drv->usr_conn_req.ies,
|
|
|
|
- conn_attr->ies,
|
|
|
|
- conn_attr->ies_len);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
hif_drv->usr_conn_req.security = conn_attr->security;
|
|
hif_drv->usr_conn_req.security = conn_attr->security;
|