shill: Cleanup of the config80211 code.
BUG=None.
TEST=Manual and unit tests.
Change-Id: Iceba3473b8d7476b5a7340d4a918d7aa6354278c
Reviewed-on: https://gerrit.chromium.org/gerrit/37576
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Ready: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/netlink_socket.cc b/netlink_socket.cc
index 15fa99c..6b08920 100644
--- a/netlink_socket.cc
+++ b/netlink_socket.cc
@@ -40,7 +40,6 @@
#include <base/logging.h>
-#include "shill/kernel_bound_nlmessage.h"
#include "shill/scope_logger.h"
namespace shill {
@@ -114,6 +113,26 @@
return true;
}
+bool NetlinkSocket::Send(struct nl_msg *message) {
+ if (!message) {
+ LOG(ERROR) << "NULL |message|.";
+ return false;
+ }
+
+ if (!nl_sock_) {
+ LOG(ERROR) << "Need to initialize the socket first.";
+ return false;
+ }
+
+ int result = nl_send_auto_complete(nl_sock_, message);
+ if (result < 0) {
+ LOG(ERROR) << "Failed call to 'nl_send_auto_complete': " << result;
+ return false;
+ }
+ return true;
+}
+
+
bool NetlinkSocket::DisableSequenceChecking() {
if (!nl_sock_) {
LOG(ERROR) << "NULL socket";