Commit 8cae2f1d authored by Jes Sorensen's avatar Jes Sorensen Committed by Kalle Valo

rtl8xxxu: Unregister from mac80211 before shutting down the device

This fixes a long standing bug where mac80211 would send disconnect
packets to the device, after we had shut down the device.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 8e254960
......@@ -8003,13 +8003,6 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
return ret;
}
static void rtl8xxxu_disable_device(struct ieee80211_hw *hw)
{
struct rtl8xxxu_priv *priv = hw->priv;
priv->fops->power_off(priv);
}
static void rtl8xxxu_cam_write(struct rtl8xxxu_priv *priv,
struct ieee80211_key_conf *key, const u8 *mac)
{
......@@ -9726,13 +9719,14 @@ static void rtl8xxxu_disconnect(struct usb_interface *interface)
hw = usb_get_intfdata(interface);
priv = hw->priv;
rtl8xxxu_disable_device(hw);
ieee80211_unregister_hw(hw);
priv->fops->power_off(priv);
usb_set_intfdata(interface, NULL);
dev_info(&priv->udev->dev, "disconnecting\n");
ieee80211_unregister_hw(hw);
kfree(priv->fw_data);
mutex_destroy(&priv->usb_buf_mutex);
mutex_destroy(&priv->h2c_mutex);
......
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