Commit Graph

862 Commits

Author SHA1 Message Date
Varun Reddy Yeturu
d4c523d673 qcacld-3.0: Avoid possible buffer overwrite in wma_process_utf_event
Check for the maximum allowed data that can be written into
the buffer utf_event_info.data in the function
wma_process_utf_event.

Change-Id: I9ee37470b7a3e7016941f871d3cf73eb12718758
CRs-Fixed: 2115375
2017-09-29 15:39:58 -07:00
Varun Reddy Yeturu
74c87c915f qcacld-3.0: Check for upper bound in P2P NOA event
Check for the upper bounds for number of NOA descriptors
received in the P2P NOA event.

Change-Id: Id7ecf064f2c25f378f76d795902713da8520507f
CRs-Fixed: 2113072
2017-09-29 15:39:56 -07:00
Naveen Rawat
684e8b1eb0 qcacld-3.0: Improve tx status logging for mgmt packets
Change status logging in mgmt tx completion to string format.

Change-Id: I84c99e3c928a8a5c17048f20e1d9b3e990b911ad
CRs-Fixed: 2113615
2017-09-28 16:11:28 -07:00
Frank Liu
d1a2846324 qcacld-3.0: TDLS: remove legacy core functions
Clear up the tdls legacy functions which handle add/delete
tdls peer, tdls mgmt frame process and tdls_oper callback.

Change-Id: I8ba344ce5593df44bd15527e2ff68e872b6d23b8
CRs-Fixed: 2105075
2017-09-28 09:39:43 -07:00
Frank Liu
1a912b2f05 qcacld-3.0: TDLS: remove legacy connection tracker
Clear up the legacy tdls connection tracker function

Change-Id: I9163e8ec7a41750085d8673b25cf4797d1b84714
CRs-Fixed: 2105075
2017-09-28 09:39:39 -07:00
jiad
080abce12e qcacld-3.0: Add RX LDPC support for legacy platforms
wma_get_caps_for_phyidx_hwmode() does not check legacy chips like Rome,
which leads to wrong HT/VHT caps being populated.

Fix is to check legacy chips in wma_get_caps_for_phyidx_hwmode() and
populate HT/VHT caps accordingly including RX LDPC capability.

Change-Id: I496191636f0f21ef3399c24fbfb43a562ca2debc
CRs-Fixed: 2061889
2017-09-28 05:40:01 -07:00
Manjeet Singh
70d3d931d9 qcacld-3.0: Check FW support for FW mem dump
Currently HDD sends a FW memory dump request to firmware without
checking support for this feature. This can lead to a crash as firmware
doesn't send the command response if feature is not supported.
Add a check in HDD so that the request is only sent when FW memory dump
capability is advertised by the firmware.

Change-Id: I73b980f50910e13aa5f2d2434f07b6f985dd5010
CRs-fixed: 1090806
2017-09-28 05:39:58 -07:00
Kabilan Kannan
edff06d0a1 qcacld-3.0: Pass correct phymode to FW for a TDLS peer as per its capability
When AP is in 11b-only mode then for a TDLS peer, in the peer_assoc
command to FW, pass phymode as per capability of the TDLS peer.

Change-Id: If1a84b35c2e755aad8b6b67536cbbcc49d378fda
CRs-Fixed: 2093277
2017-09-28 04:48:16 -07:00
Naveen Rawat
296a51846f qcacld-3.0: Add support to send rate information for mgmt frames
Add support to send rate information for mgmt frames.

Currently default rates are used by target for the mgmt frames before
association. If the AP does not support the default rates (1 Mbps for
2.4G and 6Mbps for 5G), STA would still send AUTH, ASSOC frames with
the default rates. Add support to send the minimum rate supported by
the AP as part of the MGMT Tx WMI command.

