shill: Adds some netlink messages and attributes.

Adds the get/new wiphy messages.  These are the request/response for
details regarding a wifi phy.  These details include a list of
frequencies supported by the device.  The added attributes support these
messages.

BUG=chromium:230885
TEST=unittest.

Change-Id: Iaf6bbd4a6ab7137f9dae3c35e57485b860a47f64
Reviewed-on: https://gerrit.chromium.org/gerrit/48014
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
diff --git a/netlink_attribute.cc b/netlink_attribute.cc
index a934074..45696b4 100644
--- a/netlink_attribute.cc
+++ b/netlink_attribute.cc
@@ -46,24 +46,39 @@
     case NL80211_ATTR_BSS:
       attr.reset(new Nl80211AttributeBss());
       break;
+    case NL80211_ATTR_CIPHER_SUITES:
+      attr.reset(new Nl80211AttributeCipherSuites());
+      break;
+    case NL80211_ATTR_CONTROL_PORT_ETHERTYPE:
+      attr.reset(new Nl80211AttributeControlPortEthertype());
+      break;
     case NL80211_ATTR_COOKIE:
       attr.reset(new Nl80211AttributeCookie());
       break;
     case NL80211_ATTR_CQM:
       attr.reset(new Nl80211AttributeCqm());
       break;
+    case NL80211_ATTR_DEVICE_AP_SME:
+      attr.reset(new Nl80211AttributeDeviceApSme());
+      break;
     case NL80211_ATTR_DISCONNECTED_BY_AP:
       attr.reset(new Nl80211AttributeDisconnectedByAp());
       break;
     case NL80211_ATTR_DURATION:
       attr.reset(new Nl80211AttributeDuration());
       break;
+    case NL80211_ATTR_FEATURE_FLAGS:
+      attr.reset(new Nl80211AttributeFeatureFlags());
+      break;
     case NL80211_ATTR_FRAME:
       attr.reset(new Nl80211AttributeFrame());
       break;
     case NL80211_ATTR_GENERATION:
       attr.reset(new Nl80211AttributeGeneration());
       break;
+    case NL80211_ATTR_HT_CAPABILITY_MASK:
+      attr.reset(new Nl80211AttributeHtCapabilityMask());
+      break;
     case NL80211_ATTR_IFINDEX:
       attr.reset(new Nl80211AttributeIfindex());
       break;
@@ -82,6 +97,33 @@
     case NL80211_ATTR_MAC:
       attr.reset(new Nl80211AttributeMac());
       break;
+    case NL80211_ATTR_MAX_MATCH_SETS:
+      attr.reset(new Nl80211AttributeMaxMatchSets());
+      break;
+    case NL80211_ATTR_MAX_NUM_PMKIDS:
+      attr.reset(new Nl80211AttributeMaxNumPmkids());
+      break;
+    case NL80211_ATTR_MAX_NUM_SCAN_SSIDS:
+      attr.reset(new Nl80211AttributeMaxNumScanSsids());
+      break;
+    case NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS:
+      attr.reset(new Nl80211AttributeMaxNumSchedScanSsids());
+      break;
+    case NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION:
+      attr.reset(new Nl80211AttributeMaxRemainOnChannelDuration());
+      break;
+    case NL80211_ATTR_MAX_SCAN_IE_LEN:
+      attr.reset(new Nl80211AttributeMaxScanIeLen());
+      break;
+    case NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN:
+      attr.reset(new Nl80211AttributeMaxSchedScanIeLen());
+      break;
+    case NL80211_ATTR_OFFCHANNEL_TX_OK:
+      attr.reset(new Nl80211AttributeOffchannelTxOk());
+      break;
+    case NL80211_ATTR_PROBE_RESP_OFFLOAD:
+      attr.reset(new Nl80211AttributeProbeRespOffload());
+      break;
     case NL80211_ATTR_REASON_CODE:
       attr.reset(new Nl80211AttributeReasonCode());
       break;
@@ -97,6 +139,9 @@
     case NL80211_ATTR_RESP_IE:
       attr.reset(new Nl80211AttributeRespIe());
       break;
