Commit Graph

314 Commits

Author SHA1 Message Date
Om Prakash Tripathi
cc9b3a4856 qcacmn: Drop scan events if scan req not in active queue
Host driver forece fully frees scan requests in below cases:
1. vdev being deleted
2. command timed out
In above cases scan request is freed and scan module
posts scan cancelled event internally to registered handlers.
Drop any event received after scan is cancelled.

Change-Id: Id66b6cc6a400916af9bfaf0c09dbb92d7f27db4e
CRs-Fixed: 2123090
2017-10-12 14:22:16 -07:00
Manjeet Singh
c73cd7db11 qcacmn: Follow spec for NL80211_CMD_START_SCHED_SCAN
qcacld-2.0 to qca-wifi-host-cmn propagation

If no SSID are passed to NL80211_CMD_START_SCHED_SCAN cmd,
interface spec requires that an active scan is not needed.
Therefore a passive scan is now requested by cfg80211_sched_scan_request
for this case.

Change-Id: I1b1b9232ffb9d8d5c0bc9a1d75145d39c9fe9e6b
CRs-Fixed: 902092
2017-10-12 14:22:11 -07:00
Jeff Johnson
878533e29b qcacmn: umac: Replace instances of unadorned %p
Replace instances of unadorned %p in umac.

Change-Id: I7ae33c51405b31df24670dee3c98b6b4f1da9ab4
CRs-Fixed: 2111274
2017-10-03 16:02:30 -07:00
Abhishek Singh
b80af7e971 qcacmn: Select best candidate at first connection
Best candidate at first connection is a mechanism
to select best possible candidate for making Wi-Fi
connection based on the scan results provided.
Driver use Scan results to calculate score for each
BSS and select the best candidate to connect.

This enhances the user experience by connection
to better AP, based on certain parameters.

Change-Id: Iebb4ce009b23cae8ad7cbff83628e01633bbf3fe
CRs-Fixed: 2018585
2017-10-03 05:36:13 -07:00
Edayilliam Jayadev
4366deab01 qcacmn: Enable chan stat event by default for WIN
CRs-Fixed: 2114541
Change-Id: I38f022f7af1ac4dfb6c87f3a9b056495bfc16e83
2017-09-28 04:48:02 -07:00
Varun Reddy Yeturu
f56e59833c qcacmn: Configure MAWC NLO parameters from host to firmware
Get the MAWC based NLO parameters from HDD/UMAC and pass them to
firmware via target/if

Change-Id: I76d7c8677ee73f9a3c54b7af4943b74a6b23323d
CRs-Fixed: 2064837
2017-09-18 19:38:22 -07:00
Om Prakash Tripathi
1d1525db36 qcacmn: Add API to check if scan entry is from hidden AP
Add API to check if scan entry is for a hidden AP.

Change-Id: I51115eb1601754d3d920029687ab6211b351c48a
CRs-Fixed: 2106447
2017-09-18 03:31:37 -07:00
Sreelakshmi Konamki
77dd1efb64 qcacmn: Add support for PNO scan in connected state
qcacld-2.0 to qcacmn propagation

Add changes to support PNO scan in connected state to find better Ap's
based on rssi threshold, band and rssi preference.

Change-Id: I0744297cc5269f0fe37613247c911102e293d8e9
CRs-Fixed: 2000342
2017-09-08 15:46:55 -07:00
Shashikala Prabhu
76192e12a9 qcacmn: Register a DFS callback function to get AP CAC status
In Repeater AP scenario, when STA vap starts scan, it calls this
registered DFS callback function to get the AP CAC status. If the
AP vap is performing CAC, STA vap does not start SCAN.

Change-Id: Ifa3ad0298f1b04f3fffc915f20ff81ec0cc731bf
CRs-Fixed: 2096259
2017-09-02 00:17:42 -07:00
Sathish Kumar
7f9408bacc qcacmn: Add timestamp param and enable foreign channel exit in scan event
Add timestamp parameter in scan event received from FW to aid
in calculating dwell time and overall channel switch time in
off-channel operations.

