Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Sergey,

On 12/1/2021 1:09 PM, Sergey Ryazanov wrote:
On Wed, Dec 1, 2021 at 9:06 AM Martinez, Ricardo
<ricardo.martinez@xxxxxxxxxxxxxxx> 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.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux