LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Pavel Machek <pavel@suse.cz>
Subject: [PATCH 5/7] w35und: move packet_came() to wb35rx.c
Date: Thu, 30 Oct 2008 18:12:05 +0200	[thread overview]
Message-ID: <1225383127-16406-5-git-send-email-penberg@cs.helsinki.fi> (raw)
In-Reply-To: <1225383127-16406-4-git-send-email-penberg@cs.helsinki.fi>

The function no longer has dependencies to wbusb.c so we can move it to
wb35rx.c and make it static now.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/staging/winbond/wb35rx.c |   28 +++++++++++++++++++++++++++-
 drivers/staging/winbond/wbusb.c  |   29 -----------------------------
 2 files changed, 27 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index cd5a8e1..85b861c 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -264,8 +264,34 @@ void Wb35Rx_adjust(PDESCRIPTOR pRxDes)
 	pRxDes->buffer_size[0] = BufferSize;
 }
 
-extern void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize);
+static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
+{
+	struct wbsoft_priv *priv = hw->priv;
+	struct sk_buff *skb;
+	struct ieee80211_rx_status rx_status = {0};
+
+	if (!priv->enabled)
+		return;
+
+	skb = dev_alloc_skb(PacketSize);
+	if (!skb) {
+		printk("Not enough memory for packet, FIXME\n");
+		return;
+	}
+
+	memcpy(skb_put(skb, PacketSize),
+	       pRxBufferAddress,
+	       PacketSize);
 
+/*
+	rx_status.rate = 10;
+	rx_status.channel = 1;
+	rx_status.freq = 12345;
+	rx_status.phymode = MODE_IEEE80211B;
+*/
+
+	ieee80211_rx_irqsafe(hw, skb, &rx_status);
+}
 
 u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
 {
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 246f20b..b981662 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -391,35 +391,6 @@ error:
 	return err;
 }
 
-void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
-{
-	struct wbsoft_priv *priv = hw->priv;
-	struct sk_buff *skb;
-	struct ieee80211_rx_status rx_status = {0};
-
-	if (!priv->enabled)
-		return;
-
-	skb = dev_alloc_skb(PacketSize);
-	if (!skb) {
-		printk("Not enough memory for packet, FIXME\n");
-		return;
-	}
-
-	memcpy(skb_put(skb, PacketSize),
-	       pRxBufferAddress,
-	       PacketSize);
-
-/*
-	rx_status.rate = 10;
-	rx_status.channel = 1;
-	rx_status.freq = 12345;
-	rx_status.phymode = MODE_IEEE80211B;
-*/
-
-	ieee80211_rx_irqsafe(hw, skb, &rx_status);
-}
-
 static void wb35_hw_halt(struct wbsoft_priv *adapter)
 {
 	Mds_Destroy( adapter );
-- 
1.5.3.7


  reply	other threads:[~2008-10-30 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 16:12 [PATCH 1/7] w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros Pekka Enberg
2008-10-30 16:12 ` [PATCH 2/7] w35und: clean up wblinux.c a bit Pekka Enberg
2008-10-30 16:12   ` [PATCH 3/7] w35und: remove unused ->ShutDowned member from struct LOCAL_PARA Pekka Enberg
2008-10-30 16:12     ` [PATCH 4/7] w35und: move global wbsoft_enabled to struct wbsoft_priv Pekka Enberg
2008-10-30 16:12       ` Pekka Enberg [this message]
2008-10-30 16:12         ` [PATCH 6/7] w35und: remove ->skb_array from " Pekka Enberg
2008-10-30 16:12           ` [PATCH 7/7] w35und: remove ->shutdown " Pekka Enberg
2008-10-30 19:20             ` Pavel Machek
2008-10-30 19:19           ` [PATCH 6/7] w35und: remove ->skb_array " Pavel Machek
2008-10-30 19:19         ` [PATCH 5/7] w35und: move packet_came() to wb35rx.c Pavel Machek
2008-10-30 19:18       ` [PATCH 4/7] w35und: move global wbsoft_enabled to struct wbsoft_priv Pavel Machek
2008-10-30 19:17     ` [PATCH 3/7] w35und: remove unused ->ShutDowned member from struct LOCAL_PARA Pavel Machek
2008-10-30 19:17   ` [PATCH 2/7] w35und: clean up wblinux.c a bit Pavel Machek
2008-10-30 19:16 ` [PATCH 1/7] w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros Pavel Machek

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=1225383127-16406-5-git-send-email-penberg@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --subject='Re: [PATCH 5/7] w35und: move packet_came() to wb35rx.c' \
    /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

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).