Commit 80a284bd authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

staging: w35und: Use NETDEV_TX_BUSY if MLMESendFrame fails

This patch changes MLMESendFrame to return NETDEV_TX_BUSY if MLME frame is in
use so that wbsoft_tx() doesn't blindly return NETDEV_TX_OK in that case.

Cc: Sandro Bonazzola <sandro.bonazzola@gmail.com>
Cc: Lars Lindley <lindley@coyote.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ff80d13f
...@@ -19,14 +19,13 @@ ...@@ -19,14 +19,13 @@
#include "mds_f.h" #include "mds_f.h"
/* ============================================================================= */ #include <linux/netdevice.h>
u8 MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType)
/* DataType : FRAME_TYPE_802_11_MANAGEMENT, FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE, int MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType)
FRAME_TYPE_802_11_DATA */
{ {
if (adapter->sMlmeFrame.IsInUsed != PACKET_FREE_TO_USE) { if (adapter->sMlmeFrame.IsInUsed != PACKET_FREE_TO_USE) {
adapter->sMlmeFrame.wNumTxMMPDUDiscarded++; adapter->sMlmeFrame.wNumTxMMPDUDiscarded++;
return false; return NETDEV_TX_BUSY;
} }
adapter->sMlmeFrame.IsInUsed = PACKET_COME_FROM_MLME; adapter->sMlmeFrame.IsInUsed = PACKET_COME_FROM_MLME;
...@@ -40,9 +39,9 @@ u8 MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType) ...@@ -40,9 +39,9 @@ u8 MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType)
/* H/W will enter power save by set the register. S/W don't send null frame /* 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. */ with PWRMgt bit enbled to enter power save now. */
/* Transmit NDIS packet */
Mds_Tx(adapter); Mds_Tx(adapter);
return true;
return NETDEV_TX_OK;
} }
void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *desc) void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *desc)
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
#include "core.h" #include "core.h"
void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *pDes); void MLME_GetNextPacket(struct wbsoft_priv *adapter, struct wb35_descriptor *pDes);
u8 MLMESendFrame(struct wbsoft_priv *adapter, int MLMESendFrame(struct wbsoft_priv *adapter, u8 *pMMPDU, u16 len, u8 DataType);
u8 *pMMPDU, u16 len, u8 DataType);
void void
MLME_SendComplete(struct wbsoft_priv *adapter, u8 PacketID, MLME_SendComplete(struct wbsoft_priv *adapter, u8 PacketID,
......
...@@ -121,9 +121,7 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -121,9 +121,7 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
{ {
struct wbsoft_priv *priv = dev->priv; struct wbsoft_priv *priv = dev->priv;
MLMESendFrame(priv, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT); return MLMESendFrame(priv, skb->data, skb->len, FRAME_TYPE_802_11_MANAGEMENT);
return NETDEV_TX_OK;
} }
static int wbsoft_start(struct ieee80211_hw *dev) static int wbsoft_start(struct ieee80211_hw *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment