Pārlūkot izejas kodu

qcacld-3.0: Don't allow to disable roaming during roaming

During roaming, if wpa_supplicant disable roaming by driver command
SETROAMMODE or SETFASTROAM, roam sync will fail.

To fix it,  Don't allow to disable roaming by driver command SETROAMMODE
or SETFASTROAM during roaming,  same as QCA_NL80211_VENDOR_SUBCMD_ROAMING.

Change-Id: I48efdb91abffdd7e4879f777be9c53ccab0126f7
CRs-Fixed: 3642788
Jianmin Zhu 1 gadu atpakaļ
vecāks
revīzija
0b8045dbf6
1 mainītis faili ar 15 papildinājumiem un 0 dzēšanām
  1. 15 0
      core/hdd/src/wlan_hdd_ioctl.c

+ 15 - 0
core/hdd/src/wlan_hdd_ioctl.c

@@ -3053,6 +3053,14 @@ static int drv_cmd_set_roam_mode(struct wlan_hdd_link_info *link_info,
 
 	hdd_debug("Received Command to Set Roam Mode = %d",
 		  roam_mode);
+
+	if (sme_roaming_in_progress(hdd_ctx->mac_handle,
+				    link_info->vdev_id)) {
+		hdd_err_rl("Roaming in progress for vdev %d",
+			   link_info->vdev_id);
+		return -EAGAIN;
+	}
+
 	/*
 	 * Note that
 	 *     SETROAMMODE 0 is to enable LFR while
@@ -4370,6 +4378,13 @@ static int drv_cmd_set_fast_roam(struct wlan_hdd_link_info *link_info,
 	hdd_debug("Received Command to change lfr mode = %d",
 		  lfr_mode);
 
+	if (sme_roaming_in_progress(hdd_ctx->mac_handle,
+				    link_info->vdev_id)) {
+		hdd_err_rl("Roaming in progress for vdev %d",
+			   link_info->vdev_id);
+		return -EAGAIN;
+	}
+
 	ucfg_mlme_set_lfr_enabled(hdd_ctx->psoc, (bool)lfr_mode);
 	sme_update_is_fast_roam_ini_feature_enabled(hdd_ctx->mac_handle,
 						    link_info->vdev_id,