Эх сурвалжийг харах

qcacld-3.0: Add SAP iface number check when iface up

If 3 SAP virtual iface are created first, then up, 3 MLD is
created during 3 vdev created, but 3rd failed to added to
g_mlo_ctx->ml_dev_list for WLAN_UMAC_MLO_MAX_DEV limit, when the vdev
deleted, assert will happen when remove MLD from g_mlo_ctx->ml_dev_list.

To fix it, need avoid the active number of SAP interface exceed
QDF_MAX_NO_OF_SAP_MODE, need add check when up SAP interface.

Change-Id: I0ba78d589dfc3c6351b48d4790e15c7d9da4961c
CRs-Fixed: 3795974
Jianmin Zhu 1 жил өмнө
parent
commit
f5936bf8d8

+ 9 - 0
core/hdd/inc/wlan_hdd_main.h

@@ -5552,4 +5552,13 @@ hdd_lpc_is_work_scheduled(struct hdd_context *hdd_ctx)
 }
 #endif
 
+/**
+ * hdd_allow_new_intf() - Allow new intf created or not
+ * @hdd_ctx: hdd context
+ * @mode: qdf opmode of new interface
+ *
+ * Return: true if allowed, otherwise false
+ */
+bool hdd_allow_new_intf(struct hdd_context *hdd_ctx,
+			enum QDF_OPMODE mode);
 #endif /* end #if !defined(WLAN_HDD_MAIN_H) */

+ 3 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -525,6 +525,9 @@ static int __hdd_hostapd_open(struct net_device *dev)
 		return ret;
 	}
 
+	if (!hdd_allow_new_intf(hdd_ctx, adapter->device_mode))
+		return -EOPNOTSUPP;
+
 	ret = hdd_start_adapter(adapter, true);
 	if (ret) {
 		hdd_err("Error Initializing the AP mode: %d", ret);

+ 2 - 9
core/hdd/src/wlan_hdd_p2p.c

@@ -642,15 +642,8 @@ int hdd_set_p2p_ps(struct net_device *dev, void *msgData)
 	return wlan_hdd_set_power_save(adapter, &noa);
 }
 
-/**
- * hdd_allow_new_intf() - Allow new intf created or not
- * @hdd_ctx: hdd context
- * @mode: qdf opmode of new interface
- *
- * Return: true if allowed, otherwise false
- */
-static bool hdd_allow_new_intf(struct hdd_context *hdd_ctx,
-			       enum QDF_OPMODE mode)
+bool hdd_allow_new_intf(struct hdd_context *hdd_ctx,
+			enum QDF_OPMODE mode)
 {
 	struct hdd_adapter *adapter = NULL;
 	struct hdd_adapter *next_adapter = NULL;