Jelajahi Sumber

qcacld-3.0: Dont allow max ch width update for MLO connection

If STA connected with MLO AP, don't process ch_width update
with notify request.

Change-Id: Id2e0d6357feac13787abcafe8b9d69a0c64dbedb
CRs-Fixed: 3472173
abhinav kumar 2 tahun lalu
induk
melakukan
3429f8e7c1

+ 7 - 5
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -387,7 +387,8 @@ ucfg_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
 {
 	struct wlan_objmgr_vdev *vdev;
 	QDF_STATUS status;
-	enum QDF_OPMODE mode;
+	enum QDF_OPMODE op_mode;
+	bool is_mlo_vdev;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_MLME_OBJMGR_ID);
@@ -396,10 +397,11 @@ ucfg_mlme_send_ch_width_update_with_notify(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	mode = wlan_vdev_mlme_get_opmode(vdev);
-	if (mode != QDF_STA_MODE) {
-		mlme_legacy_debug("vdev %d: mode %d, CW update not supported",
-				  vdev_id, mode);
+	op_mode = wlan_vdev_mlme_get_opmode(vdev);
+	is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
+	if (op_mode != QDF_STA_MODE || is_mlo_vdev) {
+		mlme_legacy_debug("vdev %d: op mode %d, is_mlo_vdev:%d, CW update not supported",
+				  vdev_id, op_mode, is_mlo_vdev);
 		status = QDF_STATUS_E_NOSUPPORT;
 		goto release;
 	}

+ 2 - 3
core/hdd/src/wlan_hdd_main.c

@@ -17648,10 +17648,9 @@ static void hdd_send_scan_done_complete_cb(uint8_t vdev_id)
 	uint32_t len;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
-	if (!hdd_ctx) {
-		hdd_err("Invalid hdd context");
+	if (!hdd_ctx)
 		return;
-	}
+
 	adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
 	if (!adapter) {
 		hdd_err("No adapter found for vdev id:%d", vdev_id);