Commit Graph

156 Commits

Author SHA1 Message Date
Abhinav Kumar
45cff82c5f qcacmn: Block all new scan during suspend mode
After driver suspend some thread can still queue scan req
which will cause scan during suspend and WOW_ENABLE received
while SCAN in progress.

TO avoid this block all new scan during suspend.

Change-Id: I02ddc9b5e6ba5f1782d00e34f044ace34c54d0b0
CRs-Fixed: 2343385
2018-11-17 03:25:31 -08:00
Shashikala Prabhu
58b8be02d1 qcacmn: List 2G frequency list in scan_config command
scan_config command for 2G pdev was not listing 2GHz frequencies.
Fix frequency range check condition in is_chan_enabled_for_scan() to
include 2G frequency in the scan channel list.

Change-Id: I9883583505ab318328999c5cf2dd33e687a784b2
CRs-Fixed: 2350530
2018-11-16 13:34:42 -08:00
Abhishek Singh
fda72d751c qcacmn: Use objmgr API to get 1st vdev from pdev
If Vdev id is not present driver tries to get vdev with vdev id 0
from pdev. Vdev with vdev_id 0 might not be present on pdev so use
objmgr API wlan_objmgr_pdev_get_first_vdev to get the first vdev.

Change-Id: I2ae0d6056709339a8167582ec327269aa84c93f4
CRs-Fixed: 2349699
2018-11-15 05:11:12 -08:00
Abhiram Jogadenu
f5caeedb42 qcacmn: Fix memory leak in ucfg_scan_init_chanlist_params
Regulatory channel list is allocated memory while initializing,
but isn't being freed. This change will free the list and fix
the possible resource leak.

Change-Id: I4603271697603cdacbfe4cbf327faad8ce582715
CRs-Fixed: 2348117
2018-11-12 21:23:09 -08:00
Yeshwanth Sriram Guntuka
d8ee7699e6 qcacmn: Reduce scan time when in GO+STA MCC
Scan on STA interface is taking around 10 secs to
complete. There is a 7secs expiry time used in nl
which could result in scan results received for
the first 3secs, which are from 2G channels, to
be flushed.

Fix is to not set offchannel simultaneous feature
capability, decrease the active dwell time for 2G
channels to 40msecs and increase burst duration
to 240msecs when GO is active.

Change-Id: If014b2115048018432943d863bbe184beb498408
CRs-Fixed: 2340516
2018-11-06 22:40:03 -08:00
Harprit Chhabada
ab6c10d3bd qcacmn: Fix OOB read in util_scan_gen_scan_entry
qdf_mem_copy() is called in util_scan_gen_scan_entry() to copy the ssid
into scan_entry using a length of WLAN_SSID_MAX_LEN. Because the length
of ssid is only checked against the maximum value this will result
in an OOB read of up to WLAN_SSID_MAX_LEN bytes.

Change-Id: I150e7c7a75e7134cab1c4abeb799578166400461
CRs-Fixed: 2341004
2018-11-06 16:16:11 -08:00
Abhishek Singh
8d80aa857b qcacmn: Validate the scan requester id before un-registering index
In ucfg_scan_unregister_requester even if caller provide an invalid
requester id, the index is unregistered without checking if
requester id is valid.

Validate the scan requester id before un-registering the index.

Change-Id: I0e946b8c1bdb87b7929745bcd646076d2b664c38
CRs-Fixed: 2343177
2018-11-02 14:02:27 -07:00
Om Prakash Tripathi
628dfd3422 qcacmn: Add failure reason to default failure prints
Print failure reason and BSSID when parse failure happens
for better debugbility.

Change-Id: I383611472d3ca03d74cf55326fcc65d5c9417aee
CRs-Fixed: 2334809
2018-10-31 23:04:31 -07:00
Om Prakash Tripathi
a2f9c7c8b4 qcacmn: Update scan request with all channels
When scan is issued with 0 channels, use all valid channels
on underlying vap to scan. In essence 0 channel in scan
request is expanded to all supported channel list in scan
request by host driver.

Change-Id: Ie1677fa804b290bb1e4715244efb5789641260f4
CRs-Fixed: 2339615
2018-10-31 13:21:31 -07:00
Yeshwanth Sriram Guntuka
294ce1121a qcacmn: SSID with zero or space should be NULL ssid
Last frame received in scan before the connect is
beacon with NULL ssid with non zero length and ssid
is sent as NULL to supplicant after association. This
will result in supplicant to trigger disconnect
casuing delay in reconnection.

Fix is to consider ssid with zeros or spaces as null
ssid.

Change-Id: If96776ae85926948d714e975c3e9b4011e8a20b3
CRs-Fixed: 2330485
2018-10-27 00:11:44 -07:00
Abhijit Pradhan
0f0e27b597 qcacmn: Scan Failure Event for NOL Violation
On NOL violation during scan start, FW aborts the scan request and sends
the scan failure event.

CRs-Fixed: 2328894
Change-Id: I5b33a8f02122226b8980daaeedb13d727266e7e7
2018-10-18 02:17:13 -07:00
Bala Venkatesh
4f70bd3f3e qcacmn: Set active 2g channel dwell time to 0 for p2p scan
Set the active dwell time of 2g channels to 0 in case of
p2p search or listen.

Change-Id: I5d601d03ec30337022f582a5c0134e6b6c9e1550
CRs-Fixed: 2305409
2018-10-17 22:26:07 -07:00
Jeevan Kukkalli
1ef2b73707 qcacmn: Add function to read MDIE
Add function to return a pointer pointing to Mobility Domain IE
of a scan entry.

Change-Id: I61254bfc3de117a2d7cfb187665ac228c9ea383e
CRs-Fixed: 2311319
2018-10-09 06:12:28 -07:00
gaurank kathpalia
6d113e258a qcacmn: Fix BSS scoring params
Currently the driver calculates the nss score
based upon the max capability of the AP, and not the
hw_mde config which would be there after connection
for example, the driver calculates the score for a
2x2 11n AP, and 1x1 VHT (11ac) AP, it connects to the
11n AP in 1x1 mode, if a concurrent connection is
present, which affects throughput

Fix is to check whether the current AP channel results
in DBS or not, if yes then change the NSS to 1 instead of
2

Change-Id: I80e2af00044b760325eb1a51b09a45189d58a417
CRs-Fixed: 2271976
2018-10-05 17:39:46 -07:00
Dundi Raviteja
818801ab85 qcacmn: Relocate schedule scan plan parameters
Relocate schedule scan plan parameters to scan component.

Change-Id: Ia882a341fa569540582dcd6691217c7af9b528f8
CRs-Fixed: 2324159
2018-10-04 22:52:59 -07:00
Om Prakash Tripathi
feffc52d97 qcacmn: Delete unnecessary print "failed to post to sch queue"
Delete print "failed to post to QDF_MODULE_ID_SCAN" as it doesn't
gives any useful info. How many times failure has happened can be
read from __sched_dup_fail_count.

Change-Id: Id4ec411d5a32f09c971330e860b50d1a91e7c70b
CRs-Fixed: 2326611
2018-10-04 12:17:05 -07:00
Liangwei Dong
36462d50b8 qcacmn: add 11d periodic scan in host
Add periodic 11d scan in host for non-11d scan
offload hw. Periodic interval is controlled
by INI scan_11d_interval, default 1 hr.

Change-Id: I66d1e76a1c147fc52f0e18b6601d3be4b4973210
CRs-Fixed: 2314830
2018-09-28 10:41:34 -07:00
phadiman
8a32229408 qcacmn: Add rate limiting to scm prints
Heavy print from scan module slowing down
frame processing and caused the scheduler
buffer to be full causing buffer full assert

Move scm_err to scm_err_rl which will add
print rate limiting

CRs-Fixed: 2313262
Change-Id: I4eebe7eeb0e52e0858eb064717a5ce457ac891e2
2018-09-17 17:53:50 -07:00
gaurank kathpalia
d0499517e4 qcacmn: Add src, and dst id support in UCFG/HDD
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I37532d323a0945b522087a23a65396ba2899fb5b
CRs-Fixed: 2306011
2018-09-17 02:58:18 -07:00
Harprit Chhabada
61851e7f4d qcacmn: Initialize the struct variable
Initialize the cancel_scan_event variable used
in ucfg_scan_cancel_sync().

Change-Id: I120b14db6f31449136b74b28d452e029eace16cd
CRs-Fixed: 2313447
2018-09-14 12:18:23 -07:00
gaurank kathpalia
6a88d7bcad qcacmn: Add src, and dst id support in SCAN
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I1f543cd443ab8cb19bf36fb581041ed3393077e8
CRs-Fixed: 2306017
2018-09-14 08:16:54 -07:00
Harprit Chhabada
20ffac7774 qcacmn: Add CFG/INI items to extscan component
Add following extscan CFG items to common ext scan component

1.CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME
2.CFG_EXTSCAN_PASSIVE_MIN_CHANNEL_TIME
3.CFG_EXTSCAN_ACTIVE_MAX_CHANNEL_TIME
4.CFG_EXTSCAN_ACTIVE_MIN_CHANNEL_TIME
5.CFG_EXTSCAN_ALLOWED

Change-Id: Ib4e1acc2d1535f91a8dc084305cdf01f5d7f57f1
CRs-Fixed: 2292754
2018-09-12 17:57:22 -07:00
Liangwei Dong
44a7ab73f9 qcacmn: Add Drop beacon on Channel mismatch INI
Add ini drop_bcn_on_chan_mismatch, default: true.

The ini is used to decide drop the beacon or not
if channel received in metadata doesn't match
the one in beacon.

Change-Id: I6a25d472ae41f4a7f0bdb7a57002975938b2dc33
CRs-Fixed: 2312994
2018-09-12 17:57:07 -07:00
hangtian
71a0cfb91a qcacmn: Copy randomize configuration to sched_scan
Copy randomize configuration to sched_scan, for MAC spoofing.

Change-Id: I357ab5f601bf9e6b17389c621adb63f4977ac844
CRs-Fixed: 2293441
2018-09-06 07:20:02 -07:00
Yeshwanth Sriram Guntuka
0ab053e1e1 qcacmn: Reduce log level for few prints to debug
Change log level for few messages from info/warn/err
to debug.

Change-Id: I2fd3df21d70326301b39b91efdf827d6b391f4e3
CRs-Fixed: 2301926
2018-09-04 11:53:47 -07:00
Venkateswara Swamy Bandaru
a76abc45d7 qcacmn: Add supporting functions for extended capabilities IE
Add structures and supporting function get bit field value of extended
capabilities IE bit field.

Change-Id: Iff915320d71473310e2cbc0188508061b14a40f1
CRs-Fixed: 2296592
2018-08-23 03:54:55 -07:00
Vignesh Viswanathan
87a8e44583 qcacmn: Drop beacon/probe frames posted on Scan Queue if queue is full
Drop beacon/probe frames before posting on Scan queue if the queue
already has too many beacon/probes to process.

Also add scheduler API to get the queue size given the module ID.

Change-Id: I9153c7e77e74377863774b68e8163839e992358d
CRs-Fixed: 2298584
2018-08-21 01:51:29 -07:00
Om Prakash Tripathi
c341ca71a1 qcacmn: Fix multiple free of a single memory and memory leak in scan
MBSSID beacon support change 2371483 caused multiple free of
scan_list in failure cases. Also only memory for scan_list was
freed without freeing any scan entries in scan_list.
Fix multiple free of scan_list by multiple functions and free
each scan entry in scan_list before freeing scan_list memory itself.

Change-Id: I113391629f544b7accb9a4d1b7aaea11624e0d6e
CRs-Fixed: 2295311
2018-08-16 06:27:22 -07:00
Sandeep Puligilla
54d8b648ad qcacmn: Add support MBSSID feature
Add support to parse Multiple BSSID element
from Beacon and Probe Response frames and to
update the scan database.

Change-Id: If2c58529c4dca3d3866bd7f905d4a1b6983f468a
CRs-Fixed: 2274579
2018-08-07 18:10:41 -07:00
Arif Hussain
4c6f33a07e qcacmn: Add 2G channel active dwell time CFG/INI items
Add ini item to configure active dwell time of 2.4GHz band channels,
This will help to reduce AP search failure probability & hence
connection latency in 2.4GHz band channels especially in noisy
condition by increasing active dwell time.

Change-Id: I05259a8f1fd4a5c67da42e516721a01d32fa652e
CRs-Fixed: 2283692
2018-07-27 01:21:39 -07:00
Yeshwanth Sriram Guntuka
dad6b5beb3 qcacmn: Change log levels in scan component
Change log level for few scm and cfg80211 logs from info
to debug.

Change-Id: I595ddd54c51a601fa2e985c8a221c5dea2e698d8
CRs-Fixed: 2279511
2018-07-21 12:05:49 -07:00
Basamma Yakkanahalli
ab48ce3502 qcacmn: Fix connection issue with hidden ssid in DFS channel
Repeater AP failed to associate to Root AP with
hidden ssid in DFS channel.

Normally probe request is sent in passive channels if beacon
from AP is found. With strict passive scan, probe request is
not sent in passive channels even after beacon is found in that
channel.

If AP is configured in hidden ssid, Client/STA does not get the
Probe Response and thus, no SSID information is present in the
scan table to start authentication.

To overcome this, user needs to set the desired {BSSID, SSID} pair,
Example: Desired pair = {00:03:7F:AA:BB:CC, MOON1},
so that when driver receives a beacon it compares the
BSSID and updates the SSID field to update the scan table.

In general, we already set the ssid in sta configuration
But in this case, we also need to configure BSSID of the hidden AP.
This can be configured through iwpriv cmd.
Example: iwpriv athx conf_bssid 11:03:7F:46:03:17

Change-Id: I03e1efed1168c911fc8f6358d6ad8a8c0b40ba61
CRs-Fixed: 2274105
2018-07-20 09:31:14 -07:00
Abhiram Jogadenu
c7f6224588 qcacmn: Host changes to enable Scan Offset time
Pass offset value to the Firmware to support split scanning
of total dwell time in smaller chunks. Offset passed is
calculated from TBTT.

Change-Id: I8114acd1147d468aa6471f672307d8ea0ec8611d
CRs-Fixed: 2134748
2018-07-19 04:29:32 -07:00
Sandeep Puligilla
13699a1bd8 qcacmn: Add CFG items to scan component
Add following CFG/INI items to scan component(part-2)
CFG_SCAN_NUM_PROBES
CFG_SCAN_PROBE_REPEAT_TIME
CFG_ADAPTIVE_SCAN_DWELL_MODE
CFG_IS_BSSID_HINT_PRIORITY

Change-Id: Ib355d898260c660cd07103390adbfef921599c3d
CRs-Fixed: 2277184
2018-07-18 19:07:16 -07:00
Sandeep Puligilla
ba6526d5a5 qcacmn: Add CFG/INI items to scan component
Add following scan CFG items to common scan component

1.CFG_ACTIVE_MAX_CHANNEL_TIME:Max active dwell time
2.CFG_PASSIVE_MAX_CHANNEL_TIME:Max passive dwell time

Change-Id: I3aeed28a404984812ebbc56f2a8d28e7e9ab7de2
CRs-Fixed: 2277105
2018-07-17 22:44:24 -07:00
Rathees kumar Chinannan
b8f2d083bd qcacmn: Add support to extract Extender IE in beacon
Added support to extract extender IE in beacon receive.

Change-Id: I04ee63a6c1280e2e3858eb665c549de800d672f4
CRs-Fixed: 2258771
2018-07-10 15:40:06 -07:00
Jingxiang Ge
c5f0bd188c qcacmn: Bypass QBSS IE length check
Some old ap's QBSS IE length is 4Bytes, in latest 802.11e
spec, the expected length is 5Bytes.

If stop parsing beacon&probe with 4Bytes QBSS IE, DUT can't
scan and connect with AP, so change it to bypass QBSS IE
if AP uses the old format.

Change-Id: Ib6727f5f77c5e5543e862277e1d2d35273f62d59
CRs-Fixed: 2257707
2018-06-28 04:51:53 -07:00
Krunal Soni
3bdf380c03 qcacmn: Don't process scan command when vdev delete is in process
When driver performs vdev delete operation, it changes vdev state
to logically deleted or physically deleted only after receiving vdev
delete command's response from FW. In between (sending vdev del req
and receiving vdev del rsp) if thread gets pre-empted and other thread
start posting command (like scan command) to process then it could
lead to use after free scenario.

Notify scan component when vdev delete is intiated and let scan
component record that in to vdev's scan private object as one of the
flags.

check this flag before processing the scan command.

CRs-Fixed: 2261704
Change-Id: Id884d6c42cd8766e70835808863632e096158487
2018-06-27 16:14:24 -07:00
wadesong
d58eaf419e qcacmn: Fix incorrect indention
Fix the incorrect indention in function
util_scan_populate_bcn_ie_list, which causes newer versions of
gcc complaining.

Change-Id: I2ea0f2ea5bf3e381a789ae832f56a43d511e898e
CRs-Fixed: 2247021
2018-06-15 21:31:21 -07:00
Sandeep Puligilla
f57464c549 qcacmn: Add an API to check if scan is completed
Add a new scan util API to check if scan is completed and
if scan is success.

Change-Id: Id60056b999a7ec23df3d3458d4498d547f6ec4d9
CRs-Fixed: 2248972
2018-06-14 23:54:10 -07:00
Nachiket Kukade
49f9618acc qcacmn: Allow broadcast probe req for p2p scan with empty SSID
In case where driver receives a scan request with a single SSID with
an empty string, it must be treated as an active scan with broadcast
probe requests. In case of p2p search, driver treats this as a passive
scan. With this the P2P Client fails to detect existing P2P GO or
Autonomous GO devices, leading to connection failure.

Set flag WMI_SCAN_ADD_BCAST_PROBE_REQ for this type of p2p scan req.
P2P GO devices will respond to probe requests with wildcard SSID
and Cli will be able to connect to them.

Change-Id: Iacb44fb0cb5363f5af6cf7f6efb219857a799075
CRs-Fixed: 2235604
2018-06-14 11:47:05 -07:00
Om Prakash Tripathi
9b56f5dc1c qcacmn: Use atomic allocation for all scheduler context scan allocations
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.

Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
2018-06-13 21:00:59 -07:00
Wu Gao
dd58f63b13 qcacmn: pmo feature flag disable
In case PMO feature flag disable, add this change. Change
WLAN_PMO_ENABLE  to WLAN_POWER_MANAGEMENT_OFFLOAD.

Change-Id: I875e568dcb239da1b86d1a76cb8cbc925bb13cde
CRs-Fixed: 2243948
2018-06-08 08:31:10 -07:00
Dustin Brown
03f2ec07f7 qcacmn: Use configured value for channel_prediction
The scan component is currently using an unrelated field to populate
the PNO channel prediction enabled field sent to firmware. Use
channel_prediction instead.

Change-Id: I88b066c1b61e7ce49fcee889dfed9b1208d2862f
CRs-Fixed: 2252153
2018-06-06 20:28:36 -07:00
Rhythm Patwa
a6ba9eefb4 qcacmn: Add support to parse MU-EDCA IE from beacons
Made changes to add support for parsing MU-EDCA IE from beacons.

Change-Id: I6e9b76c82f9048858df3fe0c259182b5df070f30
CRs-fixed: 2247879
2018-06-01 14:54:05 -07:00
Jeff Johnson
090ee9206c qcacmn: umac: Fix misspellings
Address the following issues in the umac folder:
CHECK: 'defintions' may be misspelled - perhaps 'definitions'?
CHECK: 'destory' may be misspelled - perhaps 'destroy'?
CHECK: 'faild' may be misspelled - perhaps 'failed'?
CHECK: 'initilization' may be misspelled - perhaps 'initialization'?
CHECK: 'managment' may be misspelled - perhaps 'management'?
CHECK: 'muticast' may be misspelled - perhaps 'multicast'?
CHECK: 'ouput' may be misspelled - perhaps 'output'?
CHECK: 'segement' may be misspelled - perhaps 'segment'?
CHECK: 'successfull' may be misspelled - perhaps 'successful'?
CHECK: 'untill' may be misspelled - perhaps 'until'?

Change-Id: If60c276c134ef10ce6be26cd5a4036d53d5724b6
CRs-Fixed: 2241586
2018-05-19 19:40:48 -07:00
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
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