Commit Graph

3361 Commits

Author SHA1 Message Date
Manoj Ekbote
525bcabbb7 qcacmn: Clean up desc pool during soc detach
During soc detach, free the memory allocated for
link desc pool. This will return the 2 MB regions to
buddy allocator.

Change-Id: I1f1929525cf1d5de32321d56ec947969bebfeb93
2017-09-11 15:37:00 -07:00
psimha
a079b8c678 qcacmn: Deregister HIF ext groups on rmmod
- Deregister & free the hif ext ctx when detaching DP interrupts.
- Unregister the hotcpu_notifier during rmmod.

Change-Id: Icbd3c6cee70b6b224059a4b301b9840485a96d11
CRs-Fixed: 2086729
2017-09-08 19:40:02 -07:00
Houston Hoffman
579c02f570 qcacmn: Provide special sleep_state_adjust api for srng based targets
current pci version of sleep_state_adjust is not supported on srng based targets.

Change-Id: I6ff0c78681cc15c677b6458b3a7d8b571a051925
CRs-Fixed: 2090590
2017-09-08 18:57:10 -07:00
Abhijit Pradhan
382c50fff7 qcacmn: refactor DFS code Part-I
Reduced the max indentation level to five.
Spilt functions to several smaller functions.
Only a few functions were split
in this commit. Rest need to be done in future commits.

Change-Id: I1c9dcf3ae12edef6bcce37023f93d062705e0142
CRs-Fixed: 2098511
2017-09-08 16:47:36 -07:00
Om Prakash Tripathi
4d23cd7886 qcacmn: Add support to fetch min and max tx power
Add support to fetch min and max tx power from target for
a given set of mcs, nss, chainmask, bw, and other rate flags.

Change-Id: Iafe082db81503a52bdc704d4b71d86d23788fddb
CRs-Fixed: 2061802
2017-09-08 15:46:56 -07:00
Sreelakshmi Konamki
77dd1efb64 qcacmn: Add support for PNO scan in connected state
qcacld-2.0 to qcacmn propagation

Add changes to support PNO scan in connected state to find better Ap's
based on rssi threshold, band and rssi preference.

Change-Id: I0744297cc5269f0fe37613247c911102e293d8e9
CRs-Fixed: 2000342
2017-09-08 15:46:55 -07:00
Tushnim Bhattacharyya
3734a9d2b8 qcacmn: Update PCL table for non DBS to give SCC preference
Update the non DBS PCL table to give preference to SCC.

Change-Id: I9d2d982f367bf6fb8d18e4d448fa0c45e95cbbf4
CRs-Fixed: 2063060
2017-09-08 14:28:02 -07:00
Tushnim Bhattacharyya
818d59f91a qcacmn: Strip out the DSRC channels while getting valid channel list
Strip out the DSRC channels while getting valid channel list from sme.

Change-Id: I540869a01dbc045033ba1e3623c3d237b1e5a54c
CRs-Fixed: 2063060
2017-09-08 14:28:01 -07:00
Jeff Johnson
4e0ea80390 qcacmn: Remove cds_ctx param from register_ocb_peer()
The cdp_peer_ops register_ocb_peer() method currently takes a cds_ctx
parameter. Converged datapath APIs should not require the MCL-specific
CDS context, and in fact it is not required by the MCL implementation,
so remove it from all OCB peer registration APIs.

Change-Id: I8ebb49713b26ef5bbf25cc7e4b09b1b29e579844
CRs-Fixed: 2103450
2017-09-08 03:57:25 -07:00
Subrat Mishra
c15357faae qcacmn: Add API to get pdev vdev count
Add API to get vdev counts of pdev.

CRs-Fixed: 2101491
Change-Id: I320aaecb5c13e5ecfef4623d4df35c9ce4d639df
2017-09-08 03:17:56 -07:00
Houston Hoffman
5645dd2803 qcacmn: Use qdf_dbg instead of qdf_print for non-error logs
Stats printing with excessive loops should not go to the console.
Avoids watch-dog bites.

