Commit Graph

1831 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
4260dcf3f8 qcacmn: Invoke correct api to convert channel to frequency
Currently wifi update channel bw api is using legacy api
wlan reg get chan freq to convert channel numbers to the
frequency which does not take care of the bonded channels
and returns invalid channel number error code for bonded
channels which results in undefined behavior on the user
space application which is using the result of this api.

To address above issue, use the correct api to convert
channel number to frequency.

Change-Id: I80295b0ff502747d5655642f2506283bd3ba0b52
CRs-fixed: 2547546
2019-10-23 14:29:52 -07:00
Priyadarshnee S
70e1b6f859 qcacmn: Add frequency APIs in DFS Dispatcher
To avoid "channel number" space collision with the introduction of
6GHZ frequency band, add frequency based APIs in DFS dispatcher.

Change-Id: I349093e134b04ee31d046eb4da108522bc74a51a
CRs-Fixed: 2526372
2019-10-23 05:34:53 -07:00
Rhythm Patwa
25a0e88964 qcacmn: Add FD Tx & Rx ops to offload FD frame
Add Tx and Rx ops to offload the FD frame template to FW

Change-Id: Ibb16196494e3362fa48b3d1eae377df730dadcde
CRs-fixed: 2538058
2019-10-22 21:39:31 -07:00
Manikandan Mohan
d09f45e40f qcacmn: Update for policy manager frequency based APIs
Due to channel number ambiguity with introduction of 6Ghz operation
policy manager APIs are updated to use frequency values instead
of channel number. Update corresponding caller functions to
adapt for frequency usage.

Change-Id: Icf76480cdd0fbd98d9b5f559d9bfdc5d5a35dc7b
CRs-fixed: 2550098
2019-10-22 18:10:18 -07:00
Manikandan Mohan
0f13d10c75 qcacmn: Update for policy manager frequency based APIs
Due to channel number ambiguity with introduction of 6Ghz operation
policy manager APIs are updated to use frequency values instead
of channel number. Update corresponding caller functions to
adapt for frequency usage.

Change-Id: I6c7566e1d99671a4324bd739ab8d26595d88956d
CRs-fixed: 2545125
2019-10-22 18:10:05 -07:00
Gururaj Pandurangi
42a72318f0 qcacmn: Fix possible out of bound access
In reg_set_5g_channel_params if the input channel bandwidth
is 5MHz then while getting the next lower bandwidth out of
bound access occurs.
Fix out of bound access in getting next lower bandwidth value.

Change-Id: I309909661f0357d482387e92353024400a042295
CRs-Fixed: 2525496
2019-10-22 10:57:37 -07:00
Manikandan Mohan
ae310478dd qcacmn: Fix channel conversion utility functions
Update wlan_chan_to_freq and wlan_freq_to_chan utility functions to
handle invalid channel number and freq value of 0 respectively.

Change-Id: I92e2d5026bb93439b77b749d447654ceb9413fde
CRs-fixed: 2546771
2019-10-19 22:11:54 -07:00
Vignesh U
4898b2aa3c qcacmn: Introduce dfs_prevchan and use it to assess if CAC is required
The decision to do CAC when a vap is coming up should be taken based on
the previous channel and current channel. Introduce previous channel
in DFS structure and update it when the current channel is updated.

Use the previous channel and current channel in DFS structure to
decide whether the CAC should be done or not when the vap is coming
up.

Change-Id: Ia359025d5029713c32696dacee5b89618a1c9707
CRs-Fixed: 2538653
2019-10-19 10:58:59 -07:00
Ashish Kumar Dhanotiya
75ccbd439c qcacmn: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: I33e31fa124cedfab31dd1827721a420ad6cdba07
CRs-Fixed: 2519512
2019-10-18 02:55:39 -07:00
Rhythm Patwa
c5068e341f qcacmn: Add support to offload FILS Discovery to FW
Construct the FILS Discovery frame template and send
template to FW.

