staging: w35und: Inline MLMESendFrame() to wbsoft_tx()
authorPekka Enberg <penberg@kernel.org>
Sun, 19 Sep 2010 10:01:03 +0000 (13:01 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Sep 2010 17:46:03 +0000 (10:46 -0700)
The wbsoft_tx() function is a simple wrapper on top of MLMESendFrame() so
inline the latter to the former.

Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/mlmetxrx.c
drivers/staging/winbond/mlmetxrx_f.h
drivers/staging/winbond/wbusb.c

index 6b28898485d6099301cb5f6360afe5ad7778163e..7425a23f12e83c0c093ce37790dde4c3edf8325e 100644 (file)
 
 #include "mds_f.h"
 
-#include <linux/netdevice.h>
-
-int MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType)
-{
-       if (adapter->sMlmeFrame.IsInUsed != PACKET_FREE_TO_USE) {
-               adapter->sMlmeFrame.wNumTxMMPDUDiscarded++;
-               return NETDEV_TX_BUSY;
-       }
-       adapter->sMlmeFrame.IsInUsed = PACKET_COME_FROM_MLME;
-
-       /* Keep information for sending */
-       adapter->sMlmeFrame.pMMPDU = pMMPDU;
-       adapter->sMlmeFrame.DataType = DataType;
-       /* len must be the last setting due to QUERY_SIZE_SECOND of Mds */
-       adapter->sMlmeFrame.len = len;
-       adapter->sMlmeFrame.wNumTxMMPDU++;
-
-       /* H/W will enter power save by set the register. S/W don't send null frame
-       with PWRMgt bit enbled to enter power save now. */
-
-       Mds_Tx(adapter);
-
-       return NETDEV_TX_OK;
-}
-
 void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *desc)
 {
        desc->InternalUsed = desc->buffer_start_index + desc->buffer_number;
index ddccbc2e1cd28654ecfc056f8dcfa18226abc93d..012507fc49e3b0c9bf30853e976a8d6d6c7abc6d 100644 (file)
@@ -11,7 +11,6 @@
 #include "core.h"
 
 void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *pDes);
-int MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType);
 
 void
 MLME_SendComplete(struct wbsoft_priv *adapter, u8 PacketID,
index 157c05bf2578afae8694bd2eb84246f1012bfd85..3f60cf7e6ec13554cb9d43d2475674126775b2e8 100644 (file)
@@ -121,7 +121,26 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
 {
        struct wbsoft_priv *priv = dev->priv;
 
-       return MLMESendFrame(priv, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT);
+       if (priv->sMlmeFrame.IsInUsed != PACKET_FREE_TO_USE) {
+               priv->sMlmeFrame.wNumTxMMPDUDiscarded++;
+               return NETDEV_TX_BUSY;
+       }
+
+       priv->sMlmeFrame.IsInUsed = PACKET_COME_FROM_MLME;
+
+       priv->sMlmeFrame.pMMPDU         = skb->data;
+       priv->sMlmeFrame.DataType       = FRAME_TYPE_802_11_MANAGEMENT;
+       priv->sMlmeFrame.len            = skb->len;
+       priv->sMlmeFrame.wNumTxMMPDU++;
+
+       /*
+        * H/W will enter power save by set the register. S/W don't send null
+        * frame with PWRMgt bit enbled to enter power save now.
+        */
+
+       Mds_Tx(priv);
+
+       return NETDEV_TX_OK;
 }
 
 static int wbsoft_start(struct ieee80211_hw *dev)