소스 검색

qcacld-3.0: Reject reassoc to AP that connected on other vdev

In Dual station case, reassociate to AP which is connected on other
vdev is not supported, and will get roam invoke failure from target.
Disallow the bssid reassocaite by checking the connected vdev.

Change-Id: I4533cf8b633cec9ddebff946248dbacf8eab169d
CRs-Fixed: 2868221
Liangwei Dong 4 년 전
부모
커밋
34cdb77ca8
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      core/hdd/src/wlan_hdd_ioctl.c

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

@@ -574,6 +574,7 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	int ret = 0;
 	QDF_STATUS status;
+	uint8_t connected_vdev;
 
 	if (!hdd_ctx) {
 		hdd_err("Invalid hdd ctx");
@@ -622,6 +623,14 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid,
 		ret = -EINVAL;
 		goto exit;
 	}
+	if (wlan_get_connected_vdev_by_bssid(hdd_ctx->pdev, (uint8_t *)bssid,
+					     &connected_vdev) &&
+	    connected_vdev != adapter->vdev_id) {
+		hdd_err("bssid "QDF_MAC_ADDR_FMT" connected by other vdev %d",
+			QDF_MAC_ADDR_REF(bssid), connected_vdev);
+		ret = -EPERM;
+		goto exit;
+	}
 
 	/* Proceed with reassoc */
 	if (roaming_offload_enabled(hdd_ctx)) {