summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/intel/wifi/acpi/wrdd.asl37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/drivers/intel/wifi/acpi/wrdd.asl b/src/drivers/intel/wifi/acpi/wrdd.asl
new file mode 100644
index 0000000000..6f071ad976
--- /dev/null
+++ b/src/drivers/intel/wifi/acpi/wrdd.asl
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google Inc.
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/*
+ * This method is used by the Intel wireless kernel drivers to determine
+ * the proper country code for regulatory domain configuration.
+ *
+ * It requires an NVS field called CID1 to be present that provides the
+ * ISO-3166-2 alpha-2 country code.
+ */
+Method (WRDD, 0, Serialized)
+{
+ Name (WRDX, Package () {
+ 0, /* Revision */
+ Package () {
+ 0x00000007, /* Domain Type, 0x7:WiFi */
+ 0x00000000, /* No Default Country Identifier */
+ }
+ })
+
+ /* Replace Country Identifier with value from NVS */
+ Store (\CID1, Index (DeRefOf (Index (WRDX, 1)), 1))
+ Return (WRDX)
+}