Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 026433f6 authored by Srinivas Girigowda's avatar Srinivas Girigowda Committed by Kiet Lam
Browse files

wlan: Fix roaming delay and roaming count in TSM report

Even though there exists a interface between firmware and driver
firmware does not fill roaming delay and count information.
In the original CCX code, these information are updated in
host driver.

Roaming Count:
Roaming count is incremented whenever ASSOC_RSP is received and
the same variable is used to update the TSM Stats before sending
it to supplicant.

Roaming Delay:
Right after association, CCX enabled STA computes roaming delay
as a part of sending Adjacent AP Report. Fix is added to update
roaming delay global variable here.

Change-Id: I80cef3c96bc123f7e933fce87fc015c3a2201d1c
CRs-Fixed: 567792
parent 4ce1cc50
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2527,6 +2527,8 @@ limSendSmePECcxTsmRsp(tpAniSirGlobal pMac, tAniGetTsmStatsRsp *pStats)
    }

    pPeStats->msgType = eWNI_SME_GET_TSM_STATS_RSP;
    pPeStats->tsmMetrics.RoamingCount = pPeSessionEntry->ccxContext.tsm.tsmMetrics.RoamingCount;
    pPeStats->tsmMetrics.RoamingDly = pPeSessionEntry->ccxContext.tsm.tsmMetrics.RoamingDly;

    mmhMsg.type = eWNI_SME_GET_TSM_STATS_RSP;
    mmhMsg.bodyptr = pStats;
+15 −0
Original line number Diff line number Diff line
@@ -9026,15 +9026,30 @@ void csrSendCcxAdjacentApRepInd(tpAniSirGlobal pMac, tCsrRoamSession *pSession)
{
    tANI_U32 roamTS2 = 0;
    tCsrRoamInfo roamInfo;
    tpPESession pSessionEntry = NULL;
    tANI_U8 sessionId = CSR_SESSION_ID_INVALID;
    if (NULL == pSession)
    {
        smsLog(pMac, LOGE, FL("pSession is NULL"));
        return;
    }
    roamTS2 = vos_timer_get_system_time();
    roamInfo.tsmRoamDelay = roamTS2 - pSession->roamTS1;
    smsLog(pMac, LOG1, "Bssid(%02X:%02X:%02X:%02X:%02X:%02X) Roaming Delay(%u ms)",
           pSession->connectedProfile.bssid[0], pSession->connectedProfile.bssid[1],
           pSession->connectedProfile.bssid[2], pSession->connectedProfile.bssid[3],
           pSession->connectedProfile.bssid[4], pSession->connectedProfile.bssid[5],
           roamInfo.tsmRoamDelay);
    pSessionEntry = peFindSessionByBssid(pMac, pSession->connectedProfile.bssid, &sessionId);
    if (NULL == pSessionEntry)
    {
        smsLog(pMac, LOGE, FL("session %d not found"), sessionId);
        return;
    }
    pSessionEntry->ccxContext.tsm.tsmMetrics.RoamingDly = roamInfo.tsmRoamDelay;
    csrRoamCallCallback(pMac, pSession->sessionId, &roamInfo,
                        0, eCSR_ROAM_CCX_ADJ_AP_REPORT_IND, 0);
}