Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 372fe9ce authored by Vinod Kumar Myadam's avatar Vinod Kumar Myadam Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: change mode to p2p device for p2p interface

Currently, mode of p2p virtual interface with type managed
is added as sta mode. This may cause issue during p2p find
as in function p2p_vdev_check_valid probe response frames
are dropped for sta mode.

Fix is to convert mode to P2P DEVICE mode from STA mode in
case added interface string contains p2p substring.

Change-Id: I9bf9d8c44af940b42c38cd7819bcdb9c00a90a26
CRs-Fixed: 3036500
parent 262bcac4
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -803,7 +803,10 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
					   name_assign_type, true);
	} else {
		uint8_t *device_address;

		if (strnstr(name, "p2p", 3) && mode == QDF_STA_MODE) {
			hdd_debug("change mode to p2p device");
			mode = QDF_P2P_DEVICE_MODE;
		}
		device_address = wlan_hdd_get_intf_addr(hdd_ctx, mode);
		if (!device_address)
			return ERR_PTR(-EINVAL);