nl80211: Indicate interface-down event only for the main netdev
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 11 Feb 2015 08:26:26 +0000 (10:26 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 11 Feb 2015 08:31:12 +0000 (10:31 +0200)
commit106fa1e97e29e7514ae324020802c280f993ee48
tree0488ae9dbbe91ac13b0f3b71f83b76febb3b83a9
parenteeb1cb28a29eb19c212e27645591ace4458cb705
nl80211: Indicate interface-down event only for the main netdev

RTM_NEWLINK event without IFF_UP were processed for all related
interfaces (including VLANs and bridge). While these events may need to
be processed for other purposes, they should not end up claiming that
the main interface has been disabled, so indicate
EVENT_INTERFACE_DISABLED only if the ifname matches the first BSS ifname
for the interface. In addition, fix some of the ifup/down checks from
if_indextoname() cases to actually use the resolved ifname (namebuf)
rather than hardcoding the first configured ifname to be used.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211.c