Enable foreign channel exit event inorder to be notified
by FW through the scan event.

Change-Id: I4ba028756ee7db35f6528c0554b09c73087184a7
CRs-Fixed: 2056330
2017-08-31 00:20:20 -07:00
Abhishek Singh
7d30bf7ecb qcacmn: Use min rest time same as max rest time in SAP+STA case
In SAP+STA case the min rest time is 50 and thus during scan
possibility increases that the device is not present in base channel
during the time of beacon transmission and thus beacons are not
transmitted.

Thus if SAP is present the min rest time should be 100ms
max rest time), so that during scan device can come to base channel
and transmit beacons.

Change-Id: I6fa2ee57771d093fce7d63089797528f8f4bc409
CRs-Fixed: 2079803
2017-08-30 22:47:59 -07:00
Vishwajith Upendra
e098ebd3e0 qcacmn: FILS changes for scan path
Add changes to match FILS realm info present in FILS indication IE
with the connection info.

Change-Id: I1ed6081f3320ecee8f86f7d87597b343230923b3
CRs-Fixed: 2093637
2017-08-29 20:54:08 -07:00
Om Prakash Tripathi
6af738bb71 qcacmn: Init average rssi with frames rssi on receipt
Initialize average rssi with instantaneous rssi in
util_scan_unpack_beacon_frame intead of marking it as
DUMMY.

Change-Id: Ie2fd577feeb46d61915c6974d8c627acb31e8b81
CRs-Fixed: 2096979
2017-08-25 23:27:37 -07:00
Varun Reddy Yeturu
34a374603c qcacmn: Configure MAWC NLO parameters to the firmware
Get the MAWC based NLO parameters from HDD/WMA and pass them
to firmware

Change-Id: I16ce12d36df7f3ccab4db32b4d7f72a0f9762795
CRs-Fixed: 2064837
2017-08-25 18:46:30 -07:00
Gyanranjan Hazarika
b5d426d683 qcacmn: D1.3 support - Code changes for Ie-Id, Length and IE-Id Ext
D1.3 defines the IE Id, Length and IE ID Extension for HE CAP and HE OP.
Host changes to accommodate them.

Change-Id: Idc3848b5486d05807cdc2ca3fb45ac493243558e
CRs-fixed: 2095550
2017-08-25 16:46:27 -07:00
Tushnim Bhattacharyya
3441a08f56 qcacmn: Expand the use of gDualMacFeatureDisable INI
Few OEMs want DBS to be disabled for connections while
keeping DBS scan enabled.
Few OEMs want advance DBS scan features to be disabled.
Provide different value to gDualMacFeatureDisable INI item
to achive the goal.

Change-Id: Iddf5df23575a2f907bb8dbd0c37e03ff4ebbdea8
CRs-Fixed: 2068779
2017-08-22 08:40:53 -07:00
Rajeev Kumar Sirasanagandla
a3f4a29130 qcacmn: Add support to include selective scan IEs only
qcacld-2.0 to qcacmn propagation

Add support to include only selective IEs in probe requests in
order to improve user's privacy.

Change-Id: I59cf4181f60f5b4cd87a32fbcf29160d87ca59c8
CRs-Fixed: 1105495
2017-08-19 01:27:07 -07:00
Mukul Sharma
a17d5ecbf4 qcacmn: Add support of GCMP (128/256) support
Add support of GCMP (128/256) security ciper support.

Change-Id: I3c9cb3dc72cce0a2cae3e468d3c1f3c004e11adf
CRs-fixed: 2071087
2017-08-18 18:27:37 -07:00
Rajeev Kumar Sirasanagandla
d8d18f187a qcacmn: Add support to randomize probe req SA and Seq number
qcacld-2.0 to qcacmn propagation

Randomize probe request's source address and sequence number to
improve user's privacy.

