Baila, Shashikala Prabhu | af7fd90 | 2017-03-17 10:21:14 +0530 | [diff] [blame] | 1 | /* |
Himanshu Batra | 2131922 | 2019-06-28 16:19:32 +0530 | [diff] [blame] | 2 | * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. |
Baila, Shashikala Prabhu | af7fd90 | 2017-03-17 10:21:14 +0530 | [diff] [blame] | 3 | * |
| 4 | * |
| 5 | * Permission to use, copy, modify, and/or distribute this software for |
| 6 | * any purpose with or without fee is hereby granted, provided that the |
| 7 | * above copyright notice and this permission notice appear in all |
| 8 | * copies. |
| 9 | * |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 11 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 12 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 13 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 14 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 15 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 16 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 17 | * PERFORMANCE OF THIS SOFTWARE. |
| 18 | */ |
| 19 | |
| 20 | /** |
| 21 | * DOC: Implement API's specific to Regulatory component. |
| 22 | */ |
| 23 | |
| 24 | #include <qdf_status.h> |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 25 | #include <qdf_module.h> |
Baila, Shashikala Prabhu | af7fd90 | 2017-03-17 10:21:14 +0530 | [diff] [blame] | 26 | #include <wmi_unified_api.h> |
| 27 | #include <wmi_unified_priv.h> |
| 28 | #include <wmi_unified_reg_api.h> |
| 29 | |
Himanshu Batra | 2131922 | 2019-06-28 16:19:32 +0530 | [diff] [blame] | 30 | QDF_STATUS wmi_extract_reg_chan_list_update_event( |
| 31 | wmi_unified_t wmi_handle, |
| 32 | uint8_t *evt_buf, |
| 33 | struct cur_regulatory_info *reg_info, |
| 34 | uint32_t len) |
Baila, Shashikala Prabhu | af7fd90 | 2017-03-17 10:21:14 +0530 | [diff] [blame] | 35 | { |
Vignesh U | c224b9e | 2018-07-26 14:08:29 +0530 | [diff] [blame] | 36 | if (wmi_handle && wmi_handle->ops->extract_reg_chan_list_update_event) |
Baila, Shashikala Prabhu | af7fd90 | 2017-03-17 10:21:14 +0530 | [diff] [blame] | 37 | return wmi_handle->ops->extract_reg_chan_list_update_event |
| 38 | (wmi_handle, |
| 39 | evt_buf, reg_info, len); |
| 40 | |
| 41 | return QDF_STATUS_E_FAILURE; |
| 42 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 43 | qdf_export_symbol(wmi_extract_reg_chan_list_update_event); |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 44 | |
| 45 | /* |
| 46 | * wmi_unified_send_start_11d_scan_cmd() - start 11d scan |
| 47 | * @wmi_handle: wmi handle |
| 48 | * @start_11d_scan: pointer to 11d scan start req. |
| 49 | * |
| 50 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 51 | */ |
| 52 | QDF_STATUS wmi_unified_send_start_11d_scan_cmd(wmi_unified_t wmi_handle, |
| 53 | struct reg_start_11d_scan_req *start_11d_scan) |
| 54 | { |
| 55 | if (wmi_handle->ops->send_start_11d_scan_cmd) |
| 56 | return wmi_handle->ops->send_start_11d_scan_cmd(wmi_handle, |
| 57 | start_11d_scan); |
| 58 | |
| 59 | return QDF_STATUS_E_FAILURE; |
| 60 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 61 | qdf_export_symbol(wmi_unified_send_start_11d_scan_cmd); |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 62 | |
| 63 | /* |
| 64 | * wmi_unified_send_stop_11d_scan_cmd() - stop 11d scan |
| 65 | * @wmi_handle: wmi handle |
| 66 | * @stop_11d_scan: pointer to 11d scan stop req. |
| 67 | * |
| 68 | * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error |
| 69 | */ |
| 70 | QDF_STATUS wmi_unified_send_stop_11d_scan_cmd(wmi_unified_t wmi_handle, |
| 71 | struct reg_stop_11d_scan_req *stop_11d_scan) |
| 72 | { |
| 73 | if (wmi_handle->ops->send_stop_11d_scan_cmd) |
| 74 | return wmi_handle->ops->send_stop_11d_scan_cmd(wmi_handle, |
| 75 | stop_11d_scan); |
| 76 | |
| 77 | return QDF_STATUS_E_FAILURE; |
| 78 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 79 | qdf_export_symbol(wmi_unified_send_stop_11d_scan_cmd); |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 80 | |
Himanshu Batra | 2131922 | 2019-06-28 16:19:32 +0530 | [diff] [blame] | 81 | QDF_STATUS wmi_extract_reg_11d_new_cc_event( |
| 82 | wmi_unified_t wmi_handle, |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 83 | uint8_t *evt_buf, |
| 84 | struct reg_11d_new_country *reg_11d_new_cc, |
| 85 | uint32_t len) |
| 86 | { |
Vignesh U | c224b9e | 2018-07-26 14:08:29 +0530 | [diff] [blame] | 87 | if (wmi_handle && wmi_handle->ops->extract_reg_11d_new_country_event) |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 88 | return wmi_handle->ops->extract_reg_11d_new_country_event( |
| 89 | wmi_handle, evt_buf, reg_11d_new_cc, len); |
| 90 | |
| 91 | return QDF_STATUS_E_FAILURE; |
| 92 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 93 | qdf_export_symbol(wmi_extract_reg_11d_new_cc_event); |
Kiran Kumar Lokere | 82c8645 | 2017-04-26 19:51:29 -0700 | [diff] [blame] | 94 | |
Himanshu Batra | 2131922 | 2019-06-28 16:19:32 +0530 | [diff] [blame] | 95 | QDF_STATUS wmi_unified_set_user_country_code_cmd_send( |
| 96 | wmi_unified_t wmi_handle, |
Abhijit Pradhan | 59626eb | 2017-06-29 12:32:20 +0530 | [diff] [blame] | 97 | uint8_t pdev_id, struct cc_regdmn_s *rd) |
| 98 | { |
Abhijit Pradhan | 59626eb | 2017-06-29 12:32:20 +0530 | [diff] [blame] | 99 | if (wmi_handle->ops->send_user_country_code_cmd) |
| 100 | return wmi_handle->ops->send_user_country_code_cmd( |
| 101 | wmi_handle, pdev_id, rd); |
| 102 | |
| 103 | return QDF_STATUS_E_FAILURE; |
| 104 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 105 | qdf_export_symbol(wmi_unified_set_user_country_code_cmd_send); |
Kiran Kumar Lokere | a78b4bf | 2017-06-30 19:13:02 -0700 | [diff] [blame] | 106 | |
Himanshu Batra | 2131922 | 2019-06-28 16:19:32 +0530 | [diff] [blame] | 107 | QDF_STATUS wmi_extract_reg_ch_avoid_event( |
| 108 | wmi_unified_t wmi_handle, |
Kiran Kumar Lokere | a78b4bf | 2017-06-30 19:13:02 -0700 | [diff] [blame] | 109 | uint8_t *evt_buf, |
| 110 | struct ch_avoid_ind_type *ch_avoid_ind, |
| 111 | uint32_t len) |
| 112 | { |
Vignesh U | c224b9e | 2018-07-26 14:08:29 +0530 | [diff] [blame] | 113 | if (wmi_handle && wmi_handle->ops->extract_reg_ch_avoid_event) |
Kiran Kumar Lokere | a78b4bf | 2017-06-30 19:13:02 -0700 | [diff] [blame] | 114 | return wmi_handle->ops->extract_reg_ch_avoid_event( |
| 115 | wmi_handle, evt_buf, ch_avoid_ind, len); |
| 116 | |
| 117 | return QDF_STATUS_E_FAILURE; |
| 118 | } |
Manikandan Mohan | 3fc6592 | 2018-03-01 16:23:30 -0800 | [diff] [blame] | 119 | qdf_export_symbol(wmi_extract_reg_ch_avoid_event); |