Fixed high scan time in link layer stats

Analysis:
1. In case of FW, scan stats are saved for each core. DHD can get scan stats through pwrstats iovar, but it can only get the stats for the associated core, not the stats for each core. And DHD can know the current Core of fw through chanspec. In the existing case, if the core for scan stats is continuously different, prev_scan_time can freezes. Because of this, delta between scan_times can be a negative value. So scan time may be high.
2. When STA connected to 5G AP and disassociated, the pwrstats iovar provides scan stats for the main core, but chanspec is set to 0x1 and then DHD aware that the scan stats are for the aux core. In this case, the stats of the main core is accumulated once more due to the core mismatch.

Solution:
1. Manage scan stats by core in DHD.
2. Get the slice index along with the scan stats through pwrstats iovar.
3. Only scan stats for the current core are updated, and stats for other cores are maintained.
4. Update the scan stats for each core to the sum of the values. By doing this, the delta between scan_times has a positive value.

Bug: 198227079
Test: Validated with Slider
Change-Id: I7b48873b8837b1eb5fb76a894509c184dbf37ce3
Signed-off-by: Roger Wang <wangroger@google.com>
2 files changed
tree: 44dfcda7141683746de2107afd264395dc5eb4f5
  1. document/
  2. include/
  3. aiutils.c
  4. bcm_app_utils.c
  5. bcm_l2_filter.c
  6. bcmbloom.c
  7. bcmevent.c
  8. bcmsdh.c
  9. bcmsdh_linux.c
  10. bcmsdh_sdmmc.c
  11. bcmsdh_sdmmc_linux.c
  12. bcmsdspi.h
  13. bcmsdspi_linux.c
  14. bcmsdstd.h
  15. bcmspibrcm.c
  16. bcmstdlib_s.c
  17. bcmutils.c
  18. bcmwifi_channels.c
  19. bcmxtlv.c
  20. dhd.h
  21. dhd_bitpack.h
  22. dhd_bus.h
  23. dhd_buzzz.h
  24. dhd_cdc.c
  25. dhd_cfg80211.c
  26. dhd_cfg80211.h
  27. dhd_common.c
  28. dhd_custom_cis.c
  29. dhd_custom_google.c
  30. dhd_custom_gpio.c
  31. dhd_custom_memprealloc.c
  32. dhd_custom_msm.c
  33. dhd_dbg.h
  34. dhd_dbg_ring.c
  35. dhd_dbg_ring.h
  36. dhd_debug.c
  37. dhd_debug.h
  38. dhd_debug_linux.c
  39. dhd_event_log_filter.c
  40. dhd_event_log_filter.h
  41. dhd_flowring.c
  42. dhd_flowring.h
  43. dhd_ip.c
  44. dhd_ip.h
  45. dhd_linux.c
  46. dhd_linux.h
  47. dhd_linux_exportfs.c
  48. dhd_linux_lb.c
  49. dhd_linux_pktdump.c
  50. dhd_linux_pktdump.h
  51. dhd_linux_platdev.c
  52. dhd_linux_priv.h
  53. dhd_linux_rx.c
  54. dhd_linux_sched.c
  55. dhd_linux_sock_qos.h
  56. dhd_linux_tx.c
  57. dhd_linux_tx.h
  58. dhd_linux_wq.c
  59. dhd_linux_wq.h
  60. dhd_log_dump.c
  61. dhd_log_dump.h
  62. dhd_mschdbg.c
  63. dhd_mschdbg.h
  64. dhd_msgbuf.c
  65. dhd_pcie.c
  66. dhd_pcie.h
  67. dhd_pcie_linux.c
  68. dhd_pktlog.c
  69. dhd_pktlog.h
  70. dhd_plat.h
  71. dhd_pno.c
  72. dhd_pno.h
  73. dhd_proto.h
  74. dhd_rtt.c
  75. dhd_rtt.h
  76. dhd_sdio.c
  77. dhd_statlog.c
  78. dhd_statlog.h
  79. dhd_wlfc.c
  80. dhd_wlfc.h
  81. frag.c
  82. frag.h
  83. fwpkg_utils.c
  84. hnd_pktpool.c
  85. hnd_pktq.c
  86. hndlhl.c
  87. hndmem.c
  88. hndpmu.c
  89. Kbuild
  90. Kconfig
  91. linux_osl.c
  92. linux_osl_priv.h
  93. linux_pkt.c
  94. Makefile
  95. pcie_core.c
  96. sbutils.c
  97. siutils.c
  98. siutils_priv.h
  99. wb_regon_coordinator.c
  100. wifi_stats.h
  101. wl_android.c
  102. wl_android.h
  103. wl_cfg80211.c
  104. wl_cfg80211.h
  105. wl_cfg_btcoex.c
  106. wl_cfg_cellavoid.c
  107. wl_cfg_cellavoid.h
  108. wl_cfgnan.c
  109. wl_cfgnan.h
  110. wl_cfgp2p.c
  111. wl_cfgp2p.h
  112. wl_cfgscan.c
  113. wl_cfgscan.h
  114. wl_cfgvendor.c
  115. wl_cfgvendor.h
  116. wl_cfgvif.c
  117. wl_cfgvif.h
  118. wl_linux_mon.c
  119. wl_roam.c
  120. wldev_common.c