Commit Graph

1831 Commits

Author SHA1 Message Date
Li Feng
106027ba1b qcacmn: Correct chan num assignment
Correct chan num assignment in utils_dfs_get_channel_list.

Change-Id: I18f09b21de80c19f8b67acfd56f394c0e9949faf
CRs-Fixed: 2584402
2019-12-16 18:21:34 -08:00
Vignesh U
49a3bbbe28 qcacmn: Add filters to the MKKN filter table
The w53 updated pulses should be detected by the DFS algorithm.

- Add new DFS filters to MKKN filter table.
- Introduce duration margin check in confirm radar routine.

Change-Id: Icf3fecb5c6027ba827cac05dbd43a1a55463209b
CRs-Fixed: 2582300
2019-12-16 16:17:55 -08:00
Pankaj Singh
b18fc398bb qcacmn: For 6Ghz beacons get chan from HE OPs 6 Ghz params
In 6Ghz the HT and VHT IE are not present and channel info is
present in HE OPs 6 Ghz params.

So fill channel from HE OPs for 6Ghz AP.

Change-Id: I2dbe6ecedb8949b7d9d3b26b43fbe4b6d3ef0a42
CRs-Fixed: 2585788
2019-12-14 16:18:31 -08:00
Amruta Kulkarni
d0189add9b qcacmn: Enhance logic for active dwell time
With this change, in concurrent mode
(SAP on 2.4ghz and peer connected + STA Scan ongoing),
active dwell time is kept unchanged.

Change-Id: I465873dec79906d078f5ec00c49641f66867c6a7
CRs-Fixed: 2581121
2019-12-13 14:12:16 -08:00
Hariharan Basuthkar
c41566955e qcacmn: Add regulatory 6G changes for Update 30
Update the regulatory database with the following changes:

1) Add full reg domain FCC15_FCCA, FCC16_FCCA and FCC17_FCCA.
2) Add associated 5G reg rules and channel bands for the new regdomains.

Change-Id: I2b6038d0f106555adf650c12ca48efcaacc69071
CRs-Fixed: 2582502
2019-12-13 01:59:38 -08:00
Linux Build Service Account
bf21ef2e02 Merge "qcacmn: Remove unused API in the regulatory component" 2019-12-12 20:30:29 -08:00
Vignesh U
8fd74a017d qcacmn: Add a new DFS domain for Japan (MKKN)
Introduce a new DFS domain MKKN that supports new w53 Japan RADAR
pattern only.
Initialize a new empty RADAR table dfs_mkkn_radars for MKKN DFS domain.
Map The 5G regdamain MKK17 to the new DFS domain MKKN to make sure that
the new w53 Radar pulses should be detected only by JP country or
MKK17 5G regdomain.

Change-Id: Ib0f6a7e98353c9930e90703ead2342b932e491e3
CRs-Fixed: 2575347
2019-12-12 18:19:38 +05:30
Hariharan Basuthkar
45ac9f5bf7 qcacmn: Remove unused API in the regulatory component
Remove the unused API wlan_reg_get_5g_bonded_channel_and_state in the
regulatory component

Change-Id: I45c9b083dfb6faf6c97293d54200ed4f15a7d289
CRs-Fixed: 2574154
2019-12-11 06:28:48 -08:00
Abhinav Kumar
04b61d6e39 qcacmn: Get the valid vdev in get_vdev_by_macaddr_from_pdev
In wlan_objmgr_get_vdev_by_macaddr_from_pdev driver checks the
first vdev matching the mac address and try to get ref and return
NULL if it fails.

In case if a vdev is logically deleted but not physically deleted
(some ref are pending) and a new vdev is added with same mac address
at the tail of the vdev list, the
wlan_objmgr_get_vdev_by_macaddr_from_pdev always return NULL cheking
for the logically deleted vdev, even when a valid vdev is present
after the logically deleted vdev.

Thus continue to next vdev if try get ref fails for the vdev.

