blob: e072d4bdfb9de74ce061424f3f791962cb31c57b [file] [log] [blame]
Mukul Sharmad75a6672017-06-22 15:40:53 +05301/*
Sourav Mohapatracf632572018-04-02 11:01:35 +05302 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
Mukul Sharmad75a6672017-06-22 15:40:53 +05303 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18/**
19 * DOC: target_if_pmo_arp.c
20 *
21 * Target interface file for pmo component to
22 * send arp offload related cmd and process event.
23 */
24
25#include "target_if.h"
26#include "target_if_pmo.h"
27#include "wmi_unified_api.h"
28
29QDF_STATUS target_if_pmo_send_arp_offload_req(
30 struct wlan_objmgr_vdev *vdev,
31 struct pmo_arp_offload_params *arp_offload_req,
32 struct pmo_ns_offload_params *ns_offload_req)
33{
34 uint8_t vdev_id;
35 struct wlan_objmgr_psoc *psoc;
36 QDF_STATUS status;
37
38 if (!vdev) {
39 target_if_err("vdev ptr passed is NULL");
40 return QDF_STATUS_E_INVAL;
41 }
42
43 psoc = wlan_vdev_get_psoc(vdev);
44 vdev_id = wlan_vdev_get_id(vdev);
45 if (!psoc) {
46 target_if_err("psoc handle is NULL");
47 return QDF_STATUS_E_INVAL;
48 }
49
50 status = wmi_unified_enable_arp_ns_offload_cmd(
Sourav Mohapatracf632572018-04-02 11:01:35 +053051 get_wmi_unified_hdl_from_psoc(psoc),
Mukul Sharmad75a6672017-06-22 15:40:53 +053052 arp_offload_req,
53 ns_offload_req,
54 vdev_id);
55 if (status != QDF_STATUS_SUCCESS)
56 target_if_err("Failed to enable ARP NDP/NSffload");
57
58 return status;
59}
60
61