Commit Graph

216 Commits

Author SHA1 Message Date
Sravan Kumar Kairam
fece87f53f qcacld-3.0: Add HAL command support to set NS offload
Propagation from qcacld-2.0 to qcacld-3.0

Add support to enable/disable NS offload to firmware from HAL
vendor command.

As part of this fix when NS offload is set to disable from HAL
command, NS will not be offloaded when wlan goes to suspend state
even if NS offload is enabled in cfg ini.

Change-Id: Iffaaa9be2e62ea03fcbe3e32d2cc654d3e7334f5
CRs-Fixed: 954880
2016-08-27 15:55:34 -07:00
Kapil Gupta
7bad43148f qcacld-3.0: Update default value of gtraffic_threshold
gtraffic_threshold is needed to determine traffic condition for roam
scan.
Add changes to update default value of gtraffic_threshold in kbps.

Change-Id: I844903225ec178de7b88cf63b92531e46bdd9fe3
CRs-Fixed: 1056787
2016-08-27 15:51:55 -07:00
Abhishek Singh
5a33171128 qcacld-3.0: Fix scan failure issue due to stale PE session
qcacld-2.0 to qcacld-3.0 propagation

If roaming is initiated by firmware, after getting the candidate
list the CSR will start preauth with the candidates and thus
preauth will be the active command in SME.

Now if at the same time connect is issued from supplicant,
HDD will queue disconnect cmd in SME queue and wait for disconnect
to get complete for 2 sec. Now there is a chance that channel
change along with preauth timeout can take more than 2 secs.
In this scenareo the disconnect will timeout in HDD and will
return connect failure to supplicant. Next supplicant will issue
disconnect which is ignored by HDD as disconnect is already been
queued in SME. Now if supplicant again sends the connect command,
as part of connect command CSR will remove the disconnect command
from the SME queue and queue this connect command.

On preauth timeout the preauth state machine checks if disconnect
is queued and if it is queued it will abort preauth. But in this
case disconnect is removed by the connect request and thus preauth
retry continues and if preauth is success handoff will be queued
in SME queue.

Now the connect request is processed and if this connect request's
BSSID is same as the BSSID of the roam candidate, as all the CSR
states for this BSSID session indicate roaming, instead of
join it will try to reassociate and continue changing the CSR states
again. Eventually this connect will fail. Next the handoff command
is processed and as part of handoff it will try to cleanup
original session, but as CSR states are changed by connect request
the original session is not cleaned up properly. This results in
stale PE session entry which does not allow the scan to be sent to
firmware, returning the cached results and thus 0 scan results.

To fix this:
- Increase the WLAN_WAIT_TIME_DISCONNECT to 5 sec to make sure all
  sessions are cleaned up before allowing the new connect to proceed.
- Increase the priority of preauth scans.

Change-Id: Id7cc1e6f3c31df8a8c8955eb3ff48cb60e5b5ab2
CRs-Fixed: 1048394
2016-08-27 15:29:57 -07:00
Ravi Joshi
bb8d451c63 qcacld-3.0: Drop replayed multicast packets
Integration from qcacld-2.0 to qcacld-3.0

IPv6 Multicast (Neighbor Solicitation) frames are
not rejected by the WLAN driver when these frames
are bounced back from the AP. This causes network
stack to assume the duplicate IP address on the
network and fails to assign the IPv6 address.
Currently, this is a workaround till the issue is
root caused.

Change-Id: If5d48ed903f484805e7f4be9df52582e50bd6ce5
CRs-Fixed: 748105
2016-08-25 22:18:19 -07:00
Service qcabuildsw
896fbae52a Merge "qcacld-3.0: Set rx_mode to be NAPI for iHelium" into wlan-cld3.driver.lnx.1.1-dev 2016-08-25 12:22:37 -07:00
Manjunathappa Prakash
2721f942ff qcacld-3.0: Set rx_mode to be NAPI for iHelium
With the introduction of rx_mode ini config, gEnableRxThread and
gEnableNAPI configuration are obsolete. So remove them.

