drivers: wireless: Fix to receive a UDP packet partially in gs2200m.c

Summary:
- When receiving a UDP packet partially, the rest of the packet
  must be discarded.

Impact:
- None

Testing:
- Tested with a UDP sample program

Reported-by: Masatoshi Ueno <Masatoshi.Ueno@sony.com>
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-04-13 18:27:09 +09:00 committed by Xiang Xiao
parent c90a6bdf2b
commit fa5daea3d9

View File

@ -650,7 +650,7 @@ static bool _copy_data_from_pkt(FAR struct gs2200m_dev_s *dev,
pkt_dat->remain -= len;
if (0 == pkt_dat->remain)
if (0 == pkt_dat->remain || TYPE_BULK_DATA_UDP == pkt_dat->type)
{
_remove_and_free_pkt(dev, c);
}