+    case NL80211_ATTR_ROAM_SUPPORT:
+      attr.reset(new Nl80211AttributeRoamSupport());
+      break;
     case NL80211_ATTR_SCAN_FREQUENCIES:
       attr.reset(new Nl80211AttributeScanFrequencies());
       break;
@@ -109,12 +154,45 @@
     case NL80211_ATTR_STATUS_CODE:
       attr.reset(new Nl80211AttributeStatusCode());
       break;
+    case NL80211_ATTR_SUPPORT_AP_UAPSD:
+      attr.reset(new Nl80211AttributeSupportApUapsd());
+      break;
+    case NL80211_ATTR_SUPPORT_IBSS_RSN:
+      attr.reset(new Nl80211AttributeSupportIbssRsn());
+      break;
     case NL80211_ATTR_SUPPORT_MESH_AUTH:
       attr.reset(new Nl80211AttributeSupportMeshAuth());
       break;
+    case NL80211_ATTR_TDLS_EXTERNAL_SETUP:
+      attr.reset(new Nl80211AttributeTdlsExternalSetup());
+      break;
+    case NL80211_ATTR_TDLS_SUPPORT:
+      attr.reset(new Nl80211AttributeTdlsSupport());
+      break;
     case NL80211_ATTR_TIMED_OUT:
       attr.reset(new Nl80211AttributeTimedOut());
       break;
+    case NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX:
+      attr.reset(new Nl80211AttributeWiphyAntennaAvailRx());
+      break;
+    case NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX:
+      attr.reset(new Nl80211AttributeWiphyAntennaAvailTx());
+      break;
+    case NL80211_ATTR_WIPHY_ANTENNA_RX:
+      attr.reset(new Nl80211AttributeWiphyAntennaRx());
+      break;
+    case NL80211_ATTR_WIPHY_ANTENNA_TX:
+      attr.reset(new Nl80211AttributeWiphyAntennaTx());
+      break;
+    case NL80211_ATTR_WIPHY_BANDS:
+      attr.reset(new Nl80211AttributeWiphyBands());
+      break;
+    case NL80211_ATTR_WIPHY_COVERAGE_CLASS:
+      attr.reset(new Nl80211AttributeWiphyCoverageClass());
+      break;
+    case NL80211_ATTR_WIPHY_FRAG_THRESHOLD:
+      attr.reset(new Nl80211AttributeWiphyFragThreshold());
+      break;
     case NL80211_ATTR_WIPHY_FREQ:
       attr.reset(new Nl80211AttributeWiphyFreq());
       break;
@@ -124,6 +202,15 @@
     case NL80211_ATTR_WIPHY_NAME:
       attr.reset(new Nl80211AttributeWiphyName());
       break;
+    case NL80211_ATTR_WIPHY_RETRY_LONG:
+      attr.reset(new Nl80211AttributeWiphyRetryLong());
+      break;
+    case NL80211_ATTR_WIPHY_RETRY_SHORT:
+      attr.reset(new Nl80211AttributeWiphyRetryShort());
+      break;
+    case NL80211_ATTR_WIPHY_RTS_THRESHOLD:
+      attr.reset(new Nl80211AttributeWiphyRtsThreshold());
+      break;
     default:
       attr.reset(new NetlinkAttributeGeneric(id));
       break;
diff --git a/nl80211_attribute.cc b/nl80211_attribute.cc
index 92dac5c..089df3c 100644
--- a/nl80211_attribute.cc
+++ b/nl80211_attribute.cc
@@ -150,6 +150,71 @@
   return true;
 }
 
