Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset fe97c5e in mainline for uspace/drv/nic/ar9271/ath_usb.c


Ignore:
Timestamp:
2015-06-28T17:11:59Z (6 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
dca8fe5
Parents:
fb1007ef
Message:

ar9271: Adapt to new usb api

File:
1 edited

Legend:

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

    rfb1007ef rfe97c5e  
    9898{
    9999        ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data;
    100         usb_pipe_t *pipe =
    101             &ath_usb->usb_device->pipes[ath_usb->output_ctrl_pipe_number].pipe;
    102        
     100        usb_pipe_t *pipe = &usb_device_get_mapped_ep(
     101            ath_usb->usb_device, ath_usb->output_ctrl_pipe_number)->pipe;
     102
    103103        return usb_pipe_write(pipe, buffer, buffer_size);
    104104}
     
    118118{
    119119        ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data;
    120         usb_pipe_t *pipe =
    121             &ath_usb->usb_device->pipes[ath_usb->input_ctrl_pipe_number].pipe;
    122        
     120        usb_pipe_t *pipe = &usb_device_get_mapped_ep(
     121            ath_usb->usb_device, ath_usb->input_ctrl_pipe_number)->pipe;
     122
    123123        return usb_pipe_read(pipe, buffer, buffer_size, transferred_size);
    124124}
     
    141141        memcpy(complete_buffer + sizeof(ath_usb_data_header_t),
    142142            buffer, buffer_size);
    143        
     143
    144144        ath_usb_data_header_t *data_header =
    145145            (ath_usb_data_header_t *) complete_buffer;
    146146        data_header->length = host2uint16_t_le(buffer_size);
    147147        data_header->tag = host2uint16_t_le(TX_TAG);
    148        
     148
    149149        ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data;
    150         usb_pipe_t *pipe =
    151             &ath_usb->usb_device->pipes[ath_usb->output_data_pipe_number].pipe;
    152        
     150        usb_pipe_t *pipe = &usb_device_get_mapped_ep(
     151            ath_usb->usb_device, ath_usb->output_data_pipe_number)->pipe;
     152
    153153        int ret_val = usb_pipe_write(pipe, complete_buffer,
    154154            complete_buffer_size);
    155        
     155
    156156        free(complete_buffer);
    157        
     157
    158158        return ret_val;
    159159}
     
    173173{
    174174        ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data;
    175         usb_pipe_t *pipe =
    176             &ath_usb->usb_device->pipes[ath_usb->input_data_pipe_number].pipe;
    177        
    178         return usb_pipe_read(pipe, buffer, buffer_size,
    179             transferred_size);
     175        usb_pipe_t *pipe = &usb_device_get_mapped_ep(
     176            ath_usb->usb_device, ath_usb->input_data_pipe_number)->pipe;
     177
     178        return usb_pipe_read(pipe, buffer, buffer_size, transferred_size);
    180179}
Note: See TracChangeset for help on using the changeset viewer.