Change-Id: I1052b9b8240ea9461e19bb70887b49aabffc4e05
2019-10-16 21:54:34 -07:00
Rhythm Patwa
7232cb187e qcacmn: Add support to parse 6GHz specific IEs
Add support to scan for the 6GHz band capabilities
IE and parse the IE. Added peer assoc param for updating
the minimum data rate advertised by the peer in 6GHz
Opration information.

Change-Id: Iebb4379d321832f3ed2bcd3174a54843fa2d497c
2019-10-16 21:54:30 -07:00
Vivek
4ad877f928 qcacmn: Print vdev, pdev and psoc info before being destroyed
Add debug code to print the vdev, pdev and psoc info before getting
destroyed. This will help in cases where we dont get crash dumps
for panics and we need to look up few important data, which
can be done by enable object manager debug.

Change-Id: Iab1895d348ccf225ee6390abef26b76936fbe560
CRs-Fixed: 2528290
2019-10-14 20:39:24 -07:00
Tushnim Bhattacharyya
d0221258e5 qcacmn: Reduce log level in 6Ghz regulatory API
Reduce log level in reg_is_6ghz_psc_chan_freq.

Change-Id: If451c702cbbf7ef559bd486ac8dbd6095a74ea58
CRs-Fixed: 2544230
2019-10-14 15:56:22 -07:00
Rajeev Kumar Sirasanagandla
816b503c44 qcacmn: Ignore regulatory offload indication from FW
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.

Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
2019-10-12 19:03:56 -07:00
Abhishek Singh
f3f9797014 qcacmn: Fix enum wlan_phymode to include proper phymode value
Few phymode are missing from enum wlan_phymode and many are not
valid phymode, e.g for 5ghz 40minus and 40plus are not valid.

So add the missing enums and remove invalid enums from enum
wlan_phymode.

Change-Id: Id6a1fb4cf0d629cc410bd262a048b5050d05ed5d
CRs-fixed: 2505422
2019-10-12 13:10:32 -07:00
Aditya Sathish
fbf9ece75d qcacmn: Rename TX_DECAP_TYPE to TX_ENCAP_TYPE
The macros attributing the Tx encap type have been erroneously
named as TX decap.

Rename all occurences of TX_DECAP_* to TX_ENCAP_*. Also add support
to send WMI vdev params for tx_encap and rx_decap values.

CRs-Fixed: 2533710
Change-Id: Id6ef2955868010b264e76d2a416d22d30d2acedc
2019-10-10 22:59:18 -07:00
Rakesh Pillai
01b9b680fc qcacmn: Avoid REO destination change when IPA enabled in P2P mode
In cases where one of the interfaces is a P2P-GO and
IPA has been enabled, the P2P connection establishment
fails.

When IPA is enabled, the REO destination is changed to REO4
which can be reaped only by IPA module. But in case of P2P-GO
interface in operation, this change in configuration causes
all the RX packets to be stalled due to incorrect REO configuration.

Hence, to avoid this case, do not change the REO dest config
when the interface subtype is P2P.

CRs-Fixed: 2498315
Change-Id: Ie9f01c3b353c7c0503e1541d6c79c2f47c9782f3
2019-10-10 13:43:37 -07:00
Vignesh Mohan
b07c34cc2d qcacmn: Remove redundant ETSI preCAC APIs
As part of the ETSI preCAC feature, every 20MHz channel that is CACed
and not in NOL is maintained in a list which is then checked during every
channel switch for CAC reuse (avoiding CAC).

With the introduction of preCAC list(Binary Search Forest) for
20, 40 and 80MHz channels which also includes the current channel CAC
information, the ETSI preCAC list has become redundant.

Remove all APIs and changes that support the redundant ETSI preCAC list.

