|
@@ -153,6 +153,7 @@ void qdf_nbuf_set_state(qdf_nbuf_t nbuf, uint8_t current_state)
|
|
|
* such as scan commands are not tracked
|
|
|
*/
|
|
|
uint8_t packet_type;
|
|
|
+
|
|
|
packet_type = QDF_NBUF_CB_TX_PACKET_TRACK(nbuf);
|
|
|
|
|
|
if ((packet_type != QDF_NBUF_TX_PKT_DATA_TRACK) &&
|
|
@@ -258,10 +259,9 @@ struct sk_buff *__qdf_nbuf_alloc(qdf_device_t osdev, size_t size, int reserve,
|
|
|
|
|
|
skb = dev_alloc_skb(size);
|
|
|
|
|
|
- if (!skb) {
|
|
|
- pr_info("ERROR:NBUF alloc failed\n");
|
|
|
+ if (!skb)
|
|
|
return NULL;
|
|
|
- }
|
|
|
+
|
|
|
memset(skb->cb, 0x0, sizeof(skb->cb));
|
|
|
|
|
|
/*
|
|
@@ -331,6 +331,7 @@ QDF_STATUS
|
|
|
__qdf_nbuf_map(qdf_device_t osdev, struct sk_buff *skb, qdf_dma_dir_t dir)
|
|
|
{
|
|
|
struct skb_shared_info *sh = skb_shinfo(skb);
|
|
|
+
|
|
|
qdf_assert((dir == QDF_DMA_TO_DEVICE)
|
|
|
|| (dir == QDF_DMA_FROM_DEVICE));
|
|
|
|
|
@@ -386,7 +387,7 @@ EXPORT_SYMBOL(__qdf_nbuf_unmap);
|
|
|
*
|
|
|
* Return: QDF_STATUS
|
|
|
*/
|
|
|
-#if defined(A_SIMOS_DEVHOST) || defined (HIF_USB)
|
|
|
+#if defined(A_SIMOS_DEVHOST) || defined(HIF_USB)
|
|
|
QDF_STATUS
|
|
|
__qdf_nbuf_map_single(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir)
|
|
|
{
|
|
@@ -422,11 +423,10 @@ EXPORT_SYMBOL(__qdf_nbuf_map_single);
|
|
|
*
|
|
|
* Return: none
|
|
|
*/
|
|
|
-#if defined(A_SIMOS_DEVHOST) || defined (HIF_USB)
|
|
|
+#if defined(A_SIMOS_DEVHOST) || defined(HIF_USB)
|
|
|
void __qdf_nbuf_unmap_single(qdf_device_t osdev, qdf_nbuf_t buf,
|
|
|
qdf_dma_dir_t dir)
|
|
|
{
|
|
|
- return;
|
|
|
}
|
|
|
#else
|
|
|
void __qdf_nbuf_unmap_single(qdf_device_t osdev, qdf_nbuf_t buf,
|
|
@@ -481,8 +481,6 @@ qdf_nbuf_tx_cksum_t __qdf_nbuf_get_tx_cksum(struct sk_buff *skb)
|
|
|
case CHECKSUM_NONE:
|
|
|
return QDF_NBUF_TX_CKSUM_NONE;
|
|
|
case CHECKSUM_PARTIAL:
|
|
|
- /* XXX ADF and Linux checksum don't map with 1-to-1. This is
|
|
|
- * not 100% correct */
|
|
|
return QDF_NBUF_TX_CKSUM_TCP_UDP;
|
|
|
case CHECKSUM_COMPLETE:
|
|
|
return QDF_NBUF_TX_CKSUM_TCP_UDP_IP;
|
|
@@ -537,7 +535,6 @@ EXPORT_SYMBOL(__qdf_nbuf_get_exemption_type);
|
|
|
void __qdf_nbuf_reg_trace_cb(qdf_nbuf_trace_update_t cb_func_ptr)
|
|
|
{
|
|
|
qdf_trace_update_cb = cb_func_ptr;
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(__qdf_nbuf_reg_trace_cb);
|
|
|
|
|
@@ -1425,8 +1422,6 @@ void qdf_net_buf_debug_init(void)
|
|
|
gp_qdf_net_buf_track_tbl[i] = NULL;
|
|
|
spin_lock_init(&g_qdf_net_buf_track_lock[i]);
|
|
|
}
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(qdf_net_buf_debug_init);
|
|
|
|
|
@@ -1468,8 +1463,6 @@ void qdf_net_buf_debug_exit(void)
|
|
|
if (count)
|
|
|
QDF_BUG(0);
|
|
|
#endif
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(qdf_net_buf_debug_exit);
|
|
|
|
|
@@ -1553,8 +1546,6 @@ void qdf_net_buf_debug_add_node(qdf_nbuf_t net_buf, size_t size,
|
|
|
}
|
|
|
|
|
|
spin_unlock_irqrestore(&g_qdf_net_buf_track_lock[i], irq_flag);
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(qdf_net_buf_debug_add_node);
|
|
|
|
|
@@ -1610,8 +1601,6 @@ done:
|
|
|
} else {
|
|
|
qdf_nbuf_track_free(p_node);
|
|
|
}
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(qdf_net_buf_debug_delete_node);
|
|
|
|
|
@@ -1724,6 +1713,7 @@ static uint8_t __qdf_nbuf_get_tso_cmn_seg_info(qdf_device_t osdev,
|
|
|
if (tso_info->ethproto == htons(ETH_P_IP)) { /* IPv4 */
|
|
|
/* for IPv4, get the IP ID and enable TCP and IP csum */
|
|
|
struct iphdr *ipv4_hdr = ip_hdr(skb);
|
|
|
+
|
|
|
tso_info->ip_id = ntohs(ipv4_hdr->id);
|
|
|
tso_info->ipv4_csum_en = 1;
|
|
|
tso_info->tcp_ipv4_csum_en = 1;
|
|
@@ -1857,8 +1847,6 @@ static inline void __qdf_nbuf_fill_tso_cmn_seg_info(
|
|
|
tso_cmn_info->eit_hdr_len,
|
|
|
curr_seg->seg.tso_flags.tcp_seq_num,
|
|
|
curr_seg->seg.total_len);
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2329,7 +2317,6 @@ void
|
|
|
__qdf_nbuf_unmap_nbytes_single(
|
|
|
qdf_device_t osdev, struct sk_buff *buf, qdf_dma_dir_t dir, int nbytes)
|
|
|
{
|
|
|
- return;
|
|
|
}
|
|
|
EXPORT_SYMBOL(__qdf_nbuf_unmap_nbytes_single);
|
|
|
|
|
@@ -2365,6 +2352,7 @@ __qdf_nbuf_map_nbytes(
|
|
|
int nbytes)
|
|
|
{
|
|
|
struct skb_shared_info *sh = skb_shinfo(skb);
|
|
|
+
|
|
|
qdf_assert((dir == QDF_DMA_TO_DEVICE) || (dir == QDF_DMA_FROM_DEVICE));
|
|
|
|
|
|
/*
|
|
@@ -2454,6 +2442,7 @@ __qdf_nbuf_frag_info(struct sk_buff *skb, qdf_sglist_t *sg)
|
|
|
|
|
|
for (int i = 1; i <= sh->nr_frags; i++) {
|
|
|
skb_frag_t *f = &sh->frags[i - 1];
|
|
|
+
|
|
|
sg->sg_segs[i].vaddr = (uint8_t *)(page_address(f->page) +
|
|
|
f->page_offset);
|
|
|
sg->sg_segs[i].len = f->size;
|
|
@@ -2503,6 +2492,7 @@ __qdf_nbuf_get_frag_size(__qdf_nbuf_t nbuf, uint32_t cur_frag)
|
|
|
{
|
|
|
struct skb_shared_info *sh = skb_shinfo(nbuf);
|
|
|
const skb_frag_t *frag = sh->frags + cur_frag;
|
|
|
+
|
|
|
return skb_frag_size(frag);
|
|
|
}
|
|
|
EXPORT_SYMBOL(__qdf_nbuf_get_frag_size);
|
|
@@ -2534,9 +2524,9 @@ QDF_STATUS __qdf_nbuf_frag_map(
|
|
|
int offset, qdf_dma_dir_t dir, int cur_frag)
|
|
|
{
|
|
|
dma_addr_t paddr, frag_len;
|
|
|
-
|
|
|
struct skb_shared_info *sh = skb_shinfo(nbuf);
|
|
|
const skb_frag_t *frag = sh->frags + cur_frag;
|
|
|
+
|
|
|
frag_len = skb_frag_size(frag);
|
|
|
|
|
|
QDF_NBUF_CB_TX_EXTRA_FRAG_PADDR(nbuf) = paddr =
|
|
@@ -2892,7 +2882,6 @@ qdf_export_symbol(qdf_nbuf_update_radiotap);
|
|
|
void __qdf_nbuf_reg_free_cb(qdf_nbuf_free_t cb_func_ptr)
|
|
|
{
|
|
|
nbuf_free_cb = cb_func_ptr;
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|