Commit Graph

6674 Commits

Author SHA1 Message Date
Mohit Khanna
c30b51c378 qcacmn: Reset unmapped flag in during replenish logic
This rx_desc flag was removed from the function by a previous change
with id Iaa345d04b8d48814f88ed6e2237fc67696f6a20c. This flag is
needed to keep track of whether the nbuf associated with a rx_desc has
been unmapped or not. Set it to 0 when a mapped nbuf is associated with
the rx_desc.

Change-Id: I24e103c5698a556f478a3f7917076d31b5490661
CRs-Fixed: 2393056
2019-04-02 11:17:35 -07:00
Mohit Khanna
16cd1b2e8d qcacmn: Add Sanity checks during RX processing
- Check for rx_desc.magic before using a rx_desc retrieved from the reo
  destination ring via rx_buf_cookie (dp_rx_process). Add stats.
- Check if we end up re-using a rx_desc with rx_desc.in_use=1 in the
  replenish path (dp_rx_buffers_replenish).
- Drop RX packet and assert in case MSDU Done failures are seen in
  in the TLV during dp_rx_process. Add stats.
- Disable host2rxdma ring mask for MCL. MCL is not expected to be
  receiving these interrupts.

Change-Id: Iaa345d04b8d48814f88ed6e2237fc67696f6a20c
CRs-Fixed: 2382076
2019-04-02 11:17:32 -07:00
Prathyusha Guduri
9e4bb950e4 qcacmn: 2k_jump error fix for sequence number mismatch
In some cases non aggregate packets with active BA session land in
2k_jump_error owing to sequence number mismatch.

Fix those cases by sending delba and the next addba is expected to reset
the sequence number

Change-Id: Ib95edf8744761abddb80cf28bf405d6fa52181c8
2019-04-01 07:49:02 -07:00
Chaithanya Garrepalli
a5ad5822aa qcacmn: clean up AST entries in target recovery case
In case of target recovery clean up the AST entries on
peer before peer cleanup

Change-Id: Ib4f119ec259f0de03b0513a8f0dc8ef4b431f24a
CRs-fixed: 2419890
2019-04-01 02:28:16 -07:00
Jinwei Chen
a42581d479 qcacmn: remove nss info in host tx stats
TX NSS field is not supported from WMB TX completion ring, remove
the NSS print in host TX stats in case introducing some confusion.

Change-Id: I594eb5cd7b2bf88de14f45ff6ad8e3248eb36617
CRs-Fixed: 2350789
2019-03-30 09:37:31 -07:00
Edayilliam Jayadev
79a5edccee qcacmn: dont send Spectral stop WMI if Spectral scan is not in progress
Before sending Spectral stop WMI to FW check whether Spectral
scan is in progress. When all vdevs are in down state host driver
will send a stop Spectral scan command to FW. In that scenario there
is a possibility that stop Spectral scan WMI message may go to FW
even though Spectral scan is not active. To prevent this we add a check
in stop Spectral scan routine to send WMI message only if
scan is in progress.

CRs-Fixed: 2424020
Change-Id: I2119935759c40f62df75574b6a29174973f2703f
2019-03-30 08:07:23 -07:00
Rajeev Kumar Sirasanagandla
e565a27cdd qcacmn: Reset vdev id for 11d scan after vdev destroy
In regulatory component, currently, default vdev id for 11d scan is
not reset after last sta vdev delete.

When SAP is stopped/started after last sta destroy, above behavior can
lead to invocation of WMI command to start/stop 11d scan for destroyed
vdev. Sometimes, this leads to firmware assert.

To address this, reset vdev_id_for_11d_scan to INVALID_VDEV_ID (0xFF)
after the last sta vdev destroy.

Change-Id: Ic8abaf6ac680b22fa9218c058a34cbf3c3b5bf1f
CRs-Fixed: 2415462
2019-03-30 06:44:16 -07:00
jiad
3b8104bdd3 qcacmn: Support WLAN IPA WDI 3.0 SMMU
Support WLAN IPA WDI 3.0 with SMMU-S1 enabled. Key design
considerations are captured below.

- ring base addresses are passed as struct sg_table and IPA
driver will do the IOVA mapping to IPA domain.
- ring doorbell addresses are passed as physical address and
IPA driver will do the IOVA mapping to IPA domain.
- TX/RX buffers need to be mapped to IPA domain by WLAN driver
via ipa_wdi_create|release_smmu_mapping API.
- IPA doorbell addresses returned from ipa_wdi_conn_pipes are
DDR addresses and WLAN driver needs to do the IOVA mapping
to WLAN domain.