Change-Id: Ie71e2fda3f6f62ec6ea312c3bf0bdfc53a7df003
CRs-Fixed: 2484864
2019-10-10 00:51:50 -07:00
Liangwei Dong
dcab2f8924 qcacmn: Set DFS channel to radar component
vdev_mgr_start_param_update will handle STA and
AP mode in vdev start. So, we need to check and
only set DFS AP's channel to Radar component by
tgt_dfs_set_current_channel. Thist will avoid
seting incorrect channel to Radar component
in STA+AP(DFS) or AP(2.4G)+AP(5G DFS) concurrency
case.

Change-Id: If60e1630c5288884d01242a20d68b2cd315942ca
CRs-Fixed: 2531766
2019-10-09 14:45:20 -07:00
Amar Singhal
db7271fbd4 qcacmn: Remove default pdev id from regulatory component
Default pdev id is redundant now. Therefore remove def_pdev_id from
the regulatory component.

Change-Id: I383f904e373df0e7d02fb0e2d00141fcacebe82a
CRs-Fixed: 2505161
2019-10-07 14:02:23 -07:00
Amar Singhal
28374e3ff1 qcacmn: Mark SRD channels conditionally passive
--Treat SRD channels as PASSIVE if INI enable_srd_chan_in_master_mode
is 0. Add API reg_modify_chan_list_for_srd_channels for this purpose.
Mark channels as PASSIVE in both driver and kernel. Do not add this API
for WIN use-cases.
--Make default value of enable_srd_chan_in_master_mode as 1. WIN needs
default value as 1. MCC can over-ride with INI.
--When pdev is added, compute pdev current channel list only after pdev
private object is attached to the pdev. Computation of current channel
list accesses the private object via the pdev.
--When a pdev is added and deleted, set and reset def_pdev_id
correctly. Currently reset is not being done when pdev is destroyed.
--When programming current country to the firmware, do not use
def_pdev_id, since def_pdev_id can be -1. Ask for response for all phys.
Program pending reply for every phy, since the reg-domain for all phys
need to be re-programmed.
--Remove reg_reset_reg_rules when pdev is processed, after addition of
master channel list. The psoc copy of master reg rules need not be
cleaned up.

Change-Id: I5eaa457b8819d7a22d2e592d1b79fff15b364f40
CRs-Fixed: 2491045
2019-10-07 12:37:18 -07:00
Edayilliam Jayadev
454c6d7be3 qcacmn: Restrict Agile Spectral start scan in SBS mode
Ensure that at a time only one Agile Spectral scan is
happening across all the 5G pdevs in SBS mode.

CRs-Fixed: 2517522
Change-Id: If31a4451b82ce1d7d8a46bc604ca91bf4b6dac29
2019-10-06 23:54:53 -07:00
Hariharan Basuthkar
868bcbec0c qcacmn: Rectify APIs within the Regulatory component
Rectify three issues in the Regulatory APIs as follows:

1) Within the API reg_update_nol_ch_for_freq, replace the call of
reg_get_chan_enum with reg_get_chan_enum_for_freq, as
reg_update_nol_ch_for_freq is a frequency based API.

2) Change the return type of wlan_reg_get_channel_reg_power_for_freq
to uint8_t and change the datatype of its parameter, freq, from uint32_t
to uint16_t.

3) Place the API wlan_reg_chan_to_freq, under the macro
CONFIG_CHAN_NUM_API, as it uses IEEE channel number as a parameter.

Change-Id: I1bc1d767d34cd97ca971bd7e12b685a55fb9a494
CRs-Fixed: 2531183
2019-10-05 19:10:52 -07:00
Amar Singhal
0c46139fee qcacmn: Add new min and max freq APIs
Add new APIs that return minimum and maximum channel frequency,
supported by regulatory domain.

Change-Id: I878bd6f4ff8fdbe28661769033c37a000aebf582
CRs-Fixed: 2538143
2019-10-05 12:44:58 -07:00
Shiva Sankar Gajula
8e829748d9 qcacmn: Handiling FT action frames in driver
STA is unable to do roam from one AP to another AP due
to not handiling FT action frames that are received from
the STA.
So, Added changes to handle FT action frames without
dropping the FT action frames in driver.

