mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
qcacld-3.0: Dump blacklist bssids
Add dump to print blacklisted bssids with reason code and source. Change-Id: I85734ad5aea0c8088e3f8ed2bdbb31971457942d CRs-Fixed: 2849487
This commit is contained in:
parent
218363cf69
commit
622b4795a1
8 changed files with 123 additions and 6 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 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
|
||||
|
|
@ -281,6 +281,14 @@ blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev,
|
|||
uint8_t max_bssid_to_be_filled,
|
||||
enum blm_reject_ap_type reject_ap_type);
|
||||
|
||||
/**
|
||||
* blm_dump_blacklist_bssid - Dump blacklisted bssids
|
||||
* @pdev: pdev object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void blm_dump_blacklist_bssid(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* blm_get_rssi_blacklist_threshold() - Get rssi blacklist threshold value
|
||||
* @pdev: pdev object
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021 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
|
||||
|
|
@ -37,6 +37,8 @@
|
|||
QDF_TRACE_INFO(QDF_MODULE_ID_BLACKLIST_MGR, params)
|
||||
#define blm_debug(params...)\
|
||||
QDF_TRACE_DEBUG(QDF_MODULE_ID_BLACKLIST_MGR, params)
|
||||
#define blm_nofl_debug(params...)\
|
||||
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_BLACKLIST_MGR, params)
|
||||
|
||||
/**
|
||||
* struct blm_pdev_priv_obj - Pdev priv struct to store list of blacklist mgr.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2021 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
|
||||
|
|
@ -733,6 +733,77 @@ blm_fill_rssi_reject_params(struct blm_reject_ap *blm_entry,
|
|||
blm_reject_list->reject_reason);
|
||||
}
|
||||
|
||||
static enum blm_reject_ap_type
|
||||
blm_get_reject_ap_type(struct blm_reject_ap *blm_entry)
|
||||
{
|
||||
if (BLM_IS_AP_AVOIDED_BY_USERSPACE(blm_entry))
|
||||
return USERSPACE_AVOID_TYPE;
|
||||
if (BLM_IS_AP_BLACKLISTED_BY_USERSPACE(blm_entry))
|
||||
return USERSPACE_BLACKLIST_TYPE;
|
||||
if (BLM_IS_AP_AVOIDED_BY_DRIVER(blm_entry))
|
||||
return DRIVER_AVOID_TYPE;
|
||||
if (BLM_IS_AP_BLACKLISTED_BY_DRIVER(blm_entry))
|
||||
return DRIVER_BLACKLIST_TYPE;
|
||||
if (BLM_IS_AP_IN_RSSI_REJECT_LIST(blm_entry))
|
||||
return DRIVER_RSSI_REJECT_TYPE;
|
||||
if (BLM_IS_AP_IN_MONITOR_LIST(blm_entry))
|
||||
return DRIVER_MONITOR_TYPE;
|
||||
|
||||
return REJECT_REASON_UNKNOWN;
|
||||
}
|
||||
|
||||
void blm_dump_blacklist_bssid(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct blm_reject_ap *blm_entry = NULL;
|
||||
qdf_list_node_t *cur_node = NULL, *next_node = NULL;
|
||||
struct blm_pdev_priv_obj *blm_ctx;
|
||||
struct blm_psoc_priv_obj *blm_psoc_obj;
|
||||
uint32_t reject_duration;
|
||||
enum blm_reject_ap_type reject_ap_type;
|
||||
qdf_list_t *reject_db_list;
|
||||
QDF_STATUS status;
|
||||
|
||||
blm_ctx = blm_get_pdev_obj(pdev);
|
||||
blm_psoc_obj = blm_get_psoc_obj(wlan_pdev_get_psoc(pdev));
|
||||
|
||||
if (!blm_ctx || !blm_psoc_obj) {
|
||||
blm_err("blm_ctx or blm_psoc_obj is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
status = qdf_mutex_acquire(&blm_ctx->reject_ap_list_lock);
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
blm_err("failed to acquire reject_ap_list_lock");
|
||||
return;
|
||||
}
|
||||
|
||||
reject_db_list = &blm_ctx->reject_ap_list;
|
||||
qdf_list_peek_front(reject_db_list, &cur_node);
|
||||
while (cur_node) {
|
||||
qdf_list_peek_next(reject_db_list, cur_node, &next_node);
|
||||
|
||||
blm_entry = qdf_container_of(cur_node, struct blm_reject_ap,
|
||||
node);
|
||||
|
||||
reject_ap_type = blm_get_reject_ap_type(blm_entry);
|
||||
|
||||
reject_duration = blm_get_delta_of_bssid(
|
||||
reject_ap_type, blm_entry,
|
||||
&blm_psoc_obj->blm_cfg);
|
||||
|
||||
blm_nofl_debug("BLACKLIST BSSID %pM type %d retry delay %d expected RSSI %d",
|
||||
blm_entry->bssid.bytes,
|
||||
reject_ap_type,
|
||||
reject_duration,
|
||||
blm_entry->rssi_reject_params.expected_rssi);
|
||||
|
||||
cur_node = next_node;
|
||||
next_node = NULL;
|
||||
}
|
||||
|
||||
qdf_mutex_release(&blm_ctx->reject_ap_list_lock);
|
||||
}
|
||||
|
||||
static void blm_fill_reject_list(qdf_list_t *reject_db_list,
|
||||
struct reject_ap_config_params *reject_list,
|
||||
uint8_t *num_of_reject_bssid,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021 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
|
||||
|
|
@ -90,6 +90,18 @@ wlan_blm_get_bssid_reject_list(struct wlan_objmgr_pdev *pdev,
|
|||
reject_ap_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_blm_dump_blcklist_bssid() - dump the blacklisted BSSIDs from BLM
|
||||
* @pdev: pdev object
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline void
|
||||
wlan_blm_dump_blcklist_bssid(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return blm_dump_blacklist_bssid(pdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_blm_get_rssi_blacklist_threshold() - Get the RSSI blacklist threshold
|
||||
* @pdev: pdev object
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ struct blm_rssi_disallow_params {
|
|||
* @DRIVER_BLACKLIST_TYPE: driver wants the AP to be blacklisted.
|
||||
* @DRIVER_RSSI_REJECT_TYPE: driver wants the AP to be in driver rssi reject.
|
||||
* @DRIVER_MONITOR_TYPE: driver wants the AP to be in monitor list.
|
||||
* @REJECT_REASON_UNKNOWN: Rejection reason unknown
|
||||
*/
|
||||
enum blm_reject_ap_type {
|
||||
USERSPACE_AVOID_TYPE = 0,
|
||||
|
|
@ -70,7 +71,8 @@ enum blm_reject_ap_type {
|
|||
DRIVER_AVOID_TYPE = 2,
|
||||
DRIVER_BLACKLIST_TYPE = 3,
|
||||
DRIVER_RSSI_REJECT_TYPE = 4,
|
||||
DRIVER_MONITOR_TYPE = 5
|
||||
DRIVER_MONITOR_TYPE = 5,
|
||||
REJECT_REASON_UNKNOWN = 6,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -105,6 +105,16 @@ ucfg_blm_add_userspace_black_list(struct wlan_objmgr_pdev *pdev,
|
|||
struct qdf_mac_addr *bssid_black_list,
|
||||
uint8_t num_of_bssid);
|
||||
|
||||
/**
|
||||
* ucfg_blm_dump_black_list_ap() - get blacklisted bssid.
|
||||
* @pdev: pdev object
|
||||
*
|
||||
* This API dumps blacklist ap
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_blm_dump_black_list_ap(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* ucfg_blm_update_bssid_connect_params() - Inform the BLM about connect or
|
||||
* disconnect with the current AP.
|
||||
|
|
@ -175,6 +185,10 @@ QDF_STATUS ucfg_blm_psoc_close(struct wlan_objmgr_psoc *psoc)
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_blm_dump_black_list_ap(struct wlan_objmgr_pdev *pdev)
|
||||
{}
|
||||
|
||||
static inline
|
||||
QDF_STATUS
|
||||
ucfg_blm_add_bssid_to_reject_list(struct wlan_objmgr_pdev *pdev,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2021 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
|
||||
|
|
@ -203,6 +203,12 @@ ucfg_blm_add_userspace_black_list(struct wlan_objmgr_pdev *pdev,
|
|||
num_of_bssid);
|
||||
}
|
||||
|
||||
void
|
||||
ucfg_blm_dump_black_list_ap(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
return wlan_blm_dump_blcklist_bssid(pdev);
|
||||
}
|
||||
|
||||
void
|
||||
ucfg_blm_update_bssid_connect_params(struct wlan_objmgr_pdev *pdev,
|
||||
struct qdf_mac_addr bssid,
|
||||
|
|
|
|||
|
|
@ -20791,6 +20791,8 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
|
|||
else if (bssid_hint)
|
||||
bssid = bssid_hint;
|
||||
|
||||
ucfg_blm_dump_black_list_ap(hdd_ctx->pdev);
|
||||
|
||||
if (bssid && hdd_get_adapter_by_macaddr(hdd_ctx, (uint8_t *)bssid)) {
|
||||
hdd_err("adapter exist with same mac address " QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(bssid));
|
||||
|
|
|
|||
Loading…
Reference in a new issue