qcacld-3.0: Add INI to configure MGMT frame HW retry count
Add INI - mgmt_frame_hw_tx_retry_count to configure MGMT frame HW tx retry count for certain frame types. The INI String format: frame_hw_tx_retry_count="<frame type>,<retry count>,..." The supported frame types are defined by enum mlme_cfg_frame_type. Retry count max value is 127. For example: mgmt_frame_hw_tx_retry_count="0,64,2,32" The above input string means: For p2p go negotiation request fame, hw retry count 64 For p2p provision discovery request, hw retry count 32 Change-Id: I32f6c7d83ede9b28484c7a0b29824bde32e06422 CRs-Fixed: 3082532
This commit is contained in:

committed by
Madan Koyyalamudi

vanhempi
b93d2939d0
commit
a185d29d1b
@@ -35,6 +35,7 @@
|
||||
#include "wlan_p2p_off_chan_tx.h"
|
||||
#include "wlan_osif_request_manager.h"
|
||||
#include <wlan_mlme_main.h>
|
||||
#include "wlan_mlme_api.h"
|
||||
|
||||
/**
|
||||
* p2p_psoc_get_tx_ops() - get p2p tx ops
|
||||
@@ -1051,6 +1052,71 @@ static QDF_STATUS p2p_send_tx_conf(struct tx_action_context *tx_ctx,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* p2p_get_hw_retry_count() - Get hw tx retry count from config store
|
||||
* @psoc: psoc object
|
||||
* @tx_ctx: tx context
|
||||
*
|
||||
* This function return the hw tx retry count for p2p action frame.
|
||||
* 0 value means target will use fw default mgmt tx retry count 15.
|
||||
*
|
||||
* Return: frame hw tx retry count
|
||||
*/
|
||||
static uint8_t p2p_get_hw_retry_count(struct wlan_objmgr_psoc *psoc,
|
||||
struct tx_action_context *tx_ctx)
|
||||
{
|
||||
if (tx_ctx->frame_info.type != P2P_FRAME_MGMT)
|
||||
return 0;
|
||||
|
||||
if (tx_ctx->frame_info.sub_type != P2P_MGMT_ACTION)
|
||||
return 0;
|
||||
|
||||
switch (tx_ctx->frame_info.public_action_type) {
|
||||
case P2P_PUBLIC_ACTION_NEG_REQ:
|
||||
return wlan_mlme_get_mgmt_hw_tx_retry_count(
|
||||
psoc,
|
||||
CFG_GO_NEGOTIATION_REQ_FRAME_TYPE);
|
||||
case P2P_PUBLIC_ACTION_INVIT_REQ:
|
||||
return wlan_mlme_get_mgmt_hw_tx_retry_count(
|
||||
psoc,
|
||||
CFG_P2P_INVITATION_REQ_FRAME_TYPE);
|
||||
case P2P_PUBLIC_ACTION_PROV_DIS_REQ:
|
||||
return wlan_mlme_get_mgmt_hw_tx_retry_count(
|
||||
psoc,
|
||||
CFG_PROVISION_DISCOVERY_REQ_FRAME_TYPE);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#define GET_HW_RETRY_LIMIT(count) QDF_GET_BITS(count, 0, 4)
|
||||
#define GET_HW_RETRY_LIMIT_EXT(count) QDF_GET_BITS(count, 4, 3)
|
||||
|
||||
/**
|
||||
* p2p_mgmt_set_hw_retry_count() - Set mgmt hw tx retry count
|
||||
* @psoc: psoc object
|
||||
* @tx_ctx: tx context
|
||||
* @mgmt_param: mgmt frame tx parameter
|
||||
*
|
||||
* This function will set mgmt frame hw tx retry count to tx parameter
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
p2p_mgmt_set_hw_retry_count(struct wlan_objmgr_psoc *psoc,
|
||||
struct tx_action_context *tx_ctx,
|
||||
struct wmi_mgmt_params *mgmt_param)
|
||||
{
|
||||
uint8_t retry_count = p2p_get_hw_retry_count(psoc, tx_ctx);
|
||||
|
||||
mgmt_param->tx_param.retry_limit = GET_HW_RETRY_LIMIT(retry_count);
|
||||
mgmt_param->tx_param.retry_limit_ext =
|
||||
GET_HW_RETRY_LIMIT_EXT(retry_count);
|
||||
if (mgmt_param->tx_param.retry_limit ||
|
||||
mgmt_param->tx_param.retry_limit_ext)
|
||||
mgmt_param->tx_params_valid = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* p2p_mgmt_tx() - call mgmt tx api
|
||||
* @tx_ctx: tx context
|
||||
@@ -1102,6 +1168,7 @@ static QDF_STATUS p2p_mgmt_tx(struct tx_action_context *tx_ctx,
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_P2P_ID);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
p2p_mgmt_set_hw_retry_count(psoc, tx_ctx, &mgmt_param);
|
||||
|
||||
wh = (struct wlan_frame_hdr *)frame;
|
||||
mac_addr = wh->i_addr1;
|
||||
@@ -1135,8 +1202,12 @@ static QDF_STATUS p2p_mgmt_tx(struct tx_action_context *tx_ctx,
|
||||
tx_ota_comp_cb = tgt_p2p_mgmt_ota_comp_cb;
|
||||
}
|
||||
|
||||
p2p_debug("length:%d, chanfreq:%d", mgmt_param.frm_len,
|
||||
mgmt_param.chanfreq);
|
||||
p2p_debug("length:%d, chanfreq:%d retry count:%d(%d, %d)",
|
||||
mgmt_param.frm_len, mgmt_param.chanfreq,
|
||||
(mgmt_param.tx_param.retry_limit_ext << 4) |
|
||||
mgmt_param.tx_param.retry_limit,
|
||||
mgmt_param.tx_param.retry_limit,
|
||||
mgmt_param.tx_param.retry_limit_ext);
|
||||
|
||||
tx_ctx->nbuf = packet;
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user