shill: compiler option support for wifi and wired 802.1x
This allows shill to be compiled without wifi and wired 802.1x independently.
The supplicant related code will not be compiled when both wifi and wired
802.1x compiler option are disabled.
BUG=chromium:475665
TEST=USE="asan clang -wifi" FEATURES=test emerge-$BOARD shill
USE="asan clang -wired_8021x" FEATURES=test emerge-$BOARD shill
USE="asan clang -wifi -wired_8021x" FEATURES=test emerge-$BOARD shill
USE="asan clang" FEATURES=test emerge-$BOARD shill
Default shill (including both wifi and wired 802.1x):
Passes wifi_matfunc test suite
shill without wifi
No wifi connectivity
Have ethernet connectivity
Passes network_8021xWiredAuthentication test
shill without wired 802.1x
Have wifi and ethernet connectivity
Fail network_8021xWiredAuthentication test
shill without both wifi and wired 802.1x
No wifi connectivity
Have ethernet connectivity
Fail network_8021xWiredAuthentication test
CQ-DEPEND=CL:265614
Change-Id: I6abaa150657f6ca0f6d5c37229fde9a2c0bb36aa
Reviewed-on: https://chromium-review.googlesource.com/265774
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
diff --git a/shill_daemon.h b/shill_daemon.h
index 941b050..43da584 100644
--- a/shill_daemon.h
+++ b/shill_daemon.h
@@ -13,7 +13,10 @@
#include "shill/event_dispatcher.h"
#include "shill/glib.h"
#include "shill/manager.h"
+
+#if !defined(DISABLE_WIFI)
#include "shill/wifi/callback80211_metrics.h"
+#endif // DISABLE_WIFI
namespace shill {
@@ -22,11 +25,14 @@
class Error;
class GLib;
class Metrics;
-class NetlinkManager;
class ProxyFactory;
class RoutingTable;
class RTNLHandler;
+#if !defined(DISABLE_WIFI)
+class NetlinkManager;
+#endif // DISABLE_WIFI
+
class Daemon {
public:
Daemon(Config *config, ControlInterface *control,
@@ -68,9 +74,11 @@
RTNLHandler *rtnl_handler_;
RoutingTable *routing_table_;
DHCPProvider *dhcp_provider_;
+#if !defined(DISABLE_WIFI)
NetlinkManager *netlink_manager_;
- std::unique_ptr<Manager> manager_;
Callback80211Metrics callback80211_metrics_;
+#endif // DISABLE_WIFI
+ std::unique_ptr<Manager> manager_;
};
} // namespace shill