Commit Graph

1831 Commits

Author SHA1 Message Date
Debasis Das
40a60c5196 qcacmn: Extend multi_vdev_restart parameter-list
Extend the parameter-list of the multi_vdev_restart
command to add phymode.

Change-Id: I2d9a48e6721813817ae47e992f5569d379fe2923
2020-01-19 08:28:26 -08:00
Abhishek Singh
87a5ab62be qcacmn: Add security info in scan entry
Add security info in scan entry and print the same.

Change-Id: If8f0c05a526b86cb3ae0020c2e144beb3510cb98
CRs-Fixed: 2603004
2020-01-18 20:16:48 -08:00
Paul Zhang
c5a417e285 qcacmn: Set the right cc_src for reg country
Currently, if the country code which is going to be set is the
same as the country currently being used, it will be ignored.
It does not consider its country code source. This causes the
working of 11d logic unexpected.

To fix this issue, check the country source when trying to set
the same country code.

CRs-Fixed: 2583172
Change-Id: I9c574a62d11676bc0305510f1da9848cc044f874
2020-01-18 06:28:47 -08:00
bings
ae8afdf042 qcacmn: Fix memory leak and NULL access in scm_add_rnr_channel_db
In scm_add_rnr_channel_db, if pointer channel is NULL, it should return.
Allocate rnr_node buffer whenever it is used, otherwise memory leak
happens if the BSS channel is not 6Ghz.

Change-Id: Iecba2453c2e9cdf9301826e0e11f740190616110
CRs-Fixed: 2601014
2020-01-17 22:53:01 -08:00
Balaganapathy Palanisamy
3020842b6d qcacmn: Serialize PDEV CSA channel switch
CSA channel switch call directly interacts with VDEV
state machine, move CSA restart to go through serialization
service.

CRs-Fixed: 2598123

Change-Id: Ic0bea64b56f54eed354e11d0873ae4423e365cca
2020-01-17 21:29:38 -08:00
Sandeep Puligilla
a94efa0175 qcacmn: SAP is not advertising 20TU probe response
SAP not advertising 20TU probe response when
FILS Discovery is disbaled through ini.

Updated WMI fields to enable 20TU probe response
when 6Ghz SAP is operating.

Change-Id: Idc4b95047d2149f68a68a434afda4d325a5d0547
CRs-Fixed: 2600485
2020-01-17 02:57:48 -08:00
Santosh Anbu
060bf3975a qcacmn: Support multivdev restart response handling
Add UMAC change to support consolidated multi vdev
response handling.

Change-Id: I3383c723a96b1c8009665b00e19aa5aa4bf65bfb
CRs-Fixed: 2595743
2020-01-16 08:08:52 -08:00
Himanshu Batra
8fcc17ccf9 qcacmn: Create wrapper API to check all leaks at psoc
The current implementaion check for peer, vdev and pdev leaks on
psoc in order and if any leak is found for peer then QDF_DEBUG_PANIC
is called and vdev and pdev leaks are not checked. Similar is the case
if vdev leak is found, pdev leaks are not checked

Adding a wrapper API to check all the leaks and then do panic if any
leak is found

Change-Id: Icf6622760f3646b82f893beb7415b95307e2ccd7
CRs-Fixed: 2599228
2020-01-16 08:08:33 -08:00
Naga
29b109fa93 Revert "qcacmn: Move deletion of datapath vdev to vdev destroy handler"
This revert commit Change-Id: I727d70e77f8e913ca732b6ae56c60049161547de.

Change-Id: I2481f74d417db257ac2ab448ab6a3d7b55d2f34e
CRs-Fixed: 2593434
2020-01-15 23:32:18 -08:00
Abhishek Ambure
d49729cd47 qcacmn: Add oem target six ghz support disable flag in wifipos
Host driver sends channel list and number of channels to lowi-server
in ANI_MSG_GET_OEM_CAP_RSP. 6Ghz channels in the channel list are not
useful for legacy lowi-server not supporting 6Ghz channels.

For legacy oem targets, driver sets "oem_6g_support_disable".

Change-Id: Ibc072ff2df3d7b246d3a48d7cebcb5feac35b715
CRs-Fixed: 2597645
2020-01-15 19:33:06 -08:00
Sandeep Puligilla
395a799312 qcacmn: Fix beacon processing error
1. Modified logging level for RNR DB
2. Modified  add RNR DB entry API to
avoid null pointer dereference.

