# Re: \[PATCH v2 09/14\] net: wwan: t7xx: Add WWAN network interface

- From: Martinez, Ricardo \<ricardo.martinez@linux.intel.com\>
- Date: 2021-12-02 20:44:49 
- List: linux-wireless
- Page: https://ratatoskr.run/linux-wireless/2021/12/11217699
- Thread: https://ratatoskr.run/netdev/2021/11/11215334/t.md

```text

Hi Sergey,

On 12/1/2021 1:09 PM, Sergey Ryazanov wrote:
> On Wed, Dec 1, 2021 at 9:06 AM Martinez, Ricardo
> [ref] wrote:
>> On 11/6/2021 11:08 AM, Sergey Ryazanov wrote:
>>> On Mon, Nov 1, 2021 at 6:57 AM Ricardo Martinez wrote:
>>>> +#define IPV4_VERSION           0x40
>>>> +#define IPV6_VERSION           0x60
>>> Just curious why the _VERSION suffix? Why not, for example, PKT_TYPE_ prefix?
>> Nothing special about _VERSION, but it does look a bit weird, will use
>> PKT_TYPE_  as suggested
> I checked the driver code again and found that these constants are
> really used to distinguish between IPv4 and IPv6 packets by checking
> the first byte of the data packet (IP header version field).
>
> Now I am wondering, does the modem firmware report a packet type in
> one of the BAT or PIT headers? If the modem is already reporting a
> packet type, then it is better to use the provided information instead
> of touching the packet data. Otherwise, if the modem does not
> explicitly report a packet type, and you have to check the version
> field of the IP header, then it seems Ok to keep the names of these
> constants as they are (with the _VERSION suffix).

Actually, there is a bit in the PIT header for the packet type, I'll make the driver

use it instead of looking at the data packet.

```