Change-Id: Ida8063eff86a644ebf9c494b94bcb3396b35b6e8
CRs-Fixed: 1056091
2016-08-24 16:25:21 -07:00
Arun Khandavalli
b2f6c26fa4 qcacld-3.0: Fixes for p2p from GUI/standalone
* From the GUI, After change interface, only stop
  and de-init of adapter was getting done.
  The interface to be changed was not getting started. So, start
  the adapter from the mode since the interface was already up in the
  P2P device mode before the change_iface, supplicant doesn't invoke
  interface up on the adapter again.

* In the standalone scenario, the interface up for the p2p0 comes 1st,
  as part of which the sme session shall be opened with sessionId 0.
  So, as part of indicating the management from to HDD, LIM layer tries
  to traverse the adapter list with the sessionId and since the wlan0 interface
  is also part of the linked list with the same sessid. It tries to send the
  management frames on the wrong interface index because of which frames were
  not reaching the supplicant. To migitate this issue, once the adapter is
  allocated, fill the session with invalid sessionId so that it can be updated
  with the valid sessionId once the session is created.

Change-Id: I63b320aea1eb779883dfa070bad3f2057fd5c371
CRs-Fixed: 1056344
2016-08-24 16:39:02 +05:30
Srinivas Girigowda
c34f11dfd8 qcacld-3.0: Add support to enable/disable packetlog using iwpriv
Add support to enable/disable packetlog using
iwpriv wlan0 pktlog command.

Change-Id: Ia17f659e16221985be5cd9e75ebf0c46f2dc5693
CRs-Fixed: 970647
2016-08-20 10:36:55 -07:00
Srinivas Girigowda
d9e6f7bb2f qcacld-3.0: Enable packet logging during driver init/re-init
Currently packet logging can be enabled by using the pktlogconf tool.
* Customers are not happy running the user program to collect the logs.
* There are chances of running pktlogconf between traffic.
* If packet logging is enabled after the issue has happened, we will
  miss the crucial debug info.

Hence introduce a mechanism to enable packet logging during driver load.

Change-Id: I3138e252e02009094d61150a55172b49f9fca4fd
CRs-Fixed: 970647
2016-08-20 10:36:53 -07:00
Amar Singhal
1851788cdb qcacld-3.0: Add a new ini item to control the INDOOR channels support
qcacld-2.0 to qcacld-3.0 propagation

Currently indoor channels are unconditionally set to
IEEE80211_CHAN_PASSIVE_SCAN in driver. Add logic to report INDOOR
channel as passive channel only when gindoor_channel_support is FALSE.

Change-Id: Iab55a394a28ff452c06c739f3fbd47506eda85eb
CRs-Fixed: 955272
2016-08-20 01:03:48 -07:00
Manjunathappa Prakash
b4ae4ab7b0 qcacld-3.0: Serialize the LRO manager array access
Serialize the LRO descriptor list modifications.

Change-Id: Ie40ccf274e6e44441a16ff3d6f36a3007b732c09
CRs-Fixed: 1056091
2016-08-19 18:33:29 -07:00
Mohit Khanna
fa99aea342 qcacld-3.0: Add USB bus support (HDD)
Add HDD specific changes for USB bus support.

CRs-Fixed: 1023663
Change-Id: I572a78cd9de1f7e531f300ced69a7eb51f4a167f
2016-08-19 18:33:16 -07:00
Kabilan Kannan
ff89f748c1 qcacld-3.0: Avoid race condition in antenna switch operation
qcacld-2.0 to qcacld-3.0 propagation

When the TDLS traffic flows continuously between the two
peers and if the antenna switch command comes from the
user, it creates a race condition and blocks the
antenna switch operation.
Add a new transition state in TDLS to avoid this race
condition.

Change-Id: I1c9b183c460e1401bd1ee2631489c57778ec665b
CRs-Fixed: 971505
2016-08-17 17:06:58 -07:00
Rajeev Kumar
dd3bc6012f qcacld-3.0: Add INI item to control BPF feature configuration
Add INI item to control BPF feature configuration.

Change-Id: Ia110916f5d657db6970f988dab5c3be55074c3bf
CRs-Fixed: 1055033
2016-08-17 17:06:43 -07:00
Nirav Shah
5e74bb81d5 qcacld-3.0: Parse tx packets only once in tx datapath
Classify tx packets at one place and store packet type in
skb cb structure to avoid multiple check to determine
packet type at various layers.

