Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102782
b: refs/heads/master
c: b77ec4c
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and John W. Linville committed Jun 3, 2008
1 parent a36c23a commit fc6b228
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 04dea136b06ddd58879c9272b9f66ff060962317
refs/heads/master: b77ec4caefb280092a45d6798cbc2fd966ad01d8
22 changes: 22 additions & 0 deletions trunk/drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include <linux/netdevice.h>
#include <linux/usb.h>

#ifdef CONFIG_OLPC
#include <asm/olpc.h>
#endif

#define DRV_NAME "usb8xxx"

#include "host.h"
Expand Down Expand Up @@ -146,6 +150,14 @@ static void if_usb_fw_timeo(unsigned long priv)
wake_up(&cardp->fw_wq);
}

#ifdef CONFIG_OLPC
static void if_usb_reset_olpc_card(struct lbs_private *priv)
{
printk(KERN_CRIT "Resetting OLPC wireless via EC...\n");
olpc_ec_cmd(0x25, NULL, 0, NULL, 0);
}
#endif

/**
* @brief sets the configuration values
* @param ifnum interface number
Expand Down Expand Up @@ -231,6 +243,11 @@ static int if_usb_probe(struct usb_interface *intf,
cardp->priv->fw_ready = 1;

priv->hw_host_to_card = if_usb_host_to_card;
#ifdef CONFIG_OLPC
if (machine_is_olpc())
priv->reset_card = if_usb_reset_olpc_card;
#endif

cardp->boot2_version = udev->descriptor.bcdDevice;

if_usb_submit_rx_urb(cardp);
Expand Down Expand Up @@ -364,6 +381,11 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
ret = usb_reset_device(cardp->udev);
msleep(100);

#ifdef CONFIG_OLPC
if (ret && machine_is_olpc())
if_usb_reset_olpc_card(NULL);
#endif

lbs_deb_leave_args(LBS_DEB_USB, "ret %d", ret);

return ret;
Expand Down

0 comments on commit fc6b228

Please sign in to comment.