Commit d6e2be98 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

rtl8187: Fix module so that rmmod/insmod does not error

Due to misunderstanding of the returned values allowed for the tx callback
of mac80211, rtl8187 was using skb's that had been freed. This problem was
triggered when the module was sujected to a rmmod/insmod cycle.

After that was fixed, the modules would not work after the rmmod/insmod cycle
until the USB device was reset.
Signed-off-by: default avatarJohannes Berg <>
Signed-off-by: default avatarLarry Finger <>
Signed-off-by: default avatarJohn W. Linville <>
parent 124b68e7
......@@ -213,7 +213,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
return -ENOMEM;
return NETDEV_TX_OK;
flags = skb->len;
......@@ -281,7 +281,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
return rc;
return NETDEV_TX_OK;
static void rtl8187_rx_cb(struct urb *urb)
......@@ -1471,6 +1471,7 @@ static void __devexit rtl8187_disconnect(struct usb_interface *intf)
priv = dev->priv;
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