[WCNCR00158507] misc: add noise histogram feature

[Description]
Add noise histogram feature, needs the corresponding firmware

Usage:
1. Start collection (Disable power saving)
iwpriv wlan0 driver "SET_CHIP KeepFullPwr 1"
iwpriv wlan0 driver "noise_histogram enable"
iwpriv wlan0 driver "noise_histogram get"

2. Reset noise histogram to 0 (Optional)
iwpriv wlan0 driver "noise_histogram reset"

3. Stop collection  (Enable saving mode)
iwpriv wlan0 driver "noise_histogram disable"
iwpriv wlan0 driver "SET_CHIP KeepFullPwr 0"

4. Noise histogram format
keira: # iwpriv wlan0 driver "noise_histogram get"
wlan0     driver:
       Power > -55:          0
-55 >= Power > -60:          1
-60 >= Power > -65:         79
-65 >= Power > -70:       8874
-70 >= Power > -75:      11736
-75 >= Power > -80:       1863
-80 >= Power > -83:       1613
-83 >= Power > -86:      12429
-86 >= Power > -89:       8874
-89 >= Power > -92:       3987
-92 >= Power      :     249502

5. Works when AP is not connected

Test:
1. Sanity check: WiFi scan/connection OK
2. If not use the corresponding firmware,
   "noise_histogram get" will show 1 time command timeout log.
   This is expected due to no corresponding event in old firmware.

Change-Id: I1783f066768b34ffb8130d93dd53d66d0743a039
CR-Id: WCNCR00158507
Feature: misc
Signed-off-by: ZD Hu <zd.hu@mediatek.com>
(cherry picked from commit fa350821cf7f567f26be41d7aed7adf927f00df4)
3 files changed