Commit Graph

3347 Commits

Author SHA1 Message Date
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
Abhishek Singh
7d30bf7ecb qcacmn: Use min rest time same as max rest time in SAP+STA case
In SAP+STA case the min rest time is 50 and thus during scan
possibility increases that the device is not present in base channel
during the time of beacon transmission and thus beacons are not
transmitted.

Thus if SAP is present the min rest time should be 100ms
max rest time), so that during scan device can come to base channel
and transmit beacons.

Change-Id: I6fa2ee57771d093fce7d63089797528f8f4bc409
CRs-Fixed: 2079803
2017-08-30 22:47:59 -07:00
Govind Singh
c505cdc689 qcacmn: Fix race condition in tx lookup queue during tx completion
Tx lookup queue holds the reference of the packet that is successfully
transmitted via CE pipe. Tx lookup queue  method can be called from
tx path and from tasklet simultaneously for the same endpoint.
One context can get the packet reference in its local lookup Queue and the
other context may not find the reference as this is not brought back
from lookupQueue to TxLookupQueue.

Fix this by adding a per endpoint lookup queue lock.

Change-Id: I0f4872f695e9ab15c27c91e733449f03871f4262
CRs-Fixed: 2047390
2017-08-30 22:06:17 -07:00
Pamidipati, Vijay
899e775769 qcacmn: Add support to dump Host AST table
Add support to print Host AST table contents and
AST statistics

Change-Id: I669d547657fe9d826d2aed59cf8dbb06bc100996
CRs-Fixed: 2099205
2017-08-29 23:41:34 -07:00
Pamidipati, Vijay
9e34025ada qcacmn: Add option to enable or disable accounting of Tx in NAPI budget
Add a division factor for number of tx completions to be accounted for in NAPI
budget. Fix the data type of budget to int to account for negative values.

Change-Id: I620af5537c5c1cdf3161da3a3c053a2c8bf777e8
CRs-Fixed: 2092526
2017-08-29 23:41:33 -07:00
Karunakar Dasineni
6bcbdd5a27 qcacmn: Use HP instead of loop count in dst rings
SRNG loop count is not restored after LMAC resets, and hence can't
be used to reap entries from destination rings. Modify the SRNG API
to use head pointer instead.

Change-Id: I3b05948d531cc3d1a5ccb7f01e38f8f36ae69da9
CRs-Fixed: 2091809
2017-08-29 20:59:02 -07:00
Soumya Bhat
3eec5f3273 qcacmn: WMI support for EXT NSS Signaling
Add required WMI commands to communicate support of
EXT NSS Signaling between host and FW. Also, if
EXT NSS Signaling is supported the use new WMI to
communicate the required information between host and FW.

Change-Id: If3e1ef11a55f8fbdffddb3b10963878a6a2ca415
CRs-Fixed: 2089043
2017-08-29 20:58:30 -07:00
Tallapragada Kalyan
cc5d7b8ff7 qcacmn: tail fragment nbuf next is not set to NULL in RAW Mode
Th tail fragment nbuf->next is not set to NULL which is causing
host crash in RAW mode RX path for bigger size pkts (AMSDU)

Change-Id: Id0a16419988f72e5d8dfb8e942063f9d797abfab
2017-08-29 20:58:13 -07:00
Liangwei Dong
f45a0df7e2 qcacmn: Fix hotspot starting failure
When softap is stopping, there are two threads
accessing the "conc_connection_list".
hostapd thread (__wlan_hdd_cfg80211_stop_ap) read
and modify it by cds_decr_session_set_pcl.
cds_mc_thread thread (cds_get_valid_chan_weights)
read and modify it by cds_store_and_del_conn_info
and cds_restore_deleted_conn_info.

They are not protected,which causes two same
station connection info saved to the
"conc_connection_list".

This fix is to acquire lock before read/modify
the list.

Change-Id: I5f1becef711363f659044c46e69fab1cd6d07d81
CRs-Fixed: 2038000
2017-08-29 20:57:54 -07:00
Om Prakash Tripathi
7c31ec678c qcacmn: Add support for TID stats v1 tlv
Add support for htt_tx_tid_stats_v1_tlv in extended htt stats

Change-Id: If5ec3399931069c25c2ad6b00cb57b303493387c
CRs-Fixed: 2094292
2017-08-29 20:57:30 -07:00
Chris Guo
37cf36d2e6 qcacmn: Fix TX Bus bundle error for SDIO WLAN
For SDIO WLAN, the creditsize is different for data EP than other
EPs. This change using alt credit size to replace of original
credit size.

CRs-Fixed: 2072158
Change-Id: I105db55da66e6123b2a53326d53758c24eca21ec
2017-08-29 20:57:12 -07:00
Sridhar Selvaraj
f8c766c957 qcacmn: Add support for action id bitmask in allowed action frames
Currently only action category is specified to be dropped/allowed
by fw. Add support for action id bitmask per category.

Change-Id: I208af7827532740104afbb3d0e9b8dda3a8b2d47
CRs-Fixed: 2072125
2017-08-29 20:56:46 -07:00
Dustin Brown
24c31020a2 qcacmn: Use refcount APIs for sk_buff.users with 4.13+ kernels
The 4.13 Linux kernel changed the sk_buff.users type to refcount_t from
atomic_t. Add conditional compilation based on kernel version to use
appropriate refcount APIs for kernels 4.13+.

Change-Id: I6918b4f45ffa247c74e54d8653a80821ceab1a86
CRs-Fixed: 2092031
2017-08-29 20:56:28 -07:00
Tushnim Bhattacharyya
ddfe26635d qcacmn: Save the unsafe channels in policy manager
Save the list of unsafe channels in policy manager to be used on PCL.

Change-Id: Ibb705830e878d1cc03dfbc76e49c169d2febd75d
CRs-Fixed: 2095290
2017-08-29 20:56:02 -07:00
Tallapragada Kalyan
71cc01bb11 qcacmn: Do Multicast Echo Check for Multicast pkts only
Add a check to ensure MEC happens only for multicast
and broadcast pkts only. Also added additional check to
drop the mcbc pkt whose src MAC addr matches to the rx vdev.
This is in addition to the other MEC checks already in place.
CRs-Fixed: 2097918

Change-Id: Ie41fce0368cd6147c2a3678f8f4b31eb400f933c
2017-08-29 20:55:49 -07:00