From 2c01763092b8327ed7bd0f618b139c2bd60f12b8 Mon Sep 17 00:00:00 2001 From: wadesong Date: Mon, 15 Jul 2019 14:41:11 +0800 Subject: [PATCH] qcacld-3.0: Replace channel ID with channel frequency Replace channel ID(channelIdSelf) with channel frequency( freq_self) in struct bss_description. Change-Id: I2fa9576aaa7503cf18d6600cc37465e42c8826aa CRs-Fixed: 2492150 --- core/mac/inc/sir_api.h | 2 +- core/mac/src/pe/lim/lim_api.c | 2 +- core/mac/src/pe/lim/lim_scan_result_utils.c | 2 +- core/sme/src/csr/csr_api_scan.c | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 18a011845180..bd8d27233416 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -663,7 +663,7 @@ struct bss_description { uint32_t chan_freq; /* channelId on which we are parked at. */ /* used only in scan case. */ - uint8_t channelIdSelf; + uint32_t freq_self; uint8_t sSirBssDescriptionRsvd[3]; /* Based on system time, not a relative time. */ uint64_t received_time; diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 8d5132649d9a..f918074b407e 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2188,7 +2188,7 @@ lim_roam_fill_bss_descr(struct mac_context *mac, cds_freq_to_chan(roam_synch_ind_ptr->chan_freq); bss_desc_ptr->chan_freq = roam_synch_ind_ptr->chan_freq; } - bss_desc_ptr->channelIdSelf = bss_desc_ptr->channelId; + bss_desc_ptr->freq_self = bss_desc_ptr->chan_freq; bss_desc_ptr->nwType = lim_get_nw_type(mac, bss_desc_ptr->channelId, SIR_MAC_MGMT_FRAME, diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c index ac7e7689ef34..01b8d18a6489 100644 --- a/core/mac/src/pe/lim/lim_scan_result_utils.c +++ b/core/mac/src/pe/lim/lim_scan_result_utils.c @@ -136,7 +136,7 @@ lim_collect_bss_description(struct mac_context *mac, pBssDescr->channelId = channel_num; pBssDescr->chan_freq = wlan_reg_chan_to_freq(mac->pdev, channel_num); - pBssDescr->channelIdSelf = pBssDescr->channelId; + pBssDescr->freq_self = pBssDescr->chan_freq; pBssDescr->rx_channel = rxChannel; /* set the network type in bss description */ diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index f793be4377cf..c7c9241d8ebb 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -2647,9 +2647,10 @@ static QDF_STATUS csr_fill_bss_from_scan_entry(struct mac_context *mac_ctx, scan_entry->channel.chan_idx); /* channelId on which we are parked at. */ /* used only in scan case. */ - bss_desc->channelIdSelf = - scan_entry->channel.chan_idx; - bss_desc->rx_channel = bss_desc->channelIdSelf; + bss_desc->freq_self = + wlan_reg_chan_to_freq(mac_ctx->pdev, + scan_entry->channel.chan_idx); + bss_desc->rx_channel = scan_entry->channel.chan_idx; bss_desc->received_time = scan_entry->scan_entry_time; bss_desc->startTSF[0] =