shill: Fleshes-out ScanSession enough to initiate a wifi scan.
This CL adds the code required to initiate wifi scan. This expects
wpa_supplicant to deal with the kernel's response. The code does not,
yet, initiate a scan. It just, now, contains what it needs to do so.
BUG=chromium:222088
TEST=unittest
Change-Id: Ibf8294bac455a61b3328a1db4079e0f939c9df6d
Reviewed-on: https://gerrit.chromium.org/gerrit/49272
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
diff --git a/nl80211_message.cc b/nl80211_message.cc
index 9f53b69..738e0e4 100644
--- a/nl80211_message.cc
+++ b/nl80211_message.cc
@@ -618,6 +618,18 @@
const uint8_t TriggerScanMessage::kCommand = NL80211_CMD_TRIGGER_SCAN;
const char TriggerScanMessage::kCommandString[] = "NL80211_CMD_TRIGGER_SCAN";
+TriggerScanMessage::TriggerScanMessage()
+ : Nl80211Message(kCommand, kCommandString) {
+ attributes()->CreateAttribute(
+ NL80211_ATTR_IFINDEX, Bind(&NetlinkAttribute::NewNl80211AttributeFromId));
+ attributes()->CreateAttribute(
+ NL80211_ATTR_SCAN_FREQUENCIES,
+ Bind(&NetlinkAttribute::NewNl80211AttributeFromId));
+ attributes()->CreateAttribute(
+ NL80211_ATTR_SCAN_SSIDS,
+ Bind(&NetlinkAttribute::NewNl80211AttributeFromId));
+}
+
const uint8_t UnprotDeauthenticateMessage::kCommand =
NL80211_CMD_UNPROT_DEAUTHENTICATE;
const char UnprotDeauthenticateMessage::kCommandString[] =