Commit Graph

3172 Commits

Author SHA1 Message Date
Sravan Kumar Kairam
c1ae71c4cd qcacld-3.0: Add ARP debug stats
Change to collect arp packet stats along with
existing hdd stats to debug arp packet related
issues.

Change-Id: Idce70799bd3698dc8a8ecd8cfc8ef7d9bf1f5764
CRs-Fixed: 2019787
2018-02-26 04:07:10 -08:00
Ashish Kumar Dhanotiya
4be2a7b2a4 qcacld-3.0: Validate update avoid frequency channel list
qcacld-2.0 to qcacld-3.0 propagation.

Validate the avoid frequency channel list of
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY command and update the
driver's unsafe channel list with the channels received in the command.

Change-Id: I1a10e668bf6fe6dbb22f7f2f8aef929fc6e7fc65
CRs-Fixed: 2187477
2018-02-26 00:24:11 -08:00
Kiran Kumar Lokere
5cc2f0da1f qcacld-3.0: Add support to configure HE fragmentaion
Add support to configure HE fragmentation support using NL
command.

Change-Id: I49b81df96a9c8199a1cc5994762aeba0ed9676b0
CRs-Fixed: 2166782
2018-02-24 04:11:17 -08:00
Dustin Brown
7bd76330b1 qcacld-3.0: Disable Packet Filter by default
The Android Packet Filter (APF) is the preferred method for filtering
packets, but the legacy Packet Filter may also be used. In order to
encourage the use of APF over Packet Filter, disable Packet Filter by
default. Customers may still enable Packet Filter via setting
gDisablePacketFilter=0 via ini configuration.

Change-Id: I581a4001167571efbc7c1c1738c5585e4bde0611
CRs-Fixed: 2195111
2018-02-23 13:26:05 -08:00
Tushnim Bhattacharyya
087bff3a13 qcacld-3.0: Trim ACS channel list based on the concurrent connections
If force SCC is enabled and there is a STA connection, trim the
ACS channel list on the band on which STA connection is present.

Change-Id: Ibd580a7afdcdfc5fb4398ada547565e229d59c70
CRs-Fixed: 2191792
2018-02-22 23:30:48 -08:00
Hanumanth Reddy Pothula
3862ca9efa qcacld-3.0: Flush scan results on interface down
After successful connection, if interface down(STA) happens on DUT
and if AP changes data rates before interface up happens, there
is a possibility of STA to send packets at older data rates, because
of holding older scan results in SME scan cache. This results in using
stale scan result even after wifi turn off and on. If stale scan result
is used and if AP has updated some params like rates DUT will not be
using those supported rates for tx which is an issue.

To mitigate this issue, flush scan results on STA interface down.
Also, make sure there are no other STA interfaces before flushing
scan results.

Change-Id: I3505c128276fa8e5e05ea5d9110eb75275a746e9
CRs-Fixed: 2171523
2018-02-22 14:05:22 -08:00
Yun Park
f1684eced9 qcacld-3.0: Add BUG_ON when uC ready failed
When uC ready fails while WDI init, get a dump for uC debugging.

Change-Id: I87b635bf4644b54d47bee65307d7484c9e328885
CRs-Fixed: 2194383
2018-02-22 12:38:40 -08:00
Abhishek Singh
221cf99fdf qcacld-3.0: Cleanup unused scan code
Cleanup the unused legacy scan code.

Change-Id: Ia664f815759142e7f4ad8e648a469c63ddd003f5
CRs-Fixed: 2193917
2018-02-22 07:25:52 -08:00
Ashish Kumar Dhanotiya
191d164636 qcacld-3.0: Add ini parameter for chain selection optimization
Add ini support to Enable/Disable chain selection optimization
for one chain dtim.

Change-Id: I95999a4204f2d978abc9951688332400b9670f0e
CRs-Fixed: 2189150
2018-02-22 04:04:00 -08:00
Abhishek Singh
f723e3d31a qcacld-3.0: Cleanup the legacy scan code
Cleanup the unused legacy scan code.

