Commit Graph

2195 Commits

Author SHA1 Message Date
Jeff Johnson
c51cac9d1d qcacld-3.0: Rename struct hdd_hostapd_state_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_hostapd_state_s to align with that
guidance.

Change-Id: Ic520ecd0c6ba64428533aae6eef92bcb4d8daeaa
CRs-Fixed: 2093282
2017-08-18 19:07:28 -07:00
Jeff Johnson
3e8d37760e qcacld-3.0: Rename struct hdd_cfg80211_state_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_cfg80211_state_s to align with that
guidance.

Change-Id: I10342551370e1b81d49df734cf81a44501cb0bf7
CRs-Fixed: 2093281
2017-08-18 19:07:26 -07:00
Jeff Johnson
a49c0ac465 qcacld-3.0: Replace typedef hdd_pmf_stats_t
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_pmf_stats_t typedef does
not meet any of those criteria, so replace it with a well named
struct.

Change-Id: I6e1f205f36ca35d58f5f8846d95d76976266a8bd
CRs-Fixed: 2093258
2017-08-18 18:27:45 -07:00
Rajeev Kumar
5cb007fbfa qcacld-3.0: Define HDD rate limit loggign API
Define HDD rate limit loggign API such that logs
can be rate limited on need basis.

Change-Id: If8dcf48ad9381b5b10df064cfe189bcb932f924c
CRs-Fixed: 2083919
2017-08-18 17:46:52 -07:00
Ravi Kumar Bokka
7a4034e3a1 qcacld-3.0: modify ini value for MCBC active apf param
modify ini max value to 1 for mcbc active apf.

Change-Id: Ief648ea879feacba4812ccf4427dfe1fde1a76f5
CRs-Fixed: 2072916
2017-08-18 17:46:49 -07:00
Jeff Johnson
07f9474753 qcacld-3.0: Replace typedef hdd_stats_t
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_stats_t typedef does not
meet any of those criteria, so replace it with a well named struct.

Change-Id: Ie4340278dc449f7d0bd65be726a8d573506e4f1a
CRs-Fixed: 2092843
2017-08-17 00:06:54 -07:00
Jeff Johnson
41a6496ffe qcacld-3.0: Replace typedef roaming_info_t
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The roaming_info_t typedef does not
meet any of those criteria, so replace it with a well named struct. In
the process remove the unused roamingEvent that it contains.

Change-Id: I0bf974fcbe0a591973610eef27acc3da07071a57
CRs-Fixed: 2092842
2017-08-17 00:06:52 -07:00
Ashish Kumar Dhanotiya
9cd0d7c74f qcacld-3.0: Buffer overflow in setrmcenable, setrmcactionperiod
There is a buffer overflow while using sscanf in setrmcenable
and setrmcactionperiod APIs.
To resolve this, use sscanf according to buffer length.

Change-Id: I91b0c36cb8c67d45afb0b95ac944f9e87187f85a
CRs-Fixed: 2086337
2017-08-16 23:27:00 -07:00
Varun Reddy Yeturu
168134f94e qcacld-3.0: Introduce lookup_threshold_5g_offset INI item
Introduce lookup_threshold_5g_offset in WCNSS_qcom_cfg.ini
which will let the user to configure separate threshold for
5G band using this offset

Change-Id: I4975f74095a5fec0657666ba864ee436cbaed604
CRs-Fixed: 2093368
2017-08-16 17:37:01 -07:00
Kapil Gupta
ffa260296f qcacld-3.0: Changes to fix compilation warnings
Add changes to fix compilation warning related to
frame-larger-than flag. Value of this flag is set by
CONFIG_FRAME_WARN in kernel config.

Change-Id: I0d4d55c141572c9da3a459e79073b99fc5d6ea67
CRs-Fixed: 2035710
2017-08-16 11:57:24 -07:00
bings
37bd58f57a qcacld-3.0: Fix connection information deleting and restoring
Currently only one connection information corresponding to the
provided mode is deleted and restored, which causes channel
selecting failure in DFS testing with AP+AP concurrency mode.
When radar is found in AP+AP concurrency mode, a new valid channel
should be selected. Before selecting the channel, all existing
connection information of SAP mode should be deleted, otherwise
no valid channel can be selected.

All the connection information corresponding to the provided mode
should be deleted and restored.

Change-Id: Id363dbb2c31485fefcd6915696060923063079bb
CRs-Fixed: 2078021
2017-08-16 03:27:39 -07:00
Poddar, Siddarth
05febac9b1 qcacld-3.0: Take wakelock only in authenticated state for rx packet processing
Take wake_lock for rx packet processing in hdd_rx_packet_cbk
only in authenticated state to avoid taking lock for sta cached_bufq
for which the wake_lock is acquired for all packets one by one
till entire flush duration.