Change-Id: Icd67ce8830460fca7bb4c19e81b2e9f764fb5dba
CRs-Fixed: 2580697
2019-12-10 00:51:59 -08:00
Abhinav Kumar
4c3c73a375 qcacmn: Remove unused serialization API
Remove unused serialization API
wlan_serialization_get_active_list_count.

Change-Id: I80c1cd5693fb3dda91ffd7de01c1df244e648135
CRs-Fixed: 2580681
2019-12-10 00:51:51 -08:00
Shashikala Prabhu
1e7bd262fd qcacmn: Add restricted 80+80 MHz bit in soc caps
Restricted 80+80 MHz  capability is reported by FW in service bitmap.
Based on this support set soc's extcap feature bit.

Please note, wmi_service_bw_165mhz_support will be renamed as
wmi_service_restricted_80p80_support once the FW changes are available.

Change-Id: I88f89eecd916c40ea8669c792dde3a335e4bac56
CRs-Fixed: 2579543
2019-12-10 00:51:42 -08:00
Priyadarshnee S
fe5117b731 qcacmn: Map JAPAN15 to MKK17_MKKC
Map JAPAN15 to MKK17_MKKC to be in consistent with FW mapping.

CRs-Fixed: 2578832
Change-Id: I74c38333bd3c31990647329a909c04c848b14a51
2019-12-10 00:51:13 -08:00
Hariharan Basuthkar
379ebfe4e3 qcacmn: Use channel frequency instead of channel number
1) Add the API wlan_reg_get_5g_bonded_channel_and_state_for_freq
   that returns  the state for a 5G or 6G channel frequency,
   based on the channel width and and state of the bonded channels.

2) In the API target_if_calculate_center_freq, remove the instances
of IEEE channel number, and provide regulatory support, with the
channel frequency based structure - bonded_channel_freq and the API -
wlan_reg_get_5g_bonded_channel_and_state_for_freq.

3) Remove the usage of band_info and replace it with reg_wifi_band within
the target_if of the spectral module.

Change-Id: If5108b55097208d33fafb48968ea8b6dc83011fa
CRs-Fixed: 2571906
2019-12-09 20:38:52 -08:00
Vignesh Mohan
2220048ec2 qcacmn: enable the NOL channels in regulatory after NOL reset
Before mode switch command is sent to firmware, the NOL channels are
reset. But the regulatory channel structure for these corresponding
channels are still disabled. After mode switch response, when
the new umac channel list is built, these channels are still marked
as disabled in regulatory, which results in the umac channel list
not having these channels at all.

Re-enable the NOL channels in the regulatory channel list after
NOL reset.

Change-Id: Ifad8ec7a5be53e061045c068f9a6bfc313d4985c
CRs-Fixed: 2580403
2019-12-09 18:58:06 -08:00
Pooventhiran G
9a1b59247c qcacmn: Reset keys to zero after use
In functions that use key values, reset the local variables (key) to
zero after use to avoid security vulnerability.

Change-Id: I105b1abf7c707102ef99bbe4fa213708039d933e
CRs-fixed: 2581402
2019-12-09 18:57:51 -08:00
Srinivas Pitla
8e869fff23 qcacmn: Define Peer free notification framework
Define framework to notify registered callbacks on peer freed.
Interested modules can register their callbacks with object manager.

Change-Id: I9ab0e45f7841b1609b9ada3b50335299b462b630
CRs-Fixed: 2578099
2019-12-09 17:29:02 -08:00
Jianmin Zhu
6aded3fc94 qcacmn: Redefine channel frequency MACRO as public
Move MACRO definition of TWOG_CHAN_6_IN_MHZ out of
ifdef CONFIG_CHAN_FREQ_API, move to public header file,
then other components can use it.

Change-Id: Ieb4b2b167c664246d39949ad4f8d53eda6b9d7de
CRs-Fixed: 2580207
2019-12-08 22:58:02 -08:00
Disha Das
bcb1f1738f qcacmn: Replace return value 0 with QDF_STATUS_SUCCESS
Replace return value 0 with QDF_STATUS_SUCCESS as
per coding standards.

