1
0

0016-wifi-ath11k-Make-QMI-message-rules-const.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. From 93c1592889fca46d09d833455628bab05516cdbf Mon Sep 17 00:00:00 2001
  2. From: Jeff Johnson <quic_jjohnson@quicinc.com>
  3. Date: Wed, 14 Sep 2022 17:23:03 -0700
  4. Subject: [PATCH] wifi: ath11k: Make QMI message rules const
  5. Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
  6. qmi_elem_info") allows QMI message encoding/decoding rules to be
  7. const, so do that for ath11k.
  8. Compile tested only.
  9. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
  10. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  11. Link: https://lore.kernel.org/r/20220915002303.12206-1-quic_jjohnson@quicinc.com
  12. ---
  13. drivers/net/wireless/ath/ath11k/qmi.c | 72 +++++++++++++--------------
  14. 1 file changed, 36 insertions(+), 36 deletions(-)
  15. --- a/drivers/net/wireless/ath/ath11k/qmi.c
  16. +++ b/drivers/net/wireless/ath/ath11k/qmi.c
  17. @@ -29,7 +29,7 @@ module_param_named(cold_boot_cal, ath11k
  18. MODULE_PARM_DESC(cold_boot_cal,
  19. "Decrease the channel switch time but increase the driver load time (Default: true)");
  20. -static struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
  21. +static const struct qmi_elem_info qmi_wlanfw_host_cap_req_msg_v01_ei[] = {
  22. {
  23. .data_type = QMI_OPT_FLAG,
  24. .elem_len = 1,
  25. @@ -280,7 +280,7 @@ static struct qmi_elem_info qmi_wlanfw_h
  26. },
  27. };
  28. -static struct qmi_elem_info qmi_wlanfw_host_cap_resp_msg_v01_ei[] = {
  29. +static const struct qmi_elem_info qmi_wlanfw_host_cap_resp_msg_v01_ei[] = {
  30. {
  31. .data_type = QMI_STRUCT,
  32. .elem_len = 1,
  33. @@ -297,7 +297,7 @@ static struct qmi_elem_info qmi_wlanfw_h
  34. },
  35. };
  36. -static struct qmi_elem_info qmi_wlanfw_ind_register_req_msg_v01_ei[] = {
  37. +static const struct qmi_elem_info qmi_wlanfw_ind_register_req_msg_v01_ei[] = {
  38. {
  39. .data_type = QMI_OPT_FLAG,
  40. .elem_len = 1,
  41. @@ -522,7 +522,7 @@ static struct qmi_elem_info qmi_wlanfw_i
  42. },
  43. };
  44. -static struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = {
  45. +static const struct qmi_elem_info qmi_wlanfw_ind_register_resp_msg_v01_ei[] = {
  46. {
  47. .data_type = QMI_STRUCT,
  48. .elem_len = 1,
  49. @@ -558,7 +558,7 @@ static struct qmi_elem_info qmi_wlanfw_i
  50. },
  51. };
  52. -static struct qmi_elem_info qmi_wlanfw_mem_cfg_s_v01_ei[] = {
  53. +static const struct qmi_elem_info qmi_wlanfw_mem_cfg_s_v01_ei[] = {
  54. {
  55. .data_type = QMI_UNSIGNED_8_BYTE,
  56. .elem_len = 1,
  57. @@ -590,7 +590,7 @@ static struct qmi_elem_info qmi_wlanfw_m
  58. },
  59. };
  60. -static struct qmi_elem_info qmi_wlanfw_mem_seg_s_v01_ei[] = {
  61. +static const struct qmi_elem_info qmi_wlanfw_mem_seg_s_v01_ei[] = {
  62. {
  63. .data_type = QMI_UNSIGNED_4_BYTE,
  64. .elem_len = 1,
  65. @@ -632,7 +632,7 @@ static struct qmi_elem_info qmi_wlanfw_m
  66. },
  67. };
  68. -static struct qmi_elem_info qmi_wlanfw_request_mem_ind_msg_v01_ei[] = {
  69. +static const struct qmi_elem_info qmi_wlanfw_request_mem_ind_msg_v01_ei[] = {
  70. {
  71. .data_type = QMI_DATA_LEN,
  72. .elem_len = 1,
  73. @@ -659,7 +659,7 @@ static struct qmi_elem_info qmi_wlanfw_r
  74. },
  75. };
  76. -static struct qmi_elem_info qmi_wlanfw_mem_seg_resp_s_v01_ei[] = {
  77. +static const struct qmi_elem_info qmi_wlanfw_mem_seg_resp_s_v01_ei[] = {
  78. {
  79. .data_type = QMI_UNSIGNED_8_BYTE,
  80. .elem_len = 1,
  81. @@ -699,7 +699,7 @@ static struct qmi_elem_info qmi_wlanfw_m
  82. },
  83. };
  84. -static struct qmi_elem_info qmi_wlanfw_respond_mem_req_msg_v01_ei[] = {
  85. +static const struct qmi_elem_info qmi_wlanfw_respond_mem_req_msg_v01_ei[] = {
  86. {
  87. .data_type = QMI_DATA_LEN,
  88. .elem_len = 1,
  89. @@ -726,7 +726,7 @@ static struct qmi_elem_info qmi_wlanfw_r
  90. },
  91. };
  92. -static struct qmi_elem_info qmi_wlanfw_respond_mem_resp_msg_v01_ei[] = {
  93. +static const struct qmi_elem_info qmi_wlanfw_respond_mem_resp_msg_v01_ei[] = {
  94. {
  95. .data_type = QMI_STRUCT,
  96. .elem_len = 1,
  97. @@ -744,7 +744,7 @@ static struct qmi_elem_info qmi_wlanfw_r
  98. },
  99. };
  100. -static struct qmi_elem_info qmi_wlanfw_cap_req_msg_v01_ei[] = {
  101. +static const struct qmi_elem_info qmi_wlanfw_cap_req_msg_v01_ei[] = {
  102. {
  103. .data_type = QMI_EOTI,
  104. .array_type = NO_ARRAY,
  105. @@ -752,7 +752,7 @@ static struct qmi_elem_info qmi_wlanfw_c
  106. },
  107. };
  108. -static struct qmi_elem_info qmi_wlanfw_device_info_req_msg_v01_ei[] = {
  109. +static const struct qmi_elem_info qmi_wlanfw_device_info_req_msg_v01_ei[] = {
  110. {
  111. .data_type = QMI_EOTI,
  112. .array_type = NO_ARRAY,
  113. @@ -760,7 +760,7 @@ static struct qmi_elem_info qmi_wlanfw_d
  114. },
  115. };
  116. -static struct qmi_elem_info qmi_wlfw_device_info_resp_msg_v01_ei[] = {
  117. +static const struct qmi_elem_info qmi_wlfw_device_info_resp_msg_v01_ei[] = {
  118. {
  119. .data_type = QMI_STRUCT,
  120. .elem_len = 1,
  121. @@ -814,7 +814,7 @@ static struct qmi_elem_info qmi_wlfw_dev
  122. },
  123. };
  124. -static struct qmi_elem_info qmi_wlanfw_rf_chip_info_s_v01_ei[] = {
  125. +static const struct qmi_elem_info qmi_wlanfw_rf_chip_info_s_v01_ei[] = {
  126. {
  127. .data_type = QMI_UNSIGNED_4_BYTE,
  128. .elem_len = 1,
  129. @@ -840,7 +840,7 @@ static struct qmi_elem_info qmi_wlanfw_r
  130. },
  131. };
  132. -static struct qmi_elem_info qmi_wlanfw_rf_board_info_s_v01_ei[] = {
  133. +static const struct qmi_elem_info qmi_wlanfw_rf_board_info_s_v01_ei[] = {
  134. {
  135. .data_type = QMI_UNSIGNED_4_BYTE,
  136. .elem_len = 1,
  137. @@ -857,7 +857,7 @@ static struct qmi_elem_info qmi_wlanfw_r
  138. },
  139. };
  140. -static struct qmi_elem_info qmi_wlanfw_soc_info_s_v01_ei[] = {
  141. +static const struct qmi_elem_info qmi_wlanfw_soc_info_s_v01_ei[] = {
  142. {
  143. .data_type = QMI_UNSIGNED_4_BYTE,
  144. .elem_len = 1,
  145. @@ -873,7 +873,7 @@ static struct qmi_elem_info qmi_wlanfw_s
  146. },
  147. };
  148. -static struct qmi_elem_info qmi_wlanfw_fw_version_info_s_v01_ei[] = {
  149. +static const struct qmi_elem_info qmi_wlanfw_fw_version_info_s_v01_ei[] = {
  150. {
  151. .data_type = QMI_UNSIGNED_4_BYTE,
  152. .elem_len = 1,
  153. @@ -899,7 +899,7 @@ static struct qmi_elem_info qmi_wlanfw_f
  154. },
  155. };
  156. -static struct qmi_elem_info qmi_wlanfw_cap_resp_msg_v01_ei[] = {
  157. +static const struct qmi_elem_info qmi_wlanfw_cap_resp_msg_v01_ei[] = {
  158. {
  159. .data_type = QMI_STRUCT,
  160. .elem_len = 1,
  161. @@ -1100,7 +1100,7 @@ static struct qmi_elem_info qmi_wlanfw_c
  162. },
  163. };
  164. -static struct qmi_elem_info qmi_wlanfw_bdf_download_req_msg_v01_ei[] = {
  165. +static const struct qmi_elem_info qmi_wlanfw_bdf_download_req_msg_v01_ei[] = {
  166. {
  167. .data_type = QMI_UNSIGNED_1_BYTE,
  168. .elem_len = 1,
  169. @@ -1235,7 +1235,7 @@ static struct qmi_elem_info qmi_wlanfw_b
  170. },
  171. };
  172. -static struct qmi_elem_info qmi_wlanfw_bdf_download_resp_msg_v01_ei[] = {
  173. +static const struct qmi_elem_info qmi_wlanfw_bdf_download_resp_msg_v01_ei[] = {
  174. {
  175. .data_type = QMI_STRUCT,
  176. .elem_len = 1,
  177. @@ -1253,7 +1253,7 @@ static struct qmi_elem_info qmi_wlanfw_b
  178. },
  179. };
  180. -static struct qmi_elem_info qmi_wlanfw_m3_info_req_msg_v01_ei[] = {
  181. +static const struct qmi_elem_info qmi_wlanfw_m3_info_req_msg_v01_ei[] = {
  182. {
  183. .data_type = QMI_UNSIGNED_8_BYTE,
  184. .elem_len = 1,
  185. @@ -1277,7 +1277,7 @@ static struct qmi_elem_info qmi_wlanfw_m
  186. },
  187. };
  188. -static struct qmi_elem_info qmi_wlanfw_m3_info_resp_msg_v01_ei[] = {
  189. +static const struct qmi_elem_info qmi_wlanfw_m3_info_resp_msg_v01_ei[] = {
  190. {
  191. .data_type = QMI_STRUCT,
  192. .elem_len = 1,
  193. @@ -1294,7 +1294,7 @@ static struct qmi_elem_info qmi_wlanfw_m
  194. },
  195. };
  196. -static struct qmi_elem_info qmi_wlanfw_ce_tgt_pipe_cfg_s_v01_ei[] = {
  197. +static const struct qmi_elem_info qmi_wlanfw_ce_tgt_pipe_cfg_s_v01_ei[] = {
  198. {
  199. .data_type = QMI_UNSIGNED_4_BYTE,
  200. .elem_len = 1,
  201. @@ -1347,7 +1347,7 @@ static struct qmi_elem_info qmi_wlanfw_c
  202. },
  203. };
  204. -static struct qmi_elem_info qmi_wlanfw_ce_svc_pipe_cfg_s_v01_ei[] = {
  205. +static const struct qmi_elem_info qmi_wlanfw_ce_svc_pipe_cfg_s_v01_ei[] = {
  206. {
  207. .data_type = QMI_UNSIGNED_4_BYTE,
  208. .elem_len = 1,
  209. @@ -1382,7 +1382,7 @@ static struct qmi_elem_info qmi_wlanfw_c
  210. },
  211. };
  212. -static struct qmi_elem_info qmi_wlanfw_shadow_reg_cfg_s_v01_ei[] = {
  213. +static const struct qmi_elem_info qmi_wlanfw_shadow_reg_cfg_s_v01_ei[] = {
  214. {
  215. .data_type = QMI_UNSIGNED_2_BYTE,
  216. .elem_len = 1,
  217. @@ -1406,7 +1406,7 @@ static struct qmi_elem_info qmi_wlanfw_s
  218. },
  219. };
  220. -static struct qmi_elem_info qmi_wlanfw_shadow_reg_v2_cfg_s_v01_ei[] = {
  221. +static const struct qmi_elem_info qmi_wlanfw_shadow_reg_v2_cfg_s_v01_ei[] = {
  222. {
  223. .data_type = QMI_UNSIGNED_4_BYTE,
  224. .elem_len = 1,
  225. @@ -1423,7 +1423,7 @@ static struct qmi_elem_info qmi_wlanfw_s
  226. },
  227. };
  228. -static struct qmi_elem_info qmi_wlanfw_wlan_mode_req_msg_v01_ei[] = {
  229. +static const struct qmi_elem_info qmi_wlanfw_wlan_mode_req_msg_v01_ei[] = {
  230. {
  231. .data_type = QMI_UNSIGNED_4_BYTE,
  232. .elem_len = 1,
  233. @@ -1458,7 +1458,7 @@ static struct qmi_elem_info qmi_wlanfw_w
  234. },
  235. };
  236. -static struct qmi_elem_info qmi_wlanfw_wlan_mode_resp_msg_v01_ei[] = {
  237. +static const struct qmi_elem_info qmi_wlanfw_wlan_mode_resp_msg_v01_ei[] = {
  238. {
  239. .data_type = QMI_STRUCT,
  240. .elem_len = 1,
  241. @@ -1476,7 +1476,7 @@ static struct qmi_elem_info qmi_wlanfw_w
  242. },
  243. };
  244. -static struct qmi_elem_info qmi_wlanfw_wlan_cfg_req_msg_v01_ei[] = {
  245. +static const struct qmi_elem_info qmi_wlanfw_wlan_cfg_req_msg_v01_ei[] = {
  246. {
  247. .data_type = QMI_OPT_FLAG,
  248. .elem_len = 1,
  249. @@ -1615,7 +1615,7 @@ static struct qmi_elem_info qmi_wlanfw_w
  250. },
  251. };
  252. -static struct qmi_elem_info qmi_wlanfw_wlan_cfg_resp_msg_v01_ei[] = {
  253. +static const struct qmi_elem_info qmi_wlanfw_wlan_cfg_resp_msg_v01_ei[] = {
  254. {
  255. .data_type = QMI_STRUCT,
  256. .elem_len = 1,
  257. @@ -1632,28 +1632,28 @@ static struct qmi_elem_info qmi_wlanfw_w
  258. },
  259. };
  260. -static struct qmi_elem_info qmi_wlanfw_mem_ready_ind_msg_v01_ei[] = {
  261. +static const struct qmi_elem_info qmi_wlanfw_mem_ready_ind_msg_v01_ei[] = {
  262. {
  263. .data_type = QMI_EOTI,
  264. .array_type = NO_ARRAY,
  265. },
  266. };
  267. -static struct qmi_elem_info qmi_wlanfw_fw_ready_ind_msg_v01_ei[] = {
  268. +static const struct qmi_elem_info qmi_wlanfw_fw_ready_ind_msg_v01_ei[] = {
  269. {
  270. .data_type = QMI_EOTI,
  271. .array_type = NO_ARRAY,
  272. },
  273. };
  274. -static struct qmi_elem_info qmi_wlanfw_cold_boot_cal_done_ind_msg_v01_ei[] = {
  275. +static const struct qmi_elem_info qmi_wlanfw_cold_boot_cal_done_ind_msg_v01_ei[] = {
  276. {
  277. .data_type = QMI_EOTI,
  278. .array_type = NO_ARRAY,
  279. },
  280. };
  281. -static struct qmi_elem_info qmi_wlanfw_wlan_ini_req_msg_v01_ei[] = {
  282. +static const struct qmi_elem_info qmi_wlanfw_wlan_ini_req_msg_v01_ei[] = {
  283. {
  284. .data_type = QMI_OPT_FLAG,
  285. .elem_len = 1,
  286. @@ -1679,7 +1679,7 @@ static struct qmi_elem_info qmi_wlanfw_w
  287. },
  288. };
  289. -static struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = {
  290. +static const struct qmi_elem_info qmi_wlanfw_wlan_ini_resp_msg_v01_ei[] = {
  291. {
  292. .data_type = QMI_STRUCT,
  293. .elem_len = 1,
  294. @@ -1697,7 +1697,7 @@ static struct qmi_elem_info qmi_wlanfw_w
  295. },
  296. };
  297. -static struct qmi_elem_info qmi_wlfw_fw_init_done_ind_msg_v01_ei[] = {
  298. +static const struct qmi_elem_info qmi_wlfw_fw_init_done_ind_msg_v01_ei[] = {
  299. {
  300. .data_type = QMI_EOTI,
  301. .array_type = NO_ARRAY,