Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79011
b: refs/heads/master
c: be13f18
h: refs/heads/master
i:
  79009: 8e8686f
  79007: 44773bc
v: v3
  • Loading branch information
Andres Salomon authored and David S. Miller committed Jan 28, 2008
1 parent be848e4 commit 1f42df4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fb910fd3ada36cd9fbf6e037b87f2a83fd740b7
refs/heads/master: be13f1897f76a4b395c3d572a18b2802fd521946
26 changes: 4 additions & 22 deletions trunk/drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <linux/moduleparam.h>
#include <linux/firmware.h>
#include <linux/netdevice.h>
#include <linux/list.h>
#include <linux/usb.h>

#define DRV_NAME "usb8xxx"
Expand All @@ -23,15 +22,6 @@ static const char usbdriver_name[] = "usb8xxx";
static char *lbs_fw_name = "usb8388.bin";
module_param_named(fw_name, lbs_fw_name, charp, 0644);

/*
* We need to send a RESET command to all USB devices before
* we tear down the USB connection. Otherwise we would not
* be able to re-init device the device if the module gets
* loaded again. This is a list of all initialized USB devices,
* for the reset code see if_usb_reset_device()
*/
static LIST_HEAD(usb_devices);

static struct usb_device_id if_usb_table[] = {
/* Enter the device signature inside */
{ USB_DEVICE(0x1286, 0x2001) },
Expand Down Expand Up @@ -244,8 +234,6 @@ static int if_usb_probe(struct usb_interface *intf,
if (lbs_start_card(priv))
goto err_start_card;

list_add_tail(&cardp->list, &usb_devices);

usb_get_dev(udev);
usb_set_intfdata(intf, cardp);

Expand Down Expand Up @@ -279,8 +267,6 @@ static void if_usb_disconnect(struct usb_interface *intf)
/* Update Surprise removed to TRUE */
cardp->surprise_removed = 1;

list_del(&cardp->list);

if (priv) {
lbs_adapter *adapter = priv->adapter;

Expand All @@ -290,6 +276,10 @@ static void if_usb_disconnect(struct usb_interface *intf)
lbs_remove_card(priv);
}

/* this is (apparently?) necessary for future usage of the device */
lbs_prepare_and_send_command(priv, CMD_802_11_RESET, CMD_ACT_HALT,
0, 0, NULL);

/* Unlink and free urb */
if_usb_free(cardp);

Expand Down Expand Up @@ -1034,16 +1024,8 @@ static int __init if_usb_init_module(void)

static void __exit if_usb_exit_module(void)
{
struct usb_card_rec *cardp, *cardp_temp;

lbs_deb_enter(LBS_DEB_MAIN);

list_for_each_entry_safe(cardp, cardp_temp, &usb_devices, list) {
lbs_prepare_and_send_command(cardp->priv, CMD_802_11_RESET,
CMD_ACT_HALT, 0, 0, NULL);
}

/* API unregisters the driver from USB subsystem */
usb_deregister(&if_usb_driver);

lbs_deb_leave(LBS_DEB_MAIN);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/libertas/if_usb.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _LBS_IF_USB_H
#define _LBS_IF_USB_H

#include <linux/list.h>

/**
* This file contains definition for USB interface.
*/
Expand Down Expand Up @@ -44,7 +42,6 @@ struct read_cb_info {

/** USB card description structure*/
struct usb_card_rec {
struct list_head list;
struct net_device *eth_dev;
struct usb_device *udev;
struct urb *rx_urb, *tx_urb;
Expand Down

0 comments on commit 1f42df4

Please sign in to comment.