Commit Graph

3218 Commits

Author SHA1 Message Date
Sourav Mohapatra
412ceb9fbf qcacld-3.0: Allow vendor command to run without interface up
In the present scenario, the vendor command
wlan_hdd_cfg80211_get_logger_supp_feature has the flag
WIPHY_VENDOR_CMD_NEED_RUNNING set which requires the net device
to be up and running for the API to work. This is not necessary
as the command doesnot need the net dev to be active.

Remove the flag so that the command returns the proper results
even when the net device is not running

Change-Id: I2dd9d801aa474cda2a3f6292d6b94df18797be02
CRs-Fixed: 2202096
2018-03-11 22:34:49 -07:00
Min Liu
a3e84abadc qcacld-3.0: Add NULL pointer check
Add NULL pointer check for reg_cap_ptr in
hdd_objmgr_create_and_store_pdev

Change-Id: I379e227302f70d83e26a8a418889f7718dc5a0dd
CRs-Fixed: 2202943
2018-03-10 01:07:45 -08:00
Krunal Soni
01507bd566 qcacld-3.0: (PART-3) Remove obsoleted enums in SME module
Remove some of the obsoleted enums and structure's members
in SME module

Change-Id: Ia453fcd2ba41a939964b6e481195c6bc64de6ab6
CRs-Fixed: 2201799
2018-03-09 17:30:23 -08:00
Krunal Soni
e608a27cb8 qcacld-3.0: Remove obsoleted INI called gFixedRate
Latest driver is not using "gFixedRate" INI anymore and this INI
is not doing any meaningful work, so remove it.

Change-Id: Icf7ef052a722f25c4338dd8086b14ce01c6176d8
CRs-Fixed: 2201799
2018-03-09 17:30:20 -08:00
Kiran Kumar Lokere
3324f63c57 qcacld-3.0: Add support to set no ack policy for ac
Add support to configure no ack policy for WMM access category.

Change-Id: Idf87507b78cdaf0ac8fdfc975e4fcbe0957423fa
CRs-Fixed: 2198241
2018-03-09 00:10:33 -08:00
Venkata Sharath Chandra Manchala
1e58110314 qcacld-3.0: Forward channel id to txrx_stats
Forward channel id to txrx_stats to set the right pdev mask
in htt stats msg

Change-Id: Iab0e565d3e827b0fcbe65c24d4de431a3aee0248
CRs-Fixed: 2194439
2018-03-08 22:06:04 -08:00
Kiran Kumar Lokere
bc87bec984 qcacld-3.0: Add support to send ADDBA with user config
Add support to send ADDBA request with user configured buffer
size and tid and ADDBA response with user configured buffer
size.

Change-Id: I2a1dfedadeb68a1cfca9a6eba8e7775d0bb51d1a
CRs-Fixed: 2193872
2018-03-08 22:06:01 -08:00
Will Huang
5561cb3c00 qcacld-3.0: Add load/unload status check before wlan_hdd_mgmt_tx
If wlan_hdd_mgmt_tx is called while unload in progress, it is possible
ROC scan can't be canceled, cds_ssr_protect already prevent
wlan_hdd_mgmt_tx running before unloading, we must also prevent it
running after it.

Change-Id: Ic8d981c9be2a2b33079c4e3c9a18a4d8bce48956
CRs-Fixed: 2202026
2018-03-08 18:46:44 -08:00
Rachit Kankane
b103562c27 qcacld-3.0: Add HTC Credit History Feature flag
Add compilation flag to compile out HTC credit History
feature cleanly from the cld-3.2 driver binary.

Change-Id: I5f5e73e430d282c99d3077fb82ed1cb8eb79715a
CRs-Fixed: 2190545
2018-03-08 18:46:38 -08:00
Jeff Johnson
111ad91fa3 qcacld-3.0: Remove obsolete hdd_qdf_event
Change "qcacld-3.0: Use Request Manager for ioctl getWlanStats"
removed the only user of item hdd_qdf_event in struct hdd_wext_state,
so completely remove it.

Change-Id: Ifc00f6dc396ca5f6e59b3895a6c9467179073218
CRs-Fixed: 2202506
2018-03-08 10:32:50 -08:00
Jeff Johnson
ced658b0aa qcacld-3.0: Use Request Manager for ioctl getWlanStats
Currently the handling of private ioctl getWlanStats uses a legacy
mechanism for coordinating the request with the response. Change this
to use the HDD Request Manager.

