qcacmn: Beacon to replace a probe response
Cancel broadcast of probe response if beacon is already sent in beacon offload. Change-Id: I4fea51433fbb959e05988c2daac89fbe839b1cdf CRs-Fixed: 2209282
This commit is contained in:
@@ -660,9 +660,24 @@ struct cdp_soc_t {
|
||||
* cdp_pdev_param_type: different types of parameters
|
||||
* to set values in pdev
|
||||
* @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature
|
||||
* @CDP_CONFIG_BPR_ENABLE: Enable bcast probe feature
|
||||
*/
|
||||
enum cdp_pdev_param_type {
|
||||
CDP_CONFIG_DEBUG_SNIFFER,
|
||||
CDP_CONFIG_BPR_ENABLE,
|
||||
};
|
||||
|
||||
/*
|
||||
* enum cdp_pdev_bpr_param - different types of parameters
|
||||
* to set value in pdev
|
||||
* @CDP_BPR_DISABLE: Set bpr to disable state
|
||||
* @CDP_BPR_ENABLE: set bpr to enable state
|
||||
*
|
||||
* Enum indicating bpr state to enable/disable.
|
||||
*/
|
||||
enum cdp_pdev_bpr_param {
|
||||
CDP_BPR_DISABLE,
|
||||
CDP_BPR_ENABLE,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -2179,7 +2179,8 @@ dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv(struct dp_pdev *pdev,
|
||||
{
|
||||
uint32_t *nbuf_ptr;
|
||||
|
||||
if ((!pdev->tx_sniffer_enable) && (!pdev->mcopy_mode))
|
||||
if ((!pdev->tx_sniffer_enable) && (!pdev->mcopy_mode) &&
|
||||
(!pdev->bpr_enable))
|
||||
return;
|
||||
|
||||
if (qdf_nbuf_pull_head(tag_buf, HTT_MGMT_CTRL_TLV_RESERVERD_LEN + 4)
|
||||
@@ -2189,10 +2190,16 @@ dp_process_ppdu_stats_tx_mgmtctrl_payload_tlv(struct dp_pdev *pdev,
|
||||
nbuf_ptr = (uint32_t *)qdf_nbuf_push_head(
|
||||
tag_buf, sizeof(ppdu_id));
|
||||
*nbuf_ptr = ppdu_id;
|
||||
|
||||
dp_wdi_event_handler(WDI_EVENT_TX_MGMT_CTRL, pdev->soc,
|
||||
tag_buf, HTT_INVALID_PEER,
|
||||
WDI_NO_VAL, pdev->pdev_id);
|
||||
if (pdev->bpr_enable) {
|
||||
dp_wdi_event_handler(WDI_EVENT_TX_BEACON, pdev->soc,
|
||||
tag_buf, HTT_INVALID_PEER,
|
||||
WDI_NO_VAL, pdev->pdev_id);
|
||||
}
|
||||
if (pdev->tx_sniffer_enable || pdev->mcopy_mode) {
|
||||
dp_wdi_event_handler(WDI_EVENT_TX_MGMT_CTRL, pdev->soc,
|
||||
tag_buf, HTT_INVALID_PEER,
|
||||
WDI_NO_VAL, pdev->pdev_id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -96,6 +96,15 @@ qdf_declare_param(rx_hash, bool);
|
||||
#define DP_PPDU_STATS_CFG_ENH_STATS 0xE67
|
||||
/* PPDU stats mask sent to FW to support debug sniffer feature */
|
||||
#define DP_PPDU_STATS_CFG_SNIFFER 0x2FFF
|
||||
/* PPDU stats mask sent to FW to support BPR feature*/
|
||||
#define DP_PPDU_STATS_CFG_BPR 0x2000
|
||||
/* PPDU stats mask sent to FW to support BPR and enhanced stats feature */
|
||||
#define DP_PPDU_STATS_CFG_BPR_ENH (DP_PPDU_STATS_CFG_BPR | \
|
||||
DP_PPDU_STATS_CFG_ENH_STATS)
|
||||
/* PPDU stats mask sent to FW to support BPR and pcktlog stats feature */
|
||||
#define DP_PPDU_STATS_CFG_BPR_PKTLOG (DP_PPDU_STATS_CFG_BPR | \
|
||||
DP_PPDU_TXLITE_STATS_BITMASK_CFG)
|
||||
|
||||
/**
|
||||
* default_dscp_tid_map - Default DSCP-TID mapping
|
||||
*
|
||||
@@ -5966,6 +5975,56 @@ dp_ppdu_ring_cfg(struct dp_pdev *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*dp_set_bpr_enable() - API to enable/disable bpr feature
|
||||
*@pdev_handle: DP_PDEV handle.
|
||||
*@val: Provided value.
|
||||
*
|
||||
*Return: void
|
||||
*/
|
||||
static void
|
||||
dp_set_bpr_enable(struct cdp_pdev *pdev_handle, int val)
|
||||
{
|
||||
struct dp_pdev *pdev = (struct dp_pdev *)pdev_handle;
|
||||
|
||||
switch (val) {
|
||||
case CDP_BPR_DISABLE:
|
||||
pdev->bpr_enable = CDP_BPR_DISABLE;
|
||||
if (!pdev->pktlog_ppdu_stats && !pdev->enhanced_stats_en &&
|
||||
!pdev->tx_sniffer_enable && !pdev->mcopy_mode) {
|
||||
dp_h2t_cfg_stats_msg_send(pdev, 0, pdev->pdev_id);
|
||||
} else if (pdev->enhanced_stats_en &&
|
||||
!pdev->tx_sniffer_enable && !pdev->mcopy_mode &&
|
||||
!pdev->pktlog_ppdu_stats) {
|
||||
dp_h2t_cfg_stats_msg_send(pdev,
|
||||
DP_PPDU_STATS_CFG_ENH_STATS,
|
||||
pdev->pdev_id);
|
||||
}
|
||||
break;
|
||||
case CDP_BPR_ENABLE:
|
||||
pdev->bpr_enable = CDP_BPR_ENABLE;
|
||||
if (!pdev->enhanced_stats_en && !pdev->tx_sniffer_enable &&
|
||||
!pdev->mcopy_mode && !pdev->pktlog_ppdu_stats) {
|
||||
dp_h2t_cfg_stats_msg_send(pdev,
|
||||
DP_PPDU_STATS_CFG_BPR,
|
||||
pdev->pdev_id);
|
||||
} else if (pdev->enhanced_stats_en &&
|
||||
!pdev->tx_sniffer_enable && !pdev->mcopy_mode &&
|
||||
!pdev->pktlog_ppdu_stats) {
|
||||
dp_h2t_cfg_stats_msg_send(pdev,
|
||||
DP_PPDU_STATS_CFG_BPR_ENH,
|
||||
pdev->pdev_id);
|
||||
} else if (pdev->pktlog_ppdu_stats) {
|
||||
dp_h2t_cfg_stats_msg_send(pdev,
|
||||
DP_PPDU_STATS_CFG_BPR_PKTLOG,
|
||||
pdev->pdev_id);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_config_debug_sniffer()- API to enable/disable debug sniffer
|
||||
* @pdev_handle: DP_PDEV handle
|
||||
@@ -6132,6 +6191,7 @@ dp_get_htt_stats(struct cdp_pdev *pdev_handle, void *data, uint32_t data_len)
|
||||
req->config_param2, req->config_param3,
|
||||
req->cookie, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* dp_set_pdev_param: function to set parameters in pdev
|
||||
* @pdev_handle: DP pdev handle
|
||||
@@ -6147,6 +6207,9 @@ static void dp_set_pdev_param(struct cdp_pdev *pdev_handle,
|
||||
case CDP_CONFIG_DEBUG_SNIFFER:
|
||||
dp_config_debug_sniffer(pdev_handle, val);
|
||||
break;
|
||||
case CDP_CONFIG_BPR_ENABLE:
|
||||
dp_set_bpr_enable(pdev_handle, val);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -1151,7 +1151,7 @@ struct dp_pdev {
|
||||
bool tx_sniffer_enable;
|
||||
/* mirror copy mode */
|
||||
bool mcopy_mode;
|
||||
|
||||
bool bpr_enable;
|
||||
struct {
|
||||
uint16_t tx_ppdu_id;
|
||||
uint16_t tx_peer_id;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018 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
|
||||
@@ -142,6 +142,18 @@ static inline int32_t qdf_atomic_inc_return(qdf_atomic_t *v)
|
||||
return __qdf_atomic_inc_return(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_atomic_dec_return() - return the decremented value of an atomic
|
||||
* variable
|
||||
* @v: A pointer to an opaque atomic variable
|
||||
*
|
||||
* Return: The current value of the variable
|
||||
*/
|
||||
static inline int32_t qdf_atomic_dec_return(qdf_atomic_t *v)
|
||||
{
|
||||
return __qdf_atomic_dec_return(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* qdf_atomic_set_bit - Atomically set a bit in memory
|
||||
* @nr: bit to set
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2018 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
|
||||
@@ -135,6 +135,18 @@ static inline int32_t __qdf_atomic_inc_return(__qdf_atomic_t *v)
|
||||
return atomic_inc_return(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_atomic_dec_return() - return the decremented value of an atomic
|
||||
* variable
|
||||
* @v: A pointer to an opaque atomic variable
|
||||
*
|
||||
* Return: The current value of the variable
|
||||
*/
|
||||
static inline int32_t __qdf_atomic_dec_return(__qdf_atomic_t *v)
|
||||
{
|
||||
return atomic_dec_return(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* __qdf_atomic_set_bit - Atomically set a bit in memory
|
||||
* @nr: bit to set
|
||||
|
Reference in New Issue
Block a user