fix proto events for immediate proto handlers
authorFelix Fietkau <nbd@openwrt.org>
Fri, 7 Oct 2011 16:50:16 +0000 (18:50 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 7 Oct 2011 16:50:16 +0000 (18:50 +0200)
proto.c

diff --git a/proto.c b/proto.c
index c54206fd70c2a96519d04040cade53641da66a54..786d6005f9e20d3600223e99050f6888156d16c4 100644 (file)
--- a/proto.c
+++ b/proto.c
@@ -169,7 +169,7 @@ int
 interface_proto_event(struct interface_proto_state *proto,
                      enum interface_proto_cmd cmd, bool force)
 {
-       enum interface_event ev;
+       enum interface_proto_event ev;
        int ret;
 
        ret = proto->cb(proto, cmd, force);
@@ -178,10 +178,10 @@ interface_proto_event(struct interface_proto_state *proto,
 
        switch(cmd) {
        case PROTO_CMD_SETUP:
-               ev = IFEV_UP;
+               ev = IFPEV_UP;
                break;
        case PROTO_CMD_TEARDOWN:
-               ev = IFEV_DOWN;
+               ev = IFPEV_DOWN;
                break;
        default:
                return -EINVAL;