Change-Id: I38d832818bbbd5fe3dec5660bd01dd08798bf0be
CRs-Fixed: 2085006
2017-09-27 20:57:56 -07:00
Mukul Sharma
6398b253fb qcacld-3.0: Add support for changing LISTEN interval dynamically
Current method for calculating LISTEN INTERVAL are static
configuration a.ka. ini based. Now OEM / USER want to take
control of setting LISTEN INTERVAL as per their applications
need. Once if USER configure the LISTEN INTERVAL value using
vendor command then host should avoid changing the LI value
during each suspend/resume. User LI value will be override
configuration. Once USER will Disable the LI using vendor
command then host can fallback to current default method.

Change-Id: Ia9b412b073c059df0cdff7bcda8198f7581e796d
CRs-Fixed: 2040298
2017-09-27 20:57:54 -07:00
Ashish Kumar Dhanotiya
bfee5898b7 qcacld-3.0: Update driver according to latest reg domain info
Update driver for the latest reg domain info according to
Regdomain_23 and Regdomain_24 excel sheets.

Change-Id: I6b259be20de650886a16c32b69f8ed82b96dbcd8
CRs-Fixed: 2112485
2017-09-27 20:09:01 -07:00
Abhishek Singh
0d74f9e664 qcacld-3.0: Fix double free del_sta_session_req
iface->del_staself_req is used to check if del sta self was defered
and if it is set vdev detatch is called. iface->del_staself_req is
also set in case  del sta self was not defered and thus del sta self
resp may get called twice, assuming it was differed and this result
in double free of del_sta_session_req.

To fix this added a bool to check if the del sta self was defered.

Change-Id: If4c2bc2a5bb6b8761f4130119a96602055d45b77
CRs-Fixed: 2116888
2017-09-27 19:24:02 -07:00
Yu Wang
46082dc0a6 qcacld-3.0: inject fw crash in crash-shutdown
When kernel panic happen, if WiFi FW is still active,
it may cause NOC errors/memory corruption, to avoid
this, inject a fw crash first.

Propagated from qcacld-2.0

Change-Id: I97a696a02dfd73aaca212ef1bca9f3597df1e382
CRs-Fixed: 2052332
2017-09-26 22:20:06 -07:00
Ganesh Kondabattini
3573957abf qcacld-3.0: set the limit off-channel command parameters
Set the limit off-channel command parameters and conc_system_pref
according to active tos indication from application.

CRs-Fixed: 2066088
Change-Id: I896999adb59aa468daf33364c708d95ef3062018
2017-09-26 17:53:00 -07:00
Ganesh Kondabattini
dadf1fb155 qcacld-3.0: Set DFS flag for DFS channels
Driver is updating WMI_CHAN_FLAG_PASSIVE flag for DFS channels
while sending 'WMI_SCAN_CHAN_LIST_CMDID' command to firmware.

Driver should also update the WMI_CHAN_FLAG_DFS flag for
DFS channels. Otherwise functionality like skipping DFS channels
as part of scan request may not work.

CRs-Fixed: 2103636
Change-Id: Ia146eaad93deab778d5ce7a8647f5c0ba7068ead
2017-09-26 17:52:57 -07:00
Jeff Johnson
adba396c07 qcacld-3.0: wma: Replace instances of unadorned %p
Replace instances of unadorned %p in core/wma.

Change-Id: I44a975caa73f0837274536babf1902bef06c591a
CRs-Fixed: 2100997
2017-09-25 21:56:49 -07:00
Vignesh Viswanathan
56f262563b qcacld-3.0: Add sanity check to limit mgmt frames data len
Currently the mpdu_data_len in Rx pkt meta is not checked for
upper bound in wma_form_rx_packet.

Add sanity check to drop the packet if mpdu_data_len is
greater than 2000 bytes. Also add upper bound check for
frame_len in lim_process_auth_frame function.

