[7570] wlbt: implement exponential G-scan
authorJaya Prakash Sangaru <j.sangaru@samsung.com>
Sat, 7 May 2016 04:56:46 +0000 (10:26 +0530)
committerTarun Karela <t.karela@samsung.com>
Mon, 4 Jun 2018 09:40:47 +0000 (10:40 +0100)
implement exponential G-scan

SCSC-Bug-Id: SSB-16624

Change-Id: I0827d2ec664a416f4520541b11c9aa4a24c9ba44
Signed-off-by: Jaya Prakash Sangaru <j.sangaru@samsung.com>
gscan.cpp

index a303ddc982e1b71d07eaf09d1b49a3831fc1c25f..46929f084e1e0df14d82ae7dfaa9d42dc48f486c 100755 (executable)
--- a/gscan.cpp
+++ b/gscan.cpp
@@ -78,6 +78,10 @@ typedef enum {
     GSCAN_ATTRIBUTE_MIN_BREACHING,
     GSCAN_ATTRIBUTE_SIGNIFICANT_CHANGE_BSSIDS,
 
+    GSCAN_ATTRIBUTE_BUCKET_STEP_COUNT = 70,
+    GSCAN_ATTRIBUTE_BUCKET_EXPONENT,
+    GSCAN_ATTRIBUTE_BUCKET_MAX_PERIOD,
+
     GSCAN_ATTRIBUTE_MAX
 
 } GSCAN_ATTRIBUTE;
@@ -348,6 +352,24 @@ public:
                 return result;
             }
 
+            result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_EXPONENT,
+                    mParams->buckets[i].exponent);
+            if (result < 0) {
+                return result;
+            }
+
+            result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_MAX_PERIOD,
+                    mParams->buckets[i].max_period);
+            if (result < 0) {
+                return result;
+            }
+
+            result = request.put_u32(GSCAN_ATTRIBUTE_BUCKET_STEP_COUNT,
+                    mParams->buckets[i].step_count);
+            if (result < 0) {
+                return result;
+            }
+
             if (mParams->buckets[i].num_channels) {
                 nlattr *channels = request.attr_start(GSCAN_ATTRIBUTE_BUCKET_CHANNELS);
                 for (int j = 0; j < mParams->buckets[i].num_channels; j++) {