]> git.baikalelectronics.ru Git - kernel.git/commit
ppp: Move PFC decompression to PPP generic layer
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 20 Dec 2018 18:29:20 +0000 (20:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Dec 2018 00:49:30 +0000 (16:49 -0800)
commitb4f9b516e20c0d1bb504d1b9da257a3aab8111fc
tree0bfd98344d7e7880084591acdbc2e6ec0e7ba8f9
parent6cc25385ced116b516f9ebd9ec482827fb54b5ec
ppp: Move PFC decompression to PPP generic layer

Extract "Protocol" field decompression code from transport protocols to
PPP generic layer, where it actually belongs. As a consequence, this
patch fixes incorrect place of PFC decompression in L2TP driver (when
it's not PPPOX_BOUND) and also enables this decompression for other
protocols, like PPPoE.

Protocol field decompression also happens in PPP Multilink Protocol
code and in PPP compression protocols implementations (bsd, deflate,
mppe). It looks like there is no easy way to get rid of that, so it was
decided to leave it as is, but provide those cases with appropriate
comments instead.

Changes in v2:
  - Fix the order of checking skb data room and proto decompression
  - Remove "inline" keyword from ppp_decompress_proto()
  - Don't split line before function name
  - Prefix ppp_decompress_proto() function with "__"
  - Add ppp_decompress_proto() function with skb data room checks
  - Add description for introduced functions
  - Fix comments (as per review on mailing list)

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/ppp_async.c
drivers/net/ppp/ppp_generic.c
drivers/net/ppp/ppp_synctty.c
drivers/net/ppp/pptp.c
net/l2tp/l2tp_ppp.c