+const int Nl80211AttributeWiphyBands::kName = NL80211_ATTR_WIPHY_BANDS;
+const char Nl80211AttributeWiphyBands::kNameString[] =
+  "NL80211_ATTR_WIPHY_BANDS";
+
+Nl80211AttributeWiphyBands::Nl80211AttributeWiphyBands()
+      : NetlinkNestedAttribute(kName, kNameString) {
+  // Frequencies
+  NestedData freq(NLA_NESTED, "NL80211_BAND_ATTR_FREQ", true);
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_U32, "__NL80211_FREQUENCY_ATTR_INVALID", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_U32, "NL80211_FREQUENCY_ATTR_FREQ", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_FLAG, "NL80211_FREQUENCY_ATTR_DISABLED", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_FLAG, "NL80211_FREQUENCY_ATTR_PASSIVE_SCAN", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_FLAG, "NL80211_FREQUENCY_ATTR_NO_IBSS", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_FLAG, "NL80211_FREQUENCY_ATTR_RADAR", false));
+  freq.deeper_nesting.push_back(
+      NestedData(NLA_U32, "NL80211_FREQUENCY_ATTR_MAX_TX_POWER", false));
+
+  NestedData freqs(NLA_NESTED, "NL80211_BAND_ATTR_FREQS", false);
+  freqs.deeper_nesting.push_back(freq);
+
+  // Rates
+  NestedData rate(NLA_NESTED, "NL80211_BAND_ATTR_RATE", true);
+  rate.deeper_nesting.push_back(
+      NestedData(NLA_U32, "__NL80211_BITRATE_ATTR_INVALID", false));
+  rate.deeper_nesting.push_back(
+      NestedData(NLA_U32, "NL80211_BITRATE_ATTR_RATE", false));
+  rate.deeper_nesting.push_back(
+      NestedData(NLA_FLAG, "NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE", false));
+
+  NestedData rates(NLA_NESTED, "NL80211_BAND_ATTR_RATES", true);
+  rates.deeper_nesting.push_back(rate);
+
+  // Main body of attribute
+  NestedData bands(NLA_NESTED, "NL80211_ATTR_BANDS", true);
+  bands.deeper_nesting.push_back(
+      NestedData(NLA_U32, "__NL80211_BAND_ATTR_INVALID,", false));
+  bands.deeper_nesting.push_back(freqs);
+  bands.deeper_nesting.push_back(rates);
+  bands.deeper_nesting.push_back(
+      NestedData(NLA_UNSPEC, "NL80211_BAND_ATTR_HT_MCS_SET", false));
+  bands.deeper_nesting.push_back(
+      NestedData(NLA_U16, "NL80211_BAND_ATTR_HT_CAPA", false));
+  bands.deeper_nesting.push_back(
+      NestedData(NLA_U8, "NL80211_BAND_ATTR_HT_AMPDU_FACTOR", false));
+  bands.deeper_nesting.push_back(
+      NestedData(NLA_U8, "NL80211_BAND_ATTR_HT_AMPDU_DENSITY", false));
+
+  nested_template_.push_back(bands);
+}
+
+const int Nl80211AttributeCipherSuites::kName = NL80211_ATTR_CIPHER_SUITES;
+const char Nl80211AttributeCipherSuites::kNameString[] =
+    "NL80211_ATTR_CIPHER_SUITES";
+
+const int Nl80211AttributeControlPortEthertype::kName =
+    NL80211_ATTR_CONTROL_PORT_ETHERTYPE;
+const char Nl80211AttributeControlPortEthertype::kNameString[] =
+    "NL80211_ATTR_CONTROL_PORT_ETHERTYPE";
+
 const int Nl80211AttributeCqm::kName = NL80211_ATTR_CQM;
 const char Nl80211AttributeCqm::kNameString[] = "NL80211_ATTR_CQM";
 
@@ -167,6 +232,10 @@
       NestedData(NLA_U32, "NL80211_ATTR_CQM_PKT_LOSS_EVENT", false));
 }
 
+const int Nl80211AttributeDeviceApSme::kName = NL80211_ATTR_DEVICE_AP_SME;
+const char Nl80211AttributeDeviceApSme::kNameString[] =
+    "NL80211_ATTR_DEVICE_AP_SME";
+
 const int Nl80211AttributeDisconnectedByAp::kName =
     NL80211_ATTR_DISCONNECTED_BY_AP;
 const char Nl80211AttributeDisconnectedByAp::kNameString[] =