Change-Id: I7b0f9d73139dff97c16f492cbd1cb2d255255b3e
CRs-Fixed: 2091039
2017-09-08 02:37:26 -07:00
Dustin Brown
8f6788d071 qcacmn: Use vm_fault->address instead of virtual_address
Linux kernel 4.10 removed vm_fault->virtual_address in favor of simply
using vm_fault->address. Add conditional compilation to use the
appropriate vm_fault address field based on the version of the Linux
kernel being compiled against.

Change-Id: I3f29721888bf349a7ac4f5f62d576b668ee0abc2
CRs-Fixed: 2094806
2017-09-08 01:57:46 -07:00
Jeff Johnson
23f532b887 qcacmn: Remove reference to obsolete vos_ctx
wlan_logging_sock_svc has a reference to the vos_ctx. Since this is
obsolete, remove the reference.

Change-Id: I1256aa8a1220859911eceec8048a57856e64299a
CRs-Fixed: 2102456
2017-09-07 18:08:25 -07:00
Jeff Johnson
fa099795fa qcacmn: Replace hdd_adapter_t in wlan_logging_sock_svc
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_adapter_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: Ia5177a671f3657a23e88ec1a47c6ed0ac569934a
CRs-Fixed: 2100985
2017-09-07 18:08:21 -07:00
Jeff Johnson
0960ae344a qcacmn: Replace hdd_context_t in wlan_logging_sock_svc
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_context_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: I3dfe59ac92a374639faa6774a6538c5d970d3f1d
CRs-Fixed: 2100797
2017-09-07 18:08:18 -07:00
Dustin Brown
2af3d67336 qcacmn: Add Wake MSI support
Using the same MSI for wake and copy engines has a number of negative
side effects. Instead, set aside a whole MSI just for the wake
notification from firmware.

Change-Id: If871b88ca255ad970dabb4a7773d2b4d3b71c3fe
CRs-Fixed: 2055359
2017-09-07 17:31:36 -07:00
Govind Singh
903165f2ef qcacmn: Reduce CE msg flush count for SLUB build
With SLUB build in Low memory condition rx processing is taking
more time, reduce CE msg flush count for fastpath in SLUB build.

Change-Id: I8901bd770ca01997299f882394bbe99871d2400e
CRs-Fixed: 2043999
2017-09-07 13:30:34 -07:00
URAJ SASAN
81d9571879 qcacmn: Enable client isolation
[PATCH 0/1][CR:2093711]

The client isolation feature parameters were
pass and stored but were not used for enabling/disabling.
Added the changes to enable disable the feature.

iwpriv ath0 ap_bridge 1
iwpriv ath0 get_ap_bridge

By default feature is enabled so the STA-STA packet does not
go through the bridge interface and incase the feature is disabled
packets are given to the kernel stack.

Change-Id: I76e8683a0a7e8791cf8cf743e39b7201fee39d30
2017-09-07 05:30:27 -07:00
Mukul Sharma
7d978533ad qcacmn: Define a QCA vendor attribute to update the listen interval
This commit defines an attribute
QCA_WLAN_VENDOR_ATTR_CONFIG_LISTEN_INTERVAL which allows the currently
used listen interval to be updated using
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION. This update applies
only during the association and is done without updating the AP about
the change.

Change-Id: Ie7b2016c1d3d06c7fcb5099b53e3fc0a159cc246
CRs-Fixed: 2048443
2017-09-07 02:01:45 -07:00
Ashish Kumar Dhanotiya
cc0b0dae42 qcacmn: Add an attribute to represent PNO/EPNO Request ID
This request ID was wrongly referred from the REQUEST_ID in
enum qca_wlan_vendor_attr_gscan_config_params which is mapped to
QCA_WLAN_VENDOR_ATTR_PNO_PASSPOINT_LIST_PARAM_NUM in PNO Config.
Hence define a different attribute to represent the request ID
for the PNO Config.

CRs-Fixed: 2095917
Change-Id: I76289468fe926f5bd157c4d37b45bbf5a0ebdfb7
2017-09-07 01:21:20 -07:00
Krunal Soni
be546459fa qcacmn: Remove all commands related to vdev when it is destroyed
If serialization module has queued some commands for particular vdev
and if that vdev gets destroyed without informing serialization
module then upon those command timeout, serialization try to point
vdev pointer which is invalid. This situation create a crash.

If serialization module has some commands pending or active for vdev
which is being destroyed then remove those commands as part of vdev
destroyed notification.

