Commit Graph

3529 Commits

Author SHA1 Message Date
Wu Gao
52084c1fdb qcacld-3.0: Refine disa head files
DISA head files include lots of not used public head files, and cause
compilation issue when disable PMO feature flag.

Change-Id: I287f845a3e9f923d042463c34abaedadb905d3b2
CRs-Fixed: 2243947
2018-05-21 22:51:28 -07:00
Ryan Hsu
c69185569b qcacld-3.0: populate board version information from wmi event
These board information are stored in the board file while the
calibration process. WMI service ready event will now carry them for host.
Append these board version information to the firmware version string.

Change-Id: Ieb5bc480bd0c2e387fcf6990dd192741f0b7cd6b
CRs-fixed: 2218963
2018-05-21 21:47:54 -07:00
Ryan Hsu
aadba074fa qcacld-3.0: Rearrange hdd_wlan_get_version out of wext files
To keep non-wext function out of wext.[c|h], rearrange it to main.[c|h]

And in order to make the interface more generic, change the interface
to take the buffer and length directly.

Change-Id: I1f64cc235b9dee6c574f871b020b0b61c8b427c8
CRs-fixed: 2228717
2018-05-21 21:47:50 -07:00
Himanshu Agarwal
ad4c039d2c qcacld-3.0: Remove force SAP ACS support from driver
Remove force SAP ACS support from driver as it is no longer needed
after hostapd based ACS is enabled permanently from framework.

Change-Id: Ib3b8bac0dcf45562596d89d0aa49e16a03f85499
CRs-Fixed: 2234858
2018-05-21 08:27:56 -07:00
Sravan Kumar Kairam
dd57ea349e qcacld-3.0: Initialize uninitialized variable
Current code in __hdd_hard_start_xmit function there is a possibility
of one variable uninitialized. Improve the code by initializing the
variable.

Change-Id: Ia2dbed83b35801087b93bbb336d13df95a78a8aa
CRs-Fixed: 2029588
2018-05-21 03:52:53 -07:00
Kiran Kumar Lokere
0205d84273 qcacld-3.0: Check user config HE caps to update session caps
Check user configuration for HE Tx beamformee and beamformer
while updating the caps into global or session configuration.

Change-Id: Ie355a6f208499dd389117c02b8510094c8fd08fd
CRs-Fixed: 2241779
2018-05-21 03:52:43 -07:00
Wen Gong
7952fbd708 qcacld-3.0: Add extscan feature flag
Add config flag to enable / disable extscan feature

Change-Id: Icb5087619964b729041e18127baba1b2796ed911
CRs-Fixed: 2226549
2018-05-20 21:55:45 -07:00
Wu Gao
24466e3693 qcacld-3.0: Enable QDF ID allocation API
Enable QDF ID allocation API in Kbuild.

Change-Id: Id43b16175e59f40ad111b03439f34d63ea14c627
CRs-Fixed: 2242753
2018-05-20 08:15:44 -07:00
Naveen Rawat
fa2a100bac qcacld-3.0: Add implementation of get_station_stats
Add changes to support get station stats from within cp_stats
component.

Change-Id: Id685e9d94f185ee562f21d12d118e94a737a6a7e
CRs-Fixed: 2210338
2018-05-19 10:56:45 -07:00
Ashish Kumar Dhanotiya
5e138ea5a2 qcacld-3.0: Avoid NULL check for context in class A stats cb
In hdd_get_class_a_statistics_cb api, context is actually
cookie and it can be NULL if this is the first request. on
class A stats request, when hdd_get_class_a_statistics_cb is
invoked with context as NULL, the NULL check in callback
will not update the latest stats result and will return.

Change-Id: I8c33a0e82d9915a4b3d76e695ceab7ecd9301b89
CRs-Fixed: 2244767
2018-05-18 16:46:51 -07:00
Nachiket Kukade
caa2e84d5e qcacld-3.0: Add a NULL check on channels in IOCTL SETROAMSCANCHANNELS
User sends driver a list of roaming scan channels to set through IOCTL
SETROAMSCANCHANNELS. The parameters include the number of elements in
the array, followed by channel array and then a NULL character. But
when driver loops through the channel array it doesn't have a NULL
check. An erroneous number of elements passed by user may cause buffer
overread.

Add a NULL check on channels passed in IOCTL SETROAMSCANCHANNELS.

Change-Id: I7342aa5cf8e5267b7ed06a4e35b1ed882fb97893
CRs-Fixed: 2227039
2018-05-18 16:46:44 -07:00
Naveen Rawat
ea1564b784 qcacld-3.0: Fix tTxrateinfoflags as per linux coding guidelines
Fix tTxrateinfoflags as per linux coding guidelines, this will later
help move the struct to qcacmn.

