Lines Matching +full:out +full:- +full:of +full:- +full:band

1 // SPDX-License-Identifier: GPL-2.0
3 * Wifi Frequency Band Manage Interface
54 return -EINVAL; in wbrf_record()
56 for (i = 0; i < ARRAY_SIZE(in->band_list); i++) { in wbrf_record()
57 if (in->band_list[i].start && in->band_list[i].end) in wbrf_record()
63 * the caller is required to be equal to the number of in wbrf_record()
66 if (num_of_ranges != in->num_of_ranges) in wbrf_record()
67 return -EINVAL; in wbrf_record()
70 * Every input frequency band comes with two end points(start/end) in wbrf_record()
79 return -ENOMEM; in wbrf_record()
85 /* save the number of ranges*/ in wbrf_record()
94 for (i = 0; i < ARRAY_SIZE(in->band_list); i++) { in wbrf_record()
95 if (!in->band_list[i].start || !in->band_list[i].end) in wbrf_record()
99 tmp[arg_idx++].integer.value = in->band_list[i].start; in wbrf_record()
101 tmp[arg_idx++].integer.value = in->band_list[i].end; in wbrf_record()
104 obj = acpi_evaluate_dsm(adev->handle, &wifi_acpi_dsm_guid, in wbrf_record()
108 return -EINVAL; in wbrf_record()
110 if (obj->type != ACPI_TYPE_INTEGER) { in wbrf_record()
111 ret = -EINVAL; in wbrf_record()
112 goto out; in wbrf_record()
115 ret = obj->integer.value; in wbrf_record()
117 ret = -EINVAL; in wbrf_record()
119 out: in wbrf_record()
127 * acpi_amd_wbrf_add_remove - add or remove the frequency band the device is using
130 * @action: remove or add the frequency band into bios
131 * @in: input structure containing the frequency band the device is using
133 * Broadcast to other consumers the frequency band the device starts
142 * 0 for success add/remove wifi frequency band.
152 return -ENODEV; in acpi_amd_wbrf_add_remove()
165 * acpi_amd_wbrf_supported_producer - determine if the WBRF can be enabled
184 return acpi_check_dsm(adev->handle, &wifi_acpi_dsm_guid, in acpi_amd_wbrf_supported_producer()
190 * acpi_amd_wbrf_supported_consumer - determine if the WBRF can be enabled
209 return acpi_check_dsm(adev->handle, &wifi_acpi_dsm_guid, in acpi_amd_wbrf_supported_consumer()
215 * amd_wbrf_retrieve_freq_band - retrieve current active frequency bands
218 * @out: output structure containing all the active frequency bands
222 * proper actions if any of the frequency band may cause RFI with its
223 * own frequency band used.
226 * 0 for getting wifi freq band successfully.
229 int amd_wbrf_retrieve_freq_band(struct device *dev, struct wbrf_ranges_in_out *out) in amd_wbrf_retrieve_freq_band() argument
239 return -ENODEV; in amd_wbrf_retrieve_freq_band()
245 obj = acpi_evaluate_dsm(adev->handle, &wifi_acpi_dsm_guid, in amd_wbrf_retrieve_freq_band()
248 return -EINVAL; in amd_wbrf_retrieve_freq_band()
252 * number_of_entries(1 DWORD): Number of entries in amd_wbrf_retrieve_freq_band()
253 * start_freq of 1st entry(1 QWORD): Start frequency of the 1st entry in amd_wbrf_retrieve_freq_band()
254 * end_freq of 1st entry(1 QWORD): End frequency of the 1st entry in amd_wbrf_retrieve_freq_band()
257 * start_freq of the last entry(1 QWORD) in amd_wbrf_retrieve_freq_band()
258 * end_freq of the last entry(1 QWORD) in amd_wbrf_retrieve_freq_band()
260 * Thus the buffer length is determined by the number of entries. in amd_wbrf_retrieve_freq_band()
261 * - For zero entry scenario, the buffer length will be 4 bytes. in amd_wbrf_retrieve_freq_band()
262 * - For one entry scenario, the buffer length will be 20 bytes. in amd_wbrf_retrieve_freq_band()
264 if (obj->buffer.length > sizeof(acpi_out) || obj->buffer.length < 4) { in amd_wbrf_retrieve_freq_band()
266 ret = -EINVAL; in amd_wbrf_retrieve_freq_band()
267 goto out; in amd_wbrf_retrieve_freq_band()
269 memcpy(&acpi_out, obj->buffer.pointer, obj->buffer.length); in amd_wbrf_retrieve_freq_band()
271 out->num_of_ranges = acpi_out.num_of_ranges; in amd_wbrf_retrieve_freq_band()
272 memcpy(out->band_list, acpi_out.band_list, sizeof(acpi_out.band_list)); in amd_wbrf_retrieve_freq_band()
274 out: in amd_wbrf_retrieve_freq_band()
281 * amd_wbrf_register_notifier - register for notifications of frequency
282 * band update
287 * notified on the frequency band updates from other producers.
300 * amd_wbrf_unregister_notifier - unregister for notifications of
301 * frequency band update
306 * the frequency band updates from other producers. Usually, this should