Commit Graph

812 Commits

Author SHA1 Message Date
Govind Singh
19931aa1ee qcacld-3.0: Use host defined wmm params in wma layer
WMA layer needs to use host defined target params as
direct access of wmi target definition is not allowed.

Use host defined wmm params in wma layer.

Change-Id: I8af9c7802c20ce88a6fa158db5acab018807506e
CRs-Fixed: 2072166
2017-08-30 10:43:19 -07:00
Varun Reddy Yeturu
46ba20c1a4 qcacld-3.0: Add sanity check to avoid len overflow issue in WMI event data
In WMI/WMA, data from event buffer from FW is used without
sanity checks for upper limit in multiple places. This might
lead to a potential integer overflow further leading to buffer
corruption

Add upper bound checks for max limit of event buffer (1536)
in all affected places to prevent the potential integer
overflow

Change-Id: I30826bb69939bcf02ac850bd2d22ada4795b3c98
CRs-Fixed: 2091584
2017-08-30 10:42:15 -07:00
lifeng
d217d19d7e qcacld-3.0: Add vendor cmd to support antenna diversity
qcacld-2.0 to qcacld-3.0 propagation

Add qca_wlan_vendor_config attr to config antenna diversity.
Add vendor subcmd QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI
to get chain rssi value.

Change-Id: I75c4c8016b15772b0c52be91e446f69580475496
CRs-fixed: 1071075
2017-08-30 10:41:53 -07:00
CNSS_WLAN Service
05d84a2384 Merge "qcacld-3.0: Do not enable BPF offload if vdev is not up" into wlan-cld3.driver.lnx.2.0-dev 2017-08-24 10:50:30 -07:00
CNSS_WLAN Service
0b1e030366 Merge "qcacld-3.0: Add support of GCMP (128/256) support" into wlan-cld3.driver.lnx.2.0-dev 2017-08-24 10:50:26 -07:00
Mukul Sharma
05504acc13 qcacld-3.0: Add support of GCMP (128/256) support
Add support of GCMP (128/256) security ciper support.

Change-Id: I3c9cb3dc72cce0a2cae3e468d3c1f3c004e11adf
CRs-fixed: 2056168
2017-08-24 03:07:11 -07:00
Arif Hussain
f63f7a3dd8 qcacld-3.0: Add dummy event handler function for WMI_PHYERR_EVENTID
Currently there are no phyerror event handler either in cmn or cld code,
idea was to implement all DFS code in cmn code. Before enabling event
handler in cmn code need more testing on all the platform which are using
cmn project to make sure not to break radar detection. Until then add dummy
phyerror event handler in cld project. This is mainly to prevent crash due
to watchdog bark because of unhandled event console logs.

Change-Id: I37d652537dec9f6e2de7fd0abf56d4058697313e
CRs-Fixed: 2097256
2017-08-22 17:01:48 -07:00
Rajeev Kumar
900160260d qcacld-3.0: Do not enable BPF offload if vdev is not up
Add sanity check to reject BPF enable request if vdev is not up.

Change-Id: Id5c35811308b0dd6e360fd9d0e0262c35b63929f
CRs-Fixed: 2097134
2017-08-22 15:00:38 -07:00
Rajeev Kumar Sirasanagandla
aec0b08b54 qcacld-3.0: Add support to include selective scan IEs only
qcacld-2.0 to qcacld-3.0 propagation

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

Change-Id: Ib874af7ec2f5453282ffe0e8fc2e50934460b745
CRs-Fixed: 1086582
2017-08-19 01:27:13 -07:00
Abhishek Singh
2d775fd638 qcacld-3.0: Post non deferable LIM msg from WMA with high priority
As beacon and probe rsp are not deferred in LIM the non-deferable
LIM msgs from WMA may get delayed due to processing of beacons and
probe responses.

To Avoid this post the non-deferable LIM msg from WMA with
high priority so that they can be processed before beacons and probes.

Change-Id: Ida7cb86be397a415893142a318b75b41c13578b5
CRs-Fixed: 2090173
2017-08-18 21:27:15 -07:00
Krunal Soni
ca50b456ab qcacld-3.0: Update supported band from service ready extension
Current driver is updating supported bands from service ready event
but in new platform service ready extension is carrying the updated
supported bands.
Overwrite supported bands which have been given through service ready
extension event.

