Commit Graph

314 Commits

Author SHA1 Message Date
Nandha Kishore Easwaran
8958351763 qcacmn: Add pdev_id in debug command
Added pdev_id in debug command in beacon/probe receive
path.

Change-Id: I223d7e43112d69951f53995b4759079ac7f0827b
CRs-fixed: 2378135
2019-01-16 10:37:53 -08:00
gaurank kathpalia
575539a9d8 qcacmn: Enable/disable first DFS channel scan through ini
Currently the driver includes all the DFS channels as part of scan
in the scan list, and thus not exclude the DFS channels in the first
scan for faster scan.

Fix is to check the ini, for first DFS channel scan, and then remove
the DFS channels from the scan list if the ini is enabled.

Change-Id: I43d5c87676d4e66706da3cc0029c60559b70d179
CRs-Fixed: 2378805
2019-01-14 21:47:34 -08:00
Abhishek Singh
00f80b6094 qcacmn: fix out of bound access of memories in wlan_cfg80211_scan
In wlan_cfg80211_scan the number of ssid, ssid length and number of
channels are not checked for max size of array and thus can lead to
Out of bound access of memories.

Fix is to add bound check before copying the params.

Change-Id: Ie6d4e546fb9c884d5988493b611ef7b217f0a95c
CRs-Fixed: 2375217
2019-01-13 11:26:48 -08:00
Abhinav Kumar
f9074e2c09 qcacmn: Cleanup INI CFG_DROP_BCN_ON_CHANNEL_MISMATCH
Initialize drop_bcn_on_chan_mismatch from INI
(CFG_DROP_BCN_ON_CHANNEL_MISMATCH) default value

Change-Id: I55c28aa5656ce6befe9cd3477ab0b14c99641cea
CRs-Fixed: 2375199
2019-01-13 11:26:43 -08:00
Bala Venkatesh
7a5bee08a9 qcacmn: Don't drop the beacon/probe resp if rates IE does not present
Currently, beacon or probe responses are dropped by the scan module
if the rates IE does not present. But, some AP's in 11n mode does not
add the rates IE.
So, it is not mandatory to have the rates IE in the beacon or probe
response.

Change-Id: Id57b2216c012d117cca1a3a2dbce9825d58b67c3
CRs-Fixed: 2376710
2019-01-13 11:26:40 -08:00
Srinivas Dasari
2f6d368c6e qcacmn: Add OSEN AKM support for HS-2.0
OSEN is a new AKM to support HS-2.0.

Change-Id: I43efc34d754c51c9a16584495523629d32c16c5e
CRs-Fixed: 2361375
2018-12-31 21:29:36 -08:00
Abhishek Singh
2ceaf3729a qcacmn: Disable adaptive dwell time in not connected state
Disable adaptive dwell time for scans in not connected state to
optimize host scans for fast connection.

Change-Id: I28f762c3ee44ffc20a7565ccc1d8e40f16aedb4e
CRs-Fixed: 2357888
2018-12-26 22:46:03 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Paul Zhang
5753f9bbe0 qcacmn: Refactor operatition to hostscan_adaptive_dwell_mode_no_conn INI
Ownership of hostscan_adaptive_dwell_mode_no_conn is changed from HDD to
scan module. So scan module doesn't have to rely on HDD to obtain the
INI setting.

CRs-Fixed: 2357888
Change-Id: If3c3d93f0e1763e778eb6e3e70e23231fb01a67e
2018-12-23 00:01:04 -08:00
Abhishek Singh
cdcec49770 qcacmn: Cleanup unused scan configs and params
Cleanup unused scan configs and params from scan module.

Change-Id: Icbc6ccf63071606e97d36c7efee65b5fd6c3f5f4
CRs-Fixed: 2369076
2018-12-19 18:52:22 -08:00
Sandeep Puligilla
5957f0030a qcacmn: Add concurrent cfg items of scan
Add following scan cfg items:
CFG_ACTIVE_MAX_CHANNEL_TIME_CONC
CFG_MIN_REST_TIME
CFG_REST_TIME_CONC
CFG_PASSIVE_MAX_CHANNEL_TIME_CONC

Change-Id: I5b20ea153269f32b503d6c9cd1667d8086148871
CRs-Fixed: 2364994
2018-12-13 13:21:25 -08:00
Abhishek Singh
502095b236 qcacmn: Add support to enable/disable scan with reason code
Adds support to enable/disable scan for psoc/vdev with reason,
so that multiple clients can enable/disable the scan at same time.

Scan will remain disabled till all clients enable it back.

Change-Id: I8d840b24210095accb56ac9a2697ec26e8a5eb17
CRs-Fixed: 2362093
2018-12-10 23:33:45 -08:00
gaurank kathpalia
0f9f019505 qcacmn: Fix memory allocation latency in beacon process
Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.

Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I0b15fd4924bb7d696a33adeb1875f1f9c277db18
CRs-Fixed: 2360624
2018-12-07 13:04:33 -08:00
Hariharan Basuthkar
738320eef9 qcacmn: Bring Up STA without dissociation when AP switches to DFS Channel
AP is configured to operate in Channel 100(HT80), and Zero Wait DFS
is enabled. Once PreCAC is complete on DFS Channels,inject radar in
Channel 100 and AP moves to another DFS channel 116 and beacons
immediately but station associated to AP still does a scan again.
When the station receives the Channel Switch Announcement from AP, it
dissociates from the AP and scans again.

Maximum Switch time Information Element can be used by the Station to
to know if the AP has done PreCAC on target channel. Maximum Switch Time
IE is part of AP's beacon and is the sum of CAC timeout on the target
channel and 1 beacon interval.

If PreCAC is done on target channel, the CAC timeout is zero and Maximum
Switch time IE is equal to 1 beacon interval. This element is sent to
Station along with Channel Switch Announcement. The Station receives the
maximum channel switch time element. If the value of maximum channel switch
time element is less then or equal to beacon interval, the station
associates with the AP seamlessly without dissociation. If the value of
the Maximum Channel Switch Time IE is greater than 1 beacon interval, then,
the Station has to dissociate from the AP since, ZeroCAC has not been done
by the AP.

Change-Id: I0301a68c1731cc268b9a6900258261034476446b
CRs-Fixed: 2330817
2018-12-05 03:57:51 -08:00
Harprit Chhabada
2de9f012bd qcacmn: Clean scan active and passive dwell time apis
Create ucfg apis in scan components for calling from hdd.
Move the scan apis to new file, wlan_scan_api.c

Change-Id: Iec08eddbba3066a4d781c988624d47749a75610a
CRs-Fixed: 2342892
2018-12-04 00:06:09 -08:00
Yeshwanth Sriram Guntuka
dca006cecc qcacmn: Remove ssid check for finding scan dup entry
Probe responses received from hidden AP after beacons
with non-zero ssid length will use a new entry in scan
db resulting in multiple scan entries for same AP.

Fix is to remove ssid check in util_is_scan_entry_match
api.

Change-Id: I1c094d483a40d40f7ca9d40b26d04a7f80099dd1
CRs-Fixed: 2353339
2018-11-29 18:12:24 -08:00
gaurank kathpalia
a6076f692d qcacmn: Fix scan policy type in default scan case
The driver has a default scan policy type of DBS scan
which is not overwritten in case of DBS disabled.

Fix is to have a default of NON-DBS scan, and overwrite the
scan policy if the low power, low span scan is triggered,
or if the DBS is disabled from ini.

Change-Id: I8c95b2ca5915e1a74ccdeae55dea5e65bcfe9664
CRs-Fixed: 2354103
2018-11-29 18:12:21 -08:00
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
Abhishek Singh
1b28621e9d qcacmn: Call scan failure callback in case scan is not serialized
In case scan req is not serialized in some case failure callback
are not called and thus the requestor might not get this callback
and thus might not clean up its states.

Fix this by calling failure callback in case scan is not serialized.

Change-Id: Ife2f22a71fc3fcf60ef96209ec179594ab60c074
CRs-Fixed: 2343144
2018-11-01 22:34:34 -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
Ashish Kumar Dhanotiya
0e1895a859 qcacmn: Add mtrace logging for scan request
We are transitioning to new logging infrastructure
by using existing mtrace functionality.
Add new logging for complete scan request and response path.

Change-Id: Iac644a78ef521721d33ce7568be56b47c55fed6b
CRs-Fixed: 2308272
2018-09-12 00:14:17 -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
Sandeep Puligilla
b2b84401a8 qcacmn: Modify debug log levels in P2P/TDLS/SCAN
Change debug message log level info/error/warn
to debug.

Change-Id: Ib8c5606b67ee653532489db876482b377c93e73c
CRs-Fixed: 2303185
2018-09-05 16:45:45 -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
Nirav Shah
1b9674e21e qcacmn: umac: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
2018-08-14 21:44:21 -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