Change-Id: Ia45cf0310c506d3cf6b897b31f9d28b4fac3197c
CRs-Fixed: 2193917
2018-02-22 09:57:12 +05:30
Kiran Kumar Lokere
a934561748 qcacld-3.0: Add support to configure BA operating mode
Add support to configure BA operating mode using nl command

Change-Id: Ibc566d7e090b5f54636b8029e0e8eef9d26c9ad8
CRs-Fixed: 2181889
2018-02-21 19:27:40 -08:00
Kabilan Kannan
b867c313fe qcacld-3.0: Fix TDLS memory leak in SSR and driver unload
In SSR or driver unloading case, directly exit may cause obj
leak. Free the objects in those cases, regardless of
sme_close_session status

Change-Id: Iaf0500aca23917f84c37848cd3abade66b7d7456
CRs-Fixed: 2187579
2018-02-21 17:12:22 -08:00
Arunk Khandavalli
2859fa1f8b qcacld-3.0: Add fw down check to validate context
Is firmware down check is added explicity in some api's and insome
northbound interfaces it is not added resulting in waiting for
firmware response even when the firmware is down.

Move firmware down check to validate context umbrella where
other driver states are validated.

Change-Id: I42a520f8a573825fde55a40dd03bb942f8a34b9c
CRs-Fixed: 2188938
2018-02-20 21:47:55 -08:00
Sachin Ahuja
16904db4ef qcacld-3.0: Avoid reinitialization of wlan_start_comp event
Currently in case of static driver, wififtmd which writes into the
bootwlan and wifi-service which writes into the state_ctrl_param
executes in parallel. The handler of boot_wlan and state_ctrl_param
in driver intialize this wlan_start_comp variable and wait for its
completion. If one handler is already waiting on this event and other
handler reinitalize the event then it leads to the instability.

To mitigate this issue
1) set the driver loaded state to true and then complete the
wlan_start_comp event.
2) create the state_ctrl_param fs only once the boot_wlan handler
wait is completed for probe.

CRs-Fixed: 2158126
Change-Id: Ia51811a0dd2c5b52f7eee781c4d4620174de3649
2018-02-20 17:54:57 -08:00
Arif Hussain
55aaaad921 qcacld-3.0: Set copy_to_user flag on ftm rsp command
If command type is FTM_IOCTL_UNIFIED_UTF_RSP set copy_to_user
flag to return proper data to userspace.

Change-Id: I5f4a1e147f3d1dc162001ceb69fa6823b3158787
CRs-Fixed: 2191046
2018-02-16 18:58:34 -08:00
Rajeev Kumar
1117fcf2af qcacld-3.0: Fix memory leak in HDD API iw_setnone_getint
HDD IOCTL __iw_setnone_getint is not releasing SME config memory
in error case properly and hence leading to memory leak. Fix this
SME config memory leak by properly freeing it before returning from
__iw_setnone_getint.

Change-Id: Ie50259a639edb2cfa63cd3bbe7cac8bb8ebb7654
CRs-Fixed: 2191041
2018-02-15 20:59:50 -08:00
Abhinav Kumar
5eda62d43c qcacld-3.0: Fix to avoid race condition during acs scan
Currently, driver allows multiple acs scan requests at a time. Due to this
race conditions can occur and causes "use after free" issue for variable
channelList. To avoid race condition, driver should allow only one acs scan
request at a time.

Add a new atomic variable to make sure that if one acs scan request
is in process, the driver should reject all further acs scan requests.

Change-Id: I7aa2f4df0dd4c6ca8ff791fe462d142fc7b3e691
CRs-Fixed: 2176354
2018-02-15 14:10:44 -08:00
Yun Park
84c0cebe87 qcacld-3.0: Add IPA WDI Unified API support
Support for WDI2 in the Unified IPA WDI APIs.

