qcacld-3.0: Fix implicit enum conversion in csr_fetch_valid_ch_lst
Fix implicit conversion from enumeration type 'tSirRFBand'
to different enumeration type 'eCsrBand'
Currently 3 different types of enums exist to enumerate the
band type.Remove eCsrBand and tSirRfBand and
use tSirRFBand everywhere.
Change-Id: I1862c6d3a5daca7523870b7f0931ee4f20c7ce4f
CRs-Fixed: 2145080
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 0afe0c7..cadb931 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -1013,7 +1013,7 @@
{
uint32_t phy_mode;
tHalBitVal erp_enabled = eHAL_CLEAR;
- tSirRFBand rf_band = SIR_BAND_UNKNOWN;
+ enum band_info rf_band = BAND_UNKNOWN;
uint32_t i;
if (NULL == sta_ds)
@@ -1023,7 +1023,7 @@
lim_get_phy_mode(mac_ctx, &phy_mode, session_entry);
erp_enabled = sta_ds->erpEnabled;
- if ((SIR_BAND_5_GHZ == rf_band) &&
+ if ((BAND_5G == rf_band) &&
(true == session_entry->htCapability) &&
(session_entry->beaconParams.llaCoexist) &&
(false == sta_ds->mlmStaContext.htCapability)) {
@@ -1055,7 +1055,7 @@
}
/* we are HT or 11G and 11B station is getting deleted */
- if ((SIR_BAND_2_4_GHZ == rf_band) &&
+ if ((BAND_2G == rf_band) &&
(phy_mode == WNI_CFG_PHY_MODE_11G ||
session_entry->htCapability) &&
(erp_enabled == eHAL_CLEAR)) {
@@ -1085,7 +1085,7 @@
* we are HT AP and non-11B station is leaving.
* 11g station is leaving
*/
- if ((SIR_BAND_2_4_GHZ == rf_band) &&
+ if ((BAND_2G == rf_band) &&
session_entry->htCapability &&
!sta_ds->mlmStaContext.htCapability) {
pe_debug("(%d) A 11g STA is disassociated. Addr is %pM",
diff --git a/core/mac/src/pe/lim/lim_ft.c b/core/mac/src/pe/lim/lim_ft.c
index 4835ec3..eb035fc 100644
--- a/core/mac/src/pe/lim/lim_ft.c
+++ b/core/mac/src/pe/lim/lim_ft.c
@@ -595,7 +595,7 @@
pftSessionEntry->limRFBand = lim_get_rf_band(
pftSessionEntry->currentOperChannel);
- if (pftSessionEntry->limRFBand == SIR_BAND_2_4_GHZ) {
+ if (pftSessionEntry->limRFBand == BAND_2G) {
cbEnabledMode = pMac->roam.configParam.channelBondingMode24GHz;
} else {
cbEnabledMode = pMac->roam.configParam.channelBondingMode5GHz;
@@ -721,7 +721,7 @@
#ifdef WLAN_FEATURE_11W
pftSessionEntry->limRmfEnabled = psessionEntry->limRmfEnabled;
#endif
- if ((pftSessionEntry->limRFBand == SIR_BAND_2_4_GHZ) &&
+ if ((pftSessionEntry->limRFBand == BAND_2G) &&
(pftSessionEntry->htSupportedChannelWidthSet ==
eHT_CHANNEL_WIDTH_40MHZ))
lim_init_obss_params(pMac, pftSessionEntry);
diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
index c32999b..086bcdc 100644
--- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
+++ b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c
@@ -845,7 +845,7 @@
tpUpdateBeaconParams pBeaconParams,
tpPESession psessionEntry)
{
- tSirRFBand rfBand = SIR_BAND_UNKNOWN;
+ enum band_info rfBand = BAND_UNKNOWN;
uint32_t phyMode;
tLimProtStaCacheType protStaCacheType =
eLIM_PROT_STA_CACHE_TYPE_INVALID;
@@ -858,7 +858,7 @@
}
lim_get_rf_band_new(pMac, &rfBand, psessionEntry);
- if (SIR_BAND_2_4_GHZ == rfBand) {
+ if (BAND_2G == rfBand) {
lim_get_phy_mode(pMac, &phyMode, psessionEntry);
/* We are 11G or 11n. Check if we need protection from 11b Stations. */
@@ -1704,14 +1704,14 @@
{
uint32_t phymode;
tHalBitVal erpenabled = eHAL_CLEAR;
- tSirRFBand rfband = SIR_BAND_UNKNOWN;
+ enum band_info rfband = BAND_UNKNOWN;
uint32_t i;
if (NULL == stads)
return;
lim_get_rf_band_new(mac_ctx, &rfband, session);
- if (SIR_BAND_2_4_GHZ != rfband)
+ if (BAND_2G != rfband)
return;
lim_get_phy_mode(mac_ctx, &phymode, session);
diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
index d228f47..8213372 100644
--- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
+++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c
@@ -100,9 +100,9 @@
if (chn_count <= 1)
continue;
next_ch_no = first_ch_no;
- if (SIR_BAND_5_GHZ == lim_get_rf_band(first_ch_no))
+ if (BAND_5G == lim_get_rf_band(first_ch_no))
channel_offset = SIR_11A_FREQUENCY_OFFSET;
- else if (SIR_BAND_2_4_GHZ == lim_get_rf_band(first_ch_no))
+ else if (BAND_2G == lim_get_rf_band(first_ch_no))
channel_offset = SIR_11B_FREQUENCY_OFFSET;
else
continue;
@@ -2081,7 +2081,7 @@
{
uint8_t chan;
- if (session_entry->limRFBand == SIR_BAND_2_4_GHZ) {
+ if (session_entry->limRFBand == BAND_2G) {
if (session_entry->vhtCapability && assoc_req->VHTCaps.present)
assoc_ind->chan_info.info = MODE_11AC_VHT20_2G;
else if (session_entry->htCapability
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 473f22b..dc58579 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -1085,7 +1085,7 @@
session->lim11hEnable = 0;
if (mlm_start_req->bssType != eSIR_IBSS_MODE &&
(CHAN_HOP_ALL_BANDS_ENABLE ||
- SIR_BAND_5_GHZ == session->limRFBand)) {
+ BAND_5G == session->limRFBand)) {
if (wlan_cfg_get_int(mac_ctx,
WNI_CFG_11H_ENABLED, &val) != eSIR_SUCCESS)
pe_err("Fail to get WNI_CFG_11H_ENABLED");
@@ -1922,7 +1922,7 @@
lim_get_rf_band(session->currentOperChannel);
/* Initialize 11h Enable Flag */
- if (SIR_BAND_5_GHZ == session->limRFBand) {
+ if (BAND_5G == session->limRFBand) {
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED,
&val) != eSIR_SUCCESS) {
pe_err("Fail to get WNI_CFG_11H_ENABLED");
@@ -5151,7 +5151,7 @@
lim_get_rf_band(session_entry->currentOperChannel);
/* Initialize 11h Enable Flag */
if (CHAN_HOP_ALL_BANDS_ENABLE ||
- SIR_BAND_5_GHZ == session_entry->limRFBand) {
+ BAND_5G == session_entry->limRFBand) {
if (wlan_cfg_get_int(mac_ctx, WNI_CFG_11H_ENABLED, &val) !=
eSIR_SUCCESS)
pe_err("Fail to get WNI_CFG_11H_ENABLED");
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index ce3da04..2a4b7e8 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -241,9 +241,9 @@
}
if (IS_5G_CH(psessionEntry->currentOperChannel))
- band = eCSR_BAND_5G;
+ band = BAND_5G;
else
- band = eCSR_BAND_24;
+ band = BAND_2G;
nss_5g = QDF_MIN(pMac->vdev_type_nss_5g.tdls,
pMac->user_configured_nss);
@@ -252,7 +252,7 @@
/* validating the channel list for DFS and 2G channels */
for (i = 0U; i < numChans; i++) {
- if ((band == eCSR_BAND_5G) &&
+ if ((band == BAND_5G) &&
(NSS_2x2_MODE == nss_5g) &&
(NSS_1x1_MODE == nss_2g) &&
(wlan_reg_is_dfs_ch(pMac->pdev, validChan[i]))) {
@@ -883,7 +883,7 @@
&tdlsDisRsp.SuppChannels,
&tdlsDisRsp.
SuppOperatingClasses);
- if (pMac->roam.configParam.bandCapability != eCSR_BAND_24) {
+ if (pMac->roam.configParam.bandCapability != BAND_2G) {
tdlsDisRsp.ht2040_bss_coexistence.present = 1;
tdlsDisRsp.ht2040_bss_coexistence.info_request = 1;
}
@@ -1248,7 +1248,7 @@
&tdlsSetupReq.SuppChannels,
&tdlsSetupReq.
SuppOperatingClasses);
- if (pMac->roam.configParam.bandCapability != eCSR_BAND_24) {
+ if (pMac->roam.configParam.bandCapability != BAND_2G) {
tdlsSetupReq.ht2040_bss_coexistence.present = 1;
tdlsSetupReq.ht2040_bss_coexistence.info_request = 1;
}
@@ -1694,7 +1694,7 @@
&tdlsSetupRsp.SuppChannels,
&tdlsSetupRsp.
SuppOperatingClasses);
- if (pMac->roam.configParam.bandCapability != eCSR_BAND_24) {
+ if (pMac->roam.configParam.bandCapability != BAND_2G) {
tdlsSetupRsp.ht2040_bss_coexistence.present = 1;
tdlsSetupRsp.ht2040_bss_coexistence.info_request = 1;
}
diff --git a/core/mac/src/pe/lim/lim_send_frames_host_roam.c b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
index c5c74b2..a95af5c 100644
--- a/core/mac/src/pe/lim/lim_send_frames_host_roam.c
+++ b/core/mac/src/pe/lim/lim_send_frames_host_roam.c
@@ -409,10 +409,10 @@
(uint8_t *) frame, (bytes + ft_ies_length));
if ((NULL != pe_session->ftPEContext.pFTPreAuthReq) &&
- (SIR_BAND_5_GHZ == lim_get_rf_band(
+ (BAND_5G == lim_get_rf_band(
pe_session->ftPEContext.pFTPreAuthReq->preAuthchannelNum)))
tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
- else if ((SIR_BAND_5_GHZ ==
+ else if ((BAND_5G ==
lim_get_rf_band(pe_session->currentOperChannel))
|| (pe_session->pePersona == QDF_P2P_CLIENT_MODE)
|| (pe_session->pePersona == QDF_P2P_GO_MODE))
@@ -760,7 +760,7 @@
psessionEntry->assocReqLen = nPayload;
}
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE))
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index 1c7ac5b..dd74c5b 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -439,7 +439,7 @@
/* If this probe request is sent during P2P Search State, then we need
* to send it at OFDM rate.
*/
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(channel))
+ if ((BAND_5G == lim_get_rf_band(channel))
|| ((mac_ctx->lim.gpLimMlmScanReq != NULL) &&
mac_ctx->lim.gpLimMlmScanReq->p2pSearch)
/*
@@ -855,7 +855,7 @@
}
}
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(pe_session->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(pe_session->currentOperChannel))
|| (pe_session->pePersona == QDF_P2P_CLIENT_MODE) ||
(pe_session->pePersona == QDF_P2P_GO_MODE)
)
@@ -1066,7 +1066,7 @@
pe_debug("Sending an Add TS Request frame to");
lim_print_mac_addr(pMac, peerMacAddr, LOGD);
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE)
|| (psessionEntry->pePersona == QDF_P2P_GO_MODE)
@@ -1417,7 +1417,7 @@
qdf_mem_copy(frame + sizeof(tSirMacMgmtHdr) + payload,
&add_ie[0], addn_ie_len);
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(pe_session->currentOperChannel)) ||
(pe_session->pePersona == QDF_P2P_CLIENT_MODE) ||
(pe_session->pePersona == QDF_P2P_GO_MODE))
@@ -1563,7 +1563,7 @@
pe_debug("Sending DELTS REQ (size %d) to ", nBytes);
lim_print_mac_addr(pMac, pMacHdr->da, LOGD);
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE)
|| (psessionEntry->pePersona == QDF_P2P_GO_MODE)
@@ -2039,7 +2039,7 @@
pe_session->assocReqLen = payload;
}
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(pe_session->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(pe_session->currentOperChannel))
|| (pe_session->pePersona == QDF_P2P_CLIENT_MODE)
|| (pe_session->pePersona == QDF_P2P_GO_MODE)
)
@@ -2416,10 +2416,10 @@
frame, frame_len);
if ((NULL != session->ftPEContext.pFTPreAuthReq) &&
- (SIR_BAND_5_GHZ == lim_get_rf_band(
+ (BAND_5G == lim_get_rf_band(
session->ftPEContext.pFTPreAuthReq->preAuthchannelNum)))
tx_flag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
- else if ((SIR_BAND_5_GHZ ==
+ else if ((BAND_5G ==
lim_get_rf_band(session->currentOperChannel))
|| (session->pePersona == QDF_P2P_CLIENT_MODE)
|| (session->pePersona == QDF_P2P_GO_MODE))
@@ -2806,7 +2806,7 @@
waitForAck, MAC_ADDR_ARRAY(pMacHdr->da),
MAC_ADDR_ARRAY(psessionEntry->selfMacAddr));
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -2978,7 +2978,7 @@
MAC_ADDR_ARRAY(pMacHdr->da),
MAC_ADDR_ARRAY(psessionEntry->selfMacAddr));
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -3503,7 +3503,7 @@
nStatus);
}
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -3622,7 +3622,7 @@
status);
}
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(session_entry->currentOperChannel)) ||
(session_entry->pePersona == QDF_P2P_CLIENT_MODE) ||
(session_entry->pePersona == QDF_P2P_GO_MODE)) {
@@ -3774,7 +3774,7 @@
status);
}
- if ((SIR_BAND_5_GHZ ==
+ if ((BAND_5G ==
lim_get_rf_band(session_entry->currentOperChannel)) ||
(session_entry->pePersona == QDF_P2P_CLIENT_MODE) ||
(session_entry->pePersona == QDF_P2P_GO_MODE)) {
@@ -3882,7 +3882,7 @@
pe_warn("There were warnings while packing a Operating Mode (0x%08x)",
nStatus);
}
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -4015,7 +4015,7 @@
pe_debug("Sending a Neighbor Report Request to");
lim_print_mac_addr(pMac, peer, LOGD);
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -4163,7 +4163,7 @@
pe_warn("Sending a Link Report to");
lim_print_mac_addr(pMac, peer, LOGW);
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)) {
txFlag |= HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME;
@@ -4349,7 +4349,7 @@
pe_warn("Sending a Radio Measure Report to");
lim_print_mac_addr(pMac, peer, LOGW);
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
) {
@@ -4484,7 +4484,7 @@
pe_debug("Sending an SA Query Request from ");
lim_print_mac_addr(pMac, psessionEntry->selfMacAddr, LOGD);
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
#ifdef WLAN_FEATURE_P2P
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
@@ -4615,7 +4615,7 @@
pe_debug("Sending a SA Query Response to");
lim_print_mac_addr(pMac, peer, LOGD);
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(psessionEntry->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(psessionEntry->currentOperChannel))
#ifdef WLAN_FEATURE_P2P
|| (psessionEntry->pePersona == QDF_P2P_CLIENT_MODE) ||
(psessionEntry->pePersona == QDF_P2P_GO_MODE)
@@ -4761,7 +4761,7 @@
}
- if ((SIR_BAND_5_GHZ == lim_get_rf_band(session->currentOperChannel))
+ if ((BAND_5G == lim_get_rf_band(session->currentOperChannel))
#ifdef WLAN_FEATURE_P2P
|| (session->pePersona == QDF_P2P_CLIENT_MODE) ||
(session->pePersona == QDF_P2P_GO_MODE)
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 1096d35..563ce99 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -1228,7 +1228,7 @@
{
uint16_t tmpAid;
tpDphHashNode pStaDs;
- tSirRFBand rfBand = SIR_BAND_UNKNOWN;
+ enum band_info rfBand = BAND_UNKNOWN;
uint32_t phyMode;
tLimProtStaCacheType protStaCacheType =
eLIM_PROT_STA_CACHE_TYPE_INVALID;
@@ -1245,7 +1245,7 @@
}
lim_get_rf_band_new(pMac, &rfBand, psessionEntry);
/* if we are in 5 GHZ band */
- if (SIR_BAND_5_GHZ == rfBand) {
+ if (BAND_5G == rfBand) {
/* We are 11N. we need to protect from 11A and Ht20. we don't need any other protection in 5 GHZ. */
/* HT20 case is common between both the bands and handled down as common code. */
if (true == psessionEntry->htCapability) {
@@ -1258,7 +1258,7 @@
return;
}
}
- } else if (SIR_BAND_2_4_GHZ == rfBand) {
+ } else if (BAND_2G == rfBand) {
lim_get_phy_mode(pMac, &phyMode, psessionEntry);
/* We are 11G. Check if we need protection from 11b Stations. */
@@ -1611,13 +1611,13 @@
tpSchBeaconStruct pBeaconStruct,
tpPESession psessionEntry)
{
- tSirRFBand rfBand = SIR_BAND_UNKNOWN;
+ enum band_info rfBand = BAND_UNKNOWN;
uint32_t phyMode = WNI_CFG_PHY_MODE_NONE;
lim_get_rf_band_new(pMac, &rfBand, psessionEntry);
lim_get_phy_mode(pMac, &phyMode, psessionEntry);
- if (SIR_BAND_5_GHZ == rfBand) {
+ if (BAND_5G == rfBand) {
if ((eSIR_HT_OP_MODE_MIXED == pBeaconStruct->HTInfo.opMode) ||
(eSIR_HT_OP_MODE_OVERLAP_LEGACY ==
pBeaconStruct->HTInfo.opMode)) {
@@ -1629,7 +1629,7 @@
psessionEntry->beaconParams.ht20Coexist = true;
}
- } else if (SIR_BAND_2_4_GHZ == rfBand) {
+ } else if (BAND_2G == rfBand) {
/* spec 7.3.2.13 */
/* UseProtection will be set when nonERP STA is associated. */
/* NonERPPresent bit will be set when: */
@@ -1846,13 +1846,13 @@
tpPESession psession_entry)
{
- tSirRFBand rfband = SIR_BAND_UNKNOWN;
+ enum band_info rfband = BAND_UNKNOWN;
uint32_t phy_mode = WNI_CFG_PHY_MODE_NONE;
lim_get_rf_band_new(mac_ctx, &rfband, psession_entry);
lim_get_phy_mode(mac_ctx, &phy_mode, psession_entry);
- if ((SIR_BAND_5_GHZ == rfband) &&
+ if ((BAND_5G == rfband) &&
/* we are HT capable. */
(true == psession_entry->htCapability) &&
(beacon_struct->HTInfo.present)) {
@@ -1888,7 +1888,7 @@
false, beaconparams,
psession_entry);
}
- } else if (SIR_BAND_2_4_GHZ == rfband) {
+ } else if (BAND_2G == rfband) {
lim_decide_sta_11bg_protection(mac_ctx, beacon_struct,
beaconparams, psession_entry, phy_mode);
}
diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h
index f7ac431..12943e9 100644
--- a/core/mac/src/pe/lim/lim_utils.h
+++ b/core/mac/src/pe/lim/lim_utils.h
@@ -279,17 +279,17 @@
struct csr_roam_session *lim_get_session_by_macaddr(tpAniSirGlobal mac_ctx,
tSirMacAddr self_mac);
-static inline tSirRFBand lim_get_rf_band(uint8_t channel)
+static inline enum band_info lim_get_rf_band(uint8_t channel)
{
if ((channel >= SIR_11A_CHANNEL_BEGIN) &&
(channel <= SIR_11A_CHANNEL_END))
- return SIR_BAND_5_GHZ;
+ return BAND_5G;
if ((channel >= SIR_11B_CHANNEL_BEGIN) &&
(channel <= SIR_11B_CHANNEL_END))
- return SIR_BAND_2_4_GHZ;
+ return BAND_2G;
- return SIR_BAND_UNKNOWN;
+ return BAND_UNKNOWN;
}
static inline tSirRetStatus