CRs-Fixed: 2099063
Change-Id: I8df9900d83bea758ca5c50cbe0edf31e06f83a4c
2017-09-06 22:52:23 -07:00
Manoj Ekbote
7c2444ce91 qcacmn: Add function to extract MAC addr list
For DBDC/DBS cases, each radio will have a separate MAC
address. FW will provide the list to host in ready
event. Handler has been added to extract the list.

Change-Id: I6da96ae02a1f30995e3953358677090b84fc57c4
2017-09-06 20:56:03 -07:00
Rohan Dutta
3844c6009c qcacmn: Set the TX_Usage in key Flags for EAP-TLS
The TX_usage is set for EAT-TLS with WEP as cipher.

CRs-Fixed: 2095158
Change-Id: I4f2f61c5cbc266a1c27b3b74e59065fc1d9aa4c2
2017-09-06 20:56:02 -07:00
Dustin Brown
0add4c2028 qcacmn: Migrate to linux/sched/signal.h
Linux kernel version 4.11 moved several signal related functions out of
linux/sched.h into linux/sched/signal.h. Add conditional compilation to
include the correct file based on the version of the Linux kernel being
compiled against.

Change-Id: Ic50a8ec0a76178b5231388983a890bdfdc4615e2
CRs-Fixed: 2094019
2017-09-06 11:27:07 -07:00
Chris Guo
175e034a96 qcacmn: Fix RX Bus bundle error for SDIO WLAN
Fixed below errors:
1 RX bundle number calculation error.
2 Last bundled PKT block error.
3 RX bundle max checking error.

CRs-Fixed: 2071151
Change-Id: I3cf2cb7e933a47c88ac4916a18234d81ff068d2a
2017-09-05 03:21:56 -07:00
Kiran Venkatappa
e2f4335d23 qcacmn: Add CDP API to configure mgmt tx power
Add CDP API to configure mgmt TX power.

Change-Id: I68449d2f22487017b680f18c811853576a36a8e9
CRs-Fixed: 2098375
2017-09-04 17:57:57 -07:00
Pamidipati, Vijay
2da6acd74b qcacmn: Enable all HW Transmit datapath rings
Enable all 3 HW Transmit rings by default to be able to tie each ring to
a CPU core for transmit datapath

Change-Id: I6f1dd011e1289f8ee603a81e373629c79af0fd3f
CRs-Fixed: 2103112
2017-09-02 13:46:48 -07:00
Tushnim Bhattacharyya
481a9dfb4c qcacmn: Avoid deadlock while protecting connection list
Avoid deadlock while protecting connection list during SAP channel
switch.

Change-Id: Ib4f8bd3e185b3dd6bd746e49645b6456dca50e96
CRs-Fixed: 2088106
2017-09-02 04:19:21 -07:00
Tushnim Bhattacharyya
95e7e27147 qcacmn: Handle no common channel between PCL and the favorite channel list
Handle the scenario where no common channel between PCL & the
favorite channel list is found.

Change-Id: I560d7ef861d89f3f4a0c63afacd0ffbf6aaa976e
CRs-Fixed: 2063060
2017-09-02 04:19:18 -07:00
Tushnim Bhattacharyya
4980f3c81c qcacmn: Fix logic to force SCC in SAP+STA concurrency
If SAP is up & STA is coming up next(or vice versa) on a different
channel causing MCC, move SAP to cause SCC or DBS. This logic is
enabled only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION or
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL.

Change-Id: I16615d828a285762133ee3533339320ef119b3d3
CRs-Fixed: 2063060
2017-09-02 04:19:15 -07:00
Tushnim Bhattacharyya
d3c96deba9 qcacmn: Dynamically allocate memory for work sta_ap_intf_check_work
To handle back to back scheduling of sta_ap_intf_check_work, allocate the
memory used by the work dynamically.