Change-Id: Ife42a6a96ce80070de51f994e29ded252b3dd980
CRs-Fixed: 2183498
2018-02-15 09:20:27 -08:00
Vignesh Viswanathan
0a569299e8 qcacld-3.0: Check for SME state in hdd_get_sta_connection_in_progress
Currently in hdd_get_sta_connection_in_progress, conn_info.uIsAuthenticated
is used to check if the STA connection is in progress. However, this might
not reflect the actual state and might still lead to the deadlock scenario
fixed in I23ad1fc96882abeaae2d1b051659ea6d24b07428.

Add new API to check for SME state for key exchange in progress and
use it in hdd_get_sta_connection_in_progress.

Change-Id: I7d6199ed8c81a113c4e3f30538d74fb675e730ff
CRs-Fixed: 2189814
2018-02-15 01:49:23 -08:00
Vignesh Viswanathan
0fcb4d3b6b qcacld-3.0: Reduce minimum value for 11k offload cache timeout
Reduce the minimum value for the ini nr_offload_cache_timeout to
5 seconds.

This is done to give the user a shorter cache_timeout to trigger
neighbor report frames more frequently.

Change-Id: Ica5359b9e826dad382868de991dcbf204c10a096
CRs-Fixed: 2189034
2018-02-14 09:33:15 -08:00
Krunal Soni
707eb78287 qcacld-3.0: Add support to enable/disable WMM using nl cmd
Add support to enable/disable WMM feature using nl command

Change-Id: I71f5afd0f922854f8756a0428cbb290e641d5021
CRs-Fixed: 2187621
2018-02-13 18:28:44 -08:00
Kiran Kumar Lokere
13dedacbdc qcacld-3.0: Update HE STBC cap and support to configure it
Update the HE STBC capabilty per latest spec and add support
to configure it using INI configuration and ioctl.

Change-Id: I4ecc7b600671c132c1f3968a10fb652a4311f484
CRs-Fixed: 2181114
2018-02-13 17:24:04 -08:00
Kiran Kumar Lokere
96246e5cfb qcacld-3.0: Add support to configure HE MCS using ioctl
Add support to configure HE MCS using ioctl

Change-Id: Idcff05dd090a601e1603d60f55a38424d2f124d8
CRs-Fixed: 2181112
2018-02-13 17:24:01 -08:00
Kiran Kumar Lokere
08195ef17d qcacld-3.0: Add support to reject addba request from peer
Add support to reject addba request from peer by sending
refuse status

Change-Id: Icfd4c14009b4e4646a246b84790da5d0b7b0a512
CRs-Fixed: 2172674
2018-02-13 17:23:58 -08:00
Zhu Jianmin
a2f8e8dbe1 qcacld-3.0: wait tx complete before vdev stop
Before VDEV_STOP is initiated by host, sometimes there are
outstanding mgmt tx pkts left in FW.  need wait all tx
complete,  or peer vdev ref count keep held. In P2P GO/SAP mode,
no wait since wma->interfaces[session_id].delay_before_vdev_stop
is 0, ini relative cfg isn't passed to wma at all.

Change-Id: I1c3d137bb08624e30cc220e0fa0e31e6d6fc8a9d
CRs-Fixed: 2184096
2018-02-13 09:33:52 -08:00
Naveen Rawat
d1ad569cee qcacld-3.0: Change TXRX chainmask default to 0
Change CFG_VHT_ENABLE_1x1_TX/RX_CHAINMASK_DEFAULT to 0 which
indicates to don't care setting.

Change-Id: Ic16a2eba471bdfb77ecc0329c67b36b65a3b3489
CRs-Fixed: 2184433
2018-02-12 15:44:51 -08:00
Sandeep Puligilla
ad399cd99b qcacld-3.0: Fix wlan load failure
CONFIG_GENL is not defined in some target
builds which is causing wlan load failure
with deubg message unknown symbol.

