qcacld-3.0: Rename pMac in SCH

Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged." One identifier
used extensively throughout the driver that violates both of these
tenants is "pMac." In order to be compliant with the Linux coding
style there is a campaign to rename all instances of this identifier.

For this change rename all instances of "pMac" to "mac" in:
sch_api.c
sch_api.h
sch_beacon_gen.c
sch_beacon_process.c
sch_message.c

Change-Id: Ia78ee079ca3a2cff85ad3e7ac0d0e1355397b4ab
CRs-Fixed: 2356096
Bu işleme şunda yer alıyor:
Jeff Johnson
2018-11-22 10:01:45 -08:00
işlemeyi yapan: nshrivas
ebeveyn 35592fc1ff
işleme 6cfac7891a
5 değiştirilmiş dosya ile 101 ekleme ve 101 silme

Dosyayı Görüntüle

@@ -35,53 +35,53 @@
#include "ani_global.h"
/* update only the broadcast qos params */
void sch_qos_update_broadcast(tpAniSirGlobal pMac,
void sch_qos_update_broadcast(tpAniSirGlobal mac,
tpPESession psessionEntry);
/* fill in the default local edca parameter into gLimEdcaParams[] */
void sch_set_default_edca_params(tpAniSirGlobal pMac, tpPESession psessionE);
void sch_set_default_edca_params(tpAniSirGlobal mac, tpPESession psessionE);
/* update only local qos params */
void sch_qos_update_local(tpAniSirGlobal pMac, tpPESession psessionEntry);
void sch_qos_update_local(tpAniSirGlobal mac, tpPESession psessionEntry);
/* update the edca profile parameters */
void sch_edca_profile_update(tpAniSirGlobal pMac,
void sch_edca_profile_update(tpAniSirGlobal mac,
tpPESession psessionEntry);
/* / Set the fixed fields in a beacon frame */
QDF_STATUS sch_set_fixed_beacon_fields(tpAniSirGlobal pMac,
QDF_STATUS sch_set_fixed_beacon_fields(tpAniSirGlobal mac,
tpPESession psessionEntry);
/* / Process the scheduler messages */
void sch_process_message(tpAniSirGlobal pMac,
void sch_process_message(tpAniSirGlobal mac,
struct scheduler_msg *pSchMsg);
/**
* sch_process_pre_beacon_ind() - Process the PreBeacon Indication from the Lim
* @pMac: pointer to mac structure
* @mac: pointer to mac structure
* @msg: schedular msg
* @reason: beaon update reason
*
* return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE
*/
QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal pMac,
QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal mac,
struct scheduler_msg *msg,
enum sir_bcn_update_reason reason);
/* / Post a message to the scheduler message queue */
QDF_STATUS sch_post_message(tpAniSirGlobal pMac,
QDF_STATUS sch_post_message(tpAniSirGlobal mac,
struct scheduler_msg *pMsg);
void sch_beacon_process(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
void sch_beacon_process(tpAniSirGlobal mac, uint8_t *pRxPacketInfo,
tpPESession psessionEntry);
QDF_STATUS sch_beacon_edca_process(tpAniSirGlobal pMac,
QDF_STATUS sch_beacon_edca_process(tpAniSirGlobal mac,
tSirMacEdcaParamSetIE *edca,
tpPESession psessionEntry);
void sch_generate_tim(tpAniSirGlobal, uint8_t **, uint16_t *, uint8_t);
void sch_set_beacon_interval(tpAniSirGlobal pMac, tpPESession psessionEntry);
void sch_set_beacon_interval(tpAniSirGlobal mac, tpPESession psessionEntry);
/**
* sch_send_beacon_req() - send beacon update req to wma
@@ -111,7 +111,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal,
tpPESession,
uint32_t *);
int sch_gen_timing_advert_frame(tpAniSirGlobal pMac, tSirMacAddr self_addr,
int sch_gen_timing_advert_frame(tpAniSirGlobal mac, tSirMacAddr self_addr,
uint8_t **buf, uint32_t *timestamp_offset,
uint32_t *time_value_offset);

Dosyayı Görüntüle

@@ -69,14 +69,14 @@
* @return None
*/
QDF_STATUS sch_post_message(tpAniSirGlobal pMac, struct scheduler_msg *pMsg)
QDF_STATUS sch_post_message(tpAniSirGlobal mac, struct scheduler_msg *pMsg)
{
sch_process_message(pMac, pMsg);
sch_process_message(mac, pMsg);
return QDF_STATUS_SUCCESS;
}
QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
QDF_STATUS sch_send_beacon_req(tpAniSirGlobal mac, uint8_t *beaconPayload,
uint16_t size, tpPESession psessionEntry,
enum sir_bcn_update_reason reason)
{
@@ -88,8 +88,8 @@ QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
size, reason);
if (LIM_IS_AP_ROLE(psessionEntry) &&
(pMac->sch.schObject.fBeaconChanged)) {
retCode = lim_send_probe_rsp_template_to_hal(pMac,
(mac->sch.schObject.fBeaconChanged)) {
retCode = lim_send_probe_rsp_template_to_hal(mac,
psessionEntry,
&psessionEntry->DefProbeRspIeBitmap[0]);
if (QDF_STATUS_SUCCESS != retCode)
@@ -116,9 +116,9 @@ QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
beaconParams->timIeOffset = psessionEntry->schBeaconOffsetBegin;
if (psessionEntry->dfsIncludeChanSwIe) {
beaconParams->csa_count_offset =
pMac->sch.schObject.csa_count_offset;
mac->sch.schObject.csa_count_offset;
beaconParams->ecsa_count_offset =
pMac->sch.schObject.ecsa_count_offset;
mac->sch.schObject.ecsa_count_offset;
pe_debug("csa_count_offset %d ecsa_count_offset %d",
beaconParams->csa_count_offset,
beaconParams->ecsa_count_offset);
@@ -129,16 +129,16 @@ QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
beaconParams->reason = reason;
/* p2pIeOffset should be atleast greater than timIeOffset */
if ((pMac->sch.schObject.p2pIeOffset != 0) &&
(pMac->sch.schObject.p2pIeOffset <
if ((mac->sch.schObject.p2pIeOffset != 0) &&
(mac->sch.schObject.p2pIeOffset <
psessionEntry->schBeaconOffsetBegin)) {
pe_err("Invalid p2pIeOffset:[%d]",
pMac->sch.schObject.p2pIeOffset);
mac->sch.schObject.p2pIeOffset);
QDF_ASSERT(0);
qdf_mem_free(beaconParams);
return QDF_STATUS_E_FAILURE;
}
beaconParams->p2pIeOffset = pMac->sch.schObject.p2pIeOffset;
beaconParams->p2pIeOffset = mac->sch.schObject.p2pIeOffset;
#ifdef WLAN_SOFTAP_FW_BEACON_TX_PRNT_LOG
pe_err("TimIeOffset:[%d]", beaconParams->TimIeOffset);
#endif
@@ -172,8 +172,8 @@ QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
psessionEntry->bcnLen = size;
}
MTRACE(mac_trace_msg_tx(pMac, psessionEntry->peSessionId, msgQ.type));
retCode = wma_post_ctrl_msg(pMac, &msgQ);
MTRACE(mac_trace_msg_tx(mac, psessionEntry->peSessionId, msgQ.type));
retCode = wma_post_ctrl_msg(mac, &msgQ);
if (QDF_STATUS_SUCCESS != retCode)
pe_err("Posting SEND_BEACON_REQ to HAL failed, reason=%X",
retCode);
@@ -183,7 +183,7 @@ QDF_STATUS sch_send_beacon_req(tpAniSirGlobal pMac, uint8_t *beaconPayload,
return retCode;
}
static uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal pMac,
static uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal mac,
tpPESession psessionEntry,
uint8_t *addIeWoP2pIe,
uint32_t *addnIELenWoP2pIe)
@@ -223,7 +223,7 @@ static uint32_t lim_remove_p2p_ie_from_add_ie(tpAniSirGlobal pMac,
return QDF_STATUS_SUCCESS;
}
uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal mac,
tpPESession psessionEntry,
uint32_t *IeBitmap)
{
@@ -264,7 +264,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
return QDF_STATUS_E_NOMEM;
}
retStatus = lim_remove_p2p_ie_from_add_ie(pMac, psessionEntry,
retStatus = lim_remove_p2p_ie_from_add_ie(mac, psessionEntry,
addIeWoP2pIe, &addnIELenWoP2pIe);
if (retStatus != QDF_STATUS_SUCCESS) {
qdf_mem_free(addIeWoP2pIe);
@@ -289,7 +289,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
qdf_mem_zero((uint8_t *)&extracted_extcap,
sizeof(tDot11fIEExtCap));
status = lim_strip_extcap_update_struct(pMac, addIE,
status = lim_strip_extcap_update_struct(mac, addIE,
&addn_ielen, &extracted_extcap);
if (QDF_STATUS_SUCCESS != status) {
pe_debug("extcap not extracted");
@@ -316,7 +316,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
&extracted_extcap,
true);
nStatus = dot11f_get_packed_probe_response_size(pMac,
nStatus = dot11f_get_packed_probe_response_size(mac,
&psessionEntry->probeRespFrame, &nPayload);
if (DOT11F_FAILED(nStatus)) {
pe_err("Failed to calculate the packed size for a Probe Response (0x%08x)",
@@ -341,7 +341,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
qdf_mem_set(pFrame2Hal, nBytes, 0);
/* Next, we fill out the buffer descriptor: */
lim_populate_mac_header(pMac, pFrame2Hal, SIR_MAC_MGMT_FRAME,
lim_populate_mac_header(mac, pFrame2Hal, SIR_MAC_MGMT_FRAME,
SIR_MAC_MGMT_PROBE_RSP,
psessionEntry->selfMacAddr,
psessionEntry->selfMacAddr);
@@ -352,7 +352,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
/* That done, pack the Probe Response: */
nStatus =
dot11f_pack_probe_response(pMac, &psessionEntry->probeRespFrame,
dot11f_pack_probe_response(mac, &psessionEntry->probeRespFrame,
pFrame2Hal + sizeof(tSirMacMgmtHdr),
nPayload, &nPayload);
@@ -389,7 +389,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
msgQ.bodyptr = pprobeRespParams;
msgQ.bodyval = 0;
retCode = wma_post_ctrl_msg(pMac, &msgQ);
retCode = wma_post_ctrl_msg(mac, &msgQ);
if (QDF_STATUS_SUCCESS != retCode) {
pe_err("FAIL bytes %d retcode[%X]", nBytes, retCode);
qdf_mem_free(pprobeRespParams);
@@ -404,7 +404,7 @@ uint32_t lim_send_probe_rsp_template_to_hal(tpAniSirGlobal pMac,
/**
* sch_gen_timing_advert_frame() - Generate the TA frame and populate the buffer
* @pMac: the global MAC context
* @mac: the global MAC context
* @self_addr: the self MAC address
* @buf: the buffer that will contain the frame
* @timestamp_offset: return for the offset of the timestamp field

Dosyayı Görüntüle

@@ -648,7 +648,7 @@ sch_set_fixed_beacon_fields(tpAniSirGlobal mac_ctx, tpPESession session)
}
QDF_STATUS
lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMac,
lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal mac,
tDot11fBeacon1 *beacon1,
tpPESession psessionEntry)
{
@@ -670,7 +670,7 @@ lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMac,
if (beacon1->SSID.present) {
set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, SIR_MAC_SSID_EID);
/* populating it, because probe response has to go with SSID even in hidden case */
populate_dot11f_ssid(pMac, &psessionEntry->ssId, &prb_rsp->SSID);
populate_dot11f_ssid(mac, &psessionEntry->ssId, &prb_rsp->SSID);
}
/* supported rates */
if (beacon1->SuppRates.present) {
@@ -694,7 +694,7 @@ lim_update_probe_rsp_template_ie_bitmap_beacon1(tpAniSirGlobal pMac,
return QDF_STATUS_SUCCESS;
}
void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal pMac,
void lim_update_probe_rsp_template_ie_bitmap_beacon2(tpAniSirGlobal mac,
tDot11fBeacon2 *beacon2,
uint32_t *DefProbeRspIeBitmap,
tDot11fProbeResponse *prb_rsp)
@@ -891,7 +891,7 @@ void set_probe_rsp_ie_bitmap(uint32_t *IeBitmap, uint32_t pos)
/**
* write_beacon_to_memory() - send the beacon to the wma
* @pMac: pointer to mac structure
* @mac: pointer to mac structure
* @size: Size of the beacon to write to memory
* @length: Length field of the beacon to write to memory
* @psessionEntry: pe session
@@ -899,7 +899,7 @@ void set_probe_rsp_ie_bitmap(uint32_t *IeBitmap, uint32_t pos)
*
* return: success: QDF_STATUS_SUCCESS failure: QDF_STATUS_E_FAILURE
*/
static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal mac, uint16_t size,
uint16_t length,
tpPESession psessionEntry,
enum sir_bcn_update_reason reason)
@@ -924,7 +924,7 @@ static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
} else
pBeacon->beaconLength = (uint32_t) size - sizeof(uint32_t);
if (!pMac->sch.schObject.fBeaconChanged)
if (!mac->sch.schObject.fBeaconChanged)
return QDF_STATUS_E_FAILURE;
/*
@@ -933,12 +933,12 @@ static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
*/
size = (size + 3) & (~3);
status = sch_send_beacon_req(pMac, psessionEntry->pSchBeaconFrameBegin,
status = sch_send_beacon_req(mac, psessionEntry->pSchBeaconFrameBegin,
size, psessionEntry, reason);
if (QDF_IS_STATUS_ERROR(status))
pe_err("sch_send_beacon_req() returned an error %d, size %d",
status, size);
pMac->sch.schObject.fBeaconChanged = 0;
mac->sch.schObject.fBeaconChanged = 0;
return status;
}
@@ -955,12 +955,12 @@ static QDF_STATUS write_beacon_to_memory(tpAniSirGlobal pMac, uint16_t size,
*
* NOTE:
*
* @param pMac pointer to global mac structure
* @param mac pointer to global mac structure
* @param **pPtr pointer to the buffer, where the TIM bit is to be written.
* @param *timLength pointer to limLength, which needs to be returned.
* @return None
*/
void sch_generate_tim(tpAniSirGlobal pMac, uint8_t **pPtr, uint16_t *timLength,
void sch_generate_tim(tpAniSirGlobal mac, uint8_t **pPtr, uint16_t *timLength,
uint8_t dtimPeriod)
{
uint8_t *ptr = *pPtr;
@@ -996,7 +996,7 @@ void sch_generate_tim(tpAniSirGlobal pMac, uint8_t **pPtr, uint16_t *timLength,
*pPtr = ptr;
}
QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal pMac,
QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal mac,
struct scheduler_msg *limMsg,
enum sir_bcn_update_reason reason)
{
@@ -1006,7 +1006,7 @@ QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal pMac,
uint8_t sessionId;
QDF_STATUS status = QDF_STATUS_E_FAILURE;
psessionEntry = pe_find_session_by_bssid(pMac, pMsg->bssId, &sessionId);
psessionEntry = pe_find_session_by_bssid(mac, pMsg->bssId, &sessionId);
if (!psessionEntry) {
pe_err("session lookup fails");
goto end;
@@ -1027,7 +1027,7 @@ QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal pMac,
/* generate IBSS parameter set */
if (psessionEntry->statypeForBss == STA_ENTRY_SELF)
status =
write_beacon_to_memory(pMac, (uint16_t) beaconSize,
write_beacon_to_memory(mac, (uint16_t) beaconSize,
(uint16_t) beaconSize,
psessionEntry, reason);
else
@@ -1041,11 +1041,11 @@ QDF_STATUS sch_process_pre_beacon_ind(tpAniSirGlobal pMac,
uint16_t timLength = 0;
if (psessionEntry->statypeForBss == STA_ENTRY_SELF) {
sch_generate_tim(pMac, &ptr, &timLength,
sch_generate_tim(mac, &ptr, &timLength,
psessionEntry->dtimPeriod);
beaconSize += 2 + timLength;
status =
write_beacon_to_memory(pMac, (uint16_t) beaconSize,
write_beacon_to_memory(mac, (uint16_t) beaconSize,
(uint16_t) beaconSize,
psessionEntry, reason);
} else

Dosyayı Görüntüle

@@ -280,15 +280,15 @@ ap_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
*
*/
static void __sch_beacon_process_no_session(tpAniSirGlobal pMac,
static void __sch_beacon_process_no_session(tpAniSirGlobal mac,
tpSchBeaconStruct pBeacon,
uint8_t *pRxPacketInfo)
{
tpPESession psessionEntry = NULL;
psessionEntry = lim_is_ibss_session_active(pMac);
psessionEntry = lim_is_ibss_session_active(mac);
if (psessionEntry != NULL) {
lim_handle_ibss_coalescing(pMac, pBeacon, pRxPacketInfo,
lim_handle_ibss_coalescing(mac, pBeacon, pRxPacketInfo,
psessionEntry);
}
return;
@@ -1112,7 +1112,7 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
* @return status of operation
*/
QDF_STATUS
sch_beacon_edca_process(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *edca,
sch_beacon_edca_process(tpAniSirGlobal mac, tSirMacEdcaParamSetIE *edca,
tpPESession session)
{
uint8_t i;
@@ -1120,7 +1120,7 @@ sch_beacon_edca_process(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *edca,
host_log_qos_edca_pkt_type *log_ptr = NULL;
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
if (!(pMac->mlme_cfg)) {
if (!(mac->mlme_cfg)) {
pe_err("invalid mlme cfg");
return QDF_STATUS_E_FAILURE;
}
@@ -1134,33 +1134,33 @@ sch_beacon_edca_process(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *edca,
session->gLimEdcaParams[EDCA_AC_VI] = edca->acvi;
session->gLimEdcaParams[EDCA_AC_VO] = edca->acvo;
if (pMac->mlme_cfg->edca_params.enable_edca_params) {
if (mac->mlme_cfg->edca_params.enable_edca_params) {
session->gLimEdcaParams[EDCA_AC_VO].aci.aifsn =
pMac->mlme_cfg->edca_params.edca_ac_vo.vo_aifs;
mac->mlme_cfg->edca_params.edca_ac_vo.vo_aifs;
session->gLimEdcaParams[EDCA_AC_VI].aci.aifsn =
pMac->mlme_cfg->edca_params.edca_ac_vi.vi_aifs;
mac->mlme_cfg->edca_params.edca_ac_vi.vi_aifs;
session->gLimEdcaParams[EDCA_AC_BK].aci.aifsn =
pMac->mlme_cfg->edca_params.edca_ac_bk.bk_aifs;
mac->mlme_cfg->edca_params.edca_ac_bk.bk_aifs;
session->gLimEdcaParams[EDCA_AC_BE].aci.aifsn =
pMac->mlme_cfg->edca_params.edca_ac_be.be_aifs;
mac->mlme_cfg->edca_params.edca_ac_be.be_aifs;
session->gLimEdcaParams[EDCA_AC_VO].cw.min =
pMac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmin;
mac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmin;
session->gLimEdcaParams[EDCA_AC_VI].cw.min =
pMac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmin;
mac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmin;
session->gLimEdcaParams[EDCA_AC_BK].cw.min =
pMac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmin;
mac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmin;
session->gLimEdcaParams[EDCA_AC_BE].cw.min =
pMac->mlme_cfg->edca_params.edca_ac_be.be_cwmin;
mac->mlme_cfg->edca_params.edca_ac_be.be_cwmin;
session->gLimEdcaParams[EDCA_AC_VO].cw.max =
pMac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmax;
mac->mlme_cfg->edca_params.edca_ac_vo.vo_cwmax;
session->gLimEdcaParams[EDCA_AC_VI].cw.max =
pMac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmax;
mac->mlme_cfg->edca_params.edca_ac_vi.vi_cwmax;
session->gLimEdcaParams[EDCA_AC_BK].cw.max =
pMac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmax;
mac->mlme_cfg->edca_params.edca_ac_bk.bk_cwmax;
session->gLimEdcaParams[EDCA_AC_BE].cw.max =
pMac->mlme_cfg->edca_params.edca_ac_be.be_cwmax;
mac->mlme_cfg->edca_params.edca_ac_be.be_cwmax;
}
#ifdef FEATURE_WLAN_DIAG_SUPPORT
WLAN_HOST_DIAG_LOG_ALLOC(log_ptr, host_log_qos_edca_pkt_type,
@@ -1197,7 +1197,7 @@ sch_beacon_edca_process(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *edca,
WLAN_HOST_DIAG_LOG_REPORT(log_ptr);
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
pe_debug("Edca param enabled in ini %d. Updating Local EDCA Params(gLimEdcaParams) to: ",
pMac->mlme_cfg->edca_params.enable_edca_params);
mac->mlme_cfg->edca_params.enable_edca_params);
for (i = 0; i < MAX_NUM_AC; i++) {
pe_debug("AC[%d]: AIFSN: %d, ACM %d, CWmin %d, CWmax %d, TxOp %d",
i, session->gLimEdcaParams[i].aci.aifsn,

Dosyayı Görüntüle

@@ -39,10 +39,10 @@
/* local functions */
static QDF_STATUS
get_wmm_local_params(tpAniSirGlobal pMac,
get_wmm_local_params(tpAniSirGlobal mac,
uint32_t params[][CFG_EDCA_DATA_LEN]);
static void
set_sch_edca_params(tpAniSirGlobal pMac,
set_sch_edca_params(tpAniSirGlobal mac,
uint32_t params[][CFG_EDCA_DATA_LEN],
tpPESession psessionEntry);
@@ -62,7 +62,7 @@ set_sch_edca_params(tpAniSirGlobal pMac,
* @return None
*/
void sch_set_beacon_interval(tpAniSirGlobal pMac, tpPESession psessionEntry)
void sch_set_beacon_interval(tpAniSirGlobal mac, tpPESession psessionEntry)
{
uint32_t bi;
@@ -74,7 +74,7 @@ void sch_set_beacon_interval(tpAniSirGlobal pMac, tpPESession psessionEntry)
return;
}
pMac->sch.schObject.gSchBeaconInterval = (uint16_t) bi;
mac->sch.schObject.gSchBeaconInterval = (uint16_t) bi;
}
static void sch_edca_profile_update_all(tpAniSirGlobal pmac)
@@ -105,14 +105,14 @@ static void sch_edca_profile_update_all(tpAniSirGlobal pmac)
* @return None
*/
void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
void sch_process_message(tpAniSirGlobal mac, struct scheduler_msg *pSchMsg)
{
switch (pSchMsg->type) {
case SIR_CFG_PARAM_UPDATE_IND:
switch (pSchMsg->bodyval) {
case WNI_CFG_COUNTRY_CODE:
pe_debug("sch: WNI_CFG_COUNTRY_CODE changed");
sch_edca_profile_update_all(pMac);
sch_edca_profile_update_all(mac);
break;
default:
@@ -132,7 +132,7 @@ void sch_process_message(tpAniSirGlobal pMac, struct scheduler_msg *pSchMsg)
* sepcified in the config params are delivered in this order: BE, BK, VI, VO
*/
static QDF_STATUS
sch_get_params(tpAniSirGlobal pMac,
sch_get_params(tpAniSirGlobal mac,
uint32_t params[][CFG_EDCA_DATA_LEN],
uint8_t local)
{
@@ -160,16 +160,16 @@ sch_get_params(tpAniSirGlobal pMac,
uint32_t etsi_b[] = {edca_etsi_acbe_bcast, edca_etsi_acbk_bcast,
edca_etsi_acvi_bcast, edca_etsi_acvo_bcast};
edca_params = &pMac->mlme_cfg->edca_params;
edca_params = &mac->mlme_cfg->edca_params;
if (wlan_cfg_get_str(pMac, WNI_CFG_COUNTRY_CODE, country_code_str,
if (wlan_cfg_get_str(mac, WNI_CFG_COUNTRY_CODE, country_code_str,
&country_code_len) == QDF_STATUS_SUCCESS &&
cds_is_etsi_europe_country(country_code_str)) {
val = WNI_CFG_EDCA_PROFILE_ETSI_EUROPE;
pe_debug("switch to ETSI EUROPE profile country code %c%c",
country_code_str[0], country_code_str[1]);
} else {
val = pMac->mlme_cfg->wmm_params.edca_profile;
val = mac->mlme_cfg->wmm_params.edca_profile;
}
if (val >= WNI_CFG_EDCA_PROFILE_MAX) {
pe_warn("Invalid EDCA_PROFILE %d, using %d instead", val,
@@ -293,7 +293,7 @@ broadcast_wmm_of_concurrent_sta_session(tpAniSirGlobal mac_ctx,
return true;
}
void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
void sch_qos_update_broadcast(tpAniSirGlobal mac, tpPESession psessionEntry)
{
uint32_t params[4][CFG_EDCA_DATA_LEN];
uint32_t cwminidx, cwmaxidx, txopidx;
@@ -302,11 +302,11 @@ void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
bool updated = false;
QDF_STATUS status;
if (sch_get_params(pMac, params, false) != QDF_STATUS_SUCCESS) {
if (sch_get_params(mac, params, false) != QDF_STATUS_SUCCESS) {
pe_debug("QosUpdateBroadcast: failed");
return;
}
lim_get_phy_mode(pMac, &phyMode, psessionEntry);
lim_get_phy_mode(mac, &phyMode, psessionEntry);
pe_debug("QosUpdBcast: mode %d", phyMode);
@@ -371,67 +371,67 @@ void sch_qos_update_broadcast(tpAniSirGlobal pMac, tpPESession psessionEntry)
* params to broadcast in beacons. WFA Wifi Direct test plan
* 6.1.14 requirement
*/
if (broadcast_wmm_of_concurrent_sta_session(pMac, psessionEntry))
if (broadcast_wmm_of_concurrent_sta_session(mac, psessionEntry))
updated = true;
if (updated)
psessionEntry->gLimEdcaParamSetCount++;
status = sch_set_fixed_beacon_fields(pMac, psessionEntry);
status = sch_set_fixed_beacon_fields(mac, psessionEntry);
if (QDF_IS_STATUS_ERROR(status))
pe_err("Unable to set beacon fields!");
}
void sch_qos_update_local(tpAniSirGlobal pMac, tpPESession psessionEntry)
void sch_qos_update_local(tpAniSirGlobal mac, tpPESession psessionEntry)
{
uint32_t params[4][CFG_EDCA_DATA_LEN];
QDF_STATUS status;
status = sch_get_params(pMac, params, true /*local */);
status = sch_get_params(mac, params, true /*local */);
if (QDF_IS_STATUS_ERROR(status)) {
pe_err("sch_get_params(local) failed");
return;
}
set_sch_edca_params(pMac, params, psessionEntry);
set_sch_edca_params(mac, params, psessionEntry);
/* For AP, the bssID is stored in LIM Global context. */
lim_send_edca_params(pMac, psessionEntry->gLimEdcaParams,
lim_send_edca_params(mac, psessionEntry->gLimEdcaParams,
psessionEntry->bssIdx, false);
}
/**
* sch_set_default_edca_params() - This function sets the gLimEdcaParams to the
* default local wmm profile.
* @pMac - Global mac context
* @mac - Global mac context
* @psessionEntry - PE session
*
* return none
*/
void sch_set_default_edca_params(tpAniSirGlobal pMac, tpPESession psessionEntry)
void sch_set_default_edca_params(tpAniSirGlobal mac, tpPESession psessionEntry)
{
uint32_t params[4][CFG_EDCA_DATA_LEN];
if (get_wmm_local_params(pMac, params) != QDF_STATUS_SUCCESS) {
if (get_wmm_local_params(mac, params) != QDF_STATUS_SUCCESS) {
pe_err("get_wmm_local_params() failed");
return;
}
set_sch_edca_params(pMac, params, psessionEntry);
set_sch_edca_params(mac, params, psessionEntry);
return;
}
/**
* set_sch_edca_params() - This function fills in the gLimEdcaParams structure
* with the given edca params.
* @pMac - global mac context
* @mac - global mac context
* @psessionEntry - PE session
* @params - EDCA parameters
*
* Return none
*/
static void
set_sch_edca_params(tpAniSirGlobal pMac,
set_sch_edca_params(tpAniSirGlobal mac,
uint32_t params[][CFG_EDCA_DATA_LEN],
tpPESession psessionEntry)
{
@@ -439,16 +439,16 @@ set_sch_edca_params(tpAniSirGlobal pMac,
uint32_t cwminidx, cwmaxidx, txopidx;
uint32_t phyMode;
lim_get_phy_mode(pMac, &phyMode, psessionEntry);
lim_get_phy_mode(mac, &phyMode, psessionEntry);
pe_debug("lim_get_phy_mode() = %d", phyMode);
/* if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11G) */
/* if (mac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11G) */
if (phyMode == WNI_CFG_PHY_MODE_11G) {
cwminidx = CFG_EDCA_PROFILE_CWMING_IDX;
cwmaxidx = CFG_EDCA_PROFILE_CWMAXG_IDX;
txopidx = CFG_EDCA_PROFILE_TXOPG_IDX;
}
/* else if (pMac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11B) */
/* else if (mac->lim.gLimPhyMode == WNI_CFG_PHY_MODE_11B) */
else if (phyMode == WNI_CFG_PHY_MODE_11B) {
cwminidx = CFG_EDCA_PROFILE_CWMINB_IDX;
cwmaxidx = CFG_EDCA_PROFILE_CWMAXB_IDX;
@@ -527,16 +527,16 @@ get_wmm_local_params(tpAniSirGlobal mac_ctx,
* EDCA params in the gLimEdcaParams structure. It also updates the
* edcaParamSetCount.
*
* @pMac - global mac context
* @mac - global mac context
*
* Return none
*/
void sch_edca_profile_update(tpAniSirGlobal pMac, tpPESession psessionEntry)
void sch_edca_profile_update(tpAniSirGlobal mac, tpPESession psessionEntry)
{
if (LIM_IS_AP_ROLE(psessionEntry) ||
LIM_IS_IBSS_ROLE(psessionEntry)) {
sch_qos_update_local(pMac, psessionEntry);
sch_qos_update_broadcast(pMac, psessionEntry);
sch_qos_update_local(mac, psessionEntry);
sch_qos_update_broadcast(mac, psessionEntry);
}
}