diff options
| author | Nishank Aggarwal <naggar@codeaurora.org> | 2017-04-03 16:22:51 +0530 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-04-06 14:10:58 -0700 |
| commit | f067978150976cf58256fd2a3862d0bf929163a3 (patch) | |
| tree | c517a1c00d93abbeb3e0d2b0b5a52b542d10bcfb | |
| parent | 122872deb4116aff49e76dd37702d55340a5534f (diff) | |
qcacld-3.0: Fix kernel checkpatch warnings in csr_inside_api.h
Fix kernel checkpatch warnings in csr_inside_api.h
Change-Id: Ie7f630e7457356631fddf1e6ce6b0b0f312f5f58
CRs-Fixed: 2025503
| -rw-r--r-- | core/sme/src/common/sme_api.c | 4 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 66 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_scan.c | 228 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_inside_api.h | 769 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_neighbor_roam.c | 3 |
5 files changed, 601 insertions, 469 deletions
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 52d46f5a40c8..d79fdd7ee149 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -17361,7 +17361,7 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, tCsrScanResultFilter *scan_filter; tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); tSirBssDescription *bss_descp; - tScanResultList *bss_list; + struct scan_result_list *bss_list; uint32_t ie_len; scan_filter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); @@ -17397,7 +17397,7 @@ QDF_STATUS sme_get_beacon_frm(tHalHandle hal, tCsrRoamProfile *profile, goto free_scan_flter; } - bss_list = (tScanResultList *)result_handle; + bss_list = (struct scan_result_list *)result_handle; bss_descp = csr_get_fst_bssdescr_ptr(bss_list); if (!bss_descp) { sme_err("unable to fetch bss descriptor"); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index cfb2a2515f94..45a853cca44f 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -178,7 +178,7 @@ static const uint8_t csr_start_ibss_channels24[CSR_NUM_IBSS_START_CHANNELS_24] = { 1, 6, 11 }; static void init_config_param(tpAniSirGlobal pMac); static bool csr_roam_process_results(tpAniSirGlobal pMac, tSmeCmd *pCommand, - eCsrRoamCompleteResult Result, + enum csr_roamcomplete_result Result, void *Context); static QDF_STATUS csr_roam_start_ibss(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, @@ -4873,7 +4873,8 @@ QDF_STATUS csr_roam_set_bss_config_cfg(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig, - tDot11fBeaconIEs *pIes, bool resetCountry) + tDot11fBeaconIEs + *pIes, bool resetCountry) { tSirRetStatus status; uint32_t cfgCb = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; @@ -5255,18 +5256,18 @@ static void csr_set_abort_roaming_command(tpAniSirGlobal pMac, */ static bool csr_roam_select_bss(tpAniSirGlobal mac_ctx, tListElem *roam_bss_entry, tCsrScanResultInfo **csr_result_info, - tCsrScanResult **csr_scan_result, uint32_t session_id, - uint32_t roam_id, eCsrJoinState *roam_state, - tScanResultList *bss_list) + struct tag_csrscan_result **csr_scan_result, uint32_t + session_id, uint32_t roam_id, eCsrJoinState *roam_state, + struct scan_result_list *bss_list) { uint8_t conc_channel = 0; bool status = false; - tCsrScanResult *scan_result = NULL; + struct tag_csrscan_result *scan_result = NULL; tCsrScanResultInfo *result = NULL; while (roam_bss_entry) { - scan_result = GET_BASE_ADDR(roam_bss_entry, tCsrScanResult, - Link); + scan_result = GET_BASE_ADDR(roam_bss_entry, struct + tag_csrscan_result, Link); /* * If concurrency enabled take the * concurrent connected channel first. @@ -5324,7 +5325,7 @@ static bool csr_roam_select_bss(tpAniSirGlobal mac_ctx, static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, uint32_t session_id, tSmeCmd *cmd, tCsrRoamInfo *roam_info_ptr, eCsrJoinState *roam_state, tCsrScanResultInfo *result, - tCsrScanResult *scan_result) + struct tag_csrscan_result *scan_result) { #ifndef WLAN_MDM_CODE_REDUCTION_OPT uint8_t acm_mask = 0; @@ -5413,7 +5414,7 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, * they are used in csr_is_same_profile */ scan_result = GET_BASE_ADDR(cmd->u.roamCmd.pRoamBssEntry, - tCsrScanResult, Link); + struct tag_csrscan_result, Link); /* * The OSEN IE doesn't provide the cipher suite.Therefore set * to constant value of AES @@ -5503,10 +5504,10 @@ static void csr_roam_join_handle_profile(tpAniSirGlobal mac_ctx, static eCsrJoinState csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, bool use_same_bss) { - tCsrScanResult *scan_result = NULL; + struct tag_csrscan_result *scan_result = NULL; eCsrJoinState roam_state = eCsrStopRoaming; - tScanResultList *bss_list = - (tScanResultList *) cmd->u.roamCmd.hBSSList; + struct scan_result_list *bss_list = + (struct scan_result_list *) cmd->u.roamCmd.hBSSList; bool done = false; tCsrRoamInfo roam_info, *roam_info_ptr = NULL; uint32_t session_id = cmd->sessionId; @@ -5678,7 +5679,7 @@ QDF_STATUS csr_process_ft_reassoc_roam_command(tpAniSirGlobal pMac, { uint32_t sessionId; tCsrRoamSession *pSession; - tCsrScanResult *pScanResult = NULL; + struct tag_csrscan_result *pScanResult = NULL; tSirBssDescription *pBssDesc = NULL; QDF_STATUS status = QDF_STATUS_SUCCESS; @@ -5699,7 +5700,7 @@ QDF_STATUS csr_process_ft_reassoc_roam_command(tpAniSirGlobal pMac, if (pCommand->u.roamCmd.pRoamBssEntry) { pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, - tCsrScanResult, Link); + struct tag_csrscan_result, Link); pBssDesc = &pScanResult->Result.BssDescriptor; } else { /* the roaming is cancelled. Simply complete the command */ @@ -5921,7 +5922,7 @@ void csr_reinit_wm_status_change_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) 0); } -void csr_roam_complete(tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, +void csr_roam_complete(tpAniSirGlobal pMac, enum csr_roamcomplete_result Result, void *Context) { tListElem *pEntry; @@ -6364,7 +6365,8 @@ static void csr_roam_copy_ht_profile(tCsrRoamHTProfile *dst_profile, * Return: None */ static void csr_roam_process_results_default(tpAniSirGlobal mac_ctx, - tSmeCmd *cmd, void *context, eCsrRoamCompleteResult res) + tSmeCmd *cmd, void *context, enum csr_roamcomplete_result + res) { uint32_t session_id = cmd->sessionId; tCsrRoamSession *session; @@ -6574,7 +6576,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, tSirBssDescription *bss_desc = NULL; tCsrRoamInfo roam_info; tSirSmeStartBssRsp *start_bss_rsp = NULL; - tCsrScanResult *scan_res = NULL; + struct tag_csrscan_result *scan_res = NULL; eRoamCmdStatus roam_status; eCsrRoamResult roam_result; tDot11fBeaconIEs *ies_ptr = NULL; @@ -6772,7 +6774,7 @@ static void csr_roam_process_start_bss_success(tpAniSirGlobal mac_ctx, * Return: None */ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, - eCsrRoamCompleteResult res, tSmeCmd *cmd, void *context) + enum csr_roamcomplete_result res, tSmeCmd *cmd, void *context) { tSirMacAddr bcast_mac = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; sme_QosAssocInfo assoc_info; @@ -6782,7 +6784,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, tCsrRoamProfile *profile = &cmd->u.roamCmd.roamProfile; tCsrRoamSession *session; tSirBssDescription *bss_desc = NULL; - tCsrScanResult *scan_res = NULL; + struct tag_csrscan_result *scan_res = NULL; sme_qos_csr_event_indType ind_qos; #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH tSirSmeHTProfile *src_profile = NULL; @@ -6852,7 +6854,7 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, } else { if (cmd->u.roamCmd.pRoamBssEntry) { scan_res = GET_BASE_ADDR(cmd->u.roamCmd.pRoamBssEntry, - tCsrScanResult, Link); + struct tag_csrscan_result, Link); if (scan_res != NULL) { bss_desc = &scan_res->Result.BssDescriptor; ies_ptr = (tDot11fBeaconIEs *) @@ -7166,7 +7168,8 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, * Return: true if the command can be released, else not. */ static bool csr_roam_process_results(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, - eCsrRoamCompleteResult res, void *context) + enum csr_roamcomplete_result res, + void *context) { bool release_cmd = true; tSirBssDescription *bss_desc = NULL; @@ -8905,7 +8908,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, { tListElem *entry = csr_ll_peek_head(&mac_ctx->sme.smeCmdActiveList, LL_ACCESS_LOCK); - tCsrScanResult *scan_result = NULL; + struct tag_csrscan_result *scan_result = NULL; tSirBssDescription *bss_desc = NULL; tSmeCmd *cmd = NULL; uint32_t session_id; @@ -8974,7 +8977,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, */ if (cmd->u.roamCmd.pRoamBssEntry) { scan_result = GET_BASE_ADDR(cmd->u.roamCmd.pRoamBssEntry, - tCsrScanResult, + struct tag_csrscan_result, Link); bss_desc = &scan_result->Result.BssDescriptor; } @@ -9097,7 +9100,7 @@ csr_roaming_state_config_cnf_processor(tpAniSirGlobal mac_ctx, static void csr_roam_roaming_state_reassoc_rsp_processor(tpAniSirGlobal pMac, tpSirSmeJoinRsp pSmeJoinRsp) { - eCsrRoamCompleteResult result; + enum csr_roamcomplete_result result; tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[pSmeJoinRsp->sessionId]; tCsrRoamInfo roamInfo; @@ -9191,7 +9194,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(tpAniSirGlobal pMac, static void csr_roam_roaming_state_stop_bss_rsp_processor(tpAniSirGlobal pMac, tSirSmeRsp *pSmeRsp) { - eCsrRoamCompleteResult result_code = eCsrNothingToJoin; + enum csr_roamcomplete_result result_code = eCsrNothingToJoin; tCsrRoamProfile *profile; #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR @@ -9529,7 +9532,7 @@ static void csr_roam_roaming_state_start_bss_rsp_processor(tpAniSirGlobal pMac, tSirSmeStartBssRsp * pSmeStartBssRsp) { - eCsrRoamCompleteResult result; + enum csr_roamcomplete_result result; if (eSIR_SME_SUCCESS == pSmeStartBssRsp->statusCode) { sme_debug("SmeStartBssReq Successful"); @@ -13708,7 +13711,7 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, QDF_STATUS status = QDF_STATUS_E_FAILURE; tCsrScanResultFilter *pScanFilter = NULL; tListElem *pEntry; - tCsrScanResult *pResult; + struct tag_csrscan_result *pResult; tDot11fBeaconIEs *pIes; bool fMatch; @@ -13768,7 +13771,8 @@ csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, csr_ll_lock(&pMac->scan.scanResultList); pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { - pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pResult = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pIes = (tDot11fBeaconIEs *) (pResult->Result.pvIes); fMatch = csr_match_bss(pMac, &pResult->Result.BssDescriptor, pScanFilter, NULL, NULL, NULL, &pIes); @@ -19388,7 +19392,7 @@ bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx, uint32_t session_id) { tCsrRoamSession *sta_session; - tScanResultList *bss_list; + struct scan_result_list *bss_list; if (NULL == mac_ctx) return false; @@ -19399,7 +19403,7 @@ bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx, /* Release the memory allocated by previous join request */ bss_list = - (tScanResultList *)&sta_session->stored_roam_profile. + (struct scan_result_list *)&sta_session->stored_roam_profile. bsslist_handle; if (NULL != bss_list) { csr_scan_result_purge(mac_ctx, diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 1c9bf2ad07e2..2a3720e57728 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -128,7 +128,8 @@ static void csr_release_scan_cmd_pending_list(tpAniSirGlobal pMac) } /* pResult is invalid calling this function. */ -void csr_free_scan_result_entry(tpAniSirGlobal pMac, tCsrScanResult *pResult) +void csr_free_scan_result_entry(tpAniSirGlobal pMac, struct tag_csrscan_result + *pResult) { if (NULL != pResult->Result.pvIes) qdf_mem_free(pResult->Result.pvIes); @@ -141,12 +142,13 @@ static QDF_STATUS csr_ll_scan_purge_result(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; tListElem *pEntry; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; csr_ll_lock(pList); while ((pEntry = csr_ll_remove_head(pList, LL_ACCESS_NOLOCK)) != NULL) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); csr_free_scan_result_entry(pMac, pBssDesc); } @@ -1258,9 +1260,9 @@ QDF_STATUS csr_scan_handle_search_for_ssid_failure(tpAniSirGlobal pMac, qdf_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); pRoamInfo = &roamInfo; if (pCommand->u.roamCmd.pRoamBssEntry) { - tCsrScanResult *pScanResult = GET_BASE_ADDR( + struct tag_csrscan_result *pScanResult = GET_BASE_ADDR( pCommand->u.roamCmd.pRoamBssEntry, - tCsrScanResult, Link); + struct tag_csrscan_result, Link); roamInfo.pBssDesc = &pScanResult->Result.BssDescriptor; } roamInfo.statusCode = pSession->joinFailStatusCode.statusCode; @@ -1286,7 +1288,8 @@ QDF_STATUS csr_scan_result_purge(tpAniSirGlobal pMac, tScanResultHandle hScanList) { QDF_STATUS status = QDF_STATUS_E_INVAL; - tScanResultList *pScanList = (tScanResultList *) hScanList; + struct scan_result_list *pScanList = + (struct scan_result_list *) hScanList; if (pScanList) { status = csr_ll_scan_purge_result(pMac, &pScanList->List); @@ -1310,13 +1313,14 @@ void csr_remove_bssid_from_scan_list(tpAniSirGlobal mac_ctx, tSirMacAddr bssid) { tListElem *entry, *free_elem; - tCsrScanResult *bss_desc; + struct tag_csrscan_result *bss_desc; tDblLinkList *list = &mac_ctx->scan.scanResultList; csr_ll_lock(list); entry = csr_ll_peek_head(list, LL_ACCESS_NOLOCK); while (entry != NULL) { - bss_desc = GET_BASE_ADDR(entry, tCsrScanResult, Link); + bss_desc = GET_BASE_ADDR(entry, struct tag_csrscan_result, + Link); if (!qdf_mem_cmp(bss_desc->Result.BssDescriptor.bssId, bssid, sizeof(tSirMacAddr))) { free_elem = entry; @@ -1535,7 +1539,8 @@ static uint32_t csr_get_bss_cap_value(tpAniSirGlobal pMac, * false, if bss2 is better than bss1. */ static bool csr_is_better_rssi(tpAniSirGlobal mac_ctx, - tCsrScanResult *bss1, tCsrScanResult *bss2) + struct tag_csrscan_result *bss1, struct tag_csrscan_result + *bss2) { bool ret; int rssi1, rssi2; @@ -1579,7 +1584,7 @@ static bool csr_is_better_rssi(tpAniSirGlobal mac_ctx, * false, if bss2 is better than bss1. */ static bool csr_is_better_bss(tpAniSirGlobal mac_ctx, - tCsrScanResult *bss1, tCsrScanResult *bss2) + struct tag_csrscan_result *bss1, struct tag_csrscan_result *bss2) { bool ret; @@ -1607,7 +1612,7 @@ static bool csr_is_better_bss(tpAniSirGlobal mac_ctx, /* Add the channel to the occupiedChannels array */ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac, - tCsrScanResult *pResult, + struct tag_csrscan_result *pResult, uint8_t sessionId, tCsrChannel *occupied_ch, tDot11fBeaconIEs *pIes, @@ -1645,7 +1650,8 @@ static void csr_scan_add_to_occupied_channels(tpAniSirGlobal pMac, /* Put the BSS into the scan result list */ /* pIes can not be NULL */ -static void csr_scan_add_result(tpAniSirGlobal pMac, tCsrScanResult *pResult, +static void csr_scan_add_result(tpAniSirGlobal pMac, struct tag_csrscan_result + *pResult, tDot11fBeaconIEs *pIes, uint32_t sessionId) { tpCsrNeighborRoamControlInfo pNeighborRoamInfo = @@ -1683,13 +1689,14 @@ csr_parser_scan_result_for_5ghz_preference(tpAniSirGlobal pMac, QDF_STATUS status; tListElem *pEntry; tDot11fBeaconIEs *pIes; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; uint8_t i = 0; /* Find out the best AP Rssi going thru the scan results */ pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (NULL != pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); fMatch = false; for (i = 0; pFilter && (i < pFilter->SSIDs.numOfSSIDs); i++) { @@ -1761,7 +1768,7 @@ static void csr_prefer_5ghz(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter) { tListElem *pEntry; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; struct roam_ext_params *roam_params = NULL; if (!pMac->roam.configParam.nSelect5GHzMargin && @@ -1797,7 +1804,8 @@ csr_prefer_5ghz(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter) pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (NULL != pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct + tag_csrscan_result, Link); /* * re-assign preference value based on modified * rssi bucket (or) 5G Preference feature. @@ -1826,7 +1834,7 @@ csr_prefer_5ghz(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter) static QDF_STATUS csr_save_ies(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter, - tCsrScanResult *pBssDesc, + struct tag_csrscan_result *pBssDesc, tDot11fBeaconIEs **pNewIes, bool *fMatch, eCsrEncryptionType *uc, @@ -1881,27 +1889,27 @@ static QDF_STATUS csr_save_scan_entry(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter, bool fMatch, - tCsrScanResult *pBssDesc, + struct tag_csrscan_result *pBssDesc, tDot11fBeaconIEs *pNewIes, - tScanResultList *pRetList, + struct scan_result_list *pRetList, uint32_t *count, eCsrEncryptionType uc, eCsrEncryptionType mc, eCsrAuthType *auth) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tCsrScanResult *pResult; + struct tag_csrscan_result *pResult; uint32_t bssLen, allocLen; /* To sort the list */ tListElem *pTmpEntry; - tCsrScanResult *pTmpResult; + struct tag_csrscan_result *pTmpResult; if (!(NULL == pFilter || fMatch)) return status; bssLen = pBssDesc->Result.BssDescriptor.length + sizeof(pBssDesc->Result.BssDescriptor.length); - allocLen = sizeof(tCsrScanResult) + bssLen; + allocLen = sizeof(struct tag_csrscan_result) + bssLen; pResult = qdf_mem_malloc(allocLen); if (NULL == pResult) { status = QDF_STATUS_E_NOMEM; @@ -1947,7 +1955,8 @@ csr_save_scan_entry(tpAniSirGlobal pMac, pTmpEntry = csr_ll_peek_head(&pRetList->List, LL_ACCESS_NOLOCK); while (pTmpEntry) { - pTmpResult = GET_BASE_ADDR(pTmpEntry, tCsrScanResult, Link); + pTmpResult = GET_BASE_ADDR(pTmpEntry, struct tag_csrscan_result, + Link); /* Skip the bssid hint AP, as it should be on head */ if (pFilter && @@ -1990,7 +1999,7 @@ csr_save_scan_entry(tpAniSirGlobal pMac, */ static QDF_STATUS csr_calc_pref_val_by_pcl(tpAniSirGlobal mac_ctx, tCsrScanResultFilter *filter, - tCsrScanResult *bss_descr) + struct tag_csrscan_result *bss_descr) { int temp_rssi = 0, new_pref_val = 0; int orig_pref_val = 0; @@ -2032,13 +2041,13 @@ static QDF_STATUS csr_calc_pref_val_by_pcl(tpAniSirGlobal mac_ctx, static QDF_STATUS csr_parse_scan_results(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter, - tScanResultList *pRetList, + struct scan_result_list *pRetList, uint32_t *count) { QDF_STATUS status = QDF_STATUS_SUCCESS; tListElem *pEntry; bool fMatch = false; - tCsrScanResult *pBssDesc = NULL; + struct tag_csrscan_result *pBssDesc = NULL; tDot11fBeaconIEs *pIes, *pNewIes = NULL; eCsrEncryptionType uc, mc; eCsrAuthType auth = eCSR_AUTH_TYPE_OPEN_SYSTEM; @@ -2064,7 +2073,8 @@ csr_parse_scan_results(tpAniSirGlobal pMac, pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pIes = (tDot11fBeaconIEs *) (pBssDesc->Result.pvIes); /* * if pBssDesc->Result.pvIes is NULL, we need to free any memory @@ -2103,7 +2113,7 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, tScanResultHandle *phResult) { QDF_STATUS status; - tScanResultList *pRetList; + struct scan_result_list *pRetList; uint32_t count = 0; if (phResult) @@ -2111,7 +2121,7 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, csr_prefer_5ghz(pMac, pFilter); - pRetList = qdf_mem_malloc(sizeof(tScanResultList)); + pRetList = qdf_mem_malloc(sizeof(struct scan_result_list)); if (NULL == pRetList) { sme_err("pRetList is NULL"); return QDF_STATUS_E_NOMEM; @@ -2144,7 +2154,7 @@ tCsrScanResultInfo *csr_scan_get_result_for_bssid(tpAniSirGlobal mac_ctx, tDblLinkList *list = &mac_ctx->scan.scanResultList; tListElem *entry; tCsrScanResultInfo *scan_info = NULL; - tCsrScanResult *scan_res; + struct tag_csrscan_result *scan_res; size_t bss_len, len; tDot11fBeaconIEs *ies = NULL; QDF_STATUS status; @@ -2152,7 +2162,8 @@ tCsrScanResultInfo *csr_scan_get_result_for_bssid(tpAniSirGlobal mac_ctx, csr_ll_lock(list); entry = csr_ll_peek_head(list, LL_ACCESS_NOLOCK); while (entry) { - scan_res = GET_BASE_ADDR(entry, tCsrScanResult, Link); + scan_res = GET_BASE_ADDR(entry, struct tag_csrscan_result, + Link); if (qdf_mem_cmp(scan_res->Result.BssDescriptor.bssId, bssid->bytes, QDF_MAC_ADDR_SIZE) == 0) { /* Found matching scan resut for this bssid */ @@ -2231,14 +2242,15 @@ QDF_STATUS csr_scan_flush_selective_result(tpAniSirGlobal pMac, bool flushP2P) { QDF_STATUS status = QDF_STATUS_SUCCESS; tListElem *pEntry, *pFreeElem; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; tDblLinkList *pList = &pMac->scan.scanResultList; csr_ll_lock(pList); pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK); while (pEntry != NULL) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); if (flushP2P && !qdf_mem_cmp(pBssDesc->Result.ssId.ssId, "DIRECT-", 7)) { pFreeElem = pEntry; @@ -2259,14 +2271,15 @@ void csr_scan_flush_bss_entry(tpAniSirGlobal pMac, tpSmeCsaOffloadInd pCsaOffloadInd) { tListElem *pEntry, *pFreeElem; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; tDblLinkList *pList = &pMac->scan.scanResultList; csr_ll_lock(pList); pEntry = csr_ll_peek_head(pList, LL_ACCESS_NOLOCK); while (pEntry != NULL) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); if (!qdf_mem_cmp(pBssDesc->Result.BssDescriptor.bssId, pCsaOffloadInd->bssid.bytes, QDF_MAC_ADDR_SIZE)) { pFreeElem = pEntry; @@ -2347,7 +2360,7 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) { QDF_STATUS status = QDF_STATUS_SUCCESS; tListElem *pEntry, *pTempEntry; - tCsrScanResult *pBssDesc; + struct tag_csrscan_result *pBssDesc; uint32_t len = sizeof(pMac->roam.validChannelList); /* Get valid channels list from CFG */ @@ -2361,7 +2374,8 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) csr_ll_lock(&pMac->scan.scanResultList); pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pTempEntry = csr_ll_next(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK); if (csr_check11d_channel(pBssDesc->Result.BssDescriptor. @@ -2382,7 +2396,8 @@ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac) pEntry = csr_ll_peek_head(&pMac->scan.tempScanResults, LL_ACCESS_NOLOCK); while (pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pTempEntry = csr_ll_next(&pMac->scan.tempScanResults, pEntry, LL_ACCESS_NOLOCK); if (csr_check11d_channel(pBssDesc->Result.BssDescriptor.channelId, @@ -2406,8 +2421,9 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, tScanResultHandle *phResult) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tScanResultList *pRetList, *pInList = (tScanResultList *) hIn; - tCsrScanResult *pResult, *pScanResult; + struct scan_result_list *pRetList, *pInList = + (struct scan_result_list *) hIn; + struct tag_csrscan_result *pResult, *pScanResult; uint32_t count = 0; tListElem *pEntry; uint32_t bssLen, allocLen; @@ -2415,7 +2431,7 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, if (phResult) *phResult = CSR_INVALID_SCANRESULT_HANDLE; - pRetList = qdf_mem_malloc(sizeof(tScanResultList)); + pRetList = qdf_mem_malloc(sizeof(struct scan_result_list)); if (NULL == pRetList) status = QDF_STATUS_E_NOMEM; else { @@ -2427,10 +2443,11 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn, pEntry = csr_ll_peek_head(&pInList->List, LL_ACCESS_NOLOCK); while (pEntry) { pScanResult = - GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); bssLen = pScanResult->Result.BssDescriptor.length + sizeof(pScanResult->Result.BssDescriptor.length); - allocLen = sizeof(tCsrScanResult) + bssLen; + allocLen = sizeof(struct tag_csrscan_result) + bssLen; pResult = qdf_mem_malloc(allocLen); if (NULL == pResult) status = QDF_STATUS_E_NOMEM; @@ -2604,7 +2621,7 @@ static bool csr_remove_dup_bss_description(tpAniSirGlobal pMac, unsigned long *timer) { tListElem *pEntry; - tCsrScanResult *scan_entry; + struct tag_csrscan_result *scan_entry; bool fRC = false; /* @@ -2617,7 +2634,8 @@ static bool csr_remove_dup_bss_description(tpAniSirGlobal pMac, pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { - scan_entry = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + scan_entry = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); /* * we have a duplicate scan results only when BSSID, SSID, * Channel and NetworkType matches @@ -2892,7 +2910,8 @@ static bool csr_process_bss_desc_for_bkid_list(tpAniSirGlobal pMac, static void csr_purge_scan_results(tpAniSirGlobal mac_ctx) { tListElem *pentry, *tmp_entry; - tCsrScanResult *presult, *oldest_bss = NULL, *weakest_bss = NULL; + struct tag_csrscan_result *presult, *oldest_bss = NULL, + *weakest_bss = NULL; uint64_t oldest_entry = 0; uint64_t curr_time = (uint64_t)qdf_mc_timer_get_system_time(); int8_t weakest_rssi = 0; @@ -2903,7 +2922,8 @@ static void csr_purge_scan_results(tpAniSirGlobal mac_ctx) while (pentry) { tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, pentry, LL_ACCESS_NOLOCK); - presult = GET_BASE_ADDR(pentry, tCsrScanResult, Link); + presult = GET_BASE_ADDR(pentry, struct tag_csrscan_result, + Link); if ((curr_time - presult->Result.BssDescriptor.received_time) > oldest_entry) { oldest_entry = curr_time - @@ -2917,7 +2937,7 @@ static void csr_purge_scan_results(tpAniSirGlobal mac_ctx) pentry = tmp_entry; } if (oldest_bss) { - tCsrScanResult *bss_to_remove; + struct tag_csrscan_result *bss_to_remove; if (weakest_rssi < CSR_PURGE_RSSI_THRESHOLD) bss_to_remove = weakest_bss; @@ -2946,7 +2966,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, { QDF_STATUS status; tListElem *entry; - tCsrScanResult *bss_dscp; + struct tag_csrscan_result *bss_dscp; tDot11fBeaconIEs *local_ie = NULL; bool dup_bss; tAniSSID tmpSsid; @@ -2955,7 +2975,8 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, tmpSsid.length = 0; while ((entry = csr_ll_remove_tail(&mac_ctx->scan.tempScanResults, LL_ACCESS_LOCK)) != NULL) { - bss_dscp = GET_BASE_ADDR(entry, tCsrScanResult, Link); + bss_dscp = GET_BASE_ADDR(entry, struct tag_csrscan_result, + Link); sme_debug( "...Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = -%d", MAC_ADDR_ARRAY(bss_dscp->Result.BssDescriptor. @@ -3071,13 +3092,14 @@ static void csr_move_temp_scan_results_to_main_list(tpAniSirGlobal pMac, csr_learn_11dcountry_information(pMac, NULL, NULL, true); } -static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, +static struct tag_csrscan_result *csr_scan_save_bss_description(tpAniSirGlobal + pMac, tSirBssDescription * pBSSDescription, tDot11fBeaconIEs *pIes, uint8_t sessionId) { - tCsrScanResult *pCsrBssDescription = NULL; + struct tag_csrscan_result *pCsrBssDescription = NULL; uint32_t cbBSSDesc; uint32_t cbAllocated; @@ -3086,7 +3108,7 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, */ cbBSSDesc = pBSSDescription->length + sizeof(pBSSDescription->length); - cbAllocated = sizeof(tCsrScanResult) + cbBSSDesc; + cbAllocated = sizeof(struct tag_csrscan_result) + cbBSSDesc; pCsrBssDescription = qdf_mem_malloc(cbAllocated); if (NULL != pCsrBssDescription) { @@ -3112,13 +3134,13 @@ static tCsrScanResult *csr_scan_save_bss_description(tpAniSirGlobal pMac, } /* Append a Bss Description... */ -tCsrScanResult *csr_scan_append_bss_description(tpAniSirGlobal pMac, +struct tag_csrscan_result *csr_scan_append_bss_description(tpAniSirGlobal pMac, tSirBssDescription * pSirBssDescription, tDot11fBeaconIEs *pIes, uint8_t sessionId) { - tCsrScanResult *pCsrBssDescription = NULL; + struct tag_csrscan_result *pCsrBssDescription = NULL; tAniSSID tmpSsid; unsigned long timer = 0; int result; @@ -3809,13 +3831,13 @@ void csr_reinit_scan_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand) qdf_mem_set(&pCommand->u.scanCmd, sizeof(tScanCmd), 0); } -static eCsrScanCompleteNextCommand csr_scan_get_next_command_state( +static enum csr_scancomplete_nextcommand csr_scan_get_next_command_state( tpAniSirGlobal pMac, tSmeCmd *pCommand, bool fSuccess, uint8_t *chan) { - eCsrScanCompleteNextCommand NextCommand = eCsrNextScanNothing; + enum csr_scancomplete_nextcommand NextCommand = eCsrNextScanNothing; int8_t channel; switch (pCommand->u.scanCmd.reason) { @@ -4007,8 +4029,8 @@ static void csr_saved_scan_cmd_free_fields(tpAniSirGlobal mac_ctx, static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, tSmeCmd *save_cmd, tSmeCmd *command) { - tCsrScanResult *scan_result; - tCsrScanResult *temp; + struct tag_csrscan_result *scan_result; + struct tag_csrscan_result *temp; uint32_t bss_len; QDF_STATUS status; @@ -4049,12 +4071,12 @@ static QDF_STATUS csr_save_profile(tpAniSirGlobal mac_ctx, return QDF_STATUS_SUCCESS; scan_result = GET_BASE_ADDR(command->u.roamCmd.pRoamBssEntry, - tCsrScanResult, Link); + struct tag_csrscan_result, Link); bss_len = scan_result->Result.BssDescriptor.length + sizeof(scan_result->Result.BssDescriptor.length); - temp = qdf_mem_malloc(sizeof(tCsrScanResult) + bss_len); + temp = qdf_mem_malloc(sizeof(struct tag_csrscan_result) + bss_len); if (!temp) { sme_err("bss mem fail"); goto error; @@ -4094,7 +4116,7 @@ error: static void csr_handle_nxt_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *pCommand, - eCsrScanCompleteNextCommand *nxt_cmd, + enum csr_scancomplete_nextcommand *nxt_cmd, bool *remove_cmd, uint32_t session_id, uint8_t chan) { @@ -4271,7 +4293,7 @@ QDF_STATUS csr_get_active_scan_entry(tpAniSirGlobal mac_ctx, /* Return whether the command should be removed */ bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp) { - eCsrScanCompleteNextCommand NextCommand = eCsrNextScanNothing; + enum csr_scancomplete_nextcommand NextCommand = eCsrNextScanNothing; tListElem *pEntry = NULL; tSmeCmd *pCommand; bool fRemoveCommand = true; @@ -4340,7 +4362,7 @@ csr_scan_remove_dup_bss_description_from_interim_list(tpAniSirGlobal mac_ctx, tDot11fBeaconIEs *pIes) { tListElem *pEntry; - tCsrScanResult *scan_bss_dscp; + struct tag_csrscan_result *scan_bss_dscp; int8_t scan_entry_rssi = 0; /* * Walk through all the chained BssDescriptions. If we find a chained @@ -4354,7 +4376,8 @@ csr_scan_remove_dup_bss_description_from_interim_list(tpAniSirGlobal mac_ctx, pEntry = csr_ll_peek_head(&mac_ctx->scan.tempScanResults, LL_ACCESS_NOLOCK); while (pEntry) { - scan_bss_dscp = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + scan_bss_dscp = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); /* * we have a duplicate scan results only when BSSID, SSID, * Channel and NetworkType matches @@ -4402,12 +4425,12 @@ csr_scan_remove_dup_bss_description_from_interim_list(tpAniSirGlobal mac_ctx, /* Caller allocated memory pfNewBssForConn to return whether * new candidate for current connection is found. Cannot be NULL */ -static tCsrScanResult *csr_scan_save_bss_description_to_interim_list( +static struct tag_csrscan_result *csr_scan_save_bss_description_to_interim_list( tpAniSirGlobal pMac, tSirBssDescription *pBSSDescription, tDot11fBeaconIEs *pIes) { - tCsrScanResult *pCsrBssDescription = NULL; + struct tag_csrscan_result *pCsrBssDescription = NULL; uint32_t cbBSSDesc; uint32_t cbAllocated; @@ -4416,7 +4439,7 @@ static tCsrScanResult *csr_scan_save_bss_description_to_interim_list( */ cbBSSDesc = pBSSDescription->length + sizeof(pBSSDescription->length); - cbAllocated = sizeof(tCsrScanResult) + cbBSSDesc; + cbAllocated = sizeof(struct tag_csrscan_result) + cbBSSDesc; sme_debug("new BSS description, length %d, cbBSSDesc %d", cbAllocated, cbBSSDesc); @@ -4850,15 +4873,17 @@ tCsrScanResultInfo *csr_scan_result_get_first(tpAniSirGlobal pMac, tScanResultHandle hScanResult) { tListElem *pEntry; - tCsrScanResult *pResult; + struct tag_csrscan_result *pResult; tCsrScanResultInfo *pRet = NULL; - tScanResultList *pResultList = (tScanResultList *) hScanResult; + struct scan_result_list *pResultList = + (struct scan_result_list *) hScanResult; if (pResultList) { csr_ll_lock(&pResultList->List); pEntry = csr_ll_peek_head(&pResultList->List, LL_ACCESS_NOLOCK); if (pEntry) { - pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pResult = GET_BASE_ADDR(pEntry, struct + tag_csrscan_result, Link); pRet = &pResult->Result; } pResultList->pCurEntry = pEntry; @@ -4872,9 +4897,10 @@ tCsrScanResultInfo *csr_scan_result_get_next(tpAniSirGlobal pMac, tScanResultHandle hScanResult) { tListElem *pEntry = NULL; - tCsrScanResult *pResult = NULL; + struct tag_csrscan_result *pResult = NULL; tCsrScanResultInfo *pRet = NULL; - tScanResultList *pResultList = (tScanResultList *) hScanResult; + struct scan_result_list *pResultList = + (struct scan_result_list *) hScanResult; if (!pResultList) return NULL; @@ -4887,7 +4913,8 @@ tCsrScanResultInfo *csr_scan_result_get_next(tpAniSirGlobal pMac, LL_ACCESS_NOLOCK); if (pEntry) { - pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pResult = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pRet = &pResult->Result; } pResultList->pCurEntry = pEntry; @@ -4904,8 +4931,9 @@ QDF_STATUS csr_move_bss_to_head_from_bssid(tpAniSirGlobal pMac, tScanResultHandle hScanResult) { QDF_STATUS status = QDF_STATUS_E_FAILURE; - tScanResultList *pResultList = (tScanResultList *) hScanResult; - tCsrScanResult *pResult = NULL; + struct scan_result_list *pResultList = + (struct scan_result_list *) hScanResult; + struct tag_csrscan_result *pResult = NULL; tListElem *pEntry = NULL; if (!(pResultList && bssid)) @@ -4914,7 +4942,8 @@ QDF_STATUS csr_move_bss_to_head_from_bssid(tpAniSirGlobal pMac, csr_ll_lock(&pResultList->List); pEntry = csr_ll_peek_head(&pResultList->List, LL_ACCESS_NOLOCK); while (pEntry) { - pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pResult = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); if (!qdf_mem_cmp(bssid, pResult->Result.BssDescriptor.bssId, sizeof(struct qdf_mac_addr))) { status = QDF_STATUS_SUCCESS; @@ -4934,7 +4963,8 @@ QDF_STATUS csr_move_bss_to_head_from_bssid(tpAniSirGlobal pMac, /* Remove the BSS if possible. */ /* Return -- true == the BSS is remove. False == Fail to remove it */ /* This function is called when list lock is held. */ -static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult) +static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, struct tag_csrscan_result + *pResult) { bool fRet = false; uint32_t i; @@ -4996,7 +5026,7 @@ QDF_STATUS csr_scan_age_results(tpAniSirGlobal pMac, { QDF_STATUS status = QDF_STATUS_SUCCESS; tListElem *pEntry, *tmpEntry; - tCsrScanResult *pResult; + struct tag_csrscan_result *pResult; tLimScanChn *pChnInfo; uint8_t i; @@ -5009,7 +5039,8 @@ QDF_STATUS csr_scan_age_results(tpAniSirGlobal pMac, tmpEntry = csr_ll_next(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK); - pResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pResult = GET_BASE_ADDR(pEntry, struct + tag_csrscan_result, Link); if (pResult->Result.BssDescriptor.channelId == pChnInfo->channelId) { if (pResult->AgingCount <= 0) { @@ -5035,7 +5066,7 @@ QDF_STATUS csr_scan_age_results(tpAniSirGlobal pMac, static QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId, tCsrScanRequest *pScanReq, - tScanReqParam *pScanReqParam) + struct tag_scanreq_param *pScanReqParam) { QDF_STATUS status = QDF_STATUS_SUCCESS; tSirSmeScanReq *pMsg; @@ -5307,7 +5338,7 @@ static void csr_diag_scan_channels(tpAniSirGlobal pMac, tSmeCmd *pCommand) static QDF_STATUS csr_scan_channels(tpAniSirGlobal pMac, tSmeCmd *pCommand) { QDF_STATUS status = QDF_STATUS_E_FAILURE; - tScanReqParam scanReq; + struct tag_scanreq_param scanReq; /* * Don't delete cached results. Rome rssi based scan candidates may land @@ -6072,7 +6103,7 @@ static void csr_purge_scan_result_by_age(void *pv) { tpAniSirGlobal mac_ctx = PMAC_STRUCT(pv); tListElem *entry, *tmp_entry; - tCsrScanResult *result; + struct tag_csrscan_result *result; uint64_t ageout_time = mac_ctx->scan.scanResultCfgAgingTime * SYSTEM_TIME_SEC_TO_MSEC; uint64_t cur_time = qdf_mc_timer_get_system_time(); @@ -6085,7 +6116,7 @@ static void csr_purge_scan_result_by_age(void *pv) while (entry) { tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, entry, LL_ACCESS_NOLOCK); - result = GET_BASE_ADDR(entry, tCsrScanResult, Link); + result = GET_BASE_ADDR(entry, struct tag_csrscan_result, Link); if ((cur_time - result->Result.BssDescriptor.received_time) > ageout_time) { @@ -7168,7 +7199,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, { uint32_t uLen = 0; tpSirProbeRespBeacon parsed_frm; - tCsrScanResult *pScanResult = NULL; + struct tag_csrscan_result *pScanResult = NULL; tSirBssDescription *pBssDescr = NULL; bool fDupBss; tDot11fBeaconIEs *local_ie = NULL; @@ -7207,7 +7238,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, uLen = pPrefNetworkFoundInd->frameLength - (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET); } - pScanResult = qdf_mem_malloc(sizeof(tCsrScanResult) + uLen); + pScanResult = qdf_mem_malloc(sizeof(struct tag_csrscan_result) + uLen); if (NULL == pScanResult) { sme_err("fail to allocate memory for frame"); qdf_mem_free(parsed_frm); @@ -7345,7 +7376,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId) { tListElem *pEntry = NULL; - tCsrScanResult *pBssDesc = NULL; + struct tag_csrscan_result *pBssDesc = NULL; tDot11fBeaconIEs *pIes = NULL; tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[sessionId]; @@ -7375,7 +7406,8 @@ void csr_init_occupied_channels_list(tpAniSirGlobal pMac, uint8_t sessionId) csr_ll_lock(&pMac->scan.scanResultList); pEntry = csr_ll_peek_head(&pMac->scan.scanResultList, LL_ACCESS_NOLOCK); while (pEntry) { - pBssDesc = GET_BASE_ADDR(pEntry, tCsrScanResult, Link); + pBssDesc = GET_BASE_ADDR(pEntry, struct tag_csrscan_result, + Link); pIes = (tDot11fBeaconIEs *) (pBssDesc->Result.pvIes); /* At this time, pBssDescription->Result.pvIes may be NULL */ if (!pIes && !QDF_IS_STATUS_SUCCESS( @@ -7496,12 +7528,13 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac, tDot11fBeaconIEs *ies_local_ptr = NULL; tAniSSID tmpSsid; unsigned long timer = 0; - tCsrScanResult *scan_res_ptr = NULL; + struct tag_csrscan_result *scan_res_ptr = NULL; uint8_t session_id = roam_sync_ind_ptr->roamedVdevId; length = roam_sync_ind_ptr->beaconProbeRespLength - (SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET); - scan_res_ptr = qdf_mem_malloc(sizeof(tCsrScanResult) + length); + scan_res_ptr = qdf_mem_malloc(sizeof(struct tag_csrscan_result) + + length); if (scan_res_ptr == NULL) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, " fail to allocate memory for frame"); @@ -7555,8 +7588,9 @@ QDF_STATUS csr_scan_save_roam_offload_ap_to_scan_cache(tpAniSirGlobal pMac, tpSirBssDescription csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle) { tListElem *first_element = NULL; - tCsrScanResult *scan_result = NULL; - tScanResultList *bss_list = (tScanResultList *)result_handle; + struct tag_csrscan_result *scan_result = NULL; + struct scan_result_list *bss_list = + (struct scan_result_list *)result_handle; if (NULL == bss_list) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -7576,7 +7610,8 @@ tpSirBssDescription csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle) return NULL; } - scan_result = GET_BASE_ADDR(first_element, tCsrScanResult, Link); + scan_result = GET_BASE_ADDR(first_element, struct tag_csrscan_result, + Link); return &scan_result->Result.BssDescriptor; } @@ -7595,8 +7630,9 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle, tSirBssDescription *bss_descr) { tListElem *first_element = NULL; - tCsrScanResult *scan_result = NULL; - tScanResultList *bss_list = (tScanResultList *)result_handle; + struct tag_csrscan_result *scan_result = NULL; + struct scan_result_list *bss_list = + (struct scan_result_list *)result_handle; if (NULL == bss_list) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, @@ -7612,7 +7648,7 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle, first_element = csr_ll_peek_head(&bss_list->List, LL_ACCESS_NOLOCK); if (first_element) { scan_result = GET_BASE_ADDR(first_element, - tCsrScanResult, + struct tag_csrscan_result, Link); qdf_mem_copy(bss_descr, &scan_result->Result.BssDescriptor, diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index c749e790c041..ab26aa64d27a 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -25,13 +25,11 @@ * to the Linux Foundation. */ -/** ------------------------------------------------------------------------- * - ------------------------------------------------------------------------- * - - \file csr_inside_api.h - - Define interface only used by CSR. - ========================================================================== */ +/* + * DOC: csr_inside_api.h + * + * Define interface only used by CSR. + */ #ifndef CSR_INSIDE_API_H__ #define CSR_INSIDE_API_H__ @@ -69,12 +67,17 @@ #define SYSTEM_TIME_SEC_TO_MSEC 1000 #define SYSTEM_TIME_NSEC_TO_USEC 1000 -/* This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from */ +/* This number minus 1 means the number of times a channel is scanned before + * a BSS is remvoed from + */ /* cache scan result */ #define CSR_AGING_COUNT 3 -#define CSR_SCAN_GET_RESULT_INTERVAL (5 * QDF_MC_TIMER_TO_SEC_UNIT) /* 5 seconds */ -#define CSR_MIC_ERROR_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ -#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ +/* 5 seconds */ +#define CSR_SCAN_GET_RESULT_INTERVAL (5 * QDF_MC_TIMER_TO_SEC_UNIT) +/* 60 seconds */ +#define CSR_MIC_ERROR_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) +/* 60 seconds */ +#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* the following defines are NOT used by palTimer */ #define CSR_JOIN_FAILURE_TIMEOUT_DEFAULT (3000) @@ -107,7 +110,7 @@ extern uint8_t csr_wpa_oui[][CSR_WPA_OUI_SIZE]; bool csr_is_supported_channel(tpAniSirGlobal pMac, uint8_t channelId); -typedef enum { +enum csr_scancomplete_nextcommand { eCsrNextScanNothing, eCsrNextLostLinkScan1Success, eCsrNextLostLinkScan1Failed, @@ -124,9 +127,9 @@ typedef enum { eCsrNexteScanForSsidFailure, eCsrNextCheckAllowConc, -} eCsrScanCompleteNextCommand; +}; -typedef enum { +enum csr_roamcomplete_result { eCsrJoinSuccess, eCsrJoinFailure, eCsrReassocSuccess, @@ -139,35 +142,45 @@ typedef enum { eCsrJoinFailureDueToConcurrency, eCsrStopBssSuccess, eCsrStopBssFailure, -} eCsrRoamCompleteResult; +}; -typedef struct tagScanReqParam { +struct tag_scanreq_param { uint8_t bReturnAfter1stMatch; uint8_t fUniqueResult; uint8_t freshScan; uint8_t hiddenSsid; uint8_t reserved; -} tScanReqParam; +}; -typedef struct tagCsrScanResult { +struct tag_csrscan_result { tListElem Link; - int32_t AgingCount; /* This BSS is removed when it reaches 0 or less */ - uint32_t preferValue; /* The bigger the number, the better the BSS. This value override capValue */ - uint32_t capValue; /* The biggger the better. This value is in use only if we have equal preferValue */ - /* This member must be the last in the structure because the end of tSirBssDescription (inside) is an */ - /* array with nonknown size at this time */ - - eCsrEncryptionType ucEncryptionType; /* Preferred Encryption type that matched with profile. */ + /* This BSS is removed when it reaches 0 or less */ + int32_t AgingCount; + /* The bigger the number, the better the BSS. + * This value override capValue + */ + uint32_t preferValue; + /* The biggger the better. This value is in use only if we have + * equal preferValue + */ + uint32_t capValue; + /* This member must be the last in the structure because the end of + * tSirBssDescription (inside) is an + * array with nonknown size at this time + */ + /* Preferred Encryption type that matched with profile. */ + eCsrEncryptionType ucEncryptionType; eCsrEncryptionType mcEncryptionType; - eCsrAuthType authType; /* Preferred auth type that matched with the profile. */ + /* Preferred auth type that matched with the profile. */ + eCsrAuthType authType; tCsrScanResultInfo Result; -} tCsrScanResult; +}; -typedef struct { +struct scan_result_list { tDblLinkList List; tListElem *pCurEntry; -} tScanResultList; +}; /** * csr_scan_for_ssid_context() - Callback context for SSID scan @@ -182,15 +195,16 @@ struct csr_scan_for_ssid_context { uint32_t roam_id; }; -#define CSR_IS_ROAM_REASON(pCmd, reason) ((reason) == (pCmd)->roamCmd.roamReason) +#define CSR_IS_ROAM_REASON(pCmd, reason) \ + ((reason) == (pCmd)->roamCmd.roamReason) #define CSR_IS_BETTER_PREFER_VALUE(v1, v2) ((v1) > (v2)) #define CSR_IS_EQUAL_PREFER_VALUE(v1, v2) ((v1) == (v2)) #define CSR_IS_BETTER_CAP_VALUE(v1, v2) ((v1) > (v2)) #define CSR_IS_EQUAL_CAP_VALUE(v1, v2) ((v1) == (v2)) #define CSR_IS_BETTER_RSSI(v1, v2) ((v1) > (v2)) -#define CSR_IS_ENC_TYPE_STATIC(encType) ((eCSR_ENCRYPT_TYPE_NONE == (encType)) || \ - (eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == (encType)) || \ - (eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == (encType))) +#define CSR_IS_ENC_TYPE_STATIC(encType) ((eCSR_ENCRYPT_TYPE_NONE == (encType)) \ + || (eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == (encType)) || \ + (eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == (encType))) #define CSR_IS_WAIT_FOR_KEY(pMac, sessionId) \ (CSR_IS_ROAM_JOINED(pMac, sessionId) && \ CSR_IS_ROAM_SUBSTATE_WAITFORKEY(pMac, sessionId)) @@ -198,47 +212,52 @@ struct csr_scan_for_ssid_context { /* We may need to add WEP but for now, TKIP only. */ #define CSR_IS_11n_ALLOWED(encType) ((eCSR_ENCRYPT_TYPE_TKIP != (encType)) && \ - (eCSR_ENCRYPT_TYPE_WEP40_STATICKEY != (encType)) && \ - (eCSR_ENCRYPT_TYPE_WEP104_STATICKEY != (encType)) && \ - (eCSR_ENCRYPT_TYPE_WEP40 != (encType)) && \ + (eCSR_ENCRYPT_TYPE_WEP40_STATICKEY != (encType)) && \ + (eCSR_ENCRYPT_TYPE_WEP104_STATICKEY != (encType)) && \ + (eCSR_ENCRYPT_TYPE_WEP40 != (encType)) && \ (eCSR_ENCRYPT_TYPE_WEP104 != (encType))) -#define CSR_IS_DISCONNECT_COMMAND(pCommand) ((eSmeCommandRoam == (pCommand)->command) && \ - ((eCsrForcedDisassoc == (pCommand)->u.roamCmd.roamReason) || \ - (eCsrForcedDeauth == (pCommand)->u.roamCmd.roamReason) || \ - (eCsrSmeIssuedDisassocForHandoff == \ - (pCommand)->u.roamCmd.roamReason) || \ - (eCsrForcedDisassocMICFailure == \ - (pCommand)->u.roamCmd.roamReason))) +#define CSR_IS_DISCONNECT_COMMAND(pCommand) ((eSmeCommandRoam == \ + (pCommand)->command) && \ + ((eCsrForcedDisassoc == (pCommand)->u.roamCmd.roamReason) || \ + (eCsrForcedDeauth == (pCommand)->u.roamCmd.roamReason) || \ + (eCsrSmeIssuedDisassocForHandoff == \ + (pCommand)->u.roamCmd.roamReason) || \ + (eCsrForcedDisassocMICFailure == \ + (pCommand)->u.roamCmd.roamReason))) eCsrRoamState csr_roam_state_change(tpAniSirGlobal pMac, - eCsrRoamState NewRoamState, uint8_t sessionId); + eCsrRoamState NewRoamState, + uint8_t sessionId); QDF_STATUS csr_scanning_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf); void csr_roaming_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf); void csr_roam_joined_state_msg_processor(tpAniSirGlobal pMac, void *pMsgBuf); bool csr_scan_complete(tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp); void csr_release_command_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand); void csr_release_command_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand); -void csr_release_command_wm_status_change(tpAniSirGlobal pMac, tSmeCmd *pCommand); +void csr_release_command_wm_status_change(tpAniSirGlobal pMac, + tSmeCmd *pCommand); extern void csr_release_roc_req_cmd(tpAniSirGlobal mac_ctx); bool csr_is_duplicate_bss_description(tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1, tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2); -QDF_STATUS csr_roam_save_connected_bss_desc(tpAniSirGlobal pMac, uint32_t sessionId, +QDF_STATUS csr_roam_save_connected_bss_desc(tpAniSirGlobal pMac, + uint32_t sessionId, tSirBssDescription *pBssDesc); bool csr_is_network_type_equal(tSirBssDescription *pSirBssDesc1, tSirBssDescription *pSirBssDesc2); QDF_STATUS csr_scan_sme_scan_response(tpAniSirGlobal pMac, void *pMsgBuf); /* - Prepare a filter base on a profile for parsing the scan results. - Upon successful return, caller MUST call csr_free_scan_filter on - pScanFilter when it is done with the filter. + * Prepare a filter base on a profile for parsing the scan results. + * Upon successful return, caller MUST call csr_free_scan_filter on + * pScanFilter when it is done with the filter. */ QDF_STATUS csr_roam_prepare_filter_from_profile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, - tCsrScanResultFilter *pScanFilter); + tCsrScanResultFilter + *pScanFilter); QDF_STATUS csr_roam_copy_profile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile, tCsrRoamProfile *pSrcProfile); @@ -260,7 +279,7 @@ QDF_STATUS csr_scan_handle_failed_lostlink2(tpAniSirGlobal pMac, uint32_t sessionId); QDF_STATUS csr_scan_handle_failed_lostlink3(tpAniSirGlobal pMac, uint32_t sessionId); -tCsrScanResult *csr_scan_append_bss_description(tpAniSirGlobal pMac, +struct tag_csrscan_result *csr_scan_append_bss_description(tpAniSirGlobal pMac, tSirBssDescription * pSirBssDescription, tDot11fBeaconIEs *pIes, @@ -300,10 +319,11 @@ QDF_STATUS csr_remove_cmd_from_pending_list(tpAniSirGlobal pMac, uint8_t sessionId, uint32_t scan_id, tDblLinkList *pList, - eSmeCommandType commandType); + eSmeCommandType commandType); QDF_STATUS csr_scan_abort_mac_scan_not_for_connect(tpAniSirGlobal pMac, uint8_t sessionId); -QDF_STATUS csr_scan_abort_scan_for_ssid(tpAniSirGlobal pMac, uint32_t sessionId); +QDF_STATUS csr_scan_abort_scan_for_ssid(tpAniSirGlobal pMac, + uint32_t sessionId); void csr_remove_scan_for_ssid_from_pending_list(tpAniSirGlobal pMac, tDblLinkList *pList, uint32_t sessionId); @@ -312,11 +332,12 @@ QDF_STATUS csr_abort_scan_from_active_list(tpAniSirGlobal pMac, tDblLinkList *pList, uint32_t sessionId, uint32_t scan_id, eSmeCommandType scan_cmd_type, eCsrAbortReason abort_reason); -/* To age out scan results base. tSmeGetScanChnRsp is a pointer returned by LIM that */ -/* has the information regarding scanned channels. */ -/* The logic is that whenever CSR add a BSS to scan result, it set the age count to */ -/* a value. This function deduct the age count if channelId matches the BSS' channelId */ -/* The BSS is remove if the count reaches 0. */ +/* To age out scan results base. tSmeGetScanChnRsp is a pointer returned by + * LIM that has the information regarding scanned channels. The logic is that + * whenever CSR add a BSS to scan result, it set the age count to a value. + * This function deduct the age count if channelId matches the BSS' channelId + * The BSS is remove if the count reaches 0. + */ QDF_STATUS csr_scan_age_results(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInfo); @@ -329,7 +350,8 @@ void csr_apply_country_information(tpAniSirGlobal pMac); void csr_set_cfg_scan_control_list(tpAniSirGlobal pMac, uint8_t *countryCode, tCsrChannel *pChannelList); void csr_reinit_scan_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand); -void csr_free_scan_result_entry(tpAniSirGlobal pMac, tCsrScanResult *pResult); +void csr_free_scan_result_entry(tpAniSirGlobal pMac, struct tag_csrscan_result + *pResult); QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamInfo *pRoamInfo, uint32_t roamId, @@ -341,12 +363,13 @@ QDF_STATUS csr_roam_issue_connect(tpAniSirGlobal pMac, uint32_t sessionId, bool fImediate, bool fClearScan); QDF_STATUS csr_roam_issue_reassoc(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, - tCsrRoamModifyProfileFields *pModProfileFields, + tCsrRoamModifyProfileFields *pModProfileFields, eCsrRoamReason reason, uint32_t roamId, bool fImediate); -void csr_roam_complete(tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, +void csr_roam_complete(tpAniSirGlobal pMac, enum csr_roamcomplete_result Result, void *Context); -QDF_STATUS csr_roam_issue_set_context_req(tpAniSirGlobal pMac, uint32_t sessionId, +QDF_STATUS csr_roam_issue_set_context_req(tpAniSirGlobal pMac, + uint32_t sessionId, eCsrEncryptionType EncryptType, tSirBssDescription *pBssDescription, tSirMacAddr *bssId, bool addKey, @@ -354,30 +377,36 @@ QDF_STATUS csr_roam_issue_set_context_req(tpAniSirGlobal pMac, uint32_t sessionI tAniKeyDirection aniKeyDirection, uint8_t keyId, uint16_t keyLength, uint8_t *pKey, uint8_t paeRole); -QDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, tSmeCmd *pCommand, +QDF_STATUS csr_roam_process_disassoc_deauth(tpAniSirGlobal pMac, + tSmeCmd *pCommand, bool fDisassoc, bool fMICFailure); QDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes); -void csr_roam_check_for_link_status_change(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg); +void csr_roam_check_for_link_status_change(tpAniSirGlobal pMac, + tSirSmeRsp *pSirMsg); void csr_roam_stats_rsp_processor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg); QDF_STATUS csr_roam_issue_start_bss(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamStartBssParams *pParam, tCsrRoamProfile *pProfile, - tSirBssDescription *pBssDesc, uint32_t roamId); + tSirBssDescription *pBssDesc, + uint32_t roamId); QDF_STATUS csr_roam_issue_stop_bss(tpAniSirGlobal pMac, uint32_t sessionId, eCsrRoamSubState NewSubstate); -bool csr_is_same_profile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile1, +bool csr_is_same_profile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile + *pProfile1, tCsrRoamProfile *pProfile2); bool csr_is_roam_command_waiting(tpAniSirGlobal pMac); -bool csr_is_roam_command_waiting_for_session(tpAniSirGlobal pMac, uint32_t sessionId); +bool csr_is_roam_command_waiting_for_session(tpAniSirGlobal pMac, + uint32_t sessionId); bool csr_is_scan_for_roam_command_active(tpAniSirGlobal pMac); eRoamCmdStatus csr_get_roam_complete_status(tpAniSirGlobal pMac, uint32_t sessionId); /* pBand can be NULL if caller doesn't need to get it */ -QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, uint32_t sessionId, +QDF_STATUS csr_roam_issue_disassociate_cmd(tpAniSirGlobal pMac, + uint32_t sessionId, eCsrRoamDisconnectReason reason); QDF_STATUS csr_roam_disconnect_internal(tpAniSirGlobal pMac, uint32_t sessionId, eCsrRoamDisconnectReason reason); @@ -398,21 +427,27 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeDisassocInd pDisassocInd); QDF_STATUS csr_send_mb_deauth_cnf_msg(tpAniSirGlobal pMac, tpSirSmeDeauthInd pDeauthInd); -QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, +QDF_STATUS csr_send_assoc_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd + pAssocInd, QDF_STATUS status); QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd, QDF_STATUS Halstatus, uint8_t sessionId); -QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, +QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, + uint32_t sessionId, eCsrRoamBssType bssType, tCsrRoamStartBssParams *pParam, tSirBssDescription *pBssDesc); -QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, uint32_t sessionId); +QDF_STATUS csr_send_mb_stop_bss_req_msg(tpAniSirGlobal pMac, + uint32_t sessionId); -/* Caller should put the BSS' ssid to fiedl bssSsid when comparing SSID for a BSS. */ +/* Caller should put the BSS' ssid to fiedl bssSsid when + * comparing SSID for a BSS. + */ bool csr_is_ssid_match(tpAniSirGlobal pMac, uint8_t *ssid1, uint8_t ssid1Len, - uint8_t *bssSsid, uint8_t bssSsidLen, bool fSsidRequired); + uint8_t *bssSsid, uint8_t bssSsidLen, + bool fSsidRequired); bool csr_is_phy_mode_match(tpAniSirGlobal pMac, uint32_t phyMode, tSirBssDescription *pSirBssDesc, tCsrRoamProfile *pProfile, @@ -439,8 +474,10 @@ bool csr_check_ps_offload_ready(void *pv, uint32_t sessionId); /* to free memory allocated inside the profile structure */ void csr_release_profile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile); /* To free memory allocated inside scanFilter */ -void csr_free_scan_filter(tpAniSirGlobal pMac, tCsrScanResultFilter *pScanFilter); -eCsrCfgDot11Mode csr_get_cfg_dot11_mode_from_csr_phy_mode(tCsrRoamProfile *pProfile, +void csr_free_scan_filter(tpAniSirGlobal pMac, tCsrScanResultFilter + *pScanFilter); +eCsrCfgDot11Mode csr_get_cfg_dot11_mode_from_csr_phy_mode(tCsrRoamProfile + *pProfile, eCsrPhyMode phyMode, bool fProprietary); uint32_t csr_translate_to_wni_cfg_dot11_mode(tpAniSirGlobal pMac, @@ -453,7 +490,7 @@ void csr_apply_power2_current(tpAniSirGlobal pMac); void csr_assign_rssi_for_category(tpAniSirGlobal pMac, int8_t bestApRssi, uint8_t catOffset); QDF_STATUS csr_roam_remove_connected_bss_from_scan_cache(tpAniSirGlobal pMac, - tCsrRoamConnectedProfile * + tCsrRoamConnectedProfile * pConnProfile); QDF_STATUS csr_roam_start_roaming(tpAniSirGlobal pMac, uint32_t sessionId, eCsrRoamingReason roamingReason); @@ -469,22 +506,23 @@ void csr_reset_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId); #ifdef FEATURE_WLAN_WAPI void csr_reset_bkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId); #endif /* FEATURE_WLAN_WAPI */ -QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, uint32_t tableSize, - tSirMacChanInfo *channelTable); - -/* To check whether a country code matches the one in the IE */ -/* Only check the first two characters, ignoring in/outdoor */ -/* pCountry -- caller allocated buffer contain the country code that is checking against */ -/* the one in pIes. It can be NULL. */ -/* caller must provide pIes, it cannot be NULL */ -/* This function always return true if 11d support is not turned on. */ -/* pIes cannot be NULL */ +QDF_STATUS csr_save_to_channel_power2_g_5_g(tpAniSirGlobal pMac, + uint32_t tableSize, tSirMacChanInfo + *channelTable); + +/* To check whether a country code matches the one in the IE Only check the + * first two characters, ignoring in/outdoor pCountry -- caller allocated + * buffer contain the country code that is checking against the one in pIes. + * It can be NULL. caller must provide pIes, it cannot be NULL. This function + * always return true if 11d support is not turned on. pIes cannot be NULL + */ bool csr_match_country_code(tpAniSirGlobal pMac, uint8_t *pCountry, tDot11fBeaconIEs *pIes); QDF_STATUS csr_roam_set_key(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamSetKey *pSetKey, uint32_t roamId); QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac, - csr_roam_completeCallback callback, void *pContext, + csr_roam_completeCallback callback, + void *pContext, uint8_t *pSelfMacAddr, uint8_t *pbSessionId, uint32_t type, uint32_t subType); /* fSync: true means cleanupneeds to handle synchronously. */ @@ -493,53 +531,63 @@ QDF_STATUS csr_roam_close_session(tpAniSirGlobal pMac, uint32_t sessionId, csr_roamSessionCloseCallback callback, void *pContext); void csr_cleanup_session(tpAniSirGlobal pMac, uint32_t sessionId); -QDF_STATUS csr_roam_get_session_id_from_bssid(tpAniSirGlobal pMac, struct qdf_mac_addr *bssid, +QDF_STATUS csr_roam_get_session_id_from_bssid(tpAniSirGlobal pMac, + struct qdf_mac_addr *bssid, uint32_t *pSessionId); eCsrCfgDot11Mode csr_find_best_phy_mode(tpAniSirGlobal pMac, uint32_t phyMode); -/* --------------------------------------------------------------------------- - \fn csr_scan_enable - \brief Enable the scanning feature of CSR. It must be called before any scan request can be performed. - \param tHalHandle - HAL context handle - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_enable(tpAniSirGlobal); - -/* --------------------------------------------------------------------------- - \fn csr_scan_disable - \brief Disableing the scanning feature of CSR. After this function return success, no scan is performed until - a successfull to csr_scan_enable - \param tHalHandle - HAL context handle - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_disable(tpAniSirGlobal); -/* --------------------------------------------------------------------------- - \fn csr_scan_request - \brief Request a 11d or full scan. - \param callback - a callback function that scan calls upon finish, will not be called if csr_scan_request returns error - \param pContext - a pointer passed in for the callback - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_request(tpAniSirGlobal, uint16_t, tCsrScanRequest *, +/* + * csr_scan_enable() - + * Enable the scanning feature of CSR. It must be called before any scan + * request can be performed. + * + * tHalHandle - HAL context handle + * Return QDF_STATUS + */ +QDF_STATUS csr_scan_enable(tpAniSirGlobal pMac); + +/* + * csr_scan_disable() - + * Disableing the scanning feature of CSR. After this function return success, + * no scan is performed until a successful to csr_scan_enable + * + * tHalHandle - HAL context handle + * Return QDF_STATUS + */ +QDF_STATUS csr_scan_disable(tpAniSirGlobal pMac); +/* + * csr_scan_request() - + * Request a 11d or full scan. + * + * callback - a callback function that scan calls upon finish, will not be + * called if csr_scan_request returns error + * pContext - a pointer passed in for the callback + * Return QDF_STATUS + */ +QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, + tCsrScanRequest *scan_req, csr_scan_completeCallback callback, void *pContext); -/* --------------------------------------------------------------------------- - \fn csrScanAbort - \brief If a scan request is abort, the scan complete callback will be called first before csrScanAbort returns. - \param pScanRequestID - The request ID returned from csr_scan_request - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csrScanAbort(tpAniSirGlobal, uint32_t scanRequestID); - -/* --------------------------------------------------------------------------- - \fn csr_scan_get_result - \brief Return scan results. - \param pFilter - If pFilter is NULL, all cached results are returned - \param phResult - an object for the result. - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_get_result(tpAniSirGlobal, tCsrScanResultFilter *pFilter, - tScanResultHandle *phResult); +/* + * csrScanAbort() - + * If a scan request is abort, the scan complete callback will be called + * first before csrScanAbort returns. + * + * pScanRequestID - The request ID returned from csr_scan_request + * Return QDF_STATUS + */ +QDF_STATUS csrScanAbort(tpAniSirGlobal pMac, uint32_t scanRequestID); + +/* + * csr_scan_get_result() - + * Return scan results. + * + * pFilter - If pFilter is NULL, all cached results are returned + * phResult - an object for the result. + * Return QDF_STATUS + */ +QDF_STATUS csr_scan_get_result(tpAniSirGlobal pMac, tCsrScanResultFilter + *pFilter, tScanResultHandle *phResult); /** * csr_scan_get_result_for_bssid - gets the scan result from scan cache for the @@ -552,75 +600,85 @@ QDF_STATUS csr_scan_get_result(tpAniSirGlobal, tCsrScanResultFilter *pFilter, tCsrScanResultInfo *csr_scan_get_result_for_bssid(tpAniSirGlobal mac_ctx, struct qdf_mac_addr *bssid); -/* --------------------------------------------------------------------------- - \fn csr_scan_flush_result - \brief Clear scan results. - \param pMac - pMac global pointer - \param sessionId - Session Identifier - \return QDF_STATUS - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_flush_result(tpAniSirGlobal); -/* --------------------------------------------------------------------------- - * \fn csr_scan_filter_results - * \brief Filter scan results based on valid channel list. - * \param pMac - Pointer to Global MAC structure - * \return QDF_STATUS - ***------------------------------------------------------------------------------- +/* + * csr_scan_flush_result() - + * Clear scan results. + * + * pMac - pMac global pointer + * sessionId - Session Identifier + * Return QDF_STATUS + */ +QDF_STATUS csr_scan_flush_result(tpAniSirGlobal pMac); +/* + * csr_scan_filter_results() - + * Filter scan results based on valid channel list. + * + * pMac - Pointer to Global MAC structure + * Return QDF_STATUS */ QDF_STATUS csr_scan_filter_results(tpAniSirGlobal pMac); void csr_save_scan_results(tpAniSirGlobal pMac, uint8_t reason, uint8_t sessionId); -QDF_STATUS csr_scan_flush_selective_result(tpAniSirGlobal, bool flushP2P); +QDF_STATUS csr_scan_flush_selective_result(tpAniSirGlobal pMac, bool flushP2P); -/* --------------------------------------------------------------------------- - \fn csr_scan_result_get_first - \brief Returns the first element of scan result. - \param hScanResult - returned from csr_scan_get_result - \return tCsrScanResultInfo * - NULL if no result - -------------------------------------------------------------------------------*/ -tCsrScanResultInfo *csr_scan_result_get_first(tpAniSirGlobal, +/* + * csr_scan_result_get_first + * Returns the first element of scan result. + * + * hScanResult - returned from csr_scan_get_result + * tCsrScanResultInfo * - NULL if no result + */ +tCsrScanResultInfo *csr_scan_result_get_first(tpAniSirGlobal pMac, tScanResultHandle hScanResult); -/* --------------------------------------------------------------------------- - \fn csr_scan_result_get_next - \brief Returns the next element of scan result. It can be called without calling csr_scan_result_get_first first - \param hScanResult - returned from csr_scan_get_result - \return Null if no result or reach the end - -------------------------------------------------------------------------------*/ -tCsrScanResultInfo *csr_scan_result_get_next(tpAniSirGlobal, +/* + * csr_scan_result_get_next + * Returns the next element of scan result. It can be called without calling + * csr_scan_result_get_first first + * + * hScanResult - returned from csr_scan_get_result + * Return Null if no result or reach the end + */ +tCsrScanResultInfo *csr_scan_result_get_next(tpAniSirGlobal pMac, tScanResultHandle hScanResult); -/* --------------------------------------------------------------------------- - \fn csr_get_country_code - \brief this function is to get the country code current being used - \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return, this has the country code - \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return, - this contains the length of the data in pBuf - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_get_country_code() - + * This function is to get the country code current being used + * pBuf - Caller allocated buffer with at least 3 bytes, upon success return, + * this has the country code + * pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon + * success return, this contains the length of the data in pBuf + * Return QDF_STATUS + */ QDF_STATUS csr_get_country_code(tpAniSirGlobal pMac, uint8_t *pBuf, uint8_t *pbLen); -/* --------------------------------------------------------------------------- - \fn csr_set_country_code - \brief this function is to set the country code so channel/power setting matches the countrycode and - the domain it belongs to. - \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_set_country_code() - + * This function is to set the country code so channel/power setting matches + * the countrycode and the domain it belongs to. + * + * pCountry - Caller allocated buffer with at least 3 bytes specifying the + * country code + * Return QDF_STATUS + */ QDF_STATUS csr_set_country_code(tpAniSirGlobal pMac, uint8_t *pCountry); -/* --------------------------------------------------------------------------- - \fn csr_get_regulatory_domain_for_country - \brief this function is to get the regulatory domain for a country. - This function must be called after CFG is downloaded and all the band/mode setting already passed into - CSR. - \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code - \param pDomainId - Caller allocated buffer to get the return domain ID upon success return. Can be NULL. - \param source - the source of country information. - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_get_regulatory_domain_for_country() - + * This function is to get the regulatory domain for a country. + * This function must be called after CFG is downloaded and all the band/mode + * setting already passed into CSR. + * + * pCountry - Caller allocated buffer with at least 3 bytes specifying the + * country code + * pDomainId - Caller allocated buffer to get the return domain ID upon + * success return. Can be NULL. + * source - the source of country information. + * Return QDF_STATUS + */ QDF_STATUS csr_get_regulatory_domain_for_country(tpAniSirGlobal pMac, uint8_t *pCountry, v_REGDOMAIN_t *pDomainId, @@ -731,77 +789,81 @@ void csr_get_vdev_type_nss(tpAniSirGlobal mac_ctx, int diag_auth_type_from_csr_type(eCsrAuthType authType); int diag_enc_type_from_csr_type(eCsrEncryptionType encType); #endif /* #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR */ -/* --------------------------------------------------------------------------- - \fn csr_scan_result_purge - \brief remove all items(tCsrScanResult) in the list and free memory for each item - \param hScanResult - returned from csr_scan_get_result. hScanResult is considered gone by - calling this function and even before this function reutrns. - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_scan_result_purge() - + * Remove all items(tCsrScanResult) in the list and free memory for each item + * hScanResult - returned from csr_scan_get_result. hScanResult is considered + * gone by calling this function and even before this function reutrns. + * Return QDF_STATUS + */ QDF_STATUS csr_scan_result_purge(tpAniSirGlobal pMac, tScanResultHandle hScanResult); /* /////////////////////////////////////////Common Scan ends */ -/* --------------------------------------------------------------------------- - \fn csr_roam_connect - \brief To inititiate an association - \param pProfile - can be NULL to join to any open ones - \param pRoamId - to get back the request ID - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_roam_connect() - + * To inititiate an association + * pProfile - can be NULL to join to any open ones + * pRoamId - to get back the request ID + * Return QDF_STATUS + */ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, uint32_t *pRoamId); -/* --------------------------------------------------------------------------- - \fn csr_roam_reassoc - \brief To inititiate a re-association - \param pProfile - can be NULL to join the currently connected AP. In that - case modProfileFields should carry the modified field(s) which could trigger - reassoc - \param modProfileFields - fields which are part of tCsrRoamConnectedProfile - that might need modification dynamically once STA is up & running and this - could trigger a reassoc - \param pRoamId - to get back the request ID - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_roam_reassoc() - + * To inititiate a re-association + * pProfile - can be NULL to join the currently connected AP. In that + * case modProfileFields should carry the modified field(s) which could trigger + * reassoc + * modProfileFields - fields which are part of tCsrRoamConnectedProfile + * that might need modification dynamically once STA is up & running and this + * could trigger a reassoc + * pRoamId - to get back the request ID + * Return QDF_STATUS + */ QDF_STATUS csr_roam_reassoc(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamProfile *pProfile, tCsrRoamModifyProfileFields modProfileFields, uint32_t *pRoamId); -/* --------------------------------------------------------------------------- - \fn csr_roam_reconnect - \brief To disconnect and reconnect with the same profile - \return QDF_STATUS. It returns fail if currently not connected - -------------------------------------------------------------------------------*/ +/* + * csr_roam_reconnect() - + * To disconnect and reconnect with the same profile + * + * Return QDF_STATUS. It returns fail if currently not connected + */ QDF_STATUS csr_roam_reconnect(tpAniSirGlobal pMac, uint32_t sessionId); -/* --------------------------------------------------------------------------- - \fn csr_roam_set_pmkid_cache - \brief return the PMKID candidate list - \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo - \param numItems - a variable that has the number of tPmkidCacheInfo allocated - when retruning, this is either the number needed or number of items put into pPMKIDCache - \return QDF_STATUS - when fail, it usually means the buffer allocated is not big enough and pNumItems - has the number of tPmkidCacheInfo. - \Note: pNumItems is a number of tPmkidCacheInfo, not sizeof(tPmkidCacheInfo) * something - -------------------------------------------------------------------------------*/ +/* + * csr_roam_set_pmkid_cache() - + * return the PMKID candidate list + * + * pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo + * numItems - a variable that has the number of tPmkidCacheInfo allocated + * when retruning, this is either the number needed or number of items put + * into pPMKIDCache + * Return QDF_STATUS - when fail, it usually means the buffer allocated is not + * big enough and pNumItems has the number of tPmkidCacheInfo. + * \Note: pNumItems is a number of tPmkidCacheInfo, not + * sizeof(tPmkidCacheInfo) * something + */ QDF_STATUS csr_roam_set_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, tPmkidCacheInfo *pPMKIDCache, - uint32_t numItems, bool update_entire_cache); + uint32_t numItems, bool update_entire_cache); #ifdef WLAN_FEATURE_ROAM_OFFLOAD -/* --------------------------------------------------------------------------- - *\fn csr_roam_set_psk_pmk - *\brief store PSK/PMK - *\param pMac - pointer to global structure for MAC - *\param sessionId - Sme session id - *\param pPSK_PMK - pointer to an array of Psk/Pmk - *\return QDF_STATUS - usually it succeed unless sessionId is not found - *\Note: - *-------------------------------------------------------------------------------*/ +/* + * csr_roam_set_psk_pmk() - + * store PSK/PMK + * pMac - pointer to global structure for MAC + * sessionId - Sme session id + * pPSK_PMK - pointer to an array of Psk/Pmk + * Return QDF_STATUS - usually it succeed unless sessionId is not found + * Note: + */ QDF_STATUS csr_roam_set_psk_pmk(tpAniSirGlobal pMac, uint32_t sessionId, uint8_t *pPSK_PMK, size_t pmk_len); @@ -810,45 +872,54 @@ QDF_STATUS csr_roam_set_key_mgmt_offload(tpAniSirGlobal mac_ctx, bool roam_key_mgmt_offload_enabled, struct pmkid_mode_bits *pmkid_modes); #endif -/* --------------------------------------------------------------------------- - \fn csr_roam_get_wpa_rsn_req_ie - \brief return the WPA or RSN IE CSR passes to PE to JOIN request or START_BSS request - \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the - needed or IE length in pBuf. - \param pBuf - Caller allocated memory that contain the IE field, if any, upon return - \return QDF_STATUS - when fail, it usually means the buffer allocated is not big enough - -------------------------------------------------------------------------------*/ +/* + * csr_roam_get_wpa_rsn_req_ie() - + * Return the WPA or RSN IE CSR passes to PE to JOIN request or START_BSS + * request + * pLen - caller allocated memory that has the length of pBuf as input. + * Upon returned, *pLen has the needed or IE length in pBuf. + * pBuf - Caller allocated memory that contain the IE field, if any, upon return + * Return QDF_STATUS - when fail, it usually means the buffer allocated is not + * big enough + */ QDF_STATUS csr_roam_get_wpa_rsn_req_ie(tpAniSirGlobal pMac, uint32_t sessionId, uint32_t *pLen, uint8_t *pBuf); -/* --------------------------------------------------------------------------- - \fn csr_roam_get_wpa_rsn_rsp_ie - \brief return the WPA or RSN IE from the beacon or probe rsp if connected - \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the - needed or IE length in pBuf. - \param pBuf - Caller allocated memory that contain the IE field, if any, upon return - \return QDF_STATUS - when fail, it usually means the buffer allocated is not big enough - -------------------------------------------------------------------------------*/ +/* + * csr_roam_get_wpa_rsn_rsp_ie() - + * Return the WPA or RSN IE from the beacon or probe rsp if connected + * + * pLen - caller allocated memory that has the length of pBuf as input. + * Upon returned, *pLen has the needed or IE length in pBuf. + * pBuf - Caller allocated memory that contain the IE field, if any, upon return + * Return QDF_STATUS - when fail, it usually means the buffer allocated is not + * big enough + */ QDF_STATUS csr_roam_get_wpa_rsn_rsp_ie(tpAniSirGlobal pMac, uint32_t sessionId, uint32_t *pLen, uint8_t *pBuf); -/* --------------------------------------------------------------------------- - \fn csr_roam_get_num_pmkid_cache - \brief return number of PMKID cache entries - \return uint32_t - the number of PMKID cache entries - -------------------------------------------------------------------------------*/ +/* + * csr_roam_get_num_pmkid_cache() - + * Return number of PMKID cache entries + * + * Return uint32_t - the number of PMKID cache entries + */ uint32_t csr_roam_get_num_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId); -/* --------------------------------------------------------------------------- - \fn csr_roam_get_pmkid_cache - \brief return PMKID cache from CSR - \param pNum - caller allocated memory that has the space of the number of pBuf tPmkidCacheInfo as input. Upon returned, *pNum has the - needed or actually number in tPmkidCacheInfo. - \param pPmkidCache - Caller allocated memory that contains PMKID cache, if any, upon return - \return QDF_STATUS - when fail, it usually means the buffer allocated is not big enough - -------------------------------------------------------------------------------*/ +/* + * csr_roam_get_pmkid_cache() - + * Return PMKID cache from CSR + * + * pNum - caller allocated memory that has the space of the number of pBuf + * tPmkidCacheInfo as input. Upon returned, *pNum has the needed or actually + * number in tPmkidCacheInfo. + * pPmkidCache - Caller allocated memory that contains PMKID cache, if any, + * upon return + * Return QDF_STATUS - when fail, it usually means the buffer allocated is + * not big enough + */ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, - uint32_t *pNum, tPmkidCacheInfo *pPmkidCache); + uint32_t *pNum, tPmkidCacheInfo *pPmkidCache); /** * csr_roam_get_connect_profile() - To return the current connect profile, @@ -865,63 +936,76 @@ QDF_STATUS csr_roam_get_pmkid_cache(tpAniSirGlobal pMac, uint32_t sessionId, QDF_STATUS csr_roam_get_connect_profile(tpAniSirGlobal pMac, uint32_t sessionId, tCsrRoamConnectedProfile *pProfile); -/* --------------------------------------------------------------------------- - \fn csr_roam_get_connect_state - \brief To return the current connect state of Roaming - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_roam_get_connect_state() + * To return the current connect state of Roaming + * + * Return QDF_STATUS + */ QDF_STATUS csr_roam_get_connect_state(tpAniSirGlobal pMac, uint32_t sessionId, eCsrConnectState *pState); void csr_roam_free_connect_profile(tCsrRoamConnectedProfile *profile); -/* --------------------------------------------------------------------------- - \fn csr_apply_channel_and_power_list - \brief HDD calls this function to set the WNI_CFG_VALID_CHANNEL_LIST base on the band/mode settings. - This function must be called after CFG is downloaded and all the band/mode setting already passed into - CSR. - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_apply_channel_and_power_list() - + * HDD calls this function to set the WNI_CFG_VALID_CHANNEL_LIST base on the + * band/mode settings. This function must be called after CFG is downloaded + * and all the band/mode setting already passed into CSR. + + * Return QDF_STATUS + */ QDF_STATUS csr_apply_channel_and_power_list(tpAniSirGlobal pMac); -/* --------------------------------------------------------------------------- - \fn csr_roam_connect_to_last_profile - \brief To disconnect and reconnect with the same profile - \return QDF_STATUS. It returns fail if currently connected - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_roam_connect_to_last_profile(tpAniSirGlobal pMac, uint32_t sessionId); - -/* --------------------------------------------------------------------------- - \fn csr_roam_disconnect - \brief To disconnect from a network - \param reason -- To indicate the reason for disconnecting. Currently, only eCSR_DISCONNECT_REASON_MIC_ERROR is meanful. - \return QDF_STATUS - -------------------------------------------------------------------------------*/ +/* + * csr_roam_connect_to_last_profile() - + * To disconnect and reconnect with the same profile + * + * Return QDF_STATUS. It returns fail if currently connected + */ +QDF_STATUS csr_roam_connect_to_last_profile(tpAniSirGlobal pMac, + uint32_t sessionId); + +/* + * csr_roam_disconnect() - + * To disconnect from a network + * + * Reason -- To indicate the reason for disconnecting. Currently, only + * eCSR_DISCONNECT_REASON_MIC_ERROR is meanful. + * Return QDF_STATUS + */ QDF_STATUS csr_roam_disconnect(tpAniSirGlobal pMac, uint32_t sessionId, eCsrRoamDisconnectReason reason); -/* --------------------------------------------------------------------------- - \fn csr_scan_get_pmkid_candidate_list - \brief return the PMKID candidate list - \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo - \param pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo allocated - when retruning, this is either the number needed or number of items put into pPmkidList - \return QDF_STATUS - when fail, it usually means the buffer allocated is not big enough and pNumItems - has the number of tPmkidCandidateInfo. - \Note: pNumItems is a number of tPmkidCandidateInfo, not sizeof(tPmkidCandidateInfo) * something - -------------------------------------------------------------------------------*/ -QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac, uint32_t sessionId, +/* + * csr_scan_get_pmkid_candidate_list() - + * Return the PMKID candidate list + * + * pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo + * pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo + * allocated when retruning, this is either the number needed or number of + * itemsput into pPmkidList + * Return QDF_STATUS - when fail, it usually means the buffer allocated is not + * big enough and pNumItems has the number of tPmkidCandidateInfo. + * Note: pNumItems is a number of tPmkidCandidateInfo, not + * sizeof(tPmkidCandidateInfo) * something + */ +QDF_STATUS csr_scan_get_pmkid_candidate_list(tpAniSirGlobal pMac, + uint32_t sessionId, tPmkidCandidateInfo *pPmkidList, uint32_t *pNumItems); -/* This function is used to stop a BSS. It is similar of csr_roamIssueDisconnect but this function */ -/* doesn't have any logic other than blindly trying to stop BSS */ +/* This function is used to stop a BSS. It is similar of csr_roamIssueDisconnect + * but this function doesn't have any logic other than blindly trying to stop + * BSS + */ QDF_STATUS csr_roam_issue_stop_bss_cmd(tpAniSirGlobal pMac, uint32_t sessionId, bool fHighPriority); void csr_call_roaming_completion_callback(tpAniSirGlobal pMac, tCsrRoamSession *pSession, - tCsrRoamInfo *pRoamInfo, uint32_t roamId, + tCsrRoamInfo *pRoamInfo, + uint32_t roamId, eCsrRoamResult roamResult); /** * csr_roam_issue_disassociate_sta_cmd() - disassociate a associated station @@ -951,26 +1035,29 @@ QDF_STATUS csr_roam_issue_deauth_sta_cmd(tpAniSirGlobal pMac, uint32_t sessionId, struct tagCsrDelStaParams *pDelStaParams); -/* --------------------------------------------------------------------------- - \fn csr_roam_issue_tkip_counter_measures - \brief csr function that HDD calls to start and stop tkip countermeasures - \param sessionId - session Id for Soft AP - \param bEnable - Flag to start/stop countermeasures - \return QDF_STATUS - ---------------------------------------------------------------------------*/ +/* + * csr_roam_issue_tkip_counter_measures() - + * csr function that HDD calls to start and stop tkip countermeasures + * + * sessionId - session Id for Soft AP + * bEnable - Flag to start/stop countermeasures + * Return QDF_STATUS + */ QDF_STATUS csr_roam_issue_tkip_counter_measures(tpAniSirGlobal pMac, - uint32_t sessionId, bool bEnable); - -/* --------------------------------------------------------------------------- - \fn csr_roam_get_associated_stas - \brief csr function that HDD calls to get list of associated stations based on module ID - \param sessionId - session Id for Soft AP - \param modId - module ID - PE/HAL/TL - \param pUsrContext - Opaque HDD context - \param pfnSapEventCallback - Sap event callback in HDD - \param pAssocStasBuf - Caller allocated memory to be filled with associatd stations info - \return QDF_STATUS - ---------------------------------------------------------------------------*/ + uint32_t sessionId, bool bEnable); + +/* + * csr_roam_get_associated_stas + * csr function that HDD calls to get list of associated stations based on + * module ID + * sessionId - session Id for Soft AP + * modId - module ID - PE/HAL/TL + * pUsrContext - Opaque HDD context + * pfnSapEventCallback - Sap event callback in HDD + * pAssocStasBuf - Caller allocated memory to be filled with associatd + * stations info + * Return QDF_STATUS + */ QDF_STATUS csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, QDF_MODULE_ID modId, void *pUsrContext, void *pfnSapEventCallback, @@ -984,16 +1071,18 @@ QDF_STATUS csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, void *pfnSapEventCallback, uint8_t *pAssocStasBuf); -/* --------------------------------------------------------------------------- - \fn csr_roam_get_wps_session_overlap - \brief csr function that HDD calls to get WPS PBC session overlap information - \param sessionId - session Id for Soft AP - \param pUsrContext - Opaque HDD context - \param pfnSapEventCallback - Sap event callback in HDD - \param pRemoveMac - pointer to MAC address of session to be removed - \return QDF_STATUS - ---------------------------------------------------------------------------*/ -QDF_STATUS csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, uint32_t sessionId, +/* + * csr_roam_get_wps_session_overlap() - + * csr function that HDD calls to get WPS PBC session overlap information + * + * sessionId - session Id for Soft AP + * pUsrContext - Opaque HDD context + * pfnSapEventCallback - Sap event callback in HDD + * pRemoveMac - pointer to MAC address of session to be removed + * Return QDF_STATUS + */ +QDF_STATUS csr_roam_get_wps_session_overlap(tpAniSirGlobal pMac, + uint32_t sessionId, void *pUsrContext, void *pfnSapEventCallback, struct qdf_mac_addr pRemoveMac); @@ -1005,12 +1094,13 @@ QDF_STATUS csr_send_mb_get_wpspbc_sessions(tpAniSirGlobal pMac, void *pfnSapEventCallback, struct qdf_mac_addr pRemoveMac); -/* --------------------------------------------------------------------------- - \fn csr_send_chng_mcc_beacon_interval - \brief csr function that HDD calls to send Update beacon interval - \param sessionId - session Id for Soft AP - \return QDF_STATUS - ---------------------------------------------------------------------------*/ +/* + * csr_send_chng_mcc_beacon_interval() - + * csr function that HDD calls to send Update beacon interval + * + * sessionId - session Id for Soft AP + * Return QDF_STATUS + */ QDF_STATUS csr_send_chng_mcc_beacon_interval(tpAniSirGlobal pMac, uint32_t sessionId); @@ -1041,7 +1131,8 @@ bool csr_neighbor_roam_is_new_connected_profile(tpAniSirGlobal pMac, uint8_t sessionId); bool csr_neighbor_roam_connected_profile_match(tpAniSirGlobal pMac, uint8_t sessionId, - tCsrScanResult *pResult, + struct tag_csrscan_result + *pResult, tDot11fBeaconIEs *pIes); QDF_STATUS csr_scan_create_entry_in_scan_cache(tpAniSirGlobal pMac, diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index 092009a1d976..4d50f272360d 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -747,7 +747,8 @@ bool csr_neighbor_roam_is_new_connected_profile(tpAniSirGlobal pMac, bool csr_neighbor_roam_connected_profile_match(tpAniSirGlobal pMac, uint8_t sessionId, - tCsrScanResult *pResult, + struct tag_csrscan_result + *pResult, tDot11fBeaconIEs *pIes) { tCsrRoamConnectedProfile *pCurProfile = NULL; |
