#define MAX_SIGNIFICANT_CHANGE_APS 64
#define MAX_EPNO_NETWORKS 64
#define MAX_HOTLIST_SSID 8
-#define MAX_BLACKLIST_BSSID 16
#define MAX_AP_CACHE_PER_SCAN 32
wifi_error wifi_get_valid_channels(wifi_interface_handle handle,
ssid_threshold_param ssid[MAX_HOTLIST_SSID]; // hotlist SSIDs
} wifi_ssid_hotlist_params;
-/* BSSID blacklist */
-typedef struct {
- int num_bssid; // number of blacklisted BSSIDs
- mac_addr bssids[MAX_BLACKLIST_BSSID]; // blacklisted BSSIDs
-} wifi_bssid_params;
-
-/* Set the BSSID blacklist */
-wifi_error wifi_set_bssid_blacklist(wifi_request_id id, wifi_interface_handle iface,
- wifi_bssid_params params);
-
/* Significant wifi change */
typedef struct {
mac_addr bssid; // BSSID
--- /dev/null
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __WIFI_HAL_ROAM_H__
+#define __WIFI_HAL_ROAM_H__
+
+#include "wifi_hal.h"
+
+#define MAX_BLACKLIST_BSSID 16
+#define MAX_WHITELIST_SSID 8
+#define MAX_SSID_LENGTH 32
+
+typedef struct {
+ u32 max_blacklist_size;
+ u32 max_whitelist_size;
+} wifi_roaming_capabilities;
+
+typedef enum {
+ ROAMING_DISABLE,
+ ROAMING_ENABLE
+} fw_roaming_state_t;
+
+typedef struct {
+ u32 length;
+ char ssid_str[MAX_SSID_LENGTH];
+} ssid_t;
+
+typedef struct {
+ u32 num_blacklist_bssid; // Number of bssids valid in blacklist_bssid[].
+ mac_addr blacklist_bssid[MAX_BLACKLIST_BSSID]; // List of bssids which should not be considered
+ // for romaing by firmware/driver.
+ u32 num_whitelist_ssid; // Number of ssids valid in whitelist_ssid[].
+ ssid_t whitelist_ssid[MAX_WHITELIST_SSID]; // List of ssids to which firmware/driver can
+ // consider to roam to.
+} wifi_roaming_config;
+
+/* Get the chipset roaming capabilities. */
+wifi_error wifi_get_roaming_capabilities(wifi_interface_handle handle,
+ wifi_roaming_capabilities *caps);
+/* Enable/disable firmware roaming */
+wifi_error wifi_enable_firmware_roaming(wifi_interface_handle handle,
+ fw_roaming_state_t state);
+
+/* Pass down the blacklist BSSID and whitelist SSID to firmware. */
+wifi_error wifi_configure_roaming(wifi_interface_handle handle,
+ wifi_roaming_config *roaming_config);
+
+#endif /* __WIFI_HAL_ROAM_H__ */
WIFI_ERROR_INVALID_REQUEST_ID = -6,
WIFI_ERROR_TIMED_OUT = -7,
WIFI_ERROR_TOO_MANY_REQUESTS = -8, // Too many instances of this request
- WIFI_ERROR_OUT_OF_MEMORY = -9
+ WIFI_ERROR_OUT_OF_MEMORY = -9,
+ WIFI_ERROR_BUSY = -10,
} wifi_error;
typedef unsigned char byte;
#define WIFI_FEATURE_MKEEP_ALIVE 0x100000 // WiFi mkeep_alive
#define WIFI_FEATURE_CONFIG_NDO 0x200000 // ND offload configure
#define WIFI_FEATURE_TX_TRANSMIT_POWER 0x400000 // Capture Tx transmit power levels
+#define WIFI_FEATURE_CONTROL_ROAMING 0x800000 // Enable/Disable firmware roaming
+#define WIFI_FEATURE_IE_WHITELIST 0x1000000 // Support Probe IE white listing
+#define WIFI_FEATURE_SCAN_RAND 0x2000000 // Support MAC & Probe Sequence Number randomization
// Add more features here
#include "wifi_config.h"
#include "wifi_nan.h"
#include "wifi_offload.h"
+#include "roam.h"
//wifi HAL function pointer table
typedef struct {
wifi_error (* wifi_set_passpoint_list)(wifi_request_id id, wifi_interface_handle iface,
int num, wifi_passpoint_network *networks, wifi_passpoint_event_handler handler);
wifi_error (* wifi_reset_passpoint_list)(wifi_request_id id, wifi_interface_handle iface);
- wifi_error (*wifi_set_bssid_blacklist)(wifi_request_id id, wifi_interface_handle iface,
- wifi_bssid_params params);
wifi_error (*wifi_set_lci) (wifi_request_id id, wifi_interface_handle iface,
wifi_lci_information *lci);
wifi_error (*wifi_set_lcr) (wifi_request_id id, wifi_interface_handle iface,
*/
wifi_error (*wifi_set_packet_filter)(wifi_interface_handle handle,
const u8 *program, u32 len);
+ wifi_error (*wifi_get_roaming_capabilities)(wifi_interface_handle handle,
+ wifi_roaming_capabilities *caps);
+ wifi_error (*wifi_enable_firmware_roaming)(wifi_interface_handle handle,
+ fw_roaming_state_t state);
+ wifi_error (*wifi_configure_roaming)(wifi_interface_handle handle,
+ wifi_roaming_config *roaming_config);
} wifi_hal_fn;
wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn);
#ifdef __cplusplus