aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/wifi/acpi/wrdd.asl
blob: 6f071ad97652484c148eb135f5e4d1f390b14e09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)
}