Change-Id: I2398df58c9a9d002af7035f239eda37a86f5d00f
CRs-Fixed: 2422155
2019-03-30 04:53:25 -07:00
sheenam monga
bd70fd0a52 qcacmn: Handle DFS AP's in scan result
if gEnableDFSChnlScan is zero and scan channel list
contains only DFS channel, all DFS channels are
skipped and thus number of channel become zero.
When scan req is sent to firmware with zero
channel, it scan all valid channels which contain
DFS channels as well.With gEnableDFSChnlScan set to
zero, no DFS channels should be scanned.

Fix is to reject the scan request if number of
channels become zero after filtering invalid
channels.

Change-Id: Ife5c0f0e3173197b43809f63ca95281d815a2c3c
CRs-Fixed: 2419126
2019-03-29 21:59:08 -07:00
nobelj
7dfc8cc755 qcacmn: resolve memory leak in invalid peer
Instead of last nbuf send whole msdu chain.

Change-Id: I9f5c2889cb7ed03d9d5f44afd5c6f36db14bc45a
2019-03-29 18:26:46 -07:00
Abhinav Kumar
7d41a1740a qcacmn: Set default passive Dwell time to 110 msec
In order to minimize the probability of beacon miss,
increase default passive Dwell time to 110 msec.

Change-Id: I98b0f9a68787638787a45b9179dfeb9826777cde
CRs-Fixed: 2425379
2019-03-29 11:05:58 -07:00
Paul Zhang
57ff3231aa qcacmn: resolve time out issue for get tx power
Currently, clearing the TYPE_CONNECTION_TX_POWER is
doing after the callback get_tx_power_cb.

Timeout issue happens because:
1\ the callback get_tx_power_cb is interrupted
   after invoking osif_request_complete.
2\ __wlan_hdd_cfg80211_get_txpower is called again
   and setting TYPE_CONNECTION_TX_POWER.
3\ the callback is rescheduled and clears the bit
   TYPE_CONNECTION_TX_POWER.
4\ Because the bit TYPE_CONNECTION_TX_POWER is cleared,
   and callback won't be invoke.

Change-Id: I6a5b155d2274551b637dc22095d292a70f836700
CRs-Fixed: 2418587
2019-03-29 11:05:55 -07:00
Manjunathappa Prakash
0159f81bca qcacmn: Use INI configured WMI credit count
Use INI configured WMI credit for exchanging WMI messages.
Make sure INI configured value is less than FW advertised capability.
This credit configuration should be non zero.

Change-Id: I26b2dfbee0fc095aca3d37f21cd22c974189bb49
CRs-Fixed: 2411028
2019-03-29 11:05:51 -07:00
Jeff Johnson
eee26f7b76 qcacmn: target_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within target_if replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I436bb3ec12d331df2260507b6a9afbab84a8a54f
CRs-Fixed: 2418256
2019-03-29 00:48:05 -07:00
Pamidipati, Vijay
cd7fda8963 qcacmn: Remove illegal access to NBUF in Tx completion handler
In Tx completion handler, nbuf was being accessed after it was
freed in vdev detach path. Fix this by moving the access to nbuf
after NULL check for vdev.

Change-Id: I08bab01bcc2f9d2e739a3897502d2d2b96bf9f43
CRs-Fixed: 2393459
2019-03-29 00:48:01 -07:00
Jeff Johnson
f3a2b8918c qcacmn: crypto: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac crypto replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: Id6edc4aa8bf0fef455c1359dacabd74fc7163e44
CRs-Fixed: 2418253
2019-03-28 16:50:36 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Dustin Brown
fdea3c7af7 qcacmn: Remove qdf_delayed_work_t
qdf_delayed_work_t has been superseded by qdf_delayed_work (via
I76bc59dcd4222643d70c6a763e5bc4ee9f0a487c). Remove the now obsolete
qdf_delayed_work_t.

Change-Id: I4e50521b469dcf9e1782e9412729f197552ee408
CRs-Fixed: 2420191
2019-03-28 13:13:36 -07:00
Ashish Kumar Dhanotiya
50400f9e13 qcacmn: Add support to send twt feature capability
Currently there is no support to send twt capability to
user space.
Add Support to advertise twt capability to user space using
vendor flag QCA_WLAN_VENDOR_FEATURE_TWT when get capability
vendor command is invoked.

