qcacld-3.0: Add wrapper for blm_get_rssi_blacklist_threshold()

If FEATURE_BLACKLIST_MGR is enabled,
wlan_blm_get_rssi_blacklist_threshold()
would return CFG_BLACKLIST_RSSI_THRESHOLD value
else return value 0.

Change-Id: I0cf5a6561cc217412e3bc6e2a50b85985d1315d7
CRs-Fixed: 2648761
This commit is contained in:
Amruta Kulkarni
2020-03-24 12:06:28 -07:00
committed by nshrivas
parent b4e2c33bab
commit 5da0deb270
4 changed files with 27 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-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
@@ -103,6 +103,21 @@ wlan_blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev,
reject_ap_type);
}
/**
* wlan_blm_get_rssi_blacklist_threshold() - Get the RSSI blacklist threshold
* @pdev: pdev object
*
* This API will get the rssi blacklist threshold value configured via
* CFG_BLACKLIST_RSSI_THRESHOLD.
*
* Return: int32_t (threshold value)
*/
static inline int32_t
wlan_blm_get_rssi_blacklist_threshold(struct wlan_objmgr_pdev *pdev)
{
return blm_get_rssi_blacklist_threshold(pdev);
}
#else
static inline QDF_STATUS
wlan_blm_filter_bssid(struct wlan_objmgr_pdev *pdev, qdf_list_t *scan_list)
@@ -133,5 +148,10 @@ wlan_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev,
{
}
static inline int32_t
wlan_blm_get_rssi_blacklist_threshold(struct wlan_objmgr_pdev *pdev)
{
return 0;
}
#endif
#endif

View File

@@ -41,7 +41,7 @@
#include "lim_ser_des_utils.h"
#include "lim_send_messages.h"
#include "lim_process_fils.h"
#include "wlan_blm_core.h"
#include "wlan_blm_api.h"
/**
* lim_update_stads_htcap() - Updates station Descriptor HT capability
@@ -800,7 +800,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx,
if (!assoc_rsp->rssi_assoc_rej.retry_delay)
ap_info.expected_rssi = assoc_rsp->rssi_assoc_rej.delta_rssi +
WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info) +
blm_get_rssi_blacklist_threshold(mac_ctx->pdev);
wlan_blm_get_rssi_blacklist_threshold(mac_ctx->pdev);
else
ap_info.expected_rssi = assoc_rsp->rssi_assoc_rej.delta_rssi +
WMA_GET_RX_RSSI_NORMALIZED(rx_pkt_info);

View File

@@ -41,7 +41,7 @@
#include "lim_ser_des_utils.h"
#include "lim_send_messages.h"
#include "sch_api.h"
#include "wlan_blm_core.h"
#include "wlan_blm_api.h"
/**
* lim_process_disassoc_frame
@@ -306,7 +306,7 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
ap_info.retry_delay = 0;
ap_info.expected_rssi = frame_rssi +
blm_get_rssi_blacklist_threshold(mac->pdev);
wlan_blm_get_rssi_blacklist_threshold(mac->pdev);
qdf_mem_copy(ap_info.bssid.bytes, pHdr->sa, QDF_MAC_ADDR_SIZE);
lim_add_bssid_to_reject_list(mac->pdev, &ap_info);
}

View File

@@ -80,7 +80,7 @@
#include <wlan_crypto_global_api.h>
#include <cdp_txrx_mon.h>
#include <cdp_txrx_ctrl.h>
#include "wlan_blm_core.h"
#include "wlan_blm_api.h"
#ifdef FEATURE_WLAN_DIAG_SUPPORT /* FEATURE_WLAN_DIAG_SUPPORT */
#include "host_diag_core_log.h"
@@ -1427,7 +1427,7 @@ static QDF_STATUS wma_roam_scan_filter(tp_wma_handle wma_handle,
params->num_ssid_white_list = num_ssid_white_list;
params->num_bssid_preferred_list = num_bssid_preferred_list;
params->num_rssi_rejection_ap = num_rssi_rejection_ap;
params->delta_rssi = blm_get_rssi_blacklist_threshold(wma_handle->pdev);
params->delta_rssi = wlan_blm_get_rssi_blacklist_threshold(wma_handle->pdev);
qdf_mem_copy(params->bssid_avoid_list, roam_params->bssid_avoid_list,
MAX_BSSID_AVOID_LIST * sizeof(struct qdf_mac_addr));