Commit Graph

3354 Commits

Author SHA1 Message Date
Abhinav Kumar
b638b5daee qcacld-3.0: Fix to allow ACS scan in dual band SAP mode
Currently, Logic to reject concurrent ACS scan is present
in Hdd context and variables for this context is common for
both softaps(softap1 and softap2). Due to this in case of dual
band SAP mode, if an ACS scan is in progress for softap1 then
driver rejects any ACS scan on softap2, which is not acceptable.
Fix is to move logic to reject concurrent ACS scan from
hdd context to adapter context.

Change-Id: I9d2b437523ef6ac5794e7952ac6cd35d1c2f778b
CRs-Fixed: 2206499
2018-04-16 15:16:16 -07:00
Himanshu Agarwal
3022b30e99 qcacld-3.0: Support BAND_ALL in case of ICM from HOST driver side
Whenever hw_mode=any is set in hostapd.conf, BAND_ALL is sent to
HOST driver from hostapd. ICM module doesn't support BAND_ALL
and so HOST driver internally changes the band to BAND_2G or BAND_5G
based on acs_freq_band and update the channel list and ch_width
accordingly.

ICM module supports BAND_ALL now so don't do any optimization on
band in HOST driver.

Change-Id: Ia0b554f72ba0d5063ff622edbe1fa7113b984142
CRs-Fixed: 2224675
2018-04-16 15:16:12 -07:00
Paul Zhang
b1f35df0b0 qcacld-3.0: update the adapter->rssi from fw
Currently, sta's adapter.rssi does not reset when disconnect
with the previous ap and for new connection there might be no
valid rssi so it will get 0 when hdd_get_station_statistics_cb
or hdd_get_rssi_cb is invoking. Then it uses the previous ap's
rssi for the new conneciton.

Per the code logic, it is ok to set adapter.rssi with 0 value.
Because it invokes hdd_get_rssi_snr_by_bssid to get the
rssi & snr when issue happens.

Change-Id: I737cfcf16d58501546f2fceab06ed1e5418e7b06
CRs-Fixed: 2199782
2018-04-16 02:15:07 -07:00
Min Liu
2bfab5b7ff qcacld-3.0: Ignore regulatory notifier from CORE
Since WLAN host driver is regulatory offload design,
regulatory notifier from CORE should always be ignored.

Change-Id: Iaf23bdd1606e84cb309101246088ce6d506aa78b
CRs-Fixed: 2215884
2018-04-15 23:15:19 -07:00
Tushnim Bhattacharyya
7b5b137807 qcacld-3.0: Remove WLAN_AP_STA_CONCURRENCY feature flag
STA+SAP concurrency is a default feature now. Remove
WLAN_AP_STA_CONCURRENCY feature flag.

Change-Id: I1200fa57b27ded67b0a17aa9e43c88926a822034
CRs-Fixed: 2223507
2018-04-14 07:37:33 -07:00
Kiran Kumar Lokere
a006a3010f qcacld-3.0: Add support to configure HE LTF
Add support for configuring HE LTF.

Change-Id: Ieabe844729c32c47403a7c94864cb689fa7fb8aa
CRs-Fixed: 2201837
2018-04-14 06:14:41 -07:00
jinweic chen
5104601ba7 qcacld-3.0: fix non-linear data TX dma failed issue
Currently non-linear, non-tso TX data is not handled correctly,
only the non-tso, single linear data is supported. the frag paged
data in skb is missed while packet length for HW access
is entire packet length, HW DMA failed.

temporarily to linearize skb so that non-linear data could be TX
correctly.

Change-Id: Ic0f2b7a0b021ca190c870551a66181f50ae72c65
CRs-Fixed: 2180318
2018-04-14 06:14:38 -07:00
Rajeev Kumar
15b40a23a9 qcacld-3.0: Add CFG INI item to control various unit test features
Suspend/Resume unit test IOCTLs and other unit test features are only
enabled in defconfig debug builds and always disabled in production
builds. Add CFG INI item to disable these test IOCTLs even in defconfig
build such that by default on all build combinations unit test IOCTLs
are always disabled.

