lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net] drivers/net/wan/hdlc: In hdlc_rcv, check to make sure dev is an HDLC device
On Mon, Oct 19, 2020 at 2:22 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> Looks correct to me. I spotted there is also IFF_WAN_HDLC added by
> 7cdc15f5f9db ("WAN: Generic HDLC now uses IFF_WAN_HDLC private flag.")
> would using that flag also be correct and cleaner potentially?
>
> Up to you, just wanted to make sure you considered it.

Oh, Yes! I see IFF_WAN_HDLC is set for all HDLC devices. I also
searched through the kernel code and see no other uses of
IFF_WAN_HDLC. So I think we can use IFF_WAN_HDLC to reliably check if
a device is an HDLC device. This should be cleaner than checking
ndo_start_xmit.

Thanks! I'll change this patch to use IFF_WAN_HDLC.

\
 
 \ /
  Last update: 2020-10-20 00:37    [W:0.137 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site