caif: Use link layer MTU instead of fixed MTU
[firefly-linux-kernel-4.4.55.git] / net / caif / cfctrl.c
index 107c4b2a311ea0c5ee9f78e43d51dd00246ca919..563145fdc4c368de2c50c8d9d3510742a7d2e658 100644 (file)
@@ -19,7 +19,7 @@
 #ifdef CAIF_NO_LOOP
 static int handle_loop(struct cfctrl *ctrl,
                              int cmd, struct cfpkt *pkt){
-       return CAIF_FAILURE;
+       return -1;
 }
 #else
 static int handle_loop(struct cfctrl *ctrl,
@@ -395,7 +395,7 @@ static int cfctrl_recv(struct cflayer *layer, struct cfpkt *pkt)
        cmd = cmdrsp & CFCTRL_CMD_MASK;
        if (cmd != CFCTRL_CMD_LINK_ERR
            && CFCTRL_RSP_BIT != (CFCTRL_RSP_BIT & cmdrsp)) {
-               if (handle_loop(cfctrl, cmd, pkt) == CAIF_FAILURE)
+               if (handle_loop(cfctrl, cmd, pkt) != 0)
                        cmdrsp |= CFCTRL_ERR_BIT;
        }
 
@@ -647,6 +647,6 @@ found:
        default:
                break;
        }
-       return CAIF_SUCCESS;
+       return 0;
 }
 #endif