Change-Id: I71a63d2b85800b630d7c18eb77a3cffddcd66fbb
CRs-Fixed: 2221874
2018-04-14 06:14:36 -07:00
Wu Gao
94488c28fb qcacld-3.0: Remove not used INI CFG
Cleanup not used INI configures. This is part of FR about WNI and INI
CFG.

Change-Id: I374e870610d79cc0d172ae126bfa70dc6d2db9a9
CRs-Fixed: 2206061
2018-04-13 14:51:19 -07:00
Wu Gao
8800cb17f1 qcacld-3.0: Remove not used WNI CFG
Cleanup not used WNI configures. This is part of FR about WNI and INI
CFG.

Change-Id: Iee92add09366188ccb5a6f2385d07758221f8d67
CRs-Fixed: 2206059
2018-04-13 14:51:12 -07:00
gaurank kathpalia
63311d11a2 qcacld-3.0: Avoid disconnect timeout in try disconnect
If connection is in progress and new connection req is
received from supplicant, hdd tries to disconnect the
current session and post force disassoc command and wait
for it to get completed. If the current ongoing connect
operation fails and this force disassoc is processed as
sme session is in disconnected state it is silently
dropped and thus there is no event sent to the HDD
to stop the wait for disconnect and HDD wait for 5
sec before returning connect failure.

Fix this by Calling disconnect handler if, disconnect
with force dissoc is called in disconnected state

Change-Id: I3a78308b54fb048fba5a6aed3d8e8b193c371647
CRs-Fixed: 2223313
2018-04-13 12:15:51 -07:00
Padma, Santhosh Kumar
c88de4811d qcacld-3.0: Hold wakelock till connection completion
There is a chance that kernel can trigger suspend while
connection in progress. If driver allows this suspend, this can
result in fw panic.

Specific scenario:
If driver allows suspend to go when it waits for probe response,
fw least expects suspend indication as fw is in vdev start state.
This unexpected suspend indication in vdev start state can cause
fw panic.

Hold wakelock till the completion of association to fix this issue.

Change-Id: I168ead2ab1ef4fff1d9af3f3142c82536c3f4798
CRs-Fixed: 2217140
2018-04-13 09:30:27 -07:00
lifeng
fe6c3e2283 qcacld-3.0: Export antenna info to the userspace
qcacld-2.0 to qcacld-3.0 propagation
Discard the original wmi interface:
WMI_PEER_ANTDIV_INFO_REQ_CMDID/PEER_ANTDIV_INFO_EVENTID,
replace with the new one:
WMI_PDEV_DIV_GET_RSSI_ANTID_CMDID/WMI_PDEV_DIV_RSSI_ANTID_EVENTID
to support chain value along with corresponding antenna info.

Change-Id: Ie9ea9d160e1ac1e2e65de422c85989159fb5a556
CRs-Fixed: 2005820
2018-04-13 09:30:22 -07:00
wadesong
8abb30d292 qcacld-3.0: Add support for SIFS burst enabling through iwpriv
When CLD3.2 driver is setting pdev burst mode to FW, 3
possible values are supported:

	0: disabled
	1: enabled for legacy burst
	3: enabled for SIFS burst

but the iwpriv command handling code only supports setting
0 or 1 to FW.

Add value checking for WE_SET_BURST_ENABLE to support setting
3 to FW.

Change-Id: I35506b83d584f6e8d066adfc43df8dd03ce54661
CRs-Fixed: 2214992
2018-04-11 22:25:13 -07:00
Padma, Santhosh Kumar
a5eaeb8686 qcacld-3.0: Enable SAE and GCMP by default
Add changes to enable SAE/GCMP by default.

Change-Id: I4d7597e019379429916e9684fa1126fda3c97e41
CRs-Fixed: 2217451
2018-04-11 09:15:03 -07:00
jitiphil
fb410619e0 qcacld-3.0: Reset txrx connectivity stats after SSR
After SSR, FW clear its txrx connectivity stats.
In host, as adapter is intact, host connectivity
stats counts are still available. Now if the set
stats command is used again, then host increments
its counts start from its last saved value, i.e.,
count before SSR, and FW increments its count from 0.
This sends a mismatch of packet counts b/w
host and FW to framework that creates ambiquity.