Change-Id: I27104d4a9eed29a7008b8970cf78c2ecd097b996
2019-12-06 08:41:10 -08:00
Shashikala Prabhu
52ee85cf6f qcacmn: Add support to choose 160MHz random channel for Pine
Pine supports restricted 80+80 MHz only on cfreq=5690 and cfreq=5775. If AP
detects RADAR in this channel, it chooses new 80+80 MHz random channel
which is not supported by Pine because, notion of 80+80 is not present in
current channel in regulatory component. Hence, as a temporary fix we
change the invalid 80+80 MHz channel to 160 MHz or lower.

Change-Id: I749607236a1dd7b9c7aa93ff889b65adcbb4191c
CRs-Fixed: 2570057
2019-12-06 01:52:32 -08:00
Akshay Kosigi
71d3820a97 qcacmn: Move vdev_mlme timers to psoc_mlme
Add code to change the vdev_mlme timers to psoc_mlme timers
and also change code to send vdev_delete to FW while physical
destruction of vdev obj.

Change-Id: Ie041182155c75d0cc3825dc97b26abc6be38d76c
CRs-Fixed: 2563931
2019-12-05 11:50:53 +05:30
Arun Kumar Khandavalli
536903de91 qcacmn: Dont use vdev object in vdev delete response
As part of the new changes, vdev mlme object will be freed before
the vdev delete response is received from the firmware. Hence do
not use the vdev_mlme object in the vdev delete response handler.

Change-Id: I6b2db32ac0ef415bf1b879b2cd222de67d9a69b7
CRs-Fixed: 2563404
2019-12-05 10:47:43 +05:30
Arun Kumar Khandavalli
eaac8c195b qcacmn: Move wakelock to psoc level
Wakelock is system level lock not required to be taken
for every vdev, Hence move the wakelock to the psoc
hierarchy.

Change-Id: I525baf5f4b5dcadb493d84900dbd0a2e7c6407f6
CRs-Fixed: 2563406
2019-12-05 10:46:33 +05:30
Arun Kumar Khandavalli
614d1e4476 qcacmn: create the vdev response timers in psoc_mlme
Move the vdev response timer from the vdev object manager structure
to the psoc mlme structure.

Change-Id: Ieb87ac6549aa23e0beb61441fea459d3db78c2f3
CRs-Fixed: 2563410
2019-12-05 10:45:08 +05:30
Pavankumar Nandeshwar
5f29f5f5c2 qcacmn: Update obj_mgr debug ids for ol_if_ops changes
Remove WLAN_TGT_IF_DP_PEER_REF_ID and add WLAN_PDEV_TARGET_IF_ID

Change-Id: I316d108c3e5bd27f6abc00b8d162a45284fffec6
2019-12-04 07:44:33 -08:00
Amruta Kulkarni
88ec9b6865 qcacmn: Enhance logic for dwell time 2ghz
With this change, in concurrent mode
(SAP on 5ghz or 6ghz and peer connected + STA Scan ongoing),
active dwell time for 2ghz is not reset to 0.

Change-Id: I27bcd64579727e279095cf5386638dbd49567b3d
CRs-Fixed: 2575762
2019-12-04 00:10:28 -08:00
Shashikala Prabhu
2c2681c3d1 qcacmn: Fix compilation error by initializing num_channels to zero
To fix 'error: ‘num_channels’ may be used uninitialized in this
function' error, initialize num_channels to zero.

Change-Id: Ic35b606a6e075dd309844c5fca793f970a701f5e
CRs-Fixed: 2570055
2019-12-03 19:27:56 -08:00
Shwetha G K
8db4b4ac32 qcacmn: Control path support for Spectral DMA debug
All gen III chipsets use Direct-DMA mechanism to copy Spectral reports to
the Host for further processing. This mechanism involves ring and buffer
management in the Host, FW, and uCode, where improper/incomplete DMA and
improper tail update issues are seen. DBR framework provides support to
debug such issues. Add Spectral control path support to facilitate the
configuration of these debug options.

