From b23aa57bf087f2a75e59990aec74bd602c65d46c Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 14 Jun 2018 17:04:44 +0530 Subject: [PATCH] qcacld-3.0: Remove unused code from driver Presently, while sending scan offload request to fw, fw is only notified whether the channel list is static or dynamic. Fw is not notified whether it is dynamic init, dynamic flush or dynamic update. Also, in HOST driver it is not being used anywhere. Remove the code to mark the channel list as dynamic update, dynamic flush or dynamic init. Instead, assign the channel list simply as dynamic. Change-Id: Iad834f07bb61963f0fbb6227ffcedfd1679d1a9e CRs-Fixed: 2260715 --- core/mac/inc/sir_api.h | 8 ++------ core/sme/src/csr/csr_api_roam.c | 20 +++----------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 613f345d6de1..e12a59d774cc 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2412,12 +2412,8 @@ typedef struct sSirUpdateAPWPARSNIEsReq { #define SIR_ROAM_SCAN_MAX_PB_REQ_SIZE 450 /* Occupied channel list remains static */ #define CHANNEL_LIST_STATIC 1 -/* Occupied channel list can be learnt after init */ -#define CHANNEL_LIST_DYNAMIC_INIT 2 -/* Occupied channel list can be learnt after flush */ -#define CHANNEL_LIST_DYNAMIC_FLUSH 3 -/* Occupied channel list can be learnt after update */ -#define CHANNEL_LIST_DYNAMIC_UPDATE 4 +/* Occupied channel list can be dynamic */ +#define CHANNEL_LIST_DYNAMIC 2 #define SIR_ROAM_SCAN_24G_DEFAULT_CH 1 #define SIR_ROAM_SCAN_5G_DEFAULT_CH 36 #define SIR_ROAM_SCAN_RESERVED_BYTES 61 diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index ec5b94b59384..28d7a750ea42 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -2140,7 +2140,7 @@ csr_fetch_ch_lst_from_received_list(tpAniSirGlobal mac_ctx, ch_lst++; } req_buf->ConnectedNetwork.ChannelCount = num_channels; - req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_UPDATE; + req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC; } #endif @@ -18214,21 +18214,7 @@ csr_fetch_ch_lst_from_occupied_lst(tpAniSirGlobal mac_ctx, ch_lst++; } req_buf->ConnectedNetwork.ChannelCount = num_channels; - /* - * If the profile changes as to what it was earlier, inform the FW - * through FLUSH as ChannelCacheType in which case, the FW will flush - * the occupied channels for the earlier profile and try to learn them - * afresh - */ - if (reason == REASON_FLUSH_CHANNEL_LIST) - req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_FLUSH; - else { - if (csr_neighbor_roam_is_new_connected_profile(mac_ctx, - session_id)) - req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_INIT; - else - req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_UPDATE; - } + req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC; } /** @@ -18330,7 +18316,7 @@ csr_fetch_valid_ch_lst(tpAniSirGlobal mac_ctx, } req_buf->ValidChannelCount = num_channels; - req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC_UPDATE; + req_buf->ChannelCacheType = CHANNEL_LIST_DYNAMIC; req_buf->ConnectedNetwork.ChannelCount = num_channels; return status; }