@@ -175,6 +244,10 @@
 const int Nl80211AttributeDuration::kName = NL80211_ATTR_DURATION;
 const char Nl80211AttributeDuration::kNameString[] = "NL80211_ATTR_DURATION";
 
+const int Nl80211AttributeFeatureFlags::kName = NL80211_ATTR_FEATURE_FLAGS;
+const char Nl80211AttributeFeatureFlags::kNameString[] =
+    "NL80211_ATTR_FEATURE_FLAGS";
+
 const int Nl80211AttributeFrame::kName = NL80211_ATTR_FRAME;
 const char Nl80211AttributeFrame::kNameString[] = "NL80211_ATTR_FRAME";
 
@@ -182,6 +255,11 @@
 const char Nl80211AttributeGeneration::kNameString[] =
     "NL80211_ATTR_GENERATION";
 
+const int Nl80211AttributeHtCapabilityMask::kName =
+    NL80211_ATTR_HT_CAPABILITY_MASK;
+const char Nl80211AttributeHtCapabilityMask::kNameString[] =
+    "NL80211_ATTR_HT_CAPABILITY_MASK";
+
 const int Nl80211AttributeIfindex::kName = NL80211_ATTR_IFINDEX;
 const char Nl80211AttributeIfindex::kNameString[] = "NL80211_ATTR_IFINDEX";
 
@@ -200,6 +278,47 @@
 const int Nl80211AttributeMac::kName = NL80211_ATTR_MAC;
 const char Nl80211AttributeMac::kNameString[] = "NL80211_ATTR_MAC";
 
+const int Nl80211AttributeMaxMatchSets::kName = NL80211_ATTR_MAX_MATCH_SETS;
+const char Nl80211AttributeMaxMatchSets::kNameString[] =
+    "NL80211_ATTR_MAX_MATCH_SETS";
+
+const int Nl80211AttributeMaxNumPmkids::kName = NL80211_ATTR_MAX_NUM_PMKIDS;
+const char Nl80211AttributeMaxNumPmkids::kNameString[] =
+    "NL80211_ATTR_MAX_NUM_PMKIDS";
+
+const int Nl80211AttributeMaxNumScanSsids::kName =
+    NL80211_ATTR_MAX_NUM_SCAN_SSIDS;
+const char Nl80211AttributeMaxNumScanSsids::kNameString[] =
+    "NL80211_ATTR_MAX_NUM_SCAN_SSIDS";
+
+const int Nl80211AttributeMaxNumSchedScanSsids::kName =
+    NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS;
+const char Nl80211AttributeMaxNumSchedScanSsids::kNameString[] =
+    "NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS";
+
+const int Nl80211AttributeMaxRemainOnChannelDuration::kName =
+    NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION;
+const char Nl80211AttributeMaxRemainOnChannelDuration::kNameString[] =
+    "NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION";
+
+const int Nl80211AttributeMaxScanIeLen::kName = NL80211_ATTR_MAX_SCAN_IE_LEN;
+const char Nl80211AttributeMaxScanIeLen::kNameString[] =
+    "NL80211_ATTR_MAX_SCAN_IE_LEN";
+
+const int Nl80211AttributeMaxSchedScanIeLen::kName =
+    NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN;
+const char Nl80211AttributeMaxSchedScanIeLen::kNameString[] =
+    "NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN";
+
+const int Nl80211AttributeOffchannelTxOk::kName = NL80211_ATTR_OFFCHANNEL_TX_OK;
+const char Nl80211AttributeOffchannelTxOk::kNameString[] =
+    "NL80211_ATTR_OFFCHANNEL_TX_OK";
+
+const int Nl80211AttributeProbeRespOffload::kName =
+    NL80211_ATTR_PROBE_RESP_OFFLOAD;
+const char Nl80211AttributeProbeRespOffload::kNameString[] =
+    "NL80211_ATTR_PROBE_RESP_OFFLOAD";
+
 const int Nl80211AttributeReasonCode::kName =
     NL80211_ATTR_REASON_CODE;
 const char Nl80211AttributeReasonCode::kNameString[] =