Change-Id: I6461fe84ffb29b33636b6831e6ed046fae22e19e
2019-10-05 05:40:28 -07:00
Vignesh U
9ecadbf280 qcacmn: revert: Fix CAC during vdev restart
With the change I7d4d4fdf4a6defac8fc436b63495b51c272669af the CAC is
restarted for both VAP down-up case and VAP restart case in the same
channel. For the VAP restart in the same channel CAC should not be
restarted.

Restarting CAC for VAP down-up is handled in
I456bbee34a722f3d18c781cbcc87585cbeee5d54.

Revert I7d4d4fdf4a6defac8fc436b63495b51c272669af without merge
conflicts.

Change-Id: Icbde60be9515a7a31e06ba74158ca2126f58520c
CRs-Fixed: 2539623
2019-10-04 04:44:57 -07:00
Hariharan Basuthkar
06cb75e445 qcacmn: Make band related changes in the regulatory component
Make band related changes given below:

1. Add the API wlan_reg_chan_band_to_freq, that takes IEEE Channel Number
   and bands as input and returns the Channel center frequency.
2. Add the API wlan_reg_freq_to_band, that takes frequency as input and
   returns the corresponding band.

Change-Id: I8554f6a9c24e7508e8a551c5f318b643741f13c8
CRs-Fixed: 2523257
2019-10-03 19:23:22 -07:00
Amar Singhal
6698513b8d qcacmn: Make freq to chan and vice versa conversion more generic
Add conversion from frequency to channel, for frequency falling
within two consecutive supported channels. Use the master
channel list of the pdev for the same. Add new API
wlan_reg_legacy_chan_to_freq to convert legacy 2G and 5G channel
number to frequency. Existing API wlan_reg_chan_to_freq would be
slowly deprecated.

Change-Id: Id7e1939b9e05b78c17751d13bb0b02a891f999ad
CRs-Fixed: 2526886
2019-10-03 19:23:18 -07:00
Edayilliam Jayadev
b38cb7a8f0 qcacmn: validate user given agile center frequency
Validate user provided agile center frequency and throw
an error if it is invalid.

CRs-Fixed: 2529280
Change-Id: Ibb43dda98d29d8bc8360d1a204c67b64ca987ca6
2019-10-03 12:34:44 -07:00
Ashish Kumar Dhanotiya
39c6d8bd13 qcacmn: Use freq in cfg80211_scan instead of channel
Currently in the scan path frequencies received
in the scan request are getting converted to channel
number and again converted to frequncies.

For 6GHz support in the scan path do not convert
frequency to channel number, instead use frequncies
received in scan request to send the scan command to
FW, remove the dummy conversion from chan to freq and
freq to chan.

Change-Id: Ieab7dded0678fac54796bba3b1b210c910f6173e
CRs-fixed: 2534897
2019-10-01 06:33:04 -07:00
Hangtian Zhu
62547ed826 qcacmn: Enable configurable dfs_pri_multiplier
Enable configurable dfs_pri_multiplier. The ETSI typ2 type3 radar
detection ratio is lower than expected(>80%) while channel loading is
high(>30%). The host improvement for this are:
	1. Add configurable dfs_pri_multiplier, controlled by
	   DFS_PRI_MULTIPLIER. Default value 2, min 1, max 10.
	2. Lower adrastea ETSI type 2/3/4 radar filter rssi_threshold,
	   controlled by DFS_OVERRIDE_RF_THRESHOLD, dfs log shows that
	   QCS405 target report RSSI range [18, 45] while radar power
	   is 3 dbm. By using default rssi_threshold 24 will reject
	   many radar pulses, which leads to low detection ratio.
	3. Calculate deltapri for each searchpri based on dfs_pri_multiplier
	   in dfs_count_the_other_delay_elements(), check deltapri
	   between [1, dfs_pri_multiplier] * refpri and searchpri, if
	   the primargin is desired, mark it as matched pulse.
	4. Pick lowpri as refpri for the radar filter with
	   rf_ignore_pri_window equals to 0 while DFS_PRI_MULTIPLIER is
	   enabled. Observed original findref logic has some problems
	   which selects refpri is bigger than lowpri, which leads to
	   the lowpri pulses pri_match are set to 0, and in this case,
	   radar was not detected. Example for the issue, assume
	   rf->rf_pulseid 34 (ETSI type 2) has 7 pulses with pri:
	   1489, 2978, 2978, 2978, 1489, 2978, 1489 us in this case,
	   highscore is 4 (2978), scoreindex is 5, refpri is 2978, which
	   leads to: index 0, 4, 6 pulses with pri_match 0 in
	   dfs_count_the_other_delay_elements(). The fix is to select
	   lowpri as refpri(1489 in this case).

