Commit Graph

617 Commits

Author SHA1 Message Date
Dustin Brown
3e61982239 qcacld-3.0: Fix FEATURE_AP_MCC_CH_AVOIDANCE compilation error
Fix a compilation error when FEATURE_AP_MCC_CH_AVOIDANCE is defined,
introduced by a previous commit.

Change-Id: Ic85b805f590ce5acc5cd0caeff107b8315baefaf
CRs-Fixed: 2019332
2017-03-23 21:33:21 -07:00
Jeff Johnson
560dc56d97 qcacld-3.0: Fix "no space before tabs" style errors
Automated code style checker detected multiple instance of "no space
before tabs," so fix those issues.

Change-Id: I93248e3cfafa047c4fa8c9553769f9457086d01a
CRs-Fixed: 2021507
2017-03-23 17:00:48 -07:00
Jeff Johnson
fe074c21c6 qcacld-3.0: WMA: Remove obsolete support for Class B stats
WMA currently has legacy code to support the tCsrGlobalClassBStatsInfo
data structure. 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 the support for these stats has been
removed from HDD.  So remove support for these stats from WMA.

Change-Id: I2e152cd55b54ed9f68bf85411fcfa4b95b5325a0
CRs-Fixed: 2021533
2017-03-23 17:00:44 -07:00
Jeff Johnson
19498d7e57 qcacld-3.0: WMA: Remove obsolete support for Class C stats
WMA currently has legacy code to support the tCsrGlobalClassCStatsInfo
data structure. 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 the support for these stats has been
removed from HDD.  So remove support for these stats from WMA.

Change-Id: I0614ed2660c886c7e61b0e87058a2f2e522580f3
CRs-Fixed: 2021526
2017-03-23 17:00:39 -07:00
Jeff Johnson
ad0b2c642f qcacld-3.0: Fix nonsense Class A stats field names
The qcacld-3.0 driver inherited the tCsrGlobalClassAStatsInfo data
structure from a prior version of the driver. This structure was based
upon the WDI firmware API used by older generations of hardware, and
this interface is not directly supported by the WMI interface used by
current generations of firmware. However "glue" code was introduced
which converts between the WMI data and this WDI-based representation.

When the glue code was introduced there were some parameters which
were supported by WDI but not WMI, and there were some parameters
which were supported by WMI but not WDI. Rather than remove the fields
for parameters not supported by WMI and add new fields for the
parameters only supported by WMI, for some reason the existing
WDI-only fields were repurposed. This fact is captured in WMA:
	/* rx_frag_cnt and promiscuous_rx_frag_cnt
	 * parameter is currently not used. lets use the
	 * same parameter to hold the nss value and mcs
	 * rate flags */
	classa_stats->rx_frag_cnt = node->nss;
	classa_stats->promiscuous_rx_frag_cnt = mcsRateFlags;

And leads to nonsense code such as the following in HDD:
	nss = pAdapter->hdd_stats.ClassA_stat.rx_frag_cnt;
	rate_flags = pAdapter->hdd_stats.ClassA_stat.promiscuous_rx_frag_cnt;

Rename these fields so that they match the data they hold, and remove
other legacy fields which are unused.

Change-Id: If04a8943ad90d796968c817ff5e634eec23c97f0
CRs-Fixed: 2021520
2017-03-23 17:00:35 -07:00
Krishna Kumaar Natarajan
0103ef8f7c qcacld-3.0: [11AX] Add changes for peer association
Add changes for 11ax peer association.

Add support for the following
 - update data structures to hold HE capabilities
 - setting up HE capabilities in the session
 - updating sta context with correct HE config
 - intersecting self and peer capabilities
 - update derivation of peer phymode to handle 11ax phymode

Change-Id: I46c7a7328d09e74bc0c5b25a67f6273d7eb04d30
CRs-Fixed: 1073481
2017-03-23 12:15:39 -07:00
Krishna Kumaar Natarajan
4f1d7724a8 qcacld-3.0: [11AX] Add dot11mode changes to support 11ax
Add new dot11mode and update the utility functions to derive
the dot11mode based on the userspace config, INI config and
FW capability.

Change-Id: I5780120ef7bc2b78fd596e937fe14a2c8ad88348
CRs-Fixed: 1073481
2017-03-22 09:09:29 -07:00
Sreelakshmi Konamki
075431a9f8 qcacld-3.0: Remove redundant MTRACE logs
This change includes to remove redundant MRACE logs
which are seen very frequent in MTRACE dumps and
remove multiple definition of WMA_SET_TX_POWER_REQ.

Change-Id: Ic5ac780ba3d31a8f2c6e4c10f7af5051864e7f3e
CRs-Fixed: 2020491
2017-03-21 16:15:12 -07:00
Archana Ramachandran
92b4bf1196 qcacld-3.0: Fix SBS is set to true by policy manager in SCC mode
SBS is always set to true by the policy manager. so for the second
connection, if the mode is not DBS, then SBS HW mode is selected.
Since SBS is not supported the second connection fails with invalid
HW mode error.

Change-Id: I817e83cbac194cdfde73a586491d645631692f12
CRs-Fixed: 2021512
2017-03-21 12:31:12 -07:00
Jeff Johnson
72f47475ef qcacld-3.0: WMA: Remove obsolete support for tCsrPerStaStatsInfo
WMA currently has legacy code to support the tCsrPerStaStatsInfo data
structure. 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 the support for these stats has been
removed from HDD.  So remove support for these stats from WMA.

Change-Id: I42ba6535ccfaed99df46d389cbb8ddd9d0f9261b
CRs-Fixed: 2020066
2017-03-21 09:47:59 -07:00
Jeff Johnson
dfd360e0fa qcacld-3.0: Redesign wma_get_stats_rsp_buf() buffer length logic
Currently wma_get_stats_rsp_buf() uses a loop to determine which mask
bits are set, and based upon the loop iteration count it determines
the size of the associated buffer. This calculation is fragile,
however, in that it tightly couples the loop iteration count and
eCsrRoamStatsClassTypes enumeration values. Since code under
development will be removing some of the eCsrRoamStatsClassTypes
enumerations, update this logic to remove the tight coupling.

Change-Id: Ia6cda4c8181c44d25a9da27acffe6bd10ca3b4ed
CRs-Fixed: 2020056
2017-03-21 09:47:56 -07:00
Krishna Kumaar Natarajan
d0bbb3c52f qcacld-3.0: [11AX] Add support in WMA to receive HE Capabilities
Add support in WMA to receive and store HE capabilities coming
from extended service ready event.

Add support to receive HE capabilities, convert into OTA type of
internal host structure and pass it to the uppper layer as target
config. Add utility funciton for the conversion as well.

Change-Id: If0ceeb3db74be6cf6893b8e74c710863bab8b41b
CRs-Fixed: 1073481
2017-03-18 16:00:03 -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
Varun Reddy Yeturu
1ce7affdda qcacld-3.0: Handle roam synch propagation failure
Handle Roam synch propagation failure properly.
Disable the roaming in progress flags in HDD.
Send a ROAM STOP command to firmware immediately.

Change-Id: I5f014ab79db553a1df758bf639362f26272a6a23
CRs-Fixed: 2020168
2017-03-16 11:21:33 -07:00
yeshwanth sriram guntuka
945b621a79 qcacld-3.0: Fix memory leak in lim_del_sta
Memory is not freed in lim_del_sta API when response
required is not enabled and wmi service
(WMI_SERVICE_SYNC_DELETE_CMDS) is enabled.

Fix is to free memory in wma peer delete handler.

Change-Id: I8d8a799935ad6199357b4a534e58d54dcbea8d2c
CRs-Fixed: 2015973
2017-03-16 00:55:48 -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
Varun Reddy Yeturu
88f123c804 qcacld-3.0: Ignore RSI if disconnect is initiated
Ignore the Roam Synch Indication from firmware if the
user space has already issued a disconnect before
receiving ROAM_START from firmware.

Disconnect might have cleared the roam profile and will be
sitting in the queue for the PE processing to happen.
If the disconnect is in the queue and a roam synch indication
is received, then check the CSR state from the first callback
of roam synch propagation and bail out there itself.

Disconnect will eventually send a ROAM_STOP command to the
firmware and it will cleanup

Change-Id: I528f552cd601dc9d23f709410115fb0af944899d
CRs-Fixed: 2018928
2017-03-14 23:40:51 -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
Dustin Brown
d5f1294562 qcacld-3.0: Acquire wakelock before sending VDEV_START
The host driver should not attempt to power collapse while pending
VDEV_START commands are in flight. Acquire a wakelock before sending a
VDEV_START request to firmware, and release it upon receipt of
VDEV_START response.

