qcacld-3.0: Add events to modify Beacon miss disconnection logging

Disconnection is logged even if keepalive indication is
sent to host after firmware sending final beacon miss
event.

Add two new roam failure reason code to indicate roam
failure and send final beacon miss.

ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT: Indicate
roam failure when no ap is found and final beacon miss
is sent.

ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT:
Indicate roam failure when no candidate ap is found and
final beacon miss is sent.

Change-Id: I6d7a6034f8be5388dd35dd3c05fecfd40a8d888d
CRs-Fixed: 3437060
这个提交包含在:
Vijay Raj
2023-03-17 04:02:44 -07:00
提交者 Madan Koyyalamudi
父节点 6156b97c2b
当前提交 72dfd6a38f
修改 4 个文件,包含 69 行新增50 行删除

查看文件

@@ -5740,6 +5740,53 @@ bool wlan_is_valid_frequency(uint32_t freq, uint32_t band_capability,
return true;
}
static
void cm_roam_send_beacon_loss_event(struct wlan_objmgr_psoc *psoc,
struct qdf_mac_addr bssid,
uint8_t vdev_id,
uint8_t trig_reason,
uint8_t is_roam_success,
bool is_full_scan,
uint8_t roam_fail_reason)
{
bool bmiss_skip_full_scan = false;
/*
* When roam trigger reason is Beacon Miss, 2 roam scan
* stats TLV will be received with reason as BMISS.
* 1. First TLV is for partial roam scan data and
* 2. Second TLV is for the full scan data when there is no candidate
* found in the partial scan.
* When bmiss_skip_full_scan flag is disabled, prints for 1 & 2 will be
* seen.
* when bmiss_skip_full_scan flag is enabled, only print for 1st TLV
* will be seen.
*
* 1. BMISS_DISCONN event should be triggered only once for BMISS roam
* trigger if roam result is failure after full scan TLV is received and
* bmiss_skip_full_scan is disabled.
*
* 2. But if bmiss_skip_full_scan is enabled, then trigger
* BMISS_DISCONN event after partial scan TLV is received
*
* 3. In some cases , Keepalive ACK from AP might come after the
* final BMISS and FW can choose to stay connected to the current AP.
* In this case, don't send discon event.
*/
wlan_mlme_get_bmiss_skip_full_scan_value(psoc, &bmiss_skip_full_scan);
if (trig_reason == ROAM_TRIGGER_REASON_BMISS &&
!is_roam_success &&
((!bmiss_skip_full_scan && is_full_scan) ||
(bmiss_skip_full_scan && !is_full_scan)) &&
(roam_fail_reason ==
ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT ||
roam_fail_reason ==
ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT))
cm_roam_beacon_loss_disconnect_event(psoc, bssid, vdev_id);
}
#endif
#if defined(CONNECTIVITY_DIAG_EVENT) && \
@@ -6029,7 +6076,7 @@ void cm_roam_result_info_event(struct wlan_objmgr_psoc *psoc,
{
uint8_t i;
struct qdf_mac_addr bssid = {0};
bool ap_found_in_roam_scan = false, bmiss_skip_full_scan = false;
bool ap_found_in_roam_scan = false;
bool roam_abort = (res->fail_reason == ROAM_FAIL_REASON_SYNC ||
res->fail_reason == ROAM_FAIL_REASON_DISCONNECT ||
res->fail_reason == ROAM_FAIL_REASON_HOST ||
@@ -6105,30 +6152,10 @@ void cm_roam_result_info_event(struct wlan_objmgr_psoc *psoc,
EVENT_WLAN_ROAM_CANCEL);
}
/*
* When roam trigger reason is Beacon Miss, 2 roam scan
* stats TLV will be received with reason as BMISS.
* 1. First TLV is for partial roam scan data and
* 2. Second TLV is for the full scan data when there is no candidate
* found in the partial scan.
* When bmiss_skip_full_scan flag is disabled, prints for 1 & 2 will be
* seen.
* when bmiss_skip_full_scan flag is enabled, only print for 1st TLV
* will be seen.
*
* 1. BMISS_DISCONN event should be triggered only once for BMISS roam
* trigger if roam result is failure after full scan TLV is received and
* bmiss_skip_full_scan is disabled.
*
* 2. But if bmiss_skip_full_scan is enabled, then trigger
* BMISS_DISCONN event after partial scan TLV is received
*/
wlan_mlme_get_bmiss_skip_full_scan_value(psoc, &bmiss_skip_full_scan);
if (trigger->trigger_reason == ROAM_TRIGGER_REASON_BMISS &&
!wlan_diag_event.is_roam_successful &&
((!bmiss_skip_full_scan && is_full_scan) ||
(bmiss_skip_full_scan && !is_full_scan)))
cm_roam_beacon_loss_disconnect_event(psoc, bssid, vdev_id);
cm_roam_send_beacon_loss_event(psoc, bssid, vdev_id,
trigger->trigger_reason,
wlan_diag_event.is_roam_successful,
is_full_scan, res->fail_reason);
}
#elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING) && \
@@ -6393,30 +6420,10 @@ void cm_roam_result_info_event(struct wlan_objmgr_psoc *psoc,
wlan_connectivity_log_enqueue(log_record);
}
/*
* When roam trigger reason is Beacon Miss, 2 roam scan
* stats TLV will be received with reason as BMISS.
* 1. First TLV is for partial roam scan data and
* 2. Second TLV is for the full scan data when there is no candidate
* found in the partial scan.
* When bmiss_skip_full_scan flag is disabled, prints for 1 & 2 will be
* seen.
* when bmiss_skip_full_scan flag is enabled, only print for 1st TLV
* will be seen.
*
* 1. BMISS_DISCONN event should be triggered only once for BMISS roam
* trigger if roam result is failure after full scan TLV is received and
* bmiss_skip_full_scan is disabled.
*
* 2. But if bmiss_skip_full_scan is enabled, then trigger
* BMISS_DISCONN event after partial scan TLV is received
*/
wlan_mlme_get_bmiss_skip_full_scan_value(psoc, &bmiss_skip_full_scan);
if (trigger->trigger_reason == ROAM_TRIGGER_REASON_BMISS &&
!log_record->roam_result.is_roam_successful &&
((!bmiss_skip_full_scan && is_full_scan) ||
(bmiss_skip_full_scan && !is_full_scan)))
cm_roam_beacon_loss_disconnect_event(psoc, bssid, vdev_id);
cm_roam_send_beacon_loss_event(psoc, bssid, vdev_id,
trigger->trigger_reason,
wlan_diag_event.is_roam_successful,
is_full_scan, res->fail_reason);
qdf_mem_free(log_record);
}

查看文件

@@ -415,6 +415,10 @@ enum roam_fail_params {
* timedout
* @ROAM_FAIL_REASON_SAE_PREAUTH_FAIL: SAE preauthentication failure
* @ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO: Start handoff failed
* @ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT: No AP found after
* final BMISS
* @ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT: No Candidate AP
* found after final BMISS.
* @ROAM_FAIL_REASON_UNKNOWN: Default reason
*/
enum wlan_roam_failure_reason_code {
@@ -452,6 +456,8 @@ enum wlan_roam_failure_reason_code {
ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT,
ROAM_FAIL_REASON_SAE_PREAUTH_FAIL,
ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO,
ROAM_FAIL_REASON_NO_AP_FOUND_AND_FINAL_BMISS_SENT,
ROAM_FAIL_REASON_NO_CAND_AP_FOUND_AND_FINAL_BMISS_SENT,
ROAM_FAIL_REASON_UNKNOWN = 255,
};