CRs-Fixed: 2478596 2478595
Change-Id: I094616c4137145389b6984ccab933e5ebd0aa1ab
2019-12-03 03:26:22 -08:00
Gururaj Pandurangi
85d32ab984 qcacmn: Rate limit logs in serialization API
Rate limit logs in wlan_serialization_peek_head_active_cmd_using_psoc
to prevent excessive logging

Change-Id: I25bc93754cf4fe5d56fdb67c15b79b72fcda9efd
CRs-Fixed: 2574786
2019-12-03 01:15:38 -08:00
Rachit Kankane
98ec4d132b qcacmn: use spinlock before iterating
Before iterating in pending list, use spinlock to avoid possible
race condition.
Remove function wlan_serialization_get_active_list_next_node_using_psoc
as it not being used and is part of legacy flow which is suppose to be
removed eventually.

Change-Id: I9e7cbd9db8b5a1c45915bf5291cd5011c276d0e2
CRs-Fixed: 2573425
2019-12-02 12:39:42 -08:00
hqu
e131d31b8b qcacmn: Refine chan_list to chan_freq_list
Refine chan_list to chan_freq_list for below functions:

ucfg_scan_filter_valid_channel
scm_filter_valid_channel
scm_filter_channels

Change-Id: Ia1e82c5ac4cea4e48844b925e30947e945c40ee4
CRs-Fixed: 2570954
2019-12-02 07:19:47 -08:00
Liangwei Dong
49472056b2 qcacmn: Enable Fils Discovery frame sending in 6GHz SAP
To enhance visibility of 6GHz AP, 6G only AP shall send
Fils Discovery frame periodically in one beacon interval.

Change-Id: I51487380fca10418d2260dc2612e2adcf6cbb93b
CRs-Fixed: 2562434
2019-12-02 05:22:42 -08:00
Shashikala Prabhu
9a8d2a2825 qcacmn: Cleanup direct attach specific scan code
Cleanup direct attach specific code from common files.

Change-Id: Ided7aa31c3d37ac71fdcf19de439a5e2ed739019
CRs-Fixed: 2571429
2019-12-02 02:09:14 -08:00
Shwetha G K
215bac70f5 qcacmn: Add poisoning support for DBR buffers
Improper/incomplete DMA by the target affects the functionality of modules
that are using DBR framework. Add debug infrastructure to poison DBR
buffers with a given poison value before handing buffers over to
the target. Buffer owner modules can explicitly check for the poison
value in order to detect the improper DMA.
All modules that use DBR framework can use this debug infrastructure.

Change-Id: Ib3923c13202990e0f1198645b680c44a20736167
CRs-Fixed: 2466518
2019-12-02 00:42:41 -08:00
Shwetha G K
df696de7cc qcacmn: Add support to track DBR ring index movement
Add debug infrastructure to track the movement of head and tail pointers
of the DBR ring along with the time at which each buffer is received and
replenished. All modules that use DBR framework can use this
infrastructure. Issues that are specific to tail index movement from
the target can be identified with this debug infrastructure.

CRs-Fixed: 2439460
Change-Id: I6b486a73cf6a3174dfa297f8fb370fd298b46b67
2019-12-02 00:42:31 -08:00
Liangwei Dong
7ce41f14c1 qcacmn: Fix channel_map NULL
Initialize channel_map to "us" at regulatory init.
Use NUM_6GHZ_CHANNELS to get 6Ghz channel numbers
instead of MAX_6GHZ_CHANNEL.

Change-Id: Ifed996c1a528c8a3c0a29d3959f17dff6d298193
CRs-Fixed: 2949971
2019-12-01 19:16:45 -08:00
Hariharan Basuthkar
4050a850ac qcacmn: Rectify the API wlan_reg_is_6ghz_psc_chan_freq
While checking if a channel frequency is 6Ghz PSC frequency within
wlan_reg_is_6ghz_psc_chan_freq, check the remainder of the expression,
instead of quotient.

