Skip to content

Commit 5ff310c

Browse files
mGuermoudgregkh
authored andcommitted
staging: octeon: Clean up dead code in ethernet-tx.c
Remove multiple blocks of non-functional code disabled via '#if 0'. The removed code was a placeholder for incomplete hardware offload features, as indicated by `FIXME` comments. Remove this dead code to simplify the driver. Signed-off-by: Mohammed GUERMOUD <mohammed.guermoud@gmail.com> Link: https://lore.kernel.org/r/20250829170253.16737-1-mohammed.guermoud@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0bbf8fb commit 5ff310c

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

drivers/staging/octeon/ethernet-tx.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -574,42 +574,14 @@ netdev_tx_t cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
574574

575575
if (skb->protocol == htons(ETH_P_IP)) {
576576
work->word2.s.ip_offset = 14;
577-
#if 0
578-
work->word2.s.vlan_valid = 0; /* FIXME */
579-
work->word2.s.vlan_cfi = 0; /* FIXME */
580-
work->word2.s.vlan_id = 0; /* FIXME */
581-
work->word2.s.dec_ipcomp = 0; /* FIXME */
582-
#endif
583577
work->word2.s.tcp_or_udp =
584578
(ip_hdr(skb)->protocol == IPPROTO_TCP) ||
585579
(ip_hdr(skb)->protocol == IPPROTO_UDP);
586-
#if 0
587-
/* FIXME */
588-
work->word2.s.dec_ipsec = 0;
589-
/* We only support IPv4 right now */
590-
work->word2.s.is_v6 = 0;
591-
/* Hardware would set to zero */
592-
work->word2.s.software = 0;
593-
/* No error, packet is internal */
594-
work->word2.s.L4_error = 0;
595-
#endif
596580
work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) ||
597581
(ip_hdr(skb)->frag_off ==
598582
cpu_to_be16(1 << 14)));
599-
#if 0
600-
/* Assume Linux is sending a good packet */
601-
work->word2.s.IP_exc = 0;
602-
#endif
603583
work->word2.s.is_bcast = (skb->pkt_type == PACKET_BROADCAST);
604584
work->word2.s.is_mcast = (skb->pkt_type == PACKET_MULTICAST);
605-
#if 0
606-
/* This is an IP packet */
607-
work->word2.s.not_IP = 0;
608-
/* No error, packet is internal */
609-
work->word2.s.rcv_error = 0;
610-
/* No error, packet is internal */
611-
work->word2.s.err_code = 0;
612-
#endif
613585

614586
/*
615587
* When copying the data, include 4 bytes of the
@@ -619,25 +591,13 @@ netdev_tx_t cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev)
619591
memcpy(work->packet_data, skb->data + 10,
620592
sizeof(work->packet_data));
621593
} else {
622-
#if 0
623-
work->word2.snoip.vlan_valid = 0; /* FIXME */
624-
work->word2.snoip.vlan_cfi = 0; /* FIXME */
625-
work->word2.snoip.vlan_id = 0; /* FIXME */
626-
work->word2.snoip.software = 0; /* Hardware would set to zero */
627-
#endif
628594
work->word2.snoip.is_rarp = skb->protocol == htons(ETH_P_RARP);
629595
work->word2.snoip.is_arp = skb->protocol == htons(ETH_P_ARP);
630596
work->word2.snoip.is_bcast =
631597
(skb->pkt_type == PACKET_BROADCAST);
632598
work->word2.snoip.is_mcast =
633599
(skb->pkt_type == PACKET_MULTICAST);
634600
work->word2.snoip.not_IP = 1; /* IP was done up above */
635-
#if 0
636-
/* No error, packet is internal */
637-
work->word2.snoip.rcv_error = 0;
638-
/* No error, packet is internal */
639-
work->word2.snoip.err_code = 0;
640-
#endif
641601
memcpy(work->packet_data, skb->data, sizeof(work->packet_data));
642602
}
643603

0 commit comments

Comments
 (0)