blob: d079740bd445fb4e8e93de90820203538a0a91d5 [file] [log] [blame]
#
# Copyright (c) 2019 The Fuchsia Authors.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import("//build/config/fuchsia/rules.gni")
import("//build/package.gni")
iwlwifi_core_srcs = [
"cfg/7000.c",
"fuchsia_porting.h",
"fw/init.c",
"ieee80211.h",
"iwl-config.h",
"iwl-csr.h",
"iwl-drv.c",
"iwl-drv.h",
"iwl-fh.h",
"iwl-io.c",
"iwl-phy-db.c",
"iwl-trans.c",
"iwl-trans.h",
"mvm/fw.c",
"mvm/mac80211.c",
"mvm/ops.c",
"mvm/rxmq.c",
"mvm/scan.c",
"mvm/tof.c",
"mvm/tt.c",
"mvm/tx.c",
]
driver_module("iwlwifi_driver") {
output_name = "iwlwifi"
defines = [
"CPTCFG_IWL_TIMEOUT_FACTOR=1",
"CPTCFG_IWLMVM=1",
]
sources = iwlwifi_core_srcs + [
"pcie/drv.c",
"pcie/internal.h",
"pcie/trans-gen2.c",
"pcie/trans.c",
"pcie/tx-gen2.c",
"pcie/tx.c",
]
deps = [
"//garnet/lib/wlan/protocol",
"//zircon/public/lib/ddk",
"//zircon/public/lib/driver",
]
}
all_fw_files = [ "iwlwifi-7265-17.ucode" ]
foreach(fw_file, all_fw_files) {
copy("iwlwifi-firmware-copy-" + fw_file) {
sources = [
"//prebuilt/connectivity/wlan/firmware/intel/iwlwifi/" + fw_file,
]
outputs = [
"$root_out_dir/firmware/iwlwifi/" + fw_file,
]
}
}
package("iwlwifi") {
deprecated_system_image = true
deps = [
":iwlwifi_driver",
]
drivers = [
{
name = "iwlwifi.so"
},
]
libraries = []
foreach(fw_file, all_fw_files) {
deps += [
# The copy step has to be in the shared-library toolchain to use the
# expected output directory, since we treat firmware blobs as if they
# were libraries which always use the shared-library toolchain to build.
":iwlwifi-firmware-copy-" + fw_file + "($shlib_toolchain)",
]
libraries += [
{
name = "firmware/iwlwifi/" + fw_file
},
]
}
}
# Simulated transportation layer -- for unittest code.
source_set("iwlwifi_sim_trans_ss") {
defines = [
"CPTCFG_IWL_TIMEOUT_FACTOR=1",
"CPTCFG_IWLMVM=1",
"CONFIG_TEST_SIM=1",
]
sources = iwlwifi_core_srcs
deps = [
"//src/connectivity/wlan/drivers/testing/lib/sim-device:simdevice",
]
public_deps = [
"//zircon/public/lib/ddk",
]
}