Fix the build load failures.

Change-Id: I448e405b099788c4c83303d9abdee9f7c1e45261
CRs-Fixed: 2188593
2018-02-12 11:32:29 -08:00
Himanshu Agarwal
8b3d3e93b5 qcacld-3.0: Do 11ac override only if channel list has 5Ghz channel(s)
If 11ac override is enabled, change hw moed to 11ac and channel width
to the value defined in vht channel width ini. If channel list received
from hostapd contains only 2.4 Ghz channels, mismatch happens as hw mode
is 11ac but the channel list contains only 2.4 Ghz channels and no 5Ghz
channel.

Do 11ac override only when the channel list received from hostapd contains
5Ghz channel(s).

Change-Id: I28d9af3fed4b8487b50a4442221c1c880fe14c13
CRs-Fixed: 2186710
2018-02-12 16:33:32 +05:30
Alok Kumar
eff0d77da1 qcacld-3.0: Prevent null pointer dereference issue
Add null check for pdev after cds_get_context, while
retrieving the context maintained by CDS

Change-Id: I2d6de7d5ad2a46139b2594cf966f2c083c9bb4b4
CRs-Fixed: 2187396
2018-02-12 02:15:41 -08:00
Sourav Mohapatra
eade62fc49 qcacld-3.0: Remove check to disable memdump for FTM mode
During init and deinit, the driver performs memdymp_init and
memdump_deinit. These are not done for the case when driver is in
FTM mode. In the present scenario, unloading the driver while in
FTM mode and then reloading causes problem.

Allow memdump_init and memdump_deinit to occur while the driver is
in FTM mode.

Change-Id: I4bed1bf76ee19612da9c27fe6cebb586ef7e542b
CRs-Fixed: 2170695
2018-02-12 01:17:08 -08:00
Arif Hussain
05fb4870a3 qcacld-3.0: Add bss color collision detection support
Add support for bss color collision detection.

Change-Id: Idd616ca902469f5dc446d35e63fce7fe7eb0d327
CRs-Fixed: 2130127
2018-02-11 23:20:42 -08:00
Liangwei Dong
2a7f2914a9 qcacld-3.0: Unit test chan avoid
Add iw private command for unit test sap ch avoid

Change-Id: I27f051b47eb25e3a57be6449ccb778aefe5b0967
CRs-Fixed: 2186440
2018-02-11 03:33:49 -08:00
Yun Park
a658cf9852 qcacld-3.0: Fix IPA Rx suspend timeout due to IPA Tx pipe stall
IPA Rx suspend command could be timed out because IPA Tx pipe stalls
due to FW WDI Tx pipe is already suspended beforehand.
Fix this by sending IPA Tx pipe suspend before FW WDI suspend.

Change-Id: I50c357ca0f8ddfcc1a51ad4ed040961daf052459
CRs-Fixed: 2177445
2018-02-11 01:45:09 -08:00
Naveen Rawat
dacb503d6f qcacld-3.0: Skip chainmask programming if antenna sharing enabled
Skip chainmask programming if antenna sharing enabled.

Change-Id: If4c765ed35b249b8a08660557a20bec2c77579f7
CRs-Fixed: 2186904
2018-02-10 03:23:28 -08:00
Kiran Kumar Lokere
44a2943836 qcacld-3.0: Add support to update HE cap Nss using ioctl
Add support to update HE Nss capability using ioctl command

Change-Id: I0f32da6eb5835c008b6b35f000e4c670a22b111b
CRs-Fixed: 2181263
2018-02-10 00:52:06 -08:00
Dustin Brown
c1034df950 qcacld-3.0: Disable PANIC_ON_BUG for end user builds
PANIC_ON_BUG is currently enabled for all WLAN builds. While a customer
can, and should, disable PANIC_ON_BUG for end user builds, this can be
easily overlooked. Disable PANIC_ON_BUG by default on pure performance
builds, to avoid accidentally crashing end user devices. Customers can
opt-in to PANIC_ON_BUG as needed for validation on performance builds.

