Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: cdc_ncm: Export cdc_ncm_{tx, rx}_fixup functions for re-use

Some drivers implementing NCM-like protocols, may re-use those functions, as is
the case in the huawei_cdc_ncm driver.
Export them via EXPORT_SYMBOL_GPL, in accordance with how other functions have
been exported.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Enrico Mioso and committed by
David S. Miller
2f69702c b579035f

+7 -2
+4 -2
drivers/net/usb/cdc_ncm.c
··· 830 830 } 831 831 } 832 832 833 - static struct sk_buff * 833 + struct sk_buff * 834 834 cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) 835 835 { 836 836 struct sk_buff *skb_out; ··· 857 857 858 858 return NULL; 859 859 } 860 + EXPORT_SYMBOL_GPL(cdc_ncm_tx_fixup); 860 861 861 862 /* verify NTB header and return offset of first NDP, or negative error */ 862 863 int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in) ··· 944 943 } 945 944 EXPORT_SYMBOL_GPL(cdc_ncm_rx_verify_ndp16); 946 945 947 - static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in) 946 + int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in) 948 947 { 949 948 struct sk_buff *skb; 950 949 struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; ··· 1020 1019 error: 1021 1020 return 0; 1022 1021 } 1022 + EXPORT_SYMBOL_GPL(cdc_ncm_rx_fixup); 1023 1023 1024 1024 static void 1025 1025 cdc_ncm_speed_change(struct usbnet *dev,
+3
include/linux/usb/cdc_ncm.h
··· 125 125 struct sk_buff *cdc_ncm_fill_tx_frame(struct usbnet *dev, struct sk_buff *skb, __le32 sign); 126 126 int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in); 127 127 int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset); 128 + struct sk_buff * 129 + cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags); 130 + int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in); 128 131 129 132 #endif /* __LINUX_USB_CDC_NCM_H */