Commit Graph

3374 Commits

Author SHA1 Message Date
Jeff Johnson
fc8c353cda qcacld-3.0: Relocate HDD Information Element macros
Currently wlan_hdd_wext.h defines some IE-related macros, but these
macros are independent of wireless extensions, so relocate them as
part of the plan to properly featurize wireless extensions.

Change-Id: I34b2b220087e946f662741fe549a980884b97842
CRs-Fixed: 2227954
2018-04-21 06:42:29 -07:00
Jeff Johnson
d9952752e0 qcacld-3.0: Relocate wlan_hdd_set_mon_chan()
Function wlan_hdd_set_mon_chan() is currently located in
wlan_hdd_wext.c, but this function is independent of wireless
extensions, so relocate it as part of the plan to omit wlan_hdd_wext.c
from the build when wireless extensions is not enabled.

Change-Id: I187305c1f01c7a3cb72f55a0ee885c4f4f0277aa
CRs-Fixed: 2227097
2018-04-21 06:42:25 -07:00
Dustin Brown
c8e96f1746 qcacld-3.0: Use total_len in drv_cmd_get_ibss_peer_info_all
Avoid userspace overwrite in drv_cmd_get_ibss_peer_info_all by
intersecting the max output buffer size with the total length of the
userspace buffer. This avoids the overwrite in cases where the allocated
userspace buffer is smaller than the max output buffer size.

Change-Id: I77f25c50bbe9d0b966a5c319297e3e2dca4b6280
CRs-Fixed: 2222879
2018-04-19 22:06:35 -07:00
Naveen Rawat
e02f8f541c qcacld-3.0: Move hdd_request_manager to qcacmn osif layer
Move hdd_request_manager to qcacmn osif layer, which will be
used by CP_STATs component.

Change-Id: Iab64ebb837d7c2c7411905b84306fbb9990a4bac
CRs-Fixed: 2220069
2018-04-19 22:06:31 -07:00
Naveen Rawat
2b43089fc7 qcacld-3.0: Add ini param to control RTT mac randomization
Add change to allow randomizing mac address used in STA mode RTT
ranging using ini param control.

Change-Id: Ief3814ef758476d2617d8176daade2128c2b250a
CRs-Fixed: 2205953
2018-04-19 22:06:28 -07:00
Abhinav Kumar
a95af7cbac qcacld-3.0: Add new ini to set min delay btw scan and reason bit-mask
Currently there is no provision to decide delay between two roam
scans in firmware. With these new ini's, driver wants to expose
control to decide delay between roam scans:

Add ini "min_delay_btw_scans" to set minimum duration allowed between
two consecutive roam scans. Fw should not allow roam scan if duration
between two consecutive roam scan is less than min_delay_btw_scan.

Add ini "roam_trigger_reason_bitmask" to set default value of
bit-mask containing roam_trigger_reasons for which
min_delay_btw_scans constraints should be apply.

Change-Id: I2af9d5dc8e6919eeb90251d3d744e3f07705e776
CRs-Fixed: 2221779
2018-04-19 22:06:23 -07:00
Naveen Rawat
9832247b07 qcacld-3.0: Fix check for firmware's chainmask capability
Fix condition checked before programming user's requested chainmask to
firwmare. Get current firmware advertised phy cap for non-dbs phymode
and check if it supports all chains for tx/rx 2g and 5g.

Change-Id: I3fcef315f478403955ce400b3ba6d138a8006a01
CRs-Fixed: 2202544
2018-04-19 22:06:17 -07:00
Dustin Brown
933cd2a72f qcacld-3.0: Avoid info leak in hdd_driver_rxfilter_comand_handler
In hdd_driver_rxfilter_comand_handler(), when kstrtou8() fails to parse
the input string, the value of an uninitialized @type local is logged.
To avoid leaking stack memory, avoid logging the value of @type if the
parsing fails.

Change-Id: I46b21cdb138927b3edc406014450447c58a0d977
CRs-Fixed: 2221085
2018-04-19 19:25:53 -07:00
Arunk Khandavalli
830c969fc9 qcacld-3.0: Dont process driver unload during system reboot
During the system reboot when the firmware goes offline before the
driver unload there is no way to detect whether the it is because
of the reboot or a assert in the firmware. So, the driver waits
for the firmware to recover before continuing with unloading
the device.

Since this is a reboot case the firmware will not respawn the
execution and host driver is struck.

To mitigate the issue register a reboot notifier with the kernel
and if reboot is triggered proceed with a fake unload.

Change-Id: I33d14c393930e9ee737d38ffdb26e921fb057f29
CRs-Fixed: 2211776
2018-04-19 14:15:08 -07:00
Sandeep Puligilla
305d509e75 qcacld-3.0: Enable wiphy RxLDPC for 5G band
RxLDPC is disabled in wiphy 5g capability due
to which hostapd is failed to start in 5G channel
with RXLDPC enabled.

Read the RxLDPC capability value of 5G from
single MAC mode and update wiphy 5g band capability
structure to enable the RxLDPC.

