qcacld-3.0: Fix layer violation in SME

Some of the SME APIs are using lim APIs, remove those violation.

CRs-Fixed: 992939
Change-Id: I0f29b5ab3a4c5df9881b5af556d155a22acfd392
This commit is contained in:
Rajeev Kumar 2016-04-15 16:26:36 -07:00 • committed by Gerrit - the friendly Code Review server
commit 43e25b17d1
10 changed files with 52 additions and 26 deletions

View file

@ -76,6 +76,8 @@
#define CTRY_DEFAULT 0
#define COUNTRY_ERD_FLAG 0x8000
#define WORLDWIDE_ROAMING_FLAG 0x4000
#define MIN_TX_PWR_CAP 8
#define MAX_TX_PWR_CAP 22
enum country_code {
CTRY_AFGHANISTAN = 4,

View file

@ -50,9 +50,6 @@ typedef enum {
TWO_BYTE = 2
} eSizeOfLenField;
#define MIN_TX_PWR_CAP 8
#define MAX_TX_PWR_CAP 22
#define LIM_STA_ID_MASK 0x00FF
#define LIM_AID_MASK 0xC000
#define LIM_SPECTRUM_MANAGEMENT_BIT_MASK 0x0100

View file

@ -142,7 +142,6 @@ typedef enum {
} eCsrPhyMode;
typedef enum {
eCSR_BSS_TYPE_NONE,
eCSR_BSS_TYPE_INFRASTRUCTURE,
eCSR_BSS_TYPE_INFRA_AP, /* SoftAP AP */
eCSR_BSS_TYPE_IBSS, /* IBSS network we'll NOT start */

View file

@ -801,6 +801,8 @@ QDF_STATUS sme_update_add_ie(tHalHandle hHal,
tSirUpdateIE *pUpdateIE, eUpdateIEsType updateType);
QDF_STATUS sme_update_connect_debug(tHalHandle hHal, uint32_t set_value);
const char *sme_request_type_to_string(const uint8_t request_type);
const char *sme_scan_type_to_string(const uint8_t scan_type);
const char *sme_bss_type_to_string(const uint8_t bss_type);
QDF_STATUS sme_ap_disable_intra_bss_fwd(tHalHandle hHal, uint8_t sessionId,
bool disablefwd);
uint32_t sme_get_channel_bonding_mode5_g(tHalHandle hHal);

View file

@ -28,8 +28,6 @@
#if !defined(__SME_FTAPI_H)
#define __SME_FTAPI_H
#include <lim_ft_defs.h>
typedef enum eFTIEState {
eFT_START_READY, /* Start before and after 11r assoc */
eFT_AUTH_REQ_READY, /* When we have recvd the 1st or nth auth req */

View file

@ -35,7 +35,6 @@
#include "ani_global.h" /* for tpAniSirGlobal */
#include "wma_types.h"
#include "wma_if.h" /* for STA_INVALID_IDX. */
#include "lim_utils.h"
#include "cds_mq.h"
#include "csr_inside_api.h"
#include "sms_debug.h"
@ -91,9 +90,6 @@ static bool b_roam_scan_offload_started;
------------------------------------------------------------------------*/
static tCsrRoamSession csr_roam_roam_session[CSR_ROAM_SESSION_MAX];
/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
int diag_auth_type_from_csr_type(eCsrAuthType authType)
{
@ -7330,7 +7326,7 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
pSession->join_bssid_count = 0;
sms_log(pMac, LOG1,
FL("called BSSType = %s (%d) authtype = %d encryType = %d"),
lim_bss_type_to_string(pProfile->BSSType),
sme_bss_type_to_string(pProfile->BSSType),
pProfile->BSSType, pProfile->AuthType.authType[0],
pProfile->EncryptionType.encryptionType[0]);
csr_roam_cancel_roaming(pMac, sessionId);
@ -7526,7 +7522,7 @@ csr_roam_reassoc(tpAniSirGlobal mac_ctx, uint32_t session_id,
}
sms_log(mac_ctx, LOG1,
FL("called BSSType = %s (%d) authtype = %d encryType = %d"),
lim_bss_type_to_string(profile->BSSType),
sme_bss_type_to_string(profile->BSSType),
profile->BSSType, profile->AuthType.authType[0],
profile->EncryptionType.encryptionType[0]);
csr_roam_cancel_roaming(mac_ctx, session_id);
@ -14782,7 +14778,7 @@ QDF_STATUS csr_process_add_sta_session_command(tpAniSirGlobal pMac,
add_sta_self_req = qdf_mem_malloc(sizeof(struct add_sta_self_params));
if (NULL == add_sta_self_req) {
lim_log(pMac, LOGP,
sms_log(pMac, LOGP,
FL
("Unable to allocate memory for tAddSelfStaParams"));
return status;
@ -14800,15 +14796,14 @@ QDF_STATUS csr_process_add_sta_session_command(tpAniSirGlobal pMac,
msg.bodyptr = add_sta_self_req;
msg.bodyval = 0;
lim_log(pMac, LOG1,
sms_log(pMac, LOG1,
FL
("Send WMA_ADD_STA_SELF_REQ for selfMac=" MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(add_sta_self_req->self_mac_addr));
MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msg.type));
status = wma_post_ctrl_msg(pMac, &msg);
if (status != QDF_STATUS_SUCCESS) {
lim_log(pMac, LOGP, FL("wma_post_ctrl_msg failed"));
sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed"));
qdf_mem_free(add_sta_self_req);
add_sta_self_req = NULL;
}
@ -14999,7 +14994,7 @@ QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal pMac,
QDF_STATUS status = QDF_STATUS_E_FAILURE;
del_sta_self_req = qdf_mem_malloc(sizeof(struct del_sta_self_params));
if (NULL == del_sta_self_req) {
lim_log(pMac, LOGP,
sms_log(pMac, LOGP,
FL(" mem alloc failed for tDelStaSelfParams"));
return QDF_STATUS_E_NOMEM;
}
@ -15016,7 +15011,6 @@ QDF_STATUS csr_process_del_sta_session_command(tpAniSirGlobal pMac,
sms_log(pMac, LOG1,
FL("sending WMA_DEL_STA_SELF_REQ"));
MTRACE(mac_trace_msg_tx(pMac, NO_SESSION, msg.type));
status = wma_post_ctrl_msg(pMac, &msg);
if (status != QDF_STATUS_SUCCESS) {
sms_log(pMac, LOGP, FL("wma_post_ctrl_msg failed"));

View file

@ -49,7 +49,6 @@
#include "wma_types.h"
#include "cds_utils.h"
#include "cfg_api.h"
#include "lim_api.h"
#include "wma.h"
#include "cds_concurrency.h"
@ -4867,10 +4866,10 @@ QDF_STATUS csr_send_mb_scan_req(tpAniSirGlobal pMac, uint16_t sessionId,
pScanReqParam->hiddenSsid);
sms_log(pMac, LOG1,
FL("scanType = %s (%u) BSSType = %s (%u) numOfSSIDs = %d"
" numOfChannels = %d requestType = %s (%d) p2pSearch = %d\n"),
lim_scan_type_to_string(pScanReq->scanType),
" numOfChannels = %d requestType = %s (%d) p2pSearch = %d\n"),
sme_scan_type_to_string(pScanReq->scanType),
pScanReq->scanType,
lim_bss_type_to_string(pScanReq->BSSType),
sme_bss_type_to_string(pScanReq->BSSType),
pScanReq->BSSType,
pScanReq->SSIDs.numOfSSIDs,
pScanReq->ChannelInfo.numOfChannels,
@ -5017,8 +5016,8 @@ send_scan_req:
sms_log(pMac, LOG1,
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_scan_type_to_string(pMsg->scanType), pMsg->scanType,
sme_bss_type_to_string(pMsg->bssType), pMsg->bssType,
sme_request_type_to_string(pScanReq->requestType),
pScanReq->requestType, pMsg->channelList.numChannels);

View file

@ -5591,6 +5591,42 @@ const char *sme_request_type_to_string(const uint8_t request_type)
}
}
/**
* sme_bsstype_to_string() - converts bss type to string.
* @bss_type: bss type enum
*
* Return: printable string for bss type
*/
const char *sme_bss_type_to_string(const uint8_t bss_type)
{
switch (bss_type) {
CASE_RETURN_STRING(eCSR_BSS_TYPE_INFRASTRUCTURE);
CASE_RETURN_STRING(eCSR_BSS_TYPE_INFRA_AP);
CASE_RETURN_STRING(eCSR_BSS_TYPE_IBSS);
CASE_RETURN_STRING(eCSR_BSS_TYPE_START_IBSS);
CASE_RETURN_STRING(eCSR_BSS_TYPE_ANY);
default:
return "unknown bss type";
}
}
/**
* sme_scantype_to_string() - converts scan type to string.
* @scan_type: scan type enum
*
* Return: printable string for scan type
*/
const char *sme_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";
}
}
QDF_STATUS csr_add_to_channel_list_front(uint8_t *pChannelList,
int numChannels, uint8_t channel)
{

View file

@ -30,8 +30,8 @@
#include "csr_inside_api.h"
#include "sme_inside.h"
#include "nan_api.h"
#include "lim_api.h"
#include "cfg_api.h"
#include "wma_types.h"
/******************************************************************************
* Function: sme_nan_register_callback

View file

@ -30,7 +30,6 @@
#include "csr_inside_api.h"
#include "sme_inside.h"
#include "p2p_api.h"
#include "lim_api.h"
#include "cfg_api.h"
#include "wma.h"