Changes in uspace/drv/nic/ar9271/ath_usb.c [8a64320e:fe97c5e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/ar9271/ath_usb.c
r8a64320e rfe97c5e 36 36 #include <usb/debug.h> 37 37 #include <malloc.h> 38 #include <errno.h> 38 39 #include "ath_usb.h" 39 40 … … 97 98 { 98 99 ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data; 99 usb_pipe_t *pipe = 100 &ath_usb->usb_device->pipes[ath_usb->output_ctrl_pipe_number].pipe;101 100 usb_pipe_t *pipe = &usb_device_get_mapped_ep( 101 ath_usb->usb_device, ath_usb->output_ctrl_pipe_number)->pipe; 102 102 103 return usb_pipe_write(pipe, buffer, buffer_size); 103 104 } … … 117 118 { 118 119 ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data; 119 usb_pipe_t *pipe = 120 &ath_usb->usb_device->pipes[ath_usb->input_ctrl_pipe_number].pipe;121 120 usb_pipe_t *pipe = &usb_device_get_mapped_ep( 121 ath_usb->usb_device, ath_usb->input_ctrl_pipe_number)->pipe; 122 122 123 return usb_pipe_read(pipe, buffer, buffer_size, transferred_size); 123 124 } … … 140 141 memcpy(complete_buffer + sizeof(ath_usb_data_header_t), 141 142 buffer, buffer_size); 142 143 143 144 ath_usb_data_header_t *data_header = 144 145 (ath_usb_data_header_t *) complete_buffer; 145 146 data_header->length = host2uint16_t_le(buffer_size); 146 147 data_header->tag = host2uint16_t_le(TX_TAG); 147 148 148 149 ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data; 149 usb_pipe_t *pipe = 150 &ath_usb->usb_device->pipes[ath_usb->output_data_pipe_number].pipe;151 150 usb_pipe_t *pipe = &usb_device_get_mapped_ep( 151 ath_usb->usb_device, ath_usb->output_data_pipe_number)->pipe; 152 152 153 int ret_val = usb_pipe_write(pipe, complete_buffer, 153 154 complete_buffer_size); 154 155 155 156 free(complete_buffer); 156 157 157 158 return ret_val; 158 159 } … … 172 173 { 173 174 ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data; 174 usb_pipe_t *pipe = 175 &ath_usb->usb_device->pipes[ath_usb->input_data_pipe_number].pipe; 176 177 return usb_pipe_read(pipe, buffer, buffer_size, 178 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); 179 179 }
Note:
See TracChangeset
for help on using the changeset viewer.