|
@@ -11287,7 +11287,7 @@ static int wlan_hdd_change_client_iface_to_new_mode(struct net_device *ndev,
|
|
|
|
|
|
if (test_bit(ACS_IN_PROGRESS, &hdd_ctx->g_event_flags)) {
|
|
|
hdd_warn("ACS is in progress, don't change iface!");
|
|
|
- return 0;
|
|
|
+ return -EBUSY;
|
|
|
}
|
|
|
|
|
|
wdev = ndev->ieee80211_ptr;
|
|
@@ -11319,7 +11319,8 @@ static int wlan_hdd_change_client_iface_to_new_mode(struct net_device *ndev,
|
|
|
hdd_cfg_xlate_to_csr_phy_mode(config->dot11Mode);
|
|
|
}
|
|
|
EXIT();
|
|
|
- return status;
|
|
|
+
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
}
|
|
|
|
|
|
static int wlan_hdd_cfg80211_change_bss(struct wiphy *wiphy,
|
|
@@ -11367,7 +11368,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|
|
tCsrRoamProfile *pRoamProfile = NULL;
|
|
|
eCsrRoamBssType LastBSSType;
|
|
|
struct hdd_config *pConfig = NULL;
|
|
|
- QDF_STATUS vstatus;
|
|
|
int status;
|
|
|
|
|
|
ENTER();
|
|
@@ -11430,10 +11430,13 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|
|
hdd_deregister_tx_flow_control(pAdapter);
|
|
|
hdd_debug("Setting interface Type to ADHOC");
|
|
|
}
|
|
|
- vstatus = wlan_hdd_change_client_iface_to_new_mode(ndev,
|
|
|
+ status = wlan_hdd_change_client_iface_to_new_mode(ndev,
|
|
|
type);
|
|
|
- if (vstatus != QDF_STATUS_SUCCESS)
|
|
|
- return -EINVAL;
|
|
|
+ if (status) {
|
|
|
+ hdd_err("Failed to change iface to new mode:%d status %d",
|
|
|
+ type, status);
|
|
|
+ return status;
|
|
|
+ }
|
|
|
if (hdd_start_adapter(pAdapter)) {
|
|
|
hdd_err("Failed to start adapter :%d",
|
|
|
pAdapter->device_mode);
|