提交图

141 次代码提交

作者 SHA1 备注 提交日期
Sandeep Puligilla
593c110239 qcacmn: Scan duration is longer
Default scan type is configured as non-dbs
mode because of that scan is taking longer
duration to complete.

Modified default scan type to DBS.

Change-Id: I7f274ea34780b196fa0269968cb8ad76ee239c9f
CRs-Fixed: 2239341
2018-05-18 16:47:12 -07:00
Jeff Johnson
2b2ed37d86 qcacmn: Fix typo "doesnt"
Replace typo "doesnt" with correct spelling "doesn't".

Change-Id: I10c7e288056ca296d4e69ec7ad47404482cbf6f3
CRs-Fixed: 2238309
2018-05-17 00:47:39 -07:00
Sandeep Puligilla
008d66251d qcacmn: Add NULL validation check in tgt_scan_cancel() API
Add NULL validation check for psoc, pdev, vdev object pointers
in tgt_scan_cancel() API

Change-Id: I7853d8bba439d40a1413b951d8aa799c932b887c
CRs-Fixed: 2232802
2018-05-12 06:28:12 -07:00
Sandeep Puligilla
e4430b559d qcacmn: Add NULL validation check in tgt_scan_start() API
Add NULL validation check for psoc, pdev, vdev object pointers
in tgt_scan_start() API.

Change-Id: Ia5b6e5de26e4ad3386fbcef2fa1a5abb52198a1b
CRs-Fixed: 2232783
2018-05-11 22:40:11 -07:00
Sandeep Puligilla
659fecb9fc qcacmn: Dereference vdev object only after validation check
Dereference vdev object only after validation check to
avoid null pointer derefernce in ucfg_scan_get_pno_def_params()
API.

Change-Id: I88e9a206ef0a948c4b2e35b05ffd74aee82e2961
CRs-Fixed: 2232809
2018-05-11 13:23:05 -07:00
Krunal Soni
acd250c4af qcacmn: Add NULL pointer check in tgt_scan_pno_stop() API
Add NULL pointer check in tgt_scan_pno_stop() API.

CRs-Fixed: 2232787
Change-Id: I9b3c88af8d4d719a4a6fe097e7994ecd4bbddcbd
2018-05-07 06:37:02 -07:00
Krunal Soni
c61d48d886 qcacmn: Add NULL pointer check in tgt_scan_pno_start() API
Add NULL pointer check in tgt_scan_pno_start() API.

CRs-Fixed: 2232784
Change-Id: Ie63ac4eea9d45e9bf8ea305fd26abed1361a03f8
2018-05-07 06:36:59 -07:00
Om Prakash Tripathi
8e9beaef6b qcacmn: Change IE parse failure prints to debug level
In some environments its found that IE's received are not
as expected and console gets flooded with pare failure prints.
Move these prints to debug level.

Change-Id: Ic25bdff65f340f47179a7ac6dd79731b80c805ff
CRs-Fixed: 2232553
2018-04-29 23:44:07 -07:00
Vignesh Viswanathan
6ecd284e5a qcacmn: Add handlers for scan queue in scheduler core
Add scheduler message handler function for QDF_MODULE_ID_SCAN queue.

Also post scan beacon/probe frames and scan events to SCAN queue instead
of TARGET_IF queue.

Change-Id: I94e3ea2f0eb5c9592f5cfcd91738778fa65ba815
CRs-Fixed: 2214554
2018-04-23 00:30:55 -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
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
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
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
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
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
Tushnim Bhattacharyya
f940918d4f qcacmn: Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE
Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE.

Change-Id: Ia7a6bb5e05c6dac650dc6386734462547365a4eb
CRs-Fixed: 2214003
2018-04-02 16:41:50 -07:00
Abhishek Singh
dba772b9c8 qcacmn: Fix OCE WAN scoring logic for initial connection
Set the range of score index to 1-15 as 0 is used for the AP
which does not advertise the OCE WAN. Also if OCE WAN downlink
capability is 0 return 0 score.

Change-Id: I8c6757458c542050a6a31cb03fad0ce17d60aa16
CRs-Fixed: 2208282
2018-04-02 15:22:01 -07:00
Sandeep Puligilla
e062e82352 qcacmn: Never ageout connected AP scan entry
Connected AP scan entry is aged out if beacon
is not recieved within scan age out time.

Update mlme information of the connected AP/BSSID
scan entry so that scan age out hanlder will not
age it out even though the last beacon recieved
time is greater than the configured scan age out value.

Change-Id: I14c68c28459080623ca62c0bad9052e38d7fb348
CRs-Fixed: 2183379
2018-03-28 06:26:51 -07:00
Bala Venkatesh
2438a563c5 qcacmn: Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN
Add ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN option for the ini
gDualMacFeatureDisable. To enable DBS support for the
connection and disable DBS support for the scan.

Change-Id: I05c613467195fffac98e79b7e4a2991471ac1d80
CRs-Fixed: 2207820
2018-03-27 00:25:38 -07:00
Om Prakash Tripathi
581297b4d9 qcacmn: Fix null pointer dereference in scan
Make sure passed pointer is non null before accessing it.

Change-Id: I62fd051f13265070954d1e6ae7d9e9ea7efe3ba3
CRs-Fixed: 2212629
2018-03-26 16:32:26 -07:00
gaurank kathpalia
74f2a30e7d qcacmn: Modify dwell time and DBS scan based on scan request
Based on the scan request flags from kernel, modify the
adaptive dwell time and DBS scan request policy.
In high accuracy mode, disable DBS scan and adaptive dwell
time scan mode.
In a low power/span mode, enable aggressive adaptive dwell time
and DBS scan to save power and time.

Change-Id: I23498799c05a252cbc9c9f6d50b847130dd0ceac
CRs-Fixed: 2197171
2018-03-24 02:51:22 -07:00
Arif Hussain
6fcc790e98 qcacmn: Add correct api call to get proper boot time
Propagation from qcacld-2.0 to qcacmn
Missing changes from Ibcc628c315201fa3ced7e1ad96753772d91707b2

Currently to get clock boottime, qdf_get_monotonic_boottime_ns
api is getting used which does not include the suspend time.
To include the system suspend time also in clock boottime, use
qdf_get_bootbased_boottime_ns api which uses ktime_get_boot_ns
kernel api.

Change-Id: I4a9a783ce0cc164404d89c23d57b02746154aa46
CRs-Fixed: 2203527
2018-03-23 21:38:52 -07:00
Amir Patel
2b2435e564 qcacmn: Avoid memory use after free in scan node delete
Scan node del API is modified to check refcnt before
deleting node. Mark node delete with scan node del before
releasing ref to avoid get ref

Change-Id: I1cde576cd47eb4effe8af38c2d77f02a21349dfb
CRs-Fixed: 2208987
2018-03-21 03:39:33 -07:00
Om Prakash Tripathi
dc56b1e39a qcacmn: Detach scan object on release memory callback
Detach scan start request object from serialization object
on release memory callback. It's requred as some times
serialization ends up calling callback funtcions even after
calling release memory command due to race conditions.

Change-Id: Id0f74032de40bad679c27fe3e5ab1bf83e6dfcf5
CRs-Fixed: 2208227
2018-03-20 05:59:04 -07:00
Abhishek Singh
93809fdc42 qcacmn: Fix band scoring logic for 5Ghz channels
Use proper macro to check if channel is 5Ghz while calculating the
band scoring logic for 5Ghz channels.

Change-Id: Ib394f3ed0db6c64286a44b15c38fa3ffdcf8bdfb
CRs-Fixed: 2205658
2018-03-15 23:35:51 -07:00
Amir Patel
7c1a52ca7a qcacmn: Fix duplicate scan entry visit while iterating scan database
Add an API for inserting new scan node before duplicate node
and modification in API to flush oldest entry in SCAN database.

Change-Id: I76018c994ad16f7fb1e52bceafacd82f78f756e5
CRs-Fixed: 2168481
2018-03-15 08:05:09 -07:00
Abhishek Singh
deeaf6e9b2 qcacmn: Add logic to negotiate the auth and enc type depending on AP
In testbed sta mode the RSNE enc type and auth type may not match the
AP's enc type and auth type and thus the scan filter is unable to match
and find the AP.

Introduce auth and enc type as "ANY" in scan filter. With the auth
and enc type set as ANY, all the AP's matching the BSSID and SSID
will be filtered and the negotiated auth and enc type will be
dependent on AP's auth and enc type.

Change-Id: I82f07f68d9ec6c6f2104122a05d06a698c61a50a
CRs-Fixed: 2197222
2018-03-06 01:51:30 -08:00
gaurank kathpalia
1e6e00f350 qcacmn: Remove 11ax IE length checks
With IE length sanity check, that involved by Change-Id I9a091486,
11ax AP cant be found due to the addition of +1 byte in HE-operation
IE in latest spec of 11ax (D2.2).

Remove all 11ax extended capability IE length checks for now due to
11ax being under development.

Change-Id: I45d676325c72c8e0020ca52d094fb1652f8fcaf2
CRs-Fixed: 2197252
2018-03-05 23:33:35 -08:00
Abhishek Singh
a6157cfeb1 qcacmn: Avoid scan entry use after free in scm_handle_bcn_probe
In scm_handle_bcn_probe, scm_add_update_entry is called before
inform_beacon(wlan_cfg80211_inform_bss_frame).

Once scan entry is added to db, there is race condition that other
threads may remove it from db before wlan_cfg80211_inform_bss_frame
is called. Thus freed memory will be accessed in
wlan_cfg80211_inform_bss_frame.

To fix call inform_beacon(wlan_cfg80211_inform_bss_frame) before
adding the entry to scan DB and after updating required fields
from duplicate older entry.

Change-Id: Ib6dd967da9625ce944bffda5037b689ffd70903a
CRs-Fixed: 2197238
2018-03-05 04:28:16 -08:00
Om Prakash Tripathi
52402555cd qcacmn: Free raw frame pointer in failure path
Free raw frame pointer if scan node allocation fails.

Change-Id: If080f33cd85eb043c60c90c4170ae2ca4a161e0c
CRs-Fixed: 2194056
2018-02-27 15:08:00 -08:00
gaurank kathpalia
26f9833fb8 qcacmn: Send per chain rssi to upper layer
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.

Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
2018-02-27 01:57:52 -08:00
Abhishek Singh
46a383c663 qcacmn: Add scan filter to ignore PMF check for STA test mode
In testbed STA mode the RSNE may not match with APUT and thus
driver fails to filter AP from scan cache as PMF capability
mismatch.

With this change driver will ignore PMF capability check and
proceed with connection to send auth and assoc to APUT.

Change-Id: I195cda133c8d2b9d38b1d2966261c320185ffeca
CRs-Fixed: 2195352
2018-02-26 21:44:57 -08:00
Om Prakash Tripathi
5e47d43331 qcacmn: Add support to drop beacon if channel mismatch
Add support to drop beacon, probe response frames if frame
receipt channel and channel mentioned in IEs dont match.

Change-Id: Ib545f125dc53ccfb21abf6bdcb94a327ecde5a0a
CRs-Fixed: 2149224
2018-02-26 13:42:14 -08:00
Sandeep Puligilla
2850421a77 qcacmn: copy raw data length to new scan entry
scan entry raw data length is not populated
during the duplicate scan entry generation.

Copy raw data length to new scan entry
while duplicating the scan entry. This api
is triggered as part of the get scan results
handler.

Change-Id: Ie59782fd437415552b7ae29c1b190e86d4b72d48
CRs-Fixed: 2186845
2018-02-23 13:57:14 -08:00
Om Prakash Tripathi
fdaf38b849 qcacmn: Invoke beacon update callback before adding new entry
Invoke beacon update callback function before adding new entry
to scan list. It's required as get_scan_result API will end up
returning partially initialized scan entry.

Change-Id: Ia34f9c69b4eef2435b135912e06c39018a8987b8
CRs-Fixed: 2189783
2018-02-22 06:01:31 -08:00
akosigi
6e19edc1e4 qcacmn: Update function name and remove redundant code
Rename scan_tx_ops_register for consistency
Remove redundant lines of code in tx_ops registration

Change-Id: I3ade89f7eeb1f506f75b5c859dd4bc4242414628
CRs-Fixed: 2127952
2018-02-21 18:20:52 -08:00
gaurank kathpalia
7d65c1b32d qcacmn: Add individual length checks to Beacon Information element
Currently there is no individual length check to each IE, which
could probably result in buffer overead. Minimum length should
be checked for each varibale IE for avoid the same. Also some fixed
IEs should have a length check of not greater than the size of
their respective structures to avoid corrupting other IE data.

Fix is to add a length check to each individual IE to avoid
corrupting other IEs and also to prevent reception of any IE
of invalid length IE.

Change-Id: I9a0914861d7ff2871ac72ad7357ebbb7ef10eeb3
CRs-Fixed: 2183014
2018-02-13 05:47:44 -08:00
Om Prakash Tripathi
339dc26b21 qcacmn: Enable scan command time out if not disabled explicitly
1. Enable scan command time out for all commands if not disabled
   explicitly.
2. Remove QDF_BUG() for no serialization command buffers

Change-Id: I5357211ef6bc44f8ebd4b8acaa56a12f691fa46d
CRs-Fixed: 2175843
2018-02-13 03:55:25 -08:00
gaurank kathpalia
98d3395e7a qcacmn: Fix KWork issues in Scan component
Fix KWork issues (NULL pointer checks, pointer dereference)
in scan path

Change-Id: I1c66a99bbfc69202d24f288ccfbebd2811345ded
CRs-Fixed: 2160771
2018-02-12 23:51:06 -08:00
Padma, Santhosh Kumar
01548b7f5c qcacmn: Fix hidden ssid match in OWE
OWE SSID is hidden in OWE transition mode. When supplicant detects
connection to OWE transition mode, it issues connect with required
SSID to driver. But that ssid does not present in driver scan cache
as it is hidden. Instead of this ssid, driver scan cache has NULL
entry. This can result in connection failure due to mismatch in ssid.

In normal hidden ssid cases, supplicant issues scan with specific
ssid which helps to update driver scan cache with required ssid. SSID
is also hidden in OWE transition mode, but supplicant does not issue
scan with specific ssid which results in NULL entry in driver scan
cache for that SSID.

Fix this issue by explicit check for OWE if it is hidden.

Change-Id: I95e6b9af37e62c56b4b890090c33d53f89fed731
CRs-Fixed: 2185576
2018-02-09 07:45:42 -08:00
Yeshwanth Sriram Guntuka
f70a37bb90 qcacmn: Move wma_get_buf_start_scan_cmd to ucfg_scan_update_params
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.

Change-Id: I4c9dcb48b4862ad10f64e260d87938251e270185
CRs-Fixed: 2180960
2018-02-08 23:34:41 -08:00
Paul Zhang
ca6152167b qcacmn: Support 11d for non-offload platform
Support 11d for non-offload platform by maintaining
count of beacons encountered for each country code
and choosing country code with max votes as device's
country code.

Change-Id: I83b66e980854eded17e254386561fa32b1f8c4ac
CRs-Fixed: 2154048
2018-02-08 21:37:37 -08:00
Om Prakash Tripathi
7dd49fec17 qcacmn: scan all channels in A/G if 0 channels provided
When wide band scan is enabled, host configures all possible
channels with all possible phy modes. In his case if a scan
is invoked with 0 channels, target will end up scanning each
channel with all possible phy modes which increases scan time
exponentially.
If wide band scan is enabled and scan is issues with 0 channels,
configure target to scan all available channels only in 11A/11G mode.

Change-Id: I7c678ccf43c3238aacbfc59cc7e7bd19763453cc
CRs-Fixed: 2165025
2018-02-07 03:07:47 -08:00
Om Prakash Tripathi
f534bf9363 qcacmn: notify scan complete after comamd complete
Do command complete before invoking scan event handlers.
Its required as few scan event handlers check if scan is
active on underlying pdev which returns true as command
complete is not done yet.

Change-Id: Ia415b55e9c9a1cea71faa160c6b52c88dc8329a9
CRs-Fixed: 2180033
2018-02-02 07:46:03 -08:00
Abhishek Singh
c05285da8a qcacmn: Fix RSSI for the beacon received in adjacent channnel
Due to Rx sensitivity issue, sometime beacons are seen on adjacent
channel so workaround in software is needed. If DS params or HT
info are present driver can get proper channel info from these IEs
and set channel_mismatch so that the older RSSI values are used in
new entry.

For the cases where DS params and HT info is not present, driver
needs to check below conditions to get proper channel and set
channel_mismatch so that the older RSSI values are used in
new entry:
   -- The old entry channel and new entry channel are not same
   -- RSSI is less than -80, this indicate that the signal has
       leaked in adjacent channel

Change-Id: Ie9dc26f938b58b0c5d071ce4f2ba02b8e7fd4f60
CRs-Fixed: 2180012
2018-01-31 02:05:55 -08:00
Naveen Rawat
6f7ddcadb4 qcacmn: Avoid null pointer dereference and un-initialized data access
Fix possible null pointer dereference and un-initialized vairable access
in scan component.

Change-Id: Ide1adf2f53712fa987fdda8170eee4e95bff0036
CRs-Fixed: 2169517
2018-01-30 13:40:35 -08:00
Zhu Jianmin
cb80e2f5d2 qcacmn: Fix scan node use after free issue
For each scan node in db, real delete should be called only once.
If 2 threads are trying to delete a note, only one thread should
mark it delete and decrement the ref count and the other thread
should return. or use after free happens as some other thread is
still using it.

Change-Id: I8cfaea73f28f31406816c9fb38f6b65f6b50428d
CRs-Fixed: 2169890
2018-01-29 15:43:06 -08:00
Om Prakash Tripathi
3653ab5bee qcacmn: Pass back scan start request in scan events
Pass back scan start request in scan events so that
handlers can know parameters used to start underlying scan.

Change-Id: I8ca3d55edb266677cc636228919656baa12b43d9
CRs-Fixed: 2159700
2018-01-24 12:29:42 -08:00
wadesong
49ae4cbad4 qcacmn: Fix coding errors detected by gcc 5+
With gcc 5+ utilized for driver building, more coding errors are
detected, some of which are valid issues.

Fix all those errors in one shot.

Change-Id: I263c70d4bff9ec0c3076103001cd7f2ccc8e0d1a
CRs-Fixed: 2176076
2018-01-24 04:26:08 -08:00