mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Changes in Protocol Stack logs from numerical values to string
qcacld-2.0 to qcacld-3.0 propagation As a part of logging enhancement,to make logs more interactive, changed pmcstate,scanType etc from numerical values to human readable string in Protocol stack. Change-Id: I589088c2c5fd0afa106a1d0773a2ff525b0dd083 CRs-Fixed: 638916
This commit is contained in:
parent
465560671b
commit
39acb13377
9 changed files with 88 additions and 14 deletions
|
|
@ -309,6 +309,9 @@ typedef enum eStaRateMode {
|
|||
#define IERATE_RATE_MASK 0x7f
|
||||
#define IERATE_IS_BASICRATE(x) ((x) & IERATE_BASICRATE_MASK)
|
||||
|
||||
const char *lim_bss_type_to_string(const uint16_t bss_type);
|
||||
const char *lim_scan_type_to_string(const uint8_t scan_type);
|
||||
|
||||
typedef struct sSirSupportedRates {
|
||||
/*
|
||||
* For Self STA Entry: this represents Self Mode.
|
||||
|
|
|
|||
|
|
@ -238,9 +238,9 @@ lim_process_beacon_frame_no_session(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo)
|
|||
cdf_mem_free(pBeacon);
|
||||
} /* end of (eLIM_MLM_WT_PROBE_RESP_STATE) || (eLIM_MLM_PASSIVE_SCAN_STATE) */
|
||||
else {
|
||||
lim_log(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %d"),
|
||||
lim_log(pMac, LOG1, FL("Rcvd Beacon in unexpected MLM state %s (%d)"),
|
||||
lim_mlm_state_str(pMac->lim.gLimMlmState),
|
||||
pMac->lim.gLimMlmState);
|
||||
lim_print_mlm_state(pMac, LOG1, pMac->lim.gLimMlmState);
|
||||
#ifdef WLAN_DEBUG
|
||||
pMac->lim.gLimUnexpBcnCnt++;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1396,11 +1396,12 @@ static void __lim_process_sme_scan_req(tpAniSirGlobal mac_ctx,
|
|||
|
||||
scan_req = (tpSirSmeScanReq) msg_buf;
|
||||
lim_log(mac_ctx, LOG1,
|
||||
FL("SME SCAN REQ id %d numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %d rsp %d"),
|
||||
FL("SME SCAN REQ id %d numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %s (%d) rsp %d"),
|
||||
scan_req->scan_id, scan_req->channelList.numChannels,
|
||||
scan_req->minChannelTime, scan_req->maxChannelTime,
|
||||
scan_req->uIEFieldLen, scan_req->returnAfterFirstMatch,
|
||||
scan_req->returnFreshResults, scan_req->returnUniqueResults,
|
||||
lim_scan_type_to_string(scan_req->scanType),
|
||||
scan_req->scanType, mac_ctx->lim.gLimRspReqd ? 1 : 0);
|
||||
/*
|
||||
* Since scan req always requires a response, we will overwrite response
|
||||
|
|
|
|||
|
|
@ -388,7 +388,8 @@ lim_is_sme_start_bss_req_valid(tpAniSirGlobal mac_ctx,
|
|||
tSirMacRateSet *opr_rates = &start_bss_req->operationalRateSet;
|
||||
|
||||
PELOG1(lim_log(mac_ctx, LOG1,
|
||||
FL("Parsed START_BSS_REQ fields are bssType=%d, channelId=%d, SSID len=%d, rsnIE len=%d, nwType=%d, rateset len=%d"),
|
||||
FL("Parsed START_BSS_REQ fields are bssType=%s (%d), channelId=%d, SSID len=%d, rsnIE len=%d, nwType=%d, rateset len=%d"),
|
||||
lim_bss_type_to_string(start_bss_req->bssType),
|
||||
start_bss_req->bssType, start_bss_req->channelId,
|
||||
start_bss_req->ssId.length, start_bss_req->rsnIE.length,
|
||||
start_bss_req->nwType, opr_rates->numRates);)
|
||||
|
|
|
|||
|
|
@ -7158,3 +7158,40 @@ lim_get_80Mhz_center_channel(uint8_t primary_channel)
|
|||
|
||||
return INVALID_CHANNEL_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_scan_type_to_string(): converts scan type enum to string.
|
||||
* @scan_type: enum value of scan_type.
|
||||
*
|
||||
* Return: Printable string for scan_type
|
||||
*/
|
||||
const char *lim_scan_type_to_string(const uint8_t scan_type)
|
||||
{
|
||||
switch (scan_type) {
|
||||
CASE_RETURN_STRING(eSIR_PASSIVE_SCAN);
|
||||
CASE_RETURN_STRING(eSIR_ACTIVE_SCAN);
|
||||
CASE_RETURN_STRING(eSIR_BEACON_TABLE);
|
||||
default:
|
||||
return "Unknown scan_type";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lim_bss_type_to_string(): converts bss type enum to string.
|
||||
* @bss_type: enum value of bss_type.
|
||||
*
|
||||
* Return: Printable string for bss_type
|
||||
*/
|
||||
const char *lim_bss_type_to_string(const uint16_t bss_type)
|
||||
{
|
||||
switch (bss_type) {
|
||||
CASE_RETURN_STRING(eSIR_INFRASTRUCTURE_MODE);
|
||||
CASE_RETURN_STRING(eSIR_INFRA_AP_MODE);
|
||||
CASE_RETURN_STRING(eSIR_IBSS_MODE);
|
||||
CASE_RETURN_STRING(eSIR_BTAMP_STA_MODE);
|
||||
CASE_RETURN_STRING(eSIR_BTAMP_AP_MODE);
|
||||
CASE_RETURN_STRING(eSIR_AUTO_MODE);
|
||||
default:
|
||||
return "Unknown bss_type";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -819,6 +819,7 @@ CDF_STATUS sme_modify_add_ie(tHalHandle hHal,
|
|||
CDF_STATUS sme_update_add_ie(tHalHandle hHal,
|
||||
tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
|
||||
CDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
|
||||
const char *sme_request_type_to_string(const uint8_t request_type);
|
||||
CDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
|
||||
bool disablefwd);
|
||||
uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal);
|
||||
|
|
|
|||
|
|
@ -7143,7 +7143,8 @@ CDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
|
|||
/* Initialize the count before proceeding with the Join requests */
|
||||
pSession->join_bssid_count = 0;
|
||||
sms_log(pMac, LOG1,
|
||||
FL("called BSSType = %d authtype = %d encryType = %d"),
|
||||
FL("called BSSType = %s (%d) authtype = %d encryType = %d"),
|
||||
lim_bss_type_to_string(pProfile->BSSType),
|
||||
pProfile->BSSType, pProfile->AuthType.authType[0],
|
||||
pProfile->EncryptionType.encryptionType[0]);
|
||||
csr_roam_cancel_roaming(pMac, sessionId);
|
||||
|
|
@ -7325,7 +7326,8 @@ csr_roam_reassoc(tpAniSirGlobal mac_ctx, uint32_t session_id,
|
|||
return CDF_STATUS_E_FAILURE;
|
||||
}
|
||||
sms_log(mac_ctx, LOG1,
|
||||
FL("called BSSType = %d authtype = %d encryType = %d"),
|
||||
FL("called BSSType = %s (%d) authtype = %d encryType = %d"),
|
||||
lim_bss_type_to_string(profile->BSSType),
|
||||
profile->BSSType, profile->AuthType.authType[0],
|
||||
profile->EncryptionType.encryptionType[0]);
|
||||
csr_roam_cancel_roaming(mac_ctx, session_id);
|
||||
|
|
|
|||
|
|
@ -4861,11 +4861,15 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
|
|||
pScanReqParam->fUniqueResult, pScanReqParam->freshScan,
|
||||
pScanReqParam->hiddenSsid);
|
||||
sms_log(pMac, LOG1,
|
||||
FL("scanType = %u BSSType = %u numOfSSIDs = %d"
|
||||
" numOfChannels = %d requestType = %d p2pSearch = %d\n"),
|
||||
pScanReq->scanType, pScanReq->BSSType,
|
||||
FL("scanType = %s (%u) BSSType = %s (%u) numOfSSIDs = %d"
|
||||
" numOfChannels = %d requestType = %s (%d) p2pSearch = %d\n"),
|
||||
lim_scan_type_to_string(pScanReq->scanType),
|
||||
pScanReq->scanType,
|
||||
lim_bss_type_to_string(pScanReq->BSSType),
|
||||
pScanReq->BSSType,
|
||||
pScanReq->SSIDs.numOfSSIDs,
|
||||
pScanReq->ChannelInfo.numOfChannels,
|
||||
sme_request_type_to_string(pScanReq->requestType),
|
||||
pScanReq->requestType, pScanReq->p2pSearch);
|
||||
return CDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
|
@ -5006,10 +5010,12 @@ CDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
|
|||
|
||||
send_scan_req:
|
||||
sms_log(pMac, LOG1,
|
||||
FL("scanId %d domainIdCurrent %d scanType %d bssType %d requestType %d numChannels %d"),
|
||||
pMsg->scan_id, pMac->scan.domainIdCurrent, pMsg->scanType,
|
||||
pMsg->bssType, pScanReq->requestType,
|
||||
pMsg->channelList.numChannels);
|
||||
FL("scanId %d domainIdCurrent %d scanType %s (%d) bssType %s (%d) requestType %s (%d) numChannels %d"),
|
||||
pMsg->scan_id, pMac->scan.domainIdCurrent,
|
||||
lim_scan_type_to_string(pMsg->scanType), pMsg->scanType,
|
||||
lim_bss_type_to_string(pMsg->bssType), pMsg->bssType,
|
||||
sme_request_type_to_string(pScanReq->requestType),
|
||||
pScanReq->requestType, pMsg->channelList.numChannels);
|
||||
|
||||
for (i = 0; i < pMsg->channelList.numChannels; i++) {
|
||||
sms_log(pMac, LOG1, FL("channelNumber[%d]= %d"), i,
|
||||
|
|
@ -5256,7 +5262,9 @@ static void csr_scan_copy_request_valid_channels_only(tpAniSirGlobal mac_ctx,
|
|||
) {
|
||||
#ifdef FEATURE_WLAN_LFR
|
||||
sms_log(mac_ctx, LOG2,
|
||||
FL(" reqType=%d, numOfChannels=%d, ignoring DFS channel %d"),
|
||||
FL(" reqType= %s (%d), numOfChannels=%d, ignoring DFS channel %d"),
|
||||
sme_request_type_to_string(
|
||||
src_req->requestType),
|
||||
src_req->requestType,
|
||||
src_req->ChannelInfo.numOfChannels,
|
||||
src_req->ChannelInfo.ChannelList
|
||||
|
|
|
|||
|
|
@ -5561,6 +5561,27 @@ bool csr_is_channel_present_in_list(uint8_t *pChannelList,
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_request_type_to_string(): converts scan request enum to string.
|
||||
* @request_type: scan request type enum.
|
||||
*
|
||||
* Return: Printable string for request_type
|
||||
*/
|
||||
const char *sme_request_type_to_string(const uint8_t request_type)
|
||||
{
|
||||
switch (request_type) {
|
||||
CASE_RETURN_STRING(eCSR_SCAN_REQUEST_11D_SCAN);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_REQUEST_FULL_SCAN);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_IDLE_MODE_SCAN);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_HO_PROBE_SCAN);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_P2P_DISCOVERY);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_SOFTAP_CHANNEL_RANGE);
|
||||
CASE_RETURN_STRING(eCSR_SCAN_P2P_FIND_PEER);
|
||||
default:
|
||||
return "Unknown Scan Request Type";
|
||||
}
|
||||
}
|
||||
|
||||
CDF_STATUS csr_add_to_channel_list_front(uint8_t *pChannelList,
|
||||
int numChannels, uint8_t channel)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue