1. 22 Jun, 2021 38 commits
  2. 19 Jun, 2021 2 commits
    • Íñigo Huguet's avatar
      rtl8xxxu: avoid parsing short RX packet · adf6a0f8
      Íñigo Huguet authored
      One USB data buffer can contain multiple received network
      packets. If that's the case, they're processed this way:
      1. Original buffer is cloned
      2. Original buffer is trimmed to contain only the first
         network packet
      3. This first network packet is passed to network stack
      4. Cloned buffer is trimmed to eliminate the first network
         packet
      5. Repeat with the cloned buffer until there are no more
         network packets inside
      
      However, if the space remaining in original buffer after
      the first network packet is not enough to contain at least
      another network packet descriptor, it is not cloned.
      
      The loop parsing this packets ended if remaining space == 0.
      But if the remaining space was > 0 but < packet descriptor
      size, another iteration of the loop was done, processing again
      the previous packet because cloning didn't happen. Moreover,
      the ownership of this packet had been passed to network
      stack in the previous iteration.
      
      This patch ensures that no extra iteration is done if the
      remaining size is not enough for one packet, and also avoid
      the first iteration for the same reason.
      
      Probably this doesn't happen in practice, but can happen
      theoretically.
      Signed-off-by: default avatarÍñigo Huguet <ihuguet@redhat.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210511071926.8951-1-ihuguet@redhat.com
      adf6a0f8
    • Pascal Terjan's avatar
      rtl8xxxu: Fix device info for RTL8192EU devices · c240b044
      Pascal Terjan authored
      Based on 2001:3319 and 2357:0109 which I used to test the fix and
      0bda:818b and 2357:0108 for which I found efuse dumps online.
      
      == 2357:0109 ==
      === Before ===
      Vendor: Realtek
      Product: \x03802.11n NI
      Serial:
      === After ===
      Vendor: Realtek
      Product: 802.11n NIC
      Serial not available.
      
      == 2001:3319 ==
      === Before ===
      Vendor: Realtek
      Product: Wireless N
      Serial: no USB Adap
      === After ===
      Vendor: Realtek
      Product: Wireless N Nano USB Adapter
      Serial not available.
      Signed-off-by: default avatarPascal Terjan <pterjan@google.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      Link: https://lore.kernel.org/r/20210424172959.1559890-1-pterjan@google.com
      c240b044