From a0230a65b25cc1c9558e84ffaf092f16aa64ebb0 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Thu, 4 Jan 2018 20:56:57 +0800 Subject: [PATCH] qcacld-3.0: Send BC public action frames on all interfaces Add changes to indicate BC public action frames to all interfaces. Change-Id: I4e4eb80e84be43fa3631092432ae19359b5d4539 CRs-Fixed: 2166996 --- core/hdd/src/wlan_hdd_main.c | 13 +++++++++++++ core/mac/src/pe/lim/lim_p2p.c | 9 ++++++++- core/sme/inc/sme_api.h | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index ad5d15dd5a2f..7c1168ba54c3 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7759,6 +7759,19 @@ void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind) if (adapter) break; } + } else if (SME_SESSION_ID_BROADCAST == frame_ind->sessionId) { + hdd_for_each_adapter(hdd_ctx, adapter) { + if ((NULL != adapter) && + (WLAN_HDD_ADAPTER_MAGIC == adapter->magic)) { + __hdd_indicate_mgmt_frame(adapter, + frame_ind->frame_len, + frame_ind->frameBuf, + frame_ind->frameType, + frame_ind->rxChan, + frame_ind->rxRssi); + } + } + adapter = NULL; } else { adapter = hdd_get_adapter_by_sme_session_id(hdd_ctx, frame_ind->sessionId); diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c index 7d8eda84bbd9..611307624eaf 100644 --- a/core/mac/src/pe/lim/lim_p2p.c +++ b/core/mac/src/pe/lim/lim_p2p.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014,2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014,2016-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -144,6 +144,13 @@ void lim_send_sme_mgmt_frame_ind(tpAniSirGlobal pMac, uint8_t frameType, return; } + if (qdf_is_macaddr_broadcast( + (struct qdf_mac_addr *) pSirSmeMgmtFrame->frameBuf + 4) && + !sessionId) { + pe_debug("Broadcast action frame"); + sessionId = SME_SESSION_ID_BROADCAST; + } + pSirSmeMgmtFrame->frame_len = frameLen; pSirSmeMgmtFrame->sessionId = sessionId; pSirSmeMgmtFrame->frameType = frameType; diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index d390ceac4cc0..6896289f634a 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -78,6 +78,7 @@ #define SME_EXIT() sme_logfl(QDF_TRACE_LEVEL_DEBUG, "exit") #define SME_SESSION_ID_ANY 50 +#define SME_SESSION_ID_BROADCAST 0xFF #define SME_INVALID_COUNTRY_CODE "XX" #define INVALID_ROAM_ID 0