To address the issue, reset the host counts so that after SSR
both FW and host start increment their counts from 0.

Change-Id: I11f849d6f00abe11f3bb8947cc81e47a3bc004fa
CRs-Fixed: 2202890
2018-04-10 08:52:37 -07:00
gaolez
d11c7c5569 qcacld-3.0: fix compatible issue for timestamping feature
qcacld-2.0 to qcacld-3.0 propagation

Use qdf_do_div() for 64 bit division, because '/' can't be used for
64 bit division on arm32 platform.

Change-Id: I19a1db8adbc1fe7acaee0ec824f670b67284f628
CRs-Fixed: 2155143
2018-04-09 00:01:41 -07:00
Naveen Rawat
3cb779ed91 qcacld-3.0: Add ini param to control logging for CP_STATS
Add ini param to control logging for CP_STATS.

Change-Id: I8e46ed1935e20d5f636f7c8c1504ad09c1fabf0f
CRs-Fixed: 2210323
2018-04-08 18:30:34 -07:00
Srinivas Girigowda
841da29860 qcacld-3.0: Switch from module_param_call() to module_param_cb()
The definition of module_param_call() was changed in 4.15 and
in order to have module params that work on the kernel both
before and after that change switch to using module_param_cb()
since its definition has not changed.

Change-Id: I4af7c802ae62041636eda3047805630a16490e75
CRs-Fixed: 2193703
2018-04-06 17:49:25 -07:00
Kiran Kumar Lokere
0e255175b6 qcacld-3.0: Add configuration support for VHT20 MCS9
Add user configuration to enable/disable the MCS9 in VHT20
operation.

Change-Id: I1bf1156dbeb51a7850ef5a5b66295ecc0d007542
CRs-Fixed: 2217038
2018-04-06 14:47:03 -07:00
jiad
bb47e130a0 qcacld-3.0: fix ipa mcc scc event notification
Issue is under AP-AP MCC config, mcc event is not sent from wlan
to IPA driver. mcc mode is decided with the help of connection
table. But for AP mode, mcc mode is checked and updated before
connection table is updated by adding the SAP vdev entry.

Fix is to make ipa mcc mode check and notification when connection
table is updated. Since block is not allowed when conn table is
updated, a new work_struct mcc_work is introduced.

Change-Id: I935222e26bb3f6b31685f52b75084b034daccad2
CRs-Fixed: 2075876
2018-04-06 13:25:23 -07:00
Srinivas Girigowda
49b48b2eae qcacld-3.0: Fix function return type for ndo_start_xmit
Fix function return type for ndo_start_xmit.
Currently .ndo_start_xmit callback functions returns int, but
the correct return type should be netdev_tx_t.

Change-Id: I36d3cc886bfa0fd74a264f2791f09a251baab2ef
CRs-Fixed: 2202134
2018-04-06 01:59:01 -07:00
Jeff Johnson
abcce17d32 qcacld-3.0: Relocate hdd_set_peer_rate()
Currently hdd_set_peer_rate() is implemented in wlan_hdd_wext.c with a
prototype defined in wlan_hdd_wext.h. But the only client is located
in wlan_hdd_hostapd.c, and since that is where the "master mode"
ioctls are handled, relocate hdd_set_peer_rate() to wlan_hdd_hostapd.c
and make it static.

Change-Id: I5ec9c43b29fafc75cb35f1ee465c86acbc6b3b2c
CRs-Fixed: 2219456
2018-04-06 01:58:50 -07:00
Sourav Mohapatra
21b3c988b4 qcacld-3.0: Return -EGAIAN and not -ENODEV if FW is down
When wlan_hdd_validate_context returns ENODEV in the case
of FW down or when driver is in bad state, wificond will
reset and try to unload the driver while SSR/PDR may be
in progress.

Return -EGAIAN and not -ENODEV in the above case.

