net: 802: Remove unused p8022 code

p8022.c defines two external functions, register_8022_client()
and unregister_8022_client(), the last use of which was removed in
2018 by
commit 7a2e838d28 ("staging: ipx: delete it from the tree")

Remove the p8022.c file, it's corresponding header, and glue
surrounding it.  There was one place the header was included in vlan.c
but it didn't use the functions it declared.

There was a comment in net/802/Makefile about checking
against net/core/Makefile, but that's at least 20 years old and
there's no sign of net/core/Makefile mentioning it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20250418011519.145320-1-linux@treblig.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Dr. David Alan Gilbert 2025-04-18 02:15:19 +01:00 committed by Jakub Kicinski
parent 37f2f2fe26
commit 45bd443bfd
4 changed files with 2 additions and 84 deletions

View File

@ -1,16 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _NET_P8022_H
#define _NET_P8022_H
struct net_device;
struct packet_type;
struct sk_buff;
struct datalink_proto *
register_8022_client(unsigned char type,
int (*func)(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *pt,
struct net_device *orig_dev));
void unregister_8022_client(struct datalink_proto *proto);
#endif

View File

@ -3,12 +3,11 @@
# Makefile for the Linux 802.x protocol layers.
#
# Check the p8022 selections against net/core/Makefile.
obj-$(CONFIG_LLC) += p8022.o psnap.o
obj-$(CONFIG_LLC) += psnap.o
obj-$(CONFIG_NET_FC) += fc.o
obj-$(CONFIG_FDDI) += fddi.o
obj-$(CONFIG_HIPPI) += hippi.o
obj-$(CONFIG_ATALK) += p8022.o psnap.o
obj-$(CONFIG_ATALK) += psnap.o
obj-$(CONFIG_STP) += stp.o
obj-$(CONFIG_GARP) += garp.o
obj-$(CONFIG_MRP) += mrp.o

View File

@ -1,64 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* NET3: Support for 802.2 demultiplexing off Ethernet
*
* Demultiplex 802.2 encoded protocols. We match the entry by the
* SSAP/DSAP pair and then deliver to the registered datalink that
* matches. The control byte is ignored and handling of such items
* is up to the routine passed the frame.
*
* Unlike the 802.3 datalink we have a list of 802.2 entries as
* there are multiple protocols to demux. The list is currently
* short (3 or 4 entries at most). The current demux assumes this.
*/
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <net/datalink.h>
#include <linux/mm.h>
#include <linux/in.h>
#include <linux/init.h>
#include <net/llc.h>
#include <net/p8022.h>
static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
const unsigned char *dest)
{
llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
return 0;
}
struct datalink_proto *register_8022_client(unsigned char type,
int (*func)(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *pt,
struct net_device *orig_dev))
{
struct datalink_proto *proto;
proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
if (proto) {
proto->type[0] = type;
proto->header_length = 3;
proto->request = p8022_request;
proto->sap = llc_sap_open(type, func);
if (!proto->sap) {
kfree(proto);
proto = NULL;
}
}
return proto;
}
void unregister_8022_client(struct datalink_proto *proto)
{
llc_sap_put(proto->sap);
kfree(proto);
}
EXPORT_SYMBOL(register_8022_client);
EXPORT_SYMBOL(unregister_8022_client);
MODULE_DESCRIPTION("Support for 802.2 demultiplexing off Ethernet");
MODULE_LICENSE("GPL");

View File

@ -23,7 +23,6 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/rculist.h>
#include <net/p8022.h>
#include <net/arp.h>
#include <linux/rtnetlink.h>
#include <linux/notifier.h>