|
@@ -13853,7 +13853,6 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
|
|
|
int ret;
|
|
|
QDF_STATUS qdf_status;
|
|
|
unsigned long rc;
|
|
|
- mac_handle_t mac_handle;
|
|
|
bool roaming_enabled;
|
|
|
|
|
|
hdd_enter_dev(dev);
|
|
@@ -13862,6 +13861,12 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
|
|
|
if (0 != ret)
|
|
|
return ret;
|
|
|
|
|
|
+ if (adapter->device_mode != QDF_STA_MODE) {
|
|
|
+ hdd_err_rl("command not allowed in %d mode, vdev_id: %d",
|
|
|
+ adapter->device_mode, adapter->vdev_id);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
|
|
hdd_err("Command not allowed in FTM mode");
|
|
|
return -EINVAL;
|
|
@@ -13885,6 +13890,11 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
|
|
|
tb[QCA_WLAN_VENDOR_ATTR_ROAMING_POLICY]);
|
|
|
hdd_debug("ROAM_CONFIG: isFastRoamEnabled %d", is_fast_roam_enabled);
|
|
|
|
|
|
+ if (sme_roaming_in_progress(hdd_ctx->mac_handle, adapter->vdev_id)) {
|
|
|
+ hdd_err_rl("Roaming in progress for vdev %d", adapter->vdev_id);
|
|
|
+ return -EAGAIN;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* Get current roaming state and decide whether to wait for RSO_STOP
|
|
|
* response or not.
|
|
@@ -13893,7 +13903,6 @@ static int __wlan_hdd_cfg80211_set_fast_roaming(struct wiphy *wiphy,
|
|
|
adapter->vdev_id);
|
|
|
|
|
|
/* Update roaming */
|
|
|
- mac_handle = hdd_ctx->mac_handle;
|
|
|
qdf_status = ucfg_user_space_enable_disable_rso(hdd_ctx->pdev,
|
|
|
adapter->vdev_id,
|
|
|
is_fast_roam_enabled);
|