@@ -219,6 +338,10 @@
 const int Nl80211AttributeRespIe::kName = NL80211_ATTR_RESP_IE;
 const char Nl80211AttributeRespIe::kNameString[] = "NL80211_ATTR_RESP_IE";
 
+const int Nl80211AttributeRoamSupport::kName = NL80211_ATTR_ROAM_SUPPORT;
+const char Nl80211AttributeRoamSupport::kNameString[] =
+    "NL80211_ATTR_ROAM_SUPPORT";
+
 const int Nl80211AttributeScanFrequencies::kName =
     NL80211_ATTR_SCAN_FREQUENCIES;
 const char Nl80211AttributeScanFrequencies::kNameString[] =
@@ -244,7 +367,6 @@
 
 Nl80211AttributeStaInfo::Nl80211AttributeStaInfo()
       : NetlinkNestedAttribute(kName, kNameString) {
-
   NestedData tx_rates(NLA_NESTED, "NL80211_STA_INFO_TX_BITRATE", false);
   tx_rates.deeper_nesting.push_back(
       NestedData(NLA_U32, "__NL80211_RATE_INFO_INVALID", false));
@@ -318,14 +440,59 @@
 const char Nl80211AttributeStatusCode::kNameString[] =
     "NL80211_ATTR_STATUS_CODE";
 
+const int Nl80211AttributeSupportApUapsd::kName = NL80211_ATTR_SUPPORT_AP_UAPSD;
+const char Nl80211AttributeSupportApUapsd::kNameString[] =
+    "NL80211_ATTR_SUPPORT_AP_UAPSD";
+
+const int Nl80211AttributeSupportIbssRsn::kName = NL80211_ATTR_SUPPORT_IBSS_RSN;
+const char Nl80211AttributeSupportIbssRsn::kNameString[] =
+    "NL80211_ATTR_SUPPORT_IBSS_RSN";
+
 const int Nl80211AttributeSupportMeshAuth::kName =
     NL80211_ATTR_SUPPORT_MESH_AUTH;
 const char Nl80211AttributeSupportMeshAuth::kNameString[] =
     "NL80211_ATTR_SUPPORT_MESH_AUTH";
 
+const int Nl80211AttributeTdlsExternalSetup::kName =
+    NL80211_ATTR_TDLS_EXTERNAL_SETUP;
+const char Nl80211AttributeTdlsExternalSetup::kNameString[] =
+    "NL80211_ATTR_TDLS_EXTERNAL_SETUP";
+
+const int Nl80211AttributeTdlsSupport::kName = NL80211_ATTR_TDLS_SUPPORT;
+const char Nl80211AttributeTdlsSupport::kNameString[] =
+    "NL80211_ATTR_TDLS_SUPPORT";
+
 const int Nl80211AttributeTimedOut::kName = NL80211_ATTR_TIMED_OUT;
 const char Nl80211AttributeTimedOut::kNameString[] = "NL80211_ATTR_TIMED_OUT";
 
+const int Nl80211AttributeWiphyAntennaAvailRx::kName =
+    NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX;
+const char Nl80211AttributeWiphyAntennaAvailRx::kNameString[] =
+    "NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX";
+
+const int Nl80211AttributeWiphyAntennaAvailTx::kName =
+    NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX;
+const char Nl80211AttributeWiphyAntennaAvailTx::kNameString[] =
+    "NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX";
+
+const int Nl80211AttributeWiphyAntennaRx::kName = NL80211_ATTR_WIPHY_ANTENNA_RX;
+const char Nl80211AttributeWiphyAntennaRx::kNameString[] =
+    "NL80211_ATTR_WIPHY_ANTENNA_RX";
+
+const int Nl80211AttributeWiphyAntennaTx::kName = NL80211_ATTR_WIPHY_ANTENNA_TX;
+const char Nl80211AttributeWiphyAntennaTx::kNameString[] =
+    "NL80211_ATTR_WIPHY_ANTENNA_TX";
+
+const int Nl80211AttributeWiphyCoverageClass::kName =
+    NL80211_ATTR_WIPHY_COVERAGE_CLASS;
+const char Nl80211AttributeWiphyCoverageClass::kNameString[] =
+    "NL80211_ATTR_WIPHY_COVERAGE_CLASS";
+
+const int Nl80211AttributeWiphyFragThreshold::kName =
+    NL80211_ATTR_WIPHY_FRAG_THRESHOLD;
+const char Nl80211AttributeWiphyFragThreshold::kNameString[] =
+    "NL80211_ATTR_WIPHY_FRAG_THRESHOLD";
+
 const int Nl80211AttributeWiphyFreq::kName = NL80211_ATTR_WIPHY_FREQ;
 const char Nl80211AttributeWiphyFreq::kNameString[] = "NL80211_ATTR_WIPHY_FREQ";
 
@@ -335,4 +502,18 @@
 const int Nl80211AttributeWiphyName::kName = NL80211_ATTR_WIPHY_NAME;
 const char Nl80211AttributeWiphyName::kNameString[] = "NL80211_ATTR_WIPHY_NAME";
 
+const int Nl80211AttributeWiphyRetryLong::kName = NL80211_ATTR_WIPHY_RETRY_LONG;
+const char Nl80211AttributeWiphyRetryLong::kNameString[] =
+    "NL80211_ATTR_WIPHY_RETRY_LONG";
+
+const int Nl80211AttributeWiphyRetryShort::kName =
+    NL80211_ATTR_WIPHY_RETRY_SHORT;
+const char Nl80211AttributeWiphyRetryShort::kNameString[] =
+    "NL80211_ATTR_WIPHY_RETRY_SHORT";
+
+const int Nl80211AttributeWiphyRtsThreshold::kName =
+    NL80211_ATTR_WIPHY_RTS_THRESHOLD;
+const char Nl80211AttributeWiphyRtsThreshold::kNameString[] =
+    "NL80211_ATTR_WIPHY_RTS_THRESHOLD";
+
 }  // namespace shill