Change-Id: Ic5d91c05dd3e37e5e9099979e37fcbe9f42feb14
CRs-Fixed: 2599539
2020-01-13 15:19:01 -08:00
Linux Build Service Account
2105b28e4c Merge "qcacmn: Reduce excessive console logging" 2020-01-12 19:35:57 -08:00
Daniel Kim
8e63ff7840 qcacmn: Use correct phy id in the reg services
To support dynamic mode switch (phase 2), correct phy_id
should be used. Instead of pdev_id, target phy_id should
be used to retrieve correct channel range sent in target
capabilities (mac_phy_caps).

Change-Id: If0e2503cc99636b775721ecb3628290d19e5575c
2020-01-12 00:12:47 -08:00
Vignesh Mohan
86eba5902e qcacmn: Reinit DFS after HW mode switch (phase 2)
Supported dynamic HW mode switches:
DBS (full band 5G and 2G) <-> DBS_SBS (low band 5G, high band 5G and 2G)

Description of the changes:

1. NOL conversion:
  a. Introduce a temporary NOL list copy structure in DFS psoc obj.
  b. When mode switch is triggered:
    i.   Stop the NOL timers and clear the data, to avoid processing NOL
         expiry during mode switch.
    ii.  Allocate the psoc NOL copy for the target num_radios.
    iii. Store the NOL data of each radio to the target pdev ID
         (pdev ID after mode switch) in the psoc NOL copy,
	 using a unified mux/demux API.
  c. After mode switch is completed:
    i.   Resume NOL by re-initializing the list from the temporary psoc
         copy.
    ii.  Free the psoc copy after mode switch is complete.
    iii. Note: changes are made to support pause and resume of NOL,
         increasing NOL timeout by a few milliseconds.

2. PreCAC list conversion:
  a. When mode switch is triggered:
    i. Stop the existing preCAC timer and send ADFS abort command to FW.
  b. When mode switch is completed:
    i.  Unify/separate the preCAC list if the target mode is DBS/DBS_SBS
        respectively, using a single API.
    ii. Start ADFS again.

3. Radar detection lock:
  a. While detecting radar, acquire a lock to avoid handling user triggered
     mode_switch during this process. Release the lock once radar
     processing is completed and CSA start is triggered.

4. Radar detection/CAC completion defer during mode switch:
  a. While detecting radar or CAC completion, check if mode switch is
     in progress. If yes, defer the processing and wait for mode switch to
     complete before handling the events.
  b. Note: Precedence is Radar over CAC, i.e., if CAC processing is waiting
     and radar is received, CAC completion is no longer handled.

CRs-Fixed: 2580403
Change-Id: I506f3b569bad2e351c6f336e50f203cf5fa8b223
2020-01-11 22:28:17 -08:00
Neha Bisht
503663c6da qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in obj_mgr and scheduler
modules.
Structure           Bytes saved (64bit)   Bytes saved (32bit)
scheduler_ctx       8 bytes               4 bytes
wlan_channel        8 bytes               8 bytes

Change-Id: I298946b55328d8d9b564c140e0a59e0b8702fab0
CRs-Fixed: 2587842
2020-01-11 16:18:50 -08:00
Ashish Kumar Dhanotiya
ef9d824e14 qcacmn: Fill center frequency also in channel list with power
Currently get channel list with power api fills only
channel number and tx power, fill center frequency also
in the response with this api.

Change-Id: Ib4487e20d7da0c59d6b4a041deac4d4ecc8dd8c1
CRs-Fixed: 2597550
2020-01-10 20:12:11 -08:00
Venkateswara Swamy Bandaru
46082ed4e3 qcacmn: Fix issue in RNR IE processing
Fix RNR IE processing by correctly adjusting offsets.
neighbour ap info field processing is present only at
beginning of IE skip it only once.

Change-Id: I05923e4ff9efa00aeed141b0cff8b62913622cf6
CRs-Fixed: 2592014
2020-01-10 13:49:39 -08:00
Abhishek Ambure
f39c249a32 qcacmn: Add support for LOWI 6GHz enhancements
Append 4 bytes enhancement flags in ANI_MSG_APP_REG_RSP message.
NL_ENABLE_OEM_REQ_RSP i.e. 0x00000001 in ANI_MSG_APP_REG_RSP message
represents host driver support for NLA type request and response
for oem commands.

Change-Id: I5d07d017a27b676537c24fbf15f224af8964c665
CRs-Fixed: 2591896
2020-01-09 23:00:33 -08:00
Yu Wang
a0dc6b9144 qcacmn: implement interfaces for configuring BT coex chain mode
Add interfaces for get/set BT coex chain mode.

