qcacmn: Fix QDF nbuf documentation
The kernel-doc script identified a large number of documentation issues in the QDF nbuf abstractions, so fix those issues. In addition, there are a number of instances where public functions have their implementation documented instead of having their interface documented, so move that documentation. Change-Id: I744e98469d0fd6d6a2c7c907b2f9af5307f84458 CRs-Fixed: 3398757
This commit is contained in:

committed by
Madan Koyyalamudi

parent
0571d2f7bf
commit
a81eb57e42
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017,2019-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2017,2019-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -180,7 +180,7 @@ static inline uint8_t qdf_nbuf_is_rx_ipa_smmu_map(qdf_nbuf_t buf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
|
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
|
||||||
or sw exception flag
|
* or sw exception flag
|
||||||
* @buf: Network buffer
|
* @buf: Network buffer
|
||||||
* @value: value to set
|
* @value: value to set
|
||||||
*
|
*
|
||||||
@@ -194,7 +194,7 @@ static inline void qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt(qdf_nbuf_t buf,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_rx_reo_dest_ind_or_sw_excpt() - get reo destination indication
|
* qdf_nbuf_get_rx_reo_dest_ind_or_sw_excpt() - get reo destination indication
|
||||||
or sw exception flag
|
* or sw exception flag
|
||||||
* @buf: Network buffer
|
* @buf: Network buffer
|
||||||
*
|
*
|
||||||
* Return reo destination indication value (0 ~ 31) or sw exception (0 ~ 1)
|
* Return reo destination indication value (0 ~ 31) or sw exception (0 ~ 1)
|
||||||
|
@@ -236,7 +236,7 @@ static inline void qdf_nbuf_ipa_priv_set(qdf_nbuf_t buf, uint32_t priv)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
|
* qdf_nbuf_set_rx_reo_dest_ind_or_sw_excpt() - set reo destination indication
|
||||||
or sw exception flag
|
* or sw exception flag
|
||||||
* @buf: Network buffer
|
* @buf: Network buffer
|
||||||
* @value: value to set
|
* @value: value to set
|
||||||
*
|
*
|
||||||
|
@@ -243,11 +243,11 @@ enum wsc_op_code {
|
|||||||
#define QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS 8
|
#define QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS 8
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_queue_t - Platform independent packet queue abstraction
|
* typedef qdf_nbuf_queue_t - Platform independent packet queue abstraction
|
||||||
*/
|
*/
|
||||||
typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* This is the length for radiotap, combined length
|
* This is the length for radiotap, combined length
|
||||||
* (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN)
|
* (Mandatory part struct ieee80211_radiotap_header + RADIOTAP_HEADER_LEN)
|
||||||
* cannot be more than available headroom_sz.
|
* cannot be more than available headroom_sz.
|
||||||
@@ -352,9 +352,9 @@ typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
|||||||
* @vht_flag_values3: VHT flag value 3
|
* @vht_flag_values3: VHT flag value 3
|
||||||
* @vht_flag_values4: VHT flag value 4
|
* @vht_flag_values4: VHT flag value 4
|
||||||
* @vht_flag_values5: VHT flag value 5
|
* @vht_flag_values5: VHT flag value 5
|
||||||
* @he_sig_b_common_RU[4]: HE (11ax) common RU assignment index
|
* @he_sig_b_common_RU: HE (11ax) common RU assignment index
|
||||||
* @rssi_comb: Combined RSSI
|
* @rssi_comb: Combined RSSI
|
||||||
* @rssi[MAX_CHAIN]: 8 bits RSSI per 20Mhz per chain
|
* @rssi: 8 bits RSSI per 20 MHz per chain
|
||||||
* @duration: 802.11 Duration
|
* @duration: 802.11 Duration
|
||||||
* @frame_control: frame control field
|
* @frame_control: frame control field
|
||||||
* @ast_index: AST table hash index
|
* @ast_index: AST table hash index
|
||||||
@@ -365,12 +365,14 @@ typedef __qdf_nbuf_queue_t qdf_nbuf_queue_t;
|
|||||||
* @he_per_user_known: HE per user known info
|
* @he_per_user_known: HE per user known info
|
||||||
* @he_flags1: HE flags
|
* @he_flags1: HE flags
|
||||||
* @he_flags2: HE flags
|
* @he_flags2: HE flags
|
||||||
* @he_RU[4]: HE RU assignment index
|
* @he_RU: HE RU assignment index
|
||||||
* @he_data1: HE property of received frame
|
* @he_data1: HE property of received frame
|
||||||
* @he_data2: HE property of received frame
|
* @he_data2: HE property of received frame
|
||||||
* @he_data3: HE property of received frame
|
* @he_data3: HE property of received frame
|
||||||
* @he_data4: HE property of received frame
|
* @he_data4: HE property of received frame
|
||||||
* @he_data5: HE property of received frame
|
* @he_data5: HE property of received frame
|
||||||
|
* @he_data6: HE property of received frame
|
||||||
|
* @ppdu_len: PPDU length
|
||||||
* @prev_ppdu_id: ppdu_id in previously received message
|
* @prev_ppdu_id: ppdu_id in previously received message
|
||||||
* @ppdu_id: Id of the PLCP protocol data unit
|
* @ppdu_id: Id of the PLCP protocol data unit
|
||||||
*
|
*
|
||||||
@@ -555,16 +557,21 @@ struct mon_rx_status {
|
|||||||
* @frame_control_info_valid: field indicates if fc value is valid
|
* @frame_control_info_valid: field indicates if fc value is valid
|
||||||
* @frame_control: frame control field
|
* @frame_control: frame control field
|
||||||
* @data_sequence_control_info_valid: field to indicate validity of seq control
|
* @data_sequence_control_info_valid: field to indicate validity of seq control
|
||||||
|
* @ba_bitmap_sz: blockack bitmap size
|
||||||
* @filter_category: mpdu filter category
|
* @filter_category: mpdu filter category
|
||||||
* @tcp_msdu_count: tcp protocol msdu count
|
* @tcp_msdu_count: tcp protocol msdu count
|
||||||
* @udp_msdu_count: udp protocol msdu count
|
* @udp_msdu_count: udp protocol msdu count
|
||||||
* @other_msdu_count: other protocol msdu count
|
* @other_msdu_count: other protocol msdu count
|
||||||
* @first_data_seq_ctrl: Sequence ctrl field of first data frame
|
* @first_data_seq_ctrl: Sequence ctrl field of first data frame
|
||||||
* @duration: 802.11 Duration
|
* @duration: 802.11 Duration
|
||||||
* @vht_flag_values1-5: Contains corresponding data for flags field
|
* @vht_flag_values2: Contains corresponding data for flags field
|
||||||
|
* @vht_flag_values3: Contains corresponding data for flags field
|
||||||
|
* @vht_flag_values4: Contains corresponding data for flags field
|
||||||
|
* @vht_flag_values5: Contains corresponding data for flags field
|
||||||
|
* @vht_flag_values6: Contains corresponding data for flags field
|
||||||
* @he_flags1: HE flags
|
* @he_flags1: HE flags
|
||||||
* @he_flags2: HE flags
|
* @he_flags2: HE flags
|
||||||
* @he_RU[4]: HE RU assignment index
|
* @he_RU: HE RU assignment index
|
||||||
* @he_data1: HE property of received frame
|
* @he_data1: HE property of received frame
|
||||||
* @he_data2: HE property of received frame
|
* @he_data2: HE property of received frame
|
||||||
* @he_data3: HE property of received frame
|
* @he_data3: HE property of received frame
|
||||||
@@ -666,6 +673,7 @@ struct qdf_radiotap_vendor_ns {
|
|||||||
* struct qdf_radiotap_vendor_ns_ath - Combined QTI Vendor NS
|
* struct qdf_radiotap_vendor_ns_ath - Combined QTI Vendor NS
|
||||||
* including the Radiotap specified Vendor Namespace header and
|
* including the Radiotap specified Vendor Namespace header and
|
||||||
* QTI specific Vendor Namespace data
|
* QTI specific Vendor Namespace data
|
||||||
|
* @hdr: radiotap vendor namespace header
|
||||||
* @lsig: L_SIG_A (or L_SIG)
|
* @lsig: L_SIG_A (or L_SIG)
|
||||||
* @device_id: Device Identification
|
* @device_id: Device Identification
|
||||||
* @lsig_b: L_SIG_B
|
* @lsig_b: L_SIG_B
|
||||||
@@ -682,11 +690,12 @@ struct qdf_radiotap_vendor_ns_ath {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct qdf_radiotap_ext2 - radiotap ext2 fields
|
* struct qdf_radiotap_ext2 - radiotap ext2 fields
|
||||||
* ppdu_id: ppdu_id of current msdu
|
* @ppdu_id: ppdu_id of current msdu
|
||||||
* prev_ppdu_id: ppdu_id of previous msdu
|
* @prev_ppdu_id: ppdu_id of previous msdu
|
||||||
* tid: tid number of previous msdu
|
* @tid: tid number of previous msdu
|
||||||
* start_seq: start sequence of previous msdu
|
* @reserved: reserved bits
|
||||||
* ba_bitmap: block ack bitmap of previous msdu
|
* @start_seq: start sequence of previous msdu
|
||||||
|
* @ba_bitmap: block ack bitmap of previous msdu
|
||||||
*/
|
*/
|
||||||
struct qdf_radiotap_ext2 {
|
struct qdf_radiotap_ext2 {
|
||||||
uint32_t ppdu_id;
|
uint32_t ppdu_id;
|
||||||
@@ -1025,14 +1034,15 @@ struct qdf_radiotap_ext2 {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* enum qdf_proto_type - protocol type
|
* enum qdf_proto_type - protocol type
|
||||||
* @QDF_PROTO_TYPE_DHCP - DHCP
|
* @QDF_PROTO_TYPE_DHCP: DHCP
|
||||||
* @QDF_PROTO_TYPE_EAPOL - EAPOL
|
* @QDF_PROTO_TYPE_EAPOL: EAPOL
|
||||||
* @QDF_PROTO_TYPE_ARP - ARP
|
* @QDF_PROTO_TYPE_ARP: ARP
|
||||||
* @QDF_PROTO_TYPE_MGMT - MGMT
|
* @QDF_PROTO_TYPE_MGMT: MGMT
|
||||||
* @QDF_PROTO_TYPE_ICMP - ICMP
|
* @QDF_PROTO_TYPE_ICMP: ICMP
|
||||||
* @QDF_PROTO_TYPE_ICMPv6 - ICMPv6
|
* @QDF_PROTO_TYPE_ICMPv6: ICMPv6
|
||||||
* @QDF_PROTO_TYPE_EVENT - EVENT
|
* @QDF_PROTO_TYPE_EVENT: EVENT
|
||||||
* @QDF_PROTO_TYPE_DNS - DNS
|
* @QDF_PROTO_TYPE_DNS: DNS
|
||||||
|
* @QDF_PROTO_TYPE_MAX: Max enumeration
|
||||||
*/
|
*/
|
||||||
enum qdf_proto_type {
|
enum qdf_proto_type {
|
||||||
QDF_PROTO_TYPE_DHCP,
|
QDF_PROTO_TYPE_DHCP,
|
||||||
@@ -1047,11 +1057,11 @@ enum qdf_proto_type {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_reception_type - reception type used by lithium phy TLV
|
* enum qdf_reception_type - reception type used by lithium phy TLV
|
||||||
* @QDF_RECEPTION_TYPE_ULOFMDA - UL OFDMA
|
* @QDF_RECEPTION_TYPE_ULOFMDA: UL OFDMA
|
||||||
* @QDF_RECEPTION_TYPE_ULMIMO - UL MIMO
|
* @QDF_RECEPTION_TYPE_ULMIMO: UL MIMO
|
||||||
* @QQDF_RECEPTION_TYPE_FRAMELESS - Frame less
|
* @QDF_RECEPTION_TYPE_FRAMELESS: Frame less
|
||||||
* @QDF_RECEPTION_TYPE_OTHER - All the other types
|
* @QDF_RECEPTION_TYPE_OTHER: All the other types
|
||||||
*/
|
*/
|
||||||
enum qdf_reception_type {
|
enum qdf_reception_type {
|
||||||
QDF_RECEPTION_TYPE_ULOFMDA,
|
QDF_RECEPTION_TYPE_ULOFMDA,
|
||||||
@@ -1061,19 +1071,19 @@ enum qdf_reception_type {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cb_ftype - Frame type information in skb cb
|
* enum cb_ftype - Frame type information in skb cb
|
||||||
* @CB_FTYPE_INVALID - Invalid
|
* @CB_FTYPE_INVALID: Invalid
|
||||||
* @CB_FTYPE_MCAST2UCAST - Multicast to Unicast converted packet
|
* @CB_FTYPE_MCAST2UCAST: Multicast to Unicast converted packet
|
||||||
* @CB_FTYPE_TSO - TCP Segmentation Offload
|
* @CB_FTYPE_TSO: TCP Segmentation Offload
|
||||||
* @CB_FTYPE_TSO_SG - TSO Scatter Gather
|
* @CB_FTYPE_TSO_SG: TSO Scatter Gather
|
||||||
* @CB_FTYPE_SG - Scatter Gather
|
* @CB_FTYPE_SG: Scatter Gather
|
||||||
* @CB_FTYPE_INTRABSS_FWD - Intra BSS forwarding
|
* @CB_FTYPE_INTRABSS_FWD: Intra BSS forwarding
|
||||||
* @CB_FTYPE_RX_INFO - Rx information
|
* @CB_FTYPE_RX_INFO: Rx information
|
||||||
* @CB_FTYPE_MESH_RX_INFO - Mesh Rx information
|
* @CB_FTYPE_MESH_RX_INFO: Mesh Rx information
|
||||||
* @CB_FTYPE_MESH_TX_INFO - Mesh Tx information
|
* @CB_FTYPE_MESH_TX_INFO: Mesh Tx information
|
||||||
* @CB_FTYPE_DMS - Directed Multicast Service
|
* @CB_FTYPE_DMS: Directed Multicast Service
|
||||||
* @CB_FTYPE_SAWF - SAWF information
|
* @CB_FTYPE_SAWF: SAWF information
|
||||||
* @CB_FTYPE_MLO_MCAST - MLO MCAST enable information
|
* @CB_FTYPE_MLO_MCAST: MLO MCAST enable information
|
||||||
*/
|
*/
|
||||||
enum cb_ftype {
|
enum cb_ftype {
|
||||||
CB_FTYPE_INVALID = 0,
|
CB_FTYPE_INVALID = 0,
|
||||||
@@ -1091,12 +1101,12 @@ enum cb_ftype {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_t - Platform independent packet abstraction
|
* typedef qdf_nbuf_t - Platform independent packet abstraction
|
||||||
*/
|
*/
|
||||||
typedef __qdf_nbuf_t qdf_nbuf_t;
|
typedef __qdf_nbuf_t qdf_nbuf_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_shared_info_t- Platform independent shared info
|
* typedef qdf_nbuf_shared_info_t - Platform independent shared info
|
||||||
*/
|
*/
|
||||||
typedef __qdf_nbuf_shared_info_t qdf_nbuf_shared_info_t;
|
typedef __qdf_nbuf_shared_info_t qdf_nbuf_shared_info_t;
|
||||||
|
|
||||||
@@ -1157,7 +1167,10 @@ typedef struct qdf_nbuf_track_t QDF_NBUF_TRACK;
|
|||||||
typedef __qdf_nbuf_queue_head_t qdf_nbuf_queue_head_t;
|
typedef __qdf_nbuf_queue_head_t qdf_nbuf_queue_head_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_dma_map_cb_t - Dma map callback prototype
|
* typedef qdf_dma_map_cb_t() - Dma map callback prototype
|
||||||
|
* @arg: callback context
|
||||||
|
* @buf: netbuf
|
||||||
|
* @dmap: DMA map
|
||||||
*/
|
*/
|
||||||
typedef void (*qdf_dma_map_cb_t)(void *arg, qdf_nbuf_t buf,
|
typedef void (*qdf_dma_map_cb_t)(void *arg, qdf_nbuf_t buf,
|
||||||
qdf_dma_map_t dmap);
|
qdf_dma_map_t dmap);
|
||||||
@@ -1885,7 +1898,7 @@ static inline uint8_t qdf_nbuf_get_tid_val(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_frag_list() - set frag list bit
|
* qdf_nbuf_set_is_frag() - set frag list bit
|
||||||
* @buf: Network buffer
|
* @buf: Network buffer
|
||||||
* @val: 0/1
|
* @val: 0/1
|
||||||
*
|
*
|
||||||
@@ -1897,7 +1910,7 @@ static inline void qdf_nbuf_set_is_frag(qdf_nbuf_t buf, uint8_t val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_is_sa_valid() - get da frag list bit
|
* qdf_nbuf_is_frag() - get da frag list bit
|
||||||
* @buf: Network buffer
|
* @buf: Network buffer
|
||||||
*
|
*
|
||||||
* Return: integer value - 0/1
|
* Return: integer value - 0/1
|
||||||
@@ -1986,7 +1999,7 @@ qdf_nbuf_dma_map_info(qdf_dma_map_t bmap, qdf_dmamap_info_t *sg)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_is_tso() - is the network buffer a jumbo packet?
|
* qdf_nbuf_is_tso() - is the network buffer a jumbo packet?
|
||||||
* @buf: Network buffer
|
* @nbuf: Network buffer
|
||||||
*
|
*
|
||||||
* Return: 1 - this is a jumbo packet 0 - not a jumbo packet
|
* Return: 1 - this is a jumbo packet 0 - not a jumbo packet
|
||||||
*/
|
*/
|
||||||
@@ -2078,27 +2091,70 @@ enum qdf_nbuf_event_type {
|
|||||||
QDF_NBUF_SMMU_UNMAP,
|
QDF_NBUF_SMMU_UNMAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_net_buf_debug_init() - initialize network buffer debug functionality
|
||||||
|
*
|
||||||
|
* QDF network buffer debug feature tracks all SKBs allocated by WLAN driver
|
||||||
|
* in a hash table and when driver is unloaded it reports about leaked SKBs.
|
||||||
|
* WLAN driver module whose allocated SKB is freed by network stack are
|
||||||
|
* suppose to call qdf_net_buf_debug_release_skb() such that the SKB is not
|
||||||
|
* reported as memory leak.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_net_buf_debug_init(void);
|
void qdf_net_buf_debug_init(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_net_buf_debug_exit() - exit network buffer debug functionality
|
||||||
|
*
|
||||||
|
* Exit network buffer tracking debug functionality and log SKB memory leaks
|
||||||
|
* As part of exiting the functionality, free the leaked memory and
|
||||||
|
* cleanup the tracking buffers.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_net_buf_debug_exit(void);
|
void qdf_net_buf_debug_exit(void);
|
||||||
|
|
||||||
void qdf_net_buf_debug_clean(void);
|
void qdf_net_buf_debug_clean(void);
|
||||||
void qdf_nbuf_history_add(qdf_nbuf_t nbuf, const char *func, uint32_t line,
|
void qdf_nbuf_history_add(qdf_nbuf_t nbuf, const char *func, uint32_t line,
|
||||||
enum qdf_nbuf_event_type type);
|
enum qdf_nbuf_event_type type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_net_buf_debug_add_node() - store skb in debug hash table
|
||||||
|
* @net_buf: network buffer
|
||||||
|
* @size: buffer size
|
||||||
|
* @func_name: function name that requests for mapping the nbuf
|
||||||
|
* @line_num: function line number
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_net_buf_debug_add_node(qdf_nbuf_t net_buf, size_t size,
|
void qdf_net_buf_debug_add_node(qdf_nbuf_t net_buf, size_t size,
|
||||||
const char *func_name, uint32_t line_num);
|
const char *func_name, uint32_t line_num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_net_buf_debug_update_node() - update nbuf in debug hash table
|
* qdf_net_buf_debug_update_node() - update nbuf in debug hash table
|
||||||
|
* @net_buf: network buffer
|
||||||
|
* @func_name: function name that requests for mapping the nbuf
|
||||||
|
* @line_num: function line number
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
void qdf_net_buf_debug_update_node(qdf_nbuf_t net_buf, const char *func_name,
|
void qdf_net_buf_debug_update_node(qdf_nbuf_t net_buf, const char *func_name,
|
||||||
uint32_t line_num);
|
uint32_t line_num);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_net_buf_debug_delete_node() - remove skb from debug hash table
|
||||||
|
* @net_buf: network buffer
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_net_buf_debug_delete_node(qdf_nbuf_t net_buf);
|
void qdf_net_buf_debug_delete_node(qdf_nbuf_t net_buf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_net_buf_debug_update_map_node() - update nbuf in debug
|
* qdf_net_buf_debug_update_map_node() - update nbuf in debug
|
||||||
* hash table with the mapping function info
|
* hash table with the mapping function info
|
||||||
* @nbuf: network buffer
|
* @net_buf: network buffer
|
||||||
* @func: function name that requests for mapping the nbuf
|
* @func_name: function name that requests for mapping the nbuf
|
||||||
* @line_num: function line number
|
* @line_num: function line number
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
@@ -2155,8 +2211,8 @@ void qdf_net_buf_debug_update_smmu_unmap_node(qdf_nbuf_t nbuf,
|
|||||||
/**
|
/**
|
||||||
* qdf_net_buf_debug_update_unmap_node() - update nbuf in debug
|
* qdf_net_buf_debug_update_unmap_node() - update nbuf in debug
|
||||||
* hash table with the unmap function info
|
* hash table with the unmap function info
|
||||||
* @nbuf: network buffer
|
* @net_buf: network buffer
|
||||||
* @func: function name that requests for unmapping the nbuf
|
* @func_name: function name that requests for unmapping the nbuf
|
||||||
* @line_num: function line number
|
* @line_num: function line number
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
@@ -2180,6 +2236,17 @@ void qdf_net_buf_debug_update_unmap_node(qdf_nbuf_t net_buf,
|
|||||||
void qdf_net_buf_debug_acquire_skb(qdf_nbuf_t net_buf,
|
void qdf_net_buf_debug_acquire_skb(qdf_nbuf_t net_buf,
|
||||||
const char *func_name,
|
const char *func_name,
|
||||||
uint32_t line_num);
|
uint32_t line_num);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_net_buf_debug_release_skb() - release skb to avoid memory leak
|
||||||
|
* @net_buf: Network buf holding head segment (single)
|
||||||
|
*
|
||||||
|
* WLAN driver module whose allocated SKB is freed by network stack are
|
||||||
|
* suppose to call this API before returning SKB to network stack such
|
||||||
|
* that the SKB is not reported as memory leak.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_net_buf_debug_release_skb(qdf_nbuf_t net_buf);
|
void qdf_net_buf_debug_release_skb(qdf_nbuf_t net_buf);
|
||||||
|
|
||||||
/* nbuf allocation routines */
|
/* nbuf allocation routines */
|
||||||
@@ -2199,6 +2266,20 @@ qdf_nbuf_t qdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size,
|
|||||||
* @size: Size to be allocated for skb
|
* @size: Size to be allocated for skb
|
||||||
* @reserve: Reserved headroom size
|
* @reserve: Reserved headroom size
|
||||||
* @align: Align
|
* @align: Align
|
||||||
|
*
|
||||||
|
* This API allocates skb of required size and aligns if needed and reserves
|
||||||
|
* some space in the front. This skb allocation is not from skb recycler pool.
|
||||||
|
*
|
||||||
|
* Return: Allocated nbuf pointer
|
||||||
|
*/
|
||||||
|
#define qdf_nbuf_alloc_no_recycler(size, reserve, align) \
|
||||||
|
qdf_nbuf_alloc_no_recycler_debug(size, reserve, align, __func__, __LINE__)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_alloc_no_recycler_debug() - Allocates skb
|
||||||
|
* @size: Size to be allocated for skb
|
||||||
|
* @reserve: Reserved headroom size
|
||||||
|
* @align: Align
|
||||||
* @func: Function name of the call site
|
* @func: Function name of the call site
|
||||||
* @line: Line number of the callsite
|
* @line: Line number of the callsite
|
||||||
*
|
*
|
||||||
@@ -2207,9 +2288,6 @@ qdf_nbuf_t qdf_nbuf_alloc_debug(qdf_device_t osdev, qdf_size_t size,
|
|||||||
*
|
*
|
||||||
* Return: Allocated nbuf pointer
|
* Return: Allocated nbuf pointer
|
||||||
*/
|
*/
|
||||||
#define qdf_nbuf_alloc_no_recycler(s, r, a) \
|
|
||||||
qdf_nbuf_alloc_no_recycler_debug(s, r, a, __func__, __LINE__)
|
|
||||||
|
|
||||||
qdf_nbuf_t qdf_nbuf_alloc_no_recycler_debug(size_t size, int reserve, int align,
|
qdf_nbuf_t qdf_nbuf_alloc_no_recycler_debug(size_t size, int reserve, int align,
|
||||||
const char *func, uint32_t line);
|
const char *func, uint32_t line);
|
||||||
#define qdf_nbuf_free(d) \
|
#define qdf_nbuf_free(d) \
|
||||||
@@ -2282,23 +2360,23 @@ qdf_nbuf_copy_expand_debug(qdf_nbuf_t buf, int headroom, int tailroom,
|
|||||||
* Return: New nbuf which is a copy of the received nbuf if it is cloned,
|
* Return: New nbuf which is a copy of the received nbuf if it is cloned,
|
||||||
* else, return the original nbuf
|
* else, return the original nbuf
|
||||||
*/
|
*/
|
||||||
#define qdf_nbuf_unshare(d) \
|
#define qdf_nbuf_unshare(buf) \
|
||||||
qdf_nbuf_unshare_debug(d, __func__, __LINE__)
|
qdf_nbuf_unshare_debug(buf, __func__, __LINE__)
|
||||||
|
|
||||||
qdf_nbuf_t
|
qdf_nbuf_t
|
||||||
qdf_nbuf_unshare_debug(qdf_nbuf_t buf, const char *func_name,
|
qdf_nbuf_unshare_debug(qdf_nbuf_t buf, const char *func_name,
|
||||||
uint32_t line_num);
|
uint32_t line_num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_kfree_list() - Free nbuf list using kfree
|
* qdf_nbuf_dev_kfree_list() - Free nbuf list using kfree
|
||||||
* @buf: Pointer to network buffer head
|
* @buf: Pointer to network buffer head
|
||||||
*
|
*
|
||||||
* This function is called to free the nbuf list on failure cases
|
* This function is called to free the nbuf list on failure cases
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
#define qdf_nbuf_dev_kfree_list(d) \
|
#define qdf_nbuf_dev_kfree_list(buf) \
|
||||||
qdf_nbuf_dev_kfree_list_debug(d, __func__, __LINE__)
|
qdf_nbuf_dev_kfree_list_debug(buf, __func__, __LINE__)
|
||||||
|
|
||||||
void
|
void
|
||||||
qdf_nbuf_dev_kfree_list_debug(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
qdf_nbuf_dev_kfree_list_debug(qdf_nbuf_queue_head_t *nbuf_queue_head,
|
||||||
@@ -2435,8 +2513,8 @@ static inline qdf_nbuf_t qdf_nbuf_unshare(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_kfree_list() - Free nbuf list using kfree
|
* qdf_nbuf_dev_kfree_list() - Free nbuf list using kfree
|
||||||
* @buf: Pointer to network buffer head
|
* @nbuf_queue_head: Pointer to buffer list head
|
||||||
*
|
*
|
||||||
* This function is called to free the nbuf list on failure cases
|
* This function is called to free the nbuf list on failure cases
|
||||||
*
|
*
|
||||||
@@ -2457,7 +2535,7 @@ qdf_nbuf_dev_kfree_list(qdf_nbuf_queue_head_t *nbuf_queue_head)
|
|||||||
/**
|
/**
|
||||||
* qdf_nbuf_dev_queue_head() - Queue a buffer at the list head
|
* qdf_nbuf_dev_queue_head() - Queue a buffer at the list head
|
||||||
* @nbuf_queue_head: Pointer to buffer list head
|
* @nbuf_queue_head: Pointer to buffer list head
|
||||||
* @buff: Pointer to network buffer head
|
* @buf: Pointer to network buffer head
|
||||||
*
|
*
|
||||||
* This function is called to queue a buffer at the list head
|
* This function is called to queue a buffer at the list head
|
||||||
*
|
*
|
||||||
@@ -2522,8 +2600,8 @@ qdf_nbuf_copy_expand_fraglist(qdf_nbuf_t buf, int headroom,
|
|||||||
#ifdef WLAN_FEATURE_FASTPATH
|
#ifdef WLAN_FEATURE_FASTPATH
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_init_fast() - before put buf into pool,turn it to init state
|
* qdf_nbuf_init_fast() - before put buf into pool,turn it to init state
|
||||||
|
* @nbuf: buf instance
|
||||||
*
|
*
|
||||||
* @buf: buf instance
|
|
||||||
* Return: data pointer of this buf where new data has to be
|
* Return: data pointer of this buf where new data has to be
|
||||||
* put, or NULL if there is not enough room in this buf.
|
* put, or NULL if there is not enough room in this buf.
|
||||||
*/
|
*/
|
||||||
@@ -2531,12 +2609,11 @@ void qdf_nbuf_init_fast(qdf_nbuf_t nbuf);
|
|||||||
#endif /* WLAN_FEATURE_FASTPATH */
|
#endif /* WLAN_FEATURE_FASTPATH */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_list_free() - free a list of nbufs
|
* qdf_nbuf_list_free() - free a list of nbufs
|
||||||
* @buf_list: A list of nbufs to be freed
|
* @buf_list: A list of nbufs to be freed
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static inline void qdf_nbuf_list_free(qdf_nbuf_t buf_list)
|
static inline void qdf_nbuf_list_free(qdf_nbuf_t buf_list)
|
||||||
{
|
{
|
||||||
while (buf_list) {
|
while (buf_list) {
|
||||||
@@ -2567,8 +2644,8 @@ static inline QDF_STATUS qdf_nbuf_cat(qdf_nbuf_t dst, qdf_nbuf_t src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_copy_bits() - return the length of the copy bits for skb
|
* qdf_nbuf_copy_bits() - return the length of the copy bits for skb
|
||||||
* @skb: SKB pointer
|
* @nbuf: netbuf
|
||||||
* @offset: offset
|
* @offset: offset
|
||||||
* @len: Length
|
* @len: Length
|
||||||
* @to: To
|
* @to: To
|
||||||
@@ -2585,7 +2662,7 @@ qdf_nbuf_copy_bits(qdf_nbuf_t nbuf, uint32_t offset, uint32_t len, void *to)
|
|||||||
/* nbuf manipulation routines */
|
/* nbuf manipulation routines */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_head() - return the address of an nbuf's buffer
|
* qdf_nbuf_head() - return the address of an nbuf's buffer
|
||||||
* @buf: netbuf
|
* @buf: netbuf
|
||||||
*
|
*
|
||||||
* Return: head address
|
* Return: head address
|
||||||
@@ -2704,7 +2781,7 @@ static inline qdf_size_t qdf_nbuf_len(qdf_nbuf_t buf)
|
|||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_pktlen() - set the length of the buf
|
* qdf_nbuf_set_pktlen() - set the length of the buf
|
||||||
* @buf: Network buf instance
|
* @buf: Network buf instance
|
||||||
* @size: Size to be set
|
* @len: Size to be set
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
@@ -2790,7 +2867,7 @@ static inline void qdf_nbuf_reset(qdf_nbuf_t buf, int reserve, int align)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_dev_scratch_is_supported() - dev_scratch support for network buffer
|
* qdf_nbuf_is_dev_scratch_supported() - dev_scratch support for network buffer
|
||||||
* in kernel
|
* in kernel
|
||||||
*
|
*
|
||||||
* Return: true if dev_scratch is supported
|
* Return: true if dev_scratch is supported
|
||||||
@@ -2827,7 +2904,7 @@ static inline void qdf_nbuf_set_dev_scratch(qdf_nbuf_t buf, unsigned long value)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_dev() - set dev in network buffer
|
* qdf_nbuf_set_dev() - set dev in network buffer
|
||||||
* @buf: Pointer to network buffer
|
* @nbuf: Pointer to network buffer
|
||||||
* @dev: netdev to be set in network buffer
|
* @dev: netdev to be set in network buffer
|
||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
@@ -2840,7 +2917,7 @@ void qdf_nbuf_set_dev(qdf_nbuf_t nbuf, qdf_netdev_t dev)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_dev_mtu() - get dev mtu in n/w buffer
|
* qdf_nbuf_get_dev_mtu() - get dev mtu in n/w buffer
|
||||||
* @buf: Pointer to network buffer
|
* @nbuf: Pointer to network buffer
|
||||||
*
|
*
|
||||||
* Return: dev mtu value in nbuf
|
* Return: dev mtu value in nbuf
|
||||||
*/
|
*/
|
||||||
@@ -2852,7 +2929,7 @@ unsigned int qdf_nbuf_get_dev_mtu(qdf_nbuf_t nbuf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_protocol_eth_tye_trans() - set protocol using eth trans os API
|
* qdf_nbuf_set_protocol_eth_tye_trans() - set protocol using eth trans os API
|
||||||
* @buf: Pointer to network buffer
|
* @nbuf: Pointer to network buffer
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: None
|
||||||
*/
|
*/
|
||||||
@@ -2959,7 +3036,7 @@ static inline qdf_nbuf_t qdf_nbuf_queue_next(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @qdf_nbuf_is_queue_empty() - check if the buf queue is empty
|
* qdf_nbuf_is_queue_empty() - check if the buf queue is empty
|
||||||
* @nbq: Network buf queue handle
|
* @nbq: Network buf queue handle
|
||||||
*
|
*
|
||||||
* Return: true if queue is empty
|
* Return: true if queue is empty
|
||||||
@@ -3267,7 +3344,7 @@ qdf_nbuf_get_dhcp_subtype(qdf_nbuf_t buf)
|
|||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_get_dhcp_subtype() - get the subtype
|
* qdf_nbuf_data_get_dhcp_subtype() - get the subtype
|
||||||
* of DHCP packet.
|
* of DHCP packet.
|
||||||
* @buf: Pointer to DHCP packet data buffer
|
* @data: Pointer to DHCP packet data buffer
|
||||||
*
|
*
|
||||||
* This func. returns the subtype of DHCP packet.
|
* This func. returns the subtype of DHCP packet.
|
||||||
*
|
*
|
||||||
@@ -3564,8 +3641,8 @@ bool qdf_nbuf_data_is_ipv4_dhcp_pkt(uint8_t *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_is_ipv6_mdsn_pkt() - check if it is MDNS packet.
|
* qdf_nbuf_is_ipv6_mdns_pkt() - check if it is MDNS packet.
|
||||||
* @data: Pointer to packet data buffer
|
* @buf: Pointer to packet data buffer
|
||||||
*
|
*
|
||||||
* This func. checks whether it is a MDNS packet or not.
|
* This func. checks whether it is a MDNS packet or not.
|
||||||
*
|
*
|
||||||
@@ -3578,8 +3655,8 @@ bool qdf_nbuf_is_ipv6_mdns_pkt(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_is_ipv6_dhcp_pkt() - check if it is DHCP packet.
|
* qdf_nbuf_is_ipv6_dhcp_pkt() - check if it is DHCP packet.
|
||||||
* @data: Pointer to DHCP packet data buffer
|
* @buf: Pointer to DHCP packet data buffer
|
||||||
*
|
*
|
||||||
* This func. checks whether it is a DHCP packet or not.
|
* This func. checks whether it is a DHCP packet or not.
|
||||||
*
|
*
|
||||||
@@ -3763,7 +3840,7 @@ bool qdf_nbuf_data_is_arp_rsp(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_get_arp_src_ip() - get ARP packet source IP gateway.
|
* qdf_nbuf_get_arp_src_ip() - get ARP packet source IP gateway.
|
||||||
* @buf: buffer
|
* @buf: buffer
|
||||||
*
|
*
|
||||||
* Return: ARP packet source IP value.
|
* Return: ARP packet source IP value.
|
||||||
@@ -3775,7 +3852,7 @@ uint32_t qdf_nbuf_get_arp_src_ip(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_get_arp_tgt_ip() - get ARP packet target IP gateway.
|
* qdf_nbuf_get_arp_tgt_ip() - get ARP packet target IP gateway.
|
||||||
* @buf: buffer
|
* @buf: buffer
|
||||||
*
|
*
|
||||||
* Return: ARP packet target IP value.
|
* Return: ARP packet target IP value.
|
||||||
@@ -3973,7 +4050,7 @@ uint32_t qdf_nbuf_get_icmpv4_src_ip(qdf_nbuf_t buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_get_icmpv4_tgt_ip() - get icmpv4 target IP
|
* qdf_nbuf_get_icmpv4_tgt_ip() - get icmpv4 target IP
|
||||||
* @buf: buffer
|
* @buf: buffer
|
||||||
*
|
*
|
||||||
* Return: icmpv4 packet target IP value.
|
* Return: icmpv4 packet target IP value.
|
||||||
@@ -4328,7 +4405,7 @@ void qdf_nbuf_set_priority_pkt_type(qdf_nbuf_t nbuf, uint8_t pkt_type)
|
|||||||
/**
|
/**
|
||||||
* qdf_nbuf_remove_priority_pkt_type() - Remove the packet type bits
|
* qdf_nbuf_remove_priority_pkt_type() - Remove the packet type bits
|
||||||
* from priority
|
* from priority
|
||||||
* @@nbuf: pointer to network buffer
|
* @nbuf: pointer to network buffer
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
@@ -4382,6 +4459,9 @@ static inline void qdf_nbuf_reset_num_frags(qdf_nbuf_t buf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_dmaaddr_to_32s - return high and low parts of dma_addr
|
* qdf_dmaaddr_to_32s - return high and low parts of dma_addr
|
||||||
|
* @dmaaddr: DMA address
|
||||||
|
* @lo: low 32-bits of @dmaaddr
|
||||||
|
* @hi: high 32-bits of @dmaaddr
|
||||||
*
|
*
|
||||||
* Returns the high and low 32-bits of the DMA addr in the provided ptrs
|
* Returns the high and low 32-bits of the DMA addr in the provided ptrs
|
||||||
*
|
*
|
||||||
@@ -4395,10 +4475,11 @@ static inline void qdf_dmaaddr_to_32s(qdf_dma_addr_t dmaaddr,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_tso_info() - function to divide a jumbo TSO
|
* qdf_nbuf_get_tso_info() - function to divide a jumbo TSO
|
||||||
* network buffer into segments
|
* network buffer into segments
|
||||||
|
* @osdev: qdf device handle
|
||||||
* @nbuf: network buffer to be segmented
|
* @nbuf: network buffer to be segmented
|
||||||
* @tso_info: This is the output. The information about the
|
* @tso_info: This is the output. The information about the
|
||||||
* TSO segments will be populated within this.
|
* TSO segments will be populated within this.
|
||||||
*
|
*
|
||||||
* This function fragments a TCP jumbo packet into smaller
|
* This function fragments a TCP jumbo packet into smaller
|
||||||
* segments to be transmitted by the driver. It chains the TSO
|
* segments to be transmitted by the driver. It chains the TSO
|
||||||
@@ -4445,7 +4526,7 @@ static inline size_t qdf_nbuf_get_tcp_payload_len(qdf_nbuf_t nbuf)
|
|||||||
* @nbuf: TSO jumbo network buffer to be segmented
|
* @nbuf: TSO jumbo network buffer to be segmented
|
||||||
*
|
*
|
||||||
* This function calculates the number of TCP segments that the
|
* This function calculates the number of TCP segments that the
|
||||||
network buffer can be divided into.
|
* network buffer can be divided into.
|
||||||
*
|
*
|
||||||
* Return: number of TCP segments
|
* Return: number of TCP segments
|
||||||
*/
|
*/
|
||||||
@@ -4455,8 +4536,7 @@ static inline uint32_t qdf_nbuf_get_tso_num_seg(qdf_nbuf_t nbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_gso_segs() - Return the number of gso segments in
|
* qdf_nbuf_get_gso_segs() - Return the number of gso segments in nbuf
|
||||||
* nbuf
|
|
||||||
* @nbuf: Network buffer
|
* @nbuf: Network buffer
|
||||||
*
|
*
|
||||||
* Return: number of gso segments in nbuf
|
* Return: number of gso segments in nbuf
|
||||||
@@ -4467,8 +4547,7 @@ static inline uint16_t qdf_nbuf_get_gso_segs(qdf_nbuf_t nbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_gso_segs() - set the number of gso segments in
|
* qdf_nbuf_set_gso_segs() - set the number of gso segments in nbuf
|
||||||
* nbuf
|
|
||||||
* @nbuf: Network buffer
|
* @nbuf: Network buffer
|
||||||
* @val: val to be set
|
* @val: val to be set
|
||||||
*
|
*
|
||||||
@@ -4502,8 +4581,7 @@ static inline void qdf_nbuf_set_ip_summed_partial(qdf_nbuf_t nbuf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_gso_size() - Return the number of gso size in
|
* qdf_nbuf_get_gso_size() - Return the number of gso size in nbuf
|
||||||
* nbuf
|
|
||||||
* @nbuf: Network buffer
|
* @nbuf: Network buffer
|
||||||
*
|
*
|
||||||
* Return: number of gso segments in nbuf
|
* Return: number of gso segments in nbuf
|
||||||
@@ -4515,9 +4593,10 @@ static inline unsigned int qdf_nbuf_get_gso_size(qdf_nbuf_t nbuf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_set_gso_size() - Set the gso size in nbuf
|
* qdf_nbuf_set_gso_size() - Set the gso size in nbuf
|
||||||
* @skb: Pointer to network buffer
|
* @nbuf: Pointer to network buffer
|
||||||
|
* @val: number of gso segments in nbuf
|
||||||
*
|
*
|
||||||
* Return: Return the number of gso segments
|
* Return: None
|
||||||
*/
|
*/
|
||||||
static inline void qdf_nbuf_set_gso_size(qdf_nbuf_t nbuf, unsigned int val)
|
static inline void qdf_nbuf_set_gso_size(qdf_nbuf_t nbuf, unsigned int val)
|
||||||
{
|
{
|
||||||
@@ -4526,8 +4605,7 @@ static inline void qdf_nbuf_set_gso_size(qdf_nbuf_t nbuf, unsigned int val)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_inc_users() - function to increment the number of
|
* qdf_nbuf_inc_users() - function to increment the number of
|
||||||
* users referencing this network buffer
|
* users referencing this network buffer
|
||||||
*
|
|
||||||
* @nbuf: network buffer
|
* @nbuf: network buffer
|
||||||
*
|
*
|
||||||
* This function increments the number of users referencing this
|
* This function increments the number of users referencing this
|
||||||
@@ -4542,8 +4620,7 @@ static inline qdf_nbuf_t qdf_nbuf_inc_users(qdf_nbuf_t nbuf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_attr_get() - Get data_attr field from cvg_nbuf_cb
|
* qdf_nbuf_data_attr_get() - Get data_attr field from cvg_nbuf_cb
|
||||||
*
|
* @buf: Network buffer (skb on linux)
|
||||||
* @nbuf: Network buffer (skb on linux)
|
|
||||||
*
|
*
|
||||||
* This function returns the values of data_attr field
|
* This function returns the values of data_attr field
|
||||||
* in struct cvg_nbuf_cb{}, to which skb->cb is typecast.
|
* in struct cvg_nbuf_cb{}, to which skb->cb is typecast.
|
||||||
@@ -4558,8 +4635,7 @@ static inline uint32_t qdf_nbuf_data_attr_get(qdf_nbuf_t buf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_data_attr_set() - Sets data_attr field in cvg_nbuf_cb
|
* qdf_nbuf_data_attr_set() - Sets data_attr field in cvg_nbuf_cb
|
||||||
*
|
* @buf: Network buffer (skb on linux)
|
||||||
* @nbuf: Network buffer (skb on linux)
|
|
||||||
* @data_attr: Value to be stored cvg_nbuf_cb->data_attr
|
* @data_attr: Value to be stored cvg_nbuf_cb->data_attr
|
||||||
*
|
*
|
||||||
* This function stores the value to be programmed in CE
|
* This function stores the value to be programmed in CE
|
||||||
@@ -4575,8 +4651,15 @@ void qdf_nbuf_data_attr_set(qdf_nbuf_t buf, uint32_t data_attr)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_tx_info_get() - Parse skb and get Tx metadata
|
* qdf_nbuf_tx_info_get() - Parse skb and get Tx metadata
|
||||||
*
|
* @nbuf: Network buffer
|
||||||
* @nbuf: Network buffer (skb on linux)
|
* @pkt_type: Pkt type (from enum htt_pkt_type)
|
||||||
|
* @pkt_subtype: Bit 4 of this field in HTT descriptor
|
||||||
|
* needs to be set in case of CE classification support
|
||||||
|
* Is set by this macro.
|
||||||
|
* @hw_classify: This is a flag which is set to indicate
|
||||||
|
* CE classification is enabled.
|
||||||
|
* Do not set this bit for VLAN packets
|
||||||
|
* OR for mcast / bcast frames.
|
||||||
*
|
*
|
||||||
* This function parses the payload to figure out relevant
|
* This function parses the payload to figure out relevant
|
||||||
* Tx meta-data e.g. whether to enable tx_classify bit
|
* Tx meta-data e.g. whether to enable tx_classify bit
|
||||||
@@ -4584,10 +4667,34 @@ void qdf_nbuf_data_attr_set(qdf_nbuf_t buf, uint32_t data_attr)
|
|||||||
*
|
*
|
||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
#define qdf_nbuf_tx_info_get __qdf_nbuf_tx_info_get
|
#define qdf_nbuf_tx_info_get(nbuf, pkt_type, pkt_subtype, hw_classify) \
|
||||||
|
__qdf_nbuf_tx_info_get(nbuf, pkt_type, \
|
||||||
|
pkt_subtype, hw_classify)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_set_state() - Updates the packet state
|
||||||
|
* @nbuf: network buffer
|
||||||
|
* @current_state : layer at which the packet currently is
|
||||||
|
*
|
||||||
|
* This function updates the packet state to the layer at which the packet
|
||||||
|
* currently is
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_nbuf_set_state(qdf_nbuf_t nbuf, uint8_t current_state);
|
void qdf_nbuf_set_state(qdf_nbuf_t nbuf, uint8_t current_state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_tx_desc_count_display() - Displays the packet counter
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_nbuf_tx_desc_count_display(void);
|
void qdf_nbuf_tx_desc_count_display(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_nbuf_tx_desc_count_clear() - Clears packet counter for both data, mgmt
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
void qdf_nbuf_tx_desc_count_clear(void);
|
void qdf_nbuf_tx_desc_count_clear(void);
|
||||||
|
|
||||||
static inline qdf_nbuf_t
|
static inline qdf_nbuf_t
|
||||||
@@ -4706,7 +4813,7 @@ static inline qdf_size_t qdf_nbuf_l2l3l4_hdr_len(qdf_nbuf_t buf)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_get_tcp_hdr_len() - return TCP header length of the skb
|
* qdf_nbuf_get_tcp_hdr_len() - return TCP header length of the skb
|
||||||
* @skb: sk buff
|
* @nbuf: sk buff
|
||||||
*
|
*
|
||||||
* Return: size of TCP header length
|
* Return: size of TCP header length
|
||||||
*/
|
*/
|
||||||
@@ -4841,7 +4948,7 @@ static inline void qdf_nbuf_mod_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_nbuf_mod_init() - Unintialization routine for qdf_nbuf
|
* qdf_nbuf_mod_exit() - Unintialization routine for qdf_nbuf
|
||||||
*
|
*
|
||||||
* Return void
|
* Return void
|
||||||
*/
|
*/
|
||||||
@@ -5450,6 +5557,7 @@ static inline void qdf_set_smmu_fault_state(bool smmu_fault_state)
|
|||||||
* Return: void
|
* Return: void
|
||||||
*/
|
*/
|
||||||
void qdf_nbuf_stop_replenish_timer(void);
|
void qdf_nbuf_stop_replenish_timer(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_get_nbuf_valid_frag() - Get nbuf to store frag
|
* qdf_get_nbuf_valid_frag() - Get nbuf to store frag
|
||||||
* @nbuf: qdf_nbuf_t master nbuf
|
* @nbuf: qdf_nbuf_t master nbuf
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -40,7 +40,7 @@ typedef __qdf_frag_cache_t qdf_frag_cache_t;
|
|||||||
*/
|
*/
|
||||||
typedef __qdf_frag_t qdf_frag_t;
|
typedef __qdf_frag_t qdf_frag_t;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Maximum number of frags an SKB can hold
|
* Maximum number of frags an SKB can hold
|
||||||
*/
|
*/
|
||||||
#define QDF_NBUF_MAX_FRAGS __QDF_NBUF_MAX_FRAGS
|
#define QDF_NBUF_MAX_FRAGS __QDF_NBUF_MAX_FRAGS
|
||||||
@@ -54,7 +54,9 @@ typedef __qdf_frag_t qdf_frag_t;
|
|||||||
void qdf_frag_debug_init(void);
|
void qdf_frag_debug_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_frag_debug_exit() - Destroy frag debug tracker
|
* qdf_frag_debug_exit() - Exit network frag debug functionality
|
||||||
|
*
|
||||||
|
* Exit network frag tracking debug functionality and log frag memory leaks
|
||||||
*
|
*
|
||||||
* Return: none
|
* Return: none
|
||||||
*/
|
*/
|
||||||
@@ -272,7 +274,7 @@ static inline void qdf_frag_mod_exit(void)
|
|||||||
* @buf: Virtual page address to be mapped
|
* @buf: Virtual page address to be mapped
|
||||||
* @dir: qdf_dma_dir_t
|
* @dir: qdf_dma_dir_t
|
||||||
* @nbytes: Size of memory to be mapped
|
* @nbytes: Size of memory to be mapped
|
||||||
* @paddr: Corresponding mapped physical address
|
* @phy_addr: Corresponding mapped physical address
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct page_frag_cache __qdf_frag_cache_t;
|
typedef struct page_frag_cache __qdf_frag_cache_t;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* typedef __qdf_frag_t - Abstraction for void * for frag address
|
* typedef __qdf_frag_t - Abstraction for void * for frag address
|
||||||
*/
|
*/
|
||||||
typedef void *__qdf_frag_t;
|
typedef void *__qdf_frag_t;
|
||||||
@@ -103,7 +103,7 @@ static inline void __qdf_frag_mod_exit(void)
|
|||||||
}
|
}
|
||||||
#endif /* QDF_NBUF_FRAG_GLOBAL_COUNT */
|
#endif /* QDF_NBUF_FRAG_GLOBAL_COUNT */
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Maximum number of frags an SKB can hold
|
* Maximum number of frags an SKB can hold
|
||||||
*/
|
*/
|
||||||
#define __QDF_NBUF_MAX_FRAGS MAX_SKB_FRAGS
|
#define __QDF_NBUF_MAX_FRAGS MAX_SKB_FRAGS
|
||||||
@@ -124,7 +124,7 @@ void __qdf_mem_unmap_page(qdf_device_t osdev, qdf_dma_addr_t paddr,
|
|||||||
* @buf: Vaddr to be mapped
|
* @buf: Vaddr to be mapped
|
||||||
* @dir: qdf_dma_dir_t
|
* @dir: qdf_dma_dir_t
|
||||||
* @nbytes: Number of bytes to be mapped
|
* @nbytes: Number of bytes to be mapped
|
||||||
* @paddr: Mapped physical address
|
* @phy_addr: Mapped physical address
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS
|
* Return: QDF_STATUS
|
||||||
*/
|
*/
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -121,7 +121,22 @@ qdf_nbuf_cb_update_vdev_id(struct sk_buff *skb, uint8_t vdev_id)
|
|||||||
QDF_NBUF_CB_RX_VDEV_ID(skb) = vdev_id;
|
QDF_NBUF_CB_RX_VDEV_ID(skb) = vdev_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_nbuf_init_replenish_timer() - Initialize the alloc replenish timer
|
||||||
|
*
|
||||||
|
* This function initializes the nbuf alloc fail replenish timer.
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
void __qdf_nbuf_init_replenish_timer(void);
|
void __qdf_nbuf_init_replenish_timer(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __qdf_nbuf_deinit_replenish_timer() - Deinitialize the alloc replenish timer
|
||||||
|
*
|
||||||
|
* This function deinitializes the nbuf alloc fail replenish timer.
|
||||||
|
*
|
||||||
|
* Return: void
|
||||||
|
*/
|
||||||
void __qdf_nbuf_deinit_replenish_timer(void);
|
void __qdf_nbuf_deinit_replenish_timer(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
||||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -93,7 +93,7 @@ void __qdf_frag_mod_exit(void)
|
|||||||
* @alloc_func_line: Allocation function line no.
|
* @alloc_func_line: Allocation function line no.
|
||||||
* @refcount: No. of references to the frag
|
* @refcount: No. of references to the frag
|
||||||
* @last_func_name: Function where frag recently accessed
|
* @last_func_name: Function where frag recently accessed
|
||||||
* @last_func_line_num: Line number of last function
|
* @last_func_line: Line number of last function
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
struct qdf_frag_track_node_t {
|
struct qdf_frag_track_node_t {
|
||||||
@@ -119,7 +119,7 @@ typedef struct qdf_frag_tracking_list_t {
|
|||||||
|
|
||||||
typedef struct qdf_frag_track_node_t QDF_FRAG_TRACK;
|
typedef struct qdf_frag_track_node_t QDF_FRAG_TRACK;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Array of tracking list for maintaining
|
* Array of tracking list for maintaining
|
||||||
* allocated debug frag nodes as per the calculated
|
* allocated debug frag nodes as per the calculated
|
||||||
* hash value.
|
* hash value.
|
||||||
@@ -131,7 +131,7 @@ static struct kmem_cache *frag_tracking_cache;
|
|||||||
/* Tracking list for maintaining the free debug frag nodes */
|
/* Tracking list for maintaining the free debug frag nodes */
|
||||||
static qdf_frag_tracking_list qdf_frag_track_free_list;
|
static qdf_frag_tracking_list qdf_frag_track_free_list;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Parameters for statistics
|
* Parameters for statistics
|
||||||
* qdf_frag_track_free_list_count: No. of free nodes
|
* qdf_frag_track_free_list_count: No. of free nodes
|
||||||
* qdf_frag_track_used_list_count : No. of nodes used
|
* qdf_frag_track_used_list_count : No. of nodes used
|
||||||
@@ -412,13 +412,6 @@ void qdf_frag_debug_init(void)
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_frag_debug_init);
|
qdf_export_symbol(qdf_frag_debug_init);
|
||||||
|
|
||||||
/**
|
|
||||||
* qdf_frag_buf_debug_exit() - Exit network frag debug functionality
|
|
||||||
*
|
|
||||||
* Exit network frag tracking debug functionality and log frag memory leaks
|
|
||||||
*
|
|
||||||
* Return: none
|
|
||||||
*/
|
|
||||||
void qdf_frag_debug_exit(void)
|
void qdf_frag_debug_exit(void)
|
||||||
{
|
{
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
Reference in New Issue
Block a user