diff options
| author | Yingying Tang <yintang@qti.qualcomm.com> | 2015-11-09 11:14:58 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-01-08 13:20:28 +0530 |
| commit | 9df947f2d0feb2b86a61ad33b1d441fd3bb755b7 (patch) | |
| tree | b049bcf29098428299d172ffc229c08f8bf7f8c5 | |
| parent | 57c252a15b0ed9e48bb4d9050a5234c69bdf365c (diff) | |
qcacld-2.0: Fix a issue of slow QRF WoW reconnection
This change add a process in apfind_evt handler to trigger host to
reconnect to remote AP when firmware notifies host about finding this
missing AP during QRF scan.
Without this fix, host driver may take longer time to realize that
the remote AP's connection was dropped and need reconnection, since
it just wakes up from suspend and does not aware of the connection
status change.
Change-Id: I543c29cfa7e9ba138b975c8d06b455b0c9da59e1
CRs-Fixed: 936929
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 97b0b697d84e..4283e4b36b16 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -28699,11 +28699,14 @@ skip_pno_cmp_ind: static int wma_apfind_evt_handler(void *handle, u_int8_t *event, u_int32_t len) { + tp_wma_handle wma = (tp_wma_handle) handle; wmi_apfind_event_hdr *apfind_event_hdr; WMI_APFIND_EVENTID_param_tlvs *param_buf = (WMI_APFIND_EVENTID_param_tlvs *) event; u_int8_t *buf; u_int8_t ssid_tmp[WMI_MAX_SSID_LEN + 1]; + u_int8_t *mac; + u_int32_t vdev_id; if (!param_buf) { WMA_LOGE("Invalid APFIND event buffer"); @@ -28715,12 +28718,30 @@ static int wma_apfind_evt_handler(void *handle, u_int8_t *event, apfind_event_hdr->event_type, apfind_event_hdr->data_len); buf = param_buf->data; A_MEMZERO(ssid_tmp, sizeof(ssid_tmp)); - A_MEMCPY(ssid_tmp, buf, sizeof(ssid_tmp)); - WMA_LOGD("%s, APFIND match, dump ssid=%s\n", __func__, ssid_tmp); + A_MEMCPY(ssid_tmp, buf, WMI_MAX_SSID_LEN); + /* SSID param len is WMI_MAX_SSID_LEN, without '+1' */ + WMA_LOGD("%s, APFIND match, dump ssid=%s", __func__, ssid_tmp); buf = ¶m_buf->data[WMI_MAX_SSID_LEN]; - WMA_LOGD("%s, APFIND dump mac=0x%08X-0x%08X\n", + mac = buf; + WMA_LOGD("%s, APFIND dump mac=0x%08X-0x%08X", __func__, *(u_int32_t *)buf, *(u_int32_t *)(buf + sizeof(u_int32_t))); + + if (apfind_event_hdr->data_len >= + (WMI_MAX_SSID_LEN + IEEE80211_ADDR_LEN + sizeof(vdev_id) + + sizeof(apfind_event_hdr->tlv_header))) { + /* FW had the tlv_header len calculated into the data_len */ + buf = ¶m_buf->data[WMI_MAX_SSID_LEN + IEEE80211_ADDR_LEN]; + vdev_id = *(u_int32_t*) buf; + + /* to trigger AP re-connection after QRF wakeup*/ + WMA_LOGA("%s, trigger AP re-connection at QRF wakeup (APFIND_WAKEUP_EVENT), vdev_id=%d, SSID=%s", + __func__, vdev_id, ssid_tmp); + wma_beacon_miss_handler(wma, vdev_id, 0); + } else { + WMA_LOGD("%s, old version FW (no vdev_id).", __func__); + } + return 0; } #endif /* WLAN_FEATURE_APFIND */ |