Change-Id: I9b2314c2d4367b5373d1202b682d2c629a5a3e9f
CRs-Fixed: 2217006
2018-04-06 01:58:47 -07:00
Jeff Johnson
c57c13aec7 qcacld-3.0: Refactor the Green AP configuration
Refactor the Green AP configuration so that it can be easily excluded
when the feature is not enabled, and to support transition to the
converged configuration model that is under development.

Change-Id: I275833f4c60c315937a6fba3f403eb54925e151c
CRs-Fixed: 2218656
2018-04-05 01:29:43 -07:00
Jeff Johnson
53fe40a9bf qcacld-3.0: Rename field enableGreenAP in struct hdd_config
Since camelCase is frowned upon in the Linux coding style, rename
field enableGreenAP in struct hdd_config.

Change-Id: Ie541289f79b2bfe9f2bf490bbcde7e0649e0395d
CRs-Fixed: 2218692
2018-04-04 19:43:31 -07:00
Srinivas Girigowda
de28a9df54 qcacld-3.0: Fix return type mismatch in start_xmit functions
Function declaration and definition has return type mismatch.
Hence fix this.

Change-Id: Icf5f6c435811b7d0801da10bb6f1dfb322cc8dc8
CRs-Fixed: 2208843
2018-04-04 16:39:53 -07:00
Amar Singhal
5f78313578 qcacld-3.0: Reset is_acs_allowed variable when chan count is 0
When world mode is set (ACS chan list is empty) and ACS request comes to
driver, is_acs_allowed variable is not reset. Due to this, in subsequent
ACS requests, is_acs_allowed variable would become 1, leading to ACS
failure in a loop. Fix that.

Change-Id: I97689571e147505ea2c21f271c103e3c8cc74b80
CRs-Fixed: 2215385
2018-04-04 14:12:31 -07:00
Jeff Johnson
8bb6111e1f qcacld-3.0: hdd: Refactor the Green AP feature
Refactor the hdd portion of the Green AP feature so that it can be
easily excluded when the feature is not enabled.

Change-Id: I986c5ab7640b3182a12bef93748affefba067251
CRs-Fixed: 2216247
2018-04-04 11:07:19 -07:00
Jinwei Chen
19846e5a61 qcacld-3.0: Fix issue in connection to WAPI AP
Recent change in hdd_is_tx_allowed function causes failure in Tx of WAPI
Auth frames. Add check in this function to allow Tx of WAPI auth frames
so that device can connect to a WAPI AP.

Change-Id: Id5d4d31385309381383dec432698a8ac625845ad
CRs-Fixed: 2217090
2018-04-04 04:01:57 -07:00
Min Liu
5359ab1240 qcacld-3.0: Add string length validation
qcacld-2.0 to qcacld-3.0 propagation

In hdd_parse_get_ibss_peer_info(), issue is reported by external
researcher that lack of string length validation might lead to
out-of-bounds read.
Related string length validation is added accordingly.

Change-Id: I32304404b2bab9011fa67316b77f6d37bb39df2d
CRs-Fixed: 2214899
2018-04-03 23:46:26 -07:00
Yun Park
0ac1282747 qcacld-3.0: Remove extraneous parentheses around the comparison
Fix LLVM compilation error caused by equality comparison with
extraneous parentheses.

Change-Id: Ia2b7dea8751a8016524459d55c41894fb552f273
CRs-Fixed: 2216820
2018-04-03 19:45:56 -07:00
Ashish Kumar Dhanotiya
04f09dd8d3 qcacld-3.0: Change the default value of CFG_TX_SCH_DELAY_MIN
Change the MIN, MAX and Default values of the ini
CFG_TX_SCH_DELAY_MIN to 0, 5 and 2 respectively.

Change-Id: I27d6110d69ba885535933e31dcca4e08865a7dc8
CRs-Fixed: 2216634
2018-04-03 19:45:51 -07:00
Ashish Kumar Dhanotiya
48dac7d63b qcacld-3.0: Add host support to configure TX delay
There is 1ms TX delay enabled in TX sch module if
frames queued in FW SW queue are less than 32.
This results in Tx delay in FW, and causes response time higher.

Add ini configuration to enable/disable Tx delay.

