if (passive)
                scan_options |= WL1271_SCAN_OPT_PASSIVE;
 
-       if (wlvif->bss_type == BSS_TYPE_AP_BSS ||
-           test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
-               cmd->params.role_id = wlvif->role_id;
-       else
-               cmd->params.role_id = wlvif->dev_role_id;
+       cmd->params.role_id = wlvif->role_id;
 
        if (WARN_ON(cmd->params.role_id == WL12XX_INVALID_ROLE_ID)) {
                ret = -EINVAL;
                goto out;
        }
 
-       cmd->role_id = wlvif->dev_role_id;
+       cmd->role_id = wlvif->role_id;
        if (!n_match_ssids) {
                /* No filter, with ssids */
                type = SCAN_SSID_FILTER_DISABLED;
        if (!cfg)
                return -ENOMEM;
 
-       cfg->role_id = wlvif->dev_role_id;
+       cfg->role_id = wlvif->role_id;
        cfg->rssi_threshold = c->rssi_threshold;
        cfg->snr_threshold  = c->snr_threshold;
        cfg->n_probe_reqs = c->num_probe_reqs;
        if (!force_passive && cfg->active[0]) {
                u8 band = IEEE80211_BAND_2GHZ;
                ret = wl12xx_cmd_build_probe_req(wl, wlvif,
-                                                wlvif->dev_role_id, band,
+                                                wlvif->role_id, band,
                                                 req->ssids[0].ssid,
                                                 req->ssids[0].ssid_len,
                                                 ies->ie[band],
        if (!force_passive && cfg->active[1]) {
                u8 band = IEEE80211_BAND_5GHZ;
                ret = wl12xx_cmd_build_probe_req(wl, wlvif,
-                                                wlvif->dev_role_id, band,
+                                                wlvif->role_id, band,
                                                 req->ssids[0].ssid,
                                                 req->ssids[0].ssid_len,
                                                 ies->ie[band],
        if (!start)
                return -ENOMEM;
 
-       start->role_id = wlvif->dev_role_id;
+       start->role_id = wlvif->role_id;
        start->tag = WL1271_SCAN_DEFAULT_TAG;
 
        ret = wl1271_cmd_send(wl, CMD_START_PERIODIC_SCAN, start,
                return;
        }
 
-       stop->role_id = wlvif->dev_role_id;
+       stop->role_id = wlvif->role_id;
        stop->tag = WL1271_SCAN_DEFAULT_TAG;
 
        ret = wl1271_cmd_send(wl, CMD_STOP_PERIODIC_SCAN, stop,