Change-Id: I1f3ca3298c9ab1f1e2651ad6b4a0a4810f83f8a1
CRs-Fixed: 2531811
2019-10-01 02:16:19 -07:00
Santosh Anbu
659379aeff qcacmn: Update log level of the debug message
During vdev reference release if double free is attempted for, then
the vdev references are printed. But the vdev id and the reference id
for which the reference release was attempted is not printed.

Add change to print this log, which will help in debugging vdev
reference release related issues.

Change-Id: I8c1942dc770a1dce2e25cda8c3c6aa8c056afb8e
CRs-Fixed: 2531227
2019-09-29 21:58:56 -07:00
Abhishek Singh
21116dd976 qcacmn: Fix removal of the serialization command if timer start fail
In case vdev is logically deleted the serialization active timer fails
to start because it fails to get vdev ref count. Now in this case the
cmd is not removed from the active queue and is just marked
CMD_ACTIVE_MARKED_FOR_REMOVAL because CMD_MARKED_FOR_ACTIVATION is set.

Even during pdev stop as CMD_MARKED_FOR_ACTIVATION is set the command is
not removed.

Fix is to reset CMD_MARKED_FOR_ACTIVATION flag and handle it in same way
as the activate failure case.
Also reset the timer cmd after timer start failure to avoid vdev ref count
release by WLAN_SERIALIZATION_ID even when it failed to take the ref count
in first place.

Change-Id: Ic078efa8ce4ad563087381b8c95eba91894d8a48
CRs-Fixed: 2535245
2019-09-27 02:46:53 -07:00
Sandeep Puligilla
5e0d7addc7 qcacmn: Add 6G scan dwell time parameter in scan request command
Add 6G scan active and passive dwell time parameter to scan request

Change-Id: Idf50aa23d9dd856c076b1bc3f84e2b3c0ef2b289
CRs-Fixed: 2530498
2019-09-27 00:22:08 -07:00
Himanshu Batra
591b333f00 qcacmn: Decrease log level of some expected prints
Log level of some expected prints were set to error level because
of which the prints were coming frequently.
Moving log level of these expected prints from error to debug level.

Change-Id: Ifd2672cd73db02488ce3055ca5e35d423d4f4761
CRs-Fixed: 2522164
2019-09-26 22:05:30 -07:00
Srinivas Pitla
9e37733c50 qcacmn: Increase Logical deleted object timeout value
Currently, FW has TTL of 5 sec for management frames, if a frame
is queued just before logical deletion, it takes max 5 sec to complete,
by considering other latencies, increaseing it to 8 sec.

Change-Id: I6861d9557489bcf10e60ff32d06e88be23535d48
CRs-Fixed: 2526239
2019-09-25 03:42:10 -07:00
Hariharan Basuthkar
0056730131 qcacmn: Add an API to get the channel list for bands
Add the API wlan_reg_get_band_channel_list, to get the channel list from
the current channel list based on the input bandmask provided.
The bandmask may have more than one bands as input.

