prima: extscan: API enhancements in extscan_wifi_get_cached_results
1. Update the data structures in sync with framework APIs
2. Introduce scan_id and flags in get_cached_results
3. Add blocking mechanism at HDD layer to avoid synchronization
problems at HAL layer.
4. Add code changes to drop IEs if it exceeds NL 4k limit for
full scan results.
5. Add logic to parse cached scan results based on scanResultSize
of tSirWifiScanResultEvent.
Change-Id: I2ef3ee4aeb9db0c5b356b4467026186dbb2c5f7e
CRs-Fixed: 834122
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index a707a9c..3128e70 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -5184,6 +5184,23 @@
tANI_U16 capability; // capabilities advertised in the beacon
} tSirWifiScanResult, *tpSirWifiScanResult;
+/**
+ * struct tExtscanCachedScanResult - extscan cached scan result
+ * @scan_id: a unique identifier for the scan unit
+ * @flags: a bitmask with additional information about scan
+ * @num_results: number of bssids retrieved by the scan
+ * @ap: wifi scan bssid results info
+ */
+
+typedef PACKED_PRE struct PACKED_POST
+{
+ tANI_U16 scan_id;
+ tANI_U8 flags;
+ tANI_U8 num_results;
+
+ tSirWifiScanResult ap[32];
+} tExtscanCachedScanResult, *tpExtscanCachedScanResult;
+
/* WLAN_HAL_BSSID_HOTLIST_RESULT_IND */
typedef PACKED_PRE struct PACKED_POST
@@ -5204,14 +5221,17 @@
typedef PACKED_PRE struct PACKED_POST
{
tANI_U32 requestId;
- tANI_U32 numOfAps; // numbers of APs
+ /*
+ * It gives number of scan ids
+ */
+ tANI_U32 scanResultSize;
/*
* 0 for last fragment
* 1 still more fragment(s) coming
*/
tANI_BOOLEAN moreData;
- tSirWifiScanResult ap[1];
+ tANI_U8 result[1];
} tSirWifiScanResultEvent, *tpSirWifiScanResultEvent;
/* WLAN_HAL_SSID_HOTLIST_RESULT_IND */
@@ -5230,7 +5250,6 @@
tSirWifiScanResult ssidHotlist[1];
} tSirEXTScanSsidHotlistMatch, *tpSirEXTScanSsidHotlistMatch;
-
typedef PACKED_PRE struct PACKED_POST
{
tANI_U8 elemId; // Element Identifier