| |
| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| load( |
| "@rules_fuchsia//fuchsia:defs.bzl", |
| "fuchsia_driver_header_bind_rules", |
| "fuchsia_driver_bytecode_bind_rules", |
| ) |
| |
| fuchsia_driver_header_bind_rules( |
| name = "fuchsia_bind_header", |
| rules = "iwlwifi.bind", |
| output = "iwlwifi-bind.h", |
| |
| deps = ["@fuchsia_sdk//bind/fuchsia.pci"], |
| ) |
| |
| fuchsia_driver_bytecode_bind_rules( |
| name = "fuchsia_bind_bytecode", |
| rules = "iwlwifi.bind", |
| output = "iwlwifi-bind.bc", |
| |
| deps = ["@fuchsia_sdk//bind/fuchsia.usb"], |
| ) |
| |
| cc_library( |
| name = "driver_inspector", |
| srcs = [ |
| "driver-inspector.cc", |
| ], |
| hdrs = [ |
| "driver-inspector.h", |
| ], |
| deps = [ |
| "@fuchsia_sdk//pkg/inspect", |
| ], |
| ) |
| |
| cc_library( |
| name = "platform", |
| srcs = [ |
| "compiler.cc", |
| "debug.cc", |
| "device.cc", |
| "ieee80211.cc", |
| "irq.cc", |
| "memory.cc", |
| "module.cc", |
| "rcu.cc", |
| "task-internal.cc", |
| "task.cc", |
| "time.cc", |
| |
| # Must come from library |
| "channel.cc", |
| ], |
| hdrs = [ |
| "compiler.h", |
| "debug.h", |
| "device.h", |
| "ieee80211.h", |
| "irq.h", |
| "kernel.h", |
| "memory.h", |
| "module.h", |
| "pci.h", |
| "rcu.h", |
| "task-internal.h", |
| "task.h", |
| "time.h", |
| "align.h", |
| |
| # Must come from library |
| "channel.h", |
| "ieee80211_include.h", |
| ], |
| deps = [ |
| ":driver_inspector", |
| ":rcu_manager", |
| "@fuchsia_sdk//pkg/ddk", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.pci:fuchsia.hardware.pci_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlan.phyinfo:fuchsia.hardware.wlan.phyinfo_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlan.softmac:fuchsia.hardware.wlan.softmac_banjo_cc", |
| |
| # Needed only for library purposes (channel and ieee includes) |
| "@fuchsia_sdk//fidl/fuchsia.wlan.common:fuchsia.wlan.common_cc", |
| "@fuchsia_sdk//fidl/fuchsia.wlan.mlme:fuchsia.wlan.mlme_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlan.associnfo:fuchsia.hardware.wlan.associnfo_banjo_cc", |
| ], |
| ) |
| |
| # Support for RCU synchronization. |
| cc_library( |
| name = "rcu_manager", |
| srcs = [ "rcu-manager.cc" ], |
| hdrs = [ "rcu-manager.h" ], |
| deps = [ |
| "@fuchsia_sdk//pkg/async", |
| "@fuchsia_sdk//pkg/async-cpp", |
| ], |
| ) |
| |
| cc_library( |
| name = "fuchsia_device", |
| srcs = [ |
| "bind.cc", |
| "mvm-mlme.cc", |
| "mvm-sta.cc", |
| "pcie-device.cc", |
| "wlan-softmac-device.cc", |
| "wlanphy-impl-device.cc", |
| ], |
| hdrs = [ |
| "mvm-mlme.h", |
| "mvm-sta.h", |
| "pcie-device.h", |
| "scoped_utils.h", |
| "wlan-softmac-device.h", |
| "wlanphy-impl-device.h", |
| "ieee80211.h", |
| ], |
| deps = [ |
| ":driver_inspector", |
| ":fuchsia_bind_header", |
| ":platform", |
| ":rcu_manager", |
| "@fuchsia_sdk//pkg/ddktl-experimental-driver-only", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlan.phyinfo:fuchsia.hardware.wlan.phyinfo_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlan.softmac:fuchsia.hardware.wlan.softmac_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.hardware.wlanphyimpl:fuchsia.hardware.wlanphyimpl_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.wlan.common:fuchsia.wlan.common_banjo_cc", |
| "@fuchsia_sdk//fidl/fuchsia.wlan.ieee80211:fuchsia.wlan.ieee80211_cc", |
| "@fuchsia_sdk//fidl/fuchsia.wlan.internal:fuchsia.wlan.internal_banjo_cc", |
| "//third_party/iwlwifi:core", |
| "//third_party/iwlwifi/mvm:mvm", |
| "//third_party/iwlwifi/pcie", |
| "@fuchsia_sdk//pkg/ddk", |
| "@fuchsia_sdk//pkg/async-loop-cpp", |
| "@fuchsia_sdk//pkg/async-loop-default", |
| ], |
| |
| copts = ["-Ithird_party/iwlwifi"], |
| |
| # This doesn't seem to be taking effect. |
| defines = [ |
| "CPTCFG_IWL_TIMEOUT_FACTOR=1", |
| "CPTCFG_IWLMVM=1", |
| ], |
| ) |