Change-Id: I082a5dd6a9ddb449d64d13e636f42ad58d2de16b
CRs-Fixed: 2523254
2019-09-25 01:09:13 -07:00
Vignesh Mohan
fe0b8b48db qcacmn: Maintain FW ADFS support flags in dfs
Agile DFS support depends on the Firmware's aDFS support. This
information is propagated to the HOST in the WMI ready event as a flag.
This flag was not used by HOST before enabling agile DFS which resulted
in preCAC being enabled for the FW that does not support them.

Also, for certain chainmask configurations, aDFS should be enabled
only if the current pdev is operating in non 160 BW.
Introduce two new flags in the DFS object:
1. dfs_fw_adfs_support_160
2. dfs_fw_adfs_support_non_160

which specify FW support for ADFS for pdevs in 160 BW and non 160 BW
respectively. Make appropriate changes in is_agile_precac_enabled
check that includes fw support for the current operating bandwidth.

Also rename "dfs_agile_precac_enable" to "dfs_agile_precac_ucfg" and
"dfs_precac_enable" to dfs_legacy_precac_ucfg" in the dfs structure
to properly indicate what those booleans represent.

Change-Id: I202ead8ef109c707bfbda488064ecaa72a3f737f
CRs-Fixed: 2521654
2019-09-24 07:37:39 -07:00
Edayilliam Jayadev
76c73fd4de qcacmn: Add dispatcher API for regulatory
Add dispatcher API for reg_get_5g_bonded_channel.

CRs-Fixed: 2521557
Change-Id: Iad877e9fd8d41f4f44b3a70af938aaf5d5ffc100
2019-09-23 06:04:14 -07:00
Vignesh U
431649e97f qcacmn: Add new DFS filters to ETSI RADAR table for EN302502
Add new DFS filters to ETSI RADAR table to detect ETSI EN302502
Type 3 and Type 4 RADAR pulses.

The filters have been added per ETSI EN302502 spec
https://www.etsi.org/deliver/etsi_en/302500_302599
/302502/01.02.01_60/en_302502v010201p.pdf
Table D.3.1: DFS Test Signals simulating fixed frequency radars.

Change-Id: I4b9e93dc5069d57992c468cd4c00cb5ff77d3753
CRs-Fixed: 2505394
2019-09-23 06:03:49 -07:00
Vignesh Mohan
c9a483e5d7 qcacmn: Send the channel structure to check for ETSI preCAC
While checking if ETSI preCAC is already done on a given channel
in the API "dfs_is_etsi_precac_done", dfs_curchan is always used as
the channel to be checked. Since the API "dfs_is_cac_required" maybe
called without updating the dfs_curchan, using dfs_curchan in
function "dfs_is_etsi_precac_done" is not correct.
Use the current channel provided to the API "dfs_is_cac_required"
as input while checking for ETSI preCAC.

Change-Id: Id2bc59281e17afaa3ba7572f5a2d7bd4718a7639
CRs-Fixed: 2528023
2019-09-22 23:03:42 -07:00
Min Liu
2c14fae3d5 qcacmn: Add interface to get / set eLNA bypass
Add interface to get / set eLNA bypass from / to firmware via WMI.

Change-Id: I2ed78aece6703c18999fdfbfdfa159a2abd477a6
CRs-Fixed: 2498526
2019-09-21 02:47:10 -07:00
Bala Venkatesh
0c7b22e182 qcacmn: Do not send UAPSD command after TDLS connection
Currently as part of tdls enable link, If the peer is buff
capable or tdls uapsd is enabled in INI. UAPSD is enabled in
FW. Avoid sending this command to FW as it effects the behavior
with AP.

Change-Id: Idc023cb9de3ab63e7643815d473fe0efa98069b9
CRs-Fixed: 2528324
2019-09-19 02:02:03 -07:00
Rajeev Kumar Sirasanagandla
63b0f33c4c qcacmn: Use frequency for channel operation
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I7c7542aa8488b4c55764c733590b77c64c397029
CRs-Fixed: 2517900
2019-09-18 11:23:14 -07:00
Wu Gao
fe2a6185ad qcacmn: Support multiple srng per module in DBR
It required to support multiple srng per module in direct buffer rx
component.So extend the array "dbr_mod_param" in dbr pdev object and
let it to support two more srngs per module.

