[third_party/bcmdhd] Extract definitions of eventmsgs to crossdriver

fweh.cc in brcmfmac driver is refering this new struct, so extracting
the definitions to a new file in crossdriver.

Test: None, no functional change.
Bug: 52234
Change-Id: Ia221e8aba201f68d56d322a3144bdeb180184bb2
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/bcmdhd/+/428360
Reviewed-by: Karl Ward <karlward@google.com>
diff --git a/README.fuchsia b/README.fuchsia
index ccf2cbd..f0de7fa 100644
--- a/README.fuchsia
+++ b/README.fuchsia
@@ -16,6 +16,8 @@
   * Added crossdriver/BUILD.gn
 * fxr/427094
   * Extracted additional cross-driver (bcmdhd/brcmfmac) symbols into crossdriver/bcmwifi_channels.cc
+* fxr/428360
+  * Extracted eventmsgs_ext structure and related definitions into crossdriver/wlioctl.h
 
 Description:
 
diff --git a/crossdriver/wlioctl.h b/crossdriver/wlioctl.h
new file mode 100644
index 0000000..a46c13f
--- /dev/null
+++ b/crossdriver/wlioctl.h
@@ -0,0 +1,57 @@
+/* Crossdriver (bcmdhd/brcmfmac) symbols extracted from bcmdhd include/wlioctl.h.
+ *
+ * Copyright 1999-2016, Broadcom Corporation
+ * All rights reserved,
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *    1. Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *    2. Redistributions in binary form must reproduce the above copyright notice,
+ *       this list of conditions and the following disclaimer in the documentation
+ *       and/or other materials provided with the distribution.
+ *
+ * This software is provided by the copyright holder "as is" and any express or
+ * implied warranties, including, but not limited to, the implied warranties of
+ * merchantability and fitness for a particular purpose are disclaimed. In no event
+ * shall copyright holder be liable for any direct, indirect, incidental, special,
+ * exemplary, or consequential damages (including, but not limited to, procurement
+ * of substitute goods or services; loss of use, data, or profits; or business
+ * interruption) however caused and on any theory of liability, whether in
+ * contract, strict liability, or tort (including negligence or otherwise) arising
+ * in any way out of the use of this software, even if advised of the possibility
+ * of such damage
+ */
+
+#ifndef THIRD_PARTY_BCMDHD_CROSSDRIVER_WLIOCTL_H_
+#define THIRD_PARTY_BCMDHD_CROSSDRIVER_WLIOCTL_H_
+
+using event_msgs_ext_command_t = enum event_msgs_ext_command {
+  EVENTMSGS_NONE = 0,
+  EVENTMSGS_SET_BIT = 1,
+  EVENTMSGS_RESET_BIT = 2,
+  EVENTMSGS_SET_MASK = 3
+};
+
+#define EVENTMSGS_VERSION 1
+#define EVENTMSGS_EXT_STRUCT_SIZE offsetof(eventmsgs_ext_t, event_mask)
+
+/**
+ * struct eventmsgs_ext - firmware event message.
+ *
+ * @version: version information.
+ * @command: the command of this iovar.
+ * @length: for SET it would be mask size from the application to the firmware for GET it would be
+ * actual firmware mask size.
+ * @max_get_size: only for iovar get, indicating the max mask length of the event mask.
+ * @event_mask: the event mask bits.
+ */
+using eventmsgs_ext_t = struct eventmsgs_ext {
+  uint8_t version;
+  uint8_t command;
+  uint8_t length;
+  uint8_t max_get_size;
+  uint8_t event_mask[1];
+};
+
+#endif  // THIRD_PARTY_BCMDHD_CROSSDRIVER_WLIOCTL_H_