Change-Id: I7ab454045e2f6d278351dcabde6da556f9f741e0
CRs-Fixed: 2093392
2017-09-25 05:43:05 -07:00
Ganesh Kondabattini
3bf9efe42a qcacld-3.0: Make sure that peer exists before updating peer state
Before sending tdls peer state update command to FW make sure
that tdls peer exists.

Change-Id: I26b5daf9896b0f57fbcfedadcabd67ddd000b257
CRs-Fixed: 2032770
2017-09-23 05:21:26 -07:00
Vignesh Viswanathan
c018e98d72 qcacld-3.0: Add new ini for bad RSSI 2G to 5G roam offset
Add new WCNSS_qcom_cfg.ini item to configure offset from bad RSSI
threshold ini for 2G to 5G band roam. This offset is used to
calculate the RSSI to be used as trigger for device to roam from
2G to 5G band when it is connected to a bad RSSI 2G AP and a 5G AP
is available in the environment.

New ini added : roam_bad_rssi_thresh_offset_2g

Change-Id: If2285317d1d01bb2faae2cf1928ad7adae8204d4
CRs-Fixed: 2105894
2017-09-20 19:56:53 -07:00
Anurag Chouhan
3920c0f714 qcacld-3.0: Add Vendor command to set/get NUD debug stats
Add vendor commands to set/reset and get NUD debug stats
from firmware.

Change-Id: I773c04bb3f7c6d5ed28528cf2174b3d63de57d98
CRs-Fixed: 2011456
2017-09-20 06:22:06 -07:00
Varun Reddy Yeturu
81d0b373f3 qcacld-3.0: Check for valid pdev in wma_wait_tx_complete
Check for the validity of the pdev in wma_wait_tx_complete
before using it.

Change-Id: I3a98b4092aff42ea9c92490488cba5960b8e3b58
CRs-Fixed: 2111293
2017-09-20 04:40:26 -07:00
Wu Gao
478282a8d0 qcacld-3.0: Check radio id for FW event
In Rome platform, it use invalid radio id in FW event
WMI_RADIO_TX_POWER_LEVEL_STATS_EVENTID and cause crash. So check
radio id when handling this event.

Change-Id: Id720ca94ef496ea883f5ba1848fb4e28af57002f
CRs-Fixed: 2112322
2017-09-19 09:59:37 -07:00
Jiachao Wu
712d4fd6a6 qcacld-3.0: Send beacon tx rate to firmware
Add data structures to save beacon tx rate.
The beacon data rate is multiples of 100 Kbps.
Firmware expects the data rate in the form of hw rate codes.
So convert the data rates to hw rate code.
And send it to firmware.

Change-Id: Ia39fd4c14defa729f75f2c45748fe5b04b909647
CRs-Fixed: 2099052
2017-09-19 04:18:34 -07:00
SaidiReddy Yenuga
cc733aff70 qcacld-3.0: Add ini param to control the crash inject
qcacld-2.0 to qcacld-3.0 propagation

Currently the crash can be injected by iwpriv command and FW
gets crashed.
Changes are done to add the gEnableCrashInject ini parameter

1) This ini param is disabled by default.
2) If this param is disabled the crash inject is ignored.

Change-Id: I7e908be1e37090a9d343dc04411fe387f776a937
CRs-Fixed: 864932
2017-09-19 02:28:33 -07:00
Sandeep Puligilla
d698bf5328 qcacld-3.0: Remove legacy scan event handling
Remove legacy scan event handling
in the WMA and LIM.

Change-Id: Ibeb6f99335b4e745335d5968791d9e9187df47f7
CRs-Fixed: 2101353
2017-09-19 00:17:52 -07:00
Varun Reddy Yeturu
faad37e33b qcacld-3.0: Introduce configuration parameters for bad RSSI roaming
Introduce the below WCNSS_qcom_cfg.ini items to configure
for bad RSSI roaming. These parameters would be used when
the device is connected to an AP with weak signal and has
to roam to a better AP if it is stationary but has found
some other better AP in the vicinity