diff --git a/nl80211_attribute.h b/nl80211_attribute.h
index 99974cc..e74fef4 100644
--- a/nl80211_attribute.h
+++ b/nl80211_attribute.h
@@ -27,6 +27,47 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeKeyIdx);
 };
 
+class Nl80211AttributeMaxMatchSets : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxMatchSets() : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxMatchSets);
+};
+
+class Nl80211AttributeMaxNumPmkids : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxNumPmkids() : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumPmkids);
+};
+
+class Nl80211AttributeMaxNumScanSsids : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxNumScanSsids() : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumScanSsids);
+};
+
+class Nl80211AttributeMaxNumSchedScanSsids : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxNumSchedScanSsids()
+      : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxNumSchedScanSsids);
+};
+
 class Nl80211AttributeRegType : public NetlinkU8Attribute {
  public:
   static const int kName;
@@ -37,8 +78,60 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRegType);
 };
 
+class Nl80211AttributeWiphyCoverageClass : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyCoverageClass()
+      : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyCoverageClass);
+};
+
+class Nl80211AttributeWiphyRetryLong : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyRetryLong() : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRetryLong);
+};
+
+class Nl80211AttributeWiphyRetryShort : public NetlinkU8Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyRetryShort() : NetlinkU8Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRetryShort);
+};
+
 // U16.
 
+class Nl80211AttributeMaxScanIeLen : public NetlinkU16Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxScanIeLen() : NetlinkU16Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxScanIeLen);
+};
+
+class Nl80211AttributeMaxSchedScanIeLen : public NetlinkU16Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxSchedScanIeLen()
+      : NetlinkU16Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxSchedScanIeLen);
+};
+
 class Nl80211AttributeReasonCode : public NetlinkU16Attribute {
  public:
   static const int kName;
@@ -71,6 +164,26 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDuration);
 };
 