Change-Id: I128133c494e3831a0994d79fa8cb9b46d4f1788a
CRs-Fixed: 2090909
2017-08-18 18:27:43 -07:00
Poddar, Siddarth
2fb98079a9 qcacld-3.0: Add missing qdf_spinlock_destroy() to free debug cookie
Add missing qdf_spinlock_destroy() to destroy spin lock debug cookie
for SLUB build. For normal builds, qdf_spinlock_destroy() is a NO-OP
function.

Change-Id: Idccdc9f7acaea785a600e14304368f53ff7e17d7
CRs-Fixed: 2077964
2017-08-18 05:37:35 -07:00
Varun Reddy Yeturu
168134f94e qcacld-3.0: Introduce lookup_threshold_5g_offset INI item
Introduce lookup_threshold_5g_offset in WCNSS_qcom_cfg.ini
which will let the user to configure separate threshold for
5G band using this offset

Change-Id: I4975f74095a5fec0657666ba864ee436cbaed604
CRs-Fixed: 2093368
2017-08-16 17:37:01 -07:00
Varun Reddy Yeturu
69d44b28f6 qcacld-3.0: Reset bg_scan_client_bitmap after disconnection
Reset bg_scan_client_bitmap after disconnection so that the
roaming module does not keep getting the scan notifications
for other scans after disconnection

Change-Id: Ief8333f9802868d63c22977640bea49a2c69f4a8
CRs-Fixed: 2093219
2017-08-15 21:37:31 -07:00
Prashanth Bhatta
87b6dc0a9f qcacld-3.0: Change semantics of Runtime Lock APIs
QDF Runtime PM lock APIs semantics are changed. Incorporate the
changes done in QDF for all the Runtime PM lock APIs.

CRs-fixed: 1116549
Change-Id: Ia701378031b7e9c01583eaef403e1219fdce47e3
2017-08-15 13:27:12 -07:00
Deepak Dhamdhere
6adc08e0b9 qcacld-3.0: Check for invalid staId in ll stats clear operation
WMI_CLEAR_LINK_STATS_CMDID can cause firmware crash if vdev_id is invalid.
Add staId, i.e. vdev_id checks to sme_ll_stats_clear_req() and
wma_process_ll_stats_clear_req().

CRs-Fixed: 2078391
Change-Id: Ic713b17aebeb89bc0ab69c2e4040d9018d3dc095
2017-08-14 21:26:34 -07:00
Rajeev Kumar Sirasanagandla
686abd96f4 qcacld-3.0: Add support to randomize probe req SA and Seq number
qcacld-2.0 to qcacld-3.0 propagation

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

Change-Id: Ic367ce4578e65faf49e8092f0f8cce057eead728
CRs-Fixed: 1085995
2017-08-14 20:07:34 -07:00
yeshwanth sriram guntuka
ff6eafc63a qcacld-3.0: Do not update multicast counters when unicast packet is received
Currently both unicast and multicast counters are updated
when unicast packet is received if a multicast IP packet
is sent using a unicast MAC address.

Fix is to not update multicast counters when unicast packet is
received.

Change-Id: I6907a0cf51525af1ba6fb7e7be472eff72aaa779
CRs-Fixed: 2052905
2017-08-14 03:26:55 -07:00
Kiran Kumar Lokere
0751f0ece9 qcacld-3.0: Remove channel avoid event processing in wma
Remove the channel avoid event processing in wma as the
event processing handled by regulatory component

Change-Id: Ifa0e340c6341b21c192066c8c6eb14418b041062
CRs-Fixed: 2080241
2017-08-13 16:57:01 -07:00
Wu Gao
30f65eb90b qcacld-3.0: Revert the change for cleanup qdf list
wma_vdev_find_req will remove the request from queue if found it. If
remove the request when peek it, then wma_vdev_find_req fail and memory
leak happens. The change for cleanup qdf list is for NULL mac_ctx case.
Solution is revert previous change and move mac_ctx checker back.

Change-Id: I06deedaf9f8a3c788621d8468e00d4d4852e2d9f
CRs-Fixed: 2090051
2017-08-11 06:40:16 -07:00
Abhishek Singh
07b9785afd qcacld-3.0: Fix timer leak when wma_hold_req_timer timeout
When wma_hold_req_timer timer timeout, the timer is not destroyed
and thus timer leak is seen while unload.

To fix added destroy timer before freeing the hold req.