Change-Id: Id2ea9b08bdcbc62b1d96d983d19bcf71becc9c42
CRs-Fixed: 1022454
2016-08-17 17:06:28 -07:00
Nirav Shah
bd36b0690b qcacld-3.0: Changes to support different rx data path
Changes to configure different rx data path rx_thread,
RPS or NAPI through ini parameters. Also added support
for RPS mask setting using cnss-daemon.

CRs-fixed: 1026370
Change-Id: I23ab8fe0f05245b38cf4b37e93da8fd99d4c1f68
2016-08-17 17:06:26 -07:00
Manjunathappa Prakash
cf26ae6db3 qcacld-3.0: Serialize the freeing LRO descriptors
Add lock to serailize the freeing of LRO descriptors.
Without this double free of LRO descriptors lead to list
corruption.

Change-Id: I0b3c9ddecff0700ac1f6ec44f09c9ddf59997799
CRs-Fixed: 1053657
2016-08-13 18:27:29 -07:00
Naveen Rawat
64e477ea40 qcacld-3.0: Add support for 5/10 MHz for STA and SAP role
Add support for 5/10 MHz channel width for STA and SAP role. To
enable/disable feature, following ini parameter will be used:
 * gSub20ChannelWidth=0: indicates do not use Sub 20 MHz bandwidth
   this is also the default value.
 * gSub20ChannelWidth=1: Bring up SAP/STA in 5 MHz bandwidth
 * gSub20ChannelWidth=2: Bring up SAP/STA in 10 MHz bandwidth

Change-Id: Ic6d534dc1eae60fcd2fb7533c934b9ea28e6dd78
CRs-Fixed: 1013211
2016-08-13 14:07:29 -07:00
Manishekar Chandrasekaran
9e8c7be23d qcacld-3.0: Support for pre CAC on SAP for user requested channel
Add support for pre CAC on SAP for the user requested channel.
The reason for the requirement is to have SAP operations without
interruptions due to CAC. After starting SAP on the 2.4GHz
channel, the driver will start a pre CAC on the 5GHz DFS channel
requested. If no radar is detected, SAP is expected to switch
from the 2.4GHz channel to the DFS channel mentioned in the pre
CAC request. If radar is detected SAP will continue to operate on
the 2.4GHz channel. To provide the pre CAC channel to the driver,
vendor commands/attributes are used .

Change-Id: I4cf4bb5a861eea05f37fafb3bf35d327f5377aab
CRs-Fixed: 1045242
2016-08-13 14:07:02 -07:00
Arun Khandavalli
fae9294564 qcacld-3.0: Dynamic Mode changes
Currently MCL driver loads/unloads when user tries to
Switch On/Off from GUI and load process is different
for the static and dynamic built driver.
With this feature, we shall have a uniform behavior for
static and dynamic driver,  where the driver will be
loaded once and unload never.
Mode switch for different modes is supported via sysfs entries.

Change-Id: Ica49dd289d7f1f0ad0c56af76bd7bcfeca433a2e
CRs-Fixed: 1049218
2016-08-05 11:24:29 +05:30
Krishna Kumaar Natarajan
cc077c2264 qcacld-3.0: Update default INI config value for rm_capability
Update default INI config value for rm_capability to indicate
support for LCI capability.

Change-Id: Id5303ffc4004e58f6302f8692a15b8040231c3a4
CRs-Fixed: 1049333
2016-08-04 12:35:37 -07:00
Krishna Kumaar Natarajan
c1fa17d047 qcacld-3.0: Remove usage of typedef for oem related structures
Remove the usage of typedef for oem data request and oem
data response data structure.

Change-Id: I94f05833baa9b6baaf2272f63a33236437a96bbf
CRs-Fixed: 1038872
2016-08-04 12:35:36 -07:00
Krishna Kumaar Natarajan
73ea9f2259 qcacld-3.0: Remove oem data rsp passing over multiple layers
Remove oem data rsp passing over multiple layers.

This change set sends the OEM data response directly to
SME from WMA instead of going through LIM/MLM.

Change-Id: I3cff10ff7bdbcee39b39bd9ba03b5eff8444b017
CRs-Fixed: 1038872
2016-08-04 12:35:30 -07:00
Rajeev Kumar
a78a0a4578 qcacld-3.0: Add unit test framework to validate WLAN suspend/resume features
WLAN suspend/resume feature has tight dependency on APPS platform
suspend/resume support. On new targets APPS suspend/resume is not
supported until target is feature complete. In absence of APPS
suspend/resume support testing WLAN offload features become
difficult. Add unit test framework to test WLAN suspend/resume
features using private IOCTL command by simulating APPS
suspend/resume behaviour.

