diff options
| author | Akash Patel <akashp@codeaurora.org> | 2014-07-12 22:13:46 -0700 |
|---|---|---|
| committer | Akash Patel <akashp@codeaurora.org> | 2014-07-12 22:14:49 -0700 |
| commit | 2580b8e47189c4f30896ccf298dc4e8aabfbce70 (patch) | |
| tree | df831164113fcf8d3079b370f2d6595e4005e2de | |
| parent | 78511cb71d228385bca04ee195d744b57964425d (diff) | |
| parent | ebab71d4deab5db780e47d64c51262b13beccd6f (diff) | |
Release 1.0.0.145 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master'
* origin/caf/caf-wlan/master:
Cafstaging Release 1.0.0.145
qcacld: WMA: Use high priority for preauth scan
qcacld: WMA: Handle additional scan finish events from firmware
Change-Id: Ia5e314e54e1f351c8255178011d6abe727b2831b
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 48 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 3 |
3 files changed, 36 insertions, 19 deletions
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 661fb7c8a701..89cd04fe2de8 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -42,9 +42,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 144 +#define QWLAN_VERSION_BUILD 145 -#define QWLAN_VERSIONSTR "1.0.0.144A" +#define QWLAN_VERSIONSTR "1.0.0.145" #ifdef QCA_WIFI_2_0 diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 60a23f18d116..9bbdd6d8f53f 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -115,8 +115,10 @@ #define WMA_2_4_GHZ_MAX_FREQ 3000 #define WOW_CSA_EVENT_OFFSET 12 -#define WMA_DEFAULT_SCAN_PRIORITY 1 #define WMA_DEFAULT_SCAN_REQUESTER_ID 1 +#define WMI_SCAN_FINISH_EVENTS (WMI_SCAN_EVENT_START_FAILED |\ + WMI_SCAN_EVENT_COMPLETED |\ + WMI_SCAN_EVENT_DEQUEUED) /* default value */ #define DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD 20 /* pdev vdev and peer stats*/ @@ -5894,7 +5896,7 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, /* host cycles through the lower 12 bits of wma_handle->scan_id to generate ids */ cmd->scan_id = WMA_HOST_SCAN_REQID_PREFIX | ++wma_handle->scan_id; - cmd->scan_priority = WMA_DEFAULT_SCAN_PRIORITY; + cmd->scan_priority = WMI_SCAN_PRIORITY_LOW; cmd->scan_req_id = WMA_HOST_SCAN_REQUESTOR_ID_PREFIX | WMA_DEFAULT_SCAN_REQUESTER_ID; @@ -6238,7 +6240,7 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle, tSirScanOffloadReq *scan_req, v_U16_t msg_type) { VOS_STATUS vos_status = VOS_STATUS_SUCCESS; - wmi_buf_t buf; + wmi_buf_t buf = NULL; wmi_start_scan_cmd_fixed_param *cmd; int status = 0; int len; @@ -6285,6 +6287,8 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle, /* Adjust parameters for channel switch scan */ cmd->min_rest_time = WMA_ROAM_PREAUTH_REST_TIME; cmd->max_rest_time = WMA_ROAM_PREAUTH_REST_TIME; + cmd->max_scan_time = WMA_ROAM_PREAUTH_MAX_SCAN_TIME; + cmd->scan_priority = WMI_SCAN_PRIORITY_HIGH; adf_os_spin_lock_bh(&wma_handle->roam_preauth_lock); cmd->scan_id = ( (cmd->scan_id & WMA_MAX_SCAN_ID) | WMA_HOST_ROAM_SCAN_REQID_PREFIX); @@ -8920,16 +8924,16 @@ static void wma_roam_preauth_scan_event_handler(tp_wma_handle wma_handle, VOS_STATUS vos_status = VOS_STATUS_SUCCESS; tSwitchChannelParams *params; - WMA_LOGI("%s: event 0x%x, reason 0x%x", - __func__, wmi_event->event, wmi_event->reason); + WMA_LOGI("%s: preauth_scan_state %d, event 0x%x, reason 0x%x", + __func__, wma_handle->roam_preauth_scan_state, + wmi_event->event, wmi_event->reason); switch(wma_handle->roam_preauth_scan_state) { case WMA_ROAM_PREAUTH_CHAN_REQUESTED: if (wmi_event->event & WMI_SCAN_EVENT_FOREIGN_CHANNEL) { /* complete set_chan request */ wma_handle->roam_preauth_scan_state = WMA_ROAM_PREAUTH_ON_CHAN; vos_status = VOS_STATUS_SUCCESS; - } else if (wmi_event->event & - (WMI_SCAN_EVENT_START_FAILED|WMI_SCAN_EVENT_COMPLETED)){ + } else if (wmi_event->event & WMI_SCAN_FINISH_EVENTS){ /* Failed to get preauth channel or finished (unlikely) */ wma_handle->roam_preauth_scan_state = WMA_ROAM_PREAUTH_CHAN_NONE; vos_status = VOS_STATUS_E_FAILURE; @@ -8942,8 +8946,8 @@ static void wma_roam_preauth_scan_event_handler(tp_wma_handle wma_handle, break; case WMA_ROAM_PREAUTH_ON_CHAN: - if (wmi_event->event & - (WMI_SCAN_EVENT_COMPLETED | WMI_SCAN_EVENT_BSS_CHANNEL)) + if ((wmi_event->event & WMI_SCAN_EVENT_BSS_CHANNEL) || + (wmi_event->event & WMI_SCAN_FINISH_EVENTS)) wma_handle->roam_preauth_scan_state = WMA_ROAM_PREAUTH_CHAN_COMPLETED; /* There is no WDA request to complete. Next set channel request will @@ -9040,9 +9044,16 @@ static void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params) __func__, wma->roam_preauth_scan_state); if (wma->roam_preauth_scan_state == WMA_ROAM_PREAUTH_CHAN_NONE) { - status = wma_roam_preauth_chan_set(wma, params, vdev_id); + /* Is channel change required? + */ + if(vos_chan_to_freq(params->channelNumber) != + wma->interfaces[vdev_id].mhz) + { + status = wma_roam_preauth_chan_set(wma, + params, vdev_id); /* response will be asynchronous */ return; + } } else if (wma->roam_preauth_scan_state == WMA_ROAM_PREAUTH_CHAN_REQUESTED || wma->roam_preauth_scan_state == WMA_ROAM_PREAUTH_ON_CHAN) { @@ -20534,7 +20545,7 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data, /* This is the scan requested by roam preauth set_channel operation */ adf_os_spin_unlock_bh(&wma_handle->roam_preauth_lock); - if (wmi_event->event == WMI_SCAN_EVENT_COMPLETED) { + if (wmi_event->event & WMI_SCAN_FINISH_EVENTS) { WMA_LOGE(" roam scan complete - scan_id %x, vdev_id %x", wmi_event->scan_id, vdev_id); wma_reset_scan_info(wma_handle, vdev_id); @@ -20593,18 +20604,16 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data, switch (wmi_event->event) { case WMI_SCAN_EVENT_COMPLETED: + case WMI_SCAN_EVENT_DEQUEUED: /* * return success always so that SME can pick whatever scan * results is available in scan cache(due to partial or * aborted scan) */ + scan_event->event = WMI_SCAN_EVENT_COMPLETED; scan_event->reasonCode = eSIR_SME_SUCCESS; - if (wmi_event->scan_id == scan_id) - wma_reset_scan_info(wma_handle, vdev_id); - else - WMA_LOGE("Scan id not matched for SCAN COMPLETE event"); break; - case WMI_SCAN_EVENT_DEQUEUED: + case WMI_SCAN_EVENT_START_FAILED: scan_event->event = WMI_SCAN_EVENT_COMPLETED; scan_event->reasonCode = eSIR_SME_SCAN_FAILED; break; @@ -20616,6 +20625,13 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data, break; } + if (wmi_event->event & WMI_SCAN_FINISH_EVENTS) { + if (wmi_event->scan_id == scan_id) + wma_reset_scan_info(wma_handle, vdev_id); + else + WMA_LOGE("Scan id not matched for SCAN COMPLETE event"); + } + /* Stop the scan completion timeout if the event is WMI_SCAN_EVENT_COMPLETED */ if (scan_event->event == (tSirScanEventType)WMI_SCAN_EVENT_COMPLETED) { WMA_LOGE(" scan complete - scan_id %x, vdev_id %x", diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index f14538ff02ca..a5411b4789c5 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -168,7 +168,8 @@ #define WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT (120000) #define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT (WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5) #define WMA_ROAM_PREAUTH_SCAN_TIME (50) -#define WMA_ROAM_PREAUTH_REST_TIME (100) +#define WMA_ROAM_PREAUTH_REST_TIME (0) +#define WMA_ROAM_PREAUTH_MAX_SCAN_TIME (10000) #define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT (10) #define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT (10) |
