When nl80211 command timed out, the driver should return error.
The state of data structure in the driver should be updated
only when it succeed.
Change-Id: I31e3440e442531eb6136d09e5bb8069c1da09daf
Signed-off-by: Semun Lee <semun.lee@samsung.com>
printkd("invalid interface type %u\n", type);
return -EOPNOTSUPP;
}
- vif->wdev.iftype = type;
if (mode == vif->mode) {
printkd("not need change mode\n");
return 0;
}
- vif->wdev.iftype = type;
- vif->mode = mode;
printkd("[%s][%d][%d]\n", __func__, vif_id, mode);
ret = wlan_cmd_mac_open(vif_id, mode, vif->ndev->dev_addr);
if (OK != ret)
if (-1 == ret) {
printke("[SEND_CMD %s %d ERROR][rsp timeout]\n",
get_cmd_name(subtype), vif_id);
+ wlan_cmd_unlock(cmd);
+ goto ERR;
}
if ((SC2331_HOST_RSP != msg->type) || (subtype != msg->subtype)) {