static int sipc4_raw_rx(struct sipc4_rx_data *data) { struct net_device *dev = data->dev; struct sk_buff *skb = data->skb; struct sipc_rx_hdr *hdr = data->rx_hdr; int ch = sipc4_get_hdlc_ch(hdr->hdr, SIPC4_RAW); /* check pdp channel */ if (ch >= CHID_PSD_DATA1 && ch <= CHID_PSD_DATA15) pdp_netif_rx(dev, skb, ch); else sipc4_netif_rx(dev, skb, SIPC4_RES(SIPC4_RAW, ch)); return 0; }
static int sipc4_raw_rx(struct sipc4_rx_data *data, const __be16 protocol) { struct net_device *dev = data->dev; struct sk_buff *skb = data->skb; int ch = sipc4_get_hdlc_ch(skb->data, SIPC4_RAW); /* Remove header */ skb_pull(skb, sipc4_get_header_size(SIPC4_RAW)); /* check pdp channel */ if (ch >= (CHID_PSD_DATA1) && ch <= CHID_PSD_DATA15) pdp_netif_rx(dev, skb, ch, protocol); else sipc4_netif_rx(dev, skb, SIPC4_RES(SIPC4_RAW, ch)); return 0; }