roam_bg_scan_bad_rssi_thresh:
If the DUT is connected to an AP with weak signal, then the bad RSSI
threshold will be used as an opportunity to use the scan results
from other scan clients and try to roam if there is a better AP
available in the environment.

roam_bg_scan_client_bitmap:
This bitmap is used to define the client scans that need to be used
by the roaming module to perform a background roaming.

Change-Id: I3b9f737ea389d35f8be173ce83b2237c2375fb88
CRs-Fixed: 2082904
2017-09-18 20:27:52 -07:00
Varun Reddy Yeturu
061d4d63e4 qcacld-3.0: Introduce INI items for MAWC based roaming
Introduce the following items in WCNSS_qcom_cfg.ini for
user to modify them for MAWC based roaming.

mawc_roam_enabled
mawc_roam_traffic_threshold
mawc_roam_ap_rssi_threshold
mawc_roam_rssi_high_adjust
mawc_roam_rssi_low_adjust

Change-Id: Ief51e3e91603bfd7f6c6deed3ca48bc717b2b6fb
CRs-Fixed: 2081413
2017-09-14 13:26:37 -07:00
Jeff Johnson
adb3b1cadf qcacld-3.0: Remove cds_[alloc|free]_context() parameter
Currently cds_alloc_context() & cds_free_context() take a CDS context
parameter. However CDS already maintains its own context, hence this
parameter introduces an unnecessary coupling, so remove it.

Change-Id: I4501a0fea7acc7b4a764b0d425da386922b93bcb
CRs-Fixed: 2109265
2017-09-13 20:07:39 -07:00
Jeff Johnson
ff6addf320 qcacld-3.0: Remove wma_open() cds_ctx parameter
Currently wma_open() takes a cds_ctx parameter. All of the other WMA
functions which previously took a cds_ctx no longer use that
parameter, and those functions have been modified to remove the unused
parameter. wma_open() still needs the cds_ctx, but it can get that
context by calling cds_get_global_context(), so remove the cds_ctx
parameter to be consistent with the other WMA functions.

Note: the fact that wma_open() needs the cds_ctx, and then
dereferences it, is a layering violation that needs to be addressed in
the future.

Change-Id: I176e2ac68cc2e8081645a4ce3c158b41d3018587
CRs-Fixed: 2109263
2017-09-13 20:07:37 -07:00
Jeff Johnson
7b3ddc2a5b qcacld-3.0: Remove wma_wmi_service_close() cds_ctx parameter
Currently wma_wmi_service_close() takes a cds_ctx parameter. All of
the other WMA functions which previously took a cds_ctx no longer use
that parameter, and those functions have been modified to remove the
unused parameter. wma_wmi_service_close() still needs the cds_ctx, but
it can get that context by calling cds_get_global_context(), so remove
the cds_ctx parameter to be consistent with the other WMA functions.

Note: the fact that wma_wmi_service_close() needs the cds_ctx, and
then dereferences it, is a layering violation that needs to be
addressed in the future.

Change-Id: I02564bae87077314fea58c1509b3a50b8d567a7a
CRs-Fixed: 2109262
2017-09-13 20:07:35 -07:00
Jeff Johnson
6b8473d136 qcacld-3.0: Remove wma_wmi_work_close() cds_ctx parameter
Currently wma_wmi_work_close() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: Ibc64cd1398babc899c21a1ee4c0fc280769c4d9e
CRs-Fixed: 2109261
2017-09-13 20:07:33 -07:00
Jeff Johnson
542da35e39 qcacld-3.0: Remove wma_close() cds_ctx parameter
Currently wma_close() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: I31d1016cff580f9330027f8104348466df9f01dd
CRs-Fixed: 2109259
2017-09-13 20:07:31 -07:00
Jeff Johnson
5be42abfb6 qcacld-3.0: Remove unused wma_mc_process_msg() parameter
Currently wma_mc_process_msg() takes a cds_context parameter.  At one
time this parameter was needed, but that is no longer the case, so
remove this now unused parameter.

