Commit graph

4,623 commits

Author SHA1 Message Date
Kabilan Kannan
bb4f65bfb6 qcacmn: Serialize TDLS set state cmd to firmware
Serialize TDLS set command to firmware to avoid out
of sequence WMI commands.

Change-Id: Ia5d493b329dfa687e532797a5b47f3b82a0b3f76
CRs-Fixed: 2214605
2018-04-17 15:10:38 -07:00
Naveen Rawat
0b83e8489c qcacmn: Add osif implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats component.

Change-Id: I1bee578a773c6c2b4cac69c907422a4cb30084d3
CRs-Fixed: 2210309
2018-04-17 13:17:56 -07:00
Naveen Rawat
d24bebbf24 qcacmn: Add umac implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats component.

Change-Id: I93855e4a1635afa97b4d5235ddb9cd92654f943d
CRs-Fixed: 2210309
2018-04-17 13:17:54 -07:00
Naveen Rawat
1cd5f68488 qcacmn: Add target_if implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats
component.

Change-Id: If513f10bf103545536266823ece62cbf98dd3296
CRs-Fixed: 2210309
2018-04-17 13:17:51 -07:00
Manjunathappa Prakash
38205cc1b7 qcacmn: Create flow control pools on vdev start
As many as 5 vdevs can be created, which is defined by MAX_SME_SESSIONS.
But flow control pools are only valid for active TxRx capable vdevs.
which is 3 active vdevs. So attach flow pool creation to vdev_start
instead of vdev_attach.

Change-Id: I137676ba618aa3a6684c7d17ef7d9263c4df6efe
CRs-Fixed: 2220079
2018-04-17 13:17:49 -07:00
Ashok Ponnaiah
afb889318f qcacmn: Add new supporting api for crypto
Add new helper functions for crypto module.
New api to get ucastcipher and mcastcipher
from peer and vdev.
New api to get key from vdev and peer.

Change-Id: Ia111f59a93b6cc7e1a3406dc53142f0c087df6f8
Crs-Fixed: 2223901
2018-04-17 09:21:03 -07:00
narayan
4adc11500d qcacmn: AMPDU_AMSDU per vap offload
cmn_dev changes for FR38985 and FR40338 port from 10.4 to 11.0

Change-Id: Ic56e65a4c7429d79e49e353146f7b38dd73da9d1
CRs-Fixed: 2123123
2018-04-17 06:58:28 -07:00
Pamidipati, Vijay
d578db10c0 qcacmn: Handle STA roaming to another AP/Repeater
Add support in DP WDS source port learning handler to kickout a STA,
when direct associated peer(SA) roams to another AP/Repeater and
reachable via TA peer

Change-Id: I84d0b92c9b4e39c05f4d7c25b3f5afb1d535ca02
CRs-Fixed: 2219924
2018-04-17 05:09:05 -07:00
Rhythm Patwa
fef604ff99 qcacmn: Fix issue to correctly populate HT MCS rates
Fix the issue where the MCS rates for HT were repopulated
causing the MCS rates to be decoded incorrectly.

Change-Id: I73efac79d853b6f8af966aec57e70ad645418528
CRs-fixed: 2206784
2018-04-17 02:29:34 -07:00
Abhinav Kumar
81515d46c8 qcacmn: Add new ini to set delay Hand-off period
Add new ini item "ho_delay_for_rx" to set delay Hand-off
period. For LFR 3.0 roaming scenario, once roam candidate
is found, firmware waits for minimum this much duration
to receive pending rx frames from current BSS before
switching to new channel for handoff to new AP.

Pass value of ho_delay_for_rx to fw in case of roam
offload.

Change-Id: I19141928a2885371bc1b9e7b720473d99c4ebb1d
CRs-Fixed: 2221755
2018-04-16 16:57:10 -07:00
Shaakir Mohamed
5369725a35 qcacmn: Fix FCS error flag set in radiotap header
Fix FCS error flag set in radiotap header

Change-Id: I55210587d07f3deabebb4dc65caa835127a6b8e5
CRs-Fixed: 2213773
2018-04-16 16:57:07 -07:00
Shaakir Mohamed
19f4f63c35 qcacmn: Fix AMPDU status info in radiotap header
AMPDU flag check is not present when radiotap header is updated.
This fix will check for rs_flags to check and set AMPDU present

Change-Id: I9e0a703a46459b1013af092f8cb8b7cd35f1a3ce
CRs-Fixed: 2204278
2018-04-16 16:57:05 -07:00
Kabilan Kannan
2c0da266be qcacmn: Block WMI cmds before issuing HTC stop
WMI cmds should be blocked, before calling HTC stop
to avoid the race condition in the system

Change-Id: I015b154a3bc422f50d4ed82bc861dd9e054c47a3
CRs-Fixed: 2194234
2018-04-16 16:57:01 -07:00
Disha Das
9d600faa11 qcacmn: Check EXT_IV bit for PMF frames only
Non PMF frames are being dropped due to incorrect buffer
length check. Modifying the check only for PMF cases

Change-Id: Iead56b199de6c14b3a569a4f1a537553e9325bc8
2018-04-16 15:16:26 -07:00
Aditya Sathish
6add3db0d6 qcacmn: Fix Multicast RX Bytes and TX Packet Value in Node Stats
Fix for setting the right length when incrementing Rx Multicast
Bytes value

Fix for incrementing the Tx multicast packet value by correctly
returning the peer pointer to the stats function.

Change-Id: I46d59b7a71936d6eefdcba4419d0737f70aa4d48
CRs-Fixed: 2220973
2018-04-16 08:48:08 -07:00
Disha Das
76210cdb35 qcacmn: Fix for buffer overflow KW issue
Fix for buffer overflow check as igtk key may use
index 2

Change-Id: Id496147633c307dbed62e643a770d17ef6c6805b
2018-04-16 00:24:33 -07:00
Santosh Anbu
9d32d1dfc5 qcacmn: Move retrieval of wmi_handle to target_if layer
Remove inconsistent API for scan start and stop, where pdev_wmi_handle
is derived from psoc_handle at the WMI layer instead of using
the wmi_handle passed from the above layer i.e target_if

Change-Id: If259260e6f8cf77bf68748a8130db4440b88588a
CRs-Fixed: 2203048
2018-04-15 23:15:26 -07:00
Abhijit Pradhan
2415cf38c2 qcacmn: Add regulatory update-26 to reg db
Add Regdomain: ETSI14.
Add Regdomain pair: ETSI14_WORLD.
Change regdomain of Qatar to ETSI14_WORLD.
Change Japan ISO country code.
Remove Non-ISO JAPAN countries.
Remove Ch.144 and related straddle channels in APL9.
Increase 5.25-5.35 power in APL9.
Increase MKK5, MKK11, MKK16 powers.
Add channels and increase power for ETSI9.
Add 5GHz mid channels and increased power for FCC14.
Change regdomain of Mauritius to ETSI1_WORLD and ETSI13_WORLD.
Change Egypt Country Flags to allow VHT80, VHT160.

Change-Id: I10abf9f2edcb2d3f9a941ffc6b9188002d83973a
CRs-Fixed: 2216647
2018-04-14 21:55:51 -07:00
Abhijit Pradhan
3c843340f8 qcacmn: Assign radar table for ETSI12 and ETSI13
Assign appropriate ETSI 302-502 Radar Pattern for ETSI12 and ETSI13.

Change-Id: I87e04f1bda919698c3dcca990a07252a0b881190
CRs-Fixed: 2223516
2018-04-14 21:55:49 -07:00
Sravan Kumar Kairam
5951a618f8 qcacmn: Remove pld smmu platform API from QDF
As part of SMMU QDF cleanup remove platform pld API from
QDF.

Change-Id: Ib257969257e88b4f6a73c661b270924ce07bf398
CRs-Fixed: 2202910
2018-04-14 15:42:03 -07:00
sumedh baikady
eca2de6c6d qcacmn: Fix KW Null dereferencing issues
Fix static analysis KW issues related to
NULL dereferencing.
CRs-fixed: 2220248

Change-Id: Iecf37218782133eaf94f81d975478d71e308eca3
2018-04-14 10:18:02 -07:00
Orhan K AKYILDIZ
c6b4a7be50 qcacmn: Fix a race btw tx and tx-compl
While handling a multi-segment TSO packet, there is a race condition
where, if tx complete arrives fast enough, the un-sent TSO segments
may be lost forever and a previously sent segment would be attempted
to be sent over.

Fix the race condition. Dont use the entry after send to go to
next entry.

Change-Id: I023587a48bea6f3b58aac62e398cc15939bbb773
CRs-Fixed: 2174715
2018-04-14 07:37:57 -07:00
Dustin Brown
cb94e45a0e qcacmn: Add qdf_list static initializer macros
In order to use qdf_list in situations where static initialization is
preferable, add a number of macros for statically initializing the
qdf_list structures.

Change-Id: I9a1291d495e7940b57d8519da0e3d62a0dfd2064
CRs-Fixed: 2222980
2018-04-14 07:37:55 -07:00
Shashikala Prabhu
f667999f9a qcacmn: Add compile time macro for scheduler queues in regdb
WIN does not use scheduler queue in regdb. Hence, do not compile
scheduler queue in regdb.

Change-Id: I9694a1780cd65ac2360044152cf7d13748fbe8cc
CRs-Fixed: 2223207
2018-04-14 07:37:52 -07:00
Abhijit Pradhan
2ed63d0e1a qcacmn: Reset delayline even for zero bin5 radars
It is valid for dfs->dfs_rinfo.rn_numbin5radars to be 0. If it is zero
then the malloc returns NULL and we skip dfs_reset_alldelaylines.

Skip dfs_reset_alldelaylines in case of non-zero malloc failures. Also
move the dfs->dfs_b5radars NULL check just before accessing
dfs->dfs_b5radars memory.

Change-Id: I0aba9d2357672e2c5bc6c5c3857cb06194381e2f
CRs-Fixed: 2215846
2018-04-14 07:37:50 -07:00
wadesong
73deb9aa73 qcacmn: Populate BSS peer pointer for P2P GO
BSS peer pointer is currently not populated to P2P GO vdev during
peer attach, which will result in an assertion in function
wlan_objmgr_peer_get_ref once a remote peer object is created for
the same P2P GO vdev.

Populate the right BSS peer pointer to the P2P GO vdev during
peer attach.

Change-Id: I8d98d3b1c51d28dcda1ed0feadee30229c74dc9c
CRs-Fixed: 2218195
2018-04-14 07:37:47 -07:00
Abhishek Singh
c176a5241b qcacmn: Use cookie instead of bool to check if scan node is active
Currently bool is used to check if scan node is active or not, and
if it is active the deletion can happen. Now if two thread tries to
delete the same node at same time, the first one to get the node
will delete the node and set the active bool to false. If the
delete operation leads to node being freed, the 2nd thread when gets
the lock tries to check the bool, if node is active and then return
if node is not active.

Now if before the 2nd thread check the bool, the memory is reallocate
and the byte pointing to the bool is overwritten with non-zero value
the 2nd thread will assume that node is still active and try to delete
and access an already freed node.

To fix this use cookie instead of bool to check if scan node is active.

Change-Id: Id6b9dc9d0ff8f091eef0bd648abc9d3198c3ad4b
CRs-Fixed: 2219667
2018-04-14 07:37:45 -07:00
bings
beb9318263 qcacmn: Adjust the bin5 rssi threshold in radar filters
Radar bandwidth detection at certain frquencies is reported to
be lower than the acceptable threshold.  This is due to the low
rssi reported in the phyerrors.

Fix the issue by adjusting the rssi threshold accordingly.

Change-Id: Id00e6ae4722d1f4c820037a4014a86953abc6650
CRs-Fixed: 2224053
2018-04-14 07:37:42 -07:00
chenguo
ec84983f42 qcacmn: Correct BW statistics printing for txrx_stats commands
BW statistics of TX is wrongly mapped as below:
80M counter ==> 20M counter

Make below correction:
20M counter ==> 20M counter
80M counter ==> 80M counter

CRs-Fixed: 2221744
Change-Id: Ic362e550b9f1a0a24d8ba646a885d04baea53d8d
2018-04-14 04:53:22 -07:00
Rachit Kankane
a798a593e0 qcacmn: decrement ref count for P2P CLI
Decrement the reference count when peer type is P2P-CLI thereby
avoid memory leak whenever P2P-CLI disconnects in object manager.

Change-Id: Idaf2910c39b316dcea46f9be39df420d71bab8d6
CRs-Fixed: 2222320
2018-04-14 04:53:19 -07:00
Shashikala Prabhu
7edbb05f11 qcacmn: Temporary WAR to bypass beacon channel mismatch check
For 4.9GHz, firmware converts the frequency to old regulatory channel
numbers and sends it to host. But host uses new regulatory channel numbers.
Since the received fw channel and beacon channel number is different,
host drops the received beacon and scan entry doesnot get updated.

As a temporary fix, bypass the beacon mismatch check in host.

Change-Id: Ib3e6b7b39ef2feaa1bcf0e0b16a702caccbf6744
2018-04-13 14:51:34 -07:00
Shashikala Prabhu
48ecda84bf qcacmn: Fix 4.9GHz cfg80211 issues
Send correct channel list to Firmware. When cfg80211 is enabled, STA
is scanning in a set of wrong channels. When scan callback happens
from cfg80211 module the cfg80211 module gives us the channel numbers.
There are some channel numbers which are same in both 5GHz and in
2.4Ghz bands. For example, channel number 1 maps to frequency 4942MHz
in 5GHz band, but in 2.4GHz band channel number 1 maps to frequency
2412MHz. So cfg80211 may give us a wrong channel number. Since we have
the exact frequency of the channel we should use that instead of the
one given by cfg80211.
The channel object given to the driver by cfg80211 during scan callback
is the same as the one registered to cfg80211 by the driver. So we can
use the channel frequency inside the channel object for scan which is
not changed by the cfg80211 module.

Use regdb function to convert channel number to frequency while receiving
scan entries from FW. Use pdev band (5/2.4GHz) information to map to
correct 2.4Ghz/5Ghz channel frequency.

Half/Quarter rate flags in the scan_ctrl_flags are not set. Set
Half/Quarter rate flags in scan_ctrl_flags.

Change-Id: I9df8f0e90938f86f6987574f8259a5cf66b672aa
CRs-Fixed: 2180273
2018-04-13 14:51:30 -07:00
Naveen Rawat
685bf25eb3 qcacmn: Move hdd_request_manager to qcacmn osif layer
Move hdd_request_manager to qcacmn osif layer, which will be used
by CP_STATs component.

Change-Id: Iebf7f9d259793b56cc70c5b3f9dec14a5ef35b25
CRs-Fixed: 2220035
2018-04-13 12:16:03 -07:00
Dustin Brown
3cb98124c1 qcacmn: Fix NBUF_MEMORY_DEBUG PERF build error
qdf_net_buf_debug_init/exit() are defined when NBUF_MEMORY_DEBUG is
disabled, but they are not declared in the nbuf header file, leading
to build errors for PERF builds. Make qdf_net_buf_debug_init/exit()
static inline stubs when NBUF_MEMORY_DEBUG is disabled.

Change-Id: I4180086f27873a48cb965abed21f4bca2a4ca3a1
CRs-Fixed: 2222969
2018-04-13 09:30:45 -07:00
lifeng
ae63a5be24 qcacmn: Export antenna info to the userspace
qcacld-2.0 to qcacld-3.0 propagation
Discard the original wmi interface:
WMI_PEER_ANTDIV_INFO_REQ_CMDID/PEER_ANTDIV_INFO_EVENTID,
replace with the new one:
WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID/WMI_PDEV_DIV_RSSI_ANTID_EVENTID
to support chain value along with corresponding antenna info.

Change-Id: Ie9ea9d160e1ac1e2e65de422c85989159fb5a556
CRs-Fixed: 2220759
2018-04-13 09:30:42 -07:00
Kiran Kumar Lokere
cbb21ca115 qcacmn: Add wifi test config attribute for HE LTF config
Add wifi test config attribute to configure HE LTF.

Change-Id: Id7e8919a983d47e661b71c032c99fed69e010323
CRs-Fixed: 2221172
2018-04-13 09:30:39 -07:00
Naveen Rawat
70fd32e41b qcacmn: Add new files for cp_stats mobile connectivity component
Add file for mobile connectivity to use control path stats component.

Change-Id: I11ba1103745371ebf740ee2ec06dd04912afa7c9
CRs-Fixed: 2210307
2018-04-11 10:52:45 -07:00
Venkata Sharath Chandra Manchala
e37bc4601e qcacmn: Add stats counters to account for Error packets
Retrieve length from every htt msg to
parse the tlv's from the htt msg and also
add statistics counters to account for error
packets in Rx path.

Change-Id: I17105174734975dc0d5093c587697346a8ada725
CRs-Fixed: 2214594
2018-04-11 09:15:22 -07:00
Shiva Krishna Pittala
b155431361 qcacmn: Fix the limitations in enabling memory debug on WIN
Copy the file name to a QDF local array, rather than using
the pointer to file name, to avoid access to the invalid pointer.
Also, separate out SKB debug from memory debug.
SKB debug will be enabled once the SKB related false positives are fixed.

CRs-Fixed: 2216661
Change-Id: I0ada1acb84c24c961cf614c9c47261f272959874
2018-04-11 09:15:20 -07:00
Om Prakash Tripathi
8a4564f221 qcacmn: Add support to restrict scan to preconfigured chans
Some times we need to scan only some pre configured
channels irrespective of channels requested in scan
start command.
Add support for pre specified list of scan channels
and scan only these channels if configured.

Change-Id: I7fa9ef9d626fd25d7855a7eb458818d8e2314fa5
CRs-Fixed: 2218494
2018-04-11 09:15:18 -07:00
Liangwei Dong
b17e0bce59 qcacmn: Fix OPPS set failed on p2p GO
Find the correct P2P GO vdev and update
the vdev_id to ps_config before set opps
parameter to Firmware.