CRs-Fixed: 2565088
Change-Id: If74dcba4ad3b69caa895264eaff64ef06b3b0714
2020-01-09 02:40:41 -08:00
Yu Wang
1cd103900e qcacmn: Initial version of coex component
Add initial set of coex files, implement the basic functions.
Coex component is used to process coex related configurations.

CRs-Fixed: 2565088
Change-Id: I8b9600809691b808f97c621cb329a6ab9941814c
2020-01-09 02:40:23 -08:00
Amruta Kulkarni
0f0a36c8d4 qcacmn: Change info/err prints to debug in roaming path
The printk buffer is protected by a global raw spinlock for readers
and writers. This restricts the contexts that are allowed to
access the buffer. So large latencies exists when printing to
kmsg done with QDF trace levels WARN, INFO, ERROR. This results
in roaming KPI for maximum transition time exceeding the expected
100ms.
So change info/err prints to debug prints in roaming path
to reduce delays in roaming time.

Change-Id: I9cdf043da6e88d735ab39812e74ed24784ceede3
CRs-Fixed: 2594867
2020-01-08 20:11:15 -08:00
Hariharan Basuthkar
8e28cdda42 qcacmn: Add an API wlan_reg_get_opclass_details
Add an API wlan_reg_get_opclass_details, to get the operating class
table details from the regulatory component. Also, add a new structure
regdmn_ap_cap_opclass_t in the regulatory component, to fill members
of the mapapcap_t structure.

Change-Id: I8b6a3867a766038663c10ce2f01a8b7d310c7375
CRs-Fixed: 2580505
2020-01-08 13:13:00 -08:00
Sandeep Puligilla
904e527aa7 qcacmn: Add new feature to control fils discovery on 6Ghz Sap
6Ghz SAP needs to send either a probe response or fils
discovery at every 20ms.

Add a new feature to configure the probe response or
fils discovery frame.

Change-Id: I3b9842021db94515ae4dccbcdc573a4cd84caa56
CRs-Fixed: 2591147
2020-01-07 00:41:39 -08:00
Yu Ouyang
78100a4cfe qcacmn: Fix function parameter type conflict issue
Parameter freq type has a conflict in reg_is_dsrc_freq(qdf_freq_t freq)
and reg_is_dsrc_freq(uint16_t freq) functions.

Change the type to qdf_freq_t in these functions.

Change-Id: I4c348778a7cb2fd588799332241701357de90422
CRs-Fixed: 2595642
2020-01-04 04:25:52 -08:00
Ananya Barat
763f8beda2 qcacmn: Reverting type of channel number variables in ch_params
The variables center_freq_seg0 and center_freq_seg1 in struct
ch_params are used to represent channel numbers. Their types
were wrongly changed to qdf_freq_t in change ID
e205befb82f643808973286ae578d7add7738eec. Change their type
back to uint8_t.

Change-Id: I13c629850bf207c6088b44c8695167e96dc33476
2020-01-03 09:04:39 -08:00
Alan Chen
80c475929e qcacmn: Increase SCAN_PNO_MAX_NETW_CHANNELS_EX macro to 100
PNO scan is failing to start because it is coming with 97 channels
but the current max number of channels in PNO scan is 60. To allow
for a larger number of channels, increase SCAN_PNO_MAX_NETW_CHANNELS_EX
to 100.

Change-Id: I3ac08f83f9f500899656caf48c112c33580cef70
CRs-Fixed: 2585685
2020-01-02 14:31:41 -08:00
aloksing
18f309c7f4 qcacmn: Add debug support for vdev/peer reference and release
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count

Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
2020-01-02 05:18:15 -08:00
Hariharan Basuthkar
f8f30ced97 qcacmn: Get opclass from freq and width given a country code
Add the API wlan_reg_get_opclass_from_freq_width, to give country_iso,
channel frequency, channel width and behaviour limit as input, and get
the operating class as output.

Change-Id: I96c39119ab855d10965b2603e8b15c21699daa68
CRs-Fixed: 2583789
2020-01-01 07:27:58 -08:00
Yu Ouyang
efa9f5d2a9 qcacmn: Add FCC10_FCCA into arry g_reg_dmn_pairs[]
When enalbe DSRC feature, member reg_dmn_pair_id of struct
country_code_to_reg_domain g_all_countries[] may equal FCC10_FCCA.
However, FCC10_FCCA can't be found in array g_reg_dmn_pairs[].

So, add FCC10_FCCA into arry g_reg_dmn_pairs[].
And, fix one compile issue.

