<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wan/hdlc.c, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-07-27T19:11:45Z</updated>
<entry>
<title>net: split out ndo_siowandev ioctl</title>
<updated>2021-07-27T19:11:45Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-07-27T13:45:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ad7eab2ab014748b062507b7ac69f8e856057717'/>
<id>urn:sha1:ad7eab2ab014748b062507b7ac69f8e856057717</id>
<content type='text'>
In order to further reduce the scope of ndo_do_ioctl(), move
out the SIOCWANDEV handling into a new network device operation
function.

Adjust the prototype to only pass the if_settings sub-structure
in place of the ifreq, and remove the redundant 'cmd' argument
in the process.

Cc: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
Cc: "Jan \"Yenya\" Kasprzak" &lt;kas@fi.muni.cz&gt;
Cc: Kevin Curtis &lt;kevin.curtis@farsite.co.uk&gt;
Cc: Zhao Qiang &lt;qiang.zhao@nxp.com&gt;
Cc: Martin Schiller &lt;ms@dev.tdt.de&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: linux-x25@vger.kernel.org
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: add braces {} to all arms of the statement</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1bb52182526552e31367ea521cf36d37ebb26966'/>
<id>urn:sha1:1bb52182526552e31367ea521cf36d37ebb26966</id>
<content type='text'>
Braces {} should be used on all arms of this statement.

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: move out assignment in if condition</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e50eb6c3578c6bd7c43c30bfa40a882f0815a2d2'/>
<id>urn:sha1:e50eb6c3578c6bd7c43c30bfa40a882f0815a2d2</id>
<content type='text'>
Should not use assignment in if condition.

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: replace comparison to NULL with "!param"</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=387847f295c86fe72693178ed1eab000154f98ff'/>
<id>urn:sha1:387847f295c86fe72693178ed1eab000154f98ff</id>
<content type='text'>
According to the chackpatch.pl, comparison to NULL could
be written "!param".

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: fix an code style issue about EXPORT_SYMBOL(foo)</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01506939cc8466635fb05711a79f8eb2b5df1ff3'/>
<id>urn:sha1:01506939cc8466635fb05711a79f8eb2b5df1ff3</id>
<content type='text'>
According to the chackpatch.pl,
EXPORT_SYMBOL(foo); should immediately follow its function/variable.

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: fix an code style issue about "foo* bar"</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=68fd73925bce2d81e7144caf16519e6b7e80b6a1'/>
<id>urn:sha1:68fd73925bce2d81e7144caf16519e6b7e80b6a1</id>
<content type='text'>
Fix the checkpatch error as "foo* bar" and should be "foo *bar".

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: add blank line after declarations</title>
<updated>2021-06-01T23:57:47Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=04cc04f07bb25e5555b27f0d6069599f0da23cad'/>
<id>urn:sha1:04cc04f07bb25e5555b27f0d6069599f0da23cad</id>
<content type='text'>
This patch fixes the checkpatch error about missing a blank line
after declarations.

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: remove redundant blank lines</title>
<updated>2021-06-01T23:57:46Z</updated>
<author>
<name>Peng Li</name>
<email>lipeng321@huawei.com</email>
</author>
<published>2021-06-01T13:23:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=30cd458be244a929e929512fa63bbcf45225e752'/>
<id>urn:sha1:30cd458be244a929e929512fa63bbcf45225e752</id>
<content type='text'>
This patch removes some redundant blank lines.

Signed-off-by: Peng Li &lt;lipeng321@huawei.com&gt;
Signed-off-by: Guangbin Huang &lt;huangguangbin2@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: hdlc: In hdlc_rcv, check to make sure dev is an HDLC device</title>
<updated>2020-10-22T00:20:19Z</updated>
<author>
<name>Xie He</name>
<email>xie.he.0141@gmail.com</email>
</author>
<published>2020-10-20T01:31:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01c4ceae0a38a0bdbfea6896f41efcd985a9c064'/>
<id>urn:sha1:01c4ceae0a38a0bdbfea6896f41efcd985a9c064</id>
<content type='text'>
The hdlc_rcv function is used as hdlc_packet_type.func to process any
skb received in the kernel with skb-&gt;protocol == htons(ETH_P_HDLC).
The purpose of this function is to provide second-stage processing for
skbs not assigned a "real" L3 skb-&gt;protocol value in the first stage.

This function assumes the device from which the skb is received is an
HDLC device (a device created by this module). It assumes that
netdev_priv(dev) returns a pointer to "struct hdlc_device".

However, it is possible that some driver in the kernel (not necessarily
in our control) submits a received skb with skb-&gt;protocol ==
htons(ETH_P_HDLC), from a non-HDLC device. In this case, the skb would
still be received by hdlc_rcv. This will cause problems.

hdlc_rcv should be able to recognize and drop invalid skbs. It should
first make sure "dev" is actually an HDLC device, before starting its
processing. This patch adds this check to hdlc_rcv.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
Signed-off-by: Xie He &lt;xie.he.0141@gmail.com&gt;
Link: https://lore.kernel.org/r/20201020013152.89259-1-xie.he.0141@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>drivers/net/wan/hdlc: Change the default of hard_header_len to 0</title>
<updated>2020-09-02T22:42:43Z</updated>
<author>
<name>Xie He</name>
<email>xie.he.0141@gmail.com</email>
</author>
<published>2020-09-02T12:07:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119'/>
<id>urn:sha1:2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119</id>
<content type='text'>
Change the default value of hard_header_len in hdlc.c from 16 to 0.

Currently there are 6 HDLC protocol drivers, among them:

hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when
attaching the protocol, overriding the default. So this patch does not
affect them.

hdlc_raw and hdlc_fr don't set hard_header_len when attaching the
protocol. So this patch will change the hard_header_len of the HDLC
device for them from 16 to 0.

This is the correct change because both hdlc_raw and hdlc_fr don't have
header_ops, and the code in net/packet/af_packet.c expects the value of
hard_header_len to be consistent with header_ops.

In net/packet/af_packet.c, in the packet_snd function,
for AF_PACKET/DGRAM sockets it would reserve a headroom of
hard_header_len and call dev_hard_header to fill in that headroom,
and for AF_PACKET/RAW sockets, it does not reserve the headroom and
does not call dev_hard_header, but checks if the user has provided a
header of length hard_header_len (in function dev_validate_header).

Cc: Krzysztof Halasa &lt;khc@pm.waw.pl&gt;
Cc: Martin Schiller &lt;ms@dev.tdt.de&gt;
Signed-off-by: Xie He &lt;xie.he.0141@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
