Commit Graph

2223 Commits

Author SHA1 Message Date
Dustin Brown
c788acb242 qcacld-3.0: Reject set MC list if adapter is not up
__hdd_set_multicast_list() currently does not validate the adapter
before forwarding the request to PMO. Make sure the adapter is valid
and up before forwarding the request to PMO.

Change-Id: I738da67a1e501e71b8ad748ff50e70088ed77747
CRs-Fixed: 2086025
2017-08-30 10:43:31 -07:00
Dustin Brown
2eb1e45863 qcacld-3.0: Remove name indirection for ieee80211_get_channel()
Versions 4.11+ of the Linux kernel removed '__' from the beginning of
ieee80211_get_channel(). Migrate all calls from __ieee80211_get_channel
to ieee80211_get_channel instead.

Change-Id: I255367d1e1d815e7ebbda43dc06d6d854e1534f4
CRs-Fixed: 2093213
2017-08-30 10:43:27 -07:00
Jingxiang Ge
c64e193882 qcacld-3.0: Ignore bus bw compute when device is in suspend
When wow resume happens, if hdd_bus_bw_work_handler is called
before we complete the resume in host, it causes warning when
sending cmd to fw.

Ignore bus bw compute when device not yet resume from WOW.

Change-Id: I607807d429f0f10207ffa2f4d878e38184415dc7
CRs-Fixed: 2096749
2017-08-30 10:43:02 -07:00
Srinivas Girigowda
576b235de7 qcacld-3.0: HDD: Fix checkpatch warnings
Fix checkpatch warnings.

Change-Id: Ic329caab07db3a11db3474e7a85ad5957537e5be
CRs-Fixed: 2099382
2017-08-30 10:42:23 -07:00
Nachiket Kukade
dd30266ce5 qcacld-3.0: Move wow pulse configuration to hdd_configure_cds
Currently wow pulse configuration happens in wlan_startup. After
phase 1 initialization iface timer may expire and send deinit
sequences to shut down features like wow. If an interface is opened
again, triggering of wow pulse without configuring it again will end
up in failures.
Move the wow pulse configuration in phase 2.

Change-Id: Ic9e9a4f7988159bac7b6bf93c5f982ef23e852cd
CRs-Fixed: 2075936
2017-08-30 10:42:07 -07:00
lifeng
d217d19d7e qcacld-3.0: Add vendor cmd to support antenna diversity
qcacld-2.0 to qcacld-3.0 propagation

Add qca_wlan_vendor_config attr to config antenna diversity.
Add vendor subcmd QCA_NL80211_VENDOR_SUBCMD_GET_CHAIN_RSSI
to get chain rssi value.

Change-Id: I75c4c8016b15772b0c52be91e446f69580475496
CRs-fixed: 1071075
2017-08-30 10:41:53 -07:00
Ashish Kumar Dhanotiya
20f09e4c84 qcacld-3.0: Fix regression in wlan_hdd_add_hostapd_conf_vsie api
Currently In wlan_hdd_add_hostapd_conf_vsie api after checking the
length of element, return is being done because of which it is skipping
the remaining elements.
To fix this issue, don't return after invalid length, instead process
the remaining elements.

Change-Id: I1b370bc30a4400aa4fd5fce5783741272c64386a
CRs-Fixed: 2087787
2017-08-30 10:41:45 -07:00
Jeff Johnson
90b79cf08f qcacld-3.0: Remove statusCode from hdd_wext_state_t
Currently hdd_wext_state_t defines field statusCode, but this
field is never referenced and hence is obsolete, so remove it.

Change-Id: I482999414078d02a23b3b6255b0270c28e332191
CRs-Fixed: 2094517
2017-08-30 10:41:32 -07:00
Abhishek Singh
12be60f54b qcacld-3.0: Fix kernel checkpatch warnings in sme_qos_api.h
Fix kernel checkpaitch warnings in sme_qos_api.h

Change-Id: Ib811dcf0b664a2677343a276708d852f4bb67346
CRs-Fixed: 2025503
2017-08-30 10:41:27 -07:00
Jeff Johnson
d084adb90f qcacld-3.0: Remove isESEConnection from hdd_wext_state_t
Currently hdd_wext_state_t defines field isESEConnection, but this
field is only written in one place and never read, hence it is
obsolete, so remove it.

Change-Id: Ia110a11ae968b28b2c74e5b77b4bcca21f69a78f
CRs-Fixed: 2094516
2017-08-30 10:41:23 -07:00
Jeff Johnson
89798aa132 qcacld-3.0: Replace typedef hdd_wapi_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 hdd_wapi_info_t typedef does
not meet any of those criteria, so replace it with a well named
struct.

Change-Id: I3f5d0faf689fac619643c78ca554bba3775bde04
CRs-Fixed: 2094514
2017-08-30 10:41:14 -07:00
Jeff Johnson
c5d7650079 qcacld-3.0: Rename struct beacon_data_s
The Linux Coding Style eschews the encoding of type information into
names, so rename struct beacon_data_s to align with that guidance. In
the process add an hdd_ prefix to avoid future namespace collisions.

Change-Id: Iae1cbbac2bee520ae305b027f68b5af1c4d94ea7
CRs-Fixed: 2093278
2017-08-30 10:41:10 -07:00
Dustin Brown
0e4479e27e qcacld-3.0: Add aggregate stats support for SAP
The cfg80211 get_station callback is not intended for use with
non-station device types. However, it is useful to expose aggregate
statistics for non-station type devices. Add support for returning
aggregate statistics when get_station is used with a soft access point
device.

Change-Id: I8ae32c307f241525a7d74467328d9d40dc805053
CRs-Fixed: 2077011
2017-08-30 10:41:01 -07:00
Jeff Johnson
3758894ae8 qcacld-3.0: Replace typedef hdd_scaninfo_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_scaninfo_t typedef does not
meet any of those criteria, so replace it with a well named struct.

Change-Id: Ia61b1f525a02e21a29e512dcb4c3678b730e6bd6
CRs-Fixed: 2093812
2017-08-30 10:40:57 -07:00
Houston Hoffman
0022711004 qcacld-3.0: Reduce log flooding in __hdd_tx_timeout
Reduce log flooding in __hdd_tx_timeout.  The single __hdd_tx_timeout
error log printed by TX_TIMEOUT_TRACE should be sufficient to
identify the error.  The debugging effort should use the driver logs.
This will ease debugging of other subsystems in the case that
the root cause is a system instability.

Change-Id: Iee3ba3c7d8d7dcd72a3a71ea4f8e4ae8d3bc17b6
CRs-Fixed: 2092183
2017-08-30 10:40:53 -07:00
Zhang Qian
32fd43e7d0 qcacld-3.0: Correct cached connection info
qcacld-2.0 to qcacld-3.0 propagation

The variables used for cached ssid and authentication type will be cleared
after disconnection, hence user will get incorrect info from vendor
event after disconnection.

Use separate variables to save last ssid and auth info.

This is to fix issues of change I5b64d9942a54d35eac0f08b4d8fbed9d1d66a504.

Change-Id: Icc1a5d53e33d650726905e50e4846b77b10cf4ee
CRs-Fixed: 2098560
2017-08-30 10:40:44 -07:00
Linux Build Service Account
56cee29266 Merge "qcacld-3.0: Introduce ini to control NDI mac randomization" 2017-08-24 12:11:16 -07:00
Linux Build Service Account
1b248de915 Merge "qcacld-3.0: Channel hopping for 2_4G and 5G band" 2017-08-24 12:11:15 -07:00
Mukul Sharma
05504acc13 qcacld-3.0: Add support of GCMP (128/256) support
Add support of GCMP (128/256) security ciper support.

Change-Id: I3c9cb3dc72cce0a2cae3e468d3c1f3c004e11adf
CRs-fixed: 2056168
2017-08-24 03:07:11 -07:00
bings
284f8be176 qcacld-3.0: Fix race condition that Tx is paused by flow control forever
When hdd_get_tx_resource is called, if free Tx desc is lower than low water
mark, vdev->os_q_paused will be set as 1 and WLAN_STOP_ALL_NETIF_QUEUE will
be triggered after a while. Before WLAN_STOP_ALL_NETIF_QUEUE is triggered,
if ol_tx_flow_ct_unpause_os_q is called, WLAN_WAKE_ALL_NETIF_QUEUE will be
triggered and vdev->os_q_paused will be set as 0. In such case There will
be no flow control unpaused forever.

Tx should be paused by flow control when Tx desc is lower than low water
mark, and unpaused when Tx desc is bigger than high water mark or Tx is
already paused by flow control.

Change-Id: Ib60139fd94a4fb88c92a7f8aaf886ae9d3ca4c75
CRs-Fixed: 2089149
2017-08-23 22:07:30 -07:00
gaolez
76d2a16f03 qcacld-3.0: Channel hopping for 2_4G and 5G band
qcacld-2.0 to qcacld-3.0 propagation

Allow device switch to a different channel if the current channel is
congested, using the 11h channel switch announcement.

Change-Id: I1766785017e43f17cc800039b383ee5dabcd6ea5
CRs-Fixed: 2082632
2017-08-22 20:57:57 -07:00
Tushnim Bhattacharyya
49ed8ab90b qcacld-3.0: Expand the use of gDualMacFeatureDisable INI
Few OEMs want DBS to be disabled for connections while
keeping DBS scan enabled.
Few OEMs want advance DBS scan features to be disabled.
Provide different value to gDualMacFeatureDisable INI item
to achive the goal.

Change-Id: Iddf5df23575a2f907bb8dbd0c37e03ff4ebbdea8
CRs-Fixed: 2068779
2017-08-22 16:05:38 -07:00
Arun Khandavalli
ba479c4ca8 qcacld-3.0: Dont close the CDS modules in FTM mode
Driver in FTM mode can operate even if the wlan interface isn't up.
If an user or an application tries to do IFF_UP and then IFF_DOWN
on the wlan0 interface, interface change timer kicks-in and starts
closing the modules. After which every command FTM commands
starts failing since the CDS modules are closed.

In order to mitigate don't run the interface change timer if
the driver mode is FTM.

Change-Id: I6b65a9956e33aeb619d2f1748f369c00ca75acab
CRs-Fixed: 2078323
2017-08-22 13:50:26 -07:00
Ashish Kumar Dhanotiya
cda57668d7 qcacld-3.0: Fix crash during con_mod_handler
During con_mod_handler, cleanup of adapter is being done first
and then wlan modules are getting closed. Because of which NAPI poll is
still posting frames to a device/adapter which has been freed as part
of mode change handler, leading to a crash.

To address this issue first stop all wlan modules and then cleanup the
adapter.

Change-Id: I2fade59d1e4a27620cecadb91f69866e79c85612
CRs-Fixed: 2092132
2017-08-22 05:16:33 -07:00
Sandeep Puligilla
0a11f8dc6f qcacld-3.0: Cleanup legacy scan code
Cleanup unused legacy scan code related
to abort scan.

Change-Id: I32c4c81b54bd464ebd5918c5a697fc57f505abc7
CRs-Fixed: 2063667
2017-08-21 19:26:08 -07:00
Ravi Joshi
9771d43a29 qcacld-3.0: Introduce ini to control NDI mac randomization
Allow disabling randomization of NDI MAC address. This will allow
faster debugging and give OEMs option of disabling this if not
required.

Change-Id: Ie4f4c1dba2014be50c997715d65e3f97e5d5980e
CRs-Fixed: 2069470
2017-08-21 18:02:09 -07:00
Rajeev Kumar Sirasanagandla
aec0b08b54 qcacld-3.0: Add support to include selective scan IEs only
qcacld-2.0 to qcacld-3.0 propagation

Add support to include only selective IEs in probe requests in
order to improve user's privacy.

Change-Id: Ib874af7ec2f5453282ffe0e8fc2e50934460b745
CRs-Fixed: 1086582
2017-08-19 01:27:13 -07:00
Jeff Johnson
1534017fd5 qcacld-3.0: Finish removing wext support for scan commands
Change "qcacld-3.0: Remove wext support for scan commands"
(I05ccc13d1b658e62b19a389e6a480707b5c446b9) removed most, but not all,
of the code that supported wext scan commands. Remove the remaining
wext scan support code.

Change-Id: Ib48c61956be1e90f981369083a910dba1bb5b77e
CRs-Fixed: 2093342
2017-08-18 19:07:30 -07:00
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