Change-Id: I1911d25594aaecc7c166cf36b79111b61e6de457
CRs-Fixed: 2244834
2018-05-18 16:46:40 -07:00
Nirav Shah
d21a2e3d6c qcacld-3.0: Featurize dp trace
Featurize dp trace to compile out cleanly.

Change-Id: I23b86459af605baa257af4ef62497f010b864215
CRs-Fixed: 2228465
2018-05-18 12:14:39 -07:00
Rajeev Kumar Sirasanagandla
551613d872 qcacld-3.0: Fix event size in GET_WIFI_INFO handler
While processing vendor command QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO,
respective handler wlan_hdd_cfg80211_get_wifi_info() is not allocating
memory for QCA_WLAN_VENDOR_ATTR_WIFI_INFO_RADIO_INDEX in event buffer
and trying to populate radio_index with nla_put_u32(). Buffer-overflow
is avoided with buffer length check in nla api but error is returned.
Return of error for valid user input is incorrect.

To fix this, add size of radio index in event buffer size calculation.

Change-Id: I39973814ae9b10466b9d5e3492a42b745a7f2a5e
CRs-Fixed: 2230298
2018-05-18 12:14:36 -07:00
Dustin Brown
e7e71d3fe3 qcacld-3.0: Remove adapter parameter from start modules
hdd_wlan_start_modules() currently takes an adapter parameter in order
to do management frame event deregistration. Instead, do management
frame event deregistration during adapter stop for symmetry with the
event registration. This allows us to remove the adapter parameter
completely from hdd_wlan_start_modules().

Change-Id: Ifb4619c80a129b8ef4e84c597dd98004d5cd713d
CRs-Fixed: 2240850
2018-05-18 03:34:39 -07:00
Pragaspathi Thilagaraj
1e5420a974 qcacld-3.0: Fix OOB read in iw_hdd_set_var_ints_getnone
From the IOCTL command WE_POLICY_MANAGER_PCL_CMD, we get the cds
concurrency mode as argument and pass it to cds_get_pcl to get
the pcl channel list. This concurrency mode parameter is used as
the array index to retrive the enum cds_pcl_type. If this value
is greater than CDS_MAX_NUM_OF_MODE an OOB read will occur in
iw_hdd_set_var_ints_getnone.

Add check to validate the input cds mode argument against the macro
CDS_MAX_NUM_OF_MODE. Return error if it is violated.

Change-Id: Iaa79d9698e0074a31a9c3f2396bd06d436d1e349
CRs-Fixed: 2216048
2018-05-18 02:16:55 -07:00
Rajeev Kumar Sirasanagandla
0a266177ff qcacld-3.0: Avoid NULL pointer exception in wlan_hdd_allow_sap_add()
When trying to add multiple softap interfaces, sanity checks in
wlan_hdd_allow_sap_add() are trying to access dev in adapter without
NULL check which can lead to NULL pointer exception.

To fix this, add NULL check for dev before access of its attributes.

Change-Id: I57577da1b60443a42e273f87e9f4feac123bc686
CRs-Fixed: 2232394
2018-05-18 00:00:15 -07:00
tinlin
8a44b64ba4 qcacld-3.0: Fix overwrite in wlan_hdd_cfg80211_set_ie
Fix overwrite when handling RSN element and WAPI AKM suite
list in wlan_hdd_cfg80211_set_ie.

Change-Id: I63528da4c2dfafa22f2c6fc73afe52727af02b64
CRs-Fixed: 2228031
2018-05-18 00:00:11 -07:00
Kiran Kumar Lokere
30313a3a58 qcacld-3.0: Fix the HE mcs rate in no ack operation
Fix the HE mcs rates when the ack policy is set to no ack to
reduce the tx failures.

Change-Id: Iff923bcb6094d1a75ba1e14ff19897f9ca8c2e0a
CRs-Fixed: 2236565
2018-05-17 16:55:08 -07:00
Hanumanth Reddy Pothula
2fe2d628a0 qcacld-3.0: Resolve possible OOB while posting SET PASSPOINT WMA event
Presently, while processing SET_PASSPOINT_LIST vendor command
HDD is not making sure realm string passed by upper-layer is NULL
terminated, this may lead to buffer overflow as strlen is used
to get realm string length to construct PASSPOINT WMA command.

Make sure realm is NULL terminated before passing the same to
down layers.

