Ignore:
File:
1 edited

Legend:

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

    rb3c39690 rcde999a  
    3333 */
    3434
     35#include <async.h>
    3536#include <ieee80211.h>
    3637#include <usb/classes/classes.h>
     
    4142#include <ddf/interrupt.h>
    4243#include <errno.h>
     44#include <str_error.h>
    4345#include <nic.h>
    4446#include <macros.h>
    45 #include <thread.h>
    4647#include "ath_usb.h"
    4748#include "wmi.h"
     
    665666}
    666667
    667 static int ar9271_init(ar9271_t *ar9271, usb_device_t *usb_device, const usb_endpoint_description_t **endpoints)
     668static int ar9271_init(ar9271_t *ar9271, usb_device_t *usb_device)
    668669{
    669670        ar9271->starting_up = true;
     
    679680        }
    680681       
    681         int rc = ath_usb_init(ar9271->ath_device, usb_device, endpoints);
     682        int rc = ath_usb_init(ar9271->ath_device, usb_device);
    682683        if (rc != EOK) {
    683684                free(ar9271->ath_device);
     
    733734 * @param ar9271 AR9271 device structure
    734735 *
    735  * @return EOK if succeed, negative error code otherwise
     736 * @return EOK if succeed, error code otherwise
    736737 *
    737738 */
     
    784785                        free(buffer);
    785786                        usb_log_error("Error while uploading firmware. "
    786                             "Error: %d\n", rc);
     787                            "Error: %s\n", str_error_name(rc));
    787788                        return rc;
    788789                }
     
    818819       
    819820        /* Wait until firmware is ready - wait for 1 second to be sure. */
    820         thread_sleep(1);
     821        async_sleep(1);
    821822       
    822823        return rc;
     
    836837        if (rc != EOK) {
    837838                usb_log_error("Failed to create USB device: %s, "
    838                     "ERR_NUM = %d\n", err_msg, rc);
     839                    "ERR_NUM = %s\n", err_msg, str_error_name(rc));
    839840                return NULL;
    840841        }
     
    850851        ar9271->ddf_dev = dev;
    851852       
    852         rc = ar9271_init(ar9271, usb_device_get(dev), endpoints);
     853        rc = ar9271_init(ar9271, usb_device_get(dev));
    853854        if (rc != EOK) {
    854855                free(ar9271);
    855                 usb_log_error("Failed to initialize AR9271 structure: %d\n",
    856                     rc);
     856                usb_log_error("Failed to initialize AR9271 structure: %s\n",
     857                    str_error_name(rc));
    857858                return NULL;
    858859        }
     
    876877 * @param dev The device structure.
    877878 *
    878  * @return EOK if succeed, negative error code otherwise
     879 * @return EOK if succeed, error code otherwise
    879880 */
    880881static int ar9271_add_device(ddf_dev_t *dev)
Note: See TracChangeset for help on using the changeset viewer.