Merge "qcacmn: Send val of separate iface support for NAN INI to Fw"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
f91621de73
@@ -2215,6 +2215,7 @@ enum cdp_dp_cfg {
|
||||
cfg_dp_reorder_offload_supported,
|
||||
cfg_dp_ce_classify_enable,
|
||||
cfg_dp_disable_intra_bss_fwd,
|
||||
cfg_dp_pktlog_buffer_size,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -316,6 +316,7 @@ struct txrx_pdev_cfg_param_t {
|
||||
uint16_t bundle_timer_value;
|
||||
uint16_t bundle_size;
|
||||
#endif
|
||||
uint8_t pktlog_buffer_size;
|
||||
};
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
@@ -9943,6 +9943,9 @@ static uint32_t dp_get_cfg(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg)
|
||||
case cfg_dp_disable_intra_bss_fwd:
|
||||
value = dpsoc->wlan_cfg_ctx->disable_intra_bss_fwd;
|
||||
break;
|
||||
case cfg_dp_pktlog_buffer_size:
|
||||
value = dpsoc->wlan_cfg_ctx->pktlog_buffer_size;
|
||||
break;
|
||||
default:
|
||||
value = 0;
|
||||
}
|
||||
|
@@ -585,10 +585,14 @@ static void pktlog_callback_registration(uint8_t callback_type)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define ONE_MEGABYTE (1024 * 1024)
|
||||
|
||||
void pktlog_init(struct hif_opaque_softc *scn)
|
||||
{
|
||||
struct pktlog_dev_t *pl_dev = get_pktlog_handle();
|
||||
struct ath_pktlog_info *pl_info;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
uint32_t buff_size;
|
||||
|
||||
if (!pl_dev || !pl_dev->pl_info) {
|
||||
qdf_print("pl_dev or pl_info is invalid");
|
||||
@@ -601,7 +605,9 @@ void pktlog_init(struct hif_opaque_softc *scn)
|
||||
PKTLOG_LOCK_INIT(pl_info);
|
||||
mutex_init(&pl_info->pktlog_mutex);
|
||||
|
||||
pl_info->buf_size = PKTLOG_DEFAULT_BUFSIZE;
|
||||
buff_size = cdp_cfg_get(soc, cfg_dp_pktlog_buffer_size) * ONE_MEGABYTE;
|
||||
|
||||
pl_info->buf_size = (buff_size ? buff_size : ONE_MEGABYTE);
|
||||
pl_info->buf = NULL;
|
||||
pl_info->log_state = 0;
|
||||
pl_info->init_saved_state = 0;
|
||||
@@ -780,14 +786,14 @@ int pktlog_enable(struct hif_opaque_softc *scn, int32_t log_state,
|
||||
return err;
|
||||
}
|
||||
|
||||
#define ONE_MEGABYTE (1024 * 1024)
|
||||
#define MAX_ALLOWED_PKTLOG_SIZE (64 * ONE_MEGABYTE)
|
||||
|
||||
static int __pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
|
||||
{
|
||||
struct pktlog_dev_t *pl_dev;
|
||||
struct ath_pktlog_info *pl_info;
|
||||
uint8_t pdev_id = WMI_PDEV_ID_SOC;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
uint32_t buff_size;
|
||||
uint32_t max_allowed_buff_size;
|
||||
|
||||
pl_dev = get_pktlog_handle();
|
||||
|
||||
@@ -815,10 +821,13 @@ static int __pktlog_setsize(struct hif_opaque_softc *scn, int32_t size)
|
||||
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_IN_PROGRESS;
|
||||
|
||||
if (size < ONE_MEGABYTE || size > MAX_ALLOWED_PKTLOG_SIZE) {
|
||||
buff_size = cdp_cfg_get(soc, cfg_dp_pktlog_buffer_size) * ONE_MEGABYTE;
|
||||
max_allowed_buff_size = (buff_size ? buff_size : ONE_MEGABYTE);
|
||||
|
||||
if (size < ONE_MEGABYTE || size > max_allowed_buff_size) {
|
||||
qdf_print("%s: Cannot Set Pktlog Buffer size of %d bytes.Min required is %d MB and Max allowed is %d MB.",
|
||||
__func__, size, (ONE_MEGABYTE / ONE_MEGABYTE),
|
||||
(MAX_ALLOWED_PKTLOG_SIZE / ONE_MEGABYTE));
|
||||
(max_allowed_buff_size / ONE_MEGABYTE));
|
||||
pl_info->curr_pkt_state = PKTLOG_OPR_NOT_IN_PROGRESS;
|
||||
qdf_print("%s: Invalid requested buff size", __func__);
|
||||
return -EINVAL;
|
||||
|
@@ -316,6 +316,10 @@
|
||||
#define WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE_MIN 1
|
||||
#define WLAN_CFG_RX_FLOW_SEARCH_TABLE_SIZE_MAX 16384
|
||||
|
||||
#define WLAN_CFG_PKTLOG_BUFFER_SIZE 10
|
||||
#define WLAN_CFG_PKTLOG_MIN_BUFFER_SIZE 1
|
||||
#define WLAN_CFG_PKTLOG_MAX_BUFFER_SIZE 10
|
||||
|
||||
/* DP INI Declerations */
|
||||
#define CFG_DP_HTT_PACKET_TYPE \
|
||||
CFG_INI_UINT("dp_htt_packet_type", \
|
||||
@@ -781,6 +785,13 @@
|
||||
#define CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL
|
||||
#endif /* WLAN_FEATURE_PKT_CAPTURE */
|
||||
|
||||
#define CFG_DP_PKTLOG_BUFFER_SIZE \
|
||||
CFG_INI_UINT("PktlogBufSize", \
|
||||
WLAN_CFG_PKTLOG_MIN_BUFFER_SIZE, \
|
||||
WLAN_CFG_PKTLOG_MAX_BUFFER_SIZE, \
|
||||
WLAN_CFG_PKTLOG_BUFFER_SIZE, \
|
||||
CFG_VALUE_OR_DEFAULT, "Packet Log buffer size")
|
||||
|
||||
#define CFG_DP \
|
||||
CFG(CFG_DP_HTT_PACKET_TYPE) \
|
||||
CFG(CFG_DP_INT_BATCH_THRESHOLD_OTHER) \
|
||||
@@ -852,6 +863,7 @@
|
||||
CFG(CFG_DP_RX_FLOW_SEARCH_TABLE_PER_PDEV) \
|
||||
CFG(CFG_DP_RX_MON_PROTOCOL_FLOW_TAG_ENABLE) \
|
||||
CFG(CFG_DP_RXDMA_MONITOR_RX_DROP_THRESHOLD) \
|
||||
CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL
|
||||
CFG_DP_CONFIG_PKT_CAPTURE_MODE_ALL \
|
||||
CFG(CFG_DP_PKTLOG_BUFFER_SIZE)
|
||||
|
||||
#endif /* _CFG_DP_H_ */
|
||||
|
@@ -481,6 +481,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
|
||||
cfg_get(psoc, CFG_DP_INT_BATCH_THRESHOLD_OTHER);
|
||||
wlan_cfg_ctx->int_timer_threshold_other =
|
||||
cfg_get(psoc, CFG_DP_INT_TIMER_THRESHOLD_OTHER);
|
||||
wlan_cfg_ctx->pktlog_buffer_size =
|
||||
cfg_get(psoc, CFG_DP_PKTLOG_BUFFER_SIZE);
|
||||
|
||||
/* This is default mapping and can be overridden by HW config
|
||||
* received from FW */
|
||||
|
@@ -179,6 +179,7 @@ struct wlan_srng_cfg {
|
||||
* @rx_flow_max_search: max skid length for each hash entry
|
||||
* @rx_toeplitz_hash_key: toeplitz key pointer used for hash computation over
|
||||
* 5 tuple flow entry
|
||||
* @pktlog_buffer_size: packet log buffer size
|
||||
*/
|
||||
struct wlan_cfg_dp_soc_ctxt {
|
||||
int num_int_ctxts;
|
||||
@@ -274,6 +275,7 @@ struct wlan_cfg_dp_soc_ctxt {
|
||||
uint16_t rx_flow_search_table_size;
|
||||
uint16_t rx_flow_max_search;
|
||||
uint8_t *rx_toeplitz_hash_key;
|
||||
uint8_t pktlog_buffer_size;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -4548,6 +4548,10 @@ typedef enum {
|
||||
wmi_mgmt_offload_data_event_id,
|
||||
wmi_pdev_multi_vdev_restart_response_event_id,
|
||||
wmi_roam_pmkid_request_event_id,
|
||||
#ifdef FEATURE_WLAN_TIME_SYNC_FTM
|
||||
wmi_wlan_time_sync_ftm_start_stop_event_id,
|
||||
wmi_wlan_time_sync_q_master_slave_offset_eventid,
|
||||
#endif
|
||||
wmi_events_max,
|
||||
} wmi_conv_event_id;
|
||||
|
||||
@@ -5187,6 +5191,7 @@ struct wmi_host_fw_abi_ver {
|
||||
* @ast_3_flow_mask_enable: mask to enable flow support for ast index 3
|
||||
* @ast_tid_high_mask_enable: enable tid valid mask for high priority flow
|
||||
* @ast_tid_low_mask_enable: enable tid valid mask for low priority flow
|
||||
* @nan_separate_iface_support: Separate iface creation for NAN
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t num_vdevs;
|
||||
@@ -5283,6 +5288,7 @@ typedef struct {
|
||||
ast_3_flow_mask_enable:4,
|
||||
ast_tid_high_mask_enable:8,
|
||||
ast_tid_low_mask_enable:8;
|
||||
bool nan_separate_iface_support;
|
||||
} target_resource_config;
|
||||
|
||||
/**
|
||||
|
@@ -6870,6 +6870,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
||||
WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(
|
||||
resource_cfg->msdu_flow_override_config1,
|
||||
tgt_res_cfg->ast_tid_low_mask_enable);
|
||||
WMI_RSRC_CFG_HOST_SERVICE_FLAG_NAN_IFACE_SUPPORT_SET(
|
||||
resource_cfg->host_service_flags,
|
||||
tgt_res_cfg->nan_separate_iface_support);
|
||||
|
||||
}
|
||||
|
||||
/* copy_hw_mode_id_in_init_cmd() - Helper routine to copy hw_mode in init cmd
|
||||
@@ -13747,6 +13751,12 @@ static void populate_tlv_events_id(uint32_t *event_ids)
|
||||
WMI_PDEV_MULTIPLE_VDEV_RESTART_RESP_EVENTID;
|
||||
event_ids[wmi_roam_pmkid_request_event_id] =
|
||||
WMI_ROAM_PMKID_REQUEST_EVENTID;
|
||||
#ifdef FEATURE_WLAN_TIME_SYNC_FTM
|
||||
event_ids[wmi_wlan_time_sync_ftm_start_stop_event_id] =
|
||||
WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID;
|
||||
event_ids[wmi_wlan_time_sync_q_master_slave_offset_eventid] =
|
||||
WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user