Change-Id: Ia69381a7406a5a475ed07f73f3ea0edf4b3715be
CRs-Fixed: 2081963
2017-08-16 01:07:15 -07:00
Ravi Joshi
8eb65f97bd qcacld-3.0: Enable sending HT/VHT parameters for NDI
Enable sending HT/VHT self capabilities for NDI.

CRs-Fixed: 2080124
Change-Id: I4b01bef970f3f851fdbb052dc7eadf2420bcafb2
2017-08-15 19:27:44 -07:00
Mahesh Kumar Kalikot Veetil
b85cefd1a6 qcacld-3.0: Fix early qdf prints
Fix the error print: 'qdf_trace_msg_cmn: Invalid index - -1'. Move the
qdf print registration to early in driver initialization.

Change-Id: I338e6615d7f76110df762d725f535fb7493cb1cd
CRs-Fixed: 2092806
2017-08-15 18:25:57 -07:00
Prashanth Bhatta
87b6dc0a9f qcacld-3.0: Change semantics of Runtime Lock APIs
QDF Runtime PM lock APIs semantics are changed. Incorporate the
changes done in QDF for all the Runtime PM lock APIs.

CRs-fixed: 1116549
Change-Id: Ia701378031b7e9c01583eaef403e1219fdce47e3
2017-08-15 13:27:12 -07:00
Jeff Johnson
e4bad25921 qcacld-3.0: Replace typedef connection_info_t
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The connection_info_t typedef does
not meet any of those criteria, so replace it with a well named
struct.

Change-Id: I414f8d1949807f1bc0cda72971fab5696d1d1860
CRs-Fixed: 2092786
2017-08-15 01:27:15 -07:00
Jeff Johnson
745880cfba qcacld-3.0: Rename struct hdd_tx_rx_stats_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_tx_rx_stats_s to align with that guidance.

Change-Id: Idb6f8a6a2aa7704dedefdb78689c966babab8c42
CRs-Fixed: 2092737
2017-08-15 01:27:12 -07:00
Jeff Johnson
e962b1972a qcacld-3.0: Rename struct hdd_ap_ctx_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_ap_ctx_s to align with that guidance.

Change-Id: I68fb6fb0a2e62d1462b04d05e5232167ce423754
CRs-Fixed: 2092736
2017-08-15 01:27:10 -07:00
Jeff Johnson
82797b6d85 qcacld-3.0: Rename struct hdd_context_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_context_s to align with that guidance.

Change-Id: I590cc8751873479a098f90b501c401c4fb4010c4
CRs-Fixed: 2092735
2017-08-15 01:27:07 -07:00
Jeff Johnson
85b5c11849 qcacld-3.0: Rename struct hdd_adapter_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct hdd_adapter_s to align with that guidance.

Change-Id: I2a43671d9233f596b4e10eda4ad8641d7311fad1
CRs-Fixed: 2092733
2017-08-15 01:27:05 -07:00
Dustin Brown
6f17a021d4 qcacld-3.0: Duplicate target_hw_name in HDD
Currently, HDD keeps a ponter to the HIF target_hw_name, which it gives
to userspace upon request. If HIF is closed, this memory is cleaned,
leading to a use-after-free. When the HIF target_hw_name pointer is
received by HDD, store a duplicate instead of the original string.

Change-Id: Ic27f00937cd600ed04908f3ba0f83ede54bc31eb
CRs-Fixed: 2079231
2017-08-14 21:26:36 -07:00
Ashish Kumar Dhanotiya
fd758ecd2f qcacld-3.0: Driver loading failure during monitor mode bring up
The API hdd_update_tgt_cfg decides whether to create a new PDEV
or use the existing one. In this case, the driver is
de-initialized/re-initialized followed by the cfg download. The
FW then generates SYS_READY and the control comes to this function.
Since there is no check for monitor mode the second PDEV is created.
FW seems to provide phy_id = 0 and expects the host to use the
corresponding pdev_id at various places during initialization.
Now here phy_id = 0 and pdev_id = 1, thus initializations fails.

To resolve this issue add a check for monitor mode in hdd_update_tgt_cfg
function and use the same pdev_id.

CRs-Fixed: 2087541
Change-Id: I9dd6449b1e81b6bb218d21c07ca0f5335067865d
2017-08-14 20:07:46 -07:00
jiad
4a7a33cad2 qcacld-3.0: Fix RX LDPC setting in VHT capabilities IE
VHT RX LDPC capability depends on both INI config and HW capabilities.
Current logic does not populate HW capability in a correct way. HW RX
LDPC capability is set as a bitmask of bit 4 instead of boolean value
while INI config is value of 0 or 1. Bitwise AND with HW cap and INI
config always creates a result of 0, which leads to wrong RX LDPC field
in VHT caps IE.

Fix is to populate HW RX LDPC cap as a boolean value and advertise VHT
RX LDPC capability when both INI config and HW capability are set to 1.

Change-Id: Iabf83f74d9bfc2bf7d958ca3a08e9e6090ac7fb8
CRs-Fixed: 2060216
2017-08-14 20:07:40 -07:00
Rajeev Kumar Sirasanagandla
686abd96f4 qcacld-3.0: Add support to randomize probe req SA and Seq number
qcacld-2.0 to qcacld-3.0 propagation

Randomize probe request's source address and sequence number to
improve user's privacy.

Change-Id: Ic367ce4578e65faf49e8092f0f8cce057eead728
CRs-Fixed: 1085995
2017-08-14 20:07:34 -07:00
jiad
14fe4fbf5c qcacld-3.0: fix ipa mcc tx_desc pool size
A list of ipa tx_desc is created to have a one-to-one mapping between
tx_desc from ipa driver and tx_desc in wlan. The list pool size is now
set to IpaUcTxBufCount, which is IPA wlan FW tx comp ring size and is
more like a HW resource. But the list is used only for SW MCC TX path.

Fix is to define a new INI to set hdd_ipa_tx_desc pool size. But real
size is minumum of this INI and the global tx_desc pool size.

Change-Id: I3216a4c14ac624cc313d11226909efd4f63841d0
CRs-Fixed: 2076672
2017-08-14 19:26:31 -07:00
Hanumanth Reddy Pothula
18553ae114 qcacld-3.0: Invalidate STA ID with proper value
While resetting connection information, sta id is set to 0,
which is a valid value, leading sta id to hold a valid data
though connection information is reset.

While resetting connection information, set sta id with
HDD_WLAN_INVALID_STA_ID(0xFF) to make sure sta id holds invalid
data.

Change-Id: I7d438f323959a5fb6d3a232a88a8f2ca3c0e0c56
CRs-Fixed: 2040296
2017-08-14 11:38:26 -07:00
Poddar, Siddarth
37a17d3f35 qcacld-3.0: Rate limit HS 2.0 Gratuitous ARP droppage messages
Rate limit the HS 2.0 Gratuitous ARP messagess to 1/8
to avoid message flooding in kernel logs.

Change-Id: Icdcb8c18a2f17e2379ca6c5898db28800debdc16
CRs-Fixed: 2084136
2017-08-14 00:07:35 -07:00
Kiran Kumar Lokere
487957957a qcacld-3.0: Refactor the channel avoid event processing
Replace the channel avoid event data structure with the one defined in
regulatory module, remove the HDD callback as regulatory module is
consuming the FW event now, add logic to notify user space of channel
avoid event.

Change-Id: I6b1b986837ab89503a7e0469619193b0af8127da
CRs-Fixed: 2080241
2017-08-13 16:56:59 -07:00
Rajeev Kumar
f98a5cc3f8 qcacld-3.0: Hold wake lock for SAP client disconnect notification
Hold wake lock in driver for SAP client disconnect notification to
user space inorder to avoid hostapd and driver going out of sync.

Change-Id: If81cf836b8fc047731735aa28831d1efa2f4e7b2
CRs-Fixed: 2084282
2017-08-13 16:16:11 -07:00
Krunal Soni
158bfe6e18 qcacld-3.0: Introduce INI to disable high HT MCS for 2G STA
To resolve one of IOT issues, introduce INI called
"disable_high_ht_mcs_2x2" which will disable high MCS indices for
2G STA case based on INI value.

Change-Id: I60c5edd89a42f74c0f439fe6a9ab0c75373622b2
CRs-Fixed: 2087438
2017-08-13 15:36:44 -07:00
Varun Reddy Yeturu
3fb61716e7 qcacld-3.0: Enable logging for Serialization
Define the category info to print the serialization
module logs using QDF

Change-Id: If44213d4c0e4c5aca3011db4351cb6a778cdca6f
CRs-Fixed: 2091023
2017-08-13 15:36:41 -07:00
Hanumanth Reddy Pothula
063cbe9e58 qcacld-3.0: Update rate flags appropriately
Presently, Host fails to report valid actual link speed
(gReportMaxLinkSpeed=0) to the upper layer when firmware
reports legacy link speeds as Host fails to update legacy
bit in rate flags, reported to upper layer.

To mitigate this issue report rate flags with legacy bit set
on receiving valid rates from firmware and if MCS index is
invalid, as WMA fails to set valid MCS index for legacy rates.

Change-Id: I0a542e8aa56eb18e653aad30c1bec13f133d267c
CRs-Fixed: 2089469
2017-08-11 06:40:14 -07:00
Frank Liu
dc2cefb153 qcacld-3.0: fix sap not restart when on unsafe channel
In LTE Coex test, firmware will report the unsafe channels, and if sap
runs on these channels, driver goes through channel select process and
restart. There are some situation, in channel select process, SAP can't
find the proper PCL channel lists, and fail to restart.

This fix is to let SAP continue to pick up a safe channel from ACS
range when fail to get pcl.

Change-Id: I54145547d2b161aec09caa2dabd4d4b52aa15f03
CRs-Fixed: 2064534
2017-08-10 06:12:57 -07:00
Agrawal Ashish
aff2898902 qcacld-3.0: Trigger copy of pktlogs to SD Card on basis of ring ID
For fatal events , driver sends EVENT_WLAN_LOG_COMPLETE
to userspace. But there can be multiple events for each
ring id like connectivity, driver , frimware, wakelock etc.
Cnss diag has to trigger copy of pkt log to /sdcard only for
one bug report, so send ring id in log complete event so
that it can trigger copy for driver ring id.

Change-Id: I0776775ab81fd2920ea440b773b146b6af61e434
CRs-Fixed: 2028068
2017-08-10 06:12:55 -07:00
Himanshu Agarwal
dd2196a8f5 qcacld-3.0: Do netif_rx_ni() for frames received before peer assoc
While processing of frames received before peer is registered in process
context, tcp_v4_rcv() is called which takes a spinlock and in between the
processing before spinlock can be released, it is getting preempted by
hif_napi_poll() as it gets executed in softirq context. It tries to take
the same spinlock in tcp_v4_rcv() resulting in deadlock.
Do netif_rx_ni() for frames received before peer is registered.

Change-Id: I6228984f209bb9312ed9d8f3937d6036918ff750
CRs-Fixed: 2034244
2017-08-10 01:49:27 -07:00
Lin Bai
28a4ca04e9 qcacld-3.0: Fix flush uninitialized delay_work crash
With TDLS enabled and CONVERGED_TDLS_ENABLE defined, wlan_hdd_tdls_init()
will be bypassed by tdls_umac_comp_active flag.
While, in wlan_hdd_tdls_exit(), similar check missed, which causes
uninitialized delay_work be flushed. This leads to final crash.

Check tdls_umac_comp_active flag in begining of wlan_hdd_tdls_exit()
to avoid crash.

CRs-Fixed: 2087653
Change-Id: I0d9458683f092456e54ccf42988d4f8534922947
2017-08-09 20:50:32 -07:00
gaolez
e2920bda2b qcacld-3.0: Add ini option for action frame based channel switch
qcacld-2.0 to qcacld-3.0 propagation

Add ini option to enable/disable action frame based channel switch.

Change-Id: I340464a18ef0b5cf09f481a23b01edcf04904e34
CRs-Fixed: 2082563
2017-08-09 20:50:29 -07:00
Yingying Tang
7ccf7d027d qcacld-3.0: Fix compilation error of unsigned only in ISO C90
Constant value 4294967295 is recognized as an signed integer
in ISO C90. Change the definition of the constant value to
4294967295UL to fix compilation error where need a unsigned
value as a input parameter.

Change-Id: I02f67b6351c53b5e3331ce668059c4c61953a8d3
CRs-Fixed: 2023140
2017-08-09 19:37:03 -07:00
Chris Guo
1751acf0c2 qcacld-3.0: Fix QDF assert in command ipaucstat
When doing HDD context check in ipa_init, the CDS is not yet
loaded. So remove the CDS loading check in ipa_init.

Change-Id: I45843c406f280cfbf932bc489f9051c2300b77ba
CRs-Fixed: 2070428
2017-08-09 18:10:46 -07:00
jiad
05c1e81910 qcacld-3.0: fix ipa mcc tx_desc leak
In MCC case when vdev pause queue is full, driver fails to tx and pkts
are dropped. ipa tx_desc only replenishes to ipa driver. This leads to
holes in hdd_ipa_tx_desc free list and list will be drained out causing
unexpected packet drops.

Fix is to replenish tx_desc to wlan driver maintained free list as well
using ipa registered skb free callback.

Change-Id: I1ae8570816efd822d5ced2c6383a03c56b12ec89
CRs-Fixed: 2073444
2017-08-09 18:10:45 -07:00
Peng Xu
5c68281c62 qcacld-3.0: Add interface info when sending P2P LO event
Add interface information when sending P2P listen offload stop
event to upper layer so that the event can be processed on the
correct interface.

Change-Id: I7aac52552e9277aff838d9bfef01201af48773c9
CRs-fixed: 2088732
2017-08-09 15:00:10 -07:00
Kabilan Kannan
00d2041f9b qcacld-3.0: Restructure TDLS function to fix the compilation issue
If TDLS disabled at the build level, it triggers
build failures in some of the projects, which does
not support TDLS feature.
Restructure the TDLS function to avoid build
failures, when TDLS is not enabled.

Change-Id: I3b63546f22d0187fb42d400fd7e15ff7a3d64653
CRs-Fixed: 2056022
2017-08-08 16:05:11 -07:00
Varun Reddy Yeturu
8a5d3d4775 qcacld-3.0: Fix logging levels - Part 3
Move the log messages to appropriate log levels so that
the console does not get a huge spam of unnecessary logs

Change-Id: I8e140039a3a483953606558e102db23ab8b0096a
CRs-Fixed: 2043741
2017-08-08 13:15:11 -07:00
Yun Park
b4f591d8aa qcacld-3.0: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I80e8f609587d0df85d2da9fb0f41cb49e02a9d2f
CRs-Fixed: 2033368
2017-08-07 17:47:45 -07:00
Venkata Sharath Chandra Manchala
cc78917112 qcacld-3.0: Adjust logging level for Rx path
Change the log level from ERROR to INFO
for hdd_rx_packet_cbk log to prevent
packet information from flooding on the
kmsg.

Change-Id: I27bfcc708740f50c4b15d72b89176af2ce27f6fa
CRs-Fixed: 2082577
2017-08-06 22:49:56 -07:00
Ashish Kumar Dhanotiya
b28338c403 qcacld-3.0: Add host support to configure the SMPS parameters
Currently there is no support to configure SMPS parameter
from host, add support to configure SMPS parameters using ini.

Change-Id: I6f8273ffed39a0b95c31f1647e86406b870165f2
CRs-Fixed: 2080571
2017-08-06 20:45:06 -07:00
Ashish Kumar Dhanotiya
b8630abe6d qcacld-3.0: Configuration to enable/disable LPRx
Add host support to enable/disable LPRx from ini.

Change-Id: I7a5acd34331cdd1f06a2d08317efcf04c6f608a7
CRs-Fixed: 2080316
2017-08-06 20:45:04 -07:00
Srinivas Girigowda
5da651bc36 qcacld-3.0: Add support for CFG80211_REMOVE_IEEE80211_BACKPORT
CFG80211_REMOVE_IEEE80211_BACKPORT is added to indicate
backport of Change-Id: 57fbcce37b
from upstream 4.7 kernel to 4.4.

Hence add this flag CFG80211_REMOVE_IEEE80211_BACKPORT to
support this compilation. Also introduce HDD_NUM_NL80211_BANDS.

Change-Id: I60a15a1273f939a0a288d08d03ccb5bf1bdcc429
CRs-Fixed: 2087917
2017-08-06 14:48:18 -07:00
Srinivas Girigowda
6519b93735 qcacld-3.0: Fix clang warning 'Wlogical-not-parentheses'
logical not is only applied to the left hand side of this
bitwise operator [-Werror,-Wlogical-not-parentheses]
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^                           ~
csr_api_roam.c:14617:6: note: add parentheses after the '!' to
evaluate the bitwise operator first
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^
             (                               )
csr_api_roam.c:14617:6: note: add parentheses around left hand
side expression to silence this warning
           (!(ies->RSN.RSN_Cap[0] >> 7) & 0x1)))
            ^
            (                          )

Change-Id: I489eba6a6265778346bb3b20832f92774a2d5e0e
CRs-Fixed: 2087302
2017-08-06 14:48:15 -07:00
Kabilan Kannan
98440ce38e qcacld-3.0: Add ssr protection for scan callback function
Add ssr protection to scan_block_work to avoid null
reference access.

Change-Id: I0ff111abf2bbdcb7b0c3a3c255396c14b0b59f01
CRs-Fixed: 2066506
2017-08-06 13:48:14 -07:00