Commit Graph

2170 Commits

Author SHA1 Message Date
Hanumanth Reddy Pothula
18553ae114 qcacld-3.0: Invalidate STA ID with proper value
While resetting connection information, sta id is set to 0,
which is a valid value, leading sta id to hold a valid data
though connection information is reset.

While resetting connection information, set sta id with
HDD_WLAN_INVALID_STA_ID(0xFF) to make sure sta id holds invalid
data.

Change-Id: I7d438f323959a5fb6d3a232a88a8f2ca3c0e0c56
CRs-Fixed: 2040296
2017-08-14 11:38:26 -07:00
Poddar, Siddarth
37a17d3f35 qcacld-3.0: Rate limit HS 2.0 Gratuitous ARP droppage messages
Rate limit the HS 2.0 Gratuitous ARP messagess to 1/8
to avoid message flooding in kernel logs.

Change-Id: Icdcb8c18a2f17e2379ca6c5898db28800debdc16
CRs-Fixed: 2084136
2017-08-14 00:07:35 -07:00
Kiran Kumar Lokere
487957957a qcacld-3.0: Refactor the channel avoid event processing
Replace the channel avoid event data structure with the one defined in
regulatory module, remove the HDD callback as regulatory module is
consuming the FW event now, add logic to notify user space of channel
avoid event.

Change-Id: I6b1b986837ab89503a7e0469619193b0af8127da
CRs-Fixed: 2080241
2017-08-13 16:56:59 -07:00
Rajeev Kumar
f98a5cc3f8 qcacld-3.0: Hold wake lock for SAP client disconnect notification
Hold wake lock in driver for SAP client disconnect notification to
user space inorder to avoid hostapd and driver going out of sync.

Change-Id: If81cf836b8fc047731735aa28831d1efa2f4e7b2
CRs-Fixed: 2084282
2017-08-13 16:16:11 -07:00
Krunal Soni
158bfe6e18 qcacld-3.0: Introduce INI to disable high HT MCS for 2G STA
To resolve one of IOT issues, introduce INI called
"disable_high_ht_mcs_2x2" which will disable high MCS indices for
2G STA case based on INI value.

Change-Id: I60c5edd89a42f74c0f439fe6a9ab0c75373622b2
CRs-Fixed: 2087438
2017-08-13 15:36:44 -07:00
Varun Reddy Yeturu
3fb61716e7 qcacld-3.0: Enable logging for Serialization
Define the category info to print the serialization
module logs using QDF

Change-Id: If44213d4c0e4c5aca3011db4351cb6a778cdca6f
CRs-Fixed: 2091023
2017-08-13 15:36:41 -07:00
Hanumanth Reddy Pothula
063cbe9e58 qcacld-3.0: Update rate flags appropriately
Presently, Host fails to report valid actual link speed
(gReportMaxLinkSpeed=0) to the upper layer when firmware
reports legacy link speeds as Host fails to update legacy
bit in rate flags, reported to upper layer.

To mitigate this issue report rate flags with legacy bit set
on receiving valid rates from firmware and if MCS index is
invalid, as WMA fails to set valid MCS index for legacy rates.

Change-Id: I0a542e8aa56eb18e653aad30c1bec13f133d267c
CRs-Fixed: 2089469
2017-08-11 06:40:14 -07:00
Frank Liu
dc2cefb153 qcacld-3.0: fix sap not restart when on unsafe channel
In LTE Coex test, firmware will report the unsafe channels, and if sap
runs on these channels, driver goes through channel select process and
restart. There are some situation, in channel select process, SAP can't
find the proper PCL channel lists, and fail to restart.

This fix is to let SAP continue to pick up a safe channel from ACS
range when fail to get pcl.

Change-Id: I54145547d2b161aec09caa2dabd4d4b52aa15f03
CRs-Fixed: 2064534
2017-08-10 06:12:57 -07:00
Agrawal Ashish
aff2898902 qcacld-3.0: Trigger copy of pktlogs to SD Card on basis of ring ID
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.

Change-Id: I0776775ab81fd2920ea440b773b146b6af61e434
CRs-Fixed: 2028068
2017-08-10 06:12:55 -07:00
Himanshu Agarwal
dd2196a8f5 qcacld-3.0: Do netif_rx_ni() for frames received before peer assoc
While processing of frames received before peer is registered in process
context, tcp_v4_rcv() is called which takes a spinlock and in between the
processing before spinlock can be released, it is getting preempted by
hif_napi_poll() as it gets executed in softirq context. It tries to take
the same spinlock in tcp_v4_rcv() resulting in deadlock.
Do netif_rx_ni() for frames received before peer is registered.

Change-Id: I6228984f209bb9312ed9d8f3937d6036918ff750
CRs-Fixed: 2034244
2017-08-10 01:49:27 -07:00
Lin Bai
28a4ca04e9 qcacld-3.0: Fix flush uninitialized delay_work crash
With TDLS enabled and CONVERGED_TDLS_ENABLE defined, wlan_hdd_tdls_init()
will be bypassed by tdls_umac_comp_active flag.
While, in wlan_hdd_tdls_exit(), similar check missed, which causes
uninitialized delay_work be flushed. This leads to final crash.

Check tdls_umac_comp_active flag in begining of wlan_hdd_tdls_exit()
to avoid crash.

CRs-Fixed: 2087653
Change-Id: I0d9458683f092456e54ccf42988d4f8534922947
2017-08-09 20:50:32 -07:00
gaolez
e2920bda2b qcacld-3.0: Add ini option for action frame based channel switch
qcacld-2.0 to qcacld-3.0 propagation

Add ini option to enable/disable action frame based channel switch.

Change-Id: I340464a18ef0b5cf09f481a23b01edcf04904e34
CRs-Fixed: 2082563
2017-08-09 20:50:29 -07:00
Yingying Tang
7ccf7d027d qcacld-3.0: Fix compilation error of unsigned only in ISO C90
Constant value 4294967295 is recognized as an signed integer
in ISO C90. Change the definition of the constant value to
4294967295UL to fix compilation error where need a unsigned
value as a input parameter.

Change-Id: I02f67b6351c53b5e3331ce668059c4c61953a8d3
CRs-Fixed: 2023140
2017-08-09 19:37:03 -07:00
Chris Guo
1751acf0c2 qcacld-3.0: Fix QDF assert in command ipaucstat
When doing HDD context check in ipa_init, the CDS is not yet
loaded. So remove the CDS loading check in ipa_init.

Change-Id: I45843c406f280cfbf932bc489f9051c2300b77ba
CRs-Fixed: 2070428
2017-08-09 18:10:46 -07:00
jiad
05c1e81910 qcacld-3.0: fix ipa mcc tx_desc leak
In MCC case when vdev pause queue is full, driver fails to tx and pkts
are dropped. ipa tx_desc only replenishes to ipa driver. This leads to
holes in hdd_ipa_tx_desc free list and list will be drained out causing
unexpected packet drops.

Fix is to replenish tx_desc to wlan driver maintained free list as well
using ipa registered skb free callback.

Change-Id: I1ae8570816efd822d5ced2c6383a03c56b12ec89
CRs-Fixed: 2073444
2017-08-09 18:10:45 -07:00
Peng Xu
5c68281c62 qcacld-3.0: Add interface info when sending P2P LO event
Add interface information when sending P2P listen offload stop
event to upper layer so that the event can be processed on the
correct interface.

Change-Id: I7aac52552e9277aff838d9bfef01201af48773c9
CRs-fixed: 2088732
2017-08-09 15:00:10 -07:00
Kabilan Kannan
00d2041f9b qcacld-3.0: Restructure TDLS function to fix the compilation issue
If TDLS disabled at the build level, it triggers
build failures in some of the projects, which does
not support TDLS feature.
Restructure the TDLS function to avoid build
failures, when TDLS is not enabled.

Change-Id: I3b63546f22d0187fb42d400fd7e15ff7a3d64653
CRs-Fixed: 2056022
2017-08-08 16:05:11 -07:00
Varun Reddy Yeturu
8a5d3d4775 qcacld-3.0: Fix logging levels - Part 3
Move the log messages to appropriate log levels so that
the console does not get a huge spam of unnecessary logs

Change-Id: I8e140039a3a483953606558e102db23ab8b0096a
CRs-Fixed: 2043741
2017-08-08 13:15:11 -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
Venkata Sharath Chandra Manchala
cc78917112 qcacld-3.0: Adjust logging level for Rx path
Change the log level from ERROR to INFO
for hdd_rx_packet_cbk log to prevent
packet information from flooding on the
kmsg.

Change-Id: I27bfcc708740f50c4b15d72b89176af2ce27f6fa
CRs-Fixed: 2082577
2017-08-06 22:49:56 -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
Ashish Kumar Dhanotiya
b8630abe6d qcacld-3.0: Configuration to enable/disable LPRx
Add host support to enable/disable LPRx from ini.