Change-Id: I265f15476f1a23a268f159a44b6a3e4243fb9068
CRs-Fixed: 1105081
2017-08-14 20:07:22 -07:00
Om Prakash Tripathi
c3fcb680f1 qcacmn: Add support to update mlme info in scan db
Add missing support to update mlme related info in scan db

Change-Id: Ib69a07012536b9b423992f5f4199925febabcb91
CRs-Fixed: 2086351
2017-08-11 06:40:07 -07:00
Tushnim Bhattacharyya
b566893775 qcacmn: Add scan_ctrl_flags_ext to scan command
This change adds scan_ctrl_flags_ext to scan command
to support DBS Scan selection policy, adding policy
manager logic conditionally.

Change-Id: I424e107aac67fa5bac8ff72b023a5fe8c7e89bbc
CRs-Fixed: 2061031
2017-08-08 12:06:09 -07:00
Om Prakash Tripathi
51052df409 qcacmn: Fix average RSSI calculation of scan entries
Average RSSI calculation was incorrect as previous average was
not considered. Consider previous average along with new frames
raw RSSI while calculating average RSSI.

Change-Id: I529802baaf296fc1378a1e89fc0ac00dcc8336da
CRs-Fixed: 2087711
2017-08-06 19:45:59 -07:00
Ganesh Kondabattini
db183ccb8c qcacmn: Add scan_ctrl_flags_ext to scan command
This change adds scan_ctrl_flags_ext to scan command
to support DBS Scan selection policy.

Change-Id: I71727259c0b5984cfc8fd6157ed0066d3cd9b193
CRs-Fixed: 2061031
2017-08-06 14:48:06 -07:00
Kapil Gupta
de02d4f62b qcacmn: FILS indication IE changes
Add changes to add FILS indication info element in scan result.

Change-Id: I341c30fe23ac8bfe518752d783d23094cbc2ac98
CRs-Fixed: 2068436
2017-07-18 23:35:06 -07:00
Varun Reddy Yeturu
3c38ca8bcf qcacmn: Increase scan ageing init value for emulation
Increase the scan ageing timer value from 30 seconds
to 90 seconds for the initializer
SCAN_CACHE_AGING_TIME

Change-Id: I0131ab601de9c86b89449bddd721ac857862a5b5
CRs-Fixed: 2072461
2017-07-08 23:41:12 -07:00
Vivek
b02a649f89 qcacmn: Remove vdev/peer locks for trivial APIs
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
2017-06-26 23:32:22 -07:00
Vivek
5ec0bd3636 qcacmn: Remove psoc/pdev locks for trivial APIs
Remove psoc/pdev locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: Ib5769c2234c8d57f485c0eef5a4e3c61fa170508
CRs-Fixed: 2060880
2017-06-26 23:32:19 -07:00
Om Prakash Tripathi
4fa65d80b7 qcacmn: increase scan cache size to 1024 for WIN
Change-Id: I3798c5927ea557cb51c569aa41452b37acf1bc53
CRs-Fixed: 2065195
2017-06-23 07:42:01 -07:00
Abhishek Singh
af7e092d9a qcacmn: Fix connection failure with WEP AP
If AP was configured in WEP mode the scan module is not able to filter
the AP and thus connection fails.

Fix the logic due to which the AP was not filtered.

Change-Id: I03ee702875e867986e4bae635269a844914c8043
CRs-Fixed: 2057585
2017-06-19 00:45:55 -07:00
Nitesh Shah
b256bb0e81 qcacmn: Add support to send DBS Scan command to firmware
This change adds support to send the DBS Scan command to
the firmware.

Change-Id: I147855690f09af03a43f85f2e57626d7f73998de
CRs-Fixed: 2029402
2017-06-14 08:23:51 -07:00
Om Prakash Tripathi
62d0380257 qcacmn: Add flush callback for scan module
Components are required to provide flush callback to scheduler which
gets invoked for all pending commands in scheduler queue when scheduler
thread is going down.
Added flush callback for scan so that command cleanup can be done.

