Changeset 9e5a51c in mainline for uspace/drv/bus/usb/ar9271/ath_usb.c


Ignore:
Timestamp:
2015-03-08T22:20:34Z (11 years ago)
Author:
Jan Kolarik <kolarik@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
864762a
Parents:
4cb0148
Message:

Fixed PLL initialization value that blocked communication with external devices. Started implementing IEEE802.11 scanning and authentication functions.

File:
1 edited

Legend:

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

    r4cb0148 r9e5a51c  
    145145        size_t buffer_size)
    146146{
     147        size_t complete_buffer_size = buffer_size + DATA_HEADER_SIZE;
     148        void *complete_buffer = malloc(buffer_size + DATA_HEADER_SIZE);
     149        memcpy(complete_buffer + DATA_HEADER_SIZE, buffer, buffer_size);
     150       
     151        uint16_t *it = (uint16_t *) complete_buffer;
     152        *it++ = host2uint16_t_le(buffer_size);
     153        *it++ = host2uint16_t_le(TX_STREAM_MODE_TAG);
     154       
    147155        ath_usb_t *ath_usb = (ath_usb_t *) ath->specific_data;
    148156        usb_pipe_t *pipe =
     
    150158                pipe;
    151159       
    152         return usb_pipe_write(pipe, buffer, buffer_size);
     160        int ret_val = usb_pipe_write(pipe, complete_buffer,
     161                complete_buffer_size);
     162       
     163        free(complete_buffer);
     164       
     165        return ret_val;
    153166}
    154167
Note: See TracChangeset for help on using the changeset viewer.