Change-Id: Ia40d7cd8485f9f8eb90222f9a3454d46e681681b
CRs-Fixed: 2572914
2019-12-01 17:43:32 -08:00
Priyadarshnee S
399ef175ce qcacmn: Add regulatory APIs to retrieve "unii_5g_bitmap" mask
Add regulatory APIs reg_get_unii_5g_bitmap and ucfg_reg_get_unii_5g_bitmap
to retrieve the value of "unii_5g_bitmap" stored in regulatory pdev
private object.

CRs-Fixed: 2574642
Change-Id: Iffb004b7fc9d9fbcf1972eb6f527529024e49c70
2019-12-01 17:42:58 -08:00
Sandeep Puligilla
0ca3c59702 qcacmn: Don't update ACS scan channel list
Ini item 'scan_mode_6ghz' updates the scan channel list based
on the user configuration value that includes the ACS scan on
SAP mode.

This change restricts the ini item configuration for ACS scan request.

Change-Id: I0871fed8a8d1e551656e8a1ba06b504755074ca1
CRs-Fixed: 2574811
2019-12-01 17:42:46 -08:00
Shashikala Prabhu
6810d038e9 qcacmn: Fix issues in random channel selection algorithm
Remove dummy function dfs_remove_cur_ch_from_list(). This logic is already
implemented in dfs_apply_rules().

In dfs_apply_rules()/dfs_apply_rules_for_freq(), skip all the HT20 channels
of the curent channel when DFS_RANDOM_CH_FLAG_NO_CURR_OPE_CH flag is set.

In dfs_prepare_random_channel_for_freq(), allocate correct size of memory
for leakage_adjusted_lst array.

Use DFS_80_NUM_SUB_CHANNEL macro instead of DFS_80_NUM_SUB_CHANNEL_FREQ to
choose correct 80MHz channel.

Change-Id: Ie318d667ff1b0caef3032b7aa57f0ddfb7e1f1a7
CRs-Fixed: 2570055
2019-12-01 17:42:33 -08:00
tinlin
21f7286344 qcacmn: Add MIB statistics
Add new stats_id WMI_REQUEST_MIB_STATS &
WMI_REQUEST_MIB_EXTD_STATS in WMI_REQUEST_STATS_CMDID
to retrieve MIB statistics from fw.

Change-Id: I17bccc2673d1a2ce035db04d8426bab49db80790
CRs-Fixed: 2548165
2019-12-01 17:42:21 -08:00
Hariharan Basuthkar
52ccb5e615 qcacmn: Disable coex channels in the current_chan_list
The 5G cellular RF band and wifi frequency band of UNII-1
(IEEE channels 36, 40, 44, 48) and UNII-2A band (52, 56,
60, 64) can coexist.

UNII-1 and UNII-2A are represented by bits 0x1 and 0x2 respectively in
this implementation. The user space command should set the bits by
applying the following algorithm:

1) To disable only the UNII-1 band channels, set the value as 0x1.
2) To disable only the UNII-2A band channels, set the value as 0x2.
3) To disable both the UNII-1 and UNII-2A band channels, set the
   value as 0x3.
4) To restore both the UNII-1 and UNII-2A band channels, set the
   value as 0x0.

Change-Id: I8ff747e53b079ee9e0dc762980aee0eea32b23a5
CRs-Fixed: 2571546
2019-12-01 17:41:36 -08:00
Priyadarshnee S
8e626ee720 qcacmn: Fix memory corruption in DFS Random Channel Selection
With the introduction of 6GHZ and replacement of IEEE channel numbers
by frequency in DFS, "leakage_adjusted_lst" is now a pointer of type
uint16_t. Change the allocation size to take care of size of the new type.