Change-Id: I532975fe13057d96ac924c58d0f42a0010a00a97
CRs-Fixed: 2084993
2017-08-10 03:12:03 -07:00
Dustin Brown
ec2c92eb37 qcacld-3.0: Release vdev start wakelock after vdev up/down
Currently, a wakelock is acquired before vdev start is sent to firmware
and released after a vdev stop response is received. In some cases, this
can cause a race condition where the device will power collapse before
the association process is complete. Instead, release the wakelock after
either vdev up or vdev down is sent to firmware, ensuring the entire
association process is protected.

Change-Id: Iab1a241f1c5810d9f71bfd86e1e8036847ebf602
CRs-Fixed: 2082928
2017-08-07 19:22:56 -07:00
Yun Park
b4f591d8aa qcacld-3.0: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I80e8f609587d0df85d2da9fb0f41cb49e02a9d2f
CRs-Fixed: 2033368
2017-08-07 17:47:45 -07:00
Ashish Kumar Dhanotiya
b28338c403 qcacld-3.0: Add host support to configure the SMPS parameters
Currently there is no support to configure SMPS parameter
from host, add support to configure SMPS parameters using ini.

Change-Id: I6f8273ffed39a0b95c31f1647e86406b870165f2
CRs-Fixed: 2080571
2017-08-06 20:45:06 -07:00
Srinivas Girigowda
6598eea7ff qcacld-3.0: Move logs to appropriate log levels
Move logs to appropriate log levels.

Change-Id: I230318a934762d5fcda33f2446a1b176c11fc263
CRs-Fixed: 2083965
2017-08-06 13:48:11 -07:00
Srinivas Girigowda
35b003149c qcacld-3.0: Fix clang warning: implicit conversion enum tDriverType
warning: implicit conversion from enumeration type 'tDriverType'
to different enumeration type 'enum driver_type' [-Wenum-conversion].

Move enum driver_type to QDF.

Change-Id: Ic89e4ee512a2d70c27324446257286aaafd49839
CRs-Fixed: 2055487
2017-08-03 19:48:58 -07:00
yeshwanth sriram guntuka
584c233dac qcacld-3.0: Fix memory leak in wma_utils
Link stats memory is not freed in case of driver
unload happens before more results is received
from firmware.

Fix is to free link stats memory on wma close.

Change-Id: I3c54a0bc4951c70b2ca7116e37e0b62a5c6b7a2f
CRs-Fixed: 2083603
2017-07-30 14:00:49 -07:00
Agrawal Ashish
b0aa075047 qcacld-3.0: Reduce log completion timer to 3 sec
Currently when driver send log flush command to firmware,
driver start timer of 10 sec.
Reducing this time to 3 sec as 10 is long timer.

Change-Id: I697fa6a4709fa0128595fb2b15493b1fa2b13b35
CRs-Fixed: 2037033
2017-07-30 13:02:20 -07:00
Abhishek Singh
4db8c1521c qcacld-3.0: Send OCE rssi reject BSSID list to firmware
Add support for rssi based assoc rejection from a bssid and
Try to connect to this bssid only after time interval indicated in
Assoc reject or when rssi has improved by margin indicated in Assoc
reject.

On connection send OCE rssi reject BSSID list to firmware so that
firmware will avoid connecting to these BSSID until RSSI improve or
delta interval has elapsed.

Change-Id: I792b2874ed25227bf5fd09d8051549da96db4364
CRs-Fixed: 2070452
2017-07-30 11:00:15 -07:00
Abhishek Singh
c15f649aef qcacld-3.0: Remove vdev stop req from vdev resp queue if vdev stop fail
If during set link state, vdev stop fails, then the params pointer
is not removed from the vdev resp queue and set link state rsp is
called which will free this params pointer.

This leads to double free of the params memory when driver try to
remove the req params from vdev resp queue when cleanup vdev resp
queue is called.

To fix this remove vdev stop req from vdev resp queue if vdev stop
fails.

Change-Id: I1da763d2cc35c12c1b55a3c0057b893e9ef8d48f
CRs-Fixed: 2080189
2017-07-30 07:50:17 -07:00
Dustin Brown
8d8d9fe485 qcacld-3.0: Add enhanced multicast enable/disable APIs
Currently, a hard-coded enhanced multicast filter configuration is being
sent to firmware. Instead, create a set of enable/disable APIs, and
configure enhanced multicast filter based on advertised firmware
capability.