Change-Id: I79371206b20b978f4e61954c2f49bbb7b07ba95e
CRs-Fixed: 2186099
2018-02-09 11:33:11 -08:00
Sandeep Puligilla
019a1bd120 qcacld-3.0: changes to support spectral genl
HDD changes to support general netlink sockets for
spectral scan feature.

Change-Id: Ie8f262ef77b42c69ac5e25e9a2d0cc099b66b1dd
CRs-Fixed: 2183863
2018-02-09 09:20:49 -08:00
Will Huang
20de943612 qcacld-3.0: Check driver load/unload status before starting tx
hdd_softap_hard_start_xmit has cds_ssr_protect so prevent it running at
point of cds_wait_for_external_threads_completion in wlan_hdd_remove,
but after that hdd_softap_hard_start_xmit still inject in, it will
cause race condition between tx and unloading deinit.

Fix it by checking driver load/unload status at the beginning of
__hdd_softap_hard_start_xmit, and similar change for sta mode.

Change-Id: Ic3c72debb81fdfb8adca4e90bd9436f3a68eea11
CRs-Fixed: 2174243
2018-02-09 07:45:31 -08:00
Vignesh Viswanathan
dd9cf6259a qcacld-3.0: Stop STA if connection in progress and SAP Stop is received
In STA+SAP concurrency, when the STA connection is in progress or set_key
is in progress, the set_hw_mode command to SME is queued and would be
processed only after the connection is complete. Meanwhile, when a stop
SAP is received and SAP Dissassociate STA is triggered from HDD, the
command is queued in SME and cannot be processed until STA connection
is done. The add_key command from the supplicant is also stuck as the
previous stop_ap command is in progress leading to a deadlock. When the
AP sends deauth to the STA due to 4 Way Handshake failure, the STA is
reset and then the stop SAP command proceeds, followed by another
connection for the STA.

Disconnect STA interface first if connection or key exchange is in progress
and then stop SAP interface to prevent this deadlock condition.

Change-Id: I23ad1fc96882abeaae2d1b051659ea6d24b07428
CRs-Fixed: 2187070
2018-02-09 06:24:20 -08:00
Abhishek Singh
c87bb049d8 qcacld-3.0: Move wma_get_buf_start_scan_cmd logic to common code
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.

Change-Id: Iaee8ab5b7f0c20867bf37db7509b1c1fab23579d
CRs-Fixed: 2180959
2018-02-08 23:34:34 -08:00
Amar Singhal
2d812011d7 qcacld-3.0: Maintain and call driver load count
When wiphy is registered with kernel, the kernel call the regulatory
notifier with the last request cached by the kernel. The last request
is initialized to world mode. So for the first time registration,
ignore the kernel callback.

Change-Id: I8c6070eebac4c04145e51daaecb7745f331f58b1
CRs-Fixed: 2174245
2018-02-08 21:37:28 -08:00
Paul Zhang
a05a025bcf qcacld-3.0: use driver database for reg no-offload
Currently driver created reg database instead of
db.txt for reg no-offload case.

Change-Id: Ia7853679532ad7536d34b4a4040feffb8566e907
CRs-Fixed: 2174245
2018-02-08 21:37:25 -08:00
Himanshu Agarwal
75e74413db qcacld-3.0: Avoid selection of irrelevant channel in 80/160MHz config
When channel list contains all channels from channel 1 to channel
165 and ch width is 80MHz, the channel to be selected as part of
ACS algorithm should be a 5GHz channel as 2.4GHz channels does not
support 80MHz but 2.4GHz channel gets selected with channel
width as 40MHz. Similarly when ch width is 160Mhz, the 160Mhz bonding
can be made only by 36-64 and 100-128 channels but 2.4Ghz channel or
some other 5Ghz channel gets selected as a result of ACS algorithm.

