aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/at76c50x-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/at76c50x-usb.c')
-rw-r--r--drivers/net/wireless/at76c50x-usb.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 1128fa8c9ed5..298601436ee2 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1525,8 +1525,7 @@ static void at76_rx_tasklet(unsigned long param)
1525 1525
1526 if (priv->device_unplugged) { 1526 if (priv->device_unplugged) {
1527 at76_dbg(DBG_DEVSTART, "device unplugged"); 1527 at76_dbg(DBG_DEVSTART, "device unplugged");
1528 if (urb) 1528 at76_dbg(DBG_DEVSTART, "urb status %d", urb->status);
1529 at76_dbg(DBG_DEVSTART, "urb status %d", urb->status);
1530 return; 1529 return;
1531 } 1530 }
1532 1531
@@ -1729,7 +1728,7 @@ static void at76_mac80211_tx_callback(struct urb *urb)
1729 ieee80211_wake_queues(priv->hw); 1728 ieee80211_wake_queues(priv->hw);
1730} 1729}
1731 1730
1732static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 1731static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1733{ 1732{
1734 struct at76_priv *priv = hw->priv; 1733 struct at76_priv *priv = hw->priv;
1735 struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer; 1734 struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
@@ -1742,7 +1741,8 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1742 if (priv->tx_urb->status == -EINPROGRESS) { 1741 if (priv->tx_urb->status == -EINPROGRESS) {
1743 wiphy_err(priv->hw->wiphy, 1742 wiphy_err(priv->hw->wiphy,
1744 "%s called while tx urb is pending\n", __func__); 1743 "%s called while tx urb is pending\n", __func__);
1745 return NETDEV_TX_BUSY; 1744 dev_kfree_skb_any(skb);
1745 return;
1746 } 1746 }
1747 1747
1748 /* The following code lines are important when the device is going to 1748 /* The following code lines are important when the device is going to
@@ -1756,7 +1756,8 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1756 if (compare_ether_addr(priv->bssid, mgmt->bssid)) { 1756 if (compare_ether_addr(priv->bssid, mgmt->bssid)) {
1757 memcpy(priv->bssid, mgmt->bssid, ETH_ALEN); 1757 memcpy(priv->bssid, mgmt->bssid, ETH_ALEN);
1758 ieee80211_queue_work(hw, &priv->work_join_bssid); 1758 ieee80211_queue_work(hw, &priv->work_join_bssid);
1759 return NETDEV_TX_BUSY; 1759 dev_kfree_skb_any(skb);
1760 return;
1760 } 1761 }
1761 } 1762 }
1762 1763
@@ -1796,8 +1797,6 @@ static int at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
1796 priv->tx_urb, 1797 priv->tx_urb,
1797 priv->tx_urb->hcpriv, priv->tx_urb->complete); 1798 priv->tx_urb->hcpriv, priv->tx_urb->complete);
1798 } 1799 }
1799
1800 return 0;
1801} 1800}
1802 1801
1803static int at76_mac80211_start(struct ieee80211_hw *hw) 1802static int at76_mac80211_start(struct ieee80211_hw *hw)
@@ -2061,11 +2060,12 @@ static int at76_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2061 2060
2062 int i; 2061 int i;
2063 2062
2064 at76_dbg(DBG_MAC80211, "%s(): cmd %d key->alg %d key->keyidx %d " 2063 at76_dbg(DBG_MAC80211, "%s(): cmd %d key->cipher %d key->keyidx %d "
2065 "key->keylen %d", 2064 "key->keylen %d",
2066 __func__, cmd, key->alg, key->keyidx, key->keylen); 2065 __func__, cmd, key->cipher, key->keyidx, key->keylen);
2067 2066
2068 if (key->alg != ALG_WEP) 2067 if ((key->cipher != WLAN_CIPHER_SUITE_WEP40) &&
2068 (key->cipher != WLAN_CIPHER_SUITE_WEP104))
2069 return -EOPNOTSUPP; 2069 return -EOPNOTSUPP;
2070 2070
2071 key->hw_key_idx = key->keyidx; 2071 key->hw_key_idx = key->keyidx;