Change-Id: Ibbcfafb2fadd2de1cca44086f9335dca86641f50
CRs-Fixed: 2070220
2017-09-02 04:19:12 -07:00
Tushnim Bhattacharyya
abf086a231 qcacmn: Add logic to force SCC in SAP+STA concurrency with ACS
If STA is up & SAP is comings up on a ACS derived channel causing MCC,
move SAP to the other band if DBS is supported. This logic is enabled
only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I48d809f83921292f51ca1735bff4c4d6dd339975
CRs-Fixed: 2063060
2017-09-02 04:19:09 -07:00
Tushnim Bhattacharyya
6efce6c5dd qcacmn: Add logic to force SCC in SAP+STA concurrency - Part 2
If STA is up on a a DFS or passive or LTE unsafe channel & SAP is
comings up that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is set to QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I5d393a21301f3fa838f7cf38620fb1d57ae1d57a
CRs-Fixed: 2063060
2017-09-02 04:19:06 -07:00
Tushnim Bhattacharyya
3c3d4ed353 qcacmn: Add logic to force SCC in SAP+STA concurrency
If SAP is up & STA comes up or moves to a DFS or passive or LTE
unsafe channel that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is non zero.

Change-Id: I56f78dfaedec31c4c41aea6ac8c66261c9ad4c91
CRs-Fixed: 2063060
2017-09-02 04:19:03 -07:00
Shashikala Prabhu
d694b02be9 qcacmn: Add DFS full offload check for dfs radar process
Do not enable/process the DFS radars in HOST when DFS is offloaded to FW.

Change-Id: Ie025a5ba0e3962ebd276c266ea5afb8635f8a536
CRs-Fixed: 2099937
2017-09-02 01:13:13 -07:00
Shashikala Prabhu
76192e12a9 qcacmn: Register a DFS callback function to get AP CAC status
In Repeater AP scenario, when STA vap starts scan, it calls this
registered DFS callback function to get the AP CAC status. If the
AP vap is performing CAC, STA vap does not start SCAN.

Change-Id: Ifa3ad0298f1b04f3fffc915f20ff81ec0cc731bf
CRs-Fixed: 2096259
2017-09-02 00:17:42 -07:00
Dustin Brown
9a489c42be qcacmn: Statically allocate wlan logging buffer
To aid in debugging memory leaks, and improve the robustness of log
recovery from crash dumps, statically allocate pglog_msg in the global
scope. This allows logs to be inspected even in cases where a crash
came late in the unload process. It also improves log recovery
robustness by removing the possibility of using a NULL pointer offset
under certain memory corruptions scenarios.

Change-Id: I077198e358570661c2f3adf2704f2c48f4b2f6f8
CRs-Fixed: 2078548
2017-09-02 00:17:40 -07:00
Venkateswara Swamy Bandaru
ed15e74a87 qcacmn: Add support to pass napi budget as module parameter
Add module parameter to pass napi budget for dp interrupts. Default value is
set to 128.

Change-Id: I6b3761c6908ed9cec4e40118a657b39da6ac2532
CRs-Fixed: 2095242
2017-09-01 23:17:18 -07:00
Shashikala Prabhu
7b24441d5e qcacmn: Remove 5GHZ channel for FCC4
Currently WIN supports 4.94-4.99 GHz channels for US public safety.

Change-Id: Ibc9d2d37540d95162656670195a3cb3b5ba6fdc9
CRs-Fixed: 2093667
2017-09-01 17:33:08 -07:00
Shashikala Prabhu
2800a7eeb5 qcacmn: Regulatory updates
Regulatory spec changes(Country Table Changes Submitted 2016-10-31).
Added below changes:
* Update FCC2, FCC3, FCC6, FCC11, ETSI4, APL10 and APL12 txpower.
* Assign FCC Radar detect pattern to FCC2 regdomain.
* Add ETSI11 regdomain.

Change-Id: Ia93476c07063950cb43fd6e05c90dd5af089dde0
CRs-Fixed: 2093667
2017-09-01 17:33:04 -07:00
Shashikala Prabhu
269b020a61 qcacmn: Cancel ZERO CAC NOL timer during wifi down
Analysis:
When AP detects the RADAR, it marks the channels as RADAR found
and adds it to both NOL and precac NOL list and starts NOL and
precac_nol timer.
If the user brings down the radio while the channel is present in
NOL list, only NOL timer gets cancelled. Precac NOL timer expires after
wifi down and leads to a kernel panic.

Solution:
Cancel the zero cac NOL timer during wifi down

