| |
| # 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("@fuchsia_sdk//build_defs:driver_bind_rules.bzl", "driver_header_bind_rules", "driver_bytecode_bind_rules") |
| |
| driver_header_bind_rules( |
| name = "fuchsia_bind_header", |
| rules = "iwlwifi.bind", |
| output = "iwlwifi-bind.h", |
| |
| deps = ["@fuchsia_sdk//bind/fuchsia_pci"], |
| ) |
| |
| 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", |
| ], |
| ) |