Loading dp/wifi3.0/dp_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -426,6 +426,7 @@ static inline void dp_wds_ext_peer_init(struct dp_peer *peer) * 2.4GHz band uses lmac_id = 1 * 5GHz/6GHz band uses lmac_id=0 */ #define DP_INVALID_LMAC_ID (-1) #define DP_MON_INVALID_LMAC_ID (-1) #define DP_MON_2G_LMAC_ID 1 #define DP_MON_5G_LMAC_ID 0 Loading dp/wifi3.0/dp_main.c +15 −8 Original line number Diff line number Diff line Loading @@ -3368,13 +3368,15 @@ bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, uint32_t *remap2) * * @tx_ring_num: Tx ring number * @tx_ipa_ring_sz: Return param only updated for IPA. * @soc_cfg_ctx: dp soc cfg context * * Return: None */ static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz) static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { if (tx_ring_num == IPA_TCL_DATA_RING_IDX) *tx_ipa_ring_sz = WLAN_CFG_IPA_TX_RING_SIZE; *tx_ipa_ring_sz = wlan_cfg_ipa_tx_ring_size(soc_cfg_ctx); } /** Loading @@ -3382,14 +3384,17 @@ static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz) * * @tx_comp_ring_num: Tx comp ring number * @tx_comp_ipa_ring_sz: Return param only updated for IPA. * @soc_cfg_ctx: dp soc cfg context * * Return: None */ static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, int *tx_comp_ipa_ring_sz) int *tx_comp_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { if (tx_comp_ring_num == IPA_TCL_DATA_RING_IDX) *tx_comp_ipa_ring_sz = WLAN_CFG_IPA_TX_COMP_RING_SIZE; *tx_comp_ipa_ring_sz = wlan_cfg_ipa_tx_comp_ring_size(soc_cfg_ctx); } #else static uint8_t dp_reo_ring_selection(uint32_t value, uint32_t *ring) Loading Loading @@ -3523,12 +3528,14 @@ static bool dp_reo_remap_config(struct dp_soc *soc, return true; } static void dp_ipa_get_tx_ring_size(int ring_num, int *tx_ipa_ring_sz) static void dp_ipa_get_tx_ring_size(int ring_num, int *tx_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { } static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, int *tx_comp_ipa_ring_sz) int *tx_comp_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { } #endif /* IPA_OFFLOAD */ Loading Loading @@ -3661,7 +3668,7 @@ static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc, int cached = 0; tx_ring_size = wlan_cfg_tx_ring_size(soc_cfg_ctx); dp_ipa_get_tx_ring_size(index, &tx_ring_size); dp_ipa_get_tx_ring_size(index, &tx_ring_size, soc_cfg_ctx); if (dp_srng_alloc(soc, &soc->tcl_data_ring[index], TCL_DATA, tx_ring_size, cached)) { Loading @@ -3670,7 +3677,7 @@ static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc, } tx_comp_ring_size = wlan_cfg_tx_comp_ring_size(soc_cfg_ctx); dp_ipa_get_tx_comp_ring_size(index, &tx_comp_ring_size); dp_ipa_get_tx_comp_ring_size(index, &tx_comp_ring_size, soc_cfg_ctx); /* Enable cached TCL desc if NSS offload is disabled */ if (!wlan_cfg_get_dp_soc_nss_cfg(soc_cfg_ctx)) cached = WLAN_CFG_DST_RING_CACHED_DESC; Loading dp/wifi3.0/dp_peer.c +17 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 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 Loading Loading @@ -548,6 +548,9 @@ static inline void dp_peer_ast_cleanup(struct dp_soc *soc, txrx_ast_free_cb cb = ast->callback; void *cookie = ast->cookie; dp_debug("mac_addr: " QDF_MAC_ADDR_FMT ", cb: %pK, cookie: %pK", QDF_MAC_ADDR_REF(ast->mac_addr.raw), cb, cookie); /* Call the callbacks to free up the cookie */ if (cb) { ast->callback = NULL; Loading Loading @@ -576,6 +579,8 @@ static void dp_peer_ast_hash_detach(struct dp_soc *soc) if (!soc->ast_hash.bins) return; dp_debug("%pK: num_ast_entries: %u", soc, soc->num_ast_entries); qdf_spin_lock_bh(&soc->ast_lock); for (index = 0; index <= soc->ast_hash.mask; index++) { if (!TAILQ_EMPTY(&soc->ast_hash.bins[index])) { Loading Loading @@ -653,6 +658,9 @@ void dp_peer_ast_hash_remove(struct dp_soc *soc, /* Check if tail is not empty before delete*/ QDF_ASSERT(!TAILQ_EMPTY(&soc->ast_hash.bins[index])); dp_debug("ID: %u idx: %u mac_addr: " QDF_MAC_ADDR_FMT, ase->peer_id, index, QDF_MAC_ADDR_REF(ase->mac_addr.raw)); TAILQ_FOREACH(tmpase, &soc->ast_hash.bins[index], hash_list_elem) { if (tmpase == ase) { found = 1; Loading Loading @@ -1228,6 +1236,10 @@ void dp_peer_free_ast_entry(struct dp_soc *soc, * NOTE: Ensure that call to this API is done * after soc->ast_lock is taken */ dp_debug("type: %d ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT, ast_entry->type, ast_entry->peer_id, ast_entry->vdev_id, QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw)); ast_entry->callback = NULL; ast_entry->cookie = NULL; Loading Loading @@ -1312,6 +1324,10 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry) return; } dp_debug("call by %ps: ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT, (void *)_RET_IP_, ast_entry->peer_id, ast_entry->vdev_id, QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw)); ast_entry->delete_in_progress = true; /* In teardown del ast is called after setting logical delete state Loading dp/wifi3.0/dp_peer.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 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 Loading Loading @@ -841,6 +841,7 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc, { struct dp_ast_entry *ast_entry, *temp_ast_entry; dp_debug("peer: %pK, self_ast: %pK", peer, peer->self_ast_entry); /* * Delete peer self ast entry. This is done to handle scenarios * where peer is freed before peer map is received(for ex in case Loading dp/wifi3.0/dp_rx.c +2 −0 Original line number Diff line number Diff line Loading @@ -3536,6 +3536,8 @@ bool dp_rx_deliver_special_frame(struct dp_soc *soc, struct dp_peer *peer, qdf_nbuf_pull_head(nbuf, skip_len); if (dp_rx_is_special_frame(nbuf, frame_mask)) { dp_info("special frame, mpdu sn 0x%x", hal_rx_get_rx_sequence(soc->hal_soc, rx_tlv_hdr)); qdf_nbuf_set_exc_frame(nbuf, 1); dp_rx_deliver_to_stack(soc, peer->vdev, peer, nbuf, NULL); Loading Loading
dp/wifi3.0/dp_internal.h +1 −0 Original line number Diff line number Diff line Loading @@ -426,6 +426,7 @@ static inline void dp_wds_ext_peer_init(struct dp_peer *peer) * 2.4GHz band uses lmac_id = 1 * 5GHz/6GHz band uses lmac_id=0 */ #define DP_INVALID_LMAC_ID (-1) #define DP_MON_INVALID_LMAC_ID (-1) #define DP_MON_2G_LMAC_ID 1 #define DP_MON_5G_LMAC_ID 0 Loading
dp/wifi3.0/dp_main.c +15 −8 Original line number Diff line number Diff line Loading @@ -3368,13 +3368,15 @@ bool dp_reo_remap_config(struct dp_soc *soc, uint32_t *remap1, uint32_t *remap2) * * @tx_ring_num: Tx ring number * @tx_ipa_ring_sz: Return param only updated for IPA. * @soc_cfg_ctx: dp soc cfg context * * Return: None */ static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz) static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { if (tx_ring_num == IPA_TCL_DATA_RING_IDX) *tx_ipa_ring_sz = WLAN_CFG_IPA_TX_RING_SIZE; *tx_ipa_ring_sz = wlan_cfg_ipa_tx_ring_size(soc_cfg_ctx); } /** Loading @@ -3382,14 +3384,17 @@ static void dp_ipa_get_tx_ring_size(int tx_ring_num, int *tx_ipa_ring_sz) * * @tx_comp_ring_num: Tx comp ring number * @tx_comp_ipa_ring_sz: Return param only updated for IPA. * @soc_cfg_ctx: dp soc cfg context * * Return: None */ static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, int *tx_comp_ipa_ring_sz) int *tx_comp_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { if (tx_comp_ring_num == IPA_TCL_DATA_RING_IDX) *tx_comp_ipa_ring_sz = WLAN_CFG_IPA_TX_COMP_RING_SIZE; *tx_comp_ipa_ring_sz = wlan_cfg_ipa_tx_comp_ring_size(soc_cfg_ctx); } #else static uint8_t dp_reo_ring_selection(uint32_t value, uint32_t *ring) Loading Loading @@ -3523,12 +3528,14 @@ static bool dp_reo_remap_config(struct dp_soc *soc, return true; } static void dp_ipa_get_tx_ring_size(int ring_num, int *tx_ipa_ring_sz) static void dp_ipa_get_tx_ring_size(int ring_num, int *tx_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { } static void dp_ipa_get_tx_comp_ring_size(int tx_comp_ring_num, int *tx_comp_ipa_ring_sz) int *tx_comp_ipa_ring_sz, struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx) { } #endif /* IPA_OFFLOAD */ Loading Loading @@ -3661,7 +3668,7 @@ static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc, int cached = 0; tx_ring_size = wlan_cfg_tx_ring_size(soc_cfg_ctx); dp_ipa_get_tx_ring_size(index, &tx_ring_size); dp_ipa_get_tx_ring_size(index, &tx_ring_size, soc_cfg_ctx); if (dp_srng_alloc(soc, &soc->tcl_data_ring[index], TCL_DATA, tx_ring_size, cached)) { Loading @@ -3670,7 +3677,7 @@ static QDF_STATUS dp_alloc_tx_ring_pair_by_index(struct dp_soc *soc, } tx_comp_ring_size = wlan_cfg_tx_comp_ring_size(soc_cfg_ctx); dp_ipa_get_tx_comp_ring_size(index, &tx_comp_ring_size); dp_ipa_get_tx_comp_ring_size(index, &tx_comp_ring_size, soc_cfg_ctx); /* Enable cached TCL desc if NSS offload is disabled */ if (!wlan_cfg_get_dp_soc_nss_cfg(soc_cfg_ctx)) cached = WLAN_CFG_DST_RING_CACHED_DESC; Loading
dp/wifi3.0/dp_peer.c +17 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 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 Loading Loading @@ -548,6 +548,9 @@ static inline void dp_peer_ast_cleanup(struct dp_soc *soc, txrx_ast_free_cb cb = ast->callback; void *cookie = ast->cookie; dp_debug("mac_addr: " QDF_MAC_ADDR_FMT ", cb: %pK, cookie: %pK", QDF_MAC_ADDR_REF(ast->mac_addr.raw), cb, cookie); /* Call the callbacks to free up the cookie */ if (cb) { ast->callback = NULL; Loading Loading @@ -576,6 +579,8 @@ static void dp_peer_ast_hash_detach(struct dp_soc *soc) if (!soc->ast_hash.bins) return; dp_debug("%pK: num_ast_entries: %u", soc, soc->num_ast_entries); qdf_spin_lock_bh(&soc->ast_lock); for (index = 0; index <= soc->ast_hash.mask; index++) { if (!TAILQ_EMPTY(&soc->ast_hash.bins[index])) { Loading Loading @@ -653,6 +658,9 @@ void dp_peer_ast_hash_remove(struct dp_soc *soc, /* Check if tail is not empty before delete*/ QDF_ASSERT(!TAILQ_EMPTY(&soc->ast_hash.bins[index])); dp_debug("ID: %u idx: %u mac_addr: " QDF_MAC_ADDR_FMT, ase->peer_id, index, QDF_MAC_ADDR_REF(ase->mac_addr.raw)); TAILQ_FOREACH(tmpase, &soc->ast_hash.bins[index], hash_list_elem) { if (tmpase == ase) { found = 1; Loading Loading @@ -1228,6 +1236,10 @@ void dp_peer_free_ast_entry(struct dp_soc *soc, * NOTE: Ensure that call to this API is done * after soc->ast_lock is taken */ dp_debug("type: %d ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT, ast_entry->type, ast_entry->peer_id, ast_entry->vdev_id, QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw)); ast_entry->callback = NULL; ast_entry->cookie = NULL; Loading Loading @@ -1312,6 +1324,10 @@ void dp_peer_del_ast(struct dp_soc *soc, struct dp_ast_entry *ast_entry) return; } dp_debug("call by %ps: ID: %u vid: %u mac_addr: " QDF_MAC_ADDR_FMT, (void *)_RET_IP_, ast_entry->peer_id, ast_entry->vdev_id, QDF_MAC_ADDR_REF(ast_entry->mac_addr.raw)); ast_entry->delete_in_progress = true; /* In teardown del ast is called after setting logical delete state Loading
dp/wifi3.0/dp_peer.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2021 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 Loading Loading @@ -841,6 +841,7 @@ static inline void dp_peer_delete_ast_entries(struct dp_soc *soc, { struct dp_ast_entry *ast_entry, *temp_ast_entry; dp_debug("peer: %pK, self_ast: %pK", peer, peer->self_ast_entry); /* * Delete peer self ast entry. This is done to handle scenarios * where peer is freed before peer map is received(for ex in case Loading
dp/wifi3.0/dp_rx.c +2 −0 Original line number Diff line number Diff line Loading @@ -3536,6 +3536,8 @@ bool dp_rx_deliver_special_frame(struct dp_soc *soc, struct dp_peer *peer, qdf_nbuf_pull_head(nbuf, skip_len); if (dp_rx_is_special_frame(nbuf, frame_mask)) { dp_info("special frame, mpdu sn 0x%x", hal_rx_get_rx_sequence(soc->hal_soc, rx_tlv_hdr)); qdf_nbuf_set_exc_frame(nbuf, 1); dp_rx_deliver_to_stack(soc, peer->vdev, peer, nbuf, NULL); Loading