Change-Id: Ia460afc5db932274cd960485af93fc48e899ff35
CRs-Fixed: 2109258
2017-09-13 20:07:29 -07:00
Jeff Johnson
f7ab814a0c qcacld-3.0: Remove cds_wma_complete_cback() parameter
Currently cds_wma_complete_cback() takes a parameter that is a pointer
to the CDS context. However CDS already maintains its own context,
hence this param introduces an unnecessary coupling, so remove it.

Change-Id: I1b4588f18f807008fd212a8e5d04e3895a12922c
CRs-Fixed: 2109257
2017-09-13 20:07:27 -07:00
Jeff Johnson
8ad89c6cd4 qcacld-3.0: Remove wma_pre_start() cds_ctx parameter
Currently wma_pre_start() takes a cds_ctx parameter. At one time this
was needed for the call to cds_get_context(), but that is no longer
the case, so remove this unused parameter.

Change-Id: Ic4582ecafbee6fc1d0f8ebbf3c62ed8c7b47a179
CRs-Fixed: 2109255
2017-09-13 20:07:24 -07:00
Jeff Johnson
acc1cc7a4e qcacld-3.0: Remove wma_stop() cds_ctx parameter
Currently wma_stop() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: Iba40ac86e5916be3b8c2a62cf5483c9b7a242be5
CRs-Fixed: 2109254
2017-09-13 20:07:23 -07:00
Jeff Johnson
d489255594 qcacld-3.0: Remove wma_start() cds_ctx parameter
Currently wma_start() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: If6756ca37a7e4ec4ade1c72eea080f3bc89ad7e4
CRs-Fixed: 2109253
2017-09-13 20:07:21 -07:00
Jeff Johnson
1f8d0a0a9c qcacld-3.0: Remove wma_setneedshutdown() cds_ctx parameter
Currently wma_setneedshutdown() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: I65f2af2e97b09523f5cf00369b5cf95ad01194d9
CRs-Fixed: 2109252
2017-09-13 20:07:19 -07:00
Jeff Johnson
1b5404e93c qcacld-3.0: Remove wma_needshutdown() cds_ctx parameter
Currently wma_needshutdown() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: I31fd07480719bf3401ed52b57951e19ccb4d143c
CRs-Fixed: 2109251
2017-09-13 20:07:17 -07:00
gaolez
e510894670 qcacld-3.0: Add new params in ACS calc process
qcacld-2.0 to qcacld-3.0 propagation

Before this change the ACS calc process only consider the
channel's rssi and bss count in this channel, in this change
add noise floor, channel free statistics and tx power in the
ACS calc process.

Change-Id: I654e53fa2441e03723f150d973c124985c67f2b4
CRs-fixed: 1050316
2017-09-11 23:27:25 -07:00
Sandeep Puligilla
f22263c8e0 qcacld-3.0: Decrease tx drain wait time during del bss
wma_delete_bss is stuck for more than
400ms in failure scenario due to pending
tx packets to drain.

-Decrease the wait time to 20ms(2ms*max_wait_iterations)
to avoid the delete bss stuck issue.
-Tx drain wait feature added for LFR2.0
feature so moved the code under the LFR2.0
macro.

Change-Id: I33b56bb627ac914ca6fe96949de373b015853fc9
CRs-Fixed: 2097269
2017-09-08 19:40:08 -07:00
Jeff Johnson
a9b6657591 qcacld-3.0: Remove unused wma_register_roaming_callbacks param
Currently wma_register_roaming_callbacks() has a cds_ctx parameter. At
one time this was necessary since the global context was required to
get the module-specific context.  However the global context is no
longer required for this purpose, so remove the unused parameter.

