net: rtnetlink: use netif_oper_up instead of open code
authorJuhee Kang <claudiajkang@gmail.com>
Wed, 31 Aug 2022 12:58:45 +0000 (21:58 +0900)
committerJakub Kicinski <kuba@kernel.org>
Fri, 2 Sep 2022 03:09:23 +0000 (20:09 -0700)
commitabbc79280abc5e57fc52a7671d1388f1f54c946f
tree908ddf7577269ceb6103597565b0818e9c63cc6e
parent75aad41ac3cf3d8d1d2bdbcaf0f662402c1e6c02
net: rtnetlink: use netif_oper_up instead of open code

The open code is defined as a new helper function(netif_oper_up) on netdev.h,
the code is dev->operstate == IF_OPER_UP || dev->operstate == IF_OPER_UNKNOWN.
Thus, replace the open code to netif_oper_up. This patch doesn't change logic.

Signed-off-by: Juhee Kang <claudiajkang@gmail.com>
Link: https://lore.kernel.org/r/20220831125845.1333-1-claudiajkang@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/rtnetlink.c