Change-Id: I7a5acd34331cdd1f06a2d08317efcf04c6f608a7
CRs-Fixed: 2080316
2017-08-06 20:45:04 -07:00
Srinivas Girigowda
5da651bc36 qcacld-3.0: Add support for CFG80211_REMOVE_IEEE80211_BACKPORT
CFG80211_REMOVE_IEEE80211_BACKPORT is added to indicate
backport of Change-Id: 57fbcce37b
from upstream 4.7 kernel to 4.4.

Hence add this flag CFG80211_REMOVE_IEEE80211_BACKPORT to
support this compilation. Also introduce HDD_NUM_NL80211_BANDS.

Change-Id: I60a15a1273f939a0a288d08d03ccb5bf1bdcc429
CRs-Fixed: 2087917
2017-08-06 14:48:18 -07:00
Srinivas Girigowda
6519b93735 qcacld-3.0: Fix clang warning 'Wlogical-not-parentheses'
logical not is only applied to the left hand side of this
bitwise operator [-Werror,-Wlogical-not-parentheses]
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^                           ~
csr_api_roam.c:14617:6: note: add parentheses after the '!' to
evaluate the bitwise operator first
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^
             (                               )
csr_api_roam.c:14617:6: note: add parentheses around left hand
side expression to silence this warning
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^
            (                          )

Change-Id: I489eba6a6265778346bb3b20832f92774a2d5e0e
CRs-Fixed: 2087302
2017-08-06 14:48:15 -07:00
Kabilan Kannan
98440ce38e qcacld-3.0: Add ssr protection for scan callback function
Add ssr protection to scan_block_work to avoid null
reference access.

Change-Id: I0ff111abf2bbdcb7b0c3a3c255396c14b0b59f01
CRs-Fixed: 2066506
2017-08-06 13:48:14 -07:00
Ravi Joshi
62765443e6 qcacld-3.0: Fix monitor mode initialization failure on Helium
Returning a negative value from the API results in the failure
on unsupported platform.

CRs-Fixed: 2082239
Change-Id: I75b14b81eaa00d53784a6deb90b99666e28b164d
2017-08-06 13:48:12 -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
yeshwanth sriram guntuka
f6059f280c qcacld-3.0: Add MBO ie in beacon template sent to fw
MBO ies sent in tail buffer of beacon params
structure are not sent in beacon template to
firmware.

Fix is to add MBO ies in beacon template sent to fw

Change-Id: I3987bd431f9a21218650499afa16eac2b59e6486
CRs-Fixed: 2087752
2017-08-06 11:48:36 -07:00
Hanumanth Reddy Pothula
0586014fbf qcacld-3.0: On PNO progress, issue PNO STOP during STA session close
In STA+AP concurrency case, driver fails to receive PNO STOP
indication from the upperlayer and thereby driver fails to send
same indication to FW, leading to a FW crash.
To mitigate this issue, during STA session close, issue PNO
stop indication to FW, if PNO is in progress.

Change-Id: If30e631fc5e8151cd5ecc66ff1d48627123a0a1e
CRs-Fixed: 2059793
2017-08-06 11:48:33 -07:00
Vidyullatha Kanchanapally
f9a0c38360 qcacld-3.0: Add support for the unified roam event
Add support for indicating the new unified roam event
"cfg80211_roamed" which takes a structure to give roam information
to cfg80211.

Change-Id: I71769666e2112e0f443cb36d7db03cb7bdbaf1f2
CRs-Fixed: 2084891
2017-08-06 05:00:07 -07:00
Nitesh Shah
45d6f33555 qcacld-3.0: Disable DBS Scan duty cycle by default
The default value for the ini gdbs_scan_selection is set
with 2 DBS and 2 non-DBS Scan for Module id WLAN_MODULE_
ROAM (5) and WLAN_MODULE_HOST (16). Thus, the scan policy
for full scan is kept getting change for DBS scan and
legacy scan.

This change is to make the default value for the ini
gdbs_scan_selection as NULL, thus disabling the DBS scan
duty cycle feature by default.

Change-Id: I8dd304628b729e11a63aaa2b6dea972cff1798d7
CRs-Fixed: 2062420
2017-08-06 00:59:57 -07:00
Naveen Rawat
3184dd846e qcacld-3.0: Fix implicit conversion error for nl80211_chan_width
Explicitly convert nl80211_chan_width to phy_ch_width in function
__wlan_hdd_cfg80211_set_mon_ch.

