coredump.c 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. /*
  2. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
  3. * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for any
  6. * purpose with or without fee is hereby granted, provided that the above
  7. * copyright notice and this permission notice appear in all copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  15. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. */
  17. #include "coredump.h"
  18. #include <linux/devcoredump.h>
  19. #include <linux/kernel.h>
  20. #include <linux/types.h>
  21. #include <linux/utsname.h>
  22. #include "debug.h"
  23. #include "hw.h"
  24. static const struct ath10k_mem_section qca6174_hw21_register_sections[] = {
  25. {0x800, 0x810},
  26. {0x820, 0x82C},
  27. {0x830, 0x8F4},
  28. {0x90C, 0x91C},
  29. {0xA14, 0xA18},
  30. {0xA84, 0xA94},
  31. {0xAA8, 0xAD4},
  32. {0xADC, 0xB40},
  33. {0x1000, 0x10A4},
  34. {0x10BC, 0x111C},
  35. {0x1134, 0x1138},
  36. {0x1144, 0x114C},
  37. {0x1150, 0x115C},
  38. {0x1160, 0x1178},
  39. {0x1240, 0x1260},
  40. {0x2000, 0x207C},
  41. {0x3000, 0x3014},
  42. {0x4000, 0x4014},
  43. {0x5000, 0x5124},
  44. {0x6000, 0x6040},
  45. {0x6080, 0x60CC},
  46. {0x6100, 0x611C},
  47. {0x6140, 0x61D8},
  48. {0x6200, 0x6238},
  49. {0x6240, 0x628C},
  50. {0x62C0, 0x62EC},
  51. {0x6380, 0x63E8},
  52. {0x6400, 0x6440},
  53. {0x6480, 0x64CC},
  54. {0x6500, 0x651C},
  55. {0x6540, 0x6580},
  56. {0x6600, 0x6638},
  57. {0x6640, 0x668C},
  58. {0x66C0, 0x66EC},
  59. {0x6780, 0x67E8},
  60. {0x7080, 0x708C},
  61. {0x70C0, 0x70C8},
  62. {0x7400, 0x741C},
  63. {0x7440, 0x7454},
  64. {0x7800, 0x7818},
  65. {0x8000, 0x8004},
  66. {0x8010, 0x8064},
  67. {0x8080, 0x8084},
  68. {0x80A0, 0x80A4},
  69. {0x80C0, 0x80C4},
  70. {0x80E0, 0x80F4},
  71. {0x8100, 0x8104},
  72. {0x8110, 0x812C},
  73. {0x9000, 0x9004},
  74. {0x9800, 0x982C},
  75. {0x9830, 0x9838},
  76. {0x9840, 0x986C},
  77. {0x9870, 0x9898},
  78. {0x9A00, 0x9C00},
  79. {0xD580, 0xD59C},
  80. {0xF000, 0xF0E0},
  81. {0xF140, 0xF190},
  82. {0xF250, 0xF25C},
  83. {0xF260, 0xF268},
  84. {0xF26C, 0xF2A8},
  85. {0x10008, 0x1000C},
  86. {0x10014, 0x10018},
  87. {0x1001C, 0x10020},
  88. {0x10024, 0x10028},
  89. {0x10030, 0x10034},
  90. {0x10040, 0x10054},
  91. {0x10058, 0x1007C},
  92. {0x10080, 0x100C4},
  93. {0x100C8, 0x10114},
  94. {0x1012C, 0x10130},
  95. {0x10138, 0x10144},
  96. {0x10200, 0x10220},
  97. {0x10230, 0x10250},
  98. {0x10260, 0x10280},
  99. {0x10290, 0x102B0},
  100. {0x102C0, 0x102DC},
  101. {0x102E0, 0x102F4},
  102. {0x102FC, 0x1037C},
  103. {0x10380, 0x10390},
  104. {0x10800, 0x10828},
  105. {0x10840, 0x10844},
  106. {0x10880, 0x10884},
  107. {0x108C0, 0x108E8},
  108. {0x10900, 0x10928},
  109. {0x10940, 0x10944},
  110. {0x10980, 0x10984},
  111. {0x109C0, 0x109E8},
  112. {0x10A00, 0x10A28},
  113. {0x10A40, 0x10A50},
  114. {0x11000, 0x11028},
  115. {0x11030, 0x11034},
  116. {0x11038, 0x11068},
  117. {0x11070, 0x11074},
  118. {0x11078, 0x110A8},
  119. {0x110B0, 0x110B4},
  120. {0x110B8, 0x110E8},
  121. {0x110F0, 0x110F4},
  122. {0x110F8, 0x11128},
  123. {0x11138, 0x11144},
  124. {0x11178, 0x11180},
  125. {0x111B8, 0x111C0},
  126. {0x111F8, 0x11200},
  127. {0x11238, 0x1123C},
  128. {0x11270, 0x11274},
  129. {0x11278, 0x1127C},
  130. {0x112B0, 0x112B4},
  131. {0x112B8, 0x112BC},
  132. {0x112F0, 0x112F4},
  133. {0x112F8, 0x112FC},
  134. {0x11338, 0x1133C},
  135. {0x11378, 0x1137C},
  136. {0x113B8, 0x113BC},
  137. {0x113F8, 0x113FC},
  138. {0x11438, 0x11440},
  139. {0x11478, 0x11480},
  140. {0x114B8, 0x114BC},
  141. {0x114F8, 0x114FC},
  142. {0x11538, 0x1153C},
  143. {0x11578, 0x1157C},
  144. {0x115B8, 0x115BC},
  145. {0x115F8, 0x115FC},
  146. {0x11638, 0x1163C},
  147. {0x11678, 0x1167C},
  148. {0x116B8, 0x116BC},
  149. {0x116F8, 0x116FC},
  150. {0x11738, 0x1173C},
  151. {0x11778, 0x1177C},
  152. {0x117B8, 0x117BC},
  153. {0x117F8, 0x117FC},
  154. {0x17000, 0x1701C},
  155. {0x17020, 0x170AC},
  156. {0x18000, 0x18050},
  157. {0x18054, 0x18074},
  158. {0x18080, 0x180D4},
  159. {0x180DC, 0x18104},
  160. {0x18108, 0x1813C},
  161. {0x18144, 0x18148},
  162. {0x18168, 0x18174},
  163. {0x18178, 0x18180},
  164. {0x181C8, 0x181E0},
  165. {0x181E4, 0x181E8},
  166. {0x181EC, 0x1820C},
  167. {0x1825C, 0x18280},
  168. {0x18284, 0x18290},
  169. {0x18294, 0x182A0},
  170. {0x18300, 0x18304},
  171. {0x18314, 0x18320},
  172. {0x18328, 0x18350},
  173. {0x1835C, 0x1836C},
  174. {0x18370, 0x18390},
  175. {0x18398, 0x183AC},
  176. {0x183BC, 0x183D8},
  177. {0x183DC, 0x183F4},
  178. {0x18400, 0x186F4},
  179. {0x186F8, 0x1871C},
  180. {0x18720, 0x18790},
  181. {0x19800, 0x19830},
  182. {0x19834, 0x19840},
  183. {0x19880, 0x1989C},
  184. {0x198A4, 0x198B0},
  185. {0x198BC, 0x19900},
  186. {0x19C00, 0x19C88},
  187. {0x19D00, 0x19D20},
  188. {0x19E00, 0x19E7C},
  189. {0x19E80, 0x19E94},
  190. {0x19E98, 0x19EAC},
  191. {0x19EB0, 0x19EBC},
  192. {0x19F70, 0x19F74},
  193. {0x19F80, 0x19F8C},
  194. {0x19FA0, 0x19FB4},
  195. {0x19FC0, 0x19FD8},
  196. {0x1A000, 0x1A200},
  197. {0x1A204, 0x1A210},
  198. {0x1A228, 0x1A22C},
  199. {0x1A230, 0x1A248},
  200. {0x1A250, 0x1A270},
  201. {0x1A280, 0x1A290},
  202. {0x1A2A0, 0x1A2A4},
  203. {0x1A2C0, 0x1A2EC},
  204. {0x1A300, 0x1A3BC},
  205. {0x1A3F0, 0x1A3F4},
  206. {0x1A3F8, 0x1A434},
  207. {0x1A438, 0x1A444},
  208. {0x1A448, 0x1A468},
  209. {0x1A580, 0x1A58C},
  210. {0x1A644, 0x1A654},
  211. {0x1A670, 0x1A698},
  212. {0x1A6AC, 0x1A6B0},
  213. {0x1A6D0, 0x1A6D4},
  214. {0x1A6EC, 0x1A70C},
  215. {0x1A710, 0x1A738},
  216. {0x1A7C0, 0x1A7D0},
  217. {0x1A7D4, 0x1A7D8},
  218. {0x1A7DC, 0x1A7E4},
  219. {0x1A7F0, 0x1A7F8},
  220. {0x1A888, 0x1A89C},
  221. {0x1A8A8, 0x1A8AC},
  222. {0x1A8C0, 0x1A8DC},
  223. {0x1A8F0, 0x1A8FC},
  224. {0x1AE04, 0x1AE08},
  225. {0x1AE18, 0x1AE24},
  226. {0x1AF80, 0x1AF8C},
  227. {0x1AFA0, 0x1AFB4},
  228. {0x1B000, 0x1B200},
  229. {0x1B284, 0x1B288},
  230. {0x1B2D0, 0x1B2D8},
  231. {0x1B2DC, 0x1B2EC},
  232. {0x1B300, 0x1B340},
  233. {0x1B374, 0x1B378},
  234. {0x1B380, 0x1B384},
  235. {0x1B388, 0x1B38C},
  236. {0x1B404, 0x1B408},
  237. {0x1B420, 0x1B428},
  238. {0x1B440, 0x1B444},
  239. {0x1B448, 0x1B44C},
  240. {0x1B450, 0x1B458},
  241. {0x1B45C, 0x1B468},
  242. {0x1B584, 0x1B58C},
  243. {0x1B68C, 0x1B690},
  244. {0x1B6AC, 0x1B6B0},
  245. {0x1B7F0, 0x1B7F8},
  246. {0x1C800, 0x1CC00},
  247. {0x1CE00, 0x1CE04},
  248. {0x1CF80, 0x1CF84},
  249. {0x1D200, 0x1D800},
  250. {0x1E000, 0x20014},
  251. {0x20100, 0x20124},
  252. {0x21400, 0x217A8},
  253. {0x21800, 0x21BA8},
  254. {0x21C00, 0x21FA8},
  255. {0x22000, 0x223A8},
  256. {0x22400, 0x227A8},
  257. {0x22800, 0x22BA8},
  258. {0x22C00, 0x22FA8},
  259. {0x23000, 0x233A8},
  260. {0x24000, 0x24034},
  261. {0x26000, 0x26064},
  262. {0x27000, 0x27024},
  263. {0x34000, 0x3400C},
  264. {0x34400, 0x3445C},
  265. {0x34800, 0x3485C},
  266. {0x34C00, 0x34C5C},
  267. {0x35000, 0x3505C},
  268. {0x35400, 0x3545C},
  269. {0x35800, 0x3585C},
  270. {0x35C00, 0x35C5C},
  271. {0x36000, 0x3605C},
  272. {0x38000, 0x38064},
  273. {0x38070, 0x380E0},
  274. {0x3A000, 0x3A064},
  275. {0x40000, 0x400A4},
  276. {0x80000, 0x8000C},
  277. {0x80010, 0x80020},
  278. };
  279. static const struct ath10k_mem_section qca6174_hw30_register_sections[] = {
  280. {0x800, 0x810},
  281. {0x820, 0x82C},
  282. {0x830, 0x8F4},
  283. {0x90C, 0x91C},
  284. {0xA14, 0xA18},
  285. {0xA84, 0xA94},
  286. {0xAA8, 0xAD4},
  287. {0xADC, 0xB40},
  288. {0x1000, 0x10A4},
  289. {0x10BC, 0x111C},
  290. {0x1134, 0x1138},
  291. {0x1144, 0x114C},
  292. {0x1150, 0x115C},
  293. {0x1160, 0x1178},
  294. {0x1240, 0x1260},
  295. {0x2000, 0x207C},
  296. {0x3000, 0x3014},
  297. {0x4000, 0x4014},
  298. {0x5000, 0x5124},
  299. {0x6000, 0x6040},
  300. {0x6080, 0x60CC},
  301. {0x6100, 0x611C},
  302. {0x6140, 0x61D8},
  303. {0x6200, 0x6238},
  304. {0x6240, 0x628C},
  305. {0x62C0, 0x62EC},
  306. {0x6380, 0x63E8},
  307. {0x6400, 0x6440},
  308. {0x6480, 0x64CC},
  309. {0x6500, 0x651C},
  310. {0x6540, 0x6580},
  311. {0x6600, 0x6638},
  312. {0x6640, 0x668C},
  313. {0x66C0, 0x66EC},
  314. {0x6780, 0x67E8},
  315. {0x7080, 0x708C},
  316. {0x70C0, 0x70C8},
  317. {0x7400, 0x741C},
  318. {0x7440, 0x7454},
  319. {0x7800, 0x7818},
  320. {0x8000, 0x8004},
  321. {0x8010, 0x8064},
  322. {0x8080, 0x8084},
  323. {0x80A0, 0x80A4},
  324. {0x80C0, 0x80C4},
  325. {0x80E0, 0x80F4},
  326. {0x8100, 0x8104},
  327. {0x8110, 0x812C},
  328. {0x9000, 0x9004},
  329. {0x9800, 0x982C},
  330. {0x9830, 0x9838},
  331. {0x9840, 0x986C},
  332. {0x9870, 0x9898},
  333. {0x9A00, 0x9C00},
  334. {0xD580, 0xD59C},
  335. {0xF000, 0xF0E0},
  336. {0xF140, 0xF190},
  337. {0xF250, 0xF25C},
  338. {0xF260, 0xF268},
  339. {0xF26C, 0xF2A8},
  340. {0x10008, 0x1000C},
  341. {0x10014, 0x10018},
  342. {0x1001C, 0x10020},
  343. {0x10024, 0x10028},
  344. {0x10030, 0x10034},
  345. {0x10040, 0x10054},
  346. {0x10058, 0x1007C},
  347. {0x10080, 0x100C4},
  348. {0x100C8, 0x10114},
  349. {0x1012C, 0x10130},
  350. {0x10138, 0x10144},
  351. {0x10200, 0x10220},
  352. {0x10230, 0x10250},
  353. {0x10260, 0x10280},
  354. {0x10290, 0x102B0},
  355. {0x102C0, 0x102DC},
  356. {0x102E0, 0x102F4},
  357. {0x102FC, 0x1037C},
  358. {0x10380, 0x10390},
  359. {0x10800, 0x10828},
  360. {0x10840, 0x10844},
  361. {0x10880, 0x10884},
  362. {0x108C0, 0x108E8},
  363. {0x10900, 0x10928},
  364. {0x10940, 0x10944},
  365. {0x10980, 0x10984},
  366. {0x109C0, 0x109E8},
  367. {0x10A00, 0x10A28},
  368. {0x10A40, 0x10A50},
  369. {0x11000, 0x11028},
  370. {0x11030, 0x11034},
  371. {0x11038, 0x11068},
  372. {0x11070, 0x11074},
  373. {0x11078, 0x110A8},
  374. {0x110B0, 0x110B4},
  375. {0x110B8, 0x110E8},
  376. {0x110F0, 0x110F4},
  377. {0x110F8, 0x11128},
  378. {0x11138, 0x11144},
  379. {0x11178, 0x11180},
  380. {0x111B8, 0x111C0},
  381. {0x111F8, 0x11200},
  382. {0x11238, 0x1123C},
  383. {0x11270, 0x11274},
  384. {0x11278, 0x1127C},
  385. {0x112B0, 0x112B4},
  386. {0x112B8, 0x112BC},
  387. {0x112F0, 0x112F4},
  388. {0x112F8, 0x112FC},
  389. {0x11338, 0x1133C},
  390. {0x11378, 0x1137C},
  391. {0x113B8, 0x113BC},
  392. {0x113F8, 0x113FC},
  393. {0x11438, 0x11440},
  394. {0x11478, 0x11480},
  395. {0x114B8, 0x114BC},
  396. {0x114F8, 0x114FC},
  397. {0x11538, 0x1153C},
  398. {0x11578, 0x1157C},
  399. {0x115B8, 0x115BC},
  400. {0x115F8, 0x115FC},
  401. {0x11638, 0x1163C},
  402. {0x11678, 0x1167C},
  403. {0x116B8, 0x116BC},
  404. {0x116F8, 0x116FC},
  405. {0x11738, 0x1173C},
  406. {0x11778, 0x1177C},
  407. {0x117B8, 0x117BC},
  408. {0x117F8, 0x117FC},
  409. {0x17000, 0x1701C},
  410. {0x17020, 0x170AC},
  411. {0x18000, 0x18050},
  412. {0x18054, 0x18074},
  413. {0x18080, 0x180D4},
  414. {0x180DC, 0x18104},
  415. {0x18108, 0x1813C},
  416. {0x18144, 0x18148},
  417. {0x18168, 0x18174},
  418. {0x18178, 0x18180},
  419. {0x181C8, 0x181E0},
  420. {0x181E4, 0x181E8},
  421. {0x181EC, 0x1820C},
  422. {0x1825C, 0x18280},
  423. {0x18284, 0x18290},
  424. {0x18294, 0x182A0},
  425. {0x18300, 0x18304},
  426. {0x18314, 0x18320},
  427. {0x18328, 0x18350},
  428. {0x1835C, 0x1836C},
  429. {0x18370, 0x18390},
  430. {0x18398, 0x183AC},
  431. {0x183BC, 0x183D8},
  432. {0x183DC, 0x183F4},
  433. {0x18400, 0x186F4},
  434. {0x186F8, 0x1871C},
  435. {0x18720, 0x18790},
  436. {0x19800, 0x19830},
  437. {0x19834, 0x19840},
  438. {0x19880, 0x1989C},
  439. {0x198A4, 0x198B0},
  440. {0x198BC, 0x19900},
  441. {0x19C00, 0x19C88},
  442. {0x19D00, 0x19D20},
  443. {0x19E00, 0x19E7C},
  444. {0x19E80, 0x19E94},
  445. {0x19E98, 0x19EAC},
  446. {0x19EB0, 0x19EBC},
  447. {0x19F70, 0x19F74},
  448. {0x19F80, 0x19F8C},
  449. {0x19FA0, 0x19FB4},
  450. {0x19FC0, 0x19FD8},
  451. {0x1A000, 0x1A200},
  452. {0x1A204, 0x1A210},
  453. {0x1A228, 0x1A22C},
  454. {0x1A230, 0x1A248},
  455. {0x1A250, 0x1A270},
  456. {0x1A280, 0x1A290},
  457. {0x1A2A0, 0x1A2A4},
  458. {0x1A2C0, 0x1A2EC},
  459. {0x1A300, 0x1A3BC},
  460. {0x1A3F0, 0x1A3F4},
  461. {0x1A3F8, 0x1A434},
  462. {0x1A438, 0x1A444},
  463. {0x1A448, 0x1A468},
  464. {0x1A580, 0x1A58C},
  465. {0x1A644, 0x1A654},
  466. {0x1A670, 0x1A698},
  467. {0x1A6AC, 0x1A6B0},
  468. {0x1A6D0, 0x1A6D4},
  469. {0x1A6EC, 0x1A70C},
  470. {0x1A710, 0x1A738},
  471. {0x1A7C0, 0x1A7D0},
  472. {0x1A7D4, 0x1A7D8},
  473. {0x1A7DC, 0x1A7E4},
  474. {0x1A7F0, 0x1A7F8},
  475. {0x1A888, 0x1A89C},
  476. {0x1A8A8, 0x1A8AC},
  477. {0x1A8C0, 0x1A8DC},
  478. {0x1A8F0, 0x1A8FC},
  479. {0x1AE04, 0x1AE08},
  480. {0x1AE18, 0x1AE24},
  481. {0x1AF80, 0x1AF8C},
  482. {0x1AFA0, 0x1AFB4},
  483. {0x1B000, 0x1B200},
  484. {0x1B284, 0x1B288},
  485. {0x1B2D0, 0x1B2D8},
  486. {0x1B2DC, 0x1B2EC},
  487. {0x1B300, 0x1B340},
  488. {0x1B374, 0x1B378},
  489. {0x1B380, 0x1B384},
  490. {0x1B388, 0x1B38C},
  491. {0x1B404, 0x1B408},
  492. {0x1B420, 0x1B428},
  493. {0x1B440, 0x1B444},
  494. {0x1B448, 0x1B44C},
  495. {0x1B450, 0x1B458},
  496. {0x1B45C, 0x1B468},
  497. {0x1B584, 0x1B58C},
  498. {0x1B68C, 0x1B690},
  499. {0x1B6AC, 0x1B6B0},
  500. {0x1B7F0, 0x1B7F8},
  501. {0x1C800, 0x1CC00},
  502. {0x1CE00, 0x1CE04},
  503. {0x1CF80, 0x1CF84},
  504. {0x1D200, 0x1D800},
  505. {0x1E000, 0x20014},
  506. {0x20100, 0x20124},
  507. {0x21400, 0x217A8},
  508. {0x21800, 0x21BA8},
  509. {0x21C00, 0x21FA8},
  510. {0x22000, 0x223A8},
  511. {0x22400, 0x227A8},
  512. {0x22800, 0x22BA8},
  513. {0x22C00, 0x22FA8},
  514. {0x23000, 0x233A8},
  515. {0x24000, 0x24034},
  516. {0x26000, 0x26064},
  517. {0x27000, 0x27024},
  518. {0x34000, 0x3400C},
  519. {0x34400, 0x3445C},
  520. {0x34800, 0x3485C},
  521. {0x34C00, 0x34C5C},
  522. {0x35000, 0x3505C},
  523. {0x35400, 0x3545C},
  524. {0x35800, 0x3585C},
  525. {0x35C00, 0x35C5C},
  526. {0x36000, 0x3605C},
  527. {0x38000, 0x38064},
  528. {0x38070, 0x380E0},
  529. {0x3A000, 0x3A074},
  530. {0x40000, 0x400A4},
  531. {0x80000, 0x8000C},
  532. {0x80010, 0x80020},
  533. };
  534. static const struct ath10k_mem_region qca6174_hw10_mem_regions[] = {
  535. {
  536. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  537. .start = 0x400000,
  538. .len = 0x70000,
  539. .name = "DRAM",
  540. .section_table = {
  541. .sections = NULL,
  542. .size = 0,
  543. },
  544. },
  545. {
  546. .type = ATH10K_MEM_REGION_TYPE_REG,
  547. /* RTC_SOC_BASE_ADDRESS */
  548. .start = 0x0,
  549. /* WLAN_MBOX_BASE_ADDRESS - RTC_SOC_BASE_ADDRESS */
  550. .len = 0x800 - 0x0,
  551. .name = "REG_PART1",
  552. .section_table = {
  553. .sections = NULL,
  554. .size = 0,
  555. },
  556. },
  557. {
  558. .type = ATH10K_MEM_REGION_TYPE_REG,
  559. /* STEREO_BASE_ADDRESS */
  560. .start = 0x27000,
  561. /* USB_BASE_ADDRESS - STEREO_BASE_ADDRESS */
  562. .len = 0x60000 - 0x27000,
  563. .name = "REG_PART2",
  564. .section_table = {
  565. .sections = NULL,
  566. .size = 0,
  567. },
  568. },
  569. };
  570. static const struct ath10k_mem_region qca6174_hw21_mem_regions[] = {
  571. {
  572. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  573. .start = 0x400000,
  574. .len = 0x70000,
  575. .name = "DRAM",
  576. .section_table = {
  577. .sections = NULL,
  578. .size = 0,
  579. },
  580. },
  581. {
  582. .type = ATH10K_MEM_REGION_TYPE_AXI,
  583. .start = 0xa0000,
  584. .len = 0x18000,
  585. .name = "AXI",
  586. .section_table = {
  587. .sections = NULL,
  588. .size = 0,
  589. },
  590. },
  591. {
  592. .type = ATH10K_MEM_REGION_TYPE_REG,
  593. .start = 0x800,
  594. .len = 0x80020 - 0x800,
  595. .name = "REG_TOTAL",
  596. .section_table = {
  597. .sections = qca6174_hw21_register_sections,
  598. .size = ARRAY_SIZE(qca6174_hw21_register_sections),
  599. },
  600. },
  601. };
  602. static const struct ath10k_mem_region qca6174_hw30_mem_regions[] = {
  603. {
  604. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  605. .start = 0x400000,
  606. .len = 0xa8000,
  607. .name = "DRAM",
  608. .section_table = {
  609. .sections = NULL,
  610. .size = 0,
  611. },
  612. },
  613. {
  614. .type = ATH10K_MEM_REGION_TYPE_AXI,
  615. .start = 0xa0000,
  616. .len = 0x18000,
  617. .name = "AXI",
  618. .section_table = {
  619. .sections = NULL,
  620. .size = 0,
  621. },
  622. },
  623. {
  624. .type = ATH10K_MEM_REGION_TYPE_REG,
  625. .start = 0x800,
  626. .len = 0x80020 - 0x800,
  627. .name = "REG_TOTAL",
  628. .section_table = {
  629. .sections = qca6174_hw30_register_sections,
  630. .size = ARRAY_SIZE(qca6174_hw30_register_sections),
  631. },
  632. },
  633. /* IRAM dump must be put last */
  634. {
  635. .type = ATH10K_MEM_REGION_TYPE_IRAM1,
  636. .start = 0x00980000,
  637. .len = 0x00080000,
  638. .name = "IRAM1",
  639. .section_table = {
  640. .sections = NULL,
  641. .size = 0,
  642. },
  643. },
  644. {
  645. .type = ATH10K_MEM_REGION_TYPE_IRAM2,
  646. .start = 0x00a00000,
  647. .len = 0x00040000,
  648. .name = "IRAM2",
  649. .section_table = {
  650. .sections = NULL,
  651. .size = 0,
  652. },
  653. },
  654. };
  655. static const struct ath10k_mem_region qca988x_hw20_mem_regions[] = {
  656. {
  657. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  658. .start = 0x400000,
  659. .len = 0x50000,
  660. .name = "DRAM",
  661. .section_table = {
  662. .sections = NULL,
  663. .size = 0,
  664. },
  665. },
  666. {
  667. .type = ATH10K_MEM_REGION_TYPE_REG,
  668. .start = 0x4000,
  669. .len = 0x2000,
  670. .name = "REG_PART1",
  671. .section_table = {
  672. .sections = NULL,
  673. .size = 0,
  674. },
  675. },
  676. {
  677. .type = ATH10K_MEM_REGION_TYPE_REG,
  678. .start = 0x8000,
  679. .len = 0x58000,
  680. .name = "REG_PART2",
  681. .section_table = {
  682. .sections = NULL,
  683. .size = 0,
  684. },
  685. },
  686. };
  687. static const struct ath10k_mem_region qca99x0_hw20_mem_regions[] = {
  688. {
  689. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  690. .start = 0x400000,
  691. .len = 0x60000,
  692. .name = "DRAM",
  693. .section_table = {
  694. .sections = NULL,
  695. .size = 0,
  696. },
  697. },
  698. {
  699. .type = ATH10K_MEM_REGION_TYPE_REG,
  700. .start = 0x98000,
  701. .len = 0x50000,
  702. .name = "IRAM",
  703. .section_table = {
  704. .sections = NULL,
  705. .size = 0,
  706. },
  707. },
  708. {
  709. .type = ATH10K_MEM_REGION_TYPE_IOSRAM,
  710. .start = 0xC0000,
  711. .len = 0x40000,
  712. .name = "SRAM",
  713. .section_table = {
  714. .sections = NULL,
  715. .size = 0,
  716. },
  717. },
  718. {
  719. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  720. .start = 0x30000,
  721. .len = 0x7000,
  722. .name = "APB REG 1",
  723. .section_table = {
  724. .sections = NULL,
  725. .size = 0,
  726. },
  727. },
  728. {
  729. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  730. .start = 0x3f000,
  731. .len = 0x3000,
  732. .name = "APB REG 2",
  733. .section_table = {
  734. .sections = NULL,
  735. .size = 0,
  736. },
  737. },
  738. {
  739. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  740. .start = 0x43000,
  741. .len = 0x3000,
  742. .name = "WIFI REG",
  743. .section_table = {
  744. .sections = NULL,
  745. .size = 0,
  746. },
  747. },
  748. {
  749. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  750. .start = 0x4A000,
  751. .len = 0x5000,
  752. .name = "CE REG",
  753. .section_table = {
  754. .sections = NULL,
  755. .size = 0,
  756. },
  757. },
  758. {
  759. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  760. .start = 0x80000,
  761. .len = 0x6000,
  762. .name = "SOC REG",
  763. .section_table = {
  764. .sections = NULL,
  765. .size = 0,
  766. },
  767. },
  768. };
  769. static const struct ath10k_mem_region qca9984_hw10_mem_regions[] = {
  770. {
  771. .type = ATH10K_MEM_REGION_TYPE_DRAM,
  772. .start = 0x400000,
  773. .len = 0x80000,
  774. .name = "DRAM",
  775. .section_table = {
  776. .sections = NULL,
  777. .size = 0,
  778. },
  779. },
  780. {
  781. .type = ATH10K_MEM_REGION_TYPE_REG,
  782. .start = 0x98000,
  783. .len = 0x50000,
  784. .name = "IRAM",
  785. .section_table = {
  786. .sections = NULL,
  787. .size = 0,
  788. },
  789. },
  790. {
  791. .type = ATH10K_MEM_REGION_TYPE_IOSRAM,
  792. .start = 0xC0000,
  793. .len = 0x40000,
  794. .name = "SRAM",
  795. .section_table = {
  796. .sections = NULL,
  797. .size = 0,
  798. },
  799. },
  800. {
  801. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  802. .start = 0x30000,
  803. .len = 0x7000,
  804. .name = "APB REG 1",
  805. .section_table = {
  806. .sections = NULL,
  807. .size = 0,
  808. },
  809. },
  810. {
  811. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  812. .start = 0x3f000,
  813. .len = 0x3000,
  814. .name = "APB REG 2",
  815. .section_table = {
  816. .sections = NULL,
  817. .size = 0,
  818. },
  819. },
  820. {
  821. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  822. .start = 0x43000,
  823. .len = 0x3000,
  824. .name = "WIFI REG",
  825. .section_table = {
  826. .sections = NULL,
  827. .size = 0,
  828. },
  829. },
  830. {
  831. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  832. .start = 0x4A000,
  833. .len = 0x5000,
  834. .name = "CE REG",
  835. .section_table = {
  836. .sections = NULL,
  837. .size = 0,
  838. },
  839. },
  840. {
  841. .type = ATH10K_MEM_REGION_TYPE_IOREG,
  842. .start = 0x80000,
  843. .len = 0x6000,
  844. .name = "SOC REG",
  845. .section_table = {
  846. .sections = NULL,
  847. .size = 0,
  848. },
  849. },
  850. };
  851. static const struct ath10k_hw_mem_layout hw_mem_layouts[] = {
  852. {
  853. .hw_id = QCA6174_HW_1_0_VERSION,
  854. .region_table = {
  855. .regions = qca6174_hw10_mem_regions,
  856. .size = ARRAY_SIZE(qca6174_hw10_mem_regions),
  857. },
  858. },
  859. {
  860. .hw_id = QCA6174_HW_1_1_VERSION,
  861. .region_table = {
  862. .regions = qca6174_hw10_mem_regions,
  863. .size = ARRAY_SIZE(qca6174_hw10_mem_regions),
  864. },
  865. },
  866. {
  867. .hw_id = QCA6174_HW_1_3_VERSION,
  868. .region_table = {
  869. .regions = qca6174_hw10_mem_regions,
  870. .size = ARRAY_SIZE(qca6174_hw10_mem_regions),
  871. },
  872. },
  873. {
  874. .hw_id = QCA6174_HW_2_1_VERSION,
  875. .region_table = {
  876. .regions = qca6174_hw21_mem_regions,
  877. .size = ARRAY_SIZE(qca6174_hw21_mem_regions),
  878. },
  879. },
  880. {
  881. .hw_id = QCA6174_HW_3_0_VERSION,
  882. .region_table = {
  883. .regions = qca6174_hw30_mem_regions,
  884. .size = ARRAY_SIZE(qca6174_hw30_mem_regions),
  885. },
  886. },
  887. {
  888. .hw_id = QCA6174_HW_3_2_VERSION,
  889. .region_table = {
  890. .regions = qca6174_hw30_mem_regions,
  891. .size = ARRAY_SIZE(qca6174_hw30_mem_regions),
  892. },
  893. },
  894. {
  895. .hw_id = QCA9377_HW_1_1_DEV_VERSION,
  896. .region_table = {
  897. .regions = qca6174_hw30_mem_regions,
  898. .size = ARRAY_SIZE(qca6174_hw30_mem_regions),
  899. },
  900. },
  901. {
  902. .hw_id = QCA988X_HW_2_0_VERSION,
  903. .region_table = {
  904. .regions = qca988x_hw20_mem_regions,
  905. .size = ARRAY_SIZE(qca988x_hw20_mem_regions),
  906. },
  907. },
  908. {
  909. .hw_id = QCA9984_HW_1_0_DEV_VERSION,
  910. .region_table = {
  911. .regions = qca9984_hw10_mem_regions,
  912. .size = ARRAY_SIZE(qca9984_hw10_mem_regions),
  913. },
  914. },
  915. {
  916. .hw_id = QCA9888_HW_2_0_DEV_VERSION,
  917. .region_table = {
  918. .regions = qca9984_hw10_mem_regions,
  919. .size = ARRAY_SIZE(qca9984_hw10_mem_regions),
  920. },
  921. },
  922. {
  923. .hw_id = QCA99X0_HW_2_0_DEV_VERSION,
  924. .region_table = {
  925. .regions = qca99x0_hw20_mem_regions,
  926. .size = ARRAY_SIZE(qca99x0_hw20_mem_regions),
  927. },
  928. },
  929. };
  930. static u32 ath10k_coredump_get_ramdump_size(struct ath10k *ar)
  931. {
  932. const struct ath10k_hw_mem_layout *hw;
  933. const struct ath10k_mem_region *mem_region;
  934. size_t size = 0;
  935. int i;
  936. hw = ath10k_coredump_get_mem_layout(ar);
  937. if (!hw)
  938. return 0;
  939. mem_region = &hw->region_table.regions[0];
  940. for (i = 0; i < hw->region_table.size; i++) {
  941. size += mem_region->len;
  942. mem_region++;
  943. }
  944. /* reserve space for the headers */
  945. size += hw->region_table.size * sizeof(struct ath10k_dump_ram_data_hdr);
  946. /* make sure it is aligned 16 bytes for debug message print out */
  947. size = ALIGN(size, 16);
  948. return size;
  949. }
  950. const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k *ar)
  951. {
  952. int i;
  953. if (!test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask))
  954. return NULL;
  955. if (WARN_ON(ar->target_version == 0))
  956. return NULL;
  957. for (i = 0; i < ARRAY_SIZE(hw_mem_layouts); i++) {
  958. if (ar->target_version == hw_mem_layouts[i].hw_id)
  959. return &hw_mem_layouts[i];
  960. }
  961. return NULL;
  962. }
  963. EXPORT_SYMBOL(ath10k_coredump_get_mem_layout);
  964. struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar)
  965. {
  966. struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;
  967. lockdep_assert_held(&ar->data_lock);
  968. if (ath10k_coredump_mask == 0)
  969. /* coredump disabled */
  970. return NULL;
  971. guid_gen(&crash_data->guid);
  972. ktime_get_real_ts64(&crash_data->timestamp);
  973. return crash_data;
  974. }
  975. EXPORT_SYMBOL(ath10k_coredump_new);
  976. static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
  977. {
  978. struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;
  979. struct ath10k_ce_crash_hdr *ce_hdr;
  980. struct ath10k_dump_file_data *dump_data;
  981. struct ath10k_tlv_dump_data *dump_tlv;
  982. size_t hdr_len = sizeof(*dump_data);
  983. size_t len, sofar = 0;
  984. unsigned char *buf;
  985. len = hdr_len;
  986. if (test_bit(ATH10K_FW_CRASH_DUMP_REGISTERS, &ath10k_coredump_mask))
  987. len += sizeof(*dump_tlv) + sizeof(crash_data->registers);
  988. if (test_bit(ATH10K_FW_CRASH_DUMP_CE_DATA, &ath10k_coredump_mask))
  989. len += sizeof(*dump_tlv) + sizeof(*ce_hdr) +
  990. CE_COUNT * sizeof(ce_hdr->entries[0]);
  991. if (test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask))
  992. len += sizeof(*dump_tlv) + crash_data->ramdump_buf_len;
  993. sofar += hdr_len;
  994. /* This is going to get big when we start dumping FW RAM and such,
  995. * so go ahead and use vmalloc.
  996. */
  997. buf = vzalloc(len);
  998. if (!buf)
  999. return NULL;
  1000. spin_lock_bh(&ar->data_lock);
  1001. dump_data = (struct ath10k_dump_file_data *)(buf);
  1002. strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP",
  1003. sizeof(dump_data->df_magic));
  1004. dump_data->len = cpu_to_le32(len);
  1005. dump_data->version = cpu_to_le32(ATH10K_FW_CRASH_DUMP_VERSION);
  1006. guid_copy(&dump_data->guid, &crash_data->guid);
  1007. dump_data->chip_id = cpu_to_le32(ar->chip_id);
  1008. dump_data->bus_type = cpu_to_le32(0);
  1009. dump_data->target_version = cpu_to_le32(ar->target_version);
  1010. dump_data->fw_version_major = cpu_to_le32(ar->fw_version_major);
  1011. dump_data->fw_version_minor = cpu_to_le32(ar->fw_version_minor);
  1012. dump_data->fw_version_release = cpu_to_le32(ar->fw_version_release);
  1013. dump_data->fw_version_build = cpu_to_le32(ar->fw_version_build);
  1014. dump_data->phy_capability = cpu_to_le32(ar->phy_capability);
  1015. dump_data->hw_min_tx_power = cpu_to_le32(ar->hw_min_tx_power);
  1016. dump_data->hw_max_tx_power = cpu_to_le32(ar->hw_max_tx_power);
  1017. dump_data->ht_cap_info = cpu_to_le32(ar->ht_cap_info);
  1018. dump_data->vht_cap_info = cpu_to_le32(ar->vht_cap_info);
  1019. dump_data->num_rf_chains = cpu_to_le32(ar->num_rf_chains);
  1020. strlcpy(dump_data->fw_ver, ar->hw->wiphy->fw_version,
  1021. sizeof(dump_data->fw_ver));
  1022. dump_data->kernel_ver_code = 0;
  1023. strlcpy(dump_data->kernel_ver, init_utsname()->release,
  1024. sizeof(dump_data->kernel_ver));
  1025. dump_data->tv_sec = cpu_to_le64(crash_data->timestamp.tv_sec);
  1026. dump_data->tv_nsec = cpu_to_le64(crash_data->timestamp.tv_nsec);
  1027. if (test_bit(ATH10K_FW_CRASH_DUMP_REGISTERS, &ath10k_coredump_mask)) {
  1028. dump_tlv = (struct ath10k_tlv_dump_data *)(buf + sofar);
  1029. dump_tlv->type = cpu_to_le32(ATH10K_FW_CRASH_DUMP_REGISTERS);
  1030. dump_tlv->tlv_len = cpu_to_le32(sizeof(crash_data->registers));
  1031. memcpy(dump_tlv->tlv_data, &crash_data->registers,
  1032. sizeof(crash_data->registers));
  1033. sofar += sizeof(*dump_tlv) + sizeof(crash_data->registers);
  1034. }
  1035. if (test_bit(ATH10K_FW_CRASH_DUMP_CE_DATA, &ath10k_coredump_mask)) {
  1036. dump_tlv = (struct ath10k_tlv_dump_data *)(buf + sofar);
  1037. dump_tlv->type = cpu_to_le32(ATH10K_FW_CRASH_DUMP_CE_DATA);
  1038. dump_tlv->tlv_len = cpu_to_le32(sizeof(*ce_hdr) +
  1039. CE_COUNT * sizeof(ce_hdr->entries[0]));
  1040. ce_hdr = (struct ath10k_ce_crash_hdr *)(dump_tlv->tlv_data);
  1041. ce_hdr->ce_count = cpu_to_le32(CE_COUNT);
  1042. memset(ce_hdr->reserved, 0, sizeof(ce_hdr->reserved));
  1043. memcpy(ce_hdr->entries, crash_data->ce_crash_data,
  1044. CE_COUNT * sizeof(ce_hdr->entries[0]));
  1045. sofar += sizeof(*dump_tlv) + sizeof(*ce_hdr) +
  1046. CE_COUNT * sizeof(ce_hdr->entries[0]);
  1047. }
  1048. /* Gather ram dump */
  1049. if (test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask)) {
  1050. dump_tlv = (struct ath10k_tlv_dump_data *)(buf + sofar);
  1051. dump_tlv->type = cpu_to_le32(ATH10K_FW_CRASH_DUMP_RAM_DATA);
  1052. dump_tlv->tlv_len = cpu_to_le32(crash_data->ramdump_buf_len);
  1053. memcpy(dump_tlv->tlv_data, crash_data->ramdump_buf,
  1054. crash_data->ramdump_buf_len);
  1055. sofar += sizeof(*dump_tlv) + crash_data->ramdump_buf_len;
  1056. }
  1057. spin_unlock_bh(&ar->data_lock);
  1058. return dump_data;
  1059. }
  1060. int ath10k_coredump_submit(struct ath10k *ar)
  1061. {
  1062. struct ath10k_dump_file_data *dump;
  1063. if (ath10k_coredump_mask == 0)
  1064. /* coredump disabled */
  1065. return 0;
  1066. dump = ath10k_coredump_build(ar);
  1067. if (!dump) {
  1068. ath10k_warn(ar, "no crash dump data found for devcoredump");
  1069. return -ENODATA;
  1070. }
  1071. dev_coredumpv(ar->dev, dump, le32_to_cpu(dump->len), GFP_KERNEL);
  1072. return 0;
  1073. }
  1074. int ath10k_coredump_create(struct ath10k *ar)
  1075. {
  1076. if (ath10k_coredump_mask == 0)
  1077. /* coredump disabled */
  1078. return 0;
  1079. ar->coredump.fw_crash_data = vzalloc(sizeof(*ar->coredump.fw_crash_data));
  1080. if (!ar->coredump.fw_crash_data)
  1081. return -ENOMEM;
  1082. return 0;
  1083. }
  1084. int ath10k_coredump_register(struct ath10k *ar)
  1085. {
  1086. struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;
  1087. if (test_bit(ATH10K_FW_CRASH_DUMP_RAM_DATA, &ath10k_coredump_mask)) {
  1088. crash_data->ramdump_buf_len = ath10k_coredump_get_ramdump_size(ar);
  1089. crash_data->ramdump_buf = vzalloc(crash_data->ramdump_buf_len);
  1090. if (!crash_data->ramdump_buf)
  1091. return -ENOMEM;
  1092. }
  1093. return 0;
  1094. }
  1095. void ath10k_coredump_unregister(struct ath10k *ar)
  1096. {
  1097. struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;
  1098. vfree(crash_data->ramdump_buf);
  1099. }
  1100. void ath10k_coredump_destroy(struct ath10k *ar)
  1101. {
  1102. if (ar->coredump.fw_crash_data->ramdump_buf) {
  1103. vfree(ar->coredump.fw_crash_data->ramdump_buf);
  1104. ar->coredump.fw_crash_data->ramdump_buf = NULL;
  1105. ar->coredump.fw_crash_data->ramdump_buf_len = 0;
  1106. }
  1107. vfree(ar->coredump.fw_crash_data);
  1108. ar->coredump.fw_crash_data = NULL;
  1109. }