From: Enrico Mioso <mrkiko.rs@gmail.com>
To: "Oliver Neukum" <oliver@neukum.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
"Steve Glendinning" <steve.glendinning@shawell.net>,
"Robert de Vries" <rhdv@xs4all.nl>,
"Hayes Wang" <hayeswang@realtek.com>,
"Freddy Xin" <freddy@asix.com.tw>, "Bjørn Mork" <bjorn@mork.no>,
"Liu Junliang" <liujunliang_ljl@163.com>,
linux-kernel@vger.kernel.org (open list),
linux-usb@vger.kernel.org (open list:USB NETWORKING DR...),
netdev@vger.kernel.org (open list:NETWORKING DRIVERS),
ModemManager-devel@lists.freedesktop.org
Cc: Enrico Mioso <mrkiko.rs@gmail.com>
Subject: [PATCH V5 net-next 1/3] net: cdc_ncm: Export cdc_ncm_{tx,rx}_fixup functions for re-use
Date: Mon, 30 Sep 2013 04:50:07 +0000 [thread overview]
Message-ID: <1380516609-31242-2-git-send-email-mrkiko.rs@gmail.com> (raw)
In-Reply-To: <1380516609-31242-1-git-send-email-mrkiko.rs@gmail.com>
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>
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 43afde8..62686be 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -858,7 +858,7 @@ static void cdc_ncm_txpath_bh(unsigned long param)
}
}
-static struct sk_buff *
+struct sk_buff *
cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
{
struct sk_buff *skb_out;
@@ -885,6 +885,7 @@ error:
return NULL;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_tx_fixup);
/* verify NTB header and return offset of first NDP, or negative error */
int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in)
@@ -965,7 +966,7 @@ error:
}
EXPORT_SYMBOL_GPL(cdc_ncm_rx_verify_ndp16);
-static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
{
struct sk_buff *skb;
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
@@ -1040,6 +1041,7 @@ err_ndp:
error:
return 0;
}
+EXPORT_SYMBOL_GPL(cdc_ncm_rx_fixup);
static void
cdc_ncm_speed_change(struct cdc_ncm_ctx *ctx,
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h
index cc25b70..163244b 100644
--- a/include/linux/usb/cdc_ncm.h
+++ b/include/linux/usb/cdc_ncm.h
@@ -133,3 +133,6 @@ extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf);
extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign);
extern int cdc_ncm_rx_verify_nth16(struct cdc_ncm_ctx *ctx, struct sk_buff *skb_in);
extern int cdc_ncm_rx_verify_ndp16(struct sk_buff *skb_in, int ndpoffset);
+struct sk_buff *
+cdc_ncm_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags);
+int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in);
--
1.8.4
next prev parent reply other threads:[~2013-09-30 4:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 4:50 [PATCH V5 net-next 0/3] The huawei_cdc_ncm driver Enrico Mioso
2013-09-30 4:50 ` Enrico Mioso [this message]
[not found] ` <1380516609-31242-1-git-send-email-mrkiko.rs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-30 4:50 ` [PATCH V5 net-next 2/3] net: huawei_cdc_ncm: Introduce the " Enrico Mioso
2013-09-30 9:07 ` Oliver Neukum
2013-11-01 11:35 ` Bjørn Mork
2013-11-04 9:17 ` Oliver Neukum
2013-09-30 4:50 ` [PATCH V5 net-next 3/3] net: cdc_ncm: remove non-standard NCM device IDs Enrico Mioso
2013-09-30 8:56 ` [PATCH V5 net-next 0/3] The huawei_cdc_ncm driver Bjørn Mork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380516609-31242-2-git-send-email-mrkiko.rs@gmail.com \
--to=mrkiko.rs@gmail.com \
--cc=ModemManager-devel@lists.freedesktop.org \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=freddy@asix.com.tw \
--cc=gregkh@linuxfoundation.org \
--cc=hayeswang@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liujunliang_ljl@163.com \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=rhdv@xs4all.nl \
--cc=steve.glendinning@shawell.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).