• Alex Elder's avatar
    net: ipa: header pad field only valid for AP->modem endpoint · f330fda3
    Alex Elder authored
    Only QMAP endpoints should be configured to find a pad size field
    within packet headers.  They are found in the first byte of the QMAP
    header (and the hardware fills only the 6 bits in that byte that
    constitute the pad_len field).
    
    The RMNet driver assumes the pad_len field is valid for received
    packets, so we want to ensure the pad_len field is filled in that
    case.  That driver also assumes the length in the QMAP header
    includes the pad bytes.
    
    The RMNet driver does *not* pad the packets it sends, so the pad_len
    field can be ignored.
    
    Fix ipa_endpoint_init_hdr_ext() so it only marks the pad field
    offset valid for QMAP RX endpoints, and in that case indicates
    that the length field in the header includes the pad bytes.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f330fda3
ipa_endpoint.c 46.5 KB