qcacmn: Change signature of mgmt rx frame related APIs
Change signature of tgt_mgmt_txrx_rx_frame_handler API and mgmt_frame_rx_callback by replacing rx params of type void pointer with that of struct mgmt_rx_event_params pointer. Change-Id: Idfa54f1c9bfec22a2cf2e98740765dcd797513df CRs-Fixed: 1103247
This commit is contained in:

committed by
qcabuildsw

parent
b98676c6b9
commit
009eee1dbb
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-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
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "wlan_mgmt_txrx_utils_api.h"
|
||||
#include "qdf_nbuf.h"
|
||||
|
||||
|
||||
@@ -35,7 +36,7 @@
|
||||
* tgt_mgmt_txrx_rx_frame_handler() - handles rx mgmt. frames
|
||||
* @psoc: psoc context
|
||||
* @buf: buffer
|
||||
* @params: rx event params
|
||||
* @mgmt_rx_params: rx event params
|
||||
*
|
||||
* This function handles mgmt. rx frames and is registered to southbound
|
||||
* interface through rx ops.
|
||||
@@ -44,7 +45,8 @@
|
||||
*/
|
||||
QDF_STATUS tgt_mgmt_txrx_rx_frame_handler(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
qdf_nbuf_t buf, void *params);
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *mgmt_rx_params);
|
||||
|
||||
/**
|
||||
* tgt_mgmt_txrx_tx_completion_handler() - handles mgmt. tx completions
|
||||
|
@@ -594,6 +594,39 @@ enum mgmt_frame_type {
|
||||
MGMT_MAX_FRAME_TYPE,
|
||||
};
|
||||
|
||||
#define WLAN_MGMT_TXRX_HOST_MAX_ANTENNA 4
|
||||
|
||||
/**
|
||||
* struct mgmt_rx_event_params - host mgmt header params
|
||||
* @channel: channel on which this frame is received
|
||||
* @snr: snr information used to call rssi
|
||||
* @rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain
|
||||
* @rate: Rate kbps
|
||||
* @phy_mode: rx phy mode
|
||||
* @buf_len: length of the frame
|
||||
* @status: rx status
|
||||
* @flags: information about the management frame e.g. can give a
|
||||
* scan source for a scan result mgmt frame
|
||||
* @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units)
|
||||
* @tsf_delta: tsf delta
|
||||
* @pdev_id: pdev id
|
||||
* @rx_params: pointer to other rx params
|
||||
* (win specific, will be removed in phase 4)
|
||||
*/
|
||||
struct mgmt_rx_event_params {
|
||||
uint32_t channel;
|
||||
uint32_t snr;
|
||||
uint8_t rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA];
|
||||
uint32_t rate;
|
||||
enum wlan_phymode phy_mode;
|
||||
uint32_t buf_len;
|
||||
QDF_STATUS status;
|
||||
uint32_t flags;
|
||||
int32_t rssi;
|
||||
uint32_t tsf_delta;
|
||||
uint8_t pdev_id;
|
||||
void *rx_params;
|
||||
};
|
||||
|
||||
/**
|
||||
* mgmt_tx_download_comp_cb - function pointer for tx download completions.
|
||||
@@ -628,17 +661,19 @@ typedef QDF_STATUS (*mgmt_ota_comp_cb)(void *context, qdf_nbuf_t buf,
|
||||
* @psoc: psoc context
|
||||
* @peer: peer
|
||||
* @buf: buffer
|
||||
* @params: rx params
|
||||
* @mgmt_rx_params: rx params
|
||||
* @frm_type: mgmt rx frame type
|
||||
*
|
||||
* This is the function pointer to be called on receiving mgmt rx frames.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success
|
||||
*/
|
||||
typedef QDF_STATUS (*mgmt_frame_rx_callback)(struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
qdf_nbuf_t buf, void *params,
|
||||
enum mgmt_frame_type frm_type);
|
||||
typedef QDF_STATUS (*mgmt_frame_rx_callback)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
struct wlan_objmgr_peer *peer,
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *mgmt_rx_params,
|
||||
enum mgmt_frame_type frm_type);
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -794,7 +794,8 @@ static QDF_STATUS wlan_mgmt_txrx_rx_handler_list_copy(
|
||||
|
||||
QDF_STATUS tgt_mgmt_txrx_rx_frame_handler(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
qdf_nbuf_t buf, void *params)
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *mgmt_rx_params)
|
||||
{
|
||||
struct mgmt_txrx_priv_context *mgmt_txrx_ctx;
|
||||
struct ieee80211_frame *wh;
|
||||
@@ -908,11 +909,11 @@ QDF_STATUS tgt_mgmt_txrx_rx_frame_handler(
|
||||
while (rx_handler->next) {
|
||||
copy_buf = qdf_nbuf_clone(buf);
|
||||
rx_handler->rx_cb(psoc, peer, copy_buf,
|
||||
params, frm_type);
|
||||
mgmt_rx_params, frm_type);
|
||||
rx_handler = rx_handler->next;
|
||||
}
|
||||
rx_handler->rx_cb(psoc, peer, buf,
|
||||
params, frm_type);
|
||||
mgmt_rx_params, frm_type);
|
||||
|
||||
rx_handler_mem_free:
|
||||
while (rx_handler_head) {
|
||||
|
@@ -219,6 +219,11 @@ QDF_STATUS wlan_mgmt_txrx_mgmt_frame_tx(struct wlan_objmgr_peer *peer,
|
||||
struct mgmt_txrx_priv_context *txrx_ctx;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
|
||||
if (!peer) {
|
||||
mgmt_txrx_err("peer passed is NULL");
|
||||
return QDF_STATUS_E_NULL_VALUE;
|
||||
}
|
||||
|
||||
vdev = wlan_peer_get_vdev(peer);
|
||||
if (!vdev) {
|
||||
mgmt_txrx_err("vdev unavailable for peer %p", peer);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "qdf_status.h"
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "wlan_mgmt_txrx_utils_api.h"
|
||||
|
||||
/* Number of dev type: Direct attach and Offload */
|
||||
#define MAX_DEV_TYPE 2
|
||||
@@ -83,7 +84,8 @@ struct wlan_lmac_if_mgmt_txrx_rx_ops {
|
||||
void *tx_compl_params);
|
||||
QDF_STATUS (*mgmt_rx_frame_handler)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
qdf_nbuf_t buf, void *params);
|
||||
qdf_nbuf_t buf,
|
||||
struct mgmt_rx_event_params *mgmt_rx_params);
|
||||
qdf_nbuf_t (*mgmt_txrx_get_nbuf_from_desc_id)(
|
||||
struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t desc_id);
|
||||
|
@@ -42,6 +42,7 @@
|
||||
#include "htc_api.h"
|
||||
#include "wmi_unified_param.h"
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include "wlan_mgmt_txrx_utils_api.h"
|
||||
|
||||
typedef qdf_nbuf_t wmi_buf_t;
|
||||
#define wmi_buf_data(_buf) qdf_nbuf_data(_buf)
|
||||
@@ -1197,7 +1198,7 @@ QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *vdev_map, uint32_t **tbttoffset_list);
|
||||
|
||||
QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp);
|
||||
struct mgmt_rx_event_params *hdr, uint8_t **bufp);
|
||||
|
||||
QDF_STATUS wmi_extract_vdev_stopped_param(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *vdev_id);
|
||||
|
@@ -1021,7 +1021,7 @@ QDF_STATUS (*extract_tbttoffset_update_params)(void *wmi_hdl, void *evt_buf,
|
||||
uint32_t *vdev_map, uint32_t **tbttoffset_list);
|
||||
|
||||
QDF_STATUS (*extract_mgmt_rx_params)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp);
|
||||
struct mgmt_rx_event_params *hdr, uint8_t **bufp);
|
||||
|
||||
QDF_STATUS (*extract_vdev_stopped_param)(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, uint32_t *vdev_id);
|
||||
|
@@ -5314,7 +5314,7 @@ QDF_STATUS wmi_extract_tbttoffset_update_params(void *wmi_hdl, void *evt_buf,
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_extract_mgmt_rx_params(void *wmi_hdl, void *evt_buf,
|
||||
wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
|
||||
struct mgmt_rx_event_params *hdr, uint8_t **bufp)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
|
@@ -5939,7 +5939,7 @@ QDF_STATUS extract_tbttoffset_update_params_non_tlv(void *wmi_hdl,
|
||||
*/
|
||||
static QDF_STATUS extract_mgmt_rx_params_non_tlv(wmi_unified_t wmi_handle,
|
||||
void *evt_buf,
|
||||
wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
|
||||
struct mgmt_rx_event_params *hdr, uint8_t **bufp)
|
||||
{
|
||||
wmi_mgmt_rx_event *ev = (wmi_mgmt_rx_event *)evt_buf;
|
||||
|
||||
|
@@ -12365,7 +12365,8 @@ static QDF_STATUS extract_tbttoffset_update_params_tlv(void *wmi_hdl,
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
static QDF_STATUS extract_mgmt_rx_params_tlv(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, wmi_host_mgmt_rx_hdr *hdr, uint8_t **bufp)
|
||||
void *evt_buf, struct mgmt_rx_event_params *hdr,
|
||||
uint8_t **bufp)
|
||||
{
|
||||
WMI_MGMT_RX_EVENTID_param_tlvs *param_tlvs = NULL;
|
||||
wmi_mgmt_rx_hdr *ev_hdr = NULL;
|
||||
|
Reference in New Issue
Block a user