Changeset 01784d2 in mainline for uspace/drv/bus/usb/ar9271/htc.c


Ignore:
Timestamp:
2015-01-28T18:19:30Z (9 years ago)
Author:
Jan Kolarik <kolarik@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
462054a
Parents:
ef521d4
Message:

Fixed errors in registry read and write, finished reseting device.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ar9271/htc.c

    ref521d4 r01784d2  
    3939#include "htc.h"
    4040
    41 #define MAX_RESP_LEN 64
    42 
    4341/**
    4442 * HTC download pipes mapping.
     
    8280        htc_header->endpoint_id = endpoint_id;
    8381        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;
    8589       
    8690        ath_t *ath_device = htc_device->ath_device;
     
    150154        free(buffer);
    151155       
    152         buffer_size = MAX_RESP_LEN;
     156        buffer_size = MAX_RESPONSE_LENGTH;
    153157        buffer = malloc(buffer_size);
    154158       
     
    214218        free(buffer);
    215219       
    216         buffer_size = MAX_RESP_LEN;
     220        buffer_size = MAX_RESPONSE_LENGTH;
    217221        buffer = malloc(buffer_size);
    218222
     
    272276static int htc_check_ready(htc_device_t *htc_device)
    273277{
    274         size_t buffer_size = MAX_RESP_LEN;
     278        size_t buffer_size = MAX_RESPONSE_LENGTH;
    275279        void *buffer = malloc(buffer_size);
    276280
Note: See TracChangeset for help on using the changeset viewer.