summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r--src/net/netdevice.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 9e142d274..9e0314973 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -36,12 +36,6 @@
*
*/
-/** Registered network-layer protocols */
-static struct net_protocol net_protocols[0]
- __table_start ( struct net_protocol, net_protocols );
-static struct net_protocol net_protocols_end[0]
- __table_end ( struct net_protocol, net_protocols );
-
/** List of network devices */
struct list_head net_devices = LIST_HEAD_INIT ( net_devices );
@@ -538,8 +532,7 @@ int net_rx ( struct io_buffer *iobuf, struct net_device *netdev,
struct net_protocol *net_protocol;
/* Hand off to network-layer protocol, if any */
- for ( net_protocol = net_protocols ; net_protocol < net_protocols_end ;
- net_protocol++ ) {
+ for_each_table_entry ( net_protocol, NET_PROTOCOLS ) {
if ( net_protocol->net_proto == net_proto ) {
return net_protocol->rx ( iobuf, netdev, ll_source );
}