Change-Id: I488b4a921612e1081266be8831be098d755375f9
CRs-Fixed: 2078615
2017-07-27 16:59:26 -07:00
Dustin Brown
c86d5368b0 qcacld-3.0: Do not wait for scan cancel during suspend
In the suspend path, the code waits for all active/pending scans to be
cancelled before continuing the suspend. Instead, for better power
savings, abort all active/pending scans during suspend and immediately
continue the suspend process.

Change-Id: I16a5429c00034fe58fb4c70a8dacda666ac54227
CRs-Fixed: 2073229
2017-07-27 16:59:22 -07:00
Sridhar Selvaraj
22943574b2 qcacld-3.0: Add bound check for numap to avoid integer overflow
Currently, numap is int and is assigned with a uint32 value from
fw which might lead to integer overflow. Also, when multiplying
the uint32 value with sizeof dest_ap could lead to int overflow
if the value of numap is close to uint32's maximum limit.

Fix/Modify numap to uint32 to be in sync with value from fw cmd.
Also add check to trim down numap value to max (10) if value is
greater than max (10).

Change-Id: I060f585c8c951807cd32b5eec75c1bad2e84a75b
CRs-Fixed: 2082665
2017-07-27 16:59:18 -07:00
Sridhar Selvaraj
1b2330ccb8 qcacld-3.0: Add new ini param for min rest time during roaming scan
Currently both min and max rest time use the same ini param
gNeighborScanTimerPeriod.

Add a new ini param gRoamRestTimeMin for min rest time
during channel scan.

Change-Id: Ifbb0fcc736e81b292639c6f2ad3119b451bec4f2
CRs-Fixed: 2060095
2017-07-24 10:52:47 -07:00
Kiran Kumar Lokere
f9dc79123c qcacld-3.0: Igonre HT BW change if channel switch is in progress
If channel switch is in progress and if the HT IE received in
beacon has the BW change then do not send the bandwidth update
request to FW. After the channel switch response is received and
beacon has different BW bandwidth a new BW update request will
be sent to FW.

Change-Id: Id41bd0523f821d2b81e132318230492fda79f32a
CRs-Fixed: 2068906
2017-07-21 23:25:58 -07:00
Kiran Kumar Lokere
208041661a qcacld-3.0: Add a flag check to remove the cmd in find req
Add a flag to wma_find_vdev_req api to remove the wma request
message with conditional check.

Change-Id: Ia1166659e593312a2ebf34df5eba02fb23fc335a
CRs-Fixed: 2077738
2017-07-21 22:25:34 -07:00
Kiran Kumar Lokere
3557765ca9 qcacld-3.0: Send fail response to del_self_sta req without del_bss
Send the failure response for delete self sta request to SME if
the delete bss request is not present or being processed.

Change-Id: I8af9c96ee2027faf256563f800159070146770c8
CRs-Fixed: 2076336
2017-07-21 22:25:31 -07:00
Rajeev Kumar
d9a43cfbe4 qcacld-3.0: Add vdev validity check before sending vdev set param
If vdev is deleted FW can assert if host sends any vdev set param command.
Add vdev validity sanity check and reject vdev param set request after
vdev is deleted.

Change-Id: I65c303ef2e2a941cb2629f3fbc0862acf6e306d3
CRs-Fixed: 2079273
2017-07-19 16:28:43 -07:00
Tushnim Bhattacharyya
825b0f7ac6 qcacld-3.0: preferred_rx_streams to reflect correct NSS value
preferred_rx_streams to reflect the NSS value with which association to the
AP happened in STA mode.

Change-Id: Ia2ecfb7ba055c3644410b0ff908812f0f94ba4c7
CRs-Fixed: 2077040
2017-07-18 15:49:37 -07:00
Jiachao Wu
08719b0c38 qcacld-3.0: iwpriv set_txchainmask 0 shouldn't change mode
If user set invalid txchainmask, driver shouldn't change the value.

Change-Id: Ifd600e439e967845bfa874220a3e1508bc26a3ba
CRs-Fixed: 2070620
2017-07-18 07:43:32 -07:00
Selvaraj, Sridhar
57ce4dfde2 qcacld-3.0: Add ini params to avoid roam ping pong
In roaming scenario, to avoid ping pong with bad AP’s around, fw
blacklist certain Ap’s based on timestamps and penalize certain
AP’s of the same channel so they won’t be selected and back and
forth roaming could be avoided. This change adds the following
INI parametres to configure the parametres of this fw feature.

1) groam_disallow_duration    - Amount of time LCA[Last Connected AP]
                                will be disallowed before it can be a
                                roaming candidate again.