Change-Id: Ie5435de8330f6e9c13f645e19d80cbd97f1f027d
CRs-Fixed: 2203066
2018-04-11 09:15:15 -07:00
Subrat Mishra
65817ac2d7 qcacmn: Avoid NULL pointer dereference
Avoid NULL pointer dereference in wlan_crypto_fils_delkey()

Change-Id: I2425365f7e118b5ec72223905ce7d16437ee714d
CRs-Fixed: 2221348
2018-04-11 09:15:14 -07:00
Soumya Bhat
35fc699c0f qcacmn: Populate RX PPDU length
Add change to compute and populate RX ppdu length
from RX ampdu length.

Change-Id: I0e60764be1d3b0a0e69a8dc52cfb094a5df0f596
2018-04-11 09:15:12 -07:00
sumedh baikady
68450abc57 qcacmn: Fix peer NULL check in peer map handler
For FTM mode we receive peer map events without
peer created. This change checks for peer NULL case
to access peer vdev.

Change-Id: I1998e33ca3d9338dba939dc760dcf7bfdb70d1e3
Crs-fixed: 2212203
2018-04-10 18:43:55 -07:00
Shashikala Prabhu
e466b5a811 qcacmn: Use qdf spin lock bh in DFS component
Use QDF spin lock BH APIs in DFS component since
DFS can run in software interrupt context.

Change-Id: Id068b8e49023c52796b5d9ce76dac378b4ce4b1e
CRs-Fixed: 2218947
2018-04-10 02:33:25 -07:00
Zhu Jianmin
832737116d qcacmn: Fix scan db mem leak in race condition
During module stop, scan db is cleared before scheduler thread
stop, new beacon can be handled and scan node still can be added
into scan db after scan db clear in race condition, result in
mem leak.

Fixed by moving scm_db_deinit from ucfg_scan_psoc_disable to
ucfg_scan_psoc_close, which is called after scheduler thread
stop

To be symmetrical, move scm_db_init from ucfg_scan_psoc_enable
to ucfg_scan_psoc_open.

Call stack:

hdd_wlan_stop_modules
 ->hdd_deconfigure_cds
    ->cds_disable
       ->dispatcher_psoc_disable
          ->ucfg_scan_psoc_disable
             ->scm_db_deinit
 ->cds_close
    ->dispatcher_disable
       ->scheduler_disable
    ->dispatcher_psoc_close
       ->ucfg_scan_psoc_close

scheduler_thread
 ->scheduler_thread_process_queues
    ->scheduler_target_if_mq_handler
       ->target_if_msg_handler
          ->scm_handle_bcn_probe
             ->scm_add_update_entry
                ->scm_add_scan_entry

Change-Id: I911751a247ae3ccb489755c30ffbe078a93ca4db
CRs-Fixed: 2205354
2018-04-09 19:24:29 -07:00
Ruchi, Agrawal
1ca70f07c8 qcacmn: Resolve KW issues
Add NULL check for nbuf_clone after calling
qdf_nbuf_clone

Change-Id: Ibffff984b0ace3c5ea19fb72f0e56e041eba0b14
CRs-Fixed: 2209137
2018-04-09 13:35:24 -07:00
Mahesh Kumar Kalikot Veetil
9d240daf92 qcacmn: Fix architecture dependency
API arch_counter_get_cntvct()/arch_counter_get_cntpct() are
specific to MSM/ARM platform. Use proper compilation flags for
QDF to compile against other platforms.

Change-Id: I7fcc5d84cd205151d839d19dfdc3432cb289807d
CRs-Fixed: 2216035
2018-04-09 11:13:26 -07:00
Srinivas Pitla
fd3685537b qcacmn: change lock order to avoid deadlock
Acquiring parent lock with in child lock context can occur deadlock
as some caller can invoke API with parent lock acquired.

Change-Id: I8fab6226d9cafe6df20737f966be1063feebb603
CRs-Fixed: 2219624
2018-04-09 11:13:24 -07:00
Naveen Rawat
4ef4fb339c qcacmn: Process scan event for 11d only if event indicates completion
Process scan event for 11d only if event indicates completion. Else in
case of dequeue due to failure or timeout will also cause scan event
handling for 11d which might have undefined effects.

Change-Id: I9d3599a9c60bccebea8ded9922dd3ddf995d8d61
CRs-Fixed: 2210347
2018-04-08 16:08:51 -07:00