qcacmn: Enable HW broadcast filter
Add ini to param to enable/disable HW filter for bc (except arp) frame. Change-Id: Ic9205ae834ff5d93f9c33c7cf93c839eb3aa244a CRs-Fixed: 1113550
Этот коммит содержится в:

коммит произвёл
Sandeep Puligilla

родитель
6bb2c1755f
Коммит
490aaa1f4b
75
power_management_offloads/core/inc/wlan_pmo_hw_bcast_fltr.h
Обычный файл
75
power_management_offloads/core/inc/wlan_pmo_hw_bcast_fltr.h
Обычный файл
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare arp offload feature API's
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_H_
|
||||
#define _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_H_
|
||||
|
||||
#include "wlan_pmo_non_arp_hwbcast_public_struct.h"
|
||||
|
||||
/**
|
||||
* pmo_core_do_enable_non_arp_bcast_filter() - API to enable
|
||||
* hw broadcast filter
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* API to enable hw broadcast filter in fwr from vdev priv ctx
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_core_do_enable_non_arp_bcast_filter(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_core_do_disable_non_arp_bcast_filter() - API to enable
|
||||
* hw broadcast filter
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* API to enable hw broadcast filter in fwr from vdev priv ctx
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_core_do_disable_non_arp_bcast_filter(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_core_enable_non_arp_bcast_filter_in_fwr() - API to enable
|
||||
* hw broadcast filter
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* API to enable hw broadcast filter in fwr from vdev priv ctx
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_core_enable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_core_disable_non_arp_bcast_filter_in_fwr() - API to disable
|
||||
* hw broadcast filter
|
||||
* @vdev: objmgr vdev
|
||||
*
|
||||
* API to disable hw broadcast filter in fwr from vdev priv ctx
|
||||
*
|
||||
* Return: QQDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_core_disable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
#endif /* end of _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_H_*/
|
148
power_management_offloads/core/src/wlan_pmo_hw_bcast_fltr.c
Обычный файл
148
power_management_offloads/core/src/wlan_pmo_hw_bcast_fltr.c
Обычный файл
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: Implements arp offload feature API's
|
||||
*/
|
||||
|
||||
#include "wlan_pmo_hw_bcast_fltr.h"
|
||||
#include "wlan_pmo_tgt_api.h"
|
||||
#include "wlan_pmo_main.h"
|
||||
#include "wlan_pmo_obj_mgmt_public_struct.h"
|
||||
|
||||
static QDF_STATUS pmo_core_non_arp_bcast_filter_sanity(
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct pmo_vdev_priv_obj *vdev_ctx;
|
||||
|
||||
if (!vdev) {
|
||||
pmo_err("vdev is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
vdev_ctx = pmo_get_vdev_priv_ctx(vdev);
|
||||
if (!vdev_ctx) {
|
||||
pmo_err("vdev_ctx is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
if (!vdev_ctx->pmo_psoc_ctx->psoc_cfg.hw_bcast_filter) {
|
||||
pmo_err("user disabled hw broadcast filter using ini");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!pmo_core_is_vdev_connected(vdev))
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_core_do_enable_non_arp_bcast_filter(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
PMO_ENTER();
|
||||
|
||||
status = pmo_tgt_enable_non_arp_bcast_filter_req(vdev, vdev_id);
|
||||
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_core_do_disable_non_arp_bcast_filter(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
PMO_ENTER();
|
||||
|
||||
status = pmo_tgt_enable_non_arp_bcast_filter_req(vdev, vdev_id);
|
||||
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_core_enable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t vdev_id;
|
||||
|
||||
PMO_ENTER();
|
||||
if (!vdev) {
|
||||
pmo_err("vdev is NULL");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = wlan_objmgr_vdev_try_get_ref(vdev, WLAN_PMO_ID);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto out;
|
||||
|
||||
status = pmo_core_non_arp_bcast_filter_sanity(vdev);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto def_ref;
|
||||
|
||||
vdev_id = pmo_get_vdev_id(vdev);
|
||||
pmo_info("Enable non arp hw bcast filter in fwr vdev id: %d vdev: %p",
|
||||
vdev_id, vdev);
|
||||
|
||||
status = pmo_core_do_enable_non_arp_bcast_filter(vdev, vdev_id);
|
||||
def_ref:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
|
||||
out:
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_core_disable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t vdev_id;
|
||||
|
||||
PMO_ENTER();
|
||||
if (!vdev) {
|
||||
pmo_err("vdev is NULL");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = wlan_objmgr_vdev_try_get_ref(vdev, WLAN_PMO_ID);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto out;
|
||||
|
||||
status = pmo_core_non_arp_bcast_filter_sanity(vdev);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto def_ref;
|
||||
|
||||
vdev_id = pmo_get_vdev_id(vdev);
|
||||
pmo_info("Disable non arp hw bcast filter in fwr vdev id: %d vdev: %p",
|
||||
vdev_id, vdev);
|
||||
|
||||
status = pmo_core_do_disable_non_arp_bcast_filter(vdev, vdev_id);
|
||||
def_ref:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_PMO_ID);
|
||||
out:
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
@@ -243,6 +243,7 @@ enum pmo_offload_trigger {
|
||||
* @ptrn_match_enable_all_vdev: true when pattern match is enable for all vdev
|
||||
* @bpf_enable: true if psoc supports bpf else false
|
||||
* @arp_offload_enable: true if arp offload is supported for psoc else false
|
||||
* @hw_bcast_filter: true if supports hw bcast filter in ine else flase
|
||||
* @ns_offload_enable_static: true if psoc supports ns offload in ini else false
|
||||
* @ns_offload_enable_dynamic: to enable / disable the ns offload using
|
||||
* ioctl or vendor command.
|
||||
@@ -268,6 +269,7 @@ struct pmo_psoc_cfg {
|
||||
bool ptrn_match_enable_all_vdev;
|
||||
bool bpf_enable;
|
||||
bool arp_offload_enable;
|
||||
bool hw_bcast_filter;
|
||||
bool ns_offload_enable_static;
|
||||
bool ns_offload_enable_dynamic;
|
||||
bool ssdp;
|
||||
|
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: Declare various struct, macros which shall be used in
|
||||
* pmo arp offload feature.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_pmo_common_public_struct.h"
|
||||
|
||||
/**
|
||||
* struct pmo_bcast_filter_req - pmo arp request
|
||||
* @psoc: objmgr psoc
|
||||
* @vdev_id: vdev id on which arp offload needed
|
||||
*/
|
||||
struct pmo_bcast_filter_req {
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
uint8_t vdev_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pmo_bcast_filter_params - For enable/disable pmo HW Broadcast Filter
|
||||
* @enable: value to enable disable feature
|
||||
* @bss_id: bss_id for get session.
|
||||
*/
|
||||
struct pmo_bcast_filter_params {
|
||||
bool enable;
|
||||
struct qdf_mac_addr bssid;
|
||||
};
|
||||
|
||||
#endif /* end of _WLAN_PMO_NON_ARP_HW_BCAST_FILTER_PUBLIC_STRUCT_H_ */
|
||||
|
@@ -26,6 +26,28 @@
|
||||
|
||||
#define GET_PMO_TX_OPS_FROM_PSOC(psoc) (psoc->soc_cb.tx_ops.pmo_tx_ops)
|
||||
|
||||
/**
|
||||
* pmo_tgt_enable_non_arp_bcast_filter_req() - Enable non arp
|
||||
* hw bcast filter to target
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_enable_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_disable_non_arp_bcast_filter_req() - Disable non arp
|
||||
* hw bcast filter to target
|
||||
* @vdev: objmgr vdev
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: QDF status
|
||||
*/
|
||||
QDF_STATUS pmo_tgt_disable_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* pmo_tgt_enable_arp_offload_req() - Enable arp offload req to target
|
||||
* @vdev: objmgr vdev
|
||||
|
@@ -181,6 +181,30 @@ QDF_STATUS pmo_ucfg_enable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
QDF_STATUS pmo_ucfg_disable_ns_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
enum pmo_offload_trigger trigger);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_enable_non_arp_bcast_filter_in_fwr(): API to enable
|
||||
* hw broadcast filter in fwr
|
||||
* @vdev: objmgr vdev param
|
||||
*
|
||||
* API to enable hw broadcast filter from pmo vdev priv ctx
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_enable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_disable_non_arp_bcast_filter_in_fwr(): API to disable
|
||||
* hw broadcast filter in fwr
|
||||
* @vdev: objmgr vdev param
|
||||
*
|
||||
* API to disable hw broadcast filter from pmo vdev priv ctx
|
||||
*
|
||||
* Return QDF_STATUS -in case of success else return error
|
||||
*/
|
||||
QDF_STATUS pmo_ucfg_disable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev);
|
||||
|
||||
/**
|
||||
* pmo_ucfg_max_mc_addr_supported() - to get max support mc address
|
||||
* @psoc: objmgr psoc
|
||||
|
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: Implements public API for pmo to interact with target/WMI
|
||||
*/
|
||||
|
||||
#include "wlan_pmo_tgt_api.h"
|
||||
#include "wlan_pmo_non_arp_hwbcast_public_struct.h"
|
||||
#include "wlan_pmo_obj_mgmt_public_struct.h"
|
||||
|
||||
QDF_STATUS pmo_tgt_enable_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct pmo_bcast_filter_params *bcast_req = NULL;
|
||||
struct pmo_vdev_priv_obj *vdev_ctx;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
QDF_STATUS status;
|
||||
struct wlan_lmac_if_pmo_tx_ops pmo_tx_ops;
|
||||
struct qdf_mac_addr peer_bssid;
|
||||
|
||||
PMO_ENTER();
|
||||
vdev_ctx = pmo_get_vdev_priv_ctx(vdev);
|
||||
if (!vdev_ctx) {
|
||||
pmo_err("vdev_ctx is NULL");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
if (!psoc) {
|
||||
pmo_err("psoc unavailable for vdev %p", vdev);
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
bcast_req = qdf_mem_malloc(sizeof(*bcast_req));
|
||||
if (!bcast_req) {
|
||||
pmo_err("unable to allocate arp_offload_req");
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_get_vdev_bss_peer_mac_addr(vdev,
|
||||
&peer_bssid);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto out;
|
||||
|
||||
qdf_mem_copy(&bcast_req->bssid.bytes, &peer_bssid.bytes,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
pmo_info("vdev self mac addr: %pM bss peer mac addr: %pM",
|
||||
wlan_vdev_mlme_get_macaddr(vdev),
|
||||
peer_bssid.bytes);
|
||||
|
||||
bcast_req->enable = true;
|
||||
|
||||
pmo_debug("Non ARP Broadcast filter vdev_id: %d enable: %d",
|
||||
vdev_id,
|
||||
bcast_req->enable);
|
||||
|
||||
pmo_tx_ops = GET_PMO_TX_OPS_FROM_PSOC(psoc);
|
||||
if (!pmo_tx_ops.send_non_arp_bcast_filter_req) {
|
||||
pmo_err("send_non_arp_bcast_filter_req is null");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_tx_ops.send_non_arp_bcast_filter_req(
|
||||
vdev, bcast_req);
|
||||
|
||||
out:
|
||||
if (bcast_req)
|
||||
qdf_mem_free(bcast_req);
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_tgt_disable_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
uint8_t vdev_id)
|
||||
{
|
||||
struct pmo_bcast_filter_params *bcast_req = NULL;
|
||||
struct pmo_vdev_priv_obj *vdev_ctx;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
QDF_STATUS status;
|
||||
struct wlan_lmac_if_pmo_tx_ops pmo_tx_ops;
|
||||
struct qdf_mac_addr peer_bssid;
|
||||
|
||||
PMO_ENTER();
|
||||
vdev_ctx = pmo_get_vdev_priv_ctx(vdev);
|
||||
if (!vdev_ctx) {
|
||||
pmo_err("vdev_ctx is NULL");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
if (!psoc) {
|
||||
pmo_err("psoc unavailable for vdev %p", vdev);
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
bcast_req = qdf_mem_malloc(sizeof(*bcast_req));
|
||||
if (!bcast_req) {
|
||||
pmo_err("unable to allocate arp_offload_req");
|
||||
status = QDF_STATUS_E_NOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_get_vdev_bss_peer_mac_addr(vdev,
|
||||
&peer_bssid);
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
goto out;
|
||||
|
||||
qdf_mem_copy(&bcast_req->bssid.bytes, &peer_bssid.bytes,
|
||||
QDF_MAC_ADDR_SIZE);
|
||||
pmo_info("vdev self mac addr: %pM bss peer mac addr: %pM",
|
||||
wlan_vdev_mlme_get_macaddr(vdev),
|
||||
peer_bssid.bytes);
|
||||
|
||||
bcast_req->enable = false;
|
||||
|
||||
pmo_debug("Non ARP Broadcast filter vdev_id: %d enable: %d",
|
||||
vdev_id,
|
||||
bcast_req->enable);
|
||||
|
||||
pmo_tx_ops = GET_PMO_TX_OPS_FROM_PSOC(psoc);
|
||||
if (!pmo_tx_ops.send_non_arp_bcast_filter_req) {
|
||||
pmo_err("send_non_arp_bcast_filter_req is null");
|
||||
status = QDF_STATUS_E_NULL_VALUE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = pmo_tx_ops.send_non_arp_bcast_filter_req(
|
||||
vdev, bcast_req);
|
||||
|
||||
out:
|
||||
if (bcast_req)
|
||||
qdf_mem_free(bcast_req);
|
||||
PMO_EXIT();
|
||||
|
||||
return status;
|
||||
}
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "wlan_pmo_ucfg_api.h"
|
||||
#include "wlan_pmo_arp.h"
|
||||
#include "wlan_pmo_hw_bcast_fltr.h"
|
||||
#include "wlan_pmo_ns.h"
|
||||
#include "wlan_pmo_gtk.h"
|
||||
#include "wlan_pmo_wow.h"
|
||||
@@ -91,6 +92,18 @@ QDF_STATUS pmo_ucfg_disable_arp_offload_in_fwr(struct wlan_objmgr_vdev *vdev,
|
||||
return pmo_core_disable_arp_offload_in_fwr(vdev, trigger);
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_ucfg_enable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return pmo_core_enable_non_arp_bcast_filter_in_fwr(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_ucfg_disable_non_arp_bcast_filter_in_fwr(
|
||||
struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
return pmo_core_disable_non_arp_bcast_filter_in_fwr(vdev);
|
||||
}
|
||||
|
||||
QDF_STATUS pmo_ucfg_cache_ns_offload_req(struct pmo_ns_req *ns_req)
|
||||
{
|
||||
return pmo_core_cache_ns_offload_req(ns_req);
|
||||
|
@@ -124,6 +124,19 @@ QDF_STATUS target_if_pmo_send_action_frame_patterns(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_action_wakeup_set_params *ip_cmd);
|
||||
|
||||
/**
|
||||
* target_if_pmo_send_non_arp_bcast_filter_req() - Enable/Disable Broadcast
|
||||
* @vdev: objmgr vdev
|
||||
* @bcast_req: enable/disable hw bcast filter
|
||||
*
|
||||
* This functions enable/disable non arp hw bcast filter.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
QDF_STATUS target_if_pmo_send_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_bcast_filter_params *bcast_req);
|
||||
|
||||
/**
|
||||
* target_if_pmo_send_arp_offload_req() - sends arp request to fwr
|
||||
* @vdev: objmgr vdev
|
||||
|
@@ -36,6 +36,8 @@ void target_if_pmo_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
pmo_tx_ops = &tx_ops->pmo_tx_ops;
|
||||
pmo_tx_ops->send_arp_offload_req =
|
||||
target_if_pmo_send_arp_offload_req;
|
||||
pmo_tx_ops->send_non_arp_bcast_filter_req =
|
||||
target_if_pmo_send_non_arp_bcast_filter_req;
|
||||
pmo_tx_ops->send_ns_offload_req =
|
||||
target_if_pmo_send_ns_offload_req;
|
||||
pmo_tx_ops->send_enable_wow_wakeup_event_req =
|
||||
|
61
target_if/pmo/src/target_if_pmo_non_arp_bcast_fltr.c
Обычный файл
61
target_if/pmo/src/target_if_pmo_non_arp_bcast_fltr.c
Обычный файл
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* DOC: target_if_pmo_non_arp_bcast_fltr.c
|
||||
*
|
||||
* Target interface file for pmo component to
|
||||
* send non arp hw bcast filtering related cmd and process event.
|
||||
*/
|
||||
|
||||
#include "target_if.h"
|
||||
#include "target_if_pmo.h"
|
||||
#include "wmi_unified_api.h"
|
||||
#include "wlan_pmo_non_arp_hwbcast_public_struct.h"
|
||||
|
||||
QDF_STATUS target_if_pmo_send_non_arp_bcast_filter_req(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct pmo_bcast_filter_params *bcast_req)
|
||||
{
|
||||
uint8_t vdev_id;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!vdev) {
|
||||
target_if_err("vdev ptr passed is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
wlan_vdev_obj_lock(vdev);
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
vdev_id = wlan_vdev_get_id(vdev);
|
||||
wlan_vdev_obj_unlock(vdev);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc handle is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
status = wmi_unified_configure_broadcast_filter_cmd(
|
||||
GET_WMI_HDL_FROM_PSOC(psoc),
|
||||
vdev_id,
|
||||
bcast_req->enable);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
target_if_err("Failed to enable HW Broadcast filter");
|
||||
|
||||
return status;
|
||||
}
|
Ссылка в новой задаче
Block a user