Просмотр исходного кода

qcacld-3.0: Check CFG_TGT_DEFAULT_MAX_STA_VDEVS for P2P-CLI mode

In FW CFG_TGT_DEFAULT_MAX_STA_VDEVS considers total no of
STA and P2P-CLI vdevs. Enable CFG_TGT_DEFAULT_MAX_STA_VDEVS
check for P2P-CLI mode.

Change-Id: Ic21cf39628e7ad19102b040ffdf493a14205043a
CRs-Fixed: 2680645
Nirav Shah 4 лет назад
Родитель
Сommit
f8dec49049
1 измененных файлов с 10 добавлено и 6 удалено
  1. 10 6
      core/hdd/src/wlan_hdd_main.c

+ 10 - 6
core/hdd/src/wlan_hdd_main.c

@@ -6000,12 +6000,17 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
 				return NULL;
 			}
 		}
-		/* Check for max no of supported VDEVs before creating
-		 * another one.
+
+	/* fall through */
+	case QDF_P2P_CLIENT_MODE:
+
+		/* Check for max no of supported STA/P2PCLI VDEVs before
+		 * creating another one.
 		 */
-		intf_count = hdd_get_mode_specific_interface_count(
-								hdd_ctx,
-								session_type);
+		intf_count += hdd_get_mode_specific_interface_count(hdd_ctx,
+							QDF_STA_MODE);
+		intf_count += hdd_get_mode_specific_interface_count(hdd_ctx,
+							QDF_P2P_CLIENT_MODE);
 		if (CFG_TGT_DEFAULT_MAX_STA_VDEVS &&
 		    (intf_count >= CFG_TGT_DEFAULT_MAX_STA_VDEVS)) {
 			hdd_err("Max limit reached sta vdev-current %d max %d",
@@ -6014,7 +6019,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
 		}
 
 	/* fall through */
-	case QDF_P2P_CLIENT_MODE:
 	case QDF_P2P_DEVICE_MODE:
 	case QDF_OCB_MODE:
 	case QDF_NDI_MODE: