Commit Graph

133 Commits

Author SHA1 Message Date
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
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
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
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
hqu
e131d31b8b qcacmn: Refine chan_list to chan_freq_list
Refine chan_list to chan_freq_list for below functions:

ucfg_scan_filter_valid_channel
scm_filter_valid_channel
scm_filter_channels

Change-Id: Ia1e82c5ac4cea4e48844b925e30947e945c40ee4
CRs-Fixed: 2570954
2019-12-02 07:19:47 -08:00
Shashikala Prabhu
9a8d2a2825 qcacmn: Cleanup direct attach specific scan code
Cleanup direct attach specific code from common files.

Change-Id: Ided7aa31c3d37ac71fdcf19de439a5e2ed739019
CRs-Fixed: 2571429
2019-12-02 02:09:14 -08:00
Sandeep Puligilla
e903f492d1 qcacmn: Update scan copy data API for RNR IE
Update Scan copy ie data API for RNRIE and MUEDCA IE

Change-Id: I1aa1acc3f921c10af2b2de0926f69542402da285
CRs-Fixed: 2566644
2019-11-24 22:35:51 -08:00
Sandeep Puligilla
d763fee333 qcacmn: Add support for 6GHz scan priority algorithm
Add support for 6Ghz scan channel list priority algorithm.

Change-Id: I63b0ddf384c4bd62a6a25feb7dfe4f80b5f85fbe
CRs-Fixed: 2564949
2019-11-24 22:35:35 -08:00
tinlin
aae613c904 qcacmn: Convert legacy channel usage
Modify the following API's code and parameters to make
sure it is using frequency instead of channel:

	csr_update_scan_entry_associnfo

Change-Id: Id289c2bd2e2cdf3f6a5e16028bbafb3df4049dac
CRs-Fixed: 2563874
2019-11-21 00:45:37 -08:00
Jianmin Zhu
69560e37c6 qcacmn: Replace chan list with freq list in struct scan_filter
To support 6G, replace chan id with frequency.
Replace channel_list and pcl_channel_list with
chan_freq_list and pcl_freq_list in struct scan_filter.
Change API scm_get_pcl_weight_of_channel to use freq.

Change-Id: I6e880986fb2dcb1fa7aa4f40d2e3f849e7e3af64
CRs-Fixed: 2561234
2019-11-18 10:33:09 -08:00
Sandeep Puligilla
b4b955e93c qcacmn: Add support for 6g scan hint
Add support for 6Ghz short ssid and bssid hint mechanism
as part of scan command.

Change-Id: I53a787d2a1406ffd658dc0765bae1e632b870b36
CRs-Fixed: 2559877
2019-11-09 19:10:34 -08:00
Sandeep Puligilla
aba2b0c42b qcacmn: RNR IE parsing support
Add RNR IE parsing support on scan module.

Change-Id: I7a0685f16a61a45910212b2d8fe5cbc12b5bd92e
CRs-Fixed: 2557271
2019-11-09 19:10:25 -08:00
Sandeep Puligilla
377595c534 qcacmn: Default value for 6G scan mode
6G Scan mode for AP platform is different
from non-ap paltform so modified default values
accordingly.

Change-Id: Ifdea76b449998ffa5e33ffedd30564bd8eda8d6a
CRs-Fixed: 2555441
2019-11-02 12:26:04 -07:00
Sandeep Puligilla
5939199242 qcacmn: Add 6Ghz scan mode CFG item
Add 6ghz scan Mode CFG item and funcitonality
0 - Remove 6GHz channels in the scan request
1 - Allow/Add 6Ghz PSC channels to scan request
2 - Allow/Add all the 6Ghz channels

Change-Id: I2f07c30e599ace4592ae02a88d86876725abbb5f
CRs-Fixed: 2517277
2019-10-29 06:56:10 -07:00
Shashikala Prabhu
a477ec2257 qcacmn: Add API to get SNR value from scan entry
Add snr and avg_snr variables to scan entry and populate these variables
while generating the scan entry.
Add API to read avg_snr value from the scan entry.

Change-Id: Ie19d5ad7c8debb35e9d278ec648bd6217b2f4099
CRs-Fixed: 2532369
2019-10-26 11:55:27 -07:00
Ashish Kumar Dhanotiya
75ccbd439c qcacmn: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: I33e31fa124cedfab31dd1827721a420ad6cdba07
CRs-Fixed: 2519512
2019-10-18 02:55:39 -07:00
Rhythm Patwa
7232cb187e qcacmn: Add support to parse 6GHz specific IEs
Add support to scan for the 6GHz band capabilities
IE and parse the IE. Added peer assoc param for updating
the minimum data rate advertised by the peer in 6GHz
Opration information.

Change-Id: Iebb4379d321832f3ed2bcd3174a54843fa2d497c
2019-10-16 21:54:30 -07:00
Ashish Kumar Dhanotiya
39c6d8bd13 qcacmn: Use freq in cfg80211_scan instead of channel
Currently in the scan path frequencies received
in the scan request are getting converted to channel
number and again converted to frequncies.

For 6GHz support in the scan path do not convert
frequency to channel number, instead use frequncies
received in scan request to send the scan command to
FW, remove the dummy conversion from chan to freq and
freq to chan.

Change-Id: Ieab7dded0678fac54796bba3b1b210c910f6173e
CRs-fixed: 2534897
2019-10-01 06:33:04 -07:00
Sandeep Puligilla
5e0d7addc7 qcacmn: Add 6G scan dwell time parameter in scan request command
Add 6G scan active and passive dwell time parameter to scan request

Change-Id: Idf50aa23d9dd856c076b1bc3f84e2b3c0ef2b289
CRs-Fixed: 2530498
2019-09-27 00:22:08 -07:00
Abhinav Kumar
e288a93d22 qcacmn: Documentation enhancement for wake_lock_in_user_scan
Update kernel doc for wake_lock_in_user_scan to improve
code readability.

Change-Id: I5a7a0fd8cb18d97d293e9896ed58b40a52e06e0c
CRs-Fixed: 2520906
2019-09-16 03:13:38 -07:00
Tushnim Bhattacharyya
689d670cc9 qcacmn: Clean up CONFIG_MCL for MAX_BCN_PROBE_IN_SCAN_QUEUE
Clean up CONFIG_MCL and add MAX_BCN_PROBE_IN_SCAN_QUEUE
in the defaul_defconfig file.

Change-Id: I5c79ed31609ae67545d7ddf4a649925d1d071b9a
CRs-Fixed: 2495605
2019-08-01 06:47:53 -07:00
Vivek
7047d0d1a5 qcacmn: Replace WIN/MCL from macro names
There are macro defined differenly for WIN and MCL
to pick up default INI value either for WIN or MCL.

The macro name uses WIN and MCL and also enabling the
right macro is controlled by CONFIG_MCL.

Replace the macro with CONFIG_AP_PLATFORM.

Change-Id: Ib5663532d45534cce1715ef06447116e2654e709
CRs-Fixed: 2484959
2019-07-10 07:24:26 -07:00
gaurank kathpalia
5f6876596b qcacmn: Cleanup the scan blacklist path
Currently with the support of Blacklist manager
component, all the blacklist, avoid list, RSSI-REJECT
list is maintained by the BLM, hence the filter logic
of the blacklist APs in the scan component is not
required.

Cleanup the blacklist BSSID APIs, and related functionality

Change-Id: Ic2f282d9ab7d6d30d87d9718a128cbd8446aff4c
CRs-Fixed: 2464191
2019-06-03 15:24:48 -07:00
bings
47c737dba8 qcacmn: Add ini to honour NL80211 scan policy flags
Currently dwell time is determined by scan policy flags from kernel.
Sometimes when we suspect the scan result is not full enough, we need
to set dwell time by force through ini.

Add ini to decide whether to honour NL80211 scan policy flags, so that
we can disable dwell time changed by scan policy flag from kernel.

Change-Id: Ia0b9f957a7de901513479522e008e4bcbd6b2c0e
CRs-Fixed: 2428630
2019-05-13 14:41:41 -07:00
gaurank kathpalia
c2dac1c92b qcacmn: Add filter logic according to timestamp in scan
Currently the driver does not have any mechanism to filter
out the scan results according to the age.

Add a logic in the scan filter API, to filter out the scan
result according to the age threshold, so that APs which
are older than a particular value are filtered out.

Change-Id: If3f4b372b28a0f75b1d70915df4e3e1a7e518931
CRs-Fixed: 2447988
2019-05-09 04:59:10 -07:00
Pragaspathi Thilagaraj
45a8c1e41f qcacmn: Support adaptive 11R BSS in scan
Adaptive 11r is a feature by which the network supports 11r
even though the bss doesn't advertise 11r. This is done with the
help of advertising vendor specific adaptive 11r IE and MD IE
in the beacon/probe. When vendor specific adaptive 11r
IE (oui 0x00 40 96 type 0x2C) is present in the beacon/probe,
and 1st bit of the IE data is  set to 1, then the BSS supports
adaptive 11r.

The BSS advertises, non-11r akm in RSN IE and user space will
send the 11r akm in the connect start. So the scan module
shouldn't filter out the candidate adaptive 11r supported BSS
with AKM mismatch reason.

Add changes in scan module to parse the Vendor specific adaptive
11r IE and copy it to the scan_entry ie_list. Check if
negotiated akm is non-11r akm, and the filter akm sent from csr
is a 11r akm (which is received from user space), then mark the
bss as matching.

Change-Id: I65f32c67016ad634f1592a7453e77aaf0c5a327c
CRs-Fixed: 2431074
2019-05-02 08:16:11 -07:00
gaurank kathpalia
5ba222aea6 qcacmn: Modify scan type for RRM scan request
Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.

Fix is to not update the concurrency params if the scan
request is of type RRM.

Change-Id: Ifbb4b45fc111851f544fd39187e4113bda5f7348
CRs-Fixed: 2436893
2019-04-27 01:01:53 -07:00
Abhishek Singh
bd80d5c8ba qcacmn: API to add scan entry without posting to scheduler thread
Add an API to add scan entry without posting it to scheduler thread.
This will be used to update the beacon/probe during roaming to new AP.

Change-Id: Ia53ba194032eb953c5b102b0cc406db12e58f42d
CRs-Fixed: 2435404
2019-04-15 16:34:20 +05:30
Abhinav Kumar
7d41a1740a qcacmn: Set default passive Dwell time to 110 msec
In order to minimize the probability of beacon miss,
increase default passive Dwell time to 110 msec.

Change-Id: I98b0f9a68787638787a45b9179dfeb9826777cde
CRs-Fixed: 2425379
2019-03-29 11:05:58 -07:00
Jeff Johnson
82eb21292d qcacmn: scan: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac scan replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I0127e39fb4278e9c8063e2b37e7b46a9311defe7
CRs-Fixed: 2420153
2019-03-26 17:16:52 -07:00
Sandeep Puligilla
949faf5f4d qcacmn: Add mbssid information to scan entry
Add MBSSID information to scan entry.

Change-Id: Icf1a61f37db4991c5ad8f8e5dc2d5f55252c98aa
CRs-Fixed: 2399996
2019-03-18 17:07:10 -07:00
Sandeep Puligilla
eb272d02d5 qcacmn: Refactor SCAN CFG item
Refactor CFG items
1. CFG_ENABLE_CONNECTED_SCAN
2. CFG_ENABLE_SNR_MONITORING

Change-Id: Ic7c995a3f2310df72841e2b99e01972ca50e2e01
CRs-Fixed: 2405697
2019-03-08 07:39:41 -08:00
Abhishek Singh
7062efab4c qcacmn: Fix Connection issue when AP change from hidden to non-hidden
If AP change its status from hidden to broadcasting SSID in its beacon
kernel drop the beacon entry as its confusing. Now during connection
driver try to update the entry in kernel and it fails and as kernel drop
the beacon the connection fails.

To fix this detect if AP changed its ssid type from hidden to
broadcasting and unlink the old bss from kernel in that case.

Change-Id: I10ec42749ebcd2ddea23f7f3a94d862124df156d
CRs-Fixed: 2410430
2019-03-07 20:47:10 -08:00
Bala Venkatesh
fbf6d922d6 qcacmn: Skip DFS channels in p2p scan
Add support for the INI gSkipDfsChannelInP2pSearch
to remove the DFS channels from the given scan list in
p2p scan.

Change-Id: I44a6208ab5f3ee062073550143e23e5800342376
CRs-Fixed: 2405191
2019-02-28 18:35:49 -08:00
Wu Gao
45c6576e42 qcacmn: Format ini descriptions about EGAP
The description about EGAP ini items is different to others, correct
them and use unified form.

Change-Id: I119721ad805cdbc2b3515eadafa36bdb35a4eb2c
CRs-Fixed: 2402450
2019-02-25 12:45:09 -08:00
Bala Venkatesh
7f726aa21a qcacmn: Add ini parameters to control the burst duration
Add ini parameters to control the scan burst duration in STA, SAP
and GO cases.

Change-Id: Ib9f0cdae660b6d425887fefebf9e64f9ac977593
CRs-Fixed: 2398746
2019-02-15 14:46:46 -08:00
Pragaspathi Thilagaraj
1e618d6444 qcacmn: Refactor legacy ini items
Refactor the below ini item to new converged cfg/ini
infrastructure:
CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME

CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME - move this to scm module

Change-Id: I2980b2f3f1f451c99ceb19df87fd254a0c919c9b
CRs-Fixed: 2394241
2019-02-11 07:38:31 -08:00
Pragaspathi Thilagaraj
522a2a90bd qcacmn: Move PNO related structures under compiletime flag
Move all the PNO related structures and CFG items under
compile time flag "FEATURE_WLAN_SCAN_PNO"

Change-Id: I0decb3e0a7cf009ce18ef08eae05734962f6f8c7
CRs-Fixed: 2382997
2019-02-08 04:03:44 -08:00
Pragaspathi Thilagaraj
9d9a3c492c qcacmn: Refactor scan related ini items
Refactor the following scan related ini items to scan module:
CFG_ENABLE_MAC_ADDR_SPOOFING - ini to enable/disable scan mac
randomization
CFG_SCAN_AGING_TIME - configure scan entries aging time.

Previously these values are populated in hdd and passed to
scan module through ucfg_scan_update_user_config() function.
With new cfg infra, the scan module can directly get these
values from cfg component.

Change-Id: I0dcbd8253ae46387dd44e68c86f0622f279ba501
CRs-Fixed: 2378985
2019-02-05 18:01:22 -08:00
Pragaspathi Thilagaraj
cc3af93f48 qcacmn: Converge PNO related ini items to scan component
Add basic infra to move the following PNO  to converged scan
component:
CFG_ENABLE_DFS_PNO_CHNL_SCAN 	 CFG_PNO_SCAN_SUPPORT
CFG_PNO_SCAN_TIMER_REPEAT_VALUE	 CFG_PNO_SLOW_SCAN_MULTIPLIER
CFG_PNO_CHANNEL_PREDICTION	 CFG_TOP_K_NUM_OF_CHANNELS
CFG_STATIONARY_THRESHOLD	 CFG_CHANNEL_PREDICTION_FULL_SCAN_MS
CFG_ADAPTIVE_PNOSCAN_DWELL_MODE	 CFG_SCAN_BACKOFF_MULTIPLIER
CFG_MAWC_NLO_ENABLED	         CFG_MAWC_NLO_EXP_BACKOFF_RATIO
CFG_MAWC_NLO_INIT_SCAN_INTERVAL	 CFG_MAWC_NLO_MAX_SCAN_INTERVAL

Change-Id: I81bdbd917969fc8a73e6e5359ca69f78acdf723c
CRs-Fixed: 2357605
2019-01-23 15:14:34 -08:00
Abhishek Singh
0c1dedb899 qcacmn: Add support to acquire wake lock during user scan
Acquire wakelock to handle the case where APP's send
scan to connect. If suspend is received during scan, scan will be
aborted and APP will not get scan result and will not connect.
eg if PNO is implemented in framework.

Fix is to avoid the system suspend by taking the wake-lock
during scan. Added INI wake_lock_in_user_scan to control this.
The INI is disabled by default.

Change-Id: I62fdbbcbc6f049cb4e36e774d5a417600a2dfa86
CRs-Fixed: 2381622
2019-01-22 12:40:20 -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
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
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