Trigger WLAN suspend:
iwpriv wlan0 wlan_suspend 0 0

To resume WLAN run a ping test from access point side and very 1st
ping request unicast packet should trigger wake up.

If FW is not waking up APPS then use below command to do a manual
wake up:

Trigger WLAN resume:
iwpriv wlan0 wlan_resume 0 0

This unit test framework is only for SNOC.

Change-Id: I177a0047f460aa2a305a9e4e46fbfaa94a81dced
CRs-Fixed: 1042205
2016-08-03 18:34:46 -07:00
Varun Reddy Yeturu
56054ec828 qcacld-3.0: Enable Dense environment Roaming by default
Enable the Dense environment roaming feature by default.
This feature would detect a dense environment dynamically
and modify the roaming thresholds to provide a smooth and
soft handoff behaviour for the user.

Change-Id: I2d234db947cb248214a9abcddd353c3dfe28ac1a
CRs-Fixed: 1044182
2016-07-29 18:15:07 -07:00
Kabilan Kannan
163fd0b20b qcacld-3.0: Add support for TDLS over P2P clients
P2P data traffic can be improved by creating TDLS
connection between two P2P clients.
Add changes in the host driver to enable TDLS
connection between two P2P clients.

Change-Id: I2a9fe21bb3be160428ab5d8f04281802faa5f21b
CRs-Fixed: 999560
2016-07-28 17:32:05 -07:00
Arun Khandavalli
a96c2c08ec qcacld-3.0: refactor hdd_wlan_get_version to be adapter independent
hdd_wlan_get_version is invoked with adapter as a parameter, internally
in the function it is used to extract the hdd context.

Directly pass the hdd context to hdd_wlan_get_version so that it shall
be adapter agnostic and clean up the local variables for the camelcase
and hungarian notion.

Change-Id: I56a8eea67354f9516b974db74aa42fbad37592a0
CRs-Fixed: 1035792
2016-07-28 15:34:49 +05:30
Arun Khandavalli
2358d52766 qcacld-3.0: Create new wrapper function for setting fw params
Once the adapter is opened, various parameters set to fw.
Create a wrapper function which will send all these parameters
to FW.

Change-Id: I1c31e4e2ce17dd296a0555653aec6ff75abf71d0
CRs-Fixed: 1017335
2016-07-28 15:34:24 +05:30
Arun Khandavalli
7e857c39f8 qcacld-3.0: Create different functions for the (de)initializing adapter
Create new wrapper functions for initializing the modes of the adapter
for the station, ap and FTM mode.

Create wrapper functions for the de-initialization of the STA/SAP adapter.

Change-Id: Ic22aca5b3f8c4e5f3a1e4d8f60bf6f95bbfeee14
CRs-Fixed: 1017332
2016-07-28 15:34:11 +05:30
Arun Khandavalli
4b55da70d6 qcacld-3.0: Refactor hdd callback (de)registration into a single function
As part of "load once unload never" architecture, cds modules can
be opened and closed several times. Refactor the hdd callback registration/
de-registration into hdd_register_cb/hdd_deregister_cb which can
be invoked during the open/close of the modules respectively.

Change-Id: I2da9018ff2fa6188e61e007c896bc13e8fddcb7d
CRs-Fixed: 1026817
2016-07-28 15:33:50 +05:30
Arun Khandavalli
c811dccdac qcacld-3.0: Create ini config structures for cds
Update ini configuration parameters for cds modules in the driver,
this helps in avoiding layer violation of using the hdd context in
cds modules.

Change-Id: Iff149cc51ea5eacae4f84d83c51d0ed63834ba50
CRs-Fixed: 1026817
2016-07-28 15:33:17 +05:30
Naveen Rawat
05376ee6c0 qcacld-3.0: Check for LFR3 to call appropriate API in hdd_reassoc
In hdd_reassoc check for LFR2/LFR3 before calling appropriate API
for reassociation.

Change-Id: I40e7de6dbc093e93053c12d4628b543b32cece6b
CRs-Fixed: 1044268
2016-07-28 15:31:59 +05:30
Varun Reddy Yeturu
3e91dad283 qcacld-3.0: Use Reassociation during BSS Transition
This is qcacld-2.0 to qcacld-3.0 propagation

The BSS transition request is handled by the supplicant.
The supplicant upon receiving the request will issue a
connect request to the driver with a hint of prev_bssid
telling the driver to perform a re-association.
Use this hint in the driver and initiate a re-association.
While doing the re-association, there is no need to do a
scan if the target AP is already present in the scan cache.
Optimize the re-association code to not do a scan if not
necessary in this particular case.

Change-Id: Idf1a7058009a8d2082bc1742dca1364cf59c405b
CRs-Fixed: 1010596
2016-07-28 15:31:44 +05:30
Anurag Chouhan
d939d3decd qcacld-3.0: Update correct authtype during connect
Currently the authtype is not getting updated properly in case
of wpa2psk security mode, this change will update the correct
auth type

Change-Id: I11d15457b375ed2803420cfd08070a7bbc181029
CRs-Fixed: 1044021
2016-07-20 07:22:58 -07:00
Arif Hussain
1969ec8bc9 qcacld-3.0: change dfs_radar_found to atomic variable
Instead of using separate lock to protect dfs_radar_found,
change variable itself to atomic.

Change-Id: If95e2ce5a0c837f36a92673312ea4d2fc7b96abe
CRs-Fixed: 1039447
2016-07-15 12:17:23 -07:00
Anurag Chouhan
5de8d17671 qcacld-3.0: Add BSS status caching
Add BSS status caching to get the BSS Information
when disconnect happens.

Change-Id: I41b74700b161277bc454d8bb8978f4e1e92faea8
CRs-Fixed: 1013475
2016-07-15 04:23:12 -07:00
Naveen Rawat
c45d162627 qcacld-3.0: Remove IBSS from MAX_IBSS_PEERS macro
Remove IBSS from MAX_IBSS_PEERS, since this is a generic macro.

Change-Id: Ic50205e84890e6a3bda603ad0f54bebfb2a727ea
CRs-Fixed: 1039559
2016-07-11 16:59:53 -07:00
Govind Singh
5b48620c03 qcacld-3.0: Add host changes for latest fw common changes
FW common files needs to be in sync with host and fw.
Add changes to compile successfully with latest version
of FW interface file.

Change-Id: I487a18185c406da5c2fb07e2a95cafe4793578aa
CRs-Fixed: 1012542
2016-07-08 06:12:10 -07:00
Varun Reddy Yeturu
e20ffc05d0 qcacld-3.0: Enable early stop scan by default
Enable the early stop scan feature by default and also
modify the default values as per the request from the
firmware

CRs-Fixed:  1036474
Change-Id: I0f2596633084ea97e64fb2c7d9975052d1ac98fb
2016-07-06 13:35:43 -07:00
Sandeep Puligilla
a8d4eec7d9 qcacld-3.0: Fix to avoid acquiring mutex in atomic context
Propagation from qcacld-2.0 to qcacld-3.0

When a radar is indicated from WMA to HDD,  it happens in a soft
irq context and the dfs_radar_found flag is set by acquiring
a mutex which leads to apps crash.  The crash happens if the mutex for
dfs_radar_found flag is being held by the main thread and as a result
the soft irq thread seeking the same mutex will be put in the kernel
sleep queue leading to apps crash as sleeping is not allowed in soft irq
context.

Fix the issue by using spinlock instead of mutexes.  An exception
has been made to use the spinlock in the main thread context to
work around the complications involving for radar indication
callback to happen in worker thread context instead of soft
irq context.

Change-Id: I4bc01ac8991c593ffcaf6ee532f4594cb8beba16
CRs-Fixed: 928394
2016-07-06 13:32:53 -07:00
Deepak Dhamdhere
a6d2f4cec4 qcacld-3.0: Process NDP data end indication
qcacld-2.0 to qcacld-3.0 propagation

Firmware sends an array of:
    {ndp instance id, vdev id, active ndp num, peer mac address}
for the NDP instances that are to be terminated.
Host driver deletes the peers that have 0 active ndp instances and
sends the entire list of ndp instance id's to the service layer.

Change-Id: I325843ce7fb8198466cb66ce66710cef999d4581
CRs-Fixed: 962367
2016-07-06 13:31:29 -07:00
Naveen Rawat
f28315cd66 qcacld-3.0: Add support for NAN Data End Request
This is qcacld-2.0 to qcacld-3.0 propagation.

Add implementation of NAN Data End request.

Change-Id: Iddd22a83b0763dab2e7398f4d2cf5b9ada58225a
CRs-Fixed: 962367
2016-07-06 13:31:24 -07:00
Deepak Dhamdhere
5872c8c1c2 qcacld-3.0: Fix __hdd_hard_start_xmit API for NAN Data Interface
qcacld-2.0 to qcacld-3.0 propagation

Make changes in __hdd_hard_start_xmit API registered with OS to enable
data path for NAN Data Interface.

Change-Id: I1d54c79da127b1dac7ea8c8e0e855e043571ad77
CRs-Fixed: 962367
2016-07-06 13:31:07 -07:00
Deepak Dhamdhere
0f076bd0db qcacld-3.0: Add support for NDP data initiator request
qcacld-2.0 to qcacld-3.0 propagation

Add host side changes to handle INITIATOR_REQ, INITIATOR_RSP,
NEW_PEER_IND and NDP_CONFIRM_IND to support NDP data initiator
request.

Change-Id: I10bf88d3fff27e1f842b720a598c923983c06c90
CRs-Fixed: 962367
2016-07-06 13:31:04 -07:00
Deepak Dhamdhere
f16015f89f qcacld-3.0: Enable ipv4/ipv6 address notification for NDI
qcacld-2.0 to qcacld-3.0 propagation

NAN Data Interface also supports ipv4 and ipv6 address notification
like any other netdev. Enable ipv4/ipv6 notifications for NDI mode.

Change-Id: I6ad281d9b3dce66db7bbfd198296d0d086ccf4fb
CRs-Fixed: 962367
2016-07-06 13:30:59 -07:00
Deepak Dhamdhere
8360d4c9d4 qcacld-3.0: Make ndp_ctx part of station context
qcacld-2.0 to qcacld-3.0 propagation

Make ndp_ctx part of station context, that way NAN data is assumed
to be another device role like P2P client and IBSS in the station mode.

CRs-Fixed: 962367
Change-Id: I93e2c14c59d4cbdfaadcd31e73fe0e3681843ce3
2016-07-06 13:30:56 -07:00
Deepak Dhamdhere
7e6016f928 qcacld-3.0: Add NAN datapath enabled flag to HDD context
qcacld-2.0 to qcacld-3.0 propagation

Add nan_datapath_enabled flag in HDD context to represent current
disable/enable state of NAN datapath feature.
Do not modify the .ini configured value because getConfig command
will show incorrect results.

Change-Id: Ib0b44168aca24802d8bd86b0665a1060ba3a1bf5
CRs-Fixed: 962367
2016-07-06 13:30:49 -07:00
Nirav Shah
ffc6a094b4 qcacld-3.0: Vote performance qos for high throughput use case
With WLAN use case, FPC(Fast Power Collapse) wakeup latency is
too long. Then some use case, FPC feature break performance.
To ensure CPU wakeup, if detected high throughput, vote for
performance qos not to activate FPC.

Change-Id: I4a8dca19ce32944769e85ba5beeae93bb49b29a9
CRs-fixed: 1026370
2016-07-06 13:30:30 -07:00
Krunal Soni
3091bcc07d qcacld-3.0: Remove deprecated gPolicyManagerEnable INI item
gPolicyManagerEnable INI item is no longer needed. Remove this
INI item and make policy manager code enabled by default.

Change-Id: I57822f47325c03e940b2802fb02900c64d3587e1
CRs-Fixed: 1034888
2016-07-06 13:30:12 -07:00
Krunal Soni
fd38f2365b qcacld-3.0: Remove deprecated gEnableM2MLimiation INI item
gEnableM2MLimiation INI item is no longer needed. Remove entire
code related to this INI item.

Also, remove all concurrency related code defined for emulation platform
within QCA_WIFI_3_0_EMU MACRO

CRs-Fixed: 1034888
Change-Id: Iccfd1dd2935634d2552f4eaa5cd9d3ab59a7596a
2016-07-06 13:30:09 -07:00