Change-Id: I7e8333cf8d2e651e04509e3370c30d8a6425bdca
CRs-Fixed: 2202504
2018-03-08 10:26:46 -08:00
Jeff Johnson
d37833f995 qcacld-3.0: Relocate hdd_statistics_cb()
Function hdd_statistics_cb() is registered as a callback function by
__iw_get_statistics() when calling sme_get_statistics(). Since
hdd_statistics_cb() and __iw_get_statistics() are tightly coupled it
makes sense for them to be co-located, but currently they are
not. Therefore relocate hdd_statistics_cb() to be adjacent to
__iw_get_statistics(). Note that this is a precursor to further
cleanup of this pair of functions.

Change-Id: Ie36d107d9ef2e541444c5fb9d7bfba7e9e82c1e6
CRs-Fixed: 2201907
2018-03-08 10:24:25 -08:00
Jeff Johnson
a8ce12744d qcacld-3.0: Remove unused hdd_roam_register_tdlssta() param
The parameters to function hdd_roam_register_tdlssta() currently
includes ucastSig. This "signature" parameter dates back to a previous
version of the driver that used signatures to synchronize the data
plane with the control plane. However the current version of the
driver does not use this parameter, so remove it as part of the plan
to completely remove these signatures from throughout the driver.

Change-Id: Iee51d79e58501e3e8312c6c7a21b98c1ae6bf268
CRs-Fixed: 2200886
2018-03-07 17:28:51 -08:00
Jeff Johnson
3f6c89f77d qcacld-3.0: Remove unused hdd_softap_register_sta() params
The parameters to function hdd_softap_register_sta() currently include
ucastSig and bcastSig. These "signature" parameters date back to a
previous version of the driver that used these signatures to
synchronize the data plane with the control plane. However the current
version of the driver does not use these parameters, so remove them as
part of the plan to completely remove these signatures from throughout
the driver.

Change-Id: I1f1f1fb1ef553d36ba0f4902ab29b2b4852ae5ca
CRs-Fixed: 2200356
2018-03-07 17:28:48 -08:00
Yeshwanth Sriram Guntuka
2d6204f944 qcacld-3.0: Add support for HW mode info vendor command
Add support for HW mode info vendor command which sends
mac id, band, interface id and frequency information for
each MAC provided by driver to userspace.

Change-Id: If1112d29b8781cf5ba0480c84feeb772142f2c0e
CRs-Fixed: 2160531
2018-03-07 16:27:54 -08:00
jiad
da34c57e5d qcacld-3.0: Fix wlan load failure when IPA uc not ready
In IPA offload case, if wlan driver is loaded before IPA uC is ready,
error is returned in hdd_ipa_init, which leads to whole driver load
failure. This is not the case since IPA driver provides wlan driver
a notify callback where IPA will invoke this callback when IPA uC
is ready.

Fix is to not return error if IPA uC is not ready during wlan loading
phase.

Change-Id: I98382abbb3bb3b1176f3be41228ac260c1017c24
CRs-Fixed: 2198998
2018-03-07 03:55:24 -08:00
Abhishek Singh
f1c1676351 qcacld-3.0: Fix memory corruption due to wlan_hdd_add_age_ie
In wlan_hdd_add_age_ie the mgmt->u.probe_resp.variable is type casted
to qcom_ie_age, before incrementing the mgmt->u.probe_resp.variable
to get the qcom_ie_age pointer. This leads to memory corruption.

Fixed by typecasting the pointer once the qcom_ie_age pointer is
derived by incrementing the offset of qcom_ie_age from
mgmt->u.probe_resp.variable.

Change-Id: Iafcdb5c17f0d9c234687ddcc6f8b9100b21cc957
CRs-Fixed: 2201303
2018-03-07 01:37:30 -08:00
Rachit Kankane
85b47fca22 qcacld-3.0: Compile out WMI logging feature
Fix to compile cleanly when WMI_INTERFACE_EVENT_LOGGING
feature is disabled.

Change-Id: I7bb4b0304adf829f7f95e95795bcc60ce061d8a2
CRs-Fixed: 2192126
2018-03-06 23:45:01 -08:00
Kiran Kumar Lokere
722dccd92a qcacld-3.0: Add support to allow WEP/TKIP in HE for test
Add support for test configuration to allow WEP/TKIP in HE mode

