From 7ff7fe7d37547459556cc4f3578c9048115eb40e Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Thu, 9 Jan 2020 17:21:56 +0800 Subject: [PATCH] qcacld-3.0: Some AP are missed in Beacon Report response In radio measurement beacon report frame, The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID; otherwise the BSSID field contains a specific BSSID for a single BSS. If BSSID is wildcard BSSID, bssid num should be 0 when use fill scan result filter, or filtered scan result is always empty since wildcard BSSID can't match any normal bssid. Change-Id: Ia172ac8160d0c38ce4c875fc29458c6c8f26c804 CRs-Fixed: 2599634 --- core/sme/src/rrm/sme_rrm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 2aac88bd1509..35b85b62c76d 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020 The Linux Foundation. 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 @@ -450,10 +450,15 @@ static QDF_STATUS sme_rrm_send_scan_result(struct mac_context *mac_ctx, if (!filter) return QDF_STATUS_E_NOMEM; - /* update filter to get scan result with just target BSSID */ - filter->num_of_bssid = 1; - qdf_mem_copy(filter->bssid_list[0].bytes, - rrm_ctx->bssId, sizeof(struct qdf_mac_addr)); + if (qdf_is_macaddr_zero(filter->bssid_list) || + qdf_is_macaddr_group(filter->bssid_list)) { + filter->num_of_bssid = 0; + } else { + /* update filter to get scan result with just target BSSID */ + filter->num_of_bssid = 1; + qdf_mem_copy(filter->bssid_list[0].bytes, + rrm_ctx->bssId, sizeof(struct qdf_mac_addr)); + } if (rrm_ctx->ssId.length) { filter->num_of_ssid = 1;