+class Nl80211AttributeDeviceApSme : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeDeviceApSme() : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDeviceApSme);
+};
+
+class Nl80211AttributeFeatureFlags : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeFeatureFlags() : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeFeatureFlags);
+};
+
 class Nl80211AttributeGeneration : public NetlinkU32Attribute {
  public:
   static const int kName;
@@ -111,6 +224,28 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeKeyType);
 };
 
+class Nl80211AttributeMaxRemainOnChannelDuration : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeMaxRemainOnChannelDuration()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeMaxRemainOnChannelDuration);
+};
+
+class Nl80211AttributeProbeRespOffload : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeProbeRespOffload()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeProbeRespOffload);
+};
+
 class Nl80211AttributeRegInitiator : public NetlinkU32Attribute {
  public:
   static const int kName;
@@ -131,6 +266,59 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphy);
 };
 
+class Nl80211AttributeWiphyAntennaAvailRx : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyAntennaAvailRx()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaAvailRx);
+};
+
+class Nl80211AttributeWiphyAntennaAvailTx : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyAntennaAvailTx()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaAvailTx);
+};
+
+class Nl80211AttributeWiphyAntennaRx : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyAntennaRx() : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaRx);
+};
+
+class Nl80211AttributeWiphyAntennaTx : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyAntennaTx() : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyAntennaTx);
+};
+
+class Nl80211AttributeWiphyFragThreshold : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyFragThreshold()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyFragThreshold);
+};
+
 class Nl80211AttributeWiphyFreq : public NetlinkU32Attribute {
  public:
   static const int kName;
@@ -141,6 +329,17 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyFreq);
 };
 
+class Nl80211AttributeWiphyRtsThreshold : public NetlinkU32Attribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyRtsThreshold()
+      : NetlinkU32Attribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyRtsThreshold);
+};
+
 // U64.
 
 class Nl80211AttributeCookie : public NetlinkU64Attribute {
@@ -155,6 +354,17 @@
 
 // Flag.
 
+class Nl80211AttributeControlPortEthertype : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeControlPortEthertype()
+      : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeControlPortEthertype);
+};
+
 class Nl80211AttributeDisconnectedByAp : public NetlinkFlagAttribute {
  public:
   static const int kName;
@@ -166,6 +376,49 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeDisconnectedByAp);
 };
 
+class Nl80211AttributeOffchannelTxOk : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeOffchannelTxOk()
+      : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeOffchannelTxOk);
+};
+
+class Nl80211AttributeRoamSupport : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeRoamSupport() : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeRoamSupport);
+};
+
+class Nl80211AttributeSupportApUapsd : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeSupportApUapsd()
+      : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportApUapsd);
+};
+
+class Nl80211AttributeSupportIbssRsn : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeSupportIbssRsn()
+      : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportIbssRsn);
+};
+
 class Nl80211AttributeSupportMeshAuth : public NetlinkFlagAttribute {
  public:
   static const int kName;
@@ -177,6 +430,27 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeSupportMeshAuth);
 };
 
+class Nl80211AttributeTdlsExternalSetup : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeTdlsExternalSetup()
+      : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeTdlsExternalSetup);
+};
+
+class Nl80211AttributeTdlsSupport : public NetlinkFlagAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeTdlsSupport() : NetlinkFlagAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeTdlsSupport);
+};
+
 class Nl80211AttributeTimedOut : public NetlinkFlagAttribute {
  public:
   static const int kName;
@@ -284,8 +558,29 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeStaInfo);
 };
 
+class Nl80211AttributeWiphyBands : public NetlinkNestedAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeWiphyBands();
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeWiphyBands);
+};
+
+
 // Raw.
 
+class Nl80211AttributeCipherSuites : public NetlinkRawAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeCipherSuites() : NetlinkRawAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeCipherSuites);
+};
+
 class Nl80211AttributeFrame : public NetlinkRawAttribute {
  public:
   static const int kName;
@@ -296,6 +591,17 @@
   DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeFrame);
 };
 
