diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2008-10-27 11:13:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 16:51:54 -0500 |
commit | 68a193e4bb4e96fa58d11566b75bb9bcc34ea50b (patch) | |
tree | b869562ef32e7fab4e806daf1ea3c1fe386672ec /drivers/staging/wlan-ng/hfa384x_usb.c | |
parent | 187a769636b6d06d8bd31b273df5ab50eb45d344 (diff) |
Staging: wlan-ng: Eliminate more <2.6 kernel support.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng/hfa384x_usb.c')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 376ba58fcb9..2cd376ea431 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c | |||
@@ -171,23 +171,7 @@ out: | |||
171 | } | 171 | } |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69) | 174 | #define SUBMIT_URB(u,f) usb_submit_urb(u,f) |
175 | static void | ||
176 | usb_init_urb(struct urb *urb) | ||
177 | { | ||
178 | memset(urb, 0, sizeof(*urb)); | ||
179 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* tune me! */ | ||
180 | urb->count = (atomic_t)ATOMIC_INIT(1); | ||
181 | #endif | ||
182 | spin_lock_init(&urb->lock); | ||
183 | } | ||
184 | #endif | ||
185 | |||
186 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* tune me! */ | ||
187 | # define SUBMIT_URB(u,f) usb_submit_urb(u,f) | ||
188 | #else | ||
189 | # define SUBMIT_URB(u,f) usb_submit_urb(u) | ||
190 | #endif | ||
191 | 175 | ||
192 | /*================================================================*/ | 176 | /*================================================================*/ |
193 | /* Project Includes */ | 177 | /* Project Includes */ |
@@ -1594,78 +1578,10 @@ hfa384x_copy_to_aux( | |||
1594 | ----------------------------------------------------------------*/ | 1578 | ----------------------------------------------------------------*/ |
1595 | int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) | 1579 | int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) |
1596 | { | 1580 | { |
1597 | #if 0 | ||
1598 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) | ||
1599 | struct usb_device *parent = hw->usb->parent; | ||
1600 | int i; | ||
1601 | int port = -1; | ||
1602 | #endif | ||
1603 | #endif | ||
1604 | int result = 0; | 1581 | int result = 0; |
1605 | 1582 | ||
1606 | |||
1607 | #define P2_USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) | ||
1608 | #define P2_USB_FEAT_RESET 4 | ||
1609 | #define P2_USB_FEAT_C_RESET 20 | ||
1610 | |||
1611 | DBFENTER; | 1583 | DBFENTER; |
1612 | 1584 | ||
1613 | #if 0 | ||
1614 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) | ||
1615 | /* Find the hub port */ | ||
1616 | for ( i = 0; i < parent->maxchild; i++) { | ||
1617 | if (parent->children[i] == hw->usb) { | ||
1618 | port = i; | ||
1619 | break; | ||
1620 | } | ||
1621 | } | ||
1622 | if (port < 0) return -ENOENT; | ||
1623 | |||
1624 | /* Set and clear the reset */ | ||
1625 | usb_control_msg(parent, usb_sndctrlpipe(parent, 0), | ||
1626 | USB_REQ_SET_FEATURE, P2_USB_RT_PORT, P2_USB_FEAT_RESET, | ||
1627 | port+1, NULL, 0, 1*HZ); | ||
1628 | wait_ms(holdtime); | ||
1629 | usb_control_msg(parent, usb_sndctrlpipe(parent, 0), | ||
1630 | USB_REQ_CLEAR_FEATURE, P2_USB_RT_PORT, P2_USB_FEAT_C_RESET, | ||
1631 | port+1, NULL, 0, 1*HZ); | ||
1632 | wait_ms(settletime); | ||
1633 | |||
1634 | /* Set the device address */ | ||
1635 | result=usb_set_address(hw->usb); | ||
1636 | if (result < 0) { | ||
1637 | WLAN_LOG_ERROR("reset_usbdev: Dev not accepting address, " | ||
1638 | "result=%d\n", result); | ||
1639 | clear_bit(hw->usb->devnum, &hw->usb->bus->devmap.devicemap); | ||
1640 | hw->usb->devnum = -1; | ||
1641 | goto done; | ||
1642 | } | ||
1643 | /* Let the address settle */ | ||
1644 | wait_ms(20); | ||
1645 | |||
1646 | /* Assume we're reusing the original descriptor data */ | ||
1647 | |||
1648 | /* Set the configuration. */ | ||
1649 | WLAN_LOG_DEBUG(3, "Setting Configuration %d\n", | ||
1650 | hw->usb->config[0].bConfigurationValue); | ||
1651 | result=usb_set_configuration(hw->usb, hw->usb->config[0].bConfigurationValue); | ||
1652 | if ( result ) { | ||
1653 | WLAN_LOG_ERROR("usb_set_configuration() failed, result=%d.\n", | ||
1654 | result); | ||
1655 | goto done; | ||
1656 | } | ||
1657 | /* Let the configuration settle */ | ||
1658 | wait_ms(20); | ||
1659 | |||
1660 | done: | ||
1661 | #else | ||
1662 | result=usb_reset_device(hw->usb); | ||
1663 | if(result<0) { | ||
1664 | WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result); | ||
1665 | } | ||
1666 | #endif | ||
1667 | #endif | ||
1668 | |||
1669 | result=usb_reset_device(hw->usb); | 1585 | result=usb_reset_device(hw->usb); |
1670 | if(result<0) { | 1586 | if(result<0) { |
1671 | WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result); | 1587 | WLAN_LOG_ERROR("usb_reset_device() failed, result=%d.\n",result); |