Change-Id: Icf932e739910a51d9dc74cf5822133258c0ba3f0
CRs-Fixed: 2096256
2017-09-01 01:11:22 -07:00
Shashikala Prabhu
c2fc6d09c6 qcacmn: Fix DFS kernel panic
Analysis:
dfs_nol_timer_cleanup() calls dfs_nol_update(), which internally
calls a legacy function to update the scan channel list and sends
a WMI command to FW. However, from WIN side dfs_nol_timer_cleanup()
is also called after target stop, which leads to a kernel panic.

Solution:
Call dfs_nol_update() prior to target stop.

Initalize precac channel list during dfs reset.

Change-Id: If856d436ad215efa46cfc166d95bf3ccb4e7bf99
CRs-Fixed: 2096256
2017-09-01 01:11:20 -07:00
Chris Guo
33d5173722 qcacmn: Enable Bus bundle for both TX and RX
Because of the sequence of macro defination, the HTX bundle is
not enabled at all. This fix made the macro defination into the
correct sequence.

CRs-Fixed: 2070642
Change-Id: Idc62b091057da9873874f54f09ca8b76d3658516
2017-08-31 14:48:38 -07:00
Balamurugan Mahalingam
dcb5226baf qcacmn: Fix PACKET_LOG_SVC service to ce_map for QCA8074
Add a new entry for PACKET_LOG_SVC. FW needs this entry
for initializing packet log CE pipe.

CRs-Fixed: 2094058
Change-Id: I496a2bdf78dd79cc17a60b4f0d227d4e570c93e6
2017-08-31 13:21:38 -07:00
Sathish Kumar
e7b4922f93 qcacmn: Populate pdev params that are enabled in target header
Few pdev params are populated as unavailable param in the TLV layer.
Some of them are now enabled by the target. Populate the right pdev
param enum as per the definition in the converged WMI header.

Change-Id: Ia06498da9023f53035abde31c3aef2749f6b65b9
CRs-Fixed: 1115239
2017-08-31 08:54:41 -07:00
Amar Singhal
9fef21a8ce qcacmn: Add INI for 11d scan interval
The default 11d scan interval is 1 hour. But make the 11D scan interval
programmable by user to test different intervals. Therefore provide INI
for the same.

Change-Id: I36dbe8b87d4175e51bf2f275b8203ba9609a0625
CRs-Fixed: 2088739
2017-08-31 08:07:59 -07:00
Houston Hoffman
9b55b5fbb9 qcacmn: Fix ce ring timeout interrupt hw work arround
Interrupt was constantly firing because the low_threshold was
improperly configured.  The low threshold needs to be 1 less than
the number of buffers posted when the CE is fully posted.  The
srng backed CE's are setup with nentries - 2 buffers as the fully
posted amount, therefore the threshold needs to be nentries - 3.

Also fixes a bug where a reused variable is not cleared.  This
bug could result in the threshold being set to a garbages value.

Change-Id: Iac840bfd6677683bf2feb42d8bdbd050f42e895d
CRs-Fixed: 2090603
2017-08-31 06:27:43 -07:00
Venkateswara Swamy Bandaru
1fecd15636 qcacmn: Add stats and filtering support in delivering of unencrypted frames
Addded stats and filtering support in delivering of unencrypted frames
in mesh mode.

Change-Id: I2fd72f766660e500affeccda9aad03a0313d0659
CRs-Fixed: 2004658
2017-08-31 06:27:38 -07:00
Tallapragada Kalyan
dbbb0c8085 qcacmn: Add support for Hash based steering in RX PATH
Add support for hash based steering in RX path, also
considered cases where a particular radio or both radios
are handled by NSS offload.
CRs-Fixed: 2092357

Change-Id: Ib0e88c28eecd7bfdb52c7337d4485ac41371be68
2017-08-31 02:11:15 -07:00
Sathish Kumar
7f9408bacc qcacmn: Add timestamp param and enable foreign channel exit in scan event
Add timestamp parameter in scan event received from FW to aid
in calculating dwell time and overall channel switch time in
off-channel operations.

Enable foreign channel exit event inorder to be notified
by FW through the scan event.

Change-Id: I4ba028756ee7db35f6528c0554b09c73087184a7
CRs-Fixed: 2056330
2017-08-31 00:20:20 -07:00