2) grssi_channel_penalization - RSSI to be penalized if
                                candidate(s) are found in the same
                                channel as disallowed AP's.
3) groam_num_disallowed_aps   - number of AP's the target should
                                maintain in its LCA list.

Change-Id: I41cb36caf1b42caeb2bf77846bd0279eb43d2018
CRs-Fixed: 2054188
2017-07-18 05:54:24 -07:00
Zhang Qian
303ebe9dbf qcacld-3.0: Add mac counters for per-antenna TX/RX stats
qcacld-2.0 to qcacld-3.0 propagation

New MAC counters are added to count MPDUs received and transferred
on each antenna.

Change-Id: Ia7fbf7642922f006882619848459192dcfca3c40
CRs-Fixed: 2043156
2017-07-17 21:48:05 -07:00
Srinivas Girigowda
fc8b4ffc0f qcacld-3.0: Move the logs to appropriate log levels
Move the logs to appropriate log levels.

Change-Id: I184a8a58541daa1b29f042db9bcbeadc254b5c38
CRs-Fixed: 2063642
2017-07-17 20:55:27 -07:00
Varun Reddy Yeturu
0648801140 qcacld-3.0: Do not send RSO Stop when roam sync is in progress
Avoid sending a RSO stop because of a disconnect when roam
sync is in progress. It is not needed to send a RSO stop
since the host would eventually trigger a disconnect and
send down an RSO stop anyways. Sending a RSO stop woould lead
to unnecessary complication where the firmware would send
a HO_FAIL and then this would be queued and the host disconnect
would be handled first and as part of processing the user
disconnect, a peer delete would be sent down to firmware,
which has already been cleaned up by the firmware earlier.

Change-Id: Ic89f97308c3d63977dda61fcadc450432fb16524
CRs-Fixed: 2052449
2017-07-17 17:39:00 -07:00
Dustin Brown
12a960213e qcacld-3.0: Populate stats_mask when requesting stats
wma_get_stats_req does not populate the requested statistics bitmask
before forwarding the request to WMI. Popluate the given statistics
bitmask into the WMI request in wma_get_stats_req, so firmware can
provide the desired statistics.

Change-Id: I6dbf7bf1fb2cf6b20bcd4f2fb91f9add5dd3d779
CRs-Fixed: 2075379
2017-07-17 17:38:57 -07:00
Kiran Kumar Lokere
75d636fe15 qcacld-3.0: Fix CSA handling to the same channel
Currently CSA event is ignored if the new channel is same as
current channel and there is no check for the BW comparison.
CSA can be done to the same channel with different BW. Allow the
CSA processing with same channel if the CSA has the different BW

Change-Id: Ib12c86dccf1c745dfa66c9e712d283af2df7809e
CRs-Fixed: 1102539
2017-07-13 18:03:11 -07:00
Vidyullatha Kanchanapally
be0ebb3807 qcacld-3.0: Add handler for new WMI BT event
Add handler for the new WMI BT activity event and propagate the BT
event till HDD. These BT activity events will be used for MBO
enhancements to decide whether to accept the BTM request from
AP or not.

Change-Id: I687819fd28c693964b42bfb24eb9dae1858b10a5
CRs-Fixed: 2023728
2017-07-13 18:03:08 -07:00
Wu Gao
1eabdb6027 qcacld-3.0: use adaptive method to cleanup qdf list
It just enumerates qdf list but do not remove element when cleanup
vdev response queue or hold request queue in wma layer, which cause
element duplicate free. Use adaptive method to cleanup them.

Change-Id: I85f71252c6452d31649295cb13aa0eeef2323b5a
CRs-Fixed: 2073394
2017-07-12 14:44:26 -07:00
gaolez
8a61fd27a0 qcacld-3.0: update default wep index for group key
For encryption mode is WEP40 or WEP104, the default key index should
be set. if not set, the group key index will be zero always.

Change-Id: I3f2dae9d7b6cd4fbb7aa2882e6a5e89cf759cd11
CRs-Fixed: 2065988
2017-07-12 12:55:55 -07:00
Abhishek Singh
7e95dbc9f6 qcacld-3.0: Cleanup the sme session if sme open session times out
Call sme close session if sme open session times out, to clean up
the vdev created.

Change-Id: Icd718138d0198a6285243a15eb56ce912149f038
CRs-Fixed: 2043263
2017-07-11 12:56:58 -07:00