Change-Id: I6069c43505e15312d8bd9be48495998c31f1f8eb
CRs-Fixed: 2590094
2019-12-30 02:43:25 -08:00
Adwait Nayak
e2ee56e574 qcacmn: CFR WMI implementation
CFR config is passed on to FW through WMI
CFR feature code is moved into feature specific WMI file.

Change-Id: I00b57ea2ef4ec5520eb565910ac2c0a6478170e3
CRs-Fixed: 2582846
2019-12-27 16:31:14 -08:00
Vevek Venkatesan
27e7bb4d79 qcacmn: cdp: Converge cdp_cmn_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
2019-12-27 03:25:49 -08:00
Pavankumar Nandeshwar
61392d0275 qcacmn: cmn_ops changes in umac, tgt_if for umac-dp decoupling
umac and tgt_if module changes due to umac-dp decoupling changes in
cmn_ops APIs.

Change-Id: If8a7bdb879660f1d15a067ce9c76f96e6dfb7140
2019-12-27 03:25:25 -08:00
Surya Prakash Raajen
a3baeee819 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: Ic49829ab463d75af6d7fc1ac36df16cabdf447e2
CRs-Fixed: 2587049
2019-12-27 01:40:40 -08:00
Hariharan Basuthkar
da52df55d0 qcacmn: Add the operating classes 129 and 130
Add the operating classes 129 and 130 to the US, Europe, Japan,
and Global operating class tables in the regulatory component.

Change-Id: I930019c2b14451de57a92c069a77c27fb56d273b
CRs-Fixed: 2587094
2019-12-26 13:21:43 -08:00
Ashish Kumar Dhanotiya
89029e4d9e qcacmn: Send CTL info to firmware
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.

If all these attributes are not populated then CTL power limit is
not applied by the firmware.

Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
2019-12-26 11:38:36 -08:00
Alok Singh
192bbaa088 qcacmn: Add debug support for vdev reference and release
Add function name and line number while taking/releasing
references for vdev to trace Object Manager references

Change-Id: Ie8a7d77db2f3c7b58536ab267c665299cb67152e
2019-12-24 20:34:09 -08:00
Alok Singh
c5394665b2 qcacmn: Add debug support for peer reference and release
Add function name and line number while taking/releasing
references for peer to trace object manager references

Change-Id: I93c30d62ecaa979f8c2680eec68f723d2d3c4292
2019-12-24 20:33:55 -08:00
Ashish Kumar Dhanotiya
d02ac5aeb9 qcacmn: Add legacy code CTRY_JAPAN15 to regdb
Currently CTRY_JAPAN15 is not there in host regulatory
database and it is still in use. If CTRY_JAPAN15 is set
from BDF, driver load will fail as this country is not
present in host driver database.

To address this issue add CTRY_JAPAN15 to regdb.

Change-Id: I031b766ac34d57193ded4856b1396306cd5bb76d
CRs-Fixed: 2590635
2019-12-24 08:25:00 -08:00
Shashikala Prabhu
cccf40f12b qcacmn: Return correct RSSI value from util_scan_entry_rssi()
RSSI in the scan entry is a negative value. It was converted to positive
value and if the converted value is greater than WLAN_RSSI_DUMMY_MARKER
(has positive value 295), util_scan_entry_rssi() was returning 0 to the
caller.
util_scan_entry_rssi() is used for printing RSSI value. Since RSSI is saved
as a negative value and caller expects it as a negative value, return a
negative RSSI value from util_scan_entry_rssi().

Change-Id: Ifdeb88dfa42a6927ff29670429d846ff071e9c59
CRs-Fixed: 2576129
2019-12-24 03:47:08 -08:00
bings
9ef3680be6 qcacmn: Modify dfs phyerror pulse dur to increase radar detection rate
When FCC type 4 radar is injected at +/-30MHz separation from center
frequency in VHT 80MHz mode, incorrect pulse duration is reported in the
radar summary reports and lead to decreased radar probablity detection.

Fix the issue by capturing pulses with such characteristics and
modify them to fit within the valid phyerror pulse duration range.

Change-Id: Ic6314a372d6909448fbe4eb694c41736d1719712
CRs-Fixed: 2573339
2019-12-19 15:34:22 -08:00
Naga
1b9b61e7cd qcacmn: Add API to print start response status
Add inline API to print start response status as string
instead of value.

Change-Id: Ifed90ae2b2fd8b1dc31f35d3debf6bf5020c85c2
CRs-Fixed: 2586089
2019-12-19 03:04:50 -08:00
Pankaj Singh
e10977221a qcacmn: Print beacon info after RSSI/chan are updated from prev frame
In case of channel mismatch, RSSI and channel etc are updated from
previous frame. Also in hidden SSID case the SSID is updated from
prev frame for beacons.