Change-Id: I990a5e14db1498e13a2eeeaa605b44593b8442f1
CRs-Fixed: 2056542
2017-06-10 23:00:27 -07:00
Dustin Brown
f3351d97d7 qcacmn: Expose scan_backoff_multiplier for NLO/PNO
For Network Listen Offload and Perfered Network Offload, the fast scan
period is multiplied by scan_backoff_multiplier after max cycles have
occurred. Expose scan_backoff_multiplier to consumers of the WMI API,
so this parameter can be configured.

Change-Id: I478fb61cd096d3496205f4ff556e180dabf99b77
CRs-Fixed: 2035201
2017-06-09 21:36:26 -07:00
Sandeep Puligilla
d9ac9a2abe qcacmn: Increase scan cancel sync time
Scan command timeout value is 30secs and scan
cancel sync waiting time is 5sec due to this
in failure scenario scan timeout callback is
getting triggered very late and causing crash
in HDD.

Increase scan cancel sync timeout value equal to
scan command timeout value.

Change-Id: I7b98d26ac5d97039714a431030e47c463d3a670e
CRs-Fixed: 2048167
2017-06-06 10:26:18 -07:00
Abhishek Singh
9f6058d24d qcacmn: Add support for PMO suspend and resume scan API
Register PMO suspend and resume scan API. In suspend API, abort
all pending scans.

Change-Id: Iec03383a958f1bf93d77a86c351532270c7fdcb8
CRs-Fixed: 2038163
2017-05-19 13:51:42 -07:00
Sandeep Puligilla
140c41ee36 qcacmn: Register scan rule callback with serialization
Register Scan rule callback API with the serialization module.

Change-Id: Ie578413a13bc7adcac0ed2a56d9574ad00b7e51c
CRs-Fixed: 2037248
2017-05-19 05:27:19 -07:00
Abhishek Singh
f95b9e4248 qcacmn: Add wait for cancel scan on pdev and vdev
Add cancel scan sync api which will wait for scan to be aborted on
pdev or vdev.

Change-Id: Ie02eb981154856cda38ef70f42fdfcf82bb88961
CRs-Fixed: 2038092
2017-05-11 02:13:25 -07:00
Bharat Bhushan Chakravarty
145d393444 qcacmn: SON convergence
1) Defined modularized public api for cdp module
to track inactivity and over load detection.
2) Initialization calls are added to attach and
detach SON specific api.
3) operating system specific calls are replaced with qdf calls.

Change-Id: I130d1e99208d6454f5d9888774534cc6d619ad83
2017-05-09 17:29:11 -07:00
Krunal Soni
5899b0a3da qcacmn: Init remaining scheduler_msg on stack before posting msg
Initialize scheduler_msg on stack before posting using scheduler API
such that un-used fields in message structure are initialized to 0.

Change-Id: Ic62e745667c487fd8ea923c89abd6e1a76908bdf
CRs-Fixed: 2034772
2017-05-03 03:06:32 -07:00
Krishna Kumaar Natarajan
7726378826 qcacmn: Update roaming candidate selection logic
Update roaming candidate selection logic to add weightage to 11ax
AP.

Change-Id: I7ae6702095d6da8e302e35577f5e4697b5e06d3a
CRs-Fixed: 2037840
2017-05-01 09:20:23 -07:00
Venkateswara Swamy Bandaru
851184b0e4 qcacmn: Add support to extract SRP IE in beacon
Added support to extract spatial reuse parameter IE in beacon receive.

Change-Id: Ia7ce2a58ae8b65cddd9b3f8d969bd95b459aab3e
CRs-Fixed: 2033106
2017-04-25 15:00:34 -07:00
Abhishek Singh
6e7489e3e8 qcacmn: Move user configured params from scan filter to scan params
Some user configured params are passed in filter during scan request.
Added them in scan defaults params and update them from user config.
Also use these params from scan def params instead of filters.