Change-Id: I417f2b89dc219664afe5deac00dc361cac4048d6
CRs-Fixed: 2180699
2018-05-17 15:43:35 -07:00
Wen Gong
9976890a5d qcacld-3.0: Featurize dbglog_host
Featurize parsing support for WLAN firmware logs in WLAN host driver

Change-Id: Ib4f04bd23698e981bc4ab1f8e0d880798d521020
CRs-Fixed: 2228367
2018-05-17 14:26:19 -07:00
Rajeev Kumar
4992b686c2 qcacld-3.0: Reject DISA test vendor command if power save is enabled
DISA encrypt/decrypt test is not supported by FW when power save is
enabled. Add check to reject DISA encrypt/decrypt vendor test command
if power save is enabled.

Change-Id: Ia83036f957a3298288d312f836d40284344ce8e8
CRs-Fixed: 2240880
2018-05-17 11:35:10 -07:00
Kiran Kumar Lokere
e43a458fdc qcacld-3.0: Fix the issue with LDPC disable
LDPC dynamic configuration setting is not updated into session
configuration hence LDPC disable do not happen when user disable
it. Update the session configuration parameters for LDPC with
user settings.

Change-Id: Ic0b5f2b17cde5746054f90d78d6c99624444d086
CRs-Fixed: 2235936
2018-05-17 11:34:42 -07:00
Srinivas Girigowda
836475eb0c qcacld-3.0: Add dummy function for supplicant deprecated commands
This commit fix the VTS test failures when running the following
deprecated commands in SupplicantStaIfaceHidlTest
  RXFILTER-START
  RXFILTER-STOP
  BTCOEXSCAN-START
  BTCOEXSCAN-STOP

Change-Id: I45fa09c24700e6872de7709c6875dbdbd8aa10cc
CRs-Fixed: 2226343
2018-05-16 23:19:45 -07:00
Srinivas Girigowda
44cff5c444 qcacld-3.0: Log netdev tx queue state at user triggered disconnect
Framework shall trigger disconnect for many reasons,
one of them is NUD failure. The motive to print tx queue
state whenever disconnect is triggered from the userspace
is to see the state of the tx queue at the time of disconnect.

Change-Id: I73f6359f6823de4781ed94b1d4f19c4a0a198879
CRs-Fixed: 2225547
2018-05-16 23:19:32 -07:00
Jeff Johnson
c5927def57 qcacld-3.0: Fix misspellings of 'update'
Fix misspellings:
- udpated => updated
- udpate_type => update_type

Change-Id: I0481278e76a6482d0974d1730398cbcf633f4b08
CRs-Fixed: 2241929
2018-05-16 18:00:30 -07:00
Abhishek Singh
1571ca7cc0 qcacld-3.0: Add support to set antenna mode for SAP
Add support to set antenna mode for SAP using iwpriv commands
set_txchainmask and set_txchainmask.

Change-Id: Id74d8caf6b2d48b0afbcc3791bd347d6addd2e7d
CRs-Fixed: 2239648
2018-05-16 13:44:45 -07:00
jitiphil
31cf1ba577 qcacld-3.0: Invalid checks for operating channel validation
Inside hdd_ndi_create_req_handler(), we need to check if
the operating channel is valid. The current checks do
not ensure the operating channel is checked against all
valid values.

Correct the check condition to validate the operating
channel against all valid values.

Change-Id: I01c035b996ab26779ee005bef437393875fdd95a
CRs-Fixed: 2233118
2018-05-16 13:44:39 -07:00
Alok Kumar
b5a33a25cb qcacld-3.0: Fix missing break statement issue in between switch cases
Here the case is designed to fall through to the next case. So,
add a /* fallthrough */ comment where the break is expected.

Change-Id: Ide5b530c9b817a269fcee4ece679476930797ae7
CRs-Fixed: 2233186
2018-05-16 12:13:11 -07:00
Abhinav Kumar
7494819d8f qcacld-3.0: Do not flush disconnect command from sme on receiving connect
If disconnect command is in SME pending queue, when connect command
is received, the disconnect command is flushed and as SME is
already in connected state the new connect command is handled as
reassoc req and as no preauth was done with this new AP, SME does not
call proper HDD callback to indicate conenct failure. Thus HDD remains
stuck in connecting state leading to scans rejection.

To fix this do not flush disconnect command from SME on receiving
connect cmd and thus clean up the SME before connect is processed.

Change-Id: Icefe8866a24b332688c64d8e69a11642fd7215d9
CRs-Fixed: 2238873
2018-05-16 08:35:55 -07:00
Visweswara Tanuku
006313a221 qcacld-3.0: Add boundary check for setMonChan command
qcacld-2.0 to qcacld-3.0 propagation

Add channel and bandwidth validation check for
setMonChan iwpriv command.

Change-Id: I1be22799a46e3ec30cfe384563ecb8a5404d9f6a
CRs-Fixed: 2139911
2018-05-15 20:56:27 -07:00
Rajeev Kumar Sirasanagandla
8413a48db3 qcacld-3.0: Avoid info leak in IOCTL CCXBEACONREQ
While processing IOCTL - CCXBEACONREQ, when number of
beacon request IEs is zero, respective handler drv_cmd_ccx_beacon_req()
is trying to log measurement token from un-initialized struct variable
ese beacon request, which results in kernel info disclosure.

To fix this, initialize stack variable ese beacon request and return
error in disconnected state when number of beacon request IEs is zero.

Change-Id: I4b0a8c673f9ca92e8699a157b24a100bb0cffa83
CRs-Fixed: 2225338
2018-05-15 19:05:32 -07:00
bings
0e03a98d21 qcacld-3.0: Stop and flush data when radar is found
Do not send data packets when radar is found

Change-Id: Icd7c042099cc4431cb836d0fcc3d10ad7db5982f
CRs-Fixed: 2237858
2018-05-15 19:05:23 -07:00
gaurank kathpalia
18b4936767 qcacld-3.0: Fix out of bound write in mcs_set
The driver fills the mcs set array in
hdd_update_tgt_ht_cap for all rf chains
and does not have a upper boundary check to
cfg->num_rf_chains, which could lead
to out of bound write a valid value
to a memory which not allocated to mcs set

Fix is to have a check to cfg->num_rf_chains

Change-Id: Ibeb5e783e2369ebee1bbf3fc724d06736c174c69
CRs-Fixed: 2221902
2018-05-15 19:05:15 -07:00
Tang Yingying
5a4ccf208e qcacld-3.0: Set RPS CPU mask when t-put is high
The default value of /sys/class/net/xx/queues/rx-x/rps_cpus is 0,
It means that the RX thread and soft IRQ will run on same core.
In 8996AU, the t-put will be impacted by the default value 0 both
in LTE and WLAN interface. Add support to set WLAN RPS CPU mask when
there is high t-put requirement of WLAN to improve the performance.

Change-Id: I10127a763b768a29b25041070f3ea7b3f6769289
CRs-Fixed: 2195721
2018-05-15 15:37:49 -07:00
Hanumanth Reddy Pothula
3048c93707 qcacld-3.0: Avoid buffer overread while processing set pno IOCTL
While processing set pno IOCTL, input argument 'extra' is printed
without making sure it's NULL terminated.

Log input string 'extra' after making sure it's NULL terminated.

Change-Id: I4158103a85c0828dad240cf00b34da94e6a8cc62
CRs-Fixed: 2228601
2018-05-15 15:37:42 -07:00
Arif Hussain
0e24680997 qcacld-3.0: Add support to send A-MSDU aggregation type to firmware
Add support to send A-MSDU aggregation type to firmware.

Change-Id: Id97efa6b7ff658b11462f9d6b6c8e79107e5f128
CRs-Fixed: 2234350
2018-05-15 13:54:08 -07:00
Wen Gong
3f00338bf7 qcacld-3.0: Change WLAN_FEATURE_HDD_MEMDUMP_ENABLE
Change WLAN_FEATURE_HDD_MEMDUMP_ENABLE to WLAN_FEATURE_MEMDUMP_ENABLE

Change-Id: Id4ef8de4dc7b566f3b29b9e045c1530c873a426c
CRs-Fixed: 2241236
2018-05-15 10:05:40 -07:00
Vignesh Viswanathan
75af0a6c04 qcacld-3.0: Fix return status in wlan_hdd_reassoc_bssid_hint
Currently wlan_hdd_reassoc_bssid_hint returns true if prev_bssid is
present in the connect request even if the hdd_reassoc fails leading
to connection not happening if the supplicant sends a prev_bssid
and bssid_hint in the connect request and if the current state is
not connected.

Fix return status in __wlan_hdd_cfg80211_connect to return 0 only
if hdd_reassoc is success else proceed with disconnect and connect

Change-Id: I513495797f2538fc8887ff0a9ce04e13035e0549
CRs-Fixed: 2238104
2018-05-15 05:56:48 -07:00
Vignesh Viswanathan
a2f5ce580a qcacld-3.0: Validate channel list from ioctl before sending to fw
Currently the channel list received from the SETROAMSCANCHANNELS
driver command is passed directly to the FW without checking if it
contains any invalid channels leading the firmware to assert if the
list contains unsupported channels.

Validate the channel list received from the ioctl with the base
channel list and send to firmware only if all the channels in
the list are valid

Change-Id: Ia502eecb97e34de854a75a6af7ffb8ccc02a7e52
CRs-Fixed: 2231242
2018-05-15 04:33:46 -07:00
Ashish Kumar Dhanotiya
3d0c71379c qcacld-3.0: Resolve compilation error for FEATURE_WLAN_ESE
If FEATURE_WLAN_ESE is disable, there is a compilation error.

Remove the definition of hdd_wmm_inactivity_timer_cb and
hdd_wmm_disable_inactivity_timer if FEATURE_WLAN_ESE is disabled
as these apis are not getting used anywhere.

Change-Id: I2c236f63429bdc738be9ccb06f9671b694fd9a5d
CRs-Fixed: 2238180
2018-05-15 03:21:30 -07:00
Naveen Rawat
374d798de2 qcacld-3.0: Split __wlan_hdd_cfg80211_get_station for sta/sap
Refactor function __wlan_hdd_cfg80211_get_station for sta and sap
case.

Change-Id: Ic71333750657745058c5f37665ea0bb7b7331988
CRs-Fixed: 2223583
2018-05-15 00:36:12 -07:00
Venkata Sharath Chandra Manchala
c004fa0614 qcacld-3.0: Enable Support for dbs stats
Add an extra parameter for txrx_stats to print
stats based on provided mac_id

Change-Id: I613ef657571f8ce6222434067117ac313fc98d60
CRs-Fixed: 2237472
2018-05-15 00:36:08 -07:00
Yu Wang
157d147841 qcacld-3.0: add implementation of getting congestion stats
Add changes to support get congestion stats from
within cp_stats component.

Change-Id: I359332a18f11e56a29f15c08f687fd2d08c22695
CRs-Fixed: 2222782
2018-05-14 21:54:39 -07:00
Jeff Johnson
9c749db62c qcacld-3.0: Prevent overread of SSID in hdd_fill_pmksa_info()
Currently when transferring SSID information from the nl80211 TLV to
the internal data structure hdd_fill_pmksa_info() always copies
SIR_MAC_MAX_SSID_LENGTH bytes which can overread the buffer. In order
to prevent overread only copy as many bytes as the TLV contains.

Note that the destination buffer passed to hdd_fill_pmksa_info() is
always zero-filled so no additional zeroing of bytes is required.

Change-Id: I1f6773b70e9e728d6b1ce93ca26417348e96844c
CRs-Fixed: 2237462
2018-05-14 21:54:29 -07:00
Dustin Brown
4cd46f86c3 qcacld-3.0: Add break for QCSAP_SET_FW_PROFILE_HIST_INTVL
The IOCTL handler mapping code for QCSAP_SET_FW_PROFILE_HIST_INTVL
mistakenly falls through to the next switch case. Add a break to prevent
executing two IOCTL callbacks for QCSAP_SET_FW_PROFILE_HIST_INTVL.

Change-Id: I6b0a17b87c22d1d2be3697456608e8ebe704afed
CRs-Fixed: 2232911
2018-05-12 04:31:03 -07:00
Jeff Johnson
33142e6fb6 qcacld-3.0: Fix typo "doesnt"
Replace typo "doesnt" with correct spelling "doesn't".

Change-Id: Ic3063f9fe74e10f656e00e86c8f38ccf1132f22d
CRs-Fixed: 2238297
2018-05-12 04:30:58 -07:00
Jeff Johnson
9a27ffa62e qcacld-3.0: Fix typo "continous"
Replace typo "continous" with correct spelling "continuous".

Change-Id: I6159508bf43b3504d8a44f2088c3b98aef449460
CRs-Fixed: 2238297
2018-05-12 04:30:53 -07:00
Jeff Johnson
55ceaf0187 qcacld-3.0: Fix typo "avaiable"
Replace typo "avaiable" with correct spelling "available".

Change-Id: I6f62d402bf73a1b8c8b3abebdf14a6d9a02d96d2
CRs-Fixed: 2238297
2018-05-12 04:30:48 -07:00
Jeff Johnson
6c6d27c461 qcacld-3.0: Fix typo "assocation"
Replace typo "assocation" with correct spelling "association".

Change-Id: I01445b034954ae80b55bfa3eb20b9754d56cd7de
CRs-Fixed: 2238297
2018-05-12 04:30:43 -07:00