Change-Id: Ida681fb20dd98a46f385f1e04662f72a334c68bf
CRs-Fixed: 2103626
2017-09-08 03:18:02 -07:00
Sravan Kumar Kairam
4402a264b2 qcacld-3.0: Log IP addr of the first RX packet after wow wakeup
Log the IP header source and destination address for the first Rx
packet received after host wakeup.

Change-Id: Ie8cf71c8ce913378687ad2c79ab9d5f46c0c2419
CRs-Fixed: 2010971
2017-09-08 01:57:52 -07:00
Jeff Johnson
abb7404d2b qcacld-3.0: Remove unused wma_get_wcnss_software_version() param
Currently wma_get_wcnss_software_version() takes a p_cds_gctx
parameter which it does not use, so remove it.

Change-Id: I86a5893a9407bad034a32c105aec92d4e6054744
CRs-Fixed: 2102549
2017-09-07 22:52:18 -07:00
bings
f904765f82 qcacld-3.0: Fix chain_stats memory illegal access
chain_stats in WMI_UPDATE_STATS_EVENTID_param_tlvs may be set as
NULL by wlan firmware.

When access chain_stats, make sure it is not NULL.

Change-Id: I3a78534899a3a56f378c4825ff5b8abedb543b8c
CRs-Fixed: 2102247
2017-09-07 06:12:52 -07:00
Dustin Brown
35b61f6b69 qcacld-3.0: Deinit/ini WMA VDEV around mem zero
The WMA vdev structure contains wakelocks which must be deinitialized
and initialized any time these structures are mem-zeroed. Add
deinit/init calls to vdev attach error cases.

Change-Id: I36012606d4cc49c076ac6903ff49530c45433374
CRs-Fixed: 2102645
2017-09-02 03:38:31 -07:00
Will Huang
496b36c936 qcacld-3.0: Add support of request peer stats info(part 3)
qcacld-2.0 to qcacld-3.0 propagation

FW has limitation to support old WMI_REQUEST_STATS_CMDID and
WMI_UPDATE_STATS_EVENTID interface on AP vDev. FW suggest to use new
WMI_REQUEST_PEER_STATS_INFO_CMDID and WMI_PEER_STATS_INFO_EVENTID to
get tx/rx rate.

This checkin is about HDD layer, provide APIs/callbacks to upper layer
to query rssi/tx/rx statistics of peer station associated with SAP,
and provide a default disabled ini setting and checking FW's
WMI_SERVICE_PEER_STATS_INFO capability to control this get peer info
interface. Add/change iwpriv/QCA_NL80211_VENDOR_SUBCMD_GET_STATION/
cfg80211_ops.get_station interfaces to upper layer.

Change-Id: Ib1571219faa16e3bc8c3eb1260137ae08b8b6016
CRs-Fixed: 2059507
2017-09-01 22:09:05 -07:00
Varun Reddy Yeturu
30c24b7afb qcacld-3.0: Do not create vdev if already created
if a SEL_STA is being created then check if the session
on which it is being created is already active and deny
the request

Change-Id: I2ae4aa6034afdefb9ee61c28e4be2b0de6891a44
CRs-Fixed: 2084306
2017-08-31 08:08:08 -07:00
Sridhar Selvaraj
87309211fc qcacld-3.0: Pass Probe request deferral params to fw
If a OCE AP is found in previous scan cache in fw, fw need to defer
sending probe for sometime to check for broadcast probe response
from OCE AP.

Send the probe deferral time and the time gaps between the two probes
from host for STA vdev.

Change-Id: I973fc1e2ea43950bd4e2168083644a240a298c22
CRs-Fixed: 2068490
2017-08-30 10:44:01 -07:00
Dustin Brown
100201ecca qcacld-3.0: Avoid recovery trigger while recovering
Currently, cds_trigger_recovery is unconditional. Instead, avoid
triggering recovery if recovery is already in progress.

Change-Id: I5c77048701930591e0e520e07275e6f8631108a0
CRs-Fixed: 2070845
2017-08-30 10:43:49 -07:00