mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Replace channel id to freq in lim_get_rf_band()
In lim_get_rf_band() replace channel id to frequency Change-Id: I5250e75a98353ce6c20756474c5a228b169336fd CRs-Fixed: 2557859
This commit is contained in:
parent
39c7d07ea1
commit
453c4e20ac
12 changed files with 71 additions and 66 deletions
|
|
@ -406,10 +406,10 @@ static inline void lim_get_phy_mode(struct mac_context *mac, uint32_t *phyMode,
|
|||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
static inline void lim_get_rf_band_new(struct mac_context *mac,
|
||||
enum band_info *band,
|
||||
enum reg_wifi_band *band,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
*band = pe_session ? pe_session->limRFBand : BAND_UNKNOWN;
|
||||
*band = pe_session ? pe_session->limRFBand : REG_BAND_UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ struct pe_session {
|
|||
uint8_t htRecommendedTxWidthSet;
|
||||
/* Identifies the 40 MHz extension channel */
|
||||
ePhyChanBondState htSecondaryChannelOffset;
|
||||
enum band_info limRFBand;
|
||||
enum reg_wifi_band limRFBand;
|
||||
uint8_t limIbssActive; /* TO SUPPORT CONCURRENCY */
|
||||
|
||||
/* These global varibales moved to session Table to support BT-AMP : Oct 9th review */
|
||||
|
|
|
|||
|
|
@ -1040,7 +1040,7 @@ lim_decide_ap_protection_on_delete(struct mac_context *mac_ctx,
|
|||
{
|
||||
uint32_t phy_mode;
|
||||
tHalBitVal erp_enabled = eHAL_CLEAR;
|
||||
enum band_info rf_band = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rf_band = REG_BAND_UNKNOWN;
|
||||
uint32_t i;
|
||||
|
||||
if (!sta_ds)
|
||||
|
|
@ -1050,7 +1050,7 @@ lim_decide_ap_protection_on_delete(struct mac_context *mac_ctx,
|
|||
lim_get_phy_mode(mac_ctx, &phy_mode, session_entry);
|
||||
erp_enabled = sta_ds->erpEnabled;
|
||||
|
||||
if ((BAND_5G == rf_band) &&
|
||||
if ((REG_BAND_5G == rf_band) &&
|
||||
(true == session_entry->htCapability) &&
|
||||
(session_entry->beaconParams.llaCoexist) &&
|
||||
(false == sta_ds->mlmStaContext.htCapability)) {
|
||||
|
|
@ -1082,7 +1082,7 @@ lim_decide_ap_protection_on_delete(struct mac_context *mac_ctx,
|
|||
}
|
||||
|
||||
/* we are HT or 11G and 11B station is getting deleted */
|
||||
if ((BAND_2G == rf_band) &&
|
||||
if ((REG_BAND_2G == rf_band) &&
|
||||
(phy_mode == WNI_CFG_PHY_MODE_11G ||
|
||||
session_entry->htCapability) &&
|
||||
(erp_enabled == eHAL_CLEAR)) {
|
||||
|
|
@ -1112,7 +1112,7 @@ lim_decide_ap_protection_on_delete(struct mac_context *mac_ctx,
|
|||
* we are HT AP and non-11B station is leaving.
|
||||
* 11g station is leaving
|
||||
*/
|
||||
if ((BAND_2G == rf_band) &&
|
||||
if ((REG_BAND_2G == rf_band) &&
|
||||
session_entry->htCapability &&
|
||||
!sta_ds->mlmStaContext.htCapability) {
|
||||
pe_debug("(%d) A 11g STA is disassociated. Addr is %pM",
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ static void lim_fill_dot11mode(struct mac_context *mac_ctx,
|
|||
}
|
||||
self_dot11_mode = mac_ctx->mlme_cfg->dot11_mode.dot11_mode;
|
||||
pe_debug("selfDot11Mode: %d", self_dot11_mode);
|
||||
if (ft_session->limRFBand == BAND_2G)
|
||||
if (ft_session->limRFBand == REG_BAND_2G)
|
||||
ft_session->dot11mode = MLME_DOT11_MODE_11G;
|
||||
else
|
||||
ft_session->dot11mode = MLME_DOT11_MODE_11A;
|
||||
|
|
@ -515,8 +515,7 @@ void lim_fill_ft_session(struct mac_context *mac,
|
|||
wlan_reg_freq_to_chan(mac->pdev, pbssDescription->chan_freq);
|
||||
ft_session->lim_reassoc_chan_freq = pbssDescription->chan_freq;
|
||||
ft_session->curr_op_freq = pbssDescription->chan_freq;
|
||||
ft_session->limRFBand = lim_get_rf_band(wlan_reg_freq_to_chan(
|
||||
mac->pdev, ft_session->curr_op_freq));
|
||||
ft_session->limRFBand = lim_get_rf_band(ft_session->curr_op_freq);
|
||||
|
||||
lim_fill_dot11mode(mac, ft_session, pe_session, pBeaconStruct);
|
||||
|
||||
|
|
@ -536,7 +535,7 @@ void lim_fill_ft_session(struct mac_context *mac,
|
|||
|
||||
ft_session->nss = ft_session ->vdev_nss;
|
||||
|
||||
if (ft_session->limRFBand == BAND_2G) {
|
||||
if (ft_session->limRFBand == REG_BAND_2G) {
|
||||
cbEnabledMode = mac->roam.configParam.channelBondingMode24GHz;
|
||||
} else {
|
||||
cbEnabledMode = mac->roam.configParam.channelBondingMode5GHz;
|
||||
|
|
@ -663,7 +662,7 @@ void lim_fill_ft_session(struct mac_context *mac,
|
|||
#ifdef WLAN_FEATURE_11W
|
||||
ft_session->limRmfEnabled = pe_session->limRmfEnabled;
|
||||
#endif
|
||||
if ((ft_session->limRFBand == BAND_2G) &&
|
||||
if ((ft_session->limRFBand == REG_BAND_2G) &&
|
||||
(ft_session->htSupportedChannelWidthSet ==
|
||||
eHT_CHANNEL_WIDTH_40MHZ))
|
||||
lim_init_obss_params(mac, ft_session);
|
||||
|
|
|
|||
|
|
@ -824,7 +824,7 @@ lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode sta,
|
|||
tpUpdateBeaconParams pBeaconParams,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
enum band_info rfBand = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfBand = REG_BAND_UNKNOWN;
|
||||
uint32_t phyMode;
|
||||
tLimProtStaCacheType protStaCacheType =
|
||||
eLIM_PROT_STA_CACHE_TYPE_INVALID;
|
||||
|
|
@ -837,7 +837,7 @@ lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode sta,
|
|||
}
|
||||
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
if (BAND_2G == rfBand) {
|
||||
if (REG_BAND_2G == rfBand) {
|
||||
lim_get_phy_mode(mac, &phyMode, pe_session);
|
||||
|
||||
/* We are 11G or 11n. Check if we need protection from 11b Stations. */
|
||||
|
|
@ -1576,14 +1576,14 @@ void lim_ibss_decide_protection_on_delete(struct mac_context *mac_ctx,
|
|||
{
|
||||
uint32_t phymode;
|
||||
tHalBitVal erpenabled = eHAL_CLEAR;
|
||||
enum band_info rfband = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfband = REG_BAND_UNKNOWN;
|
||||
uint32_t i;
|
||||
|
||||
if (!stads)
|
||||
return;
|
||||
|
||||
lim_get_rf_band_new(mac_ctx, &rfband, session);
|
||||
if (BAND_2G != rfband)
|
||||
if (REG_BAND_2G != rfband)
|
||||
return;
|
||||
|
||||
lim_get_phy_mode(mac_ctx, &phymode, session);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ static void lim_convert_supported_channels(struct mac_context *mac_ctx,
|
|||
uint8_t chn_count;
|
||||
uint8_t next_ch_no;
|
||||
uint8_t channel_offset = 0;
|
||||
uint32_t chan_freq;
|
||||
|
||||
if (assoc_req->supportedChannels.length >=
|
||||
SIR_MAX_SUPPORTED_CHANNEL_LIST) {
|
||||
|
|
@ -93,9 +94,12 @@ static void lim_convert_supported_channels(struct mac_context *mac_ctx,
|
|||
if (chn_count <= 1)
|
||||
continue;
|
||||
next_ch_no = first_ch_no;
|
||||
if (BAND_5G == lim_get_rf_band(first_ch_no))
|
||||
chan_freq = wlan_reg_legacy_chan_to_freq(mac_ctx->pdev,
|
||||
first_ch_no);
|
||||
|
||||
if (REG_BAND_5G == lim_get_rf_band(chan_freq))
|
||||
channel_offset = SIR_11A_FREQUENCY_OFFSET;
|
||||
else if (BAND_2G == lim_get_rf_band(first_ch_no))
|
||||
else if (REG_BAND_2G == lim_get_rf_band(chan_freq))
|
||||
channel_offset = SIR_11B_FREQUENCY_OFFSET;
|
||||
else
|
||||
continue;
|
||||
|
|
@ -2498,7 +2502,7 @@ static void lim_fill_assoc_ind_vht_info(struct mac_context *mac_ctx,
|
|||
uint8_t i;
|
||||
bool nw_type_11b = true;
|
||||
|
||||
if (session_entry->limRFBand == BAND_2G) {
|
||||
if (session_entry->limRFBand == REG_BAND_2G) {
|
||||
if (session_entry->vhtCapability && assoc_req->VHTCaps.present)
|
||||
assoc_ind->chan_info.info = MODE_11AC_VHT20_2G;
|
||||
else if (session_entry->htCapability
|
||||
|
|
|
|||
|
|
@ -912,13 +912,14 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
|
|||
mlm_start_req->txChannelWidthSet =
|
||||
session->htRecommendedTxWidthSet;
|
||||
|
||||
session->limRFBand = lim_get_rf_band(channel_number);
|
||||
session->limRFBand = lim_get_rf_band(
|
||||
sme_start_bss_req->oper_ch_freq);
|
||||
|
||||
/* Initialize 11h Enable Flag */
|
||||
session->lim11hEnable = 0;
|
||||
if (mlm_start_req->bssType != eSIR_IBSS_MODE &&
|
||||
(CHAN_HOP_ALL_BANDS_ENABLE ||
|
||||
BAND_5G == session->limRFBand)) {
|
||||
REG_BAND_5G == session->limRFBand)) {
|
||||
session->lim11hEnable =
|
||||
mac_ctx->mlme_cfg->gen.enabled_11h;
|
||||
|
||||
|
|
@ -1632,12 +1633,10 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf)
|
|||
session->gUapsdPerAcTriggerEnableMask = 0;
|
||||
}
|
||||
|
||||
session->limRFBand = lim_get_rf_band(
|
||||
wlan_reg_freq_to_chan(mac_ctx->pdev,
|
||||
session->curr_op_freq));
|
||||
session->limRFBand = lim_get_rf_band(session->curr_op_freq);
|
||||
|
||||
/* Initialize 11h Enable Flag */
|
||||
if (session->limRFBand == BAND_5G)
|
||||
if (session->limRFBand == REG_BAND_5G)
|
||||
session->lim11hEnable =
|
||||
mac_ctx->mlme_cfg->gen.enabled_11h;
|
||||
else
|
||||
|
|
@ -5094,8 +5093,7 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
|
|||
session_entry->htSupportedChannelWidthSet;
|
||||
session_entry->curr_op_freq = target_freq;
|
||||
session_entry->limRFBand = lim_get_rf_band(
|
||||
wlan_reg_freq_to_chan(
|
||||
mac_ctx->pdev, session_entry->curr_op_freq));
|
||||
session_entry->curr_op_freq);
|
||||
session_entry->cac_duration_ms = ch_change_req->cac_duration_ms;
|
||||
session_entry->dfs_regdomain = ch_change_req->dfs_regdomain;
|
||||
session_entry->maxTxPower = max_tx_pwr;
|
||||
|
|
@ -5105,7 +5103,7 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
|
|||
|
||||
/* Initialize 11h Enable Flag */
|
||||
if (CHAN_HOP_ALL_BANDS_ENABLE ||
|
||||
session_entry->limRFBand == BAND_5G)
|
||||
session_entry->limRFBand == REG_BAND_5G)
|
||||
session_entry->lim11hEnable =
|
||||
mac_ctx->mlme_cfg->gen.enabled_11h;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|||
tDot11fIEExtCap extracted_ext_cap;
|
||||
QDF_STATUS sir_status;
|
||||
const uint8_t *qcn_ie = NULL;
|
||||
uint32_t chan_freq;
|
||||
|
||||
if (additional_ielen)
|
||||
addn_ielen = *additional_ielen;
|
||||
|
|
@ -406,10 +407,12 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
|
|||
payload += addn_ielen;
|
||||
}
|
||||
|
||||
chan_freq = wlan_reg_chan_to_freq(mac_ctx->pdev, channel);
|
||||
|
||||
/* If this probe request is sent during P2P Search State, then we need
|
||||
* to send it at OFDM rate.
|
||||
*/
|
||||
if ((BAND_5G == lim_get_rf_band(channel)) ||
|
||||
if ((REG_BAND_5G == lim_get_rf_band(chan_freq)) ||
|
||||
/*
|
||||
* For unicast probe req mgmt from Join function we don't set
|
||||
* above variables. So we need to add one more check whether it
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
|||
{
|
||||
uint16_t tmpAid;
|
||||
tpDphHashNode sta;
|
||||
enum band_info rfBand = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfBand = REG_BAND_UNKNOWN;
|
||||
uint32_t phyMode;
|
||||
tLimProtStaCacheType protStaCacheType =
|
||||
eLIM_PROT_STA_CACHE_TYPE_INVALID;
|
||||
|
|
@ -1098,7 +1098,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
|||
}
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
/* if we are in 5 GHZ band */
|
||||
if (BAND_5G == rfBand) {
|
||||
if (REG_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 == pe_session->htCapability) {
|
||||
|
|
@ -1111,7 +1111,7 @@ lim_decide_ap_protection(struct mac_context *mac, tSirMacAddr peerMacAddr,
|
|||
return;
|
||||
}
|
||||
}
|
||||
} else if (BAND_2G == rfBand) {
|
||||
} else if (REG_BAND_2G == rfBand) {
|
||||
lim_get_phy_mode(mac, &phyMode, pe_session);
|
||||
|
||||
/* We are 11G. Check if we need protection from 11b Stations. */
|
||||
|
|
@ -1464,13 +1464,13 @@ lim_decide_sta_protection_on_assoc(struct mac_context *mac,
|
|||
tpSchBeaconStruct pBeaconStruct,
|
||||
struct pe_session *pe_session)
|
||||
{
|
||||
enum band_info rfBand = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfBand = REG_BAND_UNKNOWN;
|
||||
uint32_t phyMode = WNI_CFG_PHY_MODE_NONE;
|
||||
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
lim_get_phy_mode(mac, &phyMode, pe_session);
|
||||
|
||||
if (BAND_5G == rfBand) {
|
||||
if (REG_BAND_5G == rfBand) {
|
||||
if ((eSIR_HT_OP_MODE_MIXED == pBeaconStruct->HTInfo.opMode) ||
|
||||
(eSIR_HT_OP_MODE_OVERLAP_LEGACY ==
|
||||
pBeaconStruct->HTInfo.opMode)) {
|
||||
|
|
@ -1482,7 +1482,7 @@ lim_decide_sta_protection_on_assoc(struct mac_context *mac,
|
|||
pe_session->beaconParams.ht20Coexist = true;
|
||||
}
|
||||
|
||||
} else if (BAND_2G == rfBand) {
|
||||
} else if (REG_BAND_2G == rfBand) {
|
||||
/* spec 7.3.2.13 */
|
||||
/* UseProtection will be set when nonERP STA is associated. */
|
||||
/* NonERPPresent bit will be set when: */
|
||||
|
|
@ -1699,13 +1699,13 @@ lim_decide_sta_protection(struct mac_context *mac_ctx,
|
|||
struct pe_session *psession_entry)
|
||||
{
|
||||
|
||||
enum band_info rfband = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfband = REG_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 ((BAND_5G == rfband) &&
|
||||
if ((REG_BAND_5G == rfband) &&
|
||||
/* we are HT capable. */
|
||||
(true == psession_entry->htCapability) &&
|
||||
(beacon_struct->HTInfo.present)) {
|
||||
|
|
@ -1741,7 +1741,7 @@ lim_decide_sta_protection(struct mac_context *mac_ctx,
|
|||
false, beaconparams,
|
||||
psession_entry);
|
||||
}
|
||||
} else if (BAND_2G == rfband) {
|
||||
} else if (REG_BAND_2G == rfband) {
|
||||
lim_decide_sta_11bg_protection(mac_ctx, beacon_struct,
|
||||
beaconparams, psession_entry, phy_mode);
|
||||
}
|
||||
|
|
@ -2267,7 +2267,7 @@ void lim_switch_primary_channel(struct mac_context *mac, uint8_t new_channel,
|
|||
pe_session->ch_center_freq_seg0 = 0;
|
||||
pe_session->ch_center_freq_seg1 = 0;
|
||||
pe_session->ch_width = CH_WIDTH_20MHZ;
|
||||
pe_session->limRFBand = lim_get_rf_band(new_channel);
|
||||
pe_session->limRFBand = lim_get_rf_band(pe_session->curr_req_chan_freq);
|
||||
|
||||
pe_session->channelChangeReasonCode = LIM_SWITCH_CHANNEL_OPERATION;
|
||||
|
||||
|
|
@ -2308,7 +2308,7 @@ void lim_switch_primary_secondary_channel(struct mac_context *mac,
|
|||
/* Assign the callback to resume TX once channel is changed. */
|
||||
pe_session->curr_req_chan_freq = wlan_reg_chan_to_freq(mac->pdev,
|
||||
new_channel);
|
||||
pe_session->limRFBand = lim_get_rf_band(new_channel);
|
||||
pe_session->limRFBand = lim_get_rf_band(pe_session->curr_req_chan_freq);
|
||||
pe_session->channelChangeReasonCode = LIM_SWITCH_CHANNEL_OPERATION;
|
||||
mac->lim.gpchangeChannelCallback = lim_switch_channel_cback;
|
||||
mac->lim.gpchangeChannelData = NULL;
|
||||
|
|
|
|||
|
|
@ -375,17 +375,18 @@ lim_assoc_rej_get_remaining_delta(struct sir_rssi_disallow_lst *node);
|
|||
QDF_STATUS
|
||||
lim_rem_blacklist_entry_with_lowest_delta(qdf_list_t *list);
|
||||
|
||||
static inline enum band_info lim_get_rf_band(uint8_t channel)
|
||||
static inline enum reg_wifi_band lim_get_rf_band(uint32_t chan_freq)
|
||||
{
|
||||
if ((channel >= SIR_11A_CHANNEL_BEGIN) &&
|
||||
(channel <= SIR_11A_CHANNEL_END))
|
||||
return BAND_5G;
|
||||
if (WLAN_REG_IS_6GHZ_CHAN_FREQ(chan_freq))
|
||||
return REG_BAND_6G;
|
||||
|
||||
if ((channel >= SIR_11B_CHANNEL_BEGIN) &&
|
||||
(channel <= SIR_11B_CHANNEL_END))
|
||||
return BAND_2G;
|
||||
if (WLAN_REG_IS_5GHZ_CH_FREQ(chan_freq))
|
||||
return REG_BAND_5G;
|
||||
|
||||
return BAND_UNKNOWN;
|
||||
if (WLAN_REG_IS_24GHZ_CH_FREQ(chan_freq))
|
||||
return REG_BAND_2G;
|
||||
|
||||
return REG_BAND_UNKNOWN;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
|
|
|
|||
|
|
@ -221,16 +221,16 @@ ap_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
|
|||
tpUpdateBeaconParams bcn_prm, struct pe_session *session)
|
||||
{
|
||||
uint32_t phy_mode;
|
||||
enum band_info rf_band = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rf_band = REG_BAND_UNKNOWN;
|
||||
/* Get RF band from session */
|
||||
rf_band = session->limRFBand;
|
||||
|
||||
lim_get_phy_mode(mac_ctx, &phy_mode, session);
|
||||
|
||||
if (BAND_5G == rf_band)
|
||||
if (REG_BAND_5G == rf_band)
|
||||
ap_beacon_process_5_ghz(mac_ctx, rx_pkt_info, bcn_struct,
|
||||
bcn_prm, session, phy_mode);
|
||||
else if (BAND_2G == rf_band)
|
||||
else if (REG_BAND_2G == rf_band)
|
||||
ap_beacon_process_24_ghz(mac_ctx, rx_pkt_info, bcn_struct,
|
||||
bcn_prm, session, phy_mode);
|
||||
}
|
||||
|
|
@ -1323,7 +1323,7 @@ QDF_STATUS lim_obss_generate_detection_config(struct mac_context *mac_ctx,
|
|||
struct obss_detection_cfg *cfg)
|
||||
{
|
||||
uint32_t phy_mode;
|
||||
enum band_info rf_band = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rf_band = REG_BAND_UNKNOWN;
|
||||
struct obss_detection_cfg *cur_detect;
|
||||
|
||||
if (!mac_ctx || !session || !cfg) {
|
||||
|
|
@ -1359,7 +1359,7 @@ QDF_STATUS lim_obss_generate_detection_config(struct mac_context *mac_ctx,
|
|||
cur_detect->obss_ht_mixed_detect_mode,
|
||||
cur_detect->obss_ht_20mhz_detect_mode);
|
||||
|
||||
if (rf_band == BAND_2G) {
|
||||
if (rf_band == REG_BAND_2G) {
|
||||
if ((phy_mode == WNI_CFG_PHY_MODE_11G ||
|
||||
session->htCapability) &&
|
||||
!session->gLim11bParams.protectionEnabled) {
|
||||
|
|
@ -1421,7 +1421,7 @@ QDF_STATUS lim_obss_generate_detection_config(struct mac_context *mac_ctx,
|
|||
OBSS_OFFLOAD_DETECTION_DISABLED;
|
||||
}
|
||||
|
||||
if ((rf_band == BAND_5G) && session->htCapability) {
|
||||
if ((rf_band == REG_BAND_5G) && session->htCapability) {
|
||||
if (!session->gLim11aParams.protectionEnabled) {
|
||||
if (!session->gLimOverlap11aParams.protectionEnabled)
|
||||
cfg->obss_11a_detect_mode =
|
||||
|
|
@ -1435,7 +1435,7 @@ QDF_STATUS lim_obss_generate_detection_config(struct mac_context *mac_ctx,
|
|||
}
|
||||
}
|
||||
|
||||
if (((rf_band == BAND_2G) || (rf_band == BAND_5G)) &&
|
||||
if (((rf_band == REG_BAND_2G) || (rf_band == REG_BAND_5G)) &&
|
||||
session->htCapability) {
|
||||
|
||||
if (!session->gLimHt20Params.protectionEnabled) {
|
||||
|
|
@ -1554,7 +1554,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
bool enable;
|
||||
struct pe_session *session;
|
||||
tUpdateBeaconParams bcn_prm;
|
||||
enum band_info rf_band = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rf_band = REG_BAND_UNKNOWN;
|
||||
struct obss_detection_cfg *cur_detect;
|
||||
|
||||
pe_debug("obss detect ind id %d, reason %d, msk 0x%x, " QDF_MAC_ADDR_STR,
|
||||
|
|
@ -1620,7 +1620,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
|
||||
if (OBSS_DETECTION_IS_11B_AP(detect_masks)) {
|
||||
if (reason != obss_cfg->obss_11b_ap_detect_mode ||
|
||||
rf_band != BAND_2G)
|
||||
rf_band != REG_BAND_2G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_enable11g_protection(mac_ctx, enable, true,
|
||||
|
|
@ -1629,7 +1629,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
}
|
||||
if (OBSS_DETECTION_IS_11B_STA(detect_masks)) {
|
||||
if (reason != obss_cfg->obss_11b_sta_detect_mode ||
|
||||
rf_band != BAND_2G)
|
||||
rf_band != REG_BAND_2G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_enable11g_protection(mac_ctx, enable, true,
|
||||
|
|
@ -1638,7 +1638,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
}
|
||||
if (OBSS_DETECTION_IS_11G_AP(detect_masks)) {
|
||||
if (reason != obss_cfg->obss_11g_ap_detect_mode ||
|
||||
rf_band != BAND_2G)
|
||||
rf_band != REG_BAND_2G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_enable_ht_protection_from11g(mac_ctx, enable, true,
|
||||
|
|
@ -1647,7 +1647,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
}
|
||||
if (OBSS_DETECTION_IS_11A(detect_masks)) {
|
||||
if (reason != obss_cfg->obss_11a_detect_mode ||
|
||||
rf_band != BAND_5G)
|
||||
rf_band != REG_BAND_5G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_update_11a_protection(mac_ctx, enable, true,
|
||||
|
|
@ -1657,7 +1657,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
if (OBSS_DETECTION_IS_HT_LEGACY(detect_masks)) {
|
||||
/* for 5GHz, we have only 11a detection, which covers legacy */
|
||||
if (reason != obss_cfg->obss_ht_legacy_detect_mode ||
|
||||
rf_band != BAND_2G)
|
||||
rf_band != REG_BAND_2G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_enable_ht_protection_from11g(mac_ctx, enable, true,
|
||||
|
|
@ -1667,7 +1667,7 @@ QDF_STATUS lim_process_obss_detection_ind(struct mac_context *mac_ctx,
|
|||
if (OBSS_DETECTION_IS_HT_MIXED(detect_masks)) {
|
||||
/* for 5GHz, we have only 11a detection, which covers ht mix */
|
||||
if (reason != obss_cfg->obss_ht_mixed_detect_mode ||
|
||||
rf_band != BAND_2G)
|
||||
rf_band != REG_BAND_2G)
|
||||
goto wrong_detection;
|
||||
|
||||
lim_enable_ht_protection_from11g(mac_ctx, enable, true,
|
||||
|
|
|
|||
|
|
@ -386,7 +386,7 @@ populate_dot11f_country(struct mac_context *mac,
|
|||
tDot11fIECountry *pDot11f, struct pe_session *pe_session)
|
||||
{
|
||||
uint32_t len, j = 0;
|
||||
enum band_info rfBand;
|
||||
enum reg_wifi_band rfBand;
|
||||
uint8_t temp[CFG_MAX_STR_LEN], code[3];
|
||||
tSirMacChanInfo *max_tx_power_data;
|
||||
uint32_t rem_length = 0, copied_length = 0;
|
||||
|
|
@ -395,7 +395,7 @@ populate_dot11f_country(struct mac_context *mac,
|
|||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
if (rfBand == BAND_5G) {
|
||||
if (rfBand == REG_BAND_5G) {
|
||||
len = mac->mlme_cfg->power.max_tx_power_5.len;
|
||||
max_tx_power_data =
|
||||
(tSirMacChanInfo *)mac->mlme_cfg->power.max_tx_power_5.data;
|
||||
|
|
@ -563,10 +563,10 @@ populate_dot11f_erp_info(struct mac_context *mac,
|
|||
tDot11fIEERPInfo *pDot11f, struct pe_session *pe_session)
|
||||
{
|
||||
uint32_t val;
|
||||
enum band_info rfBand = BAND_UNKNOWN;
|
||||
enum reg_wifi_band rfBand = REG_BAND_UNKNOWN;
|
||||
|
||||
lim_get_rf_band_new(mac, &rfBand, pe_session);
|
||||
if (BAND_2G == rfBand) {
|
||||
if (REG_BAND_2G == rfBand) {
|
||||
pDot11f->present = 1;
|
||||
|
||||
val = pe_session->cfgProtection.fromllb;
|
||||
|
|
|
|||
Loading…
Reference in a new issue