• Mark A. Greer's avatar
    NFC: digital: Add NFC-DEP Receive Chaining Support · c12715ab
    Mark A. Greer authored
    When the peer in an NFC-DEP exchange has a
    packet to send that is larger than the local
    maximum payload, it sets the 'MI' bit in the
    'I' PDU.  This indicates that NFC-DEP chaining
    is to occur.
    
    When such a PDU is received, the local side
    responds with an 'ACK' PDU and this continues
    until the peer sends an 'I' PDU with the 'MI'
    bit cleared.  This indicates that the chaining
    sequence is complete and the entire packet has
    been transferred.
    
    Receiving chained PDUs is currently not supported
    by the digital layer so add that support.  When a
    chaining sequence is initiated by the peer, the
    digital layer will allocate an skb large enough
    to hold 8 maximum sized frame payloads.  The maximum
    payload can range from 64 to 254 bytes so 8 * 254 =
    2032 seems like a reasonable compromise between
    potentially wasting memory and constantly reallocating
    new, larger skbs.
    Reviewed-by: default avatarThierry Escande <thierry.escande@linux.intel.com>
    Tested-by: default avatarThierry Escande <thierry.escande@linux.intel.com>
    Signed-off-by: default avatarMark A. Greer <mgreer@animalcreek.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    c12715ab
digital_dep.c 26.9 KB