Change-Id: I9d6d3dc975485a5d1ad38d4f7c2830b05619a14b
CRs-fixed: 2424356
2019-03-28 13:13:33 -07:00
Jeff Johnson
8d639a00e4 qcacmn: hif: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within hif replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I929cb64ee0523d11bc86d5145aade1ec5a713071
CRs-Fixed: 2418257
2019-03-28 13:13:29 -07:00
Sravan Kumar Kairam
dda9f66849 qcacmn: Resolve ipa compilation issue
Resolve compilation for targets with config ipa unified
api enable and have kernel version 4.9.

Change-Id: Ice0bba024c11c4d5222a58941ac50fd90b139aaa
CRs-Fixed: 2422170
2019-03-28 09:04:48 -07:00
Jeff Johnson
a95ea4f9ee qcacmn: serialization: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac serialization replace any such comparisons
with logical operations performed on the pointer itself.

Change-Id: I6b8ff46dacfd2f9a883262f6336f35f5aff499bc
CRs-Fixed: 2420150
2019-03-28 09:04:45 -07:00
Dustin Brown
80150e9715 qcacmn: Remove qdf_ssr_protect/unprotect
Remove the unused qdf_ssr_protect/unprotect and related APIs.

Change-Id: I55ce40646584c32816ad38caec4c5cdee896b7fa
CRs-Fixed: 2418459
2019-03-28 04:37:26 -07:00
Srinivas Pitla
d9ad48d3ff qcacmn: Handle RADAR detect in RESTART state
If MLME gets RADAR detected event while waiting for RESTART response from
FW(RESTART_PROGRESS substate), it sets PDEV RADAR detect deferred flag.

Once VDEV SM moves from START to other state, it invokes MLME SM callback,
which checks whether “RADAR detect defer” is set.

If it is set, SM callback posts message to scheduler to notify all VDEVs on
RADAR detection.(from here, flow goes as regular radar detected event)

Change-Id: Icaa2aee900be60c12c5b38b1d199bb01ba31f722
CRs-Fixed: 2390019
2019-03-28 01:25:24 -07:00
Dustin Brown
13835b1aa2 qcacmn: Do not access bus in suspend_noirq
The WLAN suspend process has three phases:
	1) protocol suspend
	2) bus suspend
	3) bus suspend, no-irq

Currently, it is assumed by the WLAN driver that the bus will not be put
down until after step 3. Moving forward, however, the PCIe driver will
be putting the bus link down between steps 2 and 3. In order to
accommodate this, move flushing the tasklets to phase 2, up from phase
3. This will ensure the WLAN driver is done accessing the bus before the
PCIe driver puts it down.

Change-Id: I47a22b7fd940ddc1bad78265b59461c178ee7ad4
CRs-Fixed: 2423628
2019-03-27 12:52:06 -07:00
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Jeff Johnson
5a6cc79b9e qcacmn: htc: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within htc replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Ibb6d24aff9824d7e7cf253c1fe3081443cbfb63b
CRs-Fixed: 2418252
2019-03-27 06:09:57 -07:00
Rajeev Kumar
1fe4511e2e qcacmn: Replace adrastea compile time config by MSM platfrom
To have proper MSM timer tick to usec conversion replace adrastea
config by msm platfrom.

Change-Id: I3c5ed4b907a6844c507b7f38bce2537bd933f89b
CRs-Fixed: 2421674
2019-03-26 20:56:22 -07:00
Rajeev Kumar
7c2431dc95 qcacmn: Remove adrastea compile time flag from logging API
Time stamp logging API needs to use msm timer tick on all
MSM platforms hence remove the adrastea compile time flag
from qdf time stamp get api.

Change-Id: I9628646091a818acbca83ce75186308bdfd9453e
CRs-Fixed: 2419279
2019-03-26 20:56:19 -07:00
Jeff Johnson
82eb21292d qcacmn: scan: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac scan replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I0127e39fb4278e9c8063e2b37e7b46a9311defe7
CRs-Fixed: 2420153
2019-03-26 17:16:52 -07:00
Venkata Sharath Chandra Manchala
b43ed1cd1a qcacmn: Update rx histogram stats appropriately
Increment number of packets processed per pdev
per interrupt before updating rx histogram
stats counter.

Change-Id: I0d6c59a6a115df168f7755ce94faa90dcc753e13
CRs-Fixed: 2418384
2019-03-26 17:16:48 -07:00
Srinivas Girigowda
22953dc004 qcacmn: Enable EAPOL/DHCP message tracing in Wifi driver
Enable EAPOL/DHCP message tracing in Wifi driver.

Change-Id: I010c9295fd6ca42a950f84f0d7a19b00d8b0c0da
CRs-Fixed: 2421835
2019-03-26 17:16:45 -07:00
Jeff Johnson
2831229bd7 qcacmn: qdf: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within qdf replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Ie7662617dad8138b803dc54e7759d3b6d76c53ce
CRs-Fixed: 2418255
2019-03-26 15:38:28 -07:00
Ajit Pal Singh
3fcc082eac qcacmn: Do not call get_htc_send_packets if no TX resource
For USB, do not call get_htc_send_packets() in htc_send_data_pkt()
if no TX resource is available.

Change-Id: I17a3dd54c2582620ab2be1e0f6c156904dc52d30
CRs-Fixed: 2412376
2019-03-26 12:02:29 -07:00
Ajit Pal Singh
83301871d5 qcacmn: qcn7605: Increase TX URB count to 64
Increase TX URB count to 64 for QCN7605. It is seen that sometimes
the URB count reaches to zero on HTT endpoint.

Change-Id: If6ccf9b11a6fd13d327b47b6bef8db2b10a1d0f9
CRs-Fixed: 2412376
2019-03-26 12:02:26 -07:00
Jeff Johnson
4c5ac90746 qcacmn: utils: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within utils replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: Iae6c2f2f0b3041a9397dd13092ea500a8b995fd2
CRs-Fixed: 2418251
2019-03-26 10:30:31 -07:00
Kai Liu
f26fa0e5a4 qcacmn: cancel target sleep timer in hif suspend callback
According to PCIe controller suspend logic, RC will disable its regulator
and clock in suspend phase that means in noirq suspend phase, client EP
should not access PCIe bus anymore.
Target sleep timer will access soc register, so wlan driver needs
guarantee this timer is stopped after RC shutdown its power and clock.

CRs-Fixed: 2376675
Change-Id: If76abab1fd4d8d6f36beb13d1b62a7e0a0e7aa4f
2019-03-26 10:30:27 -07:00
Priyadarshnee S
8202412c0d qcacmn: Rename "dfs_freq_is_in_nol" to "dfs_is_freq_in_nol"
Rename "dfs_freq_is_in_nol" to "dfs_is_freq_in_nol"

CRs-Fixed: 2417878
Change-Id: Iedd79e9ea51a84d0458e643ddafa2797ed5f337c
2019-03-26 10:30:24 -07:00
phadiman
7dd261d614 qcacmn: Free Rx Desc during WiFi unload
Rx desc pools are reused across wifi up
and wifi down, only nbufs part of these
pools are free during down

Free Rx desc pools during WiFi Unload

CRs-Fixed: 2418941
Change-Id: I5cc3a82d99efd84f51f9eb048cf06da5a4495e55
2019-03-26 04:13:12 -07:00
Dustin Brown
6577bea1d6 qcacmn: Add qdf_ptr_hash
While the Linux kernel provides a generic hash table data structure, it
makes the assumption that it will always be referred to statically, so
as to avoid having to store the size of the hash table's internal array.
This limitation means reusing this data type generically is difficult or
impossible.

Add a very simple hash table implementation to WLAN for general use,
which stores its own size information, and assumes all input keys will
be pointers. Build on top of the recently added single-linked list
implementation added in I2959f34649a0d8e0b312d9d67c81de17753b9b6c to
reduce memory overhead.

Change-Id: I7f5fc0c59ed220bde43044e7013b3c8573f1bf39
CRs-Fixed: 2421829
2019-03-26 02:51:12 -07:00
Dustin Brown
b52a362e62 qcacmn: Add qdf_slist
For memory savings it is sometimes desirable to use a single-linked list
instead of a double-linked list. However, the Linux kernel does not
provide a default implementation of a single-linked list.

Add a very simple single-linked list implementation to WLAN for general
use.

Change-Id: I2959f34649a0d8e0b312d9d67c81de17753b9b6c
CRs-Fixed: 2418493
2019-03-26 02:51:09 -07:00
gaurank kathpalia
f35d79a22b qcacmn: Clear Key information from driver memory after disconnect
Currently the key information i.e the key, and the number of keys
are not getting cleared on wifi link disconnection from wifi
driver memory, which can lead to information disclosure.

Clear the key information i.e the number of keys and
keys from wifi driver memory to avoid any potential information
disclore after wifi is turned off.

Change-Id: I2a3ea56d4e876b48dd7a5e456ed7d139600fab01
CRs-Fixed: 2415421
2019-03-26 02:51:05 -07:00
Santosh Anbu
9f4daf55f7 qcacmn: Add change for timeout to be executed in scheduler
When a serialization cmd is activated and activation is process in
scheduler context, it is observed that the timeout for that cmd
occurs and the cmd is released even though the activation in
scheduler context is still in progress.

This will lead to accessing the serialization cmd after free,
leading to memory corruption error.

Add change to avoid this by posting timeout message to scheduler
thread which will help synchronize the cmd execution in scheduler.

Change-Id: Ib2234331844f48d0d219f430f5b585f792282d42
CRs-Fixed: 2419854
2019-03-26 01:24:55 -07:00
Jeff Johnson
d97a5912d3 qcacmn: ftm: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within ftm replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I0b089f46e99ab72a9ae494267a32e8b342a08ae3
CRs-Fixed: 2418259
2019-03-26 01:24:52 -07:00
Rhythm Patwa
e409a8fd44 qcacmn: Add peer assoc and service ready param for hecap_info_internal
'hecap_info_internal' has been added to indicate support for 11ax
proprietary PHY features: 400ns SGI support in 1X/2X LTF and 2X LTF
support in 160/80+80MHz modes. Added the corresponding peer assoc
and service ready parameter.

Change-Id: I34ead9278d8d84ecbc5525867f1584f8c8a4d7b8
CRs-fixed: 2414163
2019-03-26 01:24:49 -07:00
Dustin Brown
50eab9871f qcacmn: Migrate qdf_ssr_protect/unprotect
qdf_op_protect/unprotect supersede qdf_ssr_protect/unprotect. Replace
calls to qdf_ssr_protect/unprotect with qdf_op_protect/qdf_op_unprotect.

Change-Id: Iab80e4cbf6b87b37a0d761e7ecea695b840c5e5e
CRs-Fixed: 2418450
2019-03-26 01:24:45 -07:00
Jeff Johnson
766ea098f6 qcacmn: os_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within os_if replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I1cf6f897d1d2722d112dd3f802d789652373eaed
CRs-Fixed: 2418254
2019-03-26 01:24:42 -07:00
Debasis Das
c39a68da37 qcacmn: Support for 8021p pcp to tid mapping
Add HAL and DP support to configure
8021p PCP to TID mapping tables into Hardware.

Change-Id: I8a54970c8c4ef56f3c487b6e648c4411b3abde0e
2019-03-25 14:24:36 -07:00
Pamidipati, Vijay
c736e83257 qcacmn: Add missing unmap in rx error path
Add missing qdf_nbuf_unmap and storing of rx_buf_start
in rx defrag error handling path

Change-Id: I53b4b76e01e89f5542feeff5af2328cc4414486b
CRs-Fixed: 2420080
2019-03-25 14:24:32 -07:00
Arun Kumar Khandavalli
ac6e126adf qcacmn: Add support to improve coex logging
Add support to get the various Coex data from the debugfs.
This commit adds the support to get the various coex data:
            * COEX STATE
            * COEX DPWB STATE
            * COEX TDM STATE
            * COEX IDRX STATE
            * COEX ANTENNA SHARING STATE

The specific state information can be read via the debugfs.

Example to read the COEX STATE logging:
            sm6150:/ # echo "1" > /d/wlan/mws_coex_status_info
            sm6150:/ # cat /d/wlan/mws_coex_status_info
                    Reading for command MWS_COEX_STATE.
                    vdev_id = 0
                    coex_scheme_bitmap =  0
                    active_conflict_count = 0
                    potential_conflict_count = 0
                    chavd_group0_bitmap = 0
                    chavd_group1_bitmap = 0
                    chavd_group2_bitmap = 0
                    chavd_group3_bitmap = 0

Change-Id: I92272ad7edf44df22730ac0fa992d876840ba632
CRs-Fixed: 2413955
2019-03-25 08:52:41 -07:00