CRS-Fixed: 2569329
Change-Id: I595bc77970a2758fd6ca66e53de6c0dbfe8843bc
2019-11-27 07:05:44 -08:00
Pragaspathi Thilagaraj
120b2490ec qcacmn: Add support for RSNX IE
SAE key derivation requires use of a secret element, PWE. This
element is deterministically discovered by repeatedly hashing
the password with some additional information until the
resulting hash is the abscissa of a point on the elliptic curve
(for ECC) or by exponentiating the hash digest to a constant to
produce an element (for FFC). This "hunting-and-pecking" loop
method is prone to side channel attacks.

To avoid this, a direct hashing to element technique in SAE is
introduced in IEEE P802.11-REVmd/D3.0. Support new RSNX IEEE
as part of the hash to element PWE derivation. The user space
sends the RSNX IE in the connect request.

Add support for new RSNX IE with element ID 244.

Change-Id: I61a40ff14e15612735c3f3750e2c47d764feeb62
CRs-Fixed: 2569600
2019-11-26 07:10:53 -08:00
Arun Kumar Khandavalli
f1c4834611 qcacmn: Define unknown vdev mlme type subtype
If any of the driver unknown mode is passed to the utility api's
return the unknown vdev mlme type/subtype.

Change-Id: I8be1c9f31fb3a8a355185e14ef6869da84cf863f
CRs-Fixed: 2564964
2019-11-25 13:44:10 -08:00
bings
9e8041d13c qcacmn: Ignore pre pri check for staggered pulses
There may be 3 different kinds of pris in staggered pulses. If one
of them is selected as reference pri, the other two pris fail the
pre pri check, then *prev_good_timestamp can't be updated at this
time. Even the next search pri has correct pri, it can't pass the
check of dfs_check_pulses_for_delta_variance because of previous
good timestamp.

Ignore pre pri check for staggered pulses, update *prev_good_timestamp
correctly.

Change-Id: I5ce95c6c1f899f29e6b4d0d83e8171d22c31fc5c
CRs-Fixed: 2556581
2019-11-25 13:43:58 -08:00
Amar Singhal
7defbc9a07 qcacmn: Call channel change callback in regulatory_pdev_open
During pdev create callback, pdev reference cannot be taken. Hence,
channel change callbacks cannot be called during pdev create. So
call the callbacks during regulatory_pdev_open. Also dont check
if regulatory_pdev_open fails.

Change-Id: I9d444f952418be983e4ac2182581d03bba02b198
CRs-Fixed: 2572487
2019-11-25 02:34:04 -08:00
Sandeep Puligilla
e903f492d1 qcacmn: Update scan copy data API for RNR IE
Update Scan copy ie data API for RNRIE and MUEDCA IE

Change-Id: I1aa1acc3f921c10af2b2de0926f69542402da285
CRs-Fixed: 2566644
2019-11-24 22:35:51 -08:00
Sandeep Puligilla
d763fee333 qcacmn: Add support for 6GHz scan priority algorithm
Add support for 6Ghz scan channel list priority algorithm.

Change-Id: I63b0ddf384c4bd62a6a25feb7dfe4f80b5f85fbe
CRs-Fixed: 2564949
2019-11-24 22:35:35 -08:00
tinlin
aae613c904 qcacmn: Convert legacy channel usage
Modify the following API's code and parameters to make
sure it is using frequency instead of channel:

	csr_update_scan_entry_associnfo

Change-Id: Id289c2bd2e2cdf3f6a5e16028bbafb3df4049dac
CRs-Fixed: 2563874
2019-11-21 00:45:37 -08:00
Amar Singhal
8e992e56f0 qcacmn: Add check for regulatory channel list
Regulatory module calls registered callbacks when channel list is changed.
But channel list may not have been received when path for callbacks is
reached. So keep a track if channel list has been received. If not, do
not call the callbacks.

Change-Id: I2e1a6e442b0d5c79e786806e00b1c50c9491dae0
CRs-Fixed: 2563759
2019-11-19 22:33:26 -08:00