diff options
| author | Atul Mittal <atulmt@qti.qualcomm.com> | 2014-01-18 08:08:40 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2014-01-31 17:28:01 -0800 |
| commit | e125948db1f6affe6506920881920ae867edcb1f (patch) | |
| tree | 333aff3fc2026b045c5fd2d20f6fdaca473536af | |
| parent | 681de3b309f08fc20e57a9ab8475af90baa3b15e (diff) | |
qcacld : Invalid calculation of free wow filters
unsigned interger is assigned -1 value which is causing problem to
calculate the available free filters. Changing the pattern size
as per firmware max size. There is no need to check the number of
allocated patterns in UMAC as this is a redundant, and being taken
care in HDD.Also added one debug print.
Change-Id: Idafbb7e413ddcd1e7dda48c8e298e646757a6792
CRs-fixed: 601456
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_wowl.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 6 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 14 | ||||
| -rw-r--r-- | CORE/SME/src/pmc/pmcApi.c | 12 |
4 files changed, 15 insertions, 21 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_wowl.h b/CORE/HDD/inc/wlan_hdd_wowl.h index 085bfd114c02..ffca12a13599 100644 --- a/CORE/HDD/inc/wlan_hdd_wowl.h +++ b/CORE/HDD/inc/wlan_hdd_wowl.h @@ -107,8 +107,8 @@ * Preprocessor Definitions and Constants * -------------------------------------------------------------------------*/ #ifdef QCA_WIFI_2_0 -#define WOWL_PTRN_MAX_SIZE 148 -#define WOWL_PTRN_MASK_MAX_SIZE 16 +#define WOWL_PTRN_MAX_SIZE 146 +#define WOWL_PTRN_MASK_MAX_SIZE 19 #define WOWL_MAX_PTRNS_ALLOWED 22 #else #define WOWL_PTRN_MAX_SIZE 128 diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 9a018334673e..3f58751fabef 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -3131,9 +3131,13 @@ typedef __ani_attr_pre_packed struct sSirBoardCapabilities /// WOW related structures // SME -> PE <-> HAL +#ifdef QCA_WIFI_2_0 +#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 146 +#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 19 +#else #define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128 #define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16 - +#endif // SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern. // SME/HDD maintains the list of the BCAST wake-up patterns. // This is a pass through message for PE diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index dfb99d7e2339..642947d3dae1 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -10921,6 +10921,8 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event, WMA_LOGD("NLO match happened"); node->nlo_match_evt_received = TRUE; } + + WMA_LOGD("Holding %d sec wake_lock", WMA_PNO_WAKE_LOCK_TIMEOUT); vos_wake_lock_timeout_acquire(&wma->pno_wake_lock, WMA_PNO_WAKE_LOCK_TIMEOUT); } @@ -11291,8 +11293,7 @@ static VOS_STATUS wma_wow_sta(tp_wma_handle wma, u_int8_t vdev_id, u_int8_t arp_offset = 12; u_int8_t ns_ptrn[] = {0x86, 0xDD}; - free_slot = wma->wow.total_free_ptrn_id - - wma->wow.used_free_ptrn_id + 1; + free_slot = wma->wow.total_free_ptrn_id - wma->wow.used_free_ptrn_id ; if (free_slot < WMA_STA_WOW_DEFAULT_PTRN_MAX) { WMA_LOGD("Free slots are not enough, avail:%d, need: %d", @@ -11370,21 +11371,22 @@ static void wma_update_free_wow_ptrn_id(tp_wma_handle wma) u_int8_t ptrn_id; vos_mem_zero(wma->wow.free_ptrn_id, sizeof(wma->wow.free_ptrn_id)); - wma->wow.total_free_ptrn_id = -1; + wma->wow.total_free_ptrn_id = 0; wma->wow.used_free_ptrn_id = 0; for (ptrn_id = 0; ptrn_id < wma->wlan_resource_config.num_wow_filters; ptrn_id++) { cache = wma->wow.cache[ptrn_id]; if (!cache) { - wma->wow.free_ptrn_id[++wma->wow.total_free_ptrn_id] = + wma->wow.free_ptrn_id[wma->wow.total_free_ptrn_id] = ptrn_id; - continue; + wma->wow.total_free_ptrn_id += 1; + } } WMA_LOGD("Total free wow pattern id for default patterns: %d", - wma->wow.total_free_ptrn_id + 1); + wma->wow.total_free_ptrn_id ); } /* Returns true if the user configured any wow pattern for given vdev id */ diff --git a/CORE/SME/src/pmc/pmcApi.c b/CORE/SME/src/pmc/pmcApi.c index 0855e9ddcc1b..208130e00056 100644 --- a/CORE/SME/src/pmc/pmcApi.c +++ b/CORE/SME/src/pmc/pmcApi.c @@ -2182,12 +2182,6 @@ eHalStatus pmcWowlAddBcastPattern ( #endif - if(pattern->ucPatternId >= SIR_WOWL_BCAST_MAX_NUM_PATTERNS ) - { - pmcLog(pMac, LOGE, FL("Pattern Id must range from 0 to %d"), SIR_WOWL_BCAST_MAX_NUM_PATTERNS-1); - return eHAL_STATUS_FAILURE; - } - /* No need to care PMC state transition when ps offload is enabled. */ if(pMac->psOffloadEnabled) goto skip_pmc_state_transition; @@ -2262,12 +2256,6 @@ eHalStatus pmcWowlDelBcastPattern ( return eHAL_STATUS_FAILURE; } - if(pattern->ucPatternId >= SIR_WOWL_BCAST_MAX_NUM_PATTERNS ) - { - pmcLog(pMac, LOGE, FL("Pattern Id must range from 0 to %d"), - SIR_WOWL_BCAST_MAX_NUM_PATTERNS-1); - return eHAL_STATUS_FAILURE; - } /* No need to care PMC state transition when ps offload is enabled. */ if(pMac->psOffloadEnabled) |
