Changeset 01784d2 in mainline for uspace/drv/bus/usb/ar9271/htc.c
- Timestamp:
- 2015-01-28T18:19:30Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 462054a
- Parents:
- ef521d4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ar9271/htc.c
ref521d4 r01784d2 39 39 #include "htc.h" 40 40 41 #define MAX_RESP_LEN 6442 43 41 /** 44 42 * HTC download pipes mapping. … … 82 80 htc_header->endpoint_id = endpoint_id; 83 81 htc_header->flags = 0; 84 htc_header->payload_length = host2uint16_t_be(buffer_size); 82 htc_header->payload_length = 83 host2uint16_t_be(buffer_size - sizeof(htc_frame_header_t)); 84 85 htc_header->control_bytes[0] = 0x02; 86 htc_header->control_bytes[1] = 0x88; 87 htc_header->control_bytes[2] = 0xFF; 88 htc_header->control_bytes[3] = 0xFF; 85 89 86 90 ath_t *ath_device = htc_device->ath_device; … … 150 154 free(buffer); 151 155 152 buffer_size = MAX_RESP _LEN;156 buffer_size = MAX_RESPONSE_LENGTH; 153 157 buffer = malloc(buffer_size); 154 158 … … 214 218 free(buffer); 215 219 216 buffer_size = MAX_RESP _LEN;220 buffer_size = MAX_RESPONSE_LENGTH; 217 221 buffer = malloc(buffer_size); 218 222 … … 272 276 static int htc_check_ready(htc_device_t *htc_device) 273 277 { 274 size_t buffer_size = MAX_RESP _LEN;278 size_t buffer_size = MAX_RESPONSE_LENGTH; 275 279 void *buffer = malloc(buffer_size); 276 280
Note:
See TracChangeset
for help on using the changeset viewer.