Changeset b3c39690 in mainline for uspace/drv/nic/ar9271/ar9271.c


Ignore:
Timestamp:
2018-01-21T23:19:20Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
db51a6a6
Parents:
09187c6e
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-21 23:19:14)
git-committer:
Ondřej Hlavatý <aearsis@…> (2018-01-21 23:19:20)
Message:

usb: remove misleading usb_device_get_mapped_ep

Even though this method may seem very convenient to use, it's actually
wrong. The devices are usually not required to have strict endpoint
numbers. That's why the mapping mechanism exists. Therefore, it's just
not possible to rely on fixed endpoint mapping.

There could be similar method, that would take the transfer type and
direction, but it's much better to ask for the complete mapping then.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ar9271/ar9271.c

    r09187c6e rb3c39690  
    665665}
    666666
    667 static int ar9271_init(ar9271_t *ar9271, usb_device_t *usb_device)
     667static int ar9271_init(ar9271_t *ar9271, usb_device_t *usb_device, const usb_endpoint_description_t **endpoints)
    668668{
    669669        ar9271->starting_up = true;
     
    679679        }
    680680       
    681         int rc = ath_usb_init(ar9271->ath_device, usb_device);
     681        int rc = ath_usb_init(ar9271->ath_device, usb_device, endpoints);
    682682        if (rc != EOK) {
    683683                free(ar9271->ath_device);
     
    850850        ar9271->ddf_dev = dev;
    851851       
    852         rc = ar9271_init(ar9271, usb_device_get(dev));
     852        rc = ar9271_init(ar9271, usb_device_get(dev), endpoints);
    853853        if (rc != EOK) {
    854854                free(ar9271);
Note: See TracChangeset for help on using the changeset viewer.