// Make the HAL library
// ============================================================
+
+slsi_wifi_hal_defaults {
+ name: "slsiwifihal-defaults-instance",
+ cppflags: [
+ "-Wno-unused-parameter",
+ ],
+}
+
cc_library_static {
name: "libwifi-hal-slsi",
- cflags: ["-Wno-unused-parameter"],
+ defaults: ["slsiwifihal-defaults-instance"],
include_dirs: [
"system/core/include/",
#define DEFAULT_CMD_SIZE (64)
#define DOT11_OUI_LEN 3
+#ifdef SLSI_WIFI_HAL_NL_ATTR_CONFIG
+#define WIFI_HAL_ATTR_START 1
+#else
+#define WIFI_HAL_ATTR_START 0
+#endif
+
typedef struct {
int num_bssid;
mac_addr bssids[MAX_BLACKLIST_BSSID];
enum roam_attributes {\r
SLSI_ATTR_ROAM_CAPABILITY_BLACKLIST_SIZE,\r
SLSI_ATTR_ROAM_CAPABILITY_WHITELIST_SIZE,\r
- SLSI_ATTR_ROAM_STATE\r
+ SLSI_ATTR_ROAM_STATE,\r
+ SLSI_ATTR_ROAM_MAX\r
};\r
\r
class BssidBlacklistCommand : public WifiCommand\r
--- /dev/null
+bootstrap_go_package {
+ name: "soong-slsi-wifi-hal",
+ pkgPath: "android/soong/hardware/samsung_slsi/scsc_wifibt/wifi_hal",
+ deps: [
+ "soong",
+ "soong-android",
+ "soong-cc"
+ ],
+ srcs: [
+ "slsi_wifi_hal.go"
+ ],
+ pluginFor: ["soong_build"]
+}
--- /dev/null
+package slsi_wifi_hal
+
+import (
+ "android/soong/android"
+ "android/soong/cc"
+)
+
+func globalFlags(ctx android.BaseContext) []string {
+ var cflags []string
+
+ slsiwifihalconfig := ctx.DeviceConfig().WifiHalConfig()
+ if (slsiwifihalconfig == "true") {
+ cflags = append(cflags, "-DSLSI_WIFI_HAL_NL_ATTR_CONFIG")
+ }
+ return cflags
+}
+
+func deviceFlags(ctx android.BaseContext) []string {
+ var cflags []string
+
+ return cflags
+}
+
+func hostFlags(ctx android.BaseContext) []string {
+ var cflags []string
+
+ return cflags
+}
+
+func slsiWifiHalDefaults(ctx android.LoadHookContext) {
+ type props struct {
+ Target struct {
+ Android struct {
+ Cflags []string
+ Enabled *bool
+ }
+ Host struct {
+ Enabled *bool
+ }
+ Linux struct {
+ Cflags []string
+ }
+ Darwin struct {
+ Cflags []string
+ }
+ }
+ Cflags []string
+ }
+
+ p := &props{}
+ p.Cflags = globalFlags(ctx)
+ p.Target.Android.Cflags = deviceFlags(ctx)
+ h := hostFlags(ctx)
+ p.Target.Linux.Cflags = h
+ p.Target.Darwin.Cflags = h
+
+ ctx.AppendProperties(p)
+}
+
+func init() {
+ android.RegisterModuleType("slsi_wifi_hal_defaults", slsiWifiHalDefaultsFactory)
+}
+
+func slsiWifiHalDefaultsFactory() android.Module {
+ module := cc.DefaultsFactory()
+ android.AddLoadHook(module, slsiWifiHalDefaults)
+
+ return module
+}
#define FEATURE_SET 0
#define FEATURE_SET_MATRIX 1
#define ATTR_NODFS_VALUE 3
+#ifndef SLSI_WIFI_HAL_NL_ATTR_CONFIG
#define ATTR_COUNTRY_CODE 4
#define ATTR_LOW_LATENCY_MODE 5
+#endif
static int internal_no_seq_check(nl_msg *msg, void *arg);
static int internal_valid_message_handler(nl_msg *msg, void *arg);
READ_APF_PROGRAM
};
+#ifdef SLSI_WIFI_HAL_NL_ATTR_CONFIG
+enum wifi_low_latency_attr {
+ ATTR_LOW_LATENCY_MODE = 1,
+ ATTR_LOW_LATENCY_MAX
+};
+
+enum country_code_attr {
+ ATTR_COUNTRY_CODE = 1,
+ ATTR_COUNTRY_CODE_MAX
+};
+#endif
+
static wifi_error wifi_start_rssi_monitoring(wifi_request_id id, wifi_interface_handle
iface, s8 max_rssi, s8 min_rssi, wifi_rssi_event_handler eh);
static wifi_error wifi_stop_rssi_monitoring(wifi_request_id id, wifi_interface_handle iface);
#include "cpp_bindings.h"
typedef enum {
- MKEEP_ALIVE_ATTRIBUTE_ID,
+ MKEEP_ALIVE_ATTRIBUTE_ID = WIFI_HAL_ATTR_START,
MKEEP_ALIVE_ATTRIBUTE_IP_PKT,
MKEEP_ALIVE_ATTRIBUTE_IP_PKT_LEN,
MKEEP_ALIVE_ATTRIBUTE_SRC_MAC_ADDR,
MKEEP_ALIVE_ATTRIBUTE_DST_MAC_ADDR,
- MKEEP_ALIVE_ATTRIBUTE_PERIOD_MSEC
+ MKEEP_ALIVE_ATTRIBUTE_PERIOD_MSEC,
+ MKEEP_ALIVE_ATTRIBUTE_MAX
} WIFI_MKEEP_ALIVE_ATTRIBUTE;
typedef enum {