diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index 3ceaecc1449c8..b1056bb77ba61 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -1267,9 +1267,8 @@ lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr, } /*Delete the PE session created */ - if (pe_session != NULL) { + if (pe_session && LIM_IS_STA_ROLE(pe_session)) pe_delete_session(mac, pe_session); - } lim_send_sme_disassoc_deauth_ntf(mac, QDF_STATUS_SUCCESS, (uint32_t *) pMsg); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index c8f241b0266ba..d382765c005a0 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -845,7 +845,14 @@ QDF_STATUS wlansap_modify_acl(struct sap_context *sap_ctx, "%s: Invalid SAP Context", __func__); return QDF_STATUS_E_FAULT; } - + if (qdf_mem_cmp(sap_ctx->bssid.bytes, peer_sta_mac, + QDF_MAC_ADDR_SIZE) == 0) { + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, + "requested peer mac is" MAC_ADDRESS_STR + "our own SAP BSSID. Do not blacklist or whitelist this BSSID", + MAC_ADDR_ARRAY(peer_sta_mac)); + return QDF_STATUS_E_FAULT; + } QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_LOW, "Modify ACL entered\n" "Before modification of ACL\n" "size of accept and deny lists %d %d", sap_ctx->nAcceptMac,