Change-Id: Iccca8ce4213b7527421f6b93fc4e08be9c31f471
CRs-Fixed: 2018066
2017-03-14 11:26:58 -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
Nitesh Shah
77442574ca qcacld-3.0: Allow burst scan when SAP is on DFS channel
When SAP comes up on DFS channel, then scan windows scans
only limited APs since NL scan cache will be flushed every
7 secs and scan results shall be read by the wpa_supplicant
only after the scan done indication.

The change is to allow burst scan when SAP is on DFS channel.

Change-Id: Ia1458cf4f4f868f2d0c36b2679118016fd966528
CRs-Fixed: 2017252
2017-03-11 23:21:23 -08:00
Abhishek Singh
e6857812fe qcacld-3.0: Fix for ROC cmd timeout issue with new scan module
When converged scan is enabled all the scan commands are queued to
serialization module from scan module and use struct
scan_start_request pointing to umac_cmd pointer.

Due to this if there is already an scan req going on and ROC is
queued driver fails to find ROC request in csr_get_active_scan_entry()
as the CSR try to interpret umac_cmd pointer as tSmeCmd.
And thus sometime ROC cmd times out.

Fix this by interpreting umac_cmd as struct scan_start_request for
scan cmd instead of tSmeCmd.

Change-Id: I6674a54b60d28d799188261b1e56b0c657c1ac19
CRs-Fixed: 2013212
2017-03-11 12:11:02 -08:00
Nishank Aggarwal
f3f2284d74 qcacld-3.0: Set different scan priority for p2p search and p2p listen
The p2p search should be preempted if there is p2p listen
requested by action frame tx. So p2p listen should always
have high priority than p2p search.

Change-Id: I551e95ab3381bcbf002e67478a82f8ef31b56b5b
CRs-Fixed: 2011260
2017-03-10 16:53:04 -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
Kapil Gupta
e92d91f8df qcacld-3.0: Fix invalid memory access issue in wma_tx_packet
tpSirMacFrameCtl points to tx_frame however after deletion of
tx_packet, tpSirMacFrameCtl pointer is not updated which is
causing invalid memory access.

Add changes to update tpSirMacFrameCtl once tx_frame got deleted.

Change-Id: Ifb10899f0a518a935641af88a7ef45b0a6fd293c
CRs-Fixed: 1103839
2017-03-10 05:14:12 -08:00
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
Kiran Kumar Lokere
1e8e4f0eb7 qcacld-3.0: Do not disable Qpower in suspend mode
Do not disable the Qpower in suspend mode.

Change-Id: I904f1ea4877482eff90599aa2d8f2fb676db0869
CRs-Fixed: 2002833
2017-03-08 22:05:38 -08:00
Dustin Brown
6bff24e2b9 qcacld-3.0: Reduce PNO wakelock timeout in perf builds
The Preferred Network Offload (PNO) wakelock protects Supplicant while
it configures the new scan results. The wakelock timeout should be
optimized as much as possible on production builds, as it is never
released by the driver. For additional power savings, reduce the timeout
of this wakelock in production builds compared to debug builds.

Change-Id: Iaccf56e00e933d3a216212ef219f31d28d022ea5
CRs-Fixed: 2016286
2017-03-08 20:03:45 -08:00
Dustin Brown
bbc9f318f1 qcacld-3.0: Increment PNO complete stats from NLO callback
Increment the pno_complete stats counter from the Network Listen
Offload (NLO) complete callback, in order to keep pno_match and
pno_complete stats synchronized.

Change-Id: I7ac7edeb3a10498549dceee1874c99ea3095f28e
CRs-Fixed: 2016236
2017-03-08 20:03:44 -08:00
Mukul Sharma
4c60a7ea5b qcacld-3.0: Add Suspend and Resume support in PMO
Add Suspend and Resume support in PMO.

Change-Id: Iba16643adf1cbd997138c740345e40c00c8e81f6
Crs-Fixed: 2015366
2017-03-08 13:00:46 -08:00
Dustin Brown
bf6d16bbf6 qcacld-3.0: Acquire wakelock before sending VDEV_STOP
The host driver should not attempt to power collapse while pending
VDEV_STOP commands are in flight. Acquire a wakelock before sending a
VDEV_STOP request to firmware, and release it upon receipt of VDEV_STOP
response.

Change-Id: Iac90fc249e9571090df6948ed931cc07b67e938d
CRs-Fixed: 2014496
2017-03-06 12:36:34 -08:00
Sandeep Puligilla
d000421944 qcacld-3.0: HDD changes for common scan module
HDD changes to support scan start and abort

Change-Id: I3260369879108f167453d5e0b8435c30ed729c5e
CRs-Fixed: 2013212
2017-03-06 11:54:30 -08:00
Sen, Devendra
154b3c4cc2 qcacld-3.0: Add host diag events for wlan disconnection state
Add new diag events for the wlan disconnection these
events will be used to inform the wlan disconnection scenario.

Change-Id: I6bdddb2d3f45deca2dc92a94e2abf59f46d7c38f
CRs-Fixed: 1108380
2017-03-06 03:38:39 -08:00
wadesong
bf66554532 qcacld-3.0: Check HT20 rate set for mcs index if HT40 rate flag is set
qcacld-2.0 to qcacld-3.0 propagation

When HT40 rate flag is set, it's likely that packets are sent in
HT20 rate, therefore, the driver need check HT20 rate set to
calculate mcs index.

Change-Id: I29022ec26d72a5361f152dc20af13783d0dac984
CRs-Fixed: 1027530
2017-03-04 09:45:58 -08:00
bings
6b3614ef4e qcacld-3.0: Fix FW crash caused by lack of rx reorder buffer
qcacld-2.0 to qcacld-3.0 propagation

In high latency, Firmware will trigger crash when no more reorder buffer
left. The number of prealloc reorder buffers depend on tid number, which
equals 4 * clients number, so reassign num_tids in wmi_resource_config to
4 * no_of_peers_supported as Firmware suggested.

Change-Id: If715cf201a283fa956b53dcdaccd534e57986fcb
CRs-fixed: 2003903
2017-03-04 09:45:53 -08:00
Padma, Santhosh Kumar
4eb7908901 qcacld-3.0: Wait for peer delete response from firmware
Currently driver does not wait for peer del response from firmware,
but posts del sta response indication to SME immediately. This
can cause an assert in firmware if driver receives add sta
immediately before even del sta response from firmware. Add
changes to wait for peer del response from firmware to fix
this.

Change-Id: I16a84256f4a1ed971c17eb3139faac5622eadda4
CRs-Fixed: 2008940
2017-03-03 13:13:04 -08:00
Mukul Sharma
f904723e33 qcacld-3.0: Remove Vdev_up from WMA iface node instead use objmgr vdev
Currently, WMA maintains vdev up flag but other component
also need this flag to check vdev up status. Hence as part of
this fix removing this flag instead using Objmgr Vdev mlme state
for same purpose.

Change-Id: If1922791e71c07621708755de67fbcc2f7a469cd
CRs-Fixed: 2014026
2017-03-03 13:12:57 -08:00
Padma, Santhosh Kumar
18169ce96e qcacld-3.0: Serialize WMI_ROAM_EVENTID to MC thread
Currently WMI_ROAM_EVENTID is handled in work queue context whereas
WMI_ROAM_SYNCH_EVENTID is handled in MC Thread context. This can
cause handling of WMI_ROAM_SYNCH_EVENTID followed by WMI_ROAM_EVENTID
if both events are received from firmware almost at the same time
which can result in setting roaming_in_progress to true even after
roam synch event handling and can block further scan requests.
Fix this by handling both WMI_ROAM_EVENTID and WMI_ROAM_SYNCH_EVENTID
in same MC Thread context.

Change-Id: I722cea54fa2126cb5d647f3a26371ca1c9a0f5a2
CRs-Fixed: 2014404
2017-03-03 13:12:55 -08:00
Hong Shi
b90718f3e7 qcacld-3.0: Add ini config for tx mgmt frame rate
qcacld-2.0 to qcacld-3.0 propagation

Add an ini option for configuring rate for tx mgmt frame.
It sets the existed wmi cmd: WMI_VDEV_PARAM_MGMT_TX_RATE right
after vdev created. Since FW resets mgmt during vdev up, also
set mgmt rate after sap/sta vdev up.

CRs-Fixed: 1103895
Change-Id: I93bbe0978963abf0b887dbf2add5bfc2912f6de1
2017-03-02 19:59:01 -08:00
Hong Shi
a9ef87198d qcacld-3.0: Add ini to disable abg rate for tx data
qcacld-2.0 to qcacld-3.0 propagation

Add ini config option to disable abg rate for tx data.

Change-Id: Ideb1fd6471c6fbdade99b4c7c533cb1bf3bf206c
CRs-Fixed: 1111787
2017-03-02 19:59:00 -08:00
Hong Shi
417824fc25 qcacld-3.0: add ini to configure HT max mcs
qcacld-2.0 to qcacld-3.0 propagation

Add support for configure host init HT rate upper bound.

CRs-Fixed: 1105357
Change-Id: Ic69a2d19ad1b3b835c83c7d666fb7821e42e8442
2017-03-02 19:58:58 -08:00
Padma, Santhosh Kumar
cd35f532e4 qcacld-3.0: Logging enhancements to LFR3 code
Add logging enhancements to LFR3 code

Change-Id: If8ea2c15a29889a22359911acc433f93691b9279
CRs-Fixed: 1106420
2017-03-02 16:15:55 -08:00
Manikandan Mohan
b0932ab0bf qcacld-3.0: Cleanup Vdev response timer on SSR
During SSR firmware is reloaded and FW responses for previous
vdev sessions are not received. Thus cleanup FW response timers
on SSR.

CRs-fixed: 2005625
Change-Id: I95e2d85b29da240d372039deeece9db6add74edb
2017-03-02 12:22:34 -08:00
Manikandan Mohan
b089ed654d qcacld-3.0: Check for SSR on fw timeouts
During SSR firmware is reloaded and FW responses for previous
vdev sessions are not received. Thus check for SSR before host
crash trigger on FW timeout.

Change-Id: I8be8b7264c133fa115a5b6ac6a3b865f7040e739
CRs-fixed: 2005995
2017-03-02 12:22:32 -08:00
Arun Khandavalli
cc544b3909 qcacld-3.0: Add support in driver to do sap restart during SSR
qcacld-2.0 to qcacld-3.0 propagation

Presently, during subsystem restart Host is sending sap restart
indication to framework(via carrier off) to do SAP unload/load.
But SAP restart functionality is removed in framework when the
carrier off event is received, leading SAP fails to come-up
after subsystem restart.

Add support in driver to do SAP restart internally without sending
restart indication to framework, during subsystem restart.
This feature is controlled by ini param 'gEnableSapInternalRestart'
and by default it's enabled.

Change-Id: I76cb73c1887d4d8124cd9a1c29b9aac47642072a
CRs-Fixed: 1105651
2017-03-02 12:22:27 -08:00
Sreelakshmi Konamki
89f6ff8bd2 qcacld-3.0: Remove unnecessary log in wma_peek_vdev_req()
Fix to remove unnecessary log in wma_peek_vdev_req().

Change-Id: I40a2e74c8300904d5750d3d5f7af3e4797fa21f4
CRs-Fixed: 1102379
2017-03-02 10:03:53 -08:00
Dustin Brown
5409643f2e qcacld-3.0: Allow iface pause override for unit test suspend
For testing purposes, expose the ability to override the interface pause
setting sent to firmware during WoW enable. Relatedly, allow userspace
to specify which wakeup trigger firmware should use, instead of assuming
HTC wakeup.

Change-Id: I265ccef7ca5304c94bcb5ff2eb9a3d35cfa74191
CRs-Fixed: 2011131
2017-03-01 14:09:21 -08:00
Mukul Sharma
3d36c391b2 qcacld-3.0: Add support for gtk offload PMO component
Add support for gtk offload in PMO component.

Change-Id: Ia5ea2daf873ad481f51e2d1cf24441a8c1d93476
CRs-Fixed: 2005114
2017-02-28 16:21:43 -08:00
Mukul Sharma
3ba26b8747 qcacld-3.0: Add support for arp/ns offload in PMO component
Add support for arp/ns offload in PMO component

Change-Id: I823ba0a426cce5a5717cf2b693b49c8f8a2f7a29
CRs-Fixed: 2002639
2017-02-28 16:21:40 -08:00