+class Nl80211AttributeHtCapabilityMask : public NetlinkRawAttribute {
+ public:
+  static const int kName;
+  static const char kNameString[];
+  Nl80211AttributeHtCapabilityMask()
+      : NetlinkRawAttribute(kName, kNameString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(Nl80211AttributeHtCapabilityMask);
+};
+
 class Nl80211AttributeKeySeq : public NetlinkRawAttribute {
  public:
   static const int kName;
diff --git a/nl80211_message.cc b/nl80211_message.cc
index 9b0fbb9..d3f4d19 100644
--- a/nl80211_message.cc
+++ b/nl80211_message.cc
@@ -562,6 +562,9 @@
 const uint8_t GetRegMessage::kCommand = NL80211_CMD_GET_REG;
 const char GetRegMessage::kCommandString[] = "NL80211_CMD_GET_REG";
 
+const uint8_t GetWiphyMessage::kCommand = NL80211_CMD_GET_WIPHY;
+const char GetWiphyMessage::kCommandString[] = "NL80211_CMD_GET_WIPHY";
+
 const uint8_t JoinIbssMessage::kCommand = NL80211_CMD_JOIN_IBSS;
 const char JoinIbssMessage::kCommandString[] = "NL80211_CMD_JOIN_IBSS";
 
@@ -577,8 +580,8 @@
 const uint8_t NewStationMessage::kCommand = NL80211_CMD_NEW_STATION;
 const char NewStationMessage::kCommandString[] = "NL80211_CMD_NEW_STATION";
 
-const uint8_t NewWifiMessage::kCommand = NL80211_CMD_NEW_WIPHY;
-const char NewWifiMessage::kCommandString[] = "NL80211_CMD_NEW_WIPHY";
+const uint8_t NewWiphyMessage::kCommand = NL80211_CMD_NEW_WIPHY;
+const char NewWiphyMessage::kCommandString[] = "NL80211_CMD_NEW_WIPHY";
 
 const uint8_t NotifyCqmMessage::kCommand = NL80211_CMD_NOTIFY_CQM;
 const char NotifyCqmMessage::kCommandString[] = "NL80211_CMD_NOTIFY_CQM";
@@ -668,6 +671,8 @@
       return new GetInterfaceMessage();
     case GetRegMessage::kCommand:
       return new GetRegMessage();
+    case GetWiphyMessage::kCommand:
+      return new GetWiphyMessage();
     case JoinIbssMessage::kCommand:
       return new JoinIbssMessage();
     case MichaelMicFailureMessage::kCommand:
@@ -678,8 +683,8 @@
       return new NewScanResultsMessage();
     case NewStationMessage::kCommand:
       return new NewStationMessage();
-    case NewWifiMessage::kCommand:
-      return new NewWifiMessage();
+    case NewWiphyMessage::kCommand:
+      return new NewWiphyMessage();
     case NotifyCqmMessage::kCommand:
       return new NotifyCqmMessage();
     case PmksaCandidateMessage::kCommand:
diff --git a/nl80211_message.h b/nl80211_message.h
index e3c6944..ae65319 100644
--- a/nl80211_message.h
+++ b/nl80211_message.h
@@ -238,6 +238,17 @@
   DISALLOW_COPY_AND_ASSIGN(GetRegMessage);
 };
 
+class GetWiphyMessage : public Nl80211Message {
+ public:
+  static const uint8_t kCommand;
+  static const char kCommandString[];
+
+  GetWiphyMessage() : Nl80211Message(kCommand, kCommandString) {}
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(GetWiphyMessage);
+};
+
 
 class JoinIbssMessage : public Nl80211Message {
  public:
@@ -287,15 +298,15 @@
 };
 
 
-class NewWifiMessage : public Nl80211Message {
+class NewWiphyMessage : public Nl80211Message {
  public:
   static const uint8_t kCommand;
   static const char kCommandString[];
 
-  NewWifiMessage() : Nl80211Message(kCommand, kCommandString) {}
+  NewWiphyMessage() : Nl80211Message(kCommand, kCommandString) {}
 
  private:
-  DISALLOW_COPY_AND_ASSIGN(NewWifiMessage);
+  DISALLOW_COPY_AND_ASSIGN(NewWiphyMessage);
 };