So print the beacon after updating these params from previous frame.

Change-Id: Ia4dc4769f7bccf4698074a3bcedefd1909fd2e7b
CRs-Fixed: 2587067
2019-12-19 03:04:34 -08:00
Hangtian Zhu
7788a89ccd qcacmn: Fix compile issues when some features are disabled
Fix compile issues when some features are disabled, the features are:
BUILD_DEBUG_VERSION
CONFIG_CP_STATS
CONFIG_HOST_OPCLASS
CONFIG_FEATURE_ROAM_DEBUG
There are some other features depends on each other, so enabled features to
qcs40x.snoc.perf_defconfig, the features are:
CONFIG_WLAN_FEATURE_FILS
CONFIG_WMI_ROAM_SUPPORT
CONFIG_WMI_STA_SUPPORT
CONFIG_REG_CLIENT
CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH
CONFIG_WMI_CONCURRENCY_SUPPORT
CONFIG_LL_DP_SUPPORT

Change-Id: I6fa1eacb79576a955e593dbb9ac52083742275e3
CRs-Fixed: 2584839
2019-12-18 23:55:00 -08:00
Sumedh Baikady
48fdc2ddfb qcacmn: Add out of band advertisement in 6Ghz
Add WMI and objmgr support for maintaining RNR
buffer cache and receive tbtt events for all
vdevs using existing tbtt offset WMI.

Change-Id: Idfed63e104e629fbe455d1cf6202cd9b332f5cf9
2019-12-18 11:13:36 -08:00
Disha Das
cde63cdd01 qcacmn: Obtain current PN number for a peer
On rekey, the STA resets it’s PN to 0 but, the
AP sends out pending traffic with old PN values
before it resets the PN as well.
This causes traffic to stall and hence, TSC (transmit
sequence counter) should not be set to zero during rekey.

Instead, obtain last PN number for a non-bss peer while
configuring new key and pass the values to hostap.

Change-Id: I4a604f23944c941c6ade2f57ab03781bc78f7b40
2019-12-18 09:24:44 -08:00
Liangwei Dong
7628a42ab1 qcacmn: Add VHT/HE 160Mhz rate flag
Add TX_RATE_HE160 and TX_RATE_VHT160 for 160Mhz
rate report.

Change-Id: Ica39b5dd65f1ca5bedece344456bb4e628b406af
CRs-Fixed: 2583923
2019-12-17 16:38:42 -08:00
Jeevan Kukkalli
66f08b7be6 qcacmn: Avoid infinite loop while parsing RNR IE
A value of 0 in TBTT Information Count subfield indicates
one TBTT Information field is present.Test expression in
for loop should consider 0 as a valid value to avoid infinite
loop.

Change-Id: I0dc0f694147b6c4f91a8be0bfbd7c6d4bb95e1f1
CRs-Fixed: 2582936
2019-12-17 01:38:14 -08:00
Abhijit Pradhan
5a6aec0277 qcacmn: Control the size of the freq and chan_num (GUMAC-SCAN)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size:
When the frequency range is not very large, a smaller size
(e.g. 16bit integer) can be used. It saves a large amount of space
especially when many large arrays containing elements of this type/size
are defined in the driver.

Also, change the size of the IEEE channel variables to unsigned
8-bit integer.

Change-Id: I6349c0665bf0a7329627427913f9eebba2821043
CRs-Fixed: 2586177
2019-12-17 00:13:24 -08:00
Abhijit Pradhan
0f16cba633 qcacmn: Control the size of the freq and chan_num (Scan)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:-

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD ) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size: When the frequency range is not very
large, a smaller size(e.g. 16bit integer) can be used. It saves a
large amount of space especially when many large arrays containing
elements of this type/size are defined in the driver.

Also, change the size of the IEEE channel variables to unsigned
8-bit integer.

Change-Id: Ie503623ec6e4473abe8ee95c19dc4470853326dd
CRs-Fixed: 2586177
2019-12-17 00:13:09 -08:00
Abhijit Pradhan
2c1420a617 qcacmn: Control the size of the freq and chan_num (Regulatory)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size:
When the frequency range is not very large, a smaller size (e.g.
16bit integer) can be used. It saves a large amount of space especially
when many large arrays containing elements of this type/size are
defined in the driver.

Also, change the size of the IEEE channel variables to unsigned
8-bit integer.

Change-Id: Ie205befb82f643808973286ae578d7add7738eec
CRs-Fixed: 2586071
2019-12-17 00:12:55 -08:00