nl80211 controlling operational state of the interface

Krishna Chaitanya chaitanya.mgit at gmail.com
Thu Mar 15 04:33:18 PDT 2018


Hi,

As per the kernel documentation @
https://elixir.bootlin.com/linux/latest/source/Documentation/networking/operstates.txt

"userspace applications should follow the procedure for controlling the
operational state of the interface:

-subscribe to RTMGRP_LINK
-set IFLA_LINKMODE to 1 via RTM_SETLINK
-query RTM_GETLINK once to get initial state
-if initial flags are not (IFF_LOWER_UP && !IFF_DORMANT), wait until
 netlink multicast signals this state"

The case in question is, lets say if the driver is setting the
interface state to
DORMANT waiting on some event from chip, as per the above the
wpa_supplicant/hostapd
should wait for the kernel to send an UP event. But its not waiting,
instead it sends commands to the driver even when it is in dormant
state.

Is this expected?

netlink: Operstate: ifindex=13 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
RTM_NEWLINK: ifi_index=13 ifname=wlp8s0f0 operstate=2 linkmode=1
ifi_family=0 ifi_flags=0x21003 ([UP][DORMANT])
wlp8s0f0: State: DISCONNECTED -> SCANNING

-- 
Thanks,
Regards,
Chaitanya T K.



More information about the Hostap mailing list