OSDN Git Service

[AWARE] Add support for Subscribe Service ID List Attribute
authorEtan Cohen <etancohen@google.com>
Thu, 9 Feb 2017 20:55:23 +0000 (12:55 -0800)
committerEtan Cohen <etancohen@google.com>
Fri, 10 Feb 2017 20:45:55 +0000 (12:45 -0800)
Add HAL definition to support Subscribe Service ID List Attribute
inclusion in beacons. Until support is added in legacy HAL will not
be functional.

Rationale: enhances likelihood of being able to find the right service.

Bug: 35195516
Bug: 35040192
Test: unit tests & integration (sl4a) tests
Change-Id: I343266e3277c7351f29f6851cb1a9c1746cda6e8

wifi/1.0/default/hidl_struct_util.cpp
wifi/1.0/types.hal

index 28ad6c3..2343c2d 100644 (file)
@@ -787,6 +787,7 @@ bool convertHidlNanEnableRequestToLegacy(
   legacy_request->sid_beacon_val =
         (hidl_request.configParams.includePublishServiceIdsInBeacon ? 0x1 : 0x0)
             | (hidl_request.configParams.numberOfPublishServiceIdsInBeacon << 1);
+  // TODO: b/35195516 connect SubscribeServiceIds to legacy HAL once implemented
   legacy_request->config_rssi_window_size = 1;
   legacy_request->rssi_window_size_val = hidl_request.configParams.rssiWindowSize;
   legacy_request->config_disc_mac_addr_randomization = 1;
@@ -1114,6 +1115,7 @@ bool convertHidlNanConfigRequestToLegacy(
   }
   legacy_request->sid_beacon = (hidl_request.includePublishServiceIdsInBeacon ? 0x1 : 0x0)
         | (hidl_request.numberOfPublishServiceIdsInBeacon << 1);
+  // TODO: b/35195516 connect SubscribeServiceIds to legacy HAL once implemented
   legacy_request->config_rssi_window_size = 1;
   legacy_request->rssi_window_size_val = hidl_request.rssiWindowSize;
   legacy_request->config_disc_mac_addr_randomization = 1;
index dd09820..8eb0c2f 100644 (file)
@@ -823,6 +823,18 @@ struct NanConfigRequest {
    */
   uint8_t numberOfPublishServiceIdsInBeacon;
   /**
+   * Control whether subscribe service IDs are included in Sync/Discovery beacons.
+   * Spec: Subscribe Service ID List Attribute
+   */
+  bool includeSubscribeServiceIdsInBeacon;
+  /**
+   * If |includeSubscribeServiceIdsInBeacon| is true then specifies the number of subscribe service
+   * IDs to include in the Sync/Discovery beacons:
+   *  Value = 0: include as many service IDs as will fit into the maximum allowed beacon frame size.
+   *  Value must fit within 7 bits - i.e. <= 127.
+   */
+  uint8_t numberOfSubscribeServiceIdsInBeacon;
+  /**
    * Number of samples used to calculate RSSI.
    */
   uint16_t rssiWindowSize;