Change-Id: Ice2817c2f135289d7a3dbfa94c9c06263473ce2d
CRs-Fixed: 1095299
2017-04-25 13:02:22 -07:00
Om Prakash Tripathi
0078b78f06 qcacmn: add set/get APIs for max active scans
Add set/get API for max parallel active scans supported.
Max active scans allowed is set from ext service ready event
handler(8 as of now). Once FW announces this capability, FW
announce value must be used instead of hardcoded value 8.

Change-Id: I2af3a34c9f55f92c47aebbd12838a8d8fc6e3ba7
CRs-Fixed: 1095299
2017-04-25 13:02:21 -07:00
Om Prakash Tripathi
cdcbb39764 qcacmn: update average rssi in scan entry
If elapsed time since last rssi update for a particular
scan entry is smaller than a thresold, calculate a
running average of the RSSI values. Otherwise last RSSI
is more representive of the signal strength.

Change-Id: I4cbecc8b6bfbb73c272544114b063b25c26e14fe
CRs-Fixed: 1095299
2017-04-25 11:01:06 -07:00
Abhishek Singh
d9e8b4f531 qcacmn: Fix error while adding beacons with CSA IE
Fix error while processing beacon with CSA IE.
Log the event and add the beacon/probe with CSA IE in
database.

Change-Id: Ia7552460e91a50888ef04e0ebd79a0350dd16d1a
CRs-Fixed: 2033231
2017-04-25 08:57:35 -07:00
Sandeep Puligilla
c4e05fd98d qcacmn: scan get results failed during connect
Scan get results failed to fetch the filtered
results during connection.

Updated the sorting logic in scan database
management.

Change-Id: I81734f1f5b3a48ca65ea5b8ce717b4bec7265b27
CRs-Fixed: 2036864
2017-04-21 20:25:43 -07:00
Om Prakash Tripathi
f527f16e8e qcacmn: add refcnt and lock support for scan
1. Take reference count for vdev/pdev/psoc object before posting
   async message to scan component.
2. Take proper lock before invoking objmgr APIs which require locking.
3. Fixed few memory issues in failure cases.

Change-Id: I594b9ebf904c1c3b049a5d9d9e15679ac41599e7
CRs-Fixed: 1095299
2017-04-15 18:07:05 -07:00
Kapil Gupta
a6e44ca3bd qcacmn: Initialize scan_f_chan_stat_evnt from configuration
Currently driver is not initialize scan_f_chan_stat_evnt from
the configuration file which causes WMI_SCAN_CHAN_STAT_EVENT
to be always not included in the scan flag.

Add changes to initialize scan_f_chan_stat_evnt based on
ini configuration.

Change-Id: If6ea1d5c4efcc6d934daf00b537f25f0727ee55b
CRs-Fixed: 2031301
2017-04-11 11:46:29 -07:00
Abhishek Singh
8c6e82d763 qcacmn: Add PNO changes for converged scan
Adds PNO related changes for converged scan

Change-Id: Ia18e48645d511134698777b334348d68daf2dbee
CRs-Fixed: 1095299
2017-04-11 11:04:33 -07:00
Om Prakash Tripathi
d088a8a19e qcacmn: change scan API to pass pdev insted of vdev
Few components don't have vdev object but still they want to
receive scan envents on underlying pdev.
Change ucfg_scan_register_event_handler and
ucfg_scan_unregister_event_handler to accept pdev instead of vdev.

Change-Id: I5a7ea78b1470b89637d418de6b984e5d20007c9c
CRs-Fixed: 1095299
2017-04-11 11:04:18 -07:00
Anish Nataraj
da0e2f41b7 qcacmn: Add SCAN WAR for hawkeye emulation
Emulation being clocked at lowest rate,
SCAN and serialization timers are modified to handle
these scenarios

Change-Id: Ia937930483dbcd0268fd2fe2d0393e49f09b215f
CRs-Fixed: 2009490
2017-03-29 09:09:43 -07:00