Change-Id: Ic180431ed2d0848df3dbb144f6b2bd70db61e5f4
CRs-Fixed: 2214307
2018-04-03 19:45:48 -07:00
Abhishek Singh
388d090180 qcacld-3.0: Change OCE WAN score ini for roaming and initial connection
Change the OCE WAN weightage to 2% of the scoring weightage and change
the slot size to 15 and fill the values for each slot in INI.

Change-Id: Ic67cde29a9dfdfaf6022bab106432ef2950e2340
CRs-Fixed: 2208283
2018-04-02 19:39:28 -07:00
Jeff Johnson
e8846abed9 qcacld-3.0: Rename HDD Green AP APIs
Currently the HDD Green APIs do not have a consistent prefix. In
preparation for refactoring this feature, rename the HDD Green AP APIs
to have a consistent prefix.

Change-Id: Ib4d9a6db6ffacd9e19277d95f4976805d0bb6fa3
CRs-Fixed: 2216246
2018-04-02 16:41:38 -07:00
Naveen Rawat
709c0cbcf2 qcacld-3.0: Avoid un-initialized pointer access in hdd_ndi_start_bss
In function hdd_ndi_start_bss, avoid access to channel list pointer without
initializing it.

Change-Id: I9307f587bb9691d12b9b16f3a5e62945be7b2220
CRs-Fixed: 2205990
2018-04-02 03:08:54 -07:00
Subhani Shaik
16821e678d qcacld-3.0: Enable oem data processing in SAP mode
The OEM data is only processed in STA mode. As part of RTT config
LCI/LCR IE element configuration is required in SAP mode.

CRs-Fixed: 2179161
Change-Id: I65e0af23aba502031f23754572ca094058c5fe74
2018-04-01 09:11:03 -07:00
Rajeev Kumar
7563b3fce7 qcacld-3.0: Do not disable IMPS during module start
Do not disable IMPS power save during module start because
IMPS needs to be enabled only once during startup(modue init)
and only needs to be disabled during driver exit(module_exit).

Change-Id: I16babc857658f5f4064025c5eb28d287d025dd88
CRs-Fixed: 2216146
2018-03-30 23:32:34 -07:00
Jeff Johnson
5312f8ea04 qcacld-3.0: Avoid double free in drv_cmd_get_ibss_peer_info_all()
Change "qcacld-3.0: Fix memory leak issues in HDD" (Change-Id:
Iae551cd3acbb6bc2618f05cfdc33e4f742d63192) added logic to
drv_cmd_get_ibss_peer_info_all() to free the dynamically-allocated
buffer "extra" when either of the copy_to_user() calls
failed. Unfortunately this introduced a regression since now in the
success case the "extra" buffer is freed twice.

Update drv_cmd_get_ibss_peer_info_all() to remove the now unnecessary
call to qdf_mem_free() in the success case.

Change-Id: I7f8c17cd7576bf05ac8b6c4d6658ac40cb55782a
CRs-Fixed: 2215443
2018-03-30 21:08:44 -07:00
Jeff Johnson
d66b4d56a4 qcacld-3.0: Remove obsolete support for nAPAutoShutOff
The AP auto shutoff feature controlled by INI item nAPAutoShutOff is
obsolete, so remove it.

Change-Id: I9e96bee36acc1ea1ac6f775ae04b31929bcb8406
CRs-Fixed: 2215925
2018-03-30 14:48:15 -07:00
Mahesh Kumar Kalikot Veetil
885a77b67c qcacld-3.0: Use in_compat_syscall() to check compatness
Use in_compat_syscall() to query the syscall type, so it works properly
on all architectures. Also maintain backward compatibility with older
kernel.

Change-Id: Ife19c9874dcacc18c5d19c1175988bee66ea1cdd
CRs-Fixed: 2215566
2018-03-30 13:30:35 -07:00
Alok Kumar
b64650c29a qcacld-3.0: Handle NUD events within driver
Currently NUD events are used by Framework to detect
the Network Reachability. Framework issues disconnection
for NUD_FAILED event.

Now, NUD events are tracked within driver to detect the
reachability and based on TxRx traffic, driver takes decision
to issue disconnection.

