From 273407908fd2b7d55fb7af7cfa749d167b521f9f Mon Sep 17 00:00:00 2001 From: Radha krishna Simha Jiguru Date: Thu, 6 Sep 2018 15:08:12 +0530 Subject: [PATCH 01/14] qcacmn: Add AST type to distinquish bss on STA When a BSS peer gets associated with vap configured in sta mode, the ast type associated with that entry should be different from that of regular static entries, The reason being bridge on root AP can pick up the mac address of AP VAP. Change-Id: Ie322a015d883e2712f41623f71ccbc255b99baf3 --- dp/inc/cdp_txrx_cmn_struct.h | 1 + dp/wifi3.0/dp_main.c | 21 +++++++++++++-------- dp/wifi3.0/dp_peer.c | 8 ++++++-- dp/wifi3.0/dp_rx.h | 3 ++- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 5e5e681183..4f34b2a266 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -312,6 +312,7 @@ enum cdp_txrx_ast_entry_type { CDP_TXRX_AST_TYPE_WDS, /* WDS peer ast entry type*/ CDP_TXRX_AST_TYPE_MEC, /* Multicast echo ast entry type */ CDP_TXRX_AST_TYPE_WDS_HM, /* HM WDS entry */ + CDP_TXRX_AST_TYPE_STA_BSS, /* BSS entry(STA mode) */ CDP_TXRX_AST_TYPE_MAX }; diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index e7815ca5d4..e1724db05e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -517,7 +517,8 @@ static void dp_wds_reset_ast_wifi3(struct cdp_soc_t *soc_hdl, if (ast_entry) { if ((ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) && - (ast_entry->type != CDP_TXRX_AST_TYPE_SELF)) { + (ast_entry->type != CDP_TXRX_AST_TYPE_SELF) && + (ast_entry->type != CDP_TXRX_AST_TYPE_STA_BSS)) { ast_entry->is_active = TRUE; } } @@ -550,9 +551,11 @@ static void dp_wds_reset_ast_table_wifi3(struct cdp_soc_t *soc_hdl, DP_VDEV_ITERATE_PEER_LIST(vdev, peer) { DP_PEER_ITERATE_ASE_LIST(peer, ase, temp_ase) { if ((ase->type == - CDP_TXRX_AST_TYPE_STATIC) || - (ase->type == - CDP_TXRX_AST_TYPE_SELF)) + CDP_TXRX_AST_TYPE_STATIC) || + (ase->type == + CDP_TXRX_AST_TYPE_SELF) || + (ase->type == + CDP_TXRX_AST_TYPE_STA_BSS)) continue; ase->is_active = TRUE; } @@ -588,9 +591,11 @@ static void dp_wds_flush_ast_table_wifi3(struct cdp_soc_t *soc_hdl) DP_VDEV_ITERATE_PEER_LIST(vdev, peer) { DP_PEER_ITERATE_ASE_LIST(peer, ase, temp_ase) { if ((ase->type == - CDP_TXRX_AST_TYPE_STATIC) || - (ase->type == - CDP_TXRX_AST_TYPE_SELF)) + CDP_TXRX_AST_TYPE_STATIC) || + (ase->type == + CDP_TXRX_AST_TYPE_SELF) || + (ase->type == + CDP_TXRX_AST_TYPE_STA_BSS)) continue; dp_peer_del_ast(soc, ase); } @@ -867,7 +872,7 @@ static void dp_print_ast_stats(struct dp_soc *soc) struct dp_peer *peer; struct dp_ast_entry *ase, *tmp_ase; char type[CDP_TXRX_AST_TYPE_MAX][10] = { - "NONE", "STATIC", "SELF", "WDS", "MEC", "HMWDS"}; + "NONE", "STATIC", "SELF", "WDS", "MEC", "HMWDS", "BSS"}; DP_PRINT_STATS("AST Stats:"); DP_PRINT_STATS(" Entries Added = %d", soc->stats.ast.added); diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c index 448a0bc398..6c5c6f75e2 100644 --- a/dp/wifi3.0/dp_peer.c +++ b/dp/wifi3.0/dp_peer.c @@ -515,6 +515,8 @@ int dp_peer_add_ast(struct dp_soc *soc, case CDP_TXRX_AST_TYPE_STATIC: peer->self_ast_entry = ast_entry; ast_entry->type = CDP_TXRX_AST_TYPE_STATIC; + if (peer->vdev->opmode == wlan_op_mode_sta) + ast_entry->type = CDP_TXRX_AST_TYPE_STA_BSS; break; case CDP_TXRX_AST_TYPE_SELF: peer->self_ast_entry = ast_entry; @@ -549,7 +551,8 @@ int dp_peer_add_ast(struct dp_soc *soc, qdf_mem_copy(next_node_mac, peer->mac_addr.raw, 6); if ((ast_entry->type != CDP_TXRX_AST_TYPE_STATIC) && - (ast_entry->type != CDP_TXRX_AST_TYPE_SELF)) { + (ast_entry->type != CDP_TXRX_AST_TYPE_SELF) && + (ast_entry->type != CDP_TXRX_AST_TYPE_STA_BSS)) { if (QDF_STATUS_SUCCESS == soc->cdp_soc.ol_ops->peer_add_wds_entry( peer->vdev->osif_vdev, @@ -630,7 +633,8 @@ int dp_peer_update_ast(struct dp_soc *soc, struct dp_peer *peer, struct dp_peer *old_peer; if ((ast_entry->type == CDP_TXRX_AST_TYPE_STATIC) || - (ast_entry->type == CDP_TXRX_AST_TYPE_SELF)) + (ast_entry->type == CDP_TXRX_AST_TYPE_SELF) || + (ast_entry->type == CDP_TXRX_AST_TYPE_STA_BSS)) return 0; old_peer = ast_entry->peer; diff --git a/dp/wifi3.0/dp_rx.h b/dp/wifi3.0/dp_rx.h index d51f8d5f8c..099a81fc96 100644 --- a/dp/wifi3.0/dp_rx.h +++ b/dp/wifi3.0/dp_rx.h @@ -464,7 +464,8 @@ dp_rx_wds_srcport_learn(struct dp_soc *soc, sa_peer = ast->peer; if ((ast->type != CDP_TXRX_AST_TYPE_STATIC) && - (ast->type != CDP_TXRX_AST_TYPE_SELF)) { + (ast->type != CDP_TXRX_AST_TYPE_SELF) && + (ast->type != CDP_TXRX_AST_TYPE_STA_BSS)) { if (ast->pdev_id != ta_peer->vdev->pdev->pdev_id) { ret = dp_peer_add_ast(soc, ta_peer, wds_src_mac, From 6ea211ef2b914699193a8f9eca8214e401f8e260 Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Mon, 17 Sep 2018 12:25:24 +0530 Subject: [PATCH 02/14] qcacmn: Update next_twt_size in TWT resume dialog command next_twt_size is introduced in TWT resume dialog command by FW to provide next TWT subfield size. Update this field in the TWT resume command. Change-Id: Id4e7aacfa2c4890e3b03de17402e7ea29f82826a CRs-Fixed: 2316475 --- wmi/src/wmi_unified_twt_tlv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wmi/src/wmi_unified_twt_tlv.c b/wmi/src/wmi_unified_twt_tlv.c index 17aaa68da9..45befcda38 100644 --- a/wmi/src/wmi_unified_twt_tlv.c +++ b/wmi/src/wmi_unified_twt_tlv.c @@ -238,6 +238,7 @@ static QDF_STATUS send_twt_resume_dialog_cmd_tlv(wmi_unified_t wmi_handle, WMI_CHAR_ARRAY_TO_MAC_ADDR(params->peer_macaddr, &cmd->peer_macaddr); cmd->dialog_id = params->dialog_id; cmd->sp_offset_us = params->sp_offset_us; + cmd->next_twt_size = params->next_twt_size; status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd), WMI_TWT_RESUME_DIALOG_CMDID); From fea1a84116453ab749acda4718cd106137de1938 Mon Sep 17 00:00:00 2001 From: "Ruchi, Agrawal" Date: Wed, 29 Aug 2018 12:14:41 +0530 Subject: [PATCH 03/14] qcacmn: DSCP-TID map change for second hardware Change to added entries for 48 DSCP TID map for second version of hardware. Change-Id: Ie4aa0e27616e2f03b012e19d025444c8c53fe341 CRs-Fixed: 2315305 --- dp/wifi3.0/dp_main.c | 34 ++++++++++++++++++++------- dp/wifi3.0/dp_tx.c | 2 +- dp/wifi3.0/dp_types.h | 3 +++ hal/wifi3.0/hal_tx.h | 1 + hal/wifi3.0/qca8074v2/hal_8074v2_tx.h | 2 +- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index e1724db05e..638fd1486e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2623,14 +2623,21 @@ static inline void dp_dscp_tid_map_setup(struct dp_pdev *pdev) { uint8_t map_id; + struct dp_soc *soc = pdev->soc; + + if (!soc) + return; + for (map_id = 0; map_id < DP_MAX_TID_MAPS; map_id++) { - qdf_mem_copy(pdev->dscp_tid_map[map_id], default_dscp_tid_map, - sizeof(default_dscp_tid_map)); + qdf_mem_copy(pdev->dscp_tid_map[map_id], + default_dscp_tid_map, + sizeof(default_dscp_tid_map)); } - for (map_id = 0; map_id < HAL_MAX_HW_DSCP_TID_MAPS; map_id++) { - hal_tx_set_dscp_tid_map(pdev->soc->hal_soc, - pdev->dscp_tid_map[map_id], - map_id); + + for (map_id = 0; map_id < soc->num_hw_dscp_tid_map; map_id++) { + hal_tx_set_dscp_tid_map(soc->hal_soc, + default_dscp_tid_map, + map_id); } } @@ -7048,11 +7055,17 @@ static void dp_set_pdev_dscp_tid_map_wifi3(struct cdp_pdev *pdev_handle, { uint8_t dscp; struct dp_pdev *pdev = (struct dp_pdev *) pdev_handle; + struct dp_soc *soc = pdev->soc; + + if (!soc) + return; + dscp = (tos >> DP_IP_DSCP_SHIFT) & DP_IP_DSCP_MASK; pdev->dscp_tid_map[map_id][dscp] = tid; - if (map_id < HAL_MAX_HW_DSCP_TID_MAPS) - hal_tx_update_dscp_tid(pdev->soc->hal_soc, tid, - map_id, dscp); + + if (map_id < soc->num_hw_dscp_tid_map) + hal_tx_update_dscp_tid(soc->hal_soc, tid, + map_id, dscp); return; } @@ -8198,6 +8211,8 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle, soc->hal_soc = hif_get_hal_handle(hif_handle); soc->htt_handle = htt_soc_attach(soc, ctrl_psoc, htc_handle, soc->hal_soc, qdf_osdev); + soc->num_hw_dscp_tid_map = HAL_MAX_HW_DSCP_TID_MAPS; + if (!soc->htt_handle) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR, FL("HTT attach failed")); @@ -8237,6 +8252,7 @@ void *dp_soc_attach_wifi3(void *ctrl_psoc, void *hif_handle, wlan_cfg_set_raw_mode_war(soc->wlan_cfg_ctx, false); soc->hw_nac_monitor_support = 1; soc->ast_override_support = 1; + soc->num_hw_dscp_tid_map = HAL_MAX_HW_DSCP_TID_V2_MAPS; break; default: qdf_print("%s: Unknown tgt type %d\n", __func__, target_type); diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index ae768f02d2..6ad04131f0 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1115,7 +1115,7 @@ static void dp_tx_classify_tid(struct dp_vdev *vdev, qdf_nbuf_t nbuf, DP_TX_TID_OVERRIDE(msdu_info, nbuf); - if (vdev->dscp_tid_map_id <= 1) + if (pdev->soc && vdev->dscp_tid_map_id < pdev->soc->num_hw_dscp_tid_map) return; /* for mesh packets don't do any classification */ diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 2f1043be68..7b56c175ae 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -697,6 +697,9 @@ struct dp_soc { /*ast override support in HW*/ bool ast_override_support; + /*number of hw dscp tid map*/ + uint8_t num_hw_dscp_tid_map; + /* Link descriptor memory banks */ struct { void *base_vaddr_unaligned; diff --git a/hal/wifi3.0/hal_tx.h b/hal/wifi3.0/hal_tx.h index 66839c6529..3f5d77c762 100644 --- a/hal/wifi3.0/hal_tx.h +++ b/hal/wifi3.0/hal_tx.h @@ -80,6 +80,7 @@ do { \ #define HAL_MAX_HW_DSCP_TID_MAPS 2 #define HAL_MAX_HW_DSCP_TID_MAPS_11AX 32 +#define HAL_MAX_HW_DSCP_TID_V2_MAPS 48 #define HTT_META_HEADER_LEN_BYTES 64 #define HAL_TX_EXT_DESC_WITH_META_DATA \ (HTT_META_HEADER_LEN_BYTES + HAL_TX_EXTENSION_DESC_LEN_BYTES) diff --git a/hal/wifi3.0/qca8074v2/hal_8074v2_tx.h b/hal/wifi3.0/qca8074v2/hal_8074v2_tx.h index b39ff9295d..9f2a22c1da 100644 --- a/hal/wifi3.0/qca8074v2/hal_8074v2_tx.h +++ b/hal/wifi3.0/qca8074v2/hal_8074v2_tx.h @@ -68,7 +68,7 @@ static void hal_tx_set_dscp_tid_map_8074v2(void *hal_soc, uint8_t *map, struct hal_soc *soc = (struct hal_soc *)hal_soc; - if (id >= HAL_MAX_HW_DSCP_TID_MAPS_11AX) + if (id >= HAL_MAX_HW_DSCP_TID_V2_MAPS) return; cmn_reg_addr = HWIO_TCL_R0_CONS_RING_CMN_CTRL_REG_ADDR( From aa6303e509923e9ffb381c3f9f3086aaec5c1cc5 Mon Sep 17 00:00:00 2001 From: Vivek Date: Wed, 12 Sep 2018 15:44:14 +0530 Subject: [PATCH 04/14] qcacmn: Make access to serialization timers atomic The serialization timers can be accessed from multiple contexts when adding and removing commands to/from the serialization queues. So the access to the serialization timers should be atomic to protect the same timers being used for multiple commands. The serialization timers are maintained per psoc and are protected with psoc timer locks. Also the serialization lock APIs are updated to take the lock object pointer as an argument Change-Id: Ibdb41818fde9318fca6bbc92a536858364639365 CRs-Fixed: 2313039 --- .../src/wlan_serialization_api.c | 20 ++++----- .../src/wlan_serialization_internal.c | 45 ++++++++++++------- .../src/wlan_serialization_main.c | 6 ++- .../src/wlan_serialization_non_scan.c | 11 ++--- .../src/wlan_serialization_scan.c | 11 ++--- .../src/wlan_serialization_utils.c | 39 +++++----------- .../src/wlan_serialization_utils_i.h | 21 ++++----- 7 files changed, 76 insertions(+), 77 deletions(-) diff --git a/umac/cmn_services/serialization/src/wlan_serialization_api.c b/umac/cmn_services/serialization/src/wlan_serialization_api.c index c8613cd3b2..379425a772 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_api.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_api.c @@ -617,7 +617,7 @@ wlan_serialization_non_scan_cmd_status( /* Look in the pdev non scan active queue */ queue = &pdev_q->active_list; - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); node = wlan_serialization_find_cmd( queue, WLAN_SER_MATCH_CMD_TYPE, @@ -641,7 +641,7 @@ wlan_serialization_non_scan_cmd_status( cmd_status = wlan_serialization_is_cmd_in_active_pending( cmd_in_active, cmd_in_pending); - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); ser_exit(); return cmd_status; @@ -813,7 +813,7 @@ wlan_serialization_vdev_scan_status(struct wlan_objmgr_vdev *vdev) pdev_q = &ser_pdev_obj->pdev_q[SER_PDEV_QUEUE_COMP_SCAN]; - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); cmd_in_active = wlan_serialization_is_cmd_in_vdev_list( @@ -826,7 +826,7 @@ wlan_serialization_vdev_scan_status(struct wlan_objmgr_vdev *vdev) status = wlan_serialization_is_cmd_in_active_pending( cmd_in_active, cmd_in_pending); - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); ser_exit(); return status; @@ -857,7 +857,7 @@ wlan_serialization_pdev_scan_status(struct wlan_objmgr_pdev *pdev) pdev_q = &ser_pdev_obj->pdev_q[SER_PDEV_QUEUE_COMP_SCAN]; - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); cmd_in_active = !qdf_list_empty(&pdev_q->active_list); cmd_in_pending = !qdf_list_empty(&pdev_q->pending_list); @@ -865,7 +865,7 @@ wlan_serialization_pdev_scan_status(struct wlan_objmgr_pdev *pdev) status = wlan_serialization_is_cmd_in_active_pending( cmd_in_active, cmd_in_pending); - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); return status; } @@ -910,7 +910,7 @@ wlan_serialization_get_scan_cmd_using_scan_id( pdev_q = &ser_pdev_obj->pdev_q[SER_PDEV_QUEUE_COMP_SCAN]; - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); if (is_scan_cmd_from_active_queue) queue = &pdev_q->active_list; @@ -931,7 +931,7 @@ wlan_serialization_get_scan_cmd_using_scan_id( } } - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); release_vdev_ref: wlan_objmgr_vdev_release_ref(vdev, WLAN_SERIALIZATION_ID); @@ -980,7 +980,7 @@ void *wlan_serialization_get_active_cmd( pdev_q = wlan_serialization_get_pdev_queue_obj(ser_pdev_obj, cmd_type); - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); queue = &pdev_q->active_list; @@ -997,7 +997,7 @@ void *wlan_serialization_get_active_cmd( umac_cmd = cmd_list->cmd.umac_cmd; } - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); release_vdev_ref: wlan_objmgr_vdev_release_ref(vdev, WLAN_SERIALIZATION_ID); diff --git a/umac/cmn_services/serialization/src/wlan_serialization_internal.c b/umac/cmn_services/serialization/src/wlan_serialization_internal.c index bfa31a8102..2285f5f351 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_internal.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_internal.c @@ -164,12 +164,12 @@ wlan_serialization_enqueue_cmd(struct wlan_serialization_command *cmd) cmd->is_high_priority, cmd->is_blocking); - wlan_serialization_acquire_lock(pdev_queue); + wlan_serialization_acquire_lock(&pdev_queue->pdev_queue_lock); active_queue = wlan_serialization_is_active_cmd_allowed(cmd); if (wlan_serialization_is_cmd_present_queue(cmd, active_queue)) { - wlan_serialization_release_lock(pdev_queue); + wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock); ser_err("duplicate command, can't enqueue"); goto error; } @@ -177,7 +177,7 @@ wlan_serialization_enqueue_cmd(struct wlan_serialization_command *cmd) if (wlan_serialization_remove_front( &pdev_queue->cmd_pool_list, &nnode) != QDF_STATUS_SUCCESS) { - wlan_serialization_release_lock(pdev_queue); + wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock); ser_err("Failed to get cmd buffer from global pool"); goto error; } @@ -216,7 +216,7 @@ wlan_serialization_enqueue_cmd(struct wlan_serialization_command *cmd) &cmd_list->cmd_in_use); } - wlan_serialization_release_lock(pdev_queue); + wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock); if (WLAN_SER_CMD_ACTIVE == status) wlan_serialization_activate_cmd(cmd_list, @@ -463,7 +463,7 @@ wlan_serialization_dequeue_cmd(struct wlan_serialization_command *cmd, cmd->is_high_priority, cmd->is_blocking); - wlan_serialization_acquire_lock(pdev_queue); + wlan_serialization_acquire_lock(&pdev_queue->pdev_queue_lock); if (cmd->cmd_type < WLAN_SER_CMD_NONSCAN) qdf_status = wlan_ser_remove_scan_cmd( @@ -474,7 +474,7 @@ wlan_serialization_dequeue_cmd(struct wlan_serialization_command *cmd, } if (qdf_status != QDF_STATUS_SUCCESS) { - wlan_serialization_release_lock(pdev_queue); + wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock); status = WLAN_SER_CMD_NOT_FOUND; goto error; } @@ -520,7 +520,7 @@ wlan_serialization_dequeue_cmd(struct wlan_serialization_command *cmd, blocking_cmd_waiting); } - wlan_serialization_release_lock(pdev_queue); + wlan_serialization_release_lock(&pdev_queue->pdev_queue_lock); /* Call cmd cb for remove request*/ if (cmd_bkup.cmd_cb) { @@ -674,6 +674,8 @@ wlan_serialization_find_and_stop_timer(struct wlan_objmgr_psoc *psoc, * be unique and For non-scan command, there should be only one active * command per pdev */ + wlan_serialization_acquire_lock(&psoc_ser_obj->timer_lock); + for (i = 0; psoc_ser_obj->max_active_cmds > i; i++) { ser_timer = &psoc_ser_obj->timers[i]; if (!(ser_timer->cmd) || @@ -681,14 +683,21 @@ wlan_serialization_find_and_stop_timer(struct wlan_objmgr_psoc *psoc, (ser_timer->cmd->cmd_type != cmd->cmd_type) || (ser_timer->cmd->vdev != cmd->vdev)) continue; - status = wlan_serialization_stop_timer(ser_timer); - ser_debug("\n Stopping timer for cmd type:%d, id: %d", - cmd->cmd_type, cmd->cmd_id); + + status = QDF_STATUS_SUCCESS; break; } - if (QDF_STATUS_SUCCESS != status) + wlan_serialization_release_lock(&psoc_ser_obj->timer_lock); + + if (QDF_IS_STATUS_SUCCESS(status)) { + status = wlan_serialization_stop_timer(ser_timer); + ser_debug("\n Stopping timer for cmd type:%d, id: %d", + cmd->cmd_type, cmd->cmd_id); + } else { ser_err("Can't find timer for cmd_type[%d]", cmd->cmd_type); + } + error: exit: @@ -721,6 +730,8 @@ wlan_serialization_find_and_start_timer(struct wlan_objmgr_psoc *psoc, psoc_ser_obj = wlan_serialization_get_psoc_obj(psoc); + wlan_serialization_acquire_lock(&psoc_ser_obj->timer_lock); + for (i = 0; psoc_ser_obj->max_active_cmds > i; i++) { /* Keep trying timer */ ser_timer = &psoc_ser_obj->timers[i]; @@ -729,22 +740,26 @@ wlan_serialization_find_and_start_timer(struct wlan_objmgr_psoc *psoc, /* Remember timer is pointing to command */ ser_timer->cmd = cmd; + status = QDF_STATUS_SUCCESS; + break; + } + + wlan_serialization_release_lock(&psoc_ser_obj->timer_lock); + + if (QDF_IS_STATUS_SUCCESS(status)) { qdf_timer_init(NULL, &ser_timer->timer, wlan_serialization_timer_handler, ser_timer, QDF_TIMER_TYPE_SW); qdf_timer_mod(&ser_timer->timer, - cmd->cmd_timeout_duration); + cmd->cmd_timeout_duration); ser_debug("starting timer for cmd: type[%d] id[%d] high_priority[%d] blocking[%d]", cmd->cmd_type, cmd->cmd_id, cmd->is_high_priority, cmd->is_blocking); - - status = QDF_STATUS_SUCCESS; - break; } error: diff --git a/umac/cmn_services/serialization/src/wlan_serialization_main.c b/umac/cmn_services/serialization/src/wlan_serialization_main.c index d31c1b1e5a..4c6554967a 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_main.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_main.c @@ -520,6 +520,7 @@ QDF_STATUS wlan_serialization_psoc_close(struct wlan_objmgr_psoc *psoc) ser_soc_obj->timers = NULL; ser_soc_obj->max_active_cmds = 0; + wlan_serialization_destroy_lock(&ser_soc_obj->timer_lock); error: ser_exit(); return status; @@ -550,6 +551,7 @@ QDF_STATUS wlan_serialization_psoc_open(struct wlan_objmgr_psoc *psoc) goto error; } + wlan_serialization_create_lock(&ser_soc_obj->timer_lock); status = QDF_STATUS_SUCCESS; error: @@ -708,7 +710,7 @@ static QDF_STATUS wlan_serialization_pdev_create_handler( for (index = 0; index < SER_PDEV_QUEUE_COMP_MAX; index++) { pdev_queue = &ser_pdev_obj->pdev_q[index]; - qdf_spinlock_create(&pdev_queue->pdev_queue_lock); + wlan_serialization_create_lock(&pdev_queue->pdev_queue_lock); switch (index) { case SER_PDEV_QUEUE_COMP_SCAN: @@ -825,7 +827,7 @@ static QDF_STATUS wlan_serialization_pdev_destroy_handler( wlan_serialization_destroy_pdev_list(pdev_queue); wlan_serialization_destroy_cmd_pool(pdev_queue); - qdf_spinlock_destroy(&pdev_queue->pdev_queue_lock); + wlan_serialization_destroy_lock(&pdev_queue->pdev_queue_lock); } qdf_mem_free(ser_pdev_obj); diff --git a/umac/cmn_services/serialization/src/wlan_serialization_non_scan.c b/umac/cmn_services/serialization/src/wlan_serialization_non_scan.c index 83a24070ea..33830b00f6 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_non_scan.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_non_scan.c @@ -498,7 +498,7 @@ wlan_ser_cancel_non_scan_cmd( else ser_debug("Can't find psoc"); - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); qsize = wlan_serialization_list_size(pdev_queue); while (!wlan_serialization_list_empty(pdev_queue) && qsize--) { @@ -554,7 +554,8 @@ wlan_ser_cancel_non_scan_cmd( */ if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION, &cmd_list->cmd_in_use)) { - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock( + &pdev_q->pdev_queue_lock); status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION; goto error; } @@ -607,7 +608,7 @@ wlan_ser_cancel_non_scan_cmd( } nnode = pnode; - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); /* * call pending cmd's callback to notify that * it is being removed @@ -626,7 +627,7 @@ wlan_ser_cancel_non_scan_cmd( WLAN_SER_CB_RELEASE_MEM_CMD); } - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); if (!is_active_queue) status = WLAN_SER_CMD_IN_PENDING_LIST; @@ -635,7 +636,7 @@ wlan_ser_cancel_non_scan_cmd( break; } - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); error: ser_exit(); diff --git a/umac/cmn_services/serialization/src/wlan_serialization_scan.c b/umac/cmn_services/serialization/src/wlan_serialization_scan.c index 292fcf1acf..e748f8bdd9 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_scan.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_scan.c @@ -186,7 +186,7 @@ wlan_ser_cancel_scan_cmd( else ser_debug("Can't find psoc"); - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); qsize = wlan_serialization_list_size(queue); while (!wlan_serialization_list_empty(queue) && qsize--) { @@ -242,7 +242,8 @@ wlan_ser_cancel_scan_cmd( */ if (qdf_atomic_test_bit(CMD_MARKED_FOR_ACTIVATION, &cmd_list->cmd_in_use)) { - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock( + &pdev_q->pdev_queue_lock); status = WLAN_SER_CMD_MARKED_FOR_ACTIVATION; goto error; } @@ -284,7 +285,7 @@ wlan_ser_cancel_scan_cmd( } nnode = pnode; - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); /* * call pending cmd's callback to notify that * it is being removed @@ -303,13 +304,13 @@ wlan_ser_cancel_scan_cmd( WLAN_SER_CB_RELEASE_MEM_CMD); } - wlan_serialization_acquire_lock(pdev_q); + wlan_serialization_acquire_lock(&pdev_q->pdev_queue_lock); if (!is_active_queue) status = WLAN_SER_CMD_IN_PENDING_LIST; } - wlan_serialization_release_lock(pdev_q); + wlan_serialization_release_lock(&pdev_q->pdev_queue_lock); error: ser_exit(); diff --git a/umac/cmn_services/serialization/src/wlan_serialization_utils.c b/umac/cmn_services/serialization/src/wlan_serialization_utils.c index 13c480bf91..5fc615d8d5 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_utils.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_utils.c @@ -1140,6 +1140,8 @@ QDF_STATUS wlan_serialization_cleanup_all_timers( goto error; } + wlan_serialization_acquire_lock(&psoc_ser_obj->timer_lock); + for (i = 0; psoc_ser_obj->max_active_cmds > i; i++) { ser_timer = &psoc_ser_obj->timers[i]; if (!ser_timer->cmd) @@ -1151,6 +1153,7 @@ QDF_STATUS wlan_serialization_cleanup_all_timers( } } + wlan_serialization_release_lock(&psoc_ser_obj->timer_lock); error: ser_exit(); return status; @@ -1783,53 +1786,33 @@ error: } QDF_STATUS -wlan_serialization_acquire_lock( - struct wlan_serialization_pdev_queue *pdev_queue) +wlan_serialization_acquire_lock(qdf_spinlock_t *lock) { - if (!pdev_queue) { - ser_err("invalid object"); - return QDF_STATUS_E_FAILURE; - } - qdf_spin_lock_bh(&pdev_queue->pdev_queue_lock); + qdf_spin_lock_bh(lock); return QDF_STATUS_SUCCESS; } QDF_STATUS -wlan_serialization_release_lock( - struct wlan_serialization_pdev_queue *pdev_queue) +wlan_serialization_release_lock(qdf_spinlock_t *lock) { - if (!pdev_queue) { - ser_err("invalid object"); - return QDF_STATUS_E_FAILURE; - } - qdf_spin_unlock_bh(&pdev_queue->pdev_queue_lock); + qdf_spin_unlock_bh(lock); return QDF_STATUS_SUCCESS; } QDF_STATUS -wlan_serialization_create_lock( - struct wlan_serialization_pdev_queue *pdev_queue) +wlan_serialization_create_lock(qdf_spinlock_t *lock) { - if (!pdev_queue) { - ser_err("invalid object"); - return QDF_STATUS_E_FAILURE; - } - qdf_spinlock_create(&pdev_queue->pdev_queue_lock); + qdf_spinlock_create(lock); return QDF_STATUS_SUCCESS; } QDF_STATUS -wlan_serialization_destroy_lock( - struct wlan_serialization_pdev_queue *pdev_queue) +wlan_serialization_destroy_lock(qdf_spinlock_t *lock) { - if (!pdev_queue) { - ser_err("invalid object"); - return QDF_STATUS_E_FAILURE; - } - qdf_spinlock_destroy(&pdev_queue->pdev_queue_lock); + qdf_spinlock_destroy(lock); return QDF_STATUS_SUCCESS; } diff --git a/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h b/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h index 4382680112..b324c86176 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h +++ b/umac/cmn_services/serialization/src/wlan_serialization_utils_i.h @@ -784,6 +784,7 @@ struct wlan_ser_psoc_obj { wlan_serialization_apply_rules_cb apply_rules_cb[WLAN_SER_CMD_MAX]; struct wlan_serialization_timer *timers; uint8_t max_active_cmds; + qdf_spinlock_t timer_lock; }; /** @@ -1202,42 +1203,38 @@ QDF_STATUS wlan_serialization_peek_next( /** * wlan_serialization_acquire_lock() - Acquire lock to the given queue - * @pdev_queue: Pointer to the pdev queue + * @lock: Pointer to the lock * * Return: QDF_STATUS success or failure */ QDF_STATUS -wlan_serialization_acquire_lock( - struct wlan_serialization_pdev_queue *pdev_queue); +wlan_serialization_acquire_lock(qdf_spinlock_t *lock); /** * wlan_serialization_release_lock() - Release lock to the given queue - * @pdev_queue: Pointer to the pdev queue + * @lock: Pointer to the lock * * Return: QDF_STATUS success or failure */ QDF_STATUS -wlan_serialization_release_lock( - struct wlan_serialization_pdev_queue *pdev_queue); +wlan_serialization_release_lock(qdf_spinlock_t *lock); /** * wlan_serialization_create_lock() - Init the lock to the given queue - * @pdev_queue: Pointer to the pdev queue + * @lock: Pointer to the lock * * Return: QDF_STATUS success or failure */ QDF_STATUS -wlan_serialization_create_lock( - struct wlan_serialization_pdev_queue *pdev_queue); +wlan_serialization_create_lock(qdf_spinlock_t *lock); /** * wlan_serialization_destroy_lock() - Deinit the lock to the given queue - * @pdev_queue: Pointer to the pdev queue + * @lock: Pointer to the lock * * Return: QDF_STATUS success or failure */ QDF_STATUS -wlan_serialization_destroy_lock( - struct wlan_serialization_pdev_queue *pdev_queue); +wlan_serialization_destroy_lock(qdf_spinlock_t *lock); #endif #endif From 9c73dc02e93e256c9bd01db188ce7b90c449c8a8 Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Mon, 17 Sep 2018 12:35:13 +0530 Subject: [PATCH 05/14] qcacmn: set tx search type appropriately Set search type only when peer map v2 messaging is enabled as we will have the search index (AST hash) only when v2 is enabled Change-Id: I6c1ab4a4d7519278755d93537a8430755d708a3c CRs-fixed: 2316418 --- dp/wifi3.0/dp_tx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 6ad04131f0..529d76cc5d 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3200,6 +3200,8 @@ QDF_STATUS dp_tx_vdev_attach(struct dp_vdev *vdev) */ void dp_tx_vdev_update_search_flags(struct dp_vdev *vdev) { + struct dp_soc *soc = vdev->pdev->soc; + /* * Enable both AddrY (SA based search) and AddrX (Da based search) * for TDLS link @@ -3220,7 +3222,11 @@ void dp_tx_vdev_update_search_flags(struct dp_vdev *vdev) else vdev->hal_desc_addr_search_flags = HAL_TX_DESC_ADDRX_EN; - if (vdev->opmode == wlan_op_mode_sta) + /* Set search type only when peer map v2 messaging is enabled + * as we will have the search index (AST hash) only when v2 is + * enabled + */ + if (soc->is_peer_map_unmap_v2 && vdev->opmode == wlan_op_mode_sta) vdev->search_type = HAL_TX_ADDR_INDEX_SEARCH; else vdev->search_type = HAL_TX_ADDR_SEARCH_DEFAULT; From 1bbf4f0482180cb5307b46fef0eb59899cc83d87 Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Fri, 20 Jul 2018 12:07:38 +0530 Subject: [PATCH 06/14] qcacmn: dont reset monitor status ring if monitor vap is created Do not reset monitor status ring while disabling enhanced stats when monitor vap is created Change-Id: I6cef505429a1f73cec6a3b96bd2bbcd1c5539373 --- dp/wifi3.0/dp_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 638fd1486e..53f07c854e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6728,7 +6728,8 @@ dp_enable_enhanced_stats(struct cdp_pdev *pdev_handle) pdev->enhanced_stats_en = 1; - if (!pdev->mcopy_mode && !pdev->neighbour_peers_added) + if (!pdev->mcopy_mode && !pdev->neighbour_peers_added && + !pdev->monitor_vdev) dp_ppdu_ring_cfg(pdev); if (is_ppdu_txrx_capture_enabled(pdev) && !pdev->bpr_enable) { @@ -6764,7 +6765,8 @@ dp_disable_enhanced_stats(struct cdp_pdev *pdev_handle) pdev->pdev_id); } - if (!pdev->mcopy_mode && !pdev->neighbour_peers_added) + if (!pdev->mcopy_mode && !pdev->neighbour_peers_added && + !pdev->monitor_vdev) dp_ppdu_ring_reset(pdev); } From cf7d57c5f686f1e3597b20bba68588c64a33877c Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Mon, 17 Sep 2018 14:27:47 +0530 Subject: [PATCH 07/14] qcacmn: Do not allocate 0 byte memory in DFS component In DFS component 0 byte memory is allocated when dfs_nol_count is 0. We see a print 'allocating 0 bytes at this location' during wifi unload. Change-Id: I5d6ad36875d634ee5ae6a138656bdb3f538bcdbe CRs-Fixed: 2316513 --- umac/dfs/core/src/misc/dfs_nol.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index ea3e37b59b..8d203aa54a 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -475,6 +475,11 @@ void dfs_nol_update(struct wlan_dfs *dfs) struct dfsreq_nolelem *dfs_nol; int nlen; + if (!dfs->dfs_nol_count) { + dfs_debug(dfs, WLAN_DEBUG_DFS_NOL, "dfs_nol_count is zero"); + return; + } + /* * Allocate enough entries to store the NOL. At least on Linux * (don't ask why), if you allocate a 0 entry array, the From ac40b6bedae52e90b483e587ce12b50378532cf6 Mon Sep 17 00:00:00 2001 From: Ashok Kumar Ponnaiah Date: Wed, 5 Sep 2018 10:16:23 +0530 Subject: [PATCH 08/14] qcacmn: Add optional cabapilites in WPA ie Add optional cabapilites in WPA ie. Change-Id: I9be9e5f79837fe21a109d7e4c881023403297736 --- umac/cmn_services/crypto/src/wlan_crypto_global_api.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c b/umac/cmn_services/crypto/src/wlan_crypto_global_api.c index b6e21f333b..ab7976578e 100644 --- a/umac/cmn_services/crypto/src/wlan_crypto_global_api.c +++ b/umac/cmn_services/crypto/src/wlan_crypto_global_api.c @@ -2379,6 +2379,13 @@ uint8_t *wlan_crypto_build_wpaie(struct wlan_objmgr_vdev *vdev, selcnt[0]++; WPA_ADD_KEYMGMT_TO_SUITE(frm, WLAN_CRYPTO_KEY_MGMT_NONE); } + + /* optional capabilities */ + if (crypto_params->rsn_caps != 0 && + crypto_params->rsn_caps != WLAN_CRYPTO_RSN_CAP_PREAUTH) { + WLAN_CRYPTO_ADDSHORT(frm, crypto_params->rsn_caps); + } + /* calculate element length */ iebuf[1] = frm - iebuf - 2; From 9f455d7429a3717b2196f227873c4a0935bbbbe3 Mon Sep 17 00:00:00 2001 From: Shreedhar Parande Date: Wed, 12 Sep 2018 11:23:01 +0530 Subject: [PATCH 09/14] qcacmn: Fix for delay in preCAC timeout for non-weather radar channels etsi-precac done list will be updated only after CAC finishes on the primary channel. This list will not get updated for preCAC on secondary channel. When channel change happens from intermediate channel(non-DFS) to weather radar channel after preCAC done, preCAC timeout for rest of the non-erather radar DFS channels were taken as 10min since that channel will not be present in etsi-precac done list. In order to fix this, consider primary channel's CAC timeout only if neither CAC nor preCAC is done on primary channel. Change-Id: I274b0f07d7d04644e79262fcecf61036ff79f96e CRs-fixed: 2312912 --- umac/dfs/core/src/misc/dfs_zero_cac.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/umac/dfs/core/src/misc/dfs_zero_cac.c b/umac/dfs/core/src/misc/dfs_zero_cac.c index f531369efb..a1075198dc 100644 --- a/umac/dfs/core/src/misc/dfs_zero_cac.c +++ b/umac/dfs/core/src/misc/dfs_zero_cac.c @@ -798,14 +798,16 @@ void dfs_start_precac_timer(struct wlan_dfs *dfs, uint8_t precac_chan) * So CAC expiry does not happen and moreover a new CAC is started. * Therefore do not disturb the CAC by channel restart (vdev_restart). * - * If CAC was already completed on primary, then we do not need to - * calculate which CAC timeout is maximum. + * If CAC/preCAC was already completed on primary, then we do not need + * to calculate which CAC timeout is maximum. * For example: If primary's CAC is 600 seconds and secondary's CAC * is 60 seconds then maximum gives 600 seconds which is not needed - * if CAC was already completed on primary. It is to be noted that - * etsi_precac/cac is done on primary segment. + * if CAC/preCAC was already completed on primary. It is to be noted + * that etsi_precac/cac is done on primary segment. */ - if (!dfs_is_etsi_precac_done(dfs)) + if (WLAN_IS_CHAN_DFS(dfs->dfs_curchan) && + !dfs_is_etsi_precac_done(dfs) && + !dfs_is_precac_done(dfs, dfs->dfs_curchan)) precac_timeout = QDF_MAX(primary_cac_timeout, secondary_cac_timeout) + EXTRA_TIME_IN_SEC; From f9cf9461fd2b54b263b35e9bc31903964c97f334 Mon Sep 17 00:00:00 2001 From: Qiwei Cai Date: Thu, 13 Sep 2018 16:17:46 +0800 Subject: [PATCH 10/14] qcacmn: export wmi_mtrace for use in all TLV files wmi_mtrace is defined as static in wmi_unified_tlv.c and used in TLV functions, but some TLVs need to be featurized and moved to separated TLV files. Need to export wmi_mtrace for external use. Change-Id: I9459ec01c9cd4a89f3544d6a9831acba56e6a278 CRs-Fixed: 2314779 --- wmi/inc/wmi_unified_priv.h | 18 ++++++++++++++++++ wmi/src/wmi_unified_tlv.c | 20 +++----------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index ea5d37aaea..96224ac81a 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1874,6 +1874,24 @@ struct wmi_soc { uint32_t soc_idx; }; +/** + * wmi_mtrace() - Wrappper function for qdf_mtrace api + * @message_id: 32-Bit Wmi message ID + * @vdev_id: Vdev ID + * @data: Actual message contents + * + * This function converts the 32-bit WMI message ID in 15-bit message ID + * format for qdf_mtrace as in qdf_mtrace message there are only 15 + * bits reserved for message ID. + * out of these 15-bits, 8-bits (From MSB) specifies the WMI_GRP_ID + * and remaining 7-bits specifies the actual WMI command. With this + * notation there can be maximum 256 groups and each group can have + * max 128 commands can be supported. + * + * Return: None + */ +void wmi_mtrace(uint32_t message_id, uint16_t vdev_id, uint32_t data); + void wmi_unified_register_module(enum wmi_target_type target_type, void (*wmi_attach)(wmi_unified_t wmi_handle)); void wmi_tlv_init(void); diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 4f2038188e..f4be4fd8d4 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -143,23 +143,7 @@ static inline void copy_vdev_create_pdev_id( } #endif -/** - * wmi_mtrace() - Wrappper function for qdf_mtrace api - * @message_id: 32-Bit Wmi message ID - * @vdev_id: Vdev ID - * @data: Actual message contents - * - * This function converts the 32-bit WMI message ID in 15-bit message ID - * format for qdf_mtrace as in qdf_mtrace message there are only 15 - * bits reserved for message ID. - * out of these 15-bits, 8-bits (From MSB) specifies the WMI_GRP_ID - * and remaining 7-bits specifies the actual WMI command. With this - * notation there can be maximum 256 groups and each group can have - * max 128 commands can be supported. - * - * Return: None - */ -static void wmi_mtrace(uint32_t message_id, uint16_t vdev_id, uint32_t data) +void wmi_mtrace(uint32_t message_id, uint16_t vdev_id, uint32_t data) { uint16_t mtrace_message_id; @@ -170,6 +154,8 @@ static void wmi_mtrace(uint32_t message_id, uint16_t vdev_id, uint32_t data) mtrace_message_id, vdev_id, data); } +qdf_export_symbol(wmi_mtrace); + /** * send_vdev_create_cmd_tlv() - send VDEV create command to fw * @wmi_handle: wmi handle From fa1ddd54473ee95d5c1e4a7c3afadefe8a61cb8c Mon Sep 17 00:00:00 2001 From: Sathyanarayanan Esakkiappan Date: Thu, 6 Sep 2018 12:43:36 +0530 Subject: [PATCH 11/14] qcacmn: Trigger IRQ on Peregrine/swift by setting IRQ Bit of LF_TIMER 0 Set Interrupt bit of LF_TIMER 0 to induce interrupt on swift/peregrine Change-Id: I8a3941262dd7a4b19f8734b4017c9293fbb1b981 --- hif/inc/reg_struct.h | 3 ++- hif/inc/regtable_pcie.h | 2 ++ hif/inc/target_reg_init.h | 7 ++++++- hif/src/adrastea_reg_def.h | 5 ++++- hif/src/ar6320def.h | 5 ++++- hif/src/ar6320v2def.h | 5 ++++- hif/src/ar9888def.h | 5 ++++- hif/src/pcie/if_pci.c | 40 +++++++++++++++++++++++++++++++++--- hif/src/sdio/regtable_sdio.h | 5 ++++- hif/src/usb/regtable_usb.h | 5 ++++- 10 files changed, 71 insertions(+), 11 deletions(-) diff --git a/hif/inc/reg_struct.h b/hif/inc/reg_struct.h index d3cb668d4b..422b00146e 100644 --- a/hif/inc/reg_struct.h +++ b/hif/inc/reg_struct.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-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 @@ -231,6 +231,7 @@ struct targetdef_s { uint32_t d_CPU_INTR_ADDRESS; uint32_t d_SOC_LF_TIMER_CONTROL0_ADDRESS; uint32_t d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK; + uint32_t d_SOC_LF_TIMER_STATUS0_ADDRESS; /* chip id start */ uint32_t d_SI_CONFIG_ERR_INT_MASK; diff --git a/hif/inc/regtable_pcie.h b/hif/inc/regtable_pcie.h index cb05adab3c..ca455ef15e 100644 --- a/hif/inc/regtable_pcie.h +++ b/hif/inc/regtable_pcie.h @@ -170,6 +170,8 @@ (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ADDRESS) #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK \ (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK) +#define SOC_LF_TIMER_STATUS0_ADDRESS \ + (scn->targetdef->d_SOC_LF_TIMER_STATUS0_ADDRESS) #define SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_LSB \ (scn->targetdef->d_SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_LSB) #define SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_MASK \ diff --git a/hif/inc/target_reg_init.h b/hif/inc/target_reg_init.h index efd09f308d..607a5cc1e3 100644 --- a/hif/inc/target_reg_init.h +++ b/hif/inc/target_reg_init.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-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 @@ -83,6 +83,10 @@ struct targetdef_s; #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK ATH_UNSUPPORTED_REG_OFFSET #endif +#if !defined(SOC_LF_TIMER_STATUS0_ADDRESS) +#define SOC_LF_TIMER_STATUS0_ADDRESS ATH_UNSUPPORTED_REG_OFFSET +#endif + #if !defined(SOC_RESET_CONTROL_ADDRESS) #define SOC_RESET_CONTROL_ADDRESS ATH_UNSUPPORTED_REG_OFFSET #define SOC_RESET_CONTROL_CE_RST_MASK ATH_UNSUPPORTED_REG_OFFSET @@ -290,6 +294,7 @@ static struct targetdef_s my_target_def = { .d_SOC_LF_TIMER_CONTROL0_ADDRESS = SOC_LF_TIMER_CONTROL0_ADDRESS, .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK = SOC_LF_TIMER_CONTROL0_ENABLE_MASK, + .d_SOC_LF_TIMER_STATUS0_ADDRESS = SOC_LF_TIMER_STATUS0_ADDRESS, .d_SI_CONFIG_ERR_INT_MASK = SI_CONFIG_ERR_INT_MASK, .d_SI_CONFIG_ERR_INT_LSB = SI_CONFIG_ERR_INT_LSB, .d_GPIO_ENABLE_W1TS_LOW_ADDRESS = GPIO_ENABLE_W1TS_LOW_ADDRESS, diff --git a/hif/src/adrastea_reg_def.h b/hif/src/adrastea_reg_def.h index ab399fed86..6b7e2e1aa5 100644 --- a/hif/src/adrastea_reg_def.h +++ b/hif/src/adrastea_reg_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2016, 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 @@ -1512,6 +1512,7 @@ #define ADRASTEA_CPU_INTR_ADDRESS 0xffffffff #define ADRASTEA_SOC_LF_TIMER_CONTROL0_ADDRESS 0xffffffff #define ADRASTEA_SOC_LF_TIMER_CONTROL0_ENABLE_MASK 0xffffffff +#define ADRASTEA_SOC_LF_TIMER_STATUS0_ADDRESS 0xffffffff #define ADRASTEA_SOC_RESET_CONTROL_ADDRESS \ (0x00000000 + ADRASTEA_RTC_SOC_REG_BASE_ADDRESS) #define ADRASTEA_SOC_RESET_CONTROL_CE_RST_MASK 0x0100 @@ -2023,6 +2024,8 @@ struct targetdef_s adrastea_targetdef = { ADRASTEA_SOC_LF_TIMER_CONTROL0_ADDRESS, .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK = ADRASTEA_SOC_LF_TIMER_CONTROL0_ENABLE_MASK, + .d_SOC_LF_TIMER_STATUS0_ADDRESS = + ADRASTEA_SOC_LF_TIMER_STATUS0_ADDRESS, /* chip id start */ .d_SOC_CHIP_ID_ADDRESS = ADRASTEA_SOC_CHIP_ID_ADDRESS, .d_SOC_CHIP_ID_VERSION_MASK = ADRASTEA_SOC_CHIP_ID_VERSION_MASK, diff --git a/hif/src/ar6320def.h b/hif/src/ar6320def.h index 77ab1c5272..3014f6549b 100644 --- a/hif/src/ar6320def.h +++ b/hif/src/ar6320def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-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 @@ -204,6 +204,7 @@ #define AR6320_CPU_INTR_ADDRESS 0x0010 #define AR6320_SOC_LF_TIMER_CONTROL0_ADDRESS 0x00000050 #define AR6320_SOC_LF_TIMER_CONTROL0_ENABLE_MASK 0x00000004 +#define AR6320_SOC_LF_TIMER_STATUS0_ADDRESS 0x00000054 #define AR6320_SOC_RESET_CONTROL_ADDRESS 0x00000000 #define AR6320_SOC_RESET_CONTROL_CPU_WARM_RST_MASK 0x00000040 #define AR6320_CORE_CTRL_ADDRESS 0x0000 @@ -599,6 +600,8 @@ struct targetdef_s ar6320_targetdef = { AR6320_SOC_LF_TIMER_CONTROL0_ADDRESS, .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK = AR6320_SOC_LF_TIMER_CONTROL0_ENABLE_MASK, + .d_SOC_LF_TIMER_STATUS0_ADDRESS = + AR6320_SOC_LF_TIMER_STATUS0_ADDRESS, .d_WLAN_DEBUG_INPUT_SEL_OFFSET = AR6320_WLAN_DEBUG_INPUT_SEL_OFFSET, .d_WLAN_DEBUG_INPUT_SEL_SRC_MSB = AR6320_WLAN_DEBUG_INPUT_SEL_SRC_MSB, diff --git a/hif/src/ar6320v2def.h b/hif/src/ar6320v2def.h index 5ad0b98fd4..fdb4e92ae3 100644 --- a/hif/src/ar6320v2def.h +++ b/hif/src/ar6320v2def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-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 @@ -165,6 +165,7 @@ #define AR6320V2_CPU_INTR_ADDRESS 0x0010 #define AR6320V2_SOC_LF_TIMER_CONTROL0_ADDRESS 0x00000050 #define AR6320V2_SOC_LF_TIMER_CONTROL0_ENABLE_MASK 0x00000004 +#define AR6320V2_SOC_LF_TIMER_STATUS0_ADDRESS 0x00000054 #define AR6320V2_SOC_RESET_CONTROL_ADDRESS 0x00000000 #define AR6320V2_SOC_RESET_CONTROL_CPU_WARM_RST_MASK 0x00000040 #define AR6320V2_CORE_CTRL_ADDRESS 0x0000 @@ -645,6 +646,8 @@ struct targetdef_s ar6320v2_targetdef = { AR6320V2_SOC_LF_TIMER_CONTROL0_ADDRESS, .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK = AR6320V2_SOC_LF_TIMER_CONTROL0_ENABLE_MASK, + .d_SOC_LF_TIMER_STATUS0_ADDRESS = + AR6320V2_SOC_LF_TIMER_STATUS0_ADDRESS, /* chip id start */ .d_SOC_CHIP_ID_ADDRESS = AR6320V2_SOC_CHIP_ID_ADDRESS, .d_SOC_CHIP_ID_VERSION_MASK = AR6320V2_SOC_CHIP_ID_VERSION_MASK, diff --git a/hif/src/ar9888def.h b/hif/src/ar9888def.h index ce2e891c9f..9ce32937f4 100644 --- a/hif/src/ar9888def.h +++ b/hif/src/ar9888def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016, 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 @@ -203,6 +203,7 @@ #define AR9888_CPU_INTR_ADDRESS 0x0010 #define AR9888_SOC_LF_TIMER_CONTROL0_ADDRESS 0x00000050 #define AR9888_SOC_LF_TIMER_CONTROL0_ENABLE_MASK 0x00000004 +#define AR9888_SOC_LF_TIMER_STATUS0_ADDRESS 0x00000054 #define AR9888_SOC_RESET_CONTROL_ADDRESS 0x00000000 #define AR9888_SOC_RESET_CONTROL_CPU_WARM_RST_MASK 0x00000040 #define AR9888_CORE_CTRL_ADDRESS 0x0000 @@ -438,6 +439,8 @@ struct targetdef_s ar9888_targetdef = { AR9888_SOC_LF_TIMER_CONTROL0_ADDRESS, .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK = AR9888_SOC_LF_TIMER_CONTROL0_ENABLE_MASK, + .d_SOC_LF_TIMER_STATUS0_ADDRESS = + AR9888_SOC_LF_TIMER_STATUS0_ADDRESS, }; struct hostdef_s ar9888_hostdef = { diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 4dcffc886e..efd999068d 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -3531,6 +3531,30 @@ end: return 0; } +/** + * hif_trigger_timer_irq() : Triggers interrupt on LF_Timer 0 + * @scn: hif control structure + * + * Sets IRQ bit in LF Timer Status Address to awake peregrine/swift + * stuck at a polling loop in pcie_address_config in FW + * + * Return: none + */ +static void hif_trigger_timer_irq(struct hif_softc *scn) +{ + int tmp; + /* Trigger IRQ on Peregrine/Swift by setting + * IRQ Bit of LF_TIMER 0 + */ + tmp = hif_read32_mb(scn, scn->mem + (RTC_SOC_BASE_ADDRESS + + SOC_LF_TIMER_STATUS0_ADDRESS)); + /* Set Raw IRQ Bit */ + tmp |= 1; + /* SOC_LF_TIMER_STATUS0 */ + hif_write32_mb(scn, scn->mem + (RTC_SOC_BASE_ADDRESS + + SOC_LF_TIMER_STATUS0_ADDRESS), tmp); +} + /** * hif_target_sync() : ensure the target is ready * @scn: hif control structure @@ -3560,7 +3584,9 @@ static void hif_target_sync(struct hif_softc *scn) if (HAS_FW_INDICATOR) { int wait_limit = 500; int fw_ind = 0; - + int retry_count = 0; + uint32_t target_type = scn->target_info.target_type; +fw_retry: HIF_TRACE("%s: Loop checking FW signal", __func__); while (1) { fw_ind = hif_read32_mb(scn, scn->mem + @@ -3578,12 +3604,20 @@ static void hif_target_sync(struct hif_softc *scn) qdf_mdelay(10); } - if (wait_limit < 0) + if (wait_limit < 0) { + if (target_type == TARGET_TYPE_AR9888 && + retry_count++ < 2) { + hif_trigger_timer_irq(scn); + wait_limit = 500; + goto fw_retry; + } HIF_TRACE("%s: FW signal timed out", __func__); - else + qdf_assert_always(0); + } else { HIF_TRACE("%s: Got FW signal, retries = %x", __func__, 500-wait_limit); + } } hif_write32_mb(scn, scn->mem + PCIE_LOCAL_BASE_ADDRESS + PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_RESET); diff --git a/hif/src/sdio/regtable_sdio.h b/hif/src/sdio/regtable_sdio.h index 185d11bbf7..dfc6a31907 100644 --- a/hif/src/sdio/regtable_sdio.h +++ b/hif/src/sdio/regtable_sdio.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-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 @@ -197,6 +197,7 @@ struct targetdef_s { uint32_t d_CPU_INTR_ADDRESS; uint32_t d_SOC_LF_TIMER_CONTROL0_ADDRESS; uint32_t d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK; + uint32_t d_SOC_LF_TIMER_STATUS0_ADDRESS; /* chip id start */ uint32_t d_SOC_CHIP_ID_ADDRESS; @@ -361,6 +362,8 @@ struct targetdef_s { (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ADDRESS) #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK \ (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK) +#define SOC_LF_TIMER_STATUS0_ADDRESS \ + (scn->targetdef->d_SOC_LF_TIMER_STATUS0_ADDRESS) #define CHIP_ID_ADDRESS (scn->targetdef->d_SOC_CHIP_ID_ADDRESS) diff --git a/hif/src/usb/regtable_usb.h b/hif/src/usb/regtable_usb.h index f3bf559c27..d59cd08ca7 100644 --- a/hif/src/usb/regtable_usb.h +++ b/hif/src/usb/regtable_usb.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-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 @@ -278,6 +278,7 @@ struct targetdef_s { u_int32_t d_CPU_INTR_ADDRESS; u_int32_t d_SOC_LF_TIMER_CONTROL0_ADDRESS; u_int32_t d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK; + u_int32_t d_SOC_LF_TIMER_STATUS0_ADDRESS; /* chip id start */ u_int32_t d_SOC_CHIP_ID_ADDRESS; u_int32_t d_SOC_CHIP_ID_VERSION_MASK; @@ -455,6 +456,8 @@ struct targetdef_s { (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ADDRESS) #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK \ (scn->targetdef->d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK) +#define SOC_LF_TIMER_STATUS0_ADDRESS \ + (scn->targetdef->d_SOC_LF_TIMER_STATUS0_ADDRESS) #define SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_LSB \ (scn->targetdef->d_SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_LSB) #define SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_MASK \ From f3e6bf1557de00d4ef7176cd6c02e302da3da47f Mon Sep 17 00:00:00 2001 From: Kiran Venkatappa Date: Tue, 11 Sep 2018 15:06:26 +0530 Subject: [PATCH 12/14] qcacmn: Add target service ce map for HKV2 HKV2 has support for three radios. Update Target service map for HKV2 to map third endpoint for WMI commands corresponding to third radio. Change-Id: I9b84dedf1fcddf5c6d43e12c6688d8f9ee7db886 CRs-Fixed: 2313124 --- hif/src/ce/ce_main.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 1b561e9c6c..a323390272 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -422,6 +422,37 @@ static struct service_to_pipe target_service_to_ce_map_qca8074[] = { }; #endif +#if (defined(QCA_WIFI_QCA8074V2)) +static struct service_to_pipe target_service_to_ce_map_qca8074_v2[] = { + { WMI_DATA_VO_SVC, PIPEDIR_OUT, 3, }, + { WMI_DATA_VO_SVC, PIPEDIR_IN, 2, }, + { WMI_DATA_BK_SVC, PIPEDIR_OUT, 3, }, + { WMI_DATA_BK_SVC, PIPEDIR_IN, 2, }, + { WMI_DATA_BE_SVC, PIPEDIR_OUT, 3, }, + { WMI_DATA_BE_SVC, PIPEDIR_IN, 2, }, + { WMI_DATA_VI_SVC, PIPEDIR_OUT, 3, }, + { WMI_DATA_VI_SVC, PIPEDIR_IN, 2, }, + { WMI_CONTROL_SVC, PIPEDIR_OUT, 3, }, + { WMI_CONTROL_SVC, PIPEDIR_IN, 2, }, + { WMI_CONTROL_SVC_WMAC1, PIPEDIR_OUT, 7}, + { WMI_CONTROL_SVC_WMAC1, PIPEDIR_IN, 2}, + { WMI_CONTROL_SVC_WMAC2, PIPEDIR_OUT, 9}, + { WMI_CONTROL_SVC_WMAC2, PIPEDIR_IN, 2}, + { HTC_CTRL_RSVD_SVC, PIPEDIR_OUT, 0, }, + { HTC_CTRL_RSVD_SVC, PIPEDIR_IN, 1, }, + { HTC_RAW_STREAMS_SVC, PIPEDIR_OUT, 0}, + { HTC_RAW_STREAMS_SVC, PIPEDIR_IN, 1 }, + { HTT_DATA_MSG_SVC, PIPEDIR_OUT, 4, }, + { HTT_DATA_MSG_SVC, PIPEDIR_IN, 1, }, + { PACKET_LOG_SVC, PIPEDIR_IN, 5, }, + /* (Additions here) */ + { 0, 0, 0, }, +}; +#else +static struct service_to_pipe target_service_to_ce_map_qca8074_v2[] = { +}; +#endif + /* PIPEDIR_OUT = HOST to Target */ /* PIPEDIR_IN = TARGET to HOST */ #ifdef QCN7605_SUPPORT @@ -718,11 +749,16 @@ static void hif_select_service_to_pipe_map(struct hif_softc *scn, sizeof(target_service_to_ce_map_qca6390); break; case TARGET_TYPE_QCA8074: - case TARGET_TYPE_QCA8074V2: *tgt_svc_map_to_use = target_service_to_ce_map_qca8074; *sz_tgt_svc_map_to_use = sizeof(target_service_to_ce_map_qca8074); break; + case TARGET_TYPE_QCA8074V2: + *tgt_svc_map_to_use = + target_service_to_ce_map_qca8074_v2; + *sz_tgt_svc_map_to_use = + sizeof(target_service_to_ce_map_qca8074_v2); + break; } } } From 1f0755c01512a331c6331bb14e60e48089dc5971 Mon Sep 17 00:00:00 2001 From: Venkateswara Swamy Bandaru Date: Fri, 17 Aug 2018 18:38:49 +0530 Subject: [PATCH 13/14] qcacmn: Add qca8074v2 support for DP Add suuport in cdp soc attach for qca8074v2 chip. Change-Id: I81e679f220f9b8656597498f82538c7618303e95 CRs-Fixed: 2306001 --- dp/inc/cdp_txrx_cmn_reg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dp/inc/cdp_txrx_cmn_reg.h b/dp/inc/cdp_txrx_cmn_reg.h index 1bfb1d70ea..510515551e 100644 --- a/dp/inc/cdp_txrx_cmn_reg.h +++ b/dp/inc/cdp_txrx_cmn_reg.h @@ -27,7 +27,7 @@ #include "hif_main.h" #define MOB_DRV_LEGACY_DP 0xdeed/*FIXME Add MCL device IDs */ -#define LITHIUM_DP 0xfffe/*FIXME Add Litium device ID */ +#define LITHIUM_DP 0xfffd/*FIXME Add Litium device ID */ /* Use these device IDs for attach in future */ ol_txrx_soc_handle ol_txrx_soc_attach(void *scn_handle, struct ol_if_ops *dp_ol_if_ops); @@ -65,6 +65,7 @@ static inline ol_txrx_soc_handle cdp_soc_attach(u_int16_t devid, switch (devid) { case LITHIUM_DP: /*FIXME Add lithium devide IDs */ case QCA8074_DEVICE_ID: /* Hawekeye */ + case QCA8074V2_DEVICE_ID: /* Hawekeye V2*/ case QCA6290_DEVICE_ID: case QCA6390_DEVICE_ID: case QCA6390_EMULATION_DEVICE_ID: From c24679128bbe4b19138fd492b5869add8da7eda3 Mon Sep 17 00:00:00 2001 From: Debasis Das Date: Mon, 10 Sep 2018 20:27:07 +0530 Subject: [PATCH 14/14] qcacmn: Add member in the stats ops for vdev stats The stats ops framework needs a member for updation of vdev stats. Change-Id: I4a131fdadb50e89f4db55548ac6ee40afda5d182 --- dp/inc/cdp_txrx_ops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index eae5b563a0..6a4a77cf2a 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -739,6 +739,9 @@ struct cdp_host_stats_ops { int (*txrx_get_vdev_extd_stats)(struct cdp_vdev *vdev_handle, void *buffer); + void + (*txrx_update_vdev_stats)(struct cdp_vdev *vdev, void *buf, + uint16_t stats_id); }; struct cdp_wds_ops {