Assign max weight to all the 2.4GHz channels in 80Mhz and to all 2.4 Ghz
channels and 5Ghz channels not in the range 36-64 and 100-128 in 160 Mhz
so that only a valid channel is selected after the ACS algorithm is
completed.

Change-Id: I00c40e5d000a1cf8b79397fd4e361838a60b363d
CRs-Fixed: 2182011
2018-02-08 07:55:35 -08:00
Naveen Rawat
b54c72bedc qcacld-3.0: Add DBS check for all chain mask programming
Add DBS check for all chain mask programming. Currently the check
is present only for band specific chain mask parameters.

Change-Id: I415a8e8f666961b90d1cd9130b3c33eecb62c1df
CRs-Fixed: 2184255
2018-02-08 06:58:22 -08:00
Himanshu Agarwal
1ed8bffa9e qcacld-3.0: Assign acs_cfg->end_ch before use
In __wlan_hdd_cfg80211_do_acs(), when gAP11ACOverride is 1,
it sets vht_enabled to 1, hw_mode to 11ac and acs_cfg->ch_width
to the value of ini gVhtChannelWidth. If acs_cfg->end_ch is less
than 14 and acs_cfg->ch_width is 80Mhz, set acs_cfg->ch_width to
40Mhz. As acs_cfg->end_ch is not assigned yet, it is 0 due to
which acs_cfg->ch_width gets assigned to 40Mhz.

Assign acs_cfg->end_ch before use when gAP11ACOverride is 1 in
__wlan_hdd_cfg80211_do_acs().

Change-Id: If8bcc7470c1693791dfc64ec0b6059c09747d739
CRs-Fixed: 2184017
2018-02-07 21:13:18 -08:00
Amar Singhal
1808164995 qcacld-3.0: Destroy sysfs version node in stop modules
Destroy the node when modules transition from opened to stopped.
Otherwise duplicate creation of node can lead to warning.

Change-Id: Ib1031cfa0572962454b293730fefd7a4b4cf8d09
CRs-Fixed: 2180344
2018-02-07 18:09:02 -08:00
Kiran Kumar Lokere
c87546f49d Revert "qcacld-3.0: Call callback to sync the user-space"
Reverts Change-Id: I1e31ff122f9337c353d8be260b4802cc363790d6

Revert this change until the dependent kernel is change is
merged

Change-Id: Iad0b39f990a840c7901815932b8b5aa2c4c67c95
CRs-Fixed: 2186005
2018-02-07 13:50:39 -08:00
Yeshwanth Sriram Guntuka
d18c7a27a7 qcacld-3.0: Populate correct HT MCS index in station stats
HT MCS index returned by wma_get_mcs_idx function is
between 0 and 7 for both nss equal to 1 and 2. This
results in incorrect HT MCS index for nss 2 case
populated in station stats on using iw station dump
command.

Fix is to set the correct HT MCS index based on nss.

Change-Id: Id4ac51b56bc44e90ea0e7570b387450af83ee8f5
CRs-Fixed: 2182050
2018-02-07 07:55:34 -08:00
Surabhi Vishnoi
7f085d2147 qcacld-3.0: Adding an ini for wmi wq watchdog
Adding an ini for wmi workqueue watchdog, the ini value will
give the timeout value for wmi watchdog timer.

Change-Id: I6338351c8d788478307892152305e10186ead6cb
2018-02-07 04:00:19 -08:00
jiad
195f703bd6 qcacld-3.0: save return value of hdd_ipa_init
If hdd_ipa_init failes, driver cleanup is done. But return value
of hdd_ipa_init is not saved and returned to caller. This will
lead to wrong behaviors if following actions depend on the
return value.

Fix is to save return value of hdd_ipa_init.

Change-Id: Iad10733c8fcb7049aa9573ccd1da51250aa7fddf
CRs-Fixed: 2181510
2018-02-07 02:15:05 -08:00