diff options
| author | komal seelam <kseelam@qti.qualcomm.com> | 2013-11-13 12:41:08 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2013-12-03 14:39:37 -0800 |
| commit | dc2895dfedd705a3275e684a2965756009676544 (patch) | |
| tree | 2faf90fc5676c6ebadf86b0b953493f778c4e92c | |
| parent | 1b53e257698e4308264f1b528ad5d448ed0a72de (diff) | |
Logic to map the channel index to channel number is moved from LIM to WDA.
BD channel index is distributed in different layers for various platforms
(Discrete/Integrated)which in turn reflect with changes in TL layer.
To avoid changing TL to support multiple platforms, the logic mapping is
moved down to wireless device interfaces "(WDA in case of integrated
solution & WMA in case of discrete solution)in the WLAN driver.
Change-Id: Ib6896a31fd0c517969170f688c3313fc642952cb
CRs-fixed: 557229
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.c | 19 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wma_api.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 5 | ||||
| -rw-r--r-- | CORE/WDA/inc/wlan_qct_wda.h | 3 | ||||
| -rw-r--r-- | CORE/WDA/src/wlan_qct_wda.c | 22 |
5 files changed, 33 insertions, 18 deletions
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index 5b55324aa94b..f9f23bcbda1d 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -64,15 +64,6 @@ * this information. */ static tAniBool glimTriggerBackgroundScanDuringQuietBss_Status = eSIR_TRUE; -/* 11A Channel list to decode RX BD channel information */ -static const tANI_U8 abChannel[]= {36,40,44,48,52,56,60,64,100,104,108,112,116, - 120,124,128,132,136,140,149,153,157,161,165}; - -#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD -static const tANI_U8 aUnsortedChannelList[]= {52,56,60,64,100,104,108,112,116, - 120,124,128,132,136,140,36,40,44,48,149,153,157,161,165}; -#endif - //#define LIM_MAX_ACTIVE_SESSIONS 3 //defined temporarily for BT-AMP SUPPORT #define SUCCESS 1 //defined temporarily for BT-AMP @@ -7378,15 +7369,7 @@ void limProcessDelStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ) *****************************************************************/ tANI_U8 limUnmapChannel(tANI_U8 mapChannel) { - if( mapChannel > 0 && mapChannel < 25 ) -#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD - if (IS_ROAM_SCAN_OFFLOAD_FEATURE_ENABLE) - return aUnsortedChannelList[mapChannel -1]; - else -#endif - return abChannel[mapChannel -1]; - else - return 0; + return WDA_MapChannel(mapChannel); } diff --git a/CORE/SERVICES/COMMON/wma_api.h b/CORE/SERVICES/COMMON/wma_api.h index 233017c499ab..e98cfcb0b03d 100644 --- a/CORE/SERVICES/COMMON/wma_api.h +++ b/CORE/SERVICES/COMMON/wma_api.h @@ -107,6 +107,8 @@ v_BOOL_t wma_needshutdown(v_VOID_t *vos_context); VOS_STATUS wma_wait_for_ready_event(WMA_HANDLE handle); +tANI_U8 wma_map_channel(tANI_U8 mapChannel); + int wma_cli_get_command(void *wmapvosContext, int vdev_id, int param_id, int vpdev); eHalStatus wma_set_htconfig(tANI_U8 vdev_id, tANI_U16 ht_capab, int value); diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 11662d062aff..cf8bacdbc6f3 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -11613,3 +11613,8 @@ void wma_send_regdomain_info(u_int32_t reg_dmn, u_int16_t regdmn2G, } return; } + +tANI_U8 wma_map_channel(tANI_U8 mapChannel) +{ + return mapChannel; +} diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h index 9e33c81333d5..0d9289a82680 100644 --- a/CORE/WDA/inc/wlan_qct_wda.h +++ b/CORE/WDA/inc/wlan_qct_wda.h @@ -468,6 +468,7 @@ VOS_STATUS WDA_open(v_PVOID_t pVosContext, v_PVOID_t pOSContext, #ifdef QCA_WIFI_2_0 #define WDA_start wma_start +#define WDA_MapChannel wma_map_channel #ifdef QCA_WIFI_ISOC #define WDA_NVDownload_Start wma_nv_download_start @@ -560,6 +561,8 @@ VOS_STATUS WDA_PostMsgApi(tpAniSirGlobal pMac, tSirMsgQ *pMsg) ; */ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac); +tANI_U8 WDA_MapChannel(tANI_U8); + /* maximum wait time for WDA complete event (correct value has to be derived) * for now giving the value 1000 ms */ #define WDA_WDI_COMPLETION_TIME_OUT 30000 /* in ms */ diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c index 57e2bed840ec..7a014a5b26a5 100644 --- a/CORE/WDA/src/wlan_qct_wda.c +++ b/CORE/WDA/src/wlan_qct_wda.c @@ -75,6 +75,16 @@ #include "vos_sched.h" #include "pttMsgApi.h" #include "wlan_qct_sys.h" + +/* 11A Channel list to decode RX BD channel information */ +static const tANI_U8 abChannel[]= {36,40,44,48,52,56,60,64,100,104,108,112,116, + 120,124,128,132,136,140,149,153,157,161,165}; + +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD +static const tANI_U8 aUnsortedChannelList[]= {52,56,60,64,100,104,108,112,116, + 120,124,128,132,136,140,36,40,44,48,149,153,157,161,165}; +#endif + /* Used MACRO's */ /* Get WDA context from vOSS module */ #define VOS_GET_WDA_CTXT(a) vos_get_context(VOS_MODULE_ID_WDA, a) @@ -13720,3 +13730,15 @@ void WDA_SetEnableSSR(v_BOOL_t enableSSR) { WDI_SetEnableSSR(enableSSR); } + +tANI_U8 WDA_MapChannel(tANI_U8 mapChannel) +{ + if(mapChannel > 0 && mapChannel < 25) +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + if(IS_ROAM_SCAN_OFFLOAD_FEATURE_ENABLE) + return aUnsortedChannelList[mapChannel - 1]; +#endif + return abChannel[mapChannel - 1]; + else + return 0; +} |
