• Al Viro's avatar
    airo: fix transmit_802_11_packet() · 977b143c
    Al Viro authored
    
    
    a) gaplen would better be stored little-endian
    b) for control packets (shorter than 24-byte header) we ended up with
            bap_write(ai, hdrlen == 30 ?
                    (const u16*)&gap.gaplen : (const u16*)&gap, 38 - hdrlen, BAP1);
    passing to card the data past the end of gap (i.e. random stuff from stack)
    and did _not_ feed the gaplen at the right offset.
    c) sending the contents of uninitialized fields of struct is Not Nice(tm) either
    
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    977b143c