blob: 42847658cd61b4f57805c0860104d9c4f533d89c [file] [log] [blame]
Jeff Johnson2b0a7b82016-05-18 15:08:02 -07001/*
Mukul Sharma9223f232017-03-08 18:42:27 +05302 * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
Jeff Johnson2b0a7b82016-05-18 15:08:02 -07003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/**
29 * DOC: wlan_hdd_lpass.c
30 *
31 * WLAN Host Device Driver LPASS feature implementation
32 *
33 */
34
35/* Include Files */
36#include "wlan_hdd_main.h"
37#include "wlan_hdd_lpass.h"
Yuanyuan Liud9db8252017-02-06 14:17:46 -080038#include "wlan_hdd_oemdata.h"
Jeff Johnson2b0a7b82016-05-18 15:08:02 -070039#include <cds_utils.h>
40#include "qwlan_version.h"
41
Jeff Johnsonf96ef732016-05-18 16:38:06 -070042/**
Yuanyuan Liud9db8252017-02-06 14:17:46 -080043 * wlan_hdd_get_channel_info() - Get channel info
44 * @hdd_ctx: HDD context
45 * @chan_info: Pointer to the structure that stores channel info
46 * @chan_id: Channel ID
47 *
48 * Fill in the channel info to chan_info structure.
49 */
Jeff Johnsond85b7612017-08-28 11:57:24 -070050static void wlan_hdd_get_channel_info(struct hdd_context *hdd_ctx,
Yuanyuan Liud9db8252017-02-06 14:17:46 -080051 struct svc_channel_info *chan_info,
52 uint32_t chan_id)
53{
54 uint32_t reg_info_1;
55 uint32_t reg_info_2;
56 QDF_STATUS status = QDF_STATUS_E_FAILURE;
57
58 status = sme_get_reg_info(hdd_ctx->hHal, chan_id,
59 &reg_info_1, &reg_info_2);
60 if (status != QDF_STATUS_SUCCESS)
61 return;
62
63 chan_info->mhz = cds_chan_to_freq(chan_id);
64 chan_info->band_center_freq1 = chan_info->mhz;
65 chan_info->band_center_freq2 = 0;
66 chan_info->info = 0;
67 if (CHANNEL_STATE_DFS ==
68 wlan_reg_get_channel_state(hdd_ctx->hdd_pdev,
69 chan_id))
70 WMI_SET_CHANNEL_FLAG(chan_info,
71 WMI_CHAN_FLAG_DFS);
72 hdd_update_channel_bw_info(hdd_ctx, chan_id,
73 chan_info);
74 chan_info->reg_info_1 = reg_info_1;
75 chan_info->reg_info_2 = reg_info_2;
76}
77
78/**
Jeff Johnsonf96ef732016-05-18 16:38:06 -070079 * wlan_hdd_gen_wlan_status_pack() - Create lpass adapter status package
80 * @data: Status data record to be created
81 * @adapter: Adapter whose status is to being packaged
82 * @sta_ctx: Station-specific context of @adapter
83 * @is_on: Is wlan driver loaded?
84 * @is_connected: Is @adapater connected to an AP?
85 *
86 * Generate a wlan vdev status package. The status info includes wlan
87 * on/off status, vdev ID, vdev mode, supported channels, etc.
88 *
89 * Return: 0 if package was created, otherwise a negative errno
90 */
Jeff Johnson2b0a7b82016-05-18 15:08:02 -070091static int wlan_hdd_gen_wlan_status_pack(struct wlan_status_data *data,
Jeff Johnsonb763bb92017-08-29 14:30:06 -070092 struct hdd_adapter *adapter,
Jeff Johnson40dae4e2017-08-29 14:00:25 -070093 struct hdd_station_ctx *sta_ctx,
Jeff Johnson2b0a7b82016-05-18 15:08:02 -070094 uint8_t is_on, uint8_t is_connected)
95{
Jeff Johnsond85b7612017-08-28 11:57:24 -070096 struct hdd_context *hdd_ctx = NULL;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -070097 uint8_t buflen = WLAN_SVC_COUNTRY_CODE_LEN;
Yuanyuan Liud9db8252017-02-06 14:17:46 -080098 int i;
99 uint32_t chan_id;
100 struct svc_channel_info *chan_info;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700101
102 if (!data) {
Jeff Johnson731f3a12016-05-19 07:05:06 -0700103 hdd_err("invalid data pointer");
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700104 return -EINVAL;
105 }
106 if (!adapter) {
107 if (is_on) {
108 /* no active interface */
109 data->lpss_support = 0;
110 data->is_on = is_on;
111 return 0;
112 }
Jeff Johnson731f3a12016-05-19 07:05:06 -0700113 hdd_err("invalid adapter pointer");
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700114 return -EINVAL;
115 }
116
Jeff Johnson1b780e42017-10-31 14:11:45 -0700117 if (wlan_hdd_validate_session_id(adapter->session_id)) {
118 hdd_err("invalid session id: %d", adapter->session_id);
Prashanth Bhattaf59165a2016-08-26 16:40:38 -0700119 return -EINVAL;
Hanumanth Reddy Pothulad9491f42016-10-24 19:08:38 +0530120 }
Prashanth Bhattaf59165a2016-08-26 16:40:38 -0700121
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700122 hdd_ctx = WLAN_HDD_GET_CTX(adapter);
123 if (hdd_ctx->lpss_support && hdd_ctx->config->enable_lpass_support)
124 data->lpss_support = 1;
125 else
126 data->lpss_support = 0;
127 data->numChannels = WLAN_SVC_MAX_NUM_CHAN;
Tushnim Bhattacharyyade1070d2017-03-09 13:23:55 -0800128 sme_get_cfg_valid_channels(data->channel_list,
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700129 &data->numChannels);
Yuanyuan Liud9db8252017-02-06 14:17:46 -0800130
131 for (i = 0; i < data->numChannels; i++) {
132 chan_info = &data->channel_info[i];
133 chan_id = data->channel_list[i];
134 chan_info->chan_id = chan_id;
135 wlan_hdd_get_channel_info(hdd_ctx, chan_info, chan_id);
136 }
137
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700138 sme_get_country_code(hdd_ctx->hHal, data->country_code, &buflen);
139 data->is_on = is_on;
Jeff Johnson1b780e42017-10-31 14:11:45 -0700140 data->vdev_id = adapter->session_id;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700141 data->vdev_mode = adapter->device_mode;
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700142 if (sta_ctx) {
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700143 data->is_connected = is_connected;
144 data->rssi = adapter->rssi;
145 data->freq =
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700146 cds_chan_to_freq(sta_ctx->conn_info.operationChannel);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700147 if (WLAN_SVC_MAX_SSID_LEN >=
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700148 sta_ctx->conn_info.SSID.SSID.length) {
149 data->ssid_len = sta_ctx->conn_info.SSID.SSID.length;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700150 memcpy(data->ssid,
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700151 sta_ctx->conn_info.SSID.SSID.ssId,
152 sta_ctx->conn_info.SSID.SSID.length);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700153 }
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700154 if (QDF_MAC_ADDR_SIZE >= sizeof(sta_ctx->conn_info.bssId))
155 memcpy(data->bssid, sta_ctx->conn_info.bssId.bytes,
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700156 QDF_MAC_ADDR_SIZE);
157 }
158 return 0;
159}
160
Jeff Johnsonf96ef732016-05-18 16:38:06 -0700161/**
162 * wlan_hdd_gen_wlan_version_pack() - Create lpass version package
163 * @data: Version data record to be created
164 * @fw_version: Version code from firmware
165 * @chip_id: WLAN chip ID
166 * @chip_name: WLAN chip name
167 *
168 * Generate a wlan software/hw version info package. The version info
169 * includes wlan host driver version, wlan fw driver version, wlan hw
170 * chip id & wlan hw chip name.
171 *
172 * Return: 0 if package was created, otherwise a negative errno
173 */
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700174static int wlan_hdd_gen_wlan_version_pack(struct wlan_version_data *data,
175 uint32_t fw_version,
176 uint32_t chip_id,
177 const char *chip_name)
178{
179 if (!data) {
Jeff Johnson731f3a12016-05-19 07:05:06 -0700180 hdd_err("invalid data pointer");
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700181 return -EINVAL;
182 }
183
184 data->chip_id = chip_id;
185 strlcpy(data->chip_name, chip_name, WLAN_SVC_MAX_STR_LEN);
186 if (strncmp(chip_name, "Unknown", 7))
187 strlcpy(data->chip_from, "Qualcomm", WLAN_SVC_MAX_STR_LEN);
188 else
189 strlcpy(data->chip_from, "Unknown", WLAN_SVC_MAX_STR_LEN);
190 strlcpy(data->host_version, QWLAN_VERSIONSTR, WLAN_SVC_MAX_STR_LEN);
191 scnprintf(data->fw_version, WLAN_SVC_MAX_STR_LEN, "%d.%d.%d.%d",
192 (fw_version & 0xf0000000) >> 28,
193 (fw_version & 0xf000000) >> 24,
194 (fw_version & 0xf00000) >> 20, (fw_version & 0x7fff));
195 return 0;
196}
197
Jeff Johnsonf96ef732016-05-18 16:38:06 -0700198/**
199 * wlan_hdd_send_status_pkg() - Send adapter status to lpass
200 * @adapter: Adapter whose status is to be sent to lpass
201 * @sta_ctx: Station-specific context of @adapter
202 * @is_on: Is @adapter enabled
203 * @is_connected: Is @adapater connected
204 *
205 * Generate wlan vdev status pacakge and send it to a user space
206 * daemon through netlink.
207 *
208 * Return: none
209 */
Jeff Johnson85b5c112017-08-11 15:15:23 -0700210static void wlan_hdd_send_status_pkg(struct hdd_adapter *adapter,
Jeff Johnson71396692016-09-23 15:41:52 -0700211 struct hdd_station_ctx *sta_ctx,
212 uint8_t is_on, uint8_t is_connected)
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700213{
214 int ret = 0;
Yuanyuan Liud9db8252017-02-06 14:17:46 -0800215 struct wlan_status_data *data = NULL;
Jeff Johnsond85b7612017-08-28 11:57:24 -0700216 struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
Kondabattini, Ganesh96ac37b2016-09-02 23:12:15 +0530217
218 if (!hdd_ctx)
219 return;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700220
221 if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam())
222 return;
223
Yuanyuan Liud9db8252017-02-06 14:17:46 -0800224 data = kzalloc(sizeof(*data), GFP_KERNEL);
225 if (!data)
226 return;
227
Srinivas Girigowda5557a392017-03-09 14:28:36 -0800228 if (is_on)
Yuanyuan Liud9db8252017-02-06 14:17:46 -0800229 ret = wlan_hdd_gen_wlan_status_pack(data, adapter, sta_ctx,
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700230 is_on, is_connected);
Prashanth Bhattaf59165a2016-08-26 16:40:38 -0700231
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700232 if (!ret)
Kondabattini, Ganesh96ac37b2016-09-02 23:12:15 +0530233 wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index,
Yuanyuan Liud9db8252017-02-06 14:17:46 -0800234 WLAN_SVC_WLAN_STATUS_IND,
235 data, sizeof(*data));
236 kfree(data);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700237}
238
Jeff Johnsonf96ef732016-05-18 16:38:06 -0700239/**
240 * wlan_hdd_send_version_pkg() - report version information to lpass
241 * @fw_version: Version code from firmware
242 * @chip_id: WLAN chip ID
243 * @chip_name: WLAN chip name
244 *
245 * Generate a wlan sw/hw version info package and send it to a user
246 * space daemon through netlink.
247 *
248 * Return: none
249 */
Jeff Johnson9afc5012016-09-23 13:56:27 -0700250static void wlan_hdd_send_version_pkg(uint32_t fw_version,
251 uint32_t chip_id,
252 const char *chip_name)
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700253{
254 int ret = 0;
255 struct wlan_version_data data;
Jeff Johnsond85b7612017-08-28 11:57:24 -0700256 struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
Kondabattini, Ganesh96ac37b2016-09-02 23:12:15 +0530257
258 if (!hdd_ctx)
259 return;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700260
261 if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam())
262 return;
263
264 memset(&data, 0, sizeof(struct wlan_version_data));
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700265 ret = wlan_hdd_gen_wlan_version_pack(&data, fw_version, chip_id,
266 chip_name);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700267 if (!ret)
Kondabattini, Ganesh96ac37b2016-09-02 23:12:15 +0530268 wlan_hdd_send_svc_nlink_msg(hdd_ctx->radio_index,
269 WLAN_SVC_WLAN_VERSION_IND,
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700270 &data, sizeof(data));
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700271}
272
Jeff Johnsonf96ef732016-05-18 16:38:06 -0700273/**
274 * wlan_hdd_send_all_scan_intf_info() - report scan interfaces to lpass
275 * @hdd_ctx: The global HDD context
276 *
277 * This function iterates through all of the interfaces registered
278 * with HDD and indicates to lpass all that support scanning.
279 * If no interfaces support scanning then that fact is also indicated.
280 *
281 * Return: none
282 */
Jeff Johnson82797b62017-08-11 15:31:27 -0700283static void wlan_hdd_send_all_scan_intf_info(struct hdd_context *hdd_ctx)
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700284{
Jeff Johnsonb763bb92017-08-29 14:30:06 -0700285 struct hdd_adapter *adapter = NULL;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700286 bool scan_intf_found = false;
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700287
288 if (!hdd_ctx) {
Jeff Johnson731f3a12016-05-19 07:05:06 -0700289 hdd_err("NULL pointer for hdd_ctx");
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700290 return;
291 }
292
Dustin Brown920397d2017-12-13 16:27:50 -0800293 hdd_for_each_adapter(hdd_ctx, adapter) {
294 if (adapter->device_mode == QDF_STA_MODE ||
295 adapter->device_mode == QDF_P2P_CLIENT_MODE ||
296 adapter->device_mode == QDF_P2P_DEVICE_MODE) {
297 scan_intf_found = true;
298 wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700299 }
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700300 }
301
302 if (!scan_intf_found)
Jeff Johnsond9dd4842016-05-18 16:49:29 -0700303 wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
Jeff Johnson2b0a7b82016-05-18 15:08:02 -0700304}
Jeff Johnson9afc5012016-09-23 13:56:27 -0700305
Jeff Johnson67904df2016-09-27 15:15:51 -0700306/*
Jeff Johnsonc875e242016-09-23 18:12:34 -0700307 * hdd_lpass_target_config() - Handle LPASS target configuration
Jeff Johnson67904df2016-09-27 15:15:51 -0700308 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnsonc875e242016-09-23 18:12:34 -0700309 */
Jeff Johnson82797b62017-08-11 15:31:27 -0700310void hdd_lpass_target_config(struct hdd_context *hdd_ctx,
Jeff Johnsonc875e242016-09-23 18:12:34 -0700311 struct wma_tgt_cfg *target_config)
312{
313 hdd_ctx->lpss_support = target_config->lpss_support;
314}
315
Jeff Johnson67904df2016-09-27 15:15:51 -0700316/*
Jeff Johnson9078bdc2016-09-23 17:18:11 -0700317 * hdd_lpass_populate_cds_config() - Populate LPASS configuration
Jeff Johnson67904df2016-09-27 15:15:51 -0700318 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnson9078bdc2016-09-23 17:18:11 -0700319 */
320void hdd_lpass_populate_cds_config(struct cds_config_info *cds_config,
Jeff Johnson82797b62017-08-11 15:31:27 -0700321 struct hdd_context *hdd_ctx)
Jeff Johnson9078bdc2016-09-23 17:18:11 -0700322{
323 cds_config->is_lpass_enabled = hdd_ctx->config->enable_lpass_support;
324}
325
Jeff Johnson67904df2016-09-27 15:15:51 -0700326/*
Mukul Sharma9223f232017-03-08 18:42:27 +0530327 * hdd_lpass_populate_pmo_config() - Populate LPASS configuration
328 * (public function documented in wlan_hdd_lpass.h)
329 */
330void hdd_lpass_populate_pmo_config(struct pmo_psoc_cfg *pmo_config,
Jeff Johnson82797b62017-08-11 15:31:27 -0700331 struct hdd_context *hdd_ctx)
Mukul Sharma9223f232017-03-08 18:42:27 +0530332{
333 pmo_config->lpass_enable = hdd_ctx->config->enable_lpass_support;
334}
335
336/*
Jeff Johnson71396692016-09-23 15:41:52 -0700337 * hdd_lpass_notify_connect() - Notify LPASS of interface connect
Jeff Johnson67904df2016-09-27 15:15:51 -0700338 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnson71396692016-09-23 15:41:52 -0700339 */
Jeff Johnson85b5c112017-08-11 15:15:23 -0700340void hdd_lpass_notify_connect(struct hdd_adapter *adapter)
Jeff Johnson71396692016-09-23 15:41:52 -0700341{
342 struct hdd_station_ctx *sta_ctx;
343
344 /* only send once per connection */
345 if (adapter->rssi_send)
346 return;
347
348 /* don't send if driver is unloading */
349 if (cds_is_driver_unloading())
350 return;
351
352 adapter->rssi_send = true;
353 sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
354 wlan_hdd_send_status_pkg(adapter, sta_ctx, 1, 1);
355}
356
Jeff Johnson67904df2016-09-27 15:15:51 -0700357/*
Jeff Johnsoncef59bb2016-09-23 15:28:47 -0700358 * hdd_lpass_notify_disconnect() - Notify LPASS of interface disconnect
Jeff Johnson67904df2016-09-27 15:15:51 -0700359 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnsoncef59bb2016-09-23 15:28:47 -0700360 */
Jeff Johnson85b5c112017-08-11 15:15:23 -0700361void hdd_lpass_notify_disconnect(struct hdd_adapter *adapter)
Jeff Johnsoncef59bb2016-09-23 15:28:47 -0700362{
363 struct hdd_station_ctx *sta_ctx;
364
365 adapter->rssi_send = false;
366 sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
367 wlan_hdd_send_status_pkg(adapter, sta_ctx, 1, 0);
368}
369
Jeff Johnson67904df2016-09-27 15:15:51 -0700370/*
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700371 * hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
Jeff Johnson67904df2016-09-27 15:15:51 -0700372 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700373 *
Jeff Johnson67904df2016-09-27 15:15:51 -0700374 * implementation note: when one interfaces changes we notify the
375 * state of all of the interfaces.
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700376 */
Jeff Johnson85b5c112017-08-11 15:15:23 -0700377void hdd_lpass_notify_mode_change(struct hdd_adapter *adapter)
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700378{
Jeff Johnson82797b62017-08-11 15:31:27 -0700379 struct hdd_context *hdd_ctx;
Jeff Johnson2ae6f712016-09-23 15:08:48 -0700380
381 hdd_ctx = WLAN_HDD_GET_CTX(adapter);
382 wlan_hdd_send_all_scan_intf_info(hdd_ctx);
383}
384
Jeff Johnson67904df2016-09-27 15:15:51 -0700385/*
Jeff Johnson9afc5012016-09-23 13:56:27 -0700386 * hdd_lpass_notify_start() - Notify LPASS of driver start
Jeff Johnson67904df2016-09-27 15:15:51 -0700387 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnson9afc5012016-09-23 13:56:27 -0700388 */
Jeff Johnson82797b62017-08-11 15:31:27 -0700389void hdd_lpass_notify_start(struct hdd_context *hdd_ctx)
Jeff Johnson9afc5012016-09-23 13:56:27 -0700390{
391 wlan_hdd_send_all_scan_intf_info(hdd_ctx);
392 wlan_hdd_send_version_pkg(hdd_ctx->target_fw_version,
393 hdd_ctx->target_hw_version,
394 hdd_ctx->target_hw_name);
395}
Jeff Johnsonf7f66f02016-09-23 14:50:11 -0700396
Jeff Johnson67904df2016-09-27 15:15:51 -0700397/*
Jeff Johnsonf7f66f02016-09-23 14:50:11 -0700398 * hdd_lpass_notify_stop() - Notify LPASS of driver stop
Jeff Johnson67904df2016-09-27 15:15:51 -0700399 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnsonf7f66f02016-09-23 14:50:11 -0700400 */
Jeff Johnson82797b62017-08-11 15:31:27 -0700401void hdd_lpass_notify_stop(struct hdd_context *hdd_ctx)
Jeff Johnsonf7f66f02016-09-23 14:50:11 -0700402{
403 wlan_hdd_send_status_pkg(NULL, NULL, 0, 0);
404}
Jeff Johnsonb8bf9072016-09-23 17:39:27 -0700405
Jeff Johnson67904df2016-09-27 15:15:51 -0700406/*
Jeff Johnsonb8bf9072016-09-23 17:39:27 -0700407 * hdd_lpass_is_supported() - Is lpass feature supported?
Jeff Johnson67904df2016-09-27 15:15:51 -0700408 * (public function documented in wlan_hdd_lpass.h)
Jeff Johnsonb8bf9072016-09-23 17:39:27 -0700409 */
Jeff Johnson82797b62017-08-11 15:31:27 -0700410bool hdd_lpass_is_supported(struct hdd_context *hdd_ctx)
Jeff Johnsonb8bf9072016-09-23 17:39:27 -0700411{
412 return hdd_ctx->config->enable_lpass_support;
413}