shill: WiFi: Track signal strength of connected AP

While connected to an AP, perform periodic captures of the
"station" information element in the kernel for our connection
to the current endpoint.  When we receive a response, update
the endpoint with the signal strength in the station information.
This will in turn update the service's "Strength" property.

BUG=chromium:271492
TEST=Unit tests; Manual: Walk around while connected and ensure
bars move up and down to compensate.  ff_debug +wifi; ff_debug --level -2
shows messages about endpoint signal strength changing.

Change-Id: I246baafb01cc6ae94bb08b2b950eaa09f11b8cc2
Reviewed-on: https://gerrit.chromium.org/gerrit/65713
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/nl80211_message.cc b/nl80211_message.cc
index b87acc0..440af20 100644
--- a/nl80211_message.cc
+++ b/nl80211_message.cc
@@ -473,6 +473,17 @@
 const uint8_t GetRegMessage::kCommand = NL80211_CMD_GET_REG;
 const char GetRegMessage::kCommandString[] = "NL80211_CMD_GET_REG";
 
+const uint8_t GetStationMessage::kCommand = NL80211_CMD_GET_STATION;
+const char GetStationMessage::kCommandString[] = "NL80211_CMD_GET_STATION";
+
+GetStationMessage::GetStationMessage()
+    : Nl80211Message(kCommand, kCommandString) {
+  attributes()->CreateAttribute(
+      NL80211_ATTR_IFINDEX, Bind(&NetlinkAttribute::NewNl80211AttributeFromId));
+  attributes()->CreateAttribute(
+      NL80211_ATTR_MAC, Bind(&NetlinkAttribute::NewNl80211AttributeFromId));
+}
+
 const uint8_t GetWiphyMessage::kCommand = NL80211_CMD_GET_WIPHY;
 const char GetWiphyMessage::kCommandString[] = "NL80211_CMD_GET_WIPHY";
 
@@ -599,6 +610,8 @@
       return new GetInterfaceMessage();
     case GetRegMessage::kCommand:
       return new GetRegMessage();
+    case GetStationMessage::kCommand:
+      return new GetStationMessage();
     case GetWiphyMessage::kCommand:
       return new GetWiphyMessage();
     case JoinIbssMessage::kCommand: