Commit Graph

1532 Commits

Author SHA1 Message Date
Manjeet Singh
1a376cea13 qcacld-3.0: Pass proper values to bit manipulation methods to avoid panic
qcacld-2.0 to qcacld-3.0 propagation

Observed kernel panic due to improper arguments passed to kernel bit
manipulation functions (like set_bit, clear_bit etc.) i.e these
functions expects bit positions as its first argument but bit mask
values are being passed.

To fix these issues ensure below points:
   - Pass bit position as a first argument to bit manipulation
     functions.
   - Re-define MACROs which gives false impression of bit mask values
     with their naming convention.

Change-Id: Ief8cd83b05f01a0926f91c0e9fb461ddd498e05e
CRs-Fixed: 981050
2017-03-21 13:25:06 -07:00
Jeff Johnson
dfe895154b qcacld-3.0: HDD: Remove obsolete support for SME_PER_STA_STATS
HDD currently requests SME_PER_STA_STATS in a few of its legacy ioctl
handlers. However these stats were specific to the WDI firmware API
used by older generations of hardware, and this interface is not
supported by WMI. In addition HDD doesn't actually do anything with
the data returned. So remove support for these stats from HDD.

Change-Id: I070685a0ca2b9c53b93c1f950eab97ea65f43f1e
CRs-Fixed: 2020065
2017-03-21 09:47:58 -07:00
Nitesh Shah
99dd95556b qcacld-3.0: Send Deauth and delete all TDLS stations
This change addresses sending Deauth to TDLS peers,
delete TDLS stations and clear hdd structures if
concurrency is detected.

Change-Id: Ia9f6724a9db20c6d9ebfc2fa735569305f35f084
CRs-Fixed: 2022489
2017-03-21 06:12:14 -07:00
Naveen Rawat
910726a844 qcacld-3.0: MCL changes for WIFI Positioning component
Implement MCL changes to use new WIFI POS component APIs

Change-Id: Ifccc7f6e9c614570de758fde3a23b63ee5f387d7
CRs-Fixed: 2003488
2017-03-21 01:10:21 -07:00
Jeff Johnson
b7a168b658 qcacld-3.0: Correctly handle update of scan IEs
Excessive logging of the following error message was observed:
__wlan_hdd_cfg80211_scan: Update scan IEs with default Scan IEs failed

This message was being printed because wlan_hdd_update_scan_ies()
returns an error code when no default scan IEs have been configured.
But this is a valid scenario, so modify wlan_hdd_update_scan_ies()
to return success (0) when no default IEs have been configured.

Change-Id: I4b9dc1d38d38d326861b7c95d13b891cb0d0c522
CRs-Fixed: 2013531
2017-03-20 23:56:59 -07:00
Naveen Rawat
7df318650c qcacld-3.0: Introduce ini knob for wifi pos logging
Add ini param qdf_trace_enable_wifi_pos to control WIFI_POS logging
level from config.ini

Change-Id: I9baa59448b9badaae94193bd7367a104309d0a1a
CRs-Fixed: 2003488
2017-03-20 23:56:57 -07:00
Naveen Rawat
dd76180765 qcacld-3.0: Remove nl_srv_ucast_oem from wlan_hdd_oemdata.c
This API is moved to qcacmn as part of WIFI_POS convergence.
Remove this API from MCL code include necessary header file
for API.

Change-Id: I8622d0bbfd90c7aee5630aaa3e6e3540dfc9df9b
CRs-Fixed: 2003488
2017-03-20 11:38:13 -07:00
Padma, Santhosh Kumar
8392fb49c6 qcacld-3.0: Invoke sme_dhcp_done_ind in all states
Currently driver drops RRM request before completion of DHCP.
Driver uses global variable dhcp_done to check completion of DHCP.
In static IP case, there is a chance that sme_dhcp_done_ind be
invoked before connection. Hence there is a chance that global
variable dhcp_done may not be set. This can cause driver to drop
RRM requests forever in static IP scenarios.

Invoke sme_dhcp_done_ind in all states to allow processing of
RRM requests in static IP scenarios as well.

Change-Id: I20e07eea7a66e7f3336dd783b9533ff642721209
CRs-Fixed: 2021041
2017-03-20 07:05:20 -07:00
Krishna Kumaar Natarajan
ed1efd9653 qcacld-3.0: [11AX] Add support in HDD to update HE Capabilities
Add support in HDD to update 11ax - High Efficiency(HE) Capabilities
received as part of the target configuration.

Add support for new WNI_CFG global config parameters to be
used for implementing 11AX standard.

Change-Id: I3f0d3af2369157c657ac59676a434dc794f84b19
CRs-Fixed: 1073481
2017-03-18 16:00:05 -07:00
Tushnim Bhattacharyya
6796d8df5e qcacld-3.0: Enable Policy Manager logging
Enable logging from new policy manager component.

Change-Id: I538b70d7261573a1673386a3984f6a5a821c70f2
CRs-Fixed: 2009818
2017-03-17 15:39:17 -07:00
Naveen Rawat
222b2e9b58 qcacld-3.0: Set Band Capability ini config to PSOC user config
Set Band Capability ini config to PSOC user config. This can later
be used in UMAC component.

Change-Id: I9044cec35cdb478881b827101ee79bcf87084d73
CRs-Fixed: 2003488
2017-03-17 14:49:32 -07:00
Dustin Brown
dba48c8d9d qcacld-3.0: Add debug prints to catch session_id/vdev_id desync
When HDD detects that the session id and vdev id have de-synchronized,
print the PSOC reference tree and induce a crash.

Change-Id: I1ca47837cd024fd66e19d86222cfbbd85e3f5704
CRs-Fixed: 2020092
2017-03-17 11:11:09 -07:00
Sreelakshmi Konamki
33a0231baf qcacld-3.0: Remove redundant ini configuration
qcacld-2.0 to qcacld-3.0 propagation

'apDataAvailPollPeriodInMs' ini is redundant in registry table and
hdd_update_config_dat().

Fix to remove redundant ini 'apDataAvailPollPeriodInMs' variable.

Change-Id: Ieb5214ec3052bbec793e91d294b03e425292e348
CRs-Fixed: 2000336
2017-03-17 08:48:24 -07:00
Poddar, Siddarth
a5075466e4 qcacld-3.0: Drop the pkt if deauth is in progress
When SAP initiates deauth/diassoc for peer device, it sets
isDeauthInProgress flag. So, if host receives tx packets
for peer from network layer or ipa path while peer remove
is in progress, then drop the tx packets at hdd level
in __hdd_softap_hard_start_xmit based on above flag check.

CRs-Fixed: 2016092
Change-Id: I52c3bcd92478eb657bdd90d15eb13d1cd95ee090
2017-03-17 06:35:36 -07:00
yeshwanth sriram guntuka
e345b66378 qcacld-3.0: Fix double peer clear during disconnect
wma_remove_peer does clear peer as part of disconnect.
hdd_roam_deregister_sta also does clear peer which results
in clear peer failed error message.

Fix is to avoid clear peer again in disconnect handler.

Change-Id: I0399a81779aad87201cb67e070421ec549b2d837
CRs-Fixed: 2019168
2017-03-17 05:37:36 -07:00
Abhishek Singh
897b27a745 qcacld-3.0: Don't send reg hint during start modules after PDR
After PDR driver send regulatory hint with the same country code
which was already set by driver before PDR. As part of regulatory
hint kernel remove the custom regulatory flag from wiphy flags
and as in this case country has not changed, no reg notifier is
called and thus wiphy flags are not restored by driver.
Due to this if user set an country the channel flags and power
are not reset and 5Ghz channels remain Passive.

To fix this don't send reg hint during start modules if
init_by_driver flag is set.

Change-Id: I126465aa91f40df5c92da44361f414a7792e927f
CRs-Fixed: 2019049
2017-03-17 04:59:18 -07:00
Abhishek Singh
cfb4448302 qcacld-3.0: Fix compile errors when WLAN_FEATURE_11W is disabled
Fix compilation errors when WLAN_FEATURE_11W is disabled.

Change-Id: I5bed89f0077a51117c57e176568f849293d40ee5
CRs-Fixed: 2019223
2017-03-17 04:59:16 -07:00
Wu Gao
2ae0b59e42 qcacld-3.0: Save qdf device to soc object
It need qdf device if send mgmt frame. But host common can not access
legacy codes. Save it to soc object.

Change-Id: Ib943c5f3356e02b946ad1d30838d464e36dd643f
CRs-Fixed: 2014648
2017-03-17 16:43:39 +08:00
Nitesh Shah
49f5390c82 qcacld-3.0: Acquire mutex before accessing p2p context
Every access to remain_on_chan_ctx need to be protected
with mutex lock.

This change refactors the code in the function wlan_hdd_
cancel_existing_remain_on_channel() and wlan_hdd_cancel_
pending_roc().

Change-Id: Ie4551ab7cc4297f04ea2980aff7e613f6d3d2bb6
CRs-Fixed: 2020554
2017-03-16 07:00:28 -07:00
Wu Gao
e960db6cb8 qcacld-3.0: Add os interface to vdev
Some of cfg80211 callbacks need os structure wireless_dev. Pass it to
vdev object when creating.

Change-Id: I360f5a6d205dfa223139b7ca0de8e567146770f7
CRs-Fixed: 2014563
2017-03-16 06:20:26 -07:00
Dustin Brown
9ef609b196 qcacld-3.0: Fix unit-test suspend regression
A previous commit failed to propagate WoW enable parameters down to
the Power Management Offload (PMO) component. Propagate WoW enable
parameters to the PMO component to restore unit-test suspend
functionality.

Change-Id: I6531a262a189b416499953bc013efdf64111ac5a
CRs-Fixed: 2020034
2017-03-15 18:26:41 -07:00
Arif Hussain
15115cb9b8 qcacld-3.0: Add support for delay_start_time in scheduled scan request
Add support to pass delay_start_time to firmware, this delay will be
used before starting the first scan cycle.

Change-Id: Ia3043eecc38507b1581fa85b8787b2e7786017de
CRs-Fixed: 2014142
2017-03-15 15:22:41 -07:00
Ashish Kumar Dhanotiya
147860eb6a qcacld-3.0: Decrease default waiting timer value for interface up
Currently default waiting timer value is 100 sec which is too large,
change the timer value to 15 sec.

Change-Id: If116f9ace2e2c0c41438c4be9c9fa834ae9e4a60
CRs-Fixed: 2019739
2017-03-15 09:16:22 -07:00
Abhishek Singh
257a9483f6 qcacld-3.0: Add support to update the def scan params from INI file
Add support to update the scan params depending on the values in
INI file

Change-Id: Idebc7e6c02bc6a7405b33a9f99c1e5186341c494
CRs-Fixed: 2013212
2017-03-15 04:26:47 -07:00
Ashish Kumar Dhanotiya
f998a58976 qcacld-3.0: Change default fw log mode
Set default fw log mode to 1, which will re-direct fw logs to WMI.

Change-Id: Iec2d344bf3a419858fb92950bc234b5d1576c3d9
CRs-Fixed: 2007175
2017-03-15 02:19:16 -07:00
Mukul Sharma
72ffb7e14b qcacld-3.0: Free wow params as apart of the suspend/resume
Free wow params as apart of the suspend/resume.

Change-Id: I6a3ab9098704cfd7e7d270b0a77f0521ae9d9ce9
CRs-Fixed: 2019140
2017-03-15 01:03:11 -07:00
Jeff Johnson
0d26ae673f qcacld-3.0: Fix HDD scan cleanup issues
While addressing the issue fixed by change "qcacld-3.0: Cleanup scan
queue during driver unload" a couple of issues were observed in the
HDD scan cleanup code:
1) list node was directly typecast to hdd_scan_req instead of using
   container_of() operation.
2) hdd_scan_req_q_lock spinlock was not being destroyed.

Address these issues.

Change-Id: I6d1e7f5a78848d43e62f893b82f538b960ea0609
CRs-Fixed: 2018045
2017-03-14 22:23:36 -07:00
Jeff Johnson
f337b0c176 qcacld-3.0: Cleanup scan queue during driver unload
The following assert was observed during driver unload:
  QDF ASSERT in qdf_list_destroy Line 90
  PC is at hdd_scan_context_destroy+0x4c/0x78 [wlan]

There was also an associated memory leak detected:
 memory Leak@ File core/hdd/src/wlan_hdd_scan.c, @Line 562, size 48
 memory Leak@ File core/hdd/src/wlan_hdd_scan.c, @Line 2284, size 584

The issue is that the scan cleanup routine, hdd_cleanup_scan_queue(),
is currently only called during SSR and is not being called during the
driver unload sequence. Update the unload sequence to call this API.

Change-Id: Ib398a528cbb504bc132d985a0fa8c2a772d44332
CRs-Fixed: 2018045
2017-03-14 22:23:35 -07:00
Ashish Kumar Dhanotiya
ff4e1c4bc4 qcacld-3.0: Check module status before processing driver command
If the driver module is closed do not process the driver command,
it will lead to a crash by accesssing uninitialized lock.

To handle this issue check the module status before processing
driver command and if module is closed, simply return error.

Change-Id: Ic651e1abdf6b2efa27e57695c04ace249f9d21bb
CRs-Fixed: 2018746
2017-03-14 20:22:17 -07:00
Selvaraj, Sridhar
4f684bbaf2 qcacld-3.0: Add "g_enable_bcast_probe_rsp" INI and pass it to firmware
Add "g_enable_bcast_probe_rsp" INI and pass the configured value
to firmware for STA vdev as part of vdev attach. Based on this INI,
firmware will send the dwell time IE in probe request.

Change-Id: I446c7d7589534688e04579ed434de0803ed8b4ff
CRs-Fixed: 1113498
2017-03-14 12:57:54 -07:00
Selvaraj, Sridhar
046d77d673 qcacld-3.0: Add support to use generic netlink sockets for userspace apps
Currently user space communication functions[cnss diag, PTT socket app]
in host driver uses netlink user sockets which is a security concern from
Linux Android SE policies.

Add support for to use netlink family cld80211 which uses generic
netlink sockets.

Change-Id: I4ea49ac6d7c9381212c93567fdc40f90e04dfba4
CRs-Fixed: 1112784
2017-03-14 00:13:31 -07:00
Dustin Brown
a13cf0d2b5 qcacld-3.0: Change default value of gFwDebugModuleLogLevel
Update the default value of gFwDebugModuleLogLevel as per the request
of the firmware team.

Change-Id: I7d0c45689b962d39c5f9371a10f6da690129de99
CRs-Fixed: 2013439
2017-03-13 15:19:27 -07:00
Dustin Brown
13995f0efc qcacld-3.0: Add gActiveBpfMode ini item
Active Mode Berkeley Packet Filter (Active BPF) is a new feature that
allows firmware to apply BPF even while the Apps processor is active.
There are 3 modes:
 * Disabled: do not apply BPF in active mode
 * Enabled: apply BPF to all packets in active mode
 * Adaptive: apply BPF up to some threshold to avoid performance impact

Add an ini item called gActiveBpfMode to configure the Active BPF Mode
in firmware.

Change-Id: I6cf60d67238802fe1e1662c040910091f5c25bec
CRs-Fixed: 1111400
2017-03-13 14:41:00 -07:00
Dhanashri Atre
09828f1c91 qcacld-3.0: Hash based rx steering
This change includes adding hooks in the data path to
send WMI command to enable LRO or/and configure a hash
seed value

Change-Id: I3f068307f7669c4ff8baa5102e9fb7729d4a348d
CRs-Fixed: 1094775
2017-03-13 14:01:55 -07:00
Varun Reddy Yeturu
c13305eeac qcacld-3.0: Do not take a reference to bss when disconnect is deferred
Propagation from cld3.0-1.1 to cld3.0-2.0

Do not indicate the roam event to user space if disconnect is
deferred, since it will soon be honored and a disconnect event
will be sent to the user space. Do not reference the kernel bss
data as well when disconnect is in progress.

Change-Id: I0b76a2af021efe0e1c8693c4e5908ed576770813
CRs-Fixed: 2017409
2017-03-13 09:53:00 -07:00
Nitesh Shah
9a66f94f30 qcacld-3.0: Remove updating fw tdls state while deleting tdls sta
FW TDLS state supports single TDLS context. TDLS context in FW
does not need to be deleted while deleting TDLS sta in the host.
If FW TDLS state update comes for one vdev while TDLS context
is already present for other vdev, then FW will crash.

The change is to remove updating FW TDLS state while deleting
TDLS sta. This change also address cleaning up TDLS peer from
lim while informing to supplicant.

Change-Id: I300388def5052180d330cc82553085538e80202e
CRs-Fixed: 2013151
2017-03-13 17:42:42 +05:30
Hong Shi
b707b05cc0 qcacld-3.0: Fix compilation error when TDLS macro disabled
Currently, 3 non-tdls ini config options are wrongly merged inside
TDLS macro when auto propagation from CLD2.0 to CLD3.0. Move the ini
configs outside of TDLS macro.

Change-Id: I1ee784519c2197b4dc3f0119fb3a9f379fe7288b
CRs-Fixed: 2016679
2017-03-13 00:37:07 -07:00
Varun Reddy Yeturu
a578414c8a qcacld-3.0: Handle disconnect requests during LFR3 roaming
Propagation from cld3.0-1.1 to cld3.0-2.0

Upper layer can send cfg80211 disconnect command anytime in the life
of a connection. It arrive when firmware roaming may have started,
completed, failed, etc. Processing of roam events may collide with
processing of disconnect command in the host driver.

Defer the hdd disconnect command if roaming has started. Upon completing
roaming send the deferred disconnect command to sme which will
eventually complete the requested disconnect.

If disconnect is deferred during roaming, then do not send the
new roam event to supplicant since it is not expected and upon
honoring the disconnect later, a disconnect event would be
sent to supplicant.

Remove the earlier workaround done to send a try again error message
to upper layers upon receiving a disconnect request when roaming
is in progress

Firmware can now handle the ROAM_SCAN_OFFLOAD_STOP command even
if it is in the middle of roaming operation. Hence remove this
check in SME.

Add LFR3 roaming state to the cds_is_connection_in_progress API since
it currently captures only LFR2 roaming states.

Change-Id: Id352d94b41f0766889ceebd0b57b2c566ce3ca42
CRs-Fixed: 1114853
2017-03-12 21:40:17 -07:00
Dustin Brown
0a4cfeb33d qcacld-3.0: Enhance gEnableSifsBurst for legacy mode
Enhance gEnableSifsBurst to support legacy mode for 11n certification
	0 - disabled
	1 - enabled, but disabled for legacy mode
	3 - enabled

propagation from qcacld-2.0

Change-Id: Ia0a21cec25ce46b3ef2ed0ee8d4e4682558da468
CRs-Fixed: 2018162
2017-03-11 00:52:29 -08:00
Jeff Johnson
688f475de9 qcacld-3.0: Remove unused scanevent from hdd_wext_state_t
Currently struct hdd_wext_state_s (typedefed as hdd_wext_state_t)
contains the field "qdf_event_t scanevent". This event is created, but
beyond that it is never used. Since this object is obsolete, remove
it.

CRs-Fixed: 2017476
Change-Id: I7bd4290e1b4d0df069e8e6e6c9347c1ac3c01c63
2017-03-10 16:10:07 -08:00
Jeff Johnson
920b8ee5bf qcacld-3.0: Remove unused completion_var from hdd_wext_state_t
Currently struct hdd_wext_state_s (typedefed as hdd_wext_state_t)
contains the field "struct completion completion_var". This completion
object is initialized, but beyond that it is never used. Since this
object is obsolete, remove it.

Change-Id: Ibebd7b4d1e8879b4de223a8be4bab2ca0d2fc165
CRs-Fixed: 2017354
2017-03-10 16:10:05 -08:00
Kapil Gupta
957827b875 qcacld-3.0: Add monitor time for PER based roam
Curretly FW considers minimum time of hysteresis for PER based roam as
constant value which is 25 seconds.

Add changes to make this configurable using ini.

Change-Id: I1a985594d515f42d1aaca8e4ef174fb29b51586a
CRs-Fixed: 2005849
2017-03-10 07:19:20 -08:00
Kapil Gupta
6e6c26b06e qcacld-3.0: Disable PER based roaming by default
Add changes to disable PER based roam by default.

CRs-Fixed: 1114094
Change-Id: I52768029d3ccf007b7d9999e796de3366ac0ae35
2017-03-10 07:19:19 -08:00
Kapil Gupta
5cda2251d6 qcacld-3.0: Changes for PER based roaming
DUT should be able to roam to a better access point if current
AP is having congestion/packet error.

This roam also devise a new selection logic for candidate
selection which considers channel congestion and AP capabilities.

Change-Id: I39594e37bd209be2603a4636514e2c9b1a907761
CRs-Fixed: 1090934
2017-03-10 07:19:17 -08:00
Mukul Sharma
9223f23020 qcacld-3.0: Pass suspend/resume ini params to PMO
Pass suspend/resume ini params to PMO.

Change-Id: I2997e101524355645f13eaf5726e57bfd5ccd2a1
Crs-Fixed: 2016634
2017-03-10 06:40:55 -08:00
yeshwanth sriram guntuka
a1ba9a2bfc qcacld-3.0: Downgrade WMM AC for data frames for invalid tspec
As per the current implementation wmmAcTspecValid is reset during roaming
and set after establishing TSpec but currently wmmAcTspecValid is not
considered before classifying the data frames based on AC and UP.
Due to above issue after roaming we are still sending packets with UP
for which tspec session is not established.

Fix above issue by checking wmmAcTspecValid for AC before
classifying the frame.

Change-Id: I37039fa568696f0861b02d094c3a513dbc2b9967
CRs-Fixed: 915555
2017-03-10 03:06:19 -08:00
Selvaraj, Sridhar
1ffa0ec5d7 qcacld-3.0: Add complete wlan_start_comp at hdd_wlan_startup
As part of I707054c44a882f6dd4a4a9df2b6821b93b724f7a, completion
of wlan_start_comp variable is removed at hdd_wlan_startup,
that leads to timeout crash waiting for driver registration.

Add complete wlan_start_comp at hdd_wlan_startup.

Change-Id: I2e80465cd1ec66b9330b8f6e9b11fd14076035eb
CRs-Fixed: 2017668
2017-03-10 10:07:41 +05:30
Kiran Kumar Lokere
7006e0ad76 qcacld-3.0: Disable Qpower with UAPSD or max ps-poll enabled
Disable Qpower when UAPSD is enabled or if the max ps poll is
configured by user.

Change-Id: If9c747406d65a6f89fa123592c3f9d79724b8ae0
CRs-Fixed: 2017432
2017-03-09 17:09:31 -08:00
Dustin Brown
b6b0f18937 qcacld-3.0: Add ini for station keepalive method
Add an ini item for configuring the keepalive method used by station
interfaces.

Change-Id: Id44773f5ae7f7ad1ad9441592512ab3e2ce3a076
CRs-Fixed: 2016799
2017-03-09 11:02:29 -08:00
Arun Khandavalli
8a711cbd49 qcacld-3.0: update timestamp of bss while informing frame to kernel
Inform the bss using the new API cfg80211_inform_bss_frame_data() which
also has the ability to inform the timestamp when the frame has
been received.
If the support is not present in the kernel fallback to the legacy
inform bss.

Change-Id: Iaa512248a5e56d77cff39da562e0c9ee4eaeeefd
CRs-Fixed: 1082423
2017-03-08 23:55:09 -08:00