Change-Id: I3a35a417b1155db430d6f06444b42664365b02db
CRs-Fixed: 2071677
2017-08-06 00:59:55 -07:00
Naveen Rawat
d9dd4b33f6 qcacld-3.0: Fix implicit conversion error for sme_QosWmmDirType
Replace sme_tspec_dir_type and sme_QosWmmDirType with sme_qos_wmm_dir_type
to avoid implicit conversion warnings/errors and to conform with linux coding
guidelines.

Change-Id: I1567ebbe7ec8adab3344d96f0d2aa93367975926
CRs-Fixed: 2071677
2017-08-06 00:59:54 -07:00
Varun Reddy Yeturu
ed1215ed10 qcacld-3.0: Fix conversion from enum tSirResultCodes
Fix implicit conversion from enumeration type 'tSirResultCodes' (aka
'enum eSirResultCodes') to different enumeration type 'QDF_STATUS'
[-Wenum-conversioni]

Change-Id: I72cbfb99d22d4747890b14d474a36b3c36d1c655
CRs-Fixed: 2071677
2017-08-06 00:59:43 -07:00
jiad
d91a6840f6 qcacld-3.0: fix a double-free in ipa uc ready callback
hdd_ipa_uc_loaded_uc_cb() allocates a msg buffer and passes it to
workqueue handler. Both hdd_ipa_uc_loaded_uc_cb() and workqueue
handler free the msg buffer, which leads to wrong memory dereference.

Fix is to return directly in hdd_ipa_uc_loaded_uc_cb() and let workqueue
handler free the msg buffer.

Change-Id: I842700e7fe94dc9a77fba966d918a054bc79f36a
CRs-Fixed: 2069189
2017-08-05 23:53:31 -07:00
Sridhar Selvaraj
48c4709f8d qcacld-3.0: Move sme_config local variables to dynamic allocations
sme_config is used as local variables with struct tSmeConfigParams
in multiple places causing stack frame size to increase. This is
causing build issues with 32 bit systems where the stack frame
size is limited to 1024 bytes for each frame.

Move multiple sme_config local variables to dynamic allocations to
reduce stack frame size.

Change-Id: I86a93546adf40bbbc19438c3b1e3a7ec0d38f39f
CRs-Fixed: 2074224
2017-08-05 23:53:29 -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
Srinivas Girigowda
4ffe7c8643 qcacld-3.0: Use the proper attribute PARAM_A_BAND_PELT_THLD
Due to the Change-Id: I3ad995636127a5fda0635549551a24cc5b1bd2c5
PARAM_A_BAND_PELT_THLD was incorrectly replaced with
PARAM_A_BAND_BOOST_THLD.

Fix this and bring back the attribute PARAM_A_BAND_PELT_THLD.

Change-Id: I83d21c2b4662c82d2f26f3bcd10a549889f6df1e
CRs-Fixed: 2055487
2017-08-03 19:48:56 -07:00
Srinivas Girigowda
72f3039ec5 qcacld-3.0: Split __wlan_hdd_cfg80211_set_ext_roam_params()
Split __wlan_hdd_cfg80211_set_ext_roam_params() into
multiple functions to improve readability of the code and
fix clang warning (-Wframe-larger-than).

Change-Id: I3ad995636127a5fda0635549551a24cc5b1bd2c5
CRs-Fixed: 2055487
2017-08-03 19:48:53 -07:00
Srinivas Girigowda
a8f66581e7 qcacld-3.0: Fix to set roaming capability in get_supported_features()
Because of obsolete macros FEATURE_WLAN_LFR and WLAN_FEATURE_ROAM_SCAN_OFFLOAD
roaming capability is not properly set in get_supported_features.

Fix this by using the proper macros.

Change-Id: I4dec8c32c71fde01b663e11e60f1da171adee3e4
CRs-Fixed: 2067126
2017-08-03 19:48:51 -07:00
Srinivas Girigowda
8df27eacb6 qcacld-3.0: Enable feature bits in get_supported_features()
This is a qcacld-2.0 to qcacld-3.0 propagation.

Enable feature bits WIFI_FEATURE_CONTROL_ROAMING,
WIFI_FEATURE_IE_WHITELIST and WIFI_FEATURE_SCAN_RAND.

