]> git.itanic.dy.fi Git - linux-stable/blobdiff - drivers/net/ipa/ipa_qmi_msg.h
net: ipa: properly limit modem routing table use
[linux-stable] / drivers / net / ipa / ipa_qmi_msg.h
index 495e85abe50bdb8a0e5b7f7dd3fc022449b73469..9651aa59b59685fabe0e11895c5dec10b1a713eb 100644 (file)
@@ -86,9 +86,11 @@ enum ipa_platform_type {
        IPA_QMI_PLATFORM_TYPE_MSM_QNX_V01       = 0x5,  /* QNX MSM */
 };
 
-/* This defines the start and end offset of a range of memory.  Both
- * fields are offsets relative to the start of IPA shared memory.
- * The end value is the last addressable byte *within* the range.
+/* This defines the start and end offset of a range of memory.  The start
+ * value is a byte offset relative to the start of IPA shared memory.  The
+ * end value is the last addressable unit *within* the range.  Typically
+ * the end value is in units of bytes, however it can also be a maximum
+ * array index value.
  */
 struct ipa_mem_bounds {
        u32 start;
@@ -129,18 +131,19 @@ struct ipa_init_modem_driver_req {
        u8                      hdr_tbl_info_valid;
        struct ipa_mem_bounds   hdr_tbl_info;
 
-       /* Routing table information.  These define the location and size of
-        * non-hashable IPv4 and IPv6 filter tables.  The start values are
-        * offsets relative to the start of IPA shared memory.
+       /* Routing table information.  These define the location and maximum
+        * *index* (not byte) for the modem portion of non-hashable IPv4 and
+        * IPv6 routing tables.  The start values are byte offsets relative
+        * to the start of IPA shared memory.
         */
        u8                      v4_route_tbl_info_valid;
-       struct ipa_mem_array    v4_route_tbl_info;
+       struct ipa_mem_bounds   v4_route_tbl_info;
        u8                      v6_route_tbl_info_valid;
-       struct ipa_mem_array    v6_route_tbl_info;
+       struct ipa_mem_bounds   v6_route_tbl_info;
 
        /* Filter table information.  These define the location of the
         * non-hashable IPv4 and IPv6 filter tables.  The start values are
-        * offsets relative to the start of IPA shared memory.
+        * byte offsets relative to the start of IPA shared memory.
         */
        u8                      v4_filter_tbl_start_valid;
        u32                     v4_filter_tbl_start;
@@ -181,18 +184,20 @@ struct ipa_init_modem_driver_req {
        u8                      zip_tbl_info_valid;
        struct ipa_mem_bounds   zip_tbl_info;
 
-       /* Routing table information.  These define the location and size
-        * of hashable IPv4 and IPv6 filter tables.  The start values are
-        * offsets relative to the start of IPA shared memory.
+       /* Routing table information.  These define the location and maximum
+        * *index* (not byte) for the modem portion of hashable IPv4 and IPv6
+        * routing tables (if supported by hardware).  The start values are
+        * byte offsets relative to the start of IPA shared memory.
         */
        u8                      v4_hash_route_tbl_info_valid;
-       struct ipa_mem_array    v4_hash_route_tbl_info;
+       struct ipa_mem_bounds   v4_hash_route_tbl_info;
        u8                      v6_hash_route_tbl_info_valid;
-       struct ipa_mem_array    v6_hash_route_tbl_info;
+       struct ipa_mem_bounds   v6_hash_route_tbl_info;
 
        /* Filter table information.  These define the location and size
-        * of hashable IPv4 and IPv6 filter tables.  The start values are
-        * offsets relative to the start of IPA shared memory.
+        * of hashable IPv4 and IPv6 filter tables (if supported by hardware).
+        * The start values are byte offsets relative to the start of IPA
+        * shared memory.
         */
        u8                      v4_hash_filter_tbl_start_valid;
        u32                     v4_hash_filter_tbl_start;