Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: bring operstate documentation up-to-date

Netlink has moved from bitmasks to group numbers long ago.

Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jouke Witteveen and committed by
David S. Miller
989723b0 4d73eaee

+9 -7
+8 -6
Documentation/networking/operstates.txt
··· 22 22 2. Querying from userspace 23 23 24 24 Both admin and operational state can be queried via the netlink 25 - operation RTM_GETLINK. It is also possible to subscribe to RTMGRP_LINK 26 - to be notified of updates. This is important for setting from userspace. 25 + operation RTM_GETLINK. It is also possible to subscribe to RTNLGRP_LINK 26 + to be notified of updates while the interface is admin up. This is 27 + important for setting from userspace. 27 28 28 29 These values contain interface state: 29 30 ··· 102 101 complete. Corresponding functions are netif_dormant_on() to set the 103 102 flag, netif_dormant_off() to clear it and netif_dormant() to query. 104 103 105 - On device allocation, networking core sets the flags equivalent to 106 - netif_carrier_ok() and !netif_dormant(). 104 + On device allocation, both flags __LINK_STATE_NOCARRIER and 105 + __LINK_STATE_DORMANT are cleared, so the effective state is equivalent 106 + to netif_carrier_ok() and !netif_dormant(). 107 107 108 108 109 109 Whenever the driver CHANGES one of these flags, a workqueue event is ··· 135 133 driver. Afterwards, the userspace application can set IFLA_OPERSTATE 136 134 to IF_OPER_DORMANT or IF_OPER_UP as long as the driver does not set 137 135 netif_carrier_off() or netif_dormant_on(). Changes made by userspace 138 - are multicasted on the netlink group RTMGRP_LINK. 136 + are multicasted on the netlink group RTNLGRP_LINK. 139 137 140 138 So basically a 802.1X supplicant interacts with the kernel like this: 141 139 142 - -subscribe to RTMGRP_LINK 140 + -subscribe to RTNLGRP_LINK 143 141 -set IFLA_LINKMODE to 1 via RTM_SETLINK 144 142 -query RTM_GETLINK once to get initial state 145 143 -if initial flags are not (IFF_LOWER_UP && !IFF_DORMANT), wait until
+1 -1
net/sched/sch_generic.c
··· 500 500 * netif_carrier_on - set carrier 501 501 * @dev: network device 502 502 * 503 - * Device has detected that carrier. 503 + * Device has detected acquisition of carrier. 504 504 */ 505 505 void netif_carrier_on(struct net_device *dev) 506 506 {