Change-Id: I461610c220288ff1fd718bb7bc2dd8375588505c
CRs-Fixed: 2195796
2018-03-30 02:46:29 -07:00
Jeff Johnson
0604a3650d qcacld-3.0: Fix anomalies with hdd_stop_bss_link()
Address the following anomalies with hdd_stop_bss_link():
- Parameter usrDataForCallback is unused
- It returns errno but one caller is checking for QDF_STATUS

Change-Id: I31086d790066eec5774cf318eff0f90736b4c92f
CRs-Fixed: 2213062
2018-03-30 02:46:19 -07:00
Tushnim Bhattacharyya
dfbce70aaf qcacld-3.0: Use correct enum type for function variable
Use correct enum type for function variable in hdd_reset_tcp_delack
& return type in iw_get_policy_manager_ut_ops.

Change-Id: Iec8a678410b90dbe081c007f1bbfaa31f255799e
CRs-Fixed: 2213784
2018-03-30 02:46:07 -07:00
gaolez
c2b7208197 qcacld-3.0: reduce the interval of cap-tsf timer
qcacld-2.0 to qcacld-3.0 propagation

hdd_get_hosttime_from_targettime() will get wrong host time when
it's longer than WLAN_HDD_CAPTURE_TSF_INTERVAL_SEC from last
TSF-HOST update. To fix this, TSF-HOST should be updated in at most
WLAN_HDD_CAPTURE_TSF_INTERVAL_SEC, it couldn't be achieved if the
timer interval is also WLAN_HDD_CAPTURE_TSF_INTERVAL_SEC, due to
processing or scheduling delay. So deduct several seconds from
WLAN_HDD_CAPTURE_TSF_INTERVAL_SEC.

Change-Id: Icce41c74568370d98509a2ebe69ae62e99ad2ce8
CRs-Fixed: 2104915
2018-03-30 02:46:00 -07:00
Jeff Johnson
32bd9740ce qcacld-3.0: Replace hdd_wlan_get_freq() with converged service
Currently HDD defines function hdd_wlan_get_freq() which uses
it own static table to perform channel to frequency mapping. This
duplicates functionality provided by the converged regulatory
function wlan_reg_chan_to_freq(), so remove hdd_wlan_get_freq()
and update its only client to use wlan_reg_chan_to_freq().

Change-Id: I6fcb11b9b967ab77dcd7c8d0c1bc185ee3c18913
CRs-Fixed: 2215576
2018-03-29 23:37:14 -07:00
Dundi Raviteja
170d287f1d qcacld-3.0: Fix buf overflow in __wlan_hdd_cfg80211_update_connect_params
Currently, number of bytes being copied into keyname_nai buffer is
key_nai_length, which can be greater than FILS_MAX_KEYNAME_NAI_LENGTH.
But the size of keyname_nai is limited to FILS_MAX_KEYNAME_NAI_LENGTH,
which may cause buffer overflow.

To address this issue, add check for key_nai_length against
FILS_MAX_KEYNAME_NAI_LENGTH to ensure buffer overflow does not happen.

Change-Id: I88c89b1fef6fdb1c4bd93e0fb8f3e54634b4940f
CRs-Fixed: 2208881
2018-03-29 18:57:20 -07:00
Ashish Kumar Dhanotiya
d39c8b55db qcacld-3.0: Update correct reason code on receiving del sta
On receiving del station command, SAP is not updating the del
station reason code properly in station info.
Update the correct reason code in station info whenever a
del station or deauth station event comes.

Change-Id: I2004dc21f18682dbc7dee488e7b55bfccd0d242a
CRs-Fixed: 2178538
2018-03-29 17:32:02 -07:00
Sravan Kumar Kairam
3033844ad4 qcacld-3.0: Update SAP interface stats only for exception path
Currently sap netdev interface stats are updated even for the
IPA uc HW offload packets. This is not correct as the stats need
to be updated only for the exception packets which comes to the
host and forwarded to netdev kernel. In this change update the
soft ap interface stats only for the exception packets which
comes to host.

Change-Id: I0b017cf1d5ff74234bfee540ef37ee03c5131c48
CRs-Fixed: 2164582
2018-03-29 13:16:06 -07:00