qcacld-3.0: Replace lim_log() with pe_* log levels in lim_process_assoc_req_frame.c

Replace lim_log() with pe_* appropriate log levels in
lim_process_assoc_req_frame.c

Change-Id: Ic0c990b49394cce9028c43b7d46d82c0e30e43e1
CRs-Fixed: 1093093
This commit is contained in:
Nishank Aggarwal
2017-03-23 19:11:08 +05:30
committed by snandini
parent 524ee9a803
commit 8935e442a8

View File

@@ -74,8 +74,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
if (assoc_req->supportedChannels.length >=
SIR_MAX_SUPPORTED_CHANNEL_LIST) {
lim_log(mac_ctx, LOGE,
FL("Number of supported channels:%d is more than MAX"),
pe_err("Number of supported channels: %d is more than MAX",
assoc_req->supportedChannels.length);
assoc_ind->supportedChannels.numChnl = 0;
return;
@@ -90,13 +89,10 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
/* Get Number of Channels in a Subband */
chn_count = assoc_req->supportedChannels.supportedChannels[i];
lim_log(mac_ctx, LOGD,
FL("Rcv assoc_req: chnl=%d, numOfChnl=%d "),
pe_debug("Rcv assoc_req: chnl: %d numOfChnl: %d",
first_ch_no, chn_count);
if (index >= SIR_MAX_SUPPORTED_CHANNEL_LIST) {
lim_log(mac_ctx, LOGW,
FL("Ch count > max supported =%d "),
chn_count);
pe_warn("Ch count > max supported: %d", chn_count);
assoc_ind->supportedChannels.numChnl = 0;
return;
}
@@ -116,9 +112,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
= next_ch_no;
index++;
if (index >= SIR_MAX_SUPPORTED_CHANNEL_LIST) {
lim_log(mac_ctx, LOGW,
FL("Ch count > supported =%d "),
chn_count);
pe_warn("Ch count > supported: %d", chn_count);
assoc_ind->supportedChannels.numChnl = 0;
return;
}
@@ -126,8 +120,7 @@ static void lim_convert_supported_channels(tpAniSirGlobal mac_ctx,
}
assoc_ind->supportedChannels.numChnl = (uint8_t) index;
lim_log(mac_ctx, LOGD,
FL("Send AssocInd to WSM: minPwr %d, maxPwr %d, numChnl %d"),
pe_debug("Send AssocInd to WSM: minPwr: %d maxPwr: %d numChnl: %d",
assoc_ind->powerCap.minTxPower,
assoc_ind->powerCap.maxTxPower,
assoc_ind->supportedChannels.numChnl);
@@ -168,9 +161,8 @@ static bool lim_check_sta_in_pe_entries(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr
(sessionid != session->peSessionId))
#endif
) {
lim_log(mac_ctx, LOGE,
FL("Sending Disassoc and Deleting existing STA entry: "
MAC_ADDRESS_STR),
pe_err("Sending Disassoc and Deleting existing STA entry:"
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(session->selfMacAddr));
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
@@ -213,7 +205,7 @@ static bool lim_chk_sa_da(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
(uint8_t) (sizeof(tSirMacAddr))))
return true;
lim_log(mac_ctx, LOGE, FL("Assoc Req rejected: wlan.sa = wlan.da"));
pe_err("Assoc Req rejected: wlan.sa = wlan.da");
lim_send_assoc_rsp_mgmt_frame(mac_ctx, eSIR_MAC_UNSPEC_FAILURE_STATUS,
1, hdr->sa, sub_type, 0, session);
return false;
@@ -240,8 +232,7 @@ static bool lim_chk_tkip(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (!(session->bTkipCntrMeasActive && LIM_IS_AP_ROLE(session)))
return true;
lim_log(mac_ctx, LOGE,
FL("Assoc Req rejected: TKIP counter measure is active"));
pe_err("Assoc Req rejected: TKIP counter measure is active");
lim_send_assoc_rsp_mgmt_frame(mac_ctx, eSIR_MAC_MIC_FAILURE_REASON, 1,
hdr->sa, sub_type, 0, session);
return false;
@@ -280,9 +271,8 @@ static bool lim_chk_assoc_req_parse_error(tpAniSirGlobal mac_ctx,
if (status == eSIR_SUCCESS)
return true;
lim_log(mac_ctx, LOGW,
FL("Assoc Req rejected: frame parsing error. source addr:"
MAC_ADDRESS_STR), MAC_ADDR_ARRAY(hdr->sa));
pe_warn("Assoc Req rejected: frame parsing error. source addr:"
MAC_ADDRESS_STR, MAC_ADDR_ARRAY(hdr->sa));
lim_send_assoc_rsp_mgmt_frame(mac_ctx, eSIR_MAC_UNSPEC_FAILURE_STATUS,
1, hdr->sa, sub_type, 0, session);
return false;
@@ -308,7 +298,7 @@ static bool lim_chk_capab(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
uint16_t temp;
if (cfg_get_capability_info(mac_ctx, &temp, session) != eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE, FL("could not retrieve Capabilities"));
pe_err("could not retrieve Capabilities");
return false;
}
@@ -316,9 +306,8 @@ static bool lim_chk_capab(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (lim_compare_capabilities(mac_ctx, assoc_req,
local_cap, session) == false) {
lim_log(mac_ctx, LOGW,
FL("Rcvd %s Req with unsupported capab from"
MAC_ADDRESS_STR),
pe_warn("Rcvd %s Req with unsupported capab from"
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
/*
@@ -353,9 +342,8 @@ static bool lim_chk_ssid(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (lim_cmp_ssid(&assoc_req->ssId, session) != true)
return true;
lim_log(mac_ctx, LOGE,
FL("%s Req with ssid wrong(Rcvd: %.*s self: %.*s) from "
MAC_ADDRESS_STR),
pe_err("%s Req with ssid wrong(Rcvd: %.*s self: %.*s) from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
assoc_req->ssId.length, assoc_req->ssId.ssId,
session->ssId.length, session->ssId.ssId,
@@ -411,9 +399,8 @@ static bool lim_chk_rates(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (lim_check_rx_basic_rates(mac_ctx, basic_rates, session) == true)
return true;
lim_log(mac_ctx, LOGW,
FL("Assoc Req rejected: unsupported rates, soruce addr: %s"
MAC_ADDRESS_STR),
pe_warn("Assoc Req rejected: unsupported rates, soruce addr: %s"
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
/*
@@ -445,9 +432,8 @@ static bool lim_chk_11g_only(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (LIM_IS_AP_ROLE(session) &&
(session->dot11mode == WNI_CFG_DOT11_MODE_11G_ONLY) &&
(assoc_req->HTCaps.present)) {
lim_log(mac_ctx, LOGE,
FL("SOFTAP was in 11G only mode, rejecting legacy STA: "
MAC_ADDRESS_STR),
pe_err("SOFTAP was in 11G only mode, rejecting legacy STA: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(hdr->sa));
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS,
@@ -476,9 +462,8 @@ static bool lim_chk_11n_only(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
if (LIM_IS_AP_ROLE(session) &&
(session->dot11mode == WNI_CFG_DOT11_MODE_11N_ONLY) &&
(!assoc_req->HTCaps.present)) {
lim_log(mac_ctx, LOGE,
FL("SOFTAP was in 11N only mode, rejecting legacy STA: "
MAC_ADDRESS_STR),
pe_err("SOFTAP was in 11N only mode, rejecting legacy STA: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(hdr->sa));
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS,
@@ -520,8 +505,7 @@ static bool lim_chk_11ac_only(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS,
1, hdr->sa, sub_type, 0, session);
lim_log(mac_ctx, LOGE,
FL("SOFTAP was in 11AC only mode, reject"));
pe_err("SOFTAP was in 11AC only mode, reject");
return false;
}
return true;
@@ -559,17 +543,15 @@ lim_process_for_spectrum_mgmt(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
* missing, log the peers error
*/
if (!assoc_req->powerCapabilityPresent) {
lim_log(mac_ctx, LOGW,
FL("LIM Info: Missing Power capability IE in %s Req from "
MAC_ADDRESS_STR),
pe_warn("LIM Info: Missing Power capability IE in %s Req from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ?
"Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
}
if (!assoc_req->supportedChannelsPresent) {
lim_log(mac_ctx, LOGW,
FL("LIM Info: Missing Supported channel IE in %s Req from "
MAC_ADDRESS_STR),
pe_warn("LIM Info: Missing Supported channel IE in %s Req from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ?
"Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
@@ -580,9 +562,8 @@ lim_process_for_spectrum_mgmt(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
lim_is_dot11h_power_capabilities_in_range(
mac_ctx, assoc_req, session);
if (eSIR_SUCCESS != status) {
lim_log(mac_ctx, LOGW,
FL("LIM Info: MinTxPower(STA) > MaxTxPower(AP) in %s Req from "
MAC_ADDRESS_STR),
pe_warn("LIM Info: MinTxPower(STA) > MaxTxPower(AP) in %s Req from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ?
"Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
@@ -590,9 +571,8 @@ lim_process_for_spectrum_mgmt(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
status = lim_is_dot11h_supported_channels_valid(
mac_ctx, assoc_req);
if (eSIR_SUCCESS != status) {
lim_log(mac_ctx, LOGW,
FL("LIM Info: wrong supported channels (STA) in %s Req from "
MAC_ADDRESS_STR),
pe_warn("LIM Info: wrong supported channels (STA) in %s Req from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ?
"Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
@@ -637,9 +617,8 @@ static bool lim_chk_mcs(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
{
if ((assoc_req->HTCaps.present) && (lim_check_mcs_set(mac_ctx,
assoc_req->HTCaps.supportedMCSSet) == false)) {
lim_log(mac_ctx, LOGW,
FL("rcvd %s req with unsupported MCS Rate Set from "
MAC_ADDRESS_STR),
pe_warn("rcvd %s req with unsupported MCS Rate Set from "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
/*
@@ -679,8 +658,7 @@ static bool lim_chk_is_11b_sta_supported(tpAniSirGlobal mac_ctx,
if (phy_mode == WNI_CFG_PHY_MODE_11G) {
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11G_ONLY_POLICY,
&cfg_11g_only) != eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("couldn't get 11g-only flag"));
pe_err("couldn't get 11g-only flag");
return false;
}
@@ -694,8 +672,7 @@ static bool lim_chk_is_11b_sta_supported(tpAniSirGlobal mac_ctx,
eSIR_MAC_BASIC_RATES_NOT_SUPPORTED_STATUS,
1, hdr->sa, sub_type, 0, session);
lim_log(mac_ctx, LOGW,
FL("Rejecting Re/Assoc req from 11b STA: "));
pe_warn("Rejecting Re/Assoc req from 11b STA:");
lim_print_mac_addr(mac_ctx, hdr->sa, LOGW);
#ifdef WLAN_DEBUG
@@ -725,8 +702,7 @@ static void lim_print_ht_cap(tpAniSirGlobal mac_ctx, tpPESession session,
if (assoc_req->HTCaps.present) {
/* The station *does* support 802.11n HT capability... */
lim_log(mac_ctx, LOGD,
FL("AdvCodingCap:%d ChaWidthSet:%d PowerSave:%d greenField:%d shortGI20:%d shortGI40:%d txSTBC:%d rxSTBC:%d delayBA:%d maxAMSDUsize:%d DSSS/CCK:%d PSMP:%d stbcCntl:%d lsigTXProt:%d"),
pe_debug("AdvCodingCap:%d ChaWidthSet:%d PowerSave:%d greenField:%d shortGI20:%d shortGI40:%d txSTBC:%d rxSTBC:%d delayBA:%d maxAMSDUsize:%d DSSS/CCK:%d PSMP:%d stbcCntl:%d lsigTXProt:%d",
assoc_req->HTCaps.advCodingCap,
assoc_req->HTCaps.supportedChannelWidthSet,
assoc_req->HTCaps.mimoPowerSave,
@@ -785,8 +761,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
wps_ie = limGetWscIEPtr(mac_ctx, assoc_req->addIE.addIEdata,
assoc_req->addIE.length);
else
lim_log(mac_ctx, LOGD,
FL("Assoc req addIEPresent = %d addIE length = %d"),
pe_debug("Assoc req addIEPresent: %d addIE length: %d",
assoc_req->addIEPresent, assoc_req->addIE.length);
/* when wps_ie is present, RSN/WPA IE is ignored */
@@ -795,9 +770,8 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
if (LIM_IS_AP_ROLE(session) &&
session->pLimStartBssReq->privacy &&
session->pLimStartBssReq->rsnIE.length) {
lim_log(mac_ctx, LOGE,
FL("RSN enabled auth, Re/Assoc req from STA: "
MAC_ADDRESS_STR),
pe_err("RSN enabled auth, Re/Assoc req from STA: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(hdr->sa));
if (assoc_req->rsnPresent) {
if (assoc_req->rsn.length) {
@@ -821,8 +795,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
assoc_req->HTCaps.present,
pmf_connection);
if (eSIR_SUCCESS != status) {
lim_log(mac_ctx, LOGW,
FL("Re/Assoc rejected from: " MAC_ADDRESS_STR),
pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(
hdr->sa));
@@ -842,8 +815,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
return false;
}
} else {
lim_log(mac_ctx, LOGW,
FL("Re/Assoc rejected from: " MAC_ADDRESS_STR),
pe_warn("Re/Assoc rejected from: " MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(
hdr->sa));
/*
@@ -858,9 +830,8 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
return false;
}
} else {
lim_log(mac_ctx, LOGW,
FL("Re/Assoc rejected from: "
MAC_ADDRESS_STR),
pe_warn("Re/Assoc rejected from: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(hdr->sa));
/*
* rcvd Assoc req frame with RSN IE but
@@ -890,9 +861,8 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
session,
assoc_req->HTCaps.present);
if (eSIR_SUCCESS != status) {
lim_log(mac_ctx, LOGW,
FL("Re/Assoc rejected from: "
MAC_ADDRESS_STR),
pe_warn("Re/Assoc rejected from: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(
hdr->sa));
/*
@@ -906,9 +876,8 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
return false;
}
} else {
lim_log(mac_ctx, LOGW,
FL("Re/Assoc rejected from: "
MAC_ADDRESS_STR),
pe_warn("Re/Assoc rejected from: "
MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(hdr->sa));
/*
* rcvd Assoc req frame with invalid WPA
@@ -928,7 +897,7 @@ static bool lim_chk_n_process_wpa_rsn_ie(tpAniSirGlobal mac_ctx,
*/
} /* end of if( ! assoc_req->wscInfo.present ) */
else {
lim_log(mac_ctx, LOGD, FL("Assoc req WSE IE is present"));
pe_debug("Assoc req WSE IE is present");
}
return true;
}
@@ -961,7 +930,7 @@ static bool lim_process_assoc_req_no_sta_ctx(tpAniSirGlobal mac_ctx,
* Maximum number of STAs that AP can handle reached.
* Send Association response to peer MAC entity
*/
lim_log(mac_ctx, LOGE, FL("Max Sta count reached : %d"),
pe_err("Max Sta count reached : %d",
mac_ctx->lim.maxStation);
lim_reject_association(mac_ctx, hdr->sa, sub_type, false,
(tAniAuthType) 0, 0, false,
@@ -983,9 +952,8 @@ static bool lim_process_assoc_req_no_sta_ctx(tpAniSirGlobal mac_ctx,
eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON,
hdr->sa, session, false);
lim_log(mac_ctx, LOGW,
FL("rcvd %s req, sessionid: %d, without pre-auth ctx"
MAC_ADDRESS_STR),
pe_warn("rcvd %s req, sessionid: %d, without pre-auth ctx"
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
session->peSessionId, MAC_ADDR_ARRAY(hdr->sa));
return false;
@@ -1032,15 +1000,13 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
#ifdef WLAN_DEBUG
mac_ctx->lim.gLimNumAssocReqDropInvldState++;
#endif
lim_log(mac_ctx, LOGD,
FL("received Assoc req in state %X from "),
pe_debug("received Assoc req in state: %X from",
sta_ds->mlmStaContext.mlmState);
} else {
#ifdef WLAN_DEBUG
mac_ctx->lim.gLimNumReassocReqDropInvldState++;
#endif
lim_log(mac_ctx, LOGD,
FL("received ReAssoc req in state %X from "),
pe_debug("received ReAssoc req in state: %X from",
sta_ds->mlmStaContext.mlmState);
}
lim_print_mac_addr(mac_ctx, hdr->sa, LOGD);
@@ -1052,9 +1018,8 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
/* STA sent assoc req frame while already in 'associated' state */
#ifdef WLAN_FEATURE_11W
lim_log(mac_ctx, LOGD,
FL("Re/Assoc request from station that is already associated"));
lim_log(mac_ctx, LOGD, FL("PMF enabled %d, SA Query state %d"),
pe_debug("Re/Assoc request from station that is already associated");
pe_debug("PMF enabled: %d, SA Query state: %d",
sta_ds->rmfEnabled, sta_ds->pmfSaQueryState);
if (sta_ds->rmfEnabled) {
switch (sta_ds->pmfSaQueryState) {
@@ -1082,8 +1047,7 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
/* start timer for SA Query retry */
if (tx_timer_activate(&sta_ds->pmfSaQueryTimer)
!= TX_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("PMF SA Query timer start failed!"));
pe_err("PMF SA Query timer start failed!");
return false;
}
sta_ds->pmfSaQueryState = DPH_SA_QUERY_IN_PROGRESS;
@@ -1114,8 +1078,7 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
(!qdf_mem_cmp(&sta_ds->mlmStaContext.capabilityInfo,
&assoc_req->capabilityInfo,
sizeof(tSirMacCapabilityInfo)))) {
lim_log(mac_ctx, LOGE,
FL(" Received Assoc req in state %X STAid=%d"),
pe_err("Received Assoc req in state: %X STAid: %d",
sta_ds->mlmStaContext.mlmState, peer_idx);
return false;
} else {
@@ -1124,8 +1087,7 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
* 'associated' state. Update STA capabilities and send
* Association response frame with same AID
*/
lim_log(mac_ctx, LOGD,
FL("Rcvd Assoc req from STA already connected"));
pe_debug("Rcvd Assoc req from STA already connected");
sta_ds->mlmStaContext.capabilityInfo =
assoc_req->capabilityInfo;
if (sta_pre_auth_ctx && (sta_pre_auth_ctx->mlmState ==
@@ -1140,8 +1102,7 @@ static bool lim_process_assoc_req_sta_ctx(tpAniSirGlobal mac_ctx,
*update_ctx = true;
if (dph_init_sta_state(mac_ctx, hdr->sa, peer_idx, true,
&session->dph.dphHashTable) == NULL) {
lim_log(mac_ctx, LOGE,
FL("could not Init STAid=%d"), peer_idx);
pe_err("could not Init STAid: %d", peer_idx);
return false;
}
}
@@ -1179,8 +1140,7 @@ static bool lim_chk_wmm(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
&(assoc_req->qosCapability),
0, false, NULL, &tspecIdx, session) !=
eSIR_SUCCESS) {
lim_log(mac_ctx, LOGW,
FL("AdmitControl: TSPEC rejected"));
pe_warn("AdmitControl: TSPEC rejected");
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_QAP_NO_BANDWIDTH_REASON,
1, hdr->sa, sub_type, 0, session);
@@ -1191,8 +1151,7 @@ static bool lim_chk_wmm(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
}
} else if (lim_admit_control_add_sta(mac_ctx, hdr->sa, false)
!= eSIR_SUCCESS) {
lim_log(mac_ctx, LOGW,
FL("AdmitControl: Sta rejected"));
pe_warn("AdmitControl: Sta rejected");
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_QAP_NO_BANDWIDTH_REASON, 1,
hdr->sa, sub_type, 0, session);
@@ -1202,7 +1161,7 @@ static bool lim_chk_wmm(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
return false;
}
/* else all ok */
lim_log(mac_ctx, LOGD, FL("AdmitControl: Sta OK!"));
pe_debug("AdmitControl: Sta OK!");
}
return true;
}
@@ -1428,9 +1387,8 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
&assoc_req->he_cap) != eSIR_SUCCESS)
{
/* Could not update hash table entry at DPH with rateset */
lim_log(mac_ctx, LOGE,
FL("Couldn't update hash entry for aid=%d, MacAddr: "
MAC_ADDRESS_STR),
pe_err("Couldn't update hash entry for aid: %d MacAddr: "
MAC_ADDRESS_STR,
peer_idx, MAC_ADDR_ARRAY(hdr->sa));
/* Release AID */
@@ -1440,11 +1398,10 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
sub_type, true, auth_type, peer_idx, false,
(tSirResultCodes)eSIR_MAC_UNSPEC_FAILURE_STATUS,
session);
lim_log(mac_ctx, LOGE,
FL(" Delete dph hash entry"));
pe_err("Delete dph hash entry");
if (dph_delete_hash_entry(mac_ctx, hdr->sa, sta_ds->assocId,
&session->dph.dphHashTable) != eSIR_SUCCESS)
lim_log(mac_ctx, LOGE, FL("error deleting hash entry"));
pe_err("error deleting hash entry");
return false;
}
if (assoc_req->operMode.present) {
@@ -1487,8 +1444,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
* Rcvd Re/Assoc Req from STA when UPASD is
* not supported.
*/
lim_log(mac_ctx, LOGE,
FL("UAPSD not supported, reply accordingly"));
pe_err("UAPSD not supported, reply accordingly");
/* update UAPSD and send it to LIM to add STA */
sta_ds->qos.capability.qosInfo.acbe_uapsd = 0;
sta_ds->qos.capability.qosInfo.acbk_uapsd = 0;
@@ -1522,8 +1478,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
timer_id.fields.peerIdx = peer_idx;
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_PMF_SA_QUERY_RETRY_INTERVAL,
&retry_interval) != eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("Couldn't get PMF SA Query retry interval value"));
pe_err("Couldn't get PMF SA Query retry interval value");
lim_reject_association(mac_ctx, hdr->sa, sub_type, true,
auth_type, peer_idx, false,
(tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS,
@@ -1538,8 +1493,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
timer_id.value,
SYS_MS_TO_TICKS((retry_interval * 1024) / 1000),
0, TX_NO_ACTIVATE) != TX_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("could not create PMF SA Query timer"));
pe_err("could not create PMF SA Query timer");
lim_reject_association(mac_ctx, hdr->sa, sub_type,
true, auth_type, peer_idx, false,
(tSirResultCodes)eSIR_MAC_UNSPEC_FAILURE_STATUS,
@@ -1553,7 +1507,7 @@ static bool lim_update_sta_ds(tpAniSirGlobal mac_ctx, tpSirMacMgmtHdr hdr,
(struct s_ext_cap *) assoc_req->ExtCap.bytes, mac_ctx);
} else {
sta_ds->timingMeasCap = 0;
lim_log(mac_ctx, LOGD, FL("ExtCap not present"));
pe_debug("ExtCap not present");
}
return true;
}
@@ -1594,8 +1548,7 @@ static bool lim_update_sta_ctx(tpAniSirGlobal mac_ctx, tpPESession session,
*/
if (lim_add_sta(mac_ctx, sta_ds, false, session) !=
eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("could not Add STA with assocId=%d"),
pe_err("could not Add STA with assocId: %d",
sta_ds->assocId);
lim_reject_association(mac_ctx, sta_ds->staAddr,
sta_ds->mlmStaContext.subType, true,
@@ -1626,8 +1579,7 @@ static bool lim_update_sta_ctx(tpAniSirGlobal mac_ctx, tpPESession session,
eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE;
if (lim_del_sta(mac_ctx, sta_ds, true, session)
!= eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("Couldn't DEL STA, assocId=%d staId %d"),
pe_err("Couldn't DEL STA, assocId: %d staId: %d",
sta_ds->assocId, sta_ds->staIndex);
lim_reject_association(mac_ctx, sta_ds->staAddr,
sta_ds->mlmStaContext.subType, true,
@@ -1651,8 +1603,7 @@ static bool lim_update_sta_ctx(tpAniSirGlobal mac_ctx, tpPESession session,
*/
if (lim_add_sta(mac_ctx, sta_ds, false, session)
!= eSIR_SUCCESS) {
lim_log(mac_ctx, LOGE,
FL("UPASD not supported, REASSOC Failed"));
pe_err("UPASD not supported, REASSOC Failed");
lim_reject_association(mac_ctx, sta_ds->staAddr,
sta_ds->mlmStaContext.subType, true,
sta_ds->mlmStaContext.authType,
@@ -1764,17 +1715,15 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info);
frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
lim_log(mac_ctx, LOGD,
FL("Rcvd %s Req Frame, sessionid: %d systemrole %d MlmState %d from: "
MAC_ADDRESS_STR),
pe_debug("Rcvd: %s Req Frame sessionid: %d systemrole: %d MlmState: %d from: "
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
session->peSessionId, GET_LIM_SYSTEM_ROLE(session),
session->limMlmState, MAC_ADDR_ARRAY(hdr->sa));
if (LIM_IS_STA_ROLE(session)) {
lim_log(mac_ctx, LOGE,
FL("Rcvd unexpected ASSOC REQ, sessionid: %d sys sub_type=%d for role=%d from: "
MAC_ADDRESS_STR),
pe_err("Rcvd unexpected ASSOC REQ, sessionid: %d sys sub_type: %d for role: %d from: "
MAC_ADDRESS_STR,
session->peSessionId, sub_type,
GET_LIM_SYSTEM_ROLE(session),
MAC_ADDR_ARRAY(hdr->sa));
@@ -1784,8 +1733,8 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
return;
}
if (session->limMlmState == eLIM_MLM_WT_DEL_BSS_RSP_STATE) {
lim_log(mac_ctx, LOGE, FL("drop ASSOC REQ on sessionid: %d "
"role=%d from: "MAC_ADDRESS_STR" in limMlmState %d"),
pe_err("drop ASSOC REQ on sessionid: %d "
"role: %d from: "MAC_ADDRESS_STR" in limMlmState: %d",
session->peSessionId,
GET_LIM_SYSTEM_ROLE(session),
MAC_ADDR_ARRAY(hdr->sa),
@@ -1804,9 +1753,8 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
&session->dph.dphHashTable);
if (NULL != sta_ds) {
if (hdr->fc.retry > 0) {
lim_log(mac_ctx, LOGE,
FL("STA is initiating Assoc Req after ACK lost. Do not process sessionid: %d sys sub_type=%d for role=%d from: "
MAC_ADDRESS_STR), session->peSessionId,
pe_err("STA is initiating Assoc Req after ACK lost. Do not process sessionid: %d sys sub_type=%d for role=%d from: "
MAC_ADDRESS_STR, session->peSessionId,
sub_type, GET_LIM_SYSTEM_ROLE(session),
MAC_ADDR_ARRAY(hdr->sa));
return;
@@ -1820,9 +1768,8 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
sta_ds->assocId, sta_ds->staAddr,
sta_ds->mlmStaContext.subType,
sta_ds, session);
lim_log(mac_ctx, LOGE,
FL("DUT already received an assoc request frame and STA is sending another assoc req.So, do not Process sessionid: %d sys sub_type=%d for role=%d from: "
MAC_ADDRESS_STR),
pe_err("DUT already received an assoc request frame and STA is sending another assoc req.So, do not Process sessionid: %d sys sub_type: %d for role: %d from: "
MAC_ADDRESS_STR,
session->peSessionId, sub_type,
session->limSystemRole,
MAC_ADDR_ARRAY(hdr->sa));
@@ -1841,9 +1788,8 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
* Rcvd Re/Assoc Req frame from BC/MC address Log error and
* ignore it
*/
lim_log(mac_ctx, LOGE,
FL("Rcvd %s Req, sessionid: %d from a BC/MC address"
MAC_ADDRESS_STR),
pe_err("Rcvd: %s Req, sessionid: %d from a BC/MC address"
MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
session->peSessionId, MAC_ADDR_ARRAY(hdr->sa));
return;
@@ -1865,8 +1811,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
if (!cfg_get_vendor_ie_ptr_from_oui(mac_ctx,
&session->access_policy_vendor_ie[2],
3, frm_body + LIM_ASSOC_REQ_IE_OFFSET, frame_len)) {
lim_log(mac_ctx, LOGE,
FL("Vendor ie not present and access policy is %x, Rejected association"),
pe_err("Vendor ie not present and access policy is %x, Rejected association",
session->access_policy);
lim_send_assoc_rsp_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_STATUS, 1, hdr->sa,
@@ -1877,8 +1822,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
/* Allocate memory for the Assoc Request frame */
assoc_req = qdf_mem_malloc(sizeof(*assoc_req));
if (NULL == assoc_req) {
lim_log(mac_ctx, LOGE,
FL("Allocate Memory failed in assoc_req"));
pe_err("Allocate Memory failed in assoc_req");
return;
}
@@ -1889,8 +1833,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
assoc_req->assocReqFrame = qdf_mem_malloc(frame_len);
if (NULL == assoc_req->assocReqFrame) {
lim_log(mac_ctx, LOGE,
FL("Memory alloc failed for the assoc req, len=%d"),
pe_err("Memory alloc failed for the assoc req, len: %d",
frame_len);
goto error;
}
@@ -1970,8 +1913,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
goto error;
/* STA is Associated ! */
lim_log(mac_ctx, LOGE,
FL("Received %s Req successful from " MAC_ADDRESS_STR),
pe_err("Received: %s Req successful from " MAC_ADDRESS_STR,
(LIM_ASSOC == sub_type) ? "Assoc" : "ReAssoc",
MAC_ADDR_ARRAY(hdr->sa));
@@ -1986,8 +1928,7 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
if (!peer_idx) {
/* Could not assign AID. Reject association */
lim_log(mac_ctx, LOGE,
FL("PeerIdx not avaialble. Reject associaton"));
pe_err("PeerIdx not avaialble. Reject associaton");
lim_reject_association(mac_ctx, hdr->sa, sub_type,
true, auth_type, peer_idx, false,
(tSirResultCodes)eSIR_MAC_UNSPEC_FAILURE_STATUS,
@@ -2002,9 +1943,8 @@ void lim_process_assoc_req_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
if (sta_ds == NULL) {
/* Could not add hash table entry at DPH */
lim_log(mac_ctx, LOGE,
FL("couldn't add hash entry at DPH for aid=%d, MacAddr:"
MAC_ADDRESS_STR), peer_idx, MAC_ADDR_ARRAY(hdr->sa));
pe_err("couldn't add hash entry at DPH for aid: %d MacAddr:"
MAC_ADDRESS_STR, peer_idx, MAC_ADDR_ARRAY(hdr->sa));
/* Release AID */
lim_release_peer_idx(mac_ctx, peer_idx, session);
@@ -2074,8 +2014,7 @@ static void lim_fill_assoc_ind_wapi_info(tpAniSirGlobal mac_ctx,
uint8_t *wpsie)
{
if (assoc_req->wapiPresent && (NULL == wpsie)) {
lim_log(mac_ctx, LOGD,
FL("Received WAPI IE length in Assoc Req is %d"),
pe_debug("Received WAPI IE length in Assoc Req is %d",
assoc_req->wapi.length);
assoc_ind->wapiIE.wapiIEdata[0] = SIR_MAC_WAPI_EID;
assoc_ind->wapiIE.wapiIEdata[1] = assoc_req->wapi.length;
@@ -2198,9 +2137,8 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
else
sub_type = LIM_ASSOC;
lim_log(mac_ctx, LOGD,
FL("Sessionid %d ssid %s sub_type %d Associd %d staAddr "
MAC_ADDRESS_STR), session_entry->peSessionId,
pe_debug("Sessionid: %d ssid: %s sub_type: %d Associd: %d staAddr: "
MAC_ADDRESS_STR, session_entry->peSessionId,
assoc_req->ssId.ssId, sub_type, sta_ds->assocId,
MAC_ADDR_ARRAY(sta_ds->staAddr));
@@ -2211,8 +2149,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
if (NULL == assoc_ind) {
lim_release_peer_idx(mac_ctx, sta_ds->assocId,
session_entry);
lim_log(mac_ctx, LOGE,
FL("AllocateMemory failed for assoc_ind"));
pe_err("AllocateMemory failed for assoc_ind");
return;
}
qdf_mem_copy((uint8_t *) assoc_ind->peerMacAddr,
@@ -2234,7 +2171,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
assoc_req->addIE.length);
}
if (assoc_req->rsnPresent && (NULL == wpsie)) {
lim_log(mac_ctx, LOGD, FL("Assoc Req RSN IE len = %d"),
pe_debug("Assoc Req RSN IE len: %d",
assoc_req->rsn.length);
assoc_ind->rsnIE.length = 2 + assoc_req->rsn.length;
assoc_ind->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID;
@@ -2263,8 +2200,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
rsn_len = assoc_ind->rsnIE.length;
if ((rsn_len + assoc_req->wpa.length)
>= SIR_MAC_MAX_IE_LENGTH) {
lim_log(mac_ctx, LOGE,
FL("rsnIEdata index out of bounds %d"),
pe_err("rsnIEdata index out of bounds: %d",
rsn_len);
qdf_mem_free(assoc_ind);
return;
@@ -2309,8 +2245,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
assoc_ind->addIE.length +=
2 + DOT11F_IE_HTCAPS_MIN_LEN;
} else {
lim_log(mac_ctx, LOGE,
FL("Fail:HT capabilities IE to addIE"));
pe_err("Fail:HT capabilities IE to addIE");
}
}
@@ -2318,8 +2253,7 @@ void lim_send_mlm_assoc_ind(tpAniSirGlobal mac_ctx,
if (wlan_cfg_get_int (mac_ctx,
(uint16_t) WNI_CFG_WME_ENABLED, &tmp)
!= eSIR_SUCCESS)
lim_log(mac_ctx, LOGE,
FL("wlan_cfg_get_int failed for id %d"),
pe_err("wlan_cfg_get_int failed for id: %d",
WNI_CFG_WME_ENABLED);
/* check whether AP is enabled with WMM */