Change-Id: Ia0f136e038e7da040faae04eaa11bcf56bb72443
CRs-Fixed: 1102187
2017-08-03 19:48:49 -07:00
Srinivas Girigowda
9eb807b939 qcacld-3.0: Fix array out-of-bounds & integer underflow in _iw_set_genie
This is a qcacld-2.0 to qcacld-3.0 propagation

'wrqu->data.length' holds the total number of IE data buffer.
Add a check to make sure the number of remaining data to be read is
greater than or equal to IE length.

Also, advance the buffer pointer to point to the next element only
if next element is present.

Change-Id: Ic60f3e0650f365955dab4099eb8740e9789e00cc
CRs-Fixed: 1100132
2017-08-03 19:48:47 -07:00
Mohit Khanna
ceb9778bfc qcacld-3.0: Dump DPTRACE on cfg8011 disconnect
Dump the last few (100) DPTRACE records when a cfg80211 disconnect is
received from the userspace with reason code WLAN_REASON_DEAUTH_LEAVING.

Change-Id: Ib370f8d8b71f20364e0da73a1aee5673c0fc4ca4
CRs-Fixed: 2029713
2017-08-03 16:34:41 -07:00
Mahesh Kumar Kalikot Veetil
aff9486ae9 qcacld-3.0: Refactor hdd_register_interface()
Unify hdd_register_interface() and hdd_register_hostapd(). Update
failure log with error status and device name in case of
register_netdevice(), register_netdev() or dev_alloc_name() failures.

Change-Id: I428c73d473de6dc2e61567129e9f2a7996631729
CRs-Fixed: 2085098
2017-08-03 16:34:39 -07:00
jiad
9d472c9da0 qcacld-3.0: fix possible race condition in hdd IPA
hdd_ipa->sta_connected in WLAN_CLIENT_DISCONNECT case is not under lock
protection and is prone to race conditions.

Fix is to release event_lock after checking sta_connected so as to avoid
possible race conditions.

Change-Id: I6206d5d0cc2cf5df02ab4caf0de810961da21006
CRs-Fixed: 2082525
2017-08-03 16:34:37 -07:00
Hanumanth Reddy Pothula
30645a805e qcacld-3.0: Resolve out of bound memory access, while processing setpno
propagation from qcacld-2.0 to qcacld-3.0.

While processing setpno ioctl, there is an out of bound memory
issue when Host is copying ioctl arguments to a local buffer.

While copying ioctl arguments, make sure valid indices are used.

Change-Id: I03078df7135f5f1daf1d9bead7d4410e58fb848a
CRs-Fixed: 1112355
2017-08-02 14:04:37 -07:00
Kapil Gupta
aa902a74fe qcacld-3.0: Enable PER roam by default
Add changes to enabled PER based roaming by default.

Change-Id: I72f0d4826b2841038e609dd0afcb771bcb715d49
CRs-Fixed: 2026668
2017-08-01 00:57:26 -07:00
Dustin Brown
84411b0e45 qcacld-3.0: Flush pending powersave timers during suspend
Currently, auto powersave timers are deferrable. This means any pending
auto powersave timers will not fire while the device is supended, which
can have a negative impact on wlan power usage. Instead, flush any
pending auto powersave timers during the suspend process, to ensure
powersave is enabled while the device is suspended.

Change-Id: I5911ee30eaf770909b728af73958ba1bbaa8457f
CRs-Fixed: 2080812
2017-07-31 18:53:15 -07:00
Sravan Kumar Kairam
6b92adff7d qcacld-3.0: Disconnect TX pipe when RX pipe connect fails
Currently when IPA RX WDI pipe connect fails during start modules
host does not clean up the TX pipe which is allocated before the
RX pipe. As part of proper clean up from host in this change
disconnect the TX pipe handle when RX pipe connect returns failure.

Change-Id: Ic037dd2415ab5be497a0617d8151d63219868fd1
CRs-Fixed: 2040146
2017-07-31 18:53:14 -07:00
Nachiket Kukade
4fa80f430a qcacld-3.0: Enable Force 1x1 WAR by default
Setting gForce1x1Exception=1 in ini forces DUT to associate to
buggy AP's which are identified via OUI. Enable this feature by
default on all platforms by setting CFG_FORCE_1X1_DEFAULT=1.

Change-Id: Ic459d821f4aedba966beab8ca8ca977b7b639e34
CRs-Fixed: 2084927
2017-07-31 17:52:49 -07:00