Change-Id: Ia2c649dacc3787cdc13b06f0b22c1c175fb451cc
CRs-Fixed: 2523365
2019-09-17 16:30:21 -07:00
Vivek
91dcde9050 qcacmn: Check for pdev/psoc before requesting serialization psoc object
The serialization vdev destroy handlers extracts the psoc
from the vdev, and get its psoc component object.

If the pdev or psoc is NULL for some reason, we get a
crash in object manager while trying to retrieve the serialization
psoc object.

So check for valid pdev/psoc before we get the serialization psoc object.

Change-Id: I9ca45654250403a8b5fe674431251defd1aac6e8
CRs-Fixed: 2524231
2019-09-17 03:56:23 -07:00
Vignesh U
b577fa9898 qcacmn: Change maximum duration of a Korea RADAR Filter
When the radio is in HT20 mode, the duration of Korea Type 3 RADAR is
reported by the HW as 3us although the duration is only 1us. The minimum
and maximum duration for the corresponding filter(FilterID 42) is 0us
and 2us respectively. So host will neglect the pulses with a duration of
3us. This will result in Host failing to detect the Korea Type 3 RADAR
pulses in HT20 mode.

Increase the maximum duration of the filter(FilterID 42) to 3us.

Change-Id: I45f337ec31e017c4a0c19f1afea3fc7a08af9888
CRs-Fixed: 2503942
2019-09-17 03:56:18 -07:00
Hariharan Basuthkar
7eb35947eb qcacmn: Add frequency based APIs within the regulatory component
The IEEE channel numbers in the 6GHz band overlap with the
IEEE channel numbers in 2.4GHz, 4.9GHz (e.g. Channel number 1) and 5GHz
(e.g. Channel number 149). Currently many APIs in the regulatory
component, have channel number as a parameter. This leads to the channel
number collision.

To overcome this, new APIs with channel center frequency ( in units of
megahertz or MHz) as a parameter are created, as a channel center center
frequency is unique for 2.4 GHz, 4.9 GHz, 5GHz, and 6GHz channels.

Each new API performs the same function as its old counterpart.
For example reg_set_5g_channel_params() and
reg_set_5g_channel_params_for_freq perform the same operation. The
difference in the latter, is that the channel center frequency is given
as an input parameter instead of IEEE channel number, and the function
body is modified to suit channel center frequency.

The new channel frequency based APIs are placed under the macro
"CONFIG_CHAN_FREQ_API" and the existing channel number based APIs are
placed under the macro "CONFIG_CHAN_NUM_API". The APIs under the macro
CONFIG_CHAN_NUM_API can be removed, when when all the references to
the APIs are removed.

Change-Id: I0347e8d31c25e2c3a406aafe1360c7c7b602fda2
CRs-Fixed: 2463009
2019-09-16 15:14:35 -07:00
Hariharan Basuthkar
2082a4c585 qcacmn: Remove channel_map_old and CONFIG_LEGACY_CHAN_ENUM
Remove channel_map_old and and remove the instances of
CONFIG_LEGACY_CHAN_ENUM in the dfs and regulatory component.

Change-Id: I3e30dba72c28c9c356648595ad96720ab0cd789a
CRs-Fixed: 2463009
2019-09-16 15:14:30 -07:00
Abhinav Kumar
e288a93d22 qcacmn: Documentation enhancement for wake_lock_in_user_scan
Update kernel doc for wake_lock_in_user_scan to improve
code readability.

Change-Id: I5a7a0fd8cb18d97d293e9896ed58b40a52e06e0c
CRs-Fixed: 2520906
2019-09-16 03:13:38 -07:00