Loading dp/wifi3.0/dp_rx_desc.c +1 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,7 @@ void dp_rx_add_desc_list_to_free_list(struct dp_soc *soc, rx_desc_pool->freelist = *local_desc_list; (*tail)->next = temp_list; *tail = NULL; *local_desc_list = NULL; qdf_spin_unlock_bh(&rx_desc_pool->lock); } dp/wifi3.0/dp_tx.c +13 −14 Original line number Diff line number Diff line Loading @@ -3259,6 +3259,7 @@ dp_tx_comp_process_desc(struct dp_soc *soc, /** * dp_tx_comp_process_tx_status() - Parse and Dump Tx completion status info * @soc: DP soc handle * @tx_desc: software descriptor head pointer * @ts: Tx completion status * @peer: peer handle Loading @@ -3267,13 +3268,13 @@ dp_tx_comp_process_desc(struct dp_soc *soc, * Return: none */ static inline void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, void dp_tx_comp_process_tx_status(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc, struct hal_tx_completion_status *ts, struct dp_peer *peer, uint8_t ring_id) { uint32_t length; qdf_ether_header_t *eh; struct dp_soc *soc = NULL; struct dp_vdev *vdev = tx_desc->vdev; qdf_nbuf_t nbuf = tx_desc->nbuf; Loading @@ -3283,6 +3284,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, } eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf); length = qdf_nbuf_len(nbuf); DPTRACE(qdf_dp_trace_ptr(tx_desc->nbuf, QDF_DP_TRACE_LI_DP_FREE_PACKET_PTR_RECORD, Loading Loading @@ -3321,26 +3323,22 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, ts->tones_in_ru, ts->tsf, ts->ppdu_id, ts->transmit_cnt, ts->tid, ts->peer_id); soc = vdev->pdev->soc; /* Update SoC level stats */ DP_STATS_INCC(soc, tx.dropped_fw_removed, 1, (ts->status == HAL_TX_TQM_RR_REM_CMD_REM)); if (!peer) { dp_err_rl("peer is null or deletion in progress"); DP_STATS_INC_PKT(soc, tx.tx_invalid_peer, 1, length); goto out; } /* Update per-packet stats for mesh mode */ if (qdf_unlikely(vdev->mesh_vdev) && !(tx_desc->flags & DP_TX_DESC_FLAG_TO_FW)) dp_tx_comp_fill_tx_completion_stats(tx_desc, ts); length = qdf_nbuf_len(nbuf); /* Update peer level stats */ if (!peer) { QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_DP, "peer is null or deletion in progress"); DP_STATS_INC_PKT(soc, tx.tx_invalid_peer, 1, length); goto out; } if (qdf_unlikely(peer->bss_peer && vdev->opmode == wlan_op_mode_ap)) { if (ts->status != HAL_TX_TQM_RR_REM_CMD_REM) { DP_STATS_INC_PKT(peer, tx.mcast, 1, length); Loading Loading @@ -3369,6 +3367,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, out: return; } /** * dp_tx_comp_process_desc_list() - Tx complete software descriptor handler * @soc: core txrx main context Loading @@ -3395,7 +3394,7 @@ dp_tx_comp_process_desc_list(struct dp_soc *soc, while (desc) { hal_tx_comp_get_status(&desc->comp, &ts, soc->hal_soc); peer = dp_peer_find_by_id(soc, ts.peer_id); dp_tx_comp_process_tx_status(desc, &ts, peer, ring_id); dp_tx_comp_process_tx_status(soc, desc, &ts, peer, ring_id); netbuf = desc->nbuf; /* check tx complete notification */ Loading Loading @@ -3494,7 +3493,7 @@ void dp_tx_process_htt_completion(struct dp_tx_desc_s *tx_desc, uint8_t *status, if (qdf_likely(peer)) dp_peer_unref_del_find_by_id(peer); dp_tx_comp_process_tx_status(tx_desc, &ts, peer, ring_id); dp_tx_comp_process_tx_status(soc, tx_desc, &ts, peer, ring_id); dp_tx_comp_process_desc(soc, tx_desc, &ts, peer); dp_tx_desc_release(tx_desc, tx_desc->pool_id); Loading dp/wifi3.0/dp_types.h +8 −0 Original line number Diff line number Diff line Loading @@ -1268,6 +1268,14 @@ struct dp_soc { struct dp_rx_fst *rx_fst; #ifdef WLAN_SUPPORT_RX_FISA uint8_t fisa_enable; /** * Params used for controlling the fisa aggregation dynamically */ struct { qdf_atomic_t skip_fisa; uint8_t fisa_force_flush[MAX_REO_DEST_RINGS]; } skip_fisa_param; #endif #endif /* WLAN_SUPPORT_RX_FLOW_TAG || WLAN_SUPPORT_RX_FISA */ }; Loading hal/wifi3.0/hal_internal.h +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ typedef struct hal_ring_handle *hal_ring_handle_t; * @dequeue_val: register value at the time of delayed write dequeue * @valid: whether this entry is valid or not * @enqueue_time: enqueue time (qdf_log_timestamp) * @work_scheduled_time: work scheduled time (qdf_log_timestamp) * @dequeue_time: dequeue time (qdf_log_timestamp) */ struct hal_reg_write_q_elem { Loading @@ -216,6 +217,7 @@ struct hal_reg_write_q_elem { uint32_t dequeue_val; uint8_t valid; qdf_time_t enqueue_time; qdf_time_t work_scheduled_time; qdf_time_t dequeue_time; }; Loading hal/wifi3.0/hal_srng.c +19 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,10 @@ static void hal_reg_write_work(void *arg) uint32_t *addr; q_elem = &hal->reg_write_queue[(hal->read_idx)]; q_elem->work_scheduled_time = qdf_get_log_timestamp(); /* Make sure q_elem consistent in the memory for multi-cores */ qdf_rmb(); if (!q_elem->valid) return; Loading @@ -463,7 +466,11 @@ static void hal_reg_write_work(void *arg) return; } while (q_elem->valid) { while (true) { qdf_rmb(); if (!q_elem->valid) break; q_elem->dequeue_time = qdf_get_log_timestamp(); ring_id = q_elem->srng->ring_id; addr = q_elem->addr; Loading Loading @@ -558,6 +565,17 @@ static void hal_reg_write_enqueue(struct hal_soc *hal_soc, qdf_wmb(); q_elem->valid = true; /* * After all other fields in the q_elem has been updated * in memory successfully, the valid flag needs to be updated * in memory in time too. * Else there is a chance that the dequeuing worker thread * might read stale valid flag and the work will be bypassed * for this round. And if there is no other work scheduled * later, this hal register writing won't be updated any more. */ qdf_wmb(); srng->reg_write_in_progress = true; qdf_atomic_inc(&hal_soc->active_work_cnt); Loading Loading
dp/wifi3.0/dp_rx_desc.c +1 −0 Original line number Diff line number Diff line Loading @@ -333,6 +333,7 @@ void dp_rx_add_desc_list_to_free_list(struct dp_soc *soc, rx_desc_pool->freelist = *local_desc_list; (*tail)->next = temp_list; *tail = NULL; *local_desc_list = NULL; qdf_spin_unlock_bh(&rx_desc_pool->lock); }
dp/wifi3.0/dp_tx.c +13 −14 Original line number Diff line number Diff line Loading @@ -3259,6 +3259,7 @@ dp_tx_comp_process_desc(struct dp_soc *soc, /** * dp_tx_comp_process_tx_status() - Parse and Dump Tx completion status info * @soc: DP soc handle * @tx_desc: software descriptor head pointer * @ts: Tx completion status * @peer: peer handle Loading @@ -3267,13 +3268,13 @@ dp_tx_comp_process_desc(struct dp_soc *soc, * Return: none */ static inline void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, void dp_tx_comp_process_tx_status(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc, struct hal_tx_completion_status *ts, struct dp_peer *peer, uint8_t ring_id) { uint32_t length; qdf_ether_header_t *eh; struct dp_soc *soc = NULL; struct dp_vdev *vdev = tx_desc->vdev; qdf_nbuf_t nbuf = tx_desc->nbuf; Loading @@ -3283,6 +3284,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, } eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf); length = qdf_nbuf_len(nbuf); DPTRACE(qdf_dp_trace_ptr(tx_desc->nbuf, QDF_DP_TRACE_LI_DP_FREE_PACKET_PTR_RECORD, Loading Loading @@ -3321,26 +3323,22 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, ts->tones_in_ru, ts->tsf, ts->ppdu_id, ts->transmit_cnt, ts->tid, ts->peer_id); soc = vdev->pdev->soc; /* Update SoC level stats */ DP_STATS_INCC(soc, tx.dropped_fw_removed, 1, (ts->status == HAL_TX_TQM_RR_REM_CMD_REM)); if (!peer) { dp_err_rl("peer is null or deletion in progress"); DP_STATS_INC_PKT(soc, tx.tx_invalid_peer, 1, length); goto out; } /* Update per-packet stats for mesh mode */ if (qdf_unlikely(vdev->mesh_vdev) && !(tx_desc->flags & DP_TX_DESC_FLAG_TO_FW)) dp_tx_comp_fill_tx_completion_stats(tx_desc, ts); length = qdf_nbuf_len(nbuf); /* Update peer level stats */ if (!peer) { QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_DP, "peer is null or deletion in progress"); DP_STATS_INC_PKT(soc, tx.tx_invalid_peer, 1, length); goto out; } if (qdf_unlikely(peer->bss_peer && vdev->opmode == wlan_op_mode_ap)) { if (ts->status != HAL_TX_TQM_RR_REM_CMD_REM) { DP_STATS_INC_PKT(peer, tx.mcast, 1, length); Loading Loading @@ -3369,6 +3367,7 @@ void dp_tx_comp_process_tx_status(struct dp_tx_desc_s *tx_desc, out: return; } /** * dp_tx_comp_process_desc_list() - Tx complete software descriptor handler * @soc: core txrx main context Loading @@ -3395,7 +3394,7 @@ dp_tx_comp_process_desc_list(struct dp_soc *soc, while (desc) { hal_tx_comp_get_status(&desc->comp, &ts, soc->hal_soc); peer = dp_peer_find_by_id(soc, ts.peer_id); dp_tx_comp_process_tx_status(desc, &ts, peer, ring_id); dp_tx_comp_process_tx_status(soc, desc, &ts, peer, ring_id); netbuf = desc->nbuf; /* check tx complete notification */ Loading Loading @@ -3494,7 +3493,7 @@ void dp_tx_process_htt_completion(struct dp_tx_desc_s *tx_desc, uint8_t *status, if (qdf_likely(peer)) dp_peer_unref_del_find_by_id(peer); dp_tx_comp_process_tx_status(tx_desc, &ts, peer, ring_id); dp_tx_comp_process_tx_status(soc, tx_desc, &ts, peer, ring_id); dp_tx_comp_process_desc(soc, tx_desc, &ts, peer); dp_tx_desc_release(tx_desc, tx_desc->pool_id); Loading
dp/wifi3.0/dp_types.h +8 −0 Original line number Diff line number Diff line Loading @@ -1268,6 +1268,14 @@ struct dp_soc { struct dp_rx_fst *rx_fst; #ifdef WLAN_SUPPORT_RX_FISA uint8_t fisa_enable; /** * Params used for controlling the fisa aggregation dynamically */ struct { qdf_atomic_t skip_fisa; uint8_t fisa_force_flush[MAX_REO_DEST_RINGS]; } skip_fisa_param; #endif #endif /* WLAN_SUPPORT_RX_FLOW_TAG || WLAN_SUPPORT_RX_FISA */ }; Loading
hal/wifi3.0/hal_internal.h +2 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ typedef struct hal_ring_handle *hal_ring_handle_t; * @dequeue_val: register value at the time of delayed write dequeue * @valid: whether this entry is valid or not * @enqueue_time: enqueue time (qdf_log_timestamp) * @work_scheduled_time: work scheduled time (qdf_log_timestamp) * @dequeue_time: dequeue time (qdf_log_timestamp) */ struct hal_reg_write_q_elem { Loading @@ -216,6 +217,7 @@ struct hal_reg_write_q_elem { uint32_t dequeue_val; uint8_t valid; qdf_time_t enqueue_time; qdf_time_t work_scheduled_time; qdf_time_t dequeue_time; }; Loading
hal/wifi3.0/hal_srng.c +19 −1 Original line number Diff line number Diff line Loading @@ -450,7 +450,10 @@ static void hal_reg_write_work(void *arg) uint32_t *addr; q_elem = &hal->reg_write_queue[(hal->read_idx)]; q_elem->work_scheduled_time = qdf_get_log_timestamp(); /* Make sure q_elem consistent in the memory for multi-cores */ qdf_rmb(); if (!q_elem->valid) return; Loading @@ -463,7 +466,11 @@ static void hal_reg_write_work(void *arg) return; } while (q_elem->valid) { while (true) { qdf_rmb(); if (!q_elem->valid) break; q_elem->dequeue_time = qdf_get_log_timestamp(); ring_id = q_elem->srng->ring_id; addr = q_elem->addr; Loading Loading @@ -558,6 +565,17 @@ static void hal_reg_write_enqueue(struct hal_soc *hal_soc, qdf_wmb(); q_elem->valid = true; /* * After all other fields in the q_elem has been updated * in memory successfully, the valid flag needs to be updated * in memory in time too. * Else there is a chance that the dequeuing worker thread * might read stale valid flag and the work will be bypassed * for this round. And if there is no other work scheduled * later, this hal register writing won't be updated any more. */ qdf_wmb(); srng->reg_write_in_progress = true; qdf_atomic_inc(&hal_soc->active_work_cnt); Loading