Change-Id: I19b0620bc3b8e1f7319af5e762e565fcaba11b79
CRs-fixed: 2194497
2018-03-06 23:44:58 -08:00
Abhishek Singh
f05b0cb604 qcacld-3.0: Add logic to use common API to inform beacon
Duplicate API's are present in HDD and common code to inform the
beacon to kernel. This change removes the duplicate API from HDD
and use common API to inform beacon.

Change-Id: I1916ebd6d3c153f47533cde6a1e2e78ebaae55dc
CRs-Fixed: 2199760
2018-03-06 01:51:15 -08:00
Dustin Brown
0b703ef927 qcacld-3.0: Remove maxWoWFilters and related
Recent changes in Power Management and Offload (PMO) have removed the
need for a configurable maximum number of WoW filters. Remove the
following relevant fields:

 * maxWoWFilters
 * CFG_MAX_WOW_FILTERS_MAX
 * WMA_STA_WOW_DEFAULT_PTRN_MAX
 * max_wow_filters
 * ol_ini_info

Change-Id: I99cc74731d6373258dc65473a8342bda0ab2786b
CRs-Fixed: 2199452
2018-03-05 23:33:27 -08:00
Mukul Sharma
ecf8e09fd5 qcacld-3.0: Disable indoor channel on sap start
There are scenario where indoor channel operations
(like  active / passive scan/connect/roam etc)
are not desired / permitted specially in sap case.
Hence add support of disabling indoor channel
on sap start and revert it on sap stop.

Change-Id: Id6e01534532e3076a3e662e6a4f71e8be924165a
CRs-fixed: 2121103
2018-03-05 22:33:43 -08:00
Dustin Brown
b9987afb2c qcacld-3.0: Update firmware filter config (part 1)
In order to conserve firmware memory when various filtering features are
not in use, update the target configuration provided to firmware based
on the intersection of various filtering features and host
configuration.

Part 1
	num_wow_filters = ARP/NS offload enabled ? 2 : 5
	bpf_instruction_size - BPF enabled ? 0 (auto) : 0xffffffff

Part 2 (pending firmware support)
	pkt_filter_num = Packet Filter enabled ? 12 : 0 (disabled)

Change-Id: Ic6624ff04598b53d8321e4864618b12b9702780f
CRs-Fixed: 2196997
2018-03-05 21:43:46 -08:00
Yun Park
bab87d68c1 Revert "qcacld-3.0: Add BUG_ON when uC ready failed"
This reverts commit I87b635bf4644b54d47bee65307d7484c9e328885.
This should be used for uC loading debug purpose only.
If uC is not loaded yet when WLAN initialization, we are expecting
the registered uC ready callback is invoked after uC loaded later.

Change-Id: Ie6f6d116ff7a23a9b4900c60053a8e76948734d9
CRs-Fixed: 2196878
2018-03-05 14:19:05 -08:00
Yeshwanth Sriram Guntuka
d1f8ca7325 qcacld-3.0: Return error if channel list is NULL
Hostapd sends channel list as NULL in do_acs request
when country mode is set to world and hw mode is 11a.
This results in scan to be triggered on all 5g channels
and driver to choose 5g channel as best channel.

Fix is to return error to hostapd if channel list
received is NULL.

Change-Id: I17aacfdbeea9803023a66f54de7b596612ea97c3
CRs-Fixed: 2192858
2018-03-05 05:25:21 -08:00
Sourav Mohapatra
001cfaf94a qcacld-3.0: Extend scan cleanup API to support netdev level cleanup
In the present scenario the function wlan_cfg80211_cleanup_scan_queue
does the code scan queue cleanup during radio detach, leading to access of
freed vdev netdev.

Extend cfg80211 scan cleanup API to support netdev level cleanup. The
second parameter if NULL cleans up all the queues or only the queue of
the specific net dev given.

Change-Id: I2a6b350fe5102b2a5d772dd9a075003ccf3b684c
CRs-Fixed: 2197309
2018-03-05 04:28:09 -08:00
Jeff Johnson
e0847ba99e qcacld-3.0: Add missing blank lines after declarations in HDD
The checkpatch script has identified instances of "Missing a blank
line after declarations" in HDD, so add them.

Change-Id: I289072b26e0c9c1f8392616438e304b018d9ecd2
CRs-Fixed: 2198555
2018-03-02 21:48:36 -08:00
Jeff Johnson
321069fee3 qcacld-3.0: Remove empty hdd_roam_deregister_sta() test
Currently hdd_roam_deregister_sta() tests the STA to see if it is in
the eConnectionState_IbssDisconnected state, but then doesn't actually
do anything if it is true. Since this is obviously an obsolete test
where the action code has been previously removed, now remove the
actual test.

Change-Id: I6a0077088d87f91b8d8f220049de05a19232995b
CRs-Fixed: 2198554
2018-03-02 21:48:33 -08:00
Rajeev Kumar
d056536a27 qcacld-3.0: Nuke HDD and SME obsolete wow enter and exit APIs
WoW is always enabled on ROME and ADRASTEA platforms and wow
wake up pattern configuration is dynamic based on vdev type.
All wow wake up patterns are configured at the time of vdev
creation. HDD and SME has obsolete wow enter and exit logic
and hence nuke it.

Change-Id: I228ff5b77a7f9dac579448ada4ebee591d5a0c38
CRs-Fixed: 2198644
2018-03-02 18:28:26 -08:00
Jingxiang Ge
b897656a5d qcacld-3.0: Register IPA Tx desc free callback
IPA tx desc free callback function is missed here.
Add it back.

Change-Id: Ic29857816d6d749e1a90219e78f198e7adaaddc0
CRs-Fixed: 2189751
2018-03-02 16:52:27 -08:00
Prakash Manjunathappa
e73e3b57db qcacld-3.0: Add INI to control tcp_limit_output_bytes tuning
Current driver posts the high and low Tx TPUT indications to cnss-daemon to
tune  the tcp_limit_output_byte system parameter. Add option to disable it.

Change-Id: Ic65fe0bd762024425cabf2f1f07123211dce5dce
CRs-Fixed: 2197112
2018-03-02 16:33:34 -08:00
Himanshu Agarwal
e994970c2a qcacld-3.0: Update band to ICM module
ICM does not support hw_mode=any at present. When hw_mode is
set to any in hostapd.conf, HOST driver choose one band out of
2.4Ghz and 5Ghz based on "acs_freq_band" ini item and update the
ACS and PCL channel list accordingly. But currently driver does
not send updated band to ICM and so ICM still gets BAND_ALL from
HOST driver which is INVALID for ICM module. As a result ICM
algorithm does not run and channel selection fails.

Send Updated band to ICM and also update channel width accordingly
for 2.4Ghz band as it does not support 80/160/80PLUS80 Mhz.

Change-Id: I13593a3c59c204d1ff7677e67d96d039c9456568
CRs-Fixed: 2196247
2018-03-01 17:30:45 +05:30
Jeff Johnson
153f0263ea qcacld-3.0: Fix bad block comment in wlan_hdd_main.h
The checkpatch script has identified an instance of a non-conformant
block comment in wlan_hdd_main.h, so fix it.

Change-Id: Ie76156601021e2b5e503280337b38792217b7dbc
CRs-Fixed: 2197711
2018-02-28 18:02:41 -08:00
Jeff Johnson
c66d31077c qcacld-3.0: Fix instances of "else after return" in HDD
The checkpatch script has identified instances of "else after return"
that is not conformant with the Linux coding style, so fix them.

Change-Id: Ica4ccb1ef1c865089851e928ddeaa27ea54bcb4a
CRs-Fixed: 2197681
2018-02-28 12:03:12 -08:00
Jeff Johnson
b8adae49a1 qcacld-3.0: Fix instances of bad indentation in HDD
The checkpatch script has identified multiple instances of non-conformant
indentation in HDD, so fix them.

Change-Id: Icb28911e54324198d50018fcaf6d6662c9dc161c
CRs-Fixed: 2197006
2018-02-28 08:50:14 -08:00
Jeff Johnson
109e79d599 qcacld-3.0: Fix instances of bad brace placement in HDD
The checkpatch script has identified two instances of non-conformant
brace placement in HDD, so fix them.

Change-Id: I0c8bbf2258b24c4876c6a8749633b90873980e95
CRs-Fixed: 2196976
2018-02-28 08:50:11 -08:00
Nirav Shah
eb017befbd qcacld-3.0: Add support for QCA9379 on x86 platform
Add support for QCA9379 chip on x86 platform for
USB and SDIO attach.

Change-Id: I2de81794cd16521097ffa6956a18b4b0fe981d36
CRs-Fixed: 2196757
2018-02-28 05:29:39 -08:00
Venkata Sharath Chandra Manchala
2996517bbc qcacld-3.0: Enable pktlog for Helium
Add Support to enable pktlog through INI
for helium based devices.

Change-Id: I0acfcf1db8c007c5e2ce81fcb1775fd1b7a50570
CRs-Fixed: 2185210
2018-02-28 00:31:24 -08:00
Dustin Brown
d424194c5c qcacld-3.0: Include qdf_str.h
The qdf_str APIs have recently been moved from qdf_mem. Reference the
new qdf_str.h header file where appropriate.

Change-Id: I2be5fa3f511fd6d67b4217243f4b3498321e0a9f
CRs-Fixed: 2196120
2018-02-27 22:17:06 -08:00
Abhishek Singh
3f13a81758 qcacld-3.0: Security enhancement fixes for RSNE frame parser
Adds logic in frame parser to use default RSN IE fields if optional
fields are not present in IE. So if RSN IE doesn't contain AKM,
group and unicast cipher use the default AKM(AKM_IEEE8021X) and
cipher (CCMP). Also adds sanity checks for RSNE in the frame parser.

Change-Id: I120a29c21407f82aab2c6fcdcaf1095518cb71b5
CRs-Fixed: 2195951
2018-02-27 21:17:02 -08:00
Ashish Kumar Dhanotiya
aa0ca60f16 qcacld-3.0: Reject invalid MAC address during dynamic MAC change
Currently when the MAC address is changed dynamically, invalid MAC
(Broadcast, Multicast and 00:00:00:00:00:00) are getting accepted
and interface is getting up on these invalid addresses because
of this device is trying to connect to AP with the configured
invalid address.

To address this issue reject all invalid MAC addresses
when MAC is dynamically getting configured.

Change-Id: If2530b213b5ffc2ddf0bc728138e1f3200f33286
CRs-Fixed: 2190468
2018-02-27 15:07:49 -08:00
Vignesh Viswanathan
200f5c19b0 qcacld-3.0: Skip starting SAP after channel change if stop BSS in progress
When stop_bss from HDD is received when a SAP channel change request
is currently in progress and channel change response is not yet
received from the FW, the stop_bss would clear the SAP session and
when channel change response is received, we try to start BSS again.
The CSR roam state is also set to JOINING in this case.

As part of start BSS, we queue set key command to SME active command
list. Since the session has been cleared, eWNI_SME_SETCONTEXT_RSP
sent to lim would not be processed in CSR state JOINING leading to set
key command stuck in the active command list.

Do not restart BSS after channel change response if stop BSS is in
progress. Also handle eWNI_SME_SETCONTEXT_RSP and clear the command
queue in CSR Joining state.

Change-Id: I8dbab054746d26cc92fc2274d35ce76a694035fe
CRs-Fixed: 2193505
2018-02-27 14:07:02 -08:00
Abhishek Singh
6378103e12 qcacld-3.0: Add logic to ignore PMF check for STA test mode
In testbed STA mode the RSNE may not match with APUT and thus
driver fails to filter AP from scan cache as PMF capability
mismatch.

With this change driver will ignore PMF capability check and
proceed with connection to send auth and assoc to APUT.

Change-Id: I1bf5947fb08574941eaf1845ec1e36ee9b030dd0
CRs-Fixed: 2195354
2018-02-26 21:44:43 -08:00
Yeshwanth Sriram Guntuka
469f957cd3 qcacld-3.0: Set hw mode based on channel_select_logic_conc ini
Set hw mode to DBS or single MAC for STA+STA and STA+P2P
concurrencies based on channel_select_logic_conc ini.

Change-Id: I46ba4d5cd8f5cda71d0c00be2b612bc851eb5ba4
CRs-Fixed: 2185554
2018-02-26 06:34:27 -08:00
Yeshwanth Sriram Guntuka
db7995db23 qcacld-3.0: Add ini support for channel selection logic
Add ini to select DBS or inter-band MCC channel selection logic
for STA+STA and STA+P2P connections.

Change-Id: I7cfde9592ec210b0a8c812171d2bc6f005e17fb2
CRs-Fixed: 2185552
2018-02-26 06:34:22 -08:00
Himanshu Agarwal
1b3be70ff7 qcacld-3.0: Free ACS channel list before allocating new list
In __wlan_hdd_cfg80211_do_acs(), driver allocates memory for
ACS channel list without checking if there is already some
memory allocated for channel list or not. When SSR is triggered
before ACS completion, ACS list does not get freed and after
driver reinit, when a new do ACS comes, it allocates a new memory
without deallocating the older memory. This causes memory leak.

Free ACS channel list if already allocated before allocate a new
list.

Change-Id: Ic001c3daac518e97644da00cb82ea1d3fde4b539
CRs-Fixed: 2191839
2018-02-26 06:34:16 -08:00
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