Change-Id: Iec2b3674207d5f9ec13a40e110342d6b67ca391c
CRs-Fixed: 2215101
2018-04-19 14:15:04 -07:00
Jeff Johnson
a06efaab0e qcacld-3.0: Make hdd_display_stats_help() static
Currently hdd_display_stats_help() is a public function exported by
wlan_hdd_wext.h. But this function is only used internally within
wlan_hdd_wext.c, so remove the public prototype and instead make the
function static.

Change-Id: Iaed10720f0f325794481bbb7ad9f743deb6b7b15
CRs-Fixed: 2227013
2018-04-19 14:15:01 -07:00
Ashish Kumar Dhanotiya
214e142e9e qcacld-3.0: Change the default value of ini "gTxSchDelay"
Change the default value of ini "gTxSchDelay" from 2 to 0.

Change-Id: Ic4c53b5e3c38cda88d01684b9594a8bfb5be2aa1
CRs-Fixed: 2227539
2018-04-19 14:14:54 -07:00
Abhinav Kumar
271f063980 qcacld-3.0: Add new ini to enable/disable FT open feature
Add new ini item "enable_ftopen" to enable/disable FT open
feature. There is no ini currently to disable only FT open.

Change-Id: I18280d9de77857b15698eb233ba4ec71089beb06
CRs-Fixed: 2214766
2018-04-18 18:38:54 -07:00
Jeff Johnson
3d46351ccd qcacld-3.0: Remove obsolete SoftAP VSTA feature code
The SoftAP VSTA feature was introduced to overcome a limitation in a
prior version of WLAN hardware. Since the WLAN hardware supported by
this driver does not have this limitation, remove the feature code.

Change-Id: I1f2fe31b294fb7b2da1fa8619b3380412c5d872e
CRs-Fixed: 2224817
2018-04-18 18:38:24 -07:00
Yun Park
a9d0c11298 qcacld-3.0: Send AP_DISCONNECT event after all clients disconnected
There could be an abnormal situation occurs in IPA pipes suspend
process if HDD_IPA_AP_DISCONNECT event sent while WDI pipes are still
active.
Fix to send HDD_IPA_AP_DISCONNECT after all clients disconnected.

Change-Id: I7ad757834ec22384d07236363d135009a9710bee
CRs-Fixed: 2192239
2018-04-18 18:38:21 -07:00
Jeff Johnson
df5d779c08 qcacld-3.0: Better featurize the SSR injection debug code
The driver supports a "SSR injection" feature that is used during
testing to validate certain recovery features. Currently this feature
is protected by a generic WLAN_DEBUG feature flag, and in addition
there are two separate debug ioctl handlers which have duplicate
code. In order to better support a finer level of configurability
introduce a new configuration flag and consolidate to a single
implementation of the feature under that flag.

Change-Id: I73e8dd4580ca53d129ae0181ffc46d011699f3dc
CRs-Fixed: 2224815
2018-04-18 18:38:11 -07:00
Will Huang
36049720ff qcacld-3.0: Move qdf_cancel_delayed_work to __hdd_module_exit
If hdd_wlan_stop_modules is called by hdd_iface_change_callback which
is invoke by a delayed worker, and a race condition happen that rmmod
call in during hdd_wlan_stop_modules, although cnss driver will
serialize wlan remove with the wlan shutdown invoked by delayed worker,
CNSS_DRIVER_UNLOADING still got set and wlan shutdown will invoke remove
wlan, which will try to sync cancel delayed worker and wait for each
other to deadlock.

If move qdf_cancel_delayed_work() from hdd_wlan_exit() to
__hdd_module_exit(), it will flush/wait in a different context of cnss
driver worker, so avoid deadlock hit.

Change-Id: I6bc58e8ae70291d5490560310e90abc52421b59f
CRs-Fixed: 2222381
2018-04-16 22:59:56 -07:00
Kiran Kumar Lokere
05e9a65b55 qcacld-3.0: Add support to configure PPDU duration to FW
Add user configuration support for setting PPDU duration to FW

Change-Id: I3756252d89ab7356aa1e1df1e7005e82346580b3
CRs-Fixed: 2207446
2018-04-16 18:08:49 -07:00
Abhinav Kumar
a083f21918 qcacld-3.0: Add new ini to set delay Hand-off period
Add new ini item "ho_delay_for_rx" to set delay Hand-off
period. For LFR 3.0 roaming scenario, once roam candidate
is found, firmware waits for minimum this much duration
to receive pending rx frames from current BSS before
switching to new channel for handoff to new AP.

Change-Id: Ided9a81e9402259f5df6b42926b3fa336b6bb4d0
CRs-Fixed: 2221748
2018-04-16 16:56:50 -07:00
Bala Venkatesh
f13b72897b qcacld-3.0: Check for SAP restart after channel switch
Race condition in STA connection and Channel switch of
Softap can result in MCC for STA+SAP scenario. Even
though Force SCC is enabled.

As part of STA connection in association handler SAP
restart is checked. If Channel Switch for SAP interface
is in progress at the same time. Then depending on SAP
Channel MCC can be resulted.
Check for SAP restart in the function hdd_hostapd_sap_event_cb.

Change-Id: Ic4ba8790d604f184eb8030e4fe06c5e76f9a62bd
CRs-Fixed: 2205482
2018-04-16 16:56:37 -07:00
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