Commit Graph

9968 Commits

Author SHA1 Message Date
Aakanksha Doda
03d2eeb345 qcacmn: Add support for Green AP SMPS feature
Add feature support for GAP SMPS mode

Change-Id: I40b9efb6ef22fe4bebdb30939f19d8d112065344
2020-12-23 02:44:58 -08:00
Shikha Bakshi
3eeace37b2 qcacmn: Modify logs for QDF_MODULE_ID_DP_CDP and QDF_MODULE_ID_DP_VDEV
Add macros like dp_cdp_debug, dp_cdp_err, dp_cdp_info, dp_vdev_info,
dp_vdev_err, etc. to define logs

Change-Id: I176c0579af9b5ef2f14846fac1e8182309636464
CRs-Fixed: 2840489
2020-12-22 18:47:49 -08:00
Shikha Bakshi
3de99369a0 qcacmn: Modify Logs for QDF_MODULE_ID_RX
Add macros dp_rx_info, dp_rx_debug, dp_rx_err,etc.
to define logs

Change-Id: I75820f9f19f876d9fb91b977f56e205b3e275444
CRs-Fixed: 2841584
2020-12-22 14:41:30 -08:00
Shiva Krishna Pittala
ee5f45a176 qcacmn: Read the Direct Buf Rx tail pointer in the Host order
Direct Buf Rx has a source ring to communicate with the target.
The target updates its tail pointer in little-endian format and this update
doesn't go through any byte-order conversion at the target. On a big-endian
Host platform, this tail pointer will be read in reverse order of bytes.
To fix this, convert the tail pointer to the Host order before using it.

Change-Id: Ibcaf3d7507910ea81eeb895772241ab9861ee45a
CRs-Fixed: 2843259
2020-12-22 10:44:16 -08:00
Shikha Bakshi
c1e00a21ba qcacmn: Modify logs for QDF_MODULE_ID_DP_PEER
Add macros dp_peer_info, dp_peer_info_low,
dp_peer_info_high, dp_peer_alert, dp_peer_err,
dp_tx_capture_debug to define logs.

Change-Id: Icf71595c10b1a4f0dca53f6953af4df19210e924
CRs-Fixed: 2832004
2020-12-22 06:40:31 -08:00
Shikha Bakshi
89662c1eeb qcacmn: Modify Logs for QDF_MODULE_ID_DP_INIT
Add macros like dp_init_debug, dp_init_err, dp_init_info, etc. to
define logs

Change-Id: I5b0f48b2f0b4b5d6be19850e2fff928672d09ad1
CRs-Fixed: 2837411
2020-12-22 06:40:26 -08:00
Shikha Bakshi
795eb11c9b qcacmn: Modify logs for QDF_MODULE_ID_DP_RX_ERROR
Add macros dp_rx_err_info, dp_rx_err_debug, dp_rx_err_err,etc.
to define logs

Change-Id: I0dc4810412f9ed238708850de12b5d5730e9fa4b
CRs-Fixed: 2830612
2020-12-22 04:43:55 -08:00
Shikha Bakshi
7cdc796f7e qcacmn: Modify logs for QDF_MODULE_ID_DP_RX_MON_DEST
Add macros dp_rx_mon_dest_info, dp_rx_mon_dest_debug,
dp_rx_mon_dest_err,etc. to define logs

Change-Id: I2a016ee8e3e74b745e776f1f7266d94bb9698892
CRs-Fixed: 2830629
2020-12-22 02:45:52 -08:00
Shikha Bakshi
b2026ef94f qcacmn: Modify logs for QDF_MODULE_ID_DP_RX_MON_STATUS
Add macros dp_rx_mon_status_info, dp_rx_mon_status_debug,
dp_rx_mon_status_err,etc. to define logs

Change-Id: I1a6a23cbf602f1c7e50385142967eec39d0e47a9
CRs-Fixed: 2832009
2020-12-21 23:30:35 -08:00
Ashish Kumar Dhanotiya
35998406e0 qcacmn: Allow 6GHz AP for WPS
With current implementation host does not allow
6GHz AP for WPS security, add a change to allow 6GHz AP for WPS.

Change-Id: I9e330f2984a716bb56e47313b65eedb4a1a0e216
CRs-Fixed: 2814259
2020-12-21 20:55:23 -08:00
Adwait Nayak
8ca19e58fe qcacmn: Add memory corruption check
Do not allocate memory if the ask is larger than the
maximum memory allowed for malloc. We have it limited to 4MB.

CRs-Fixed: 2828104
Change-Id: I5b463dd8eb640c76882653e82e6f6db7cb651cf2
2020-12-21 20:55:20 -08:00
Shikha Bakshi
a7a79a9b8d qcacmn: Modify logs for QDF_MODULE_ID_DP_REO
Add macros dp_reo_info, dp_reo_debug, dp_reo_err,etc.
to define logs

Change-Id: I4e8d04f5b702d11582a17c6a1c783ded980e3334
CRs-Fixed: 2841636
2020-12-21 20:55:16 -08:00
Shashikala Prabhu
8c3705336e qcacmn: Add support to send FTM responder/initiator cmd to target
Add support to send FTM responder/initiator support to target.

Change-Id: I6649d90941a7448ff1901a3f1194d8d0620481cc
CRs-Fixed: 2781144
2020-12-21 20:55:11 -08:00
Shikha Bakshi
470483ff5c qcacmn: Modify logs for QDF_MODULE_ID_DP_STATS
Add macros dp_stats_info, dp_stats_debug, dp_stats_err,etc.
to define logs

Change-Id: Ibd5e7a225c91df6c71a523bcb002cc8cb2eed34d
CRs-Fixed: 2831152
2020-12-21 04:50:01 -08:00
Chaithanya Garrepalli
078584f12d qcacmn: fix vdev ref leak in tx exception path
Fix vdev ref leak issue in SG processing in Tx exception path

Change-Id: I8416b738f0c583276ec341e66685de947e419e6c
2020-12-21 04:49:57 -08:00
Jyoti Kumari
438c1832b3 qcacmn: Don't optimize 6g channel list in first full scan request
Currently, 6g PSC/non-PSC channels in the scan request are
scanned or optimized to scan only if RNR IE is found based on
the inis scan_mode_6ghz and scan_mode_6ghz_duty_cycle.
As scan_mode_6ghz_duty_cycle is set to 4 by default, first 3
scans are optimized to scan only if RNR IE is found and 4th scan
would be full scan. If there is any standalone AP in 6g channel
that doesn't advertize RNR IE in colocated APs beacons/probe
responses, that's not scanned till the 4th scan.

Reverse the order for scan_mode_6ghz_duty_cycle such that the
first scan of every four scans is a full scan and rest of the
three scans are optimized. So, the standalone 6g APs can be found
in first scan itself based on the ini scan_mode_6ghz.

Change-Id: Ice1614a94f1fd166e283355616ace241a5df2bcb
CRs-Fixed: 2829550
2020-12-21 01:34:35 -08:00
Shashikala Prabhu
9cbe634741 qcacmn: Define callback functions for LCI/LCR command send
Define callback functions to send LCI/LCR commands to  FW.

Change-Id: I4a9d97f65a4d5b3fbeb017e165ef207941af85ee
CRs-Fixed: 2832129
2020-12-20 05:04:54 -08:00
Shikha Bakshi
7ae3ccdc47 qcacmn: Modify logs for QDF_MODULE_ID_DP_TX and QDF_MODULE_ID_DP_TX_COMP
Add macros like dp_tx_info, dp_tx_comp_info,
dp_tx_debug, dp_tx_comp_debug, dp_tx_err,
dp_tx_comp_err, etc.  to define logs

Change-Id: If0eef8112db1f8e99fb95ee943d5ddbff94425b8
CRs-Fixed: 2830563
2020-12-19 12:46:07 -08:00
Hariharan Basuthkar
763cef6b29 qcacmn: Add a boolean is_chan_hop_blocked in struct regulatory_channel
Add a boolean is_chan_hop_blocked in struct regulatory_channel to check
if a channel is blocked for ACS hopping, when the noise detection param
on that particular channel is above the threshold.

Change-Id: Id1c73f1b153d2064eaf3a72a21d14a6f63ad0de4
CRs-Fixed: 2837859
2020-12-19 12:46:02 -08:00
Nisha Menon
bcf8d7b876 qcacmn: Account for IPA Tx buffers memory
Account for the Tx buffers allocated for IPA during
init. Add this memory to the overall Tx nbuf memory
allocations. Ensure that the nbuf size is taken from
end pointer to head pointer of nbuf.

Change-Id: Ie3a46c7e7674f3f2e1bf9e0791a7eb53d4bb0b21
CRs-Fixed: 2831015
2020-12-18 19:38:54 -08:00
Nisha Menon
af829916ee qcacmn: Account for Tx nbuf memory in mapped unmapped TSO segs
During TCP Tx traffic account for the Tx nbuf memory mapped
and unmapped in the driver.

Change-Id: I40df92f124eec94f2fa3ddc8bcd910615f4539bf
CRs-Fixed: 2831015
2020-12-18 19:38:29 -08:00
Shiva Krishna Pittala
8f049e633b qcacmn: Spectral changes to support big-endian Host platforms
WLAN chip components are little-endian based. When such a chip is attached
to a big-endian Host platform, there will be a mismatch in the order of
bytes for the data that is transferred between the Host and target.

Spectral HW module transfers the Spectral report directly to the Host DDR.
This transfer doesn't go through any byte-order conversion at the HW side.
So, to avoid invalid reads at the Host side on a big-endian platform,
convert the Spectral report to the Host byte-order before using it.

Change-Id: I742537f3a95ffca2e12b83535e83e2870ad06b10
CRs-Fixed: 2838371
2020-12-18 13:35:46 -08:00
Shikha Bakshi
f429625c5b qcacmn: Modify logs for QDF_MODULE_ID_DP_HTT
Add macros dp_htt_info, dp_htt_debug, dp_htt_err,etc. to define logs

Change-Id: I9226f3f7cabb4e861ff279ab239c6bc400a6c8cf
CRs-Fixed: 2830387
2020-12-18 09:36:38 -08:00
Shikha Bakshi
89ce8c9600 qcacmn: DP Logging Enhancements
Add the below modules for Logging :

	QDF_MODULE_ID_DP_INIT
	QDF_MODULE_ID_DP_TX
	QDF_MODULE_ID_DP_TX_CAPTURE
	QDF_MODULE_ID_DP_RX
	QDF_MODULE_ID_DP_STATS
	QDF_MODULE_ID_DP_HTT
	QDF_MODULE_ID_DP_PEER
	QDF_MODULE_ID_DP_RX_ERROR
	QDF_MODULE_ID_DP_HTT_TX_STATS
	QDF_MODULE_ID_DP_RX_MON_STATUS
        QDF_MODULE_ID_DP_RX_MON_DEST
	QDF_MODULE_ID_DP_REO
	QDF_MODULE_ID_DP_TX_COMP
	QDF_MODULE_ID_DP_VDEV
	QDF_MODULE_ID_DP_CDP
	QDF_MODULE_ID_TSO
	QDF_MODULE_ID_ME
	QDF_MODULE_ID_QWRAP
	QDF_MODULE_ID_DBDC_REP
	QDF_MODULE_ID_EXT_AP

Change-Id: Id00e95bcc3720b6062326fa71f19a9698064c292
CRs-Fixed: 2827322
2020-12-18 09:36:34 -08:00
Paul Zhang
59ef5a49a8 qcacmn: Add support for WMI_TWT_NUDGE_DIALOG_CMDID
Add support for WMI_TWT_NUDGE_DIALOG_CMDID and
WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID.

Change-Id: I9d4bf1061f6f08479967619ce50d2756c062f55f
CRs-Fixed: 2825138
2020-12-18 01:50:16 -08:00
Santosh Anbu
1e98fba13b qcacmn: Check return value of connect active indication
Add change to check the status of connect active indication.

Change-Id: I69afbfba0b8d35c5fafa2d9f7353ade39e41bf92
CRs-Fixed: 2840344
2020-12-18 01:50:13 -08:00
Santosh Anbu
d809f21be6 qcacmn: Update kernel doc for mlme callback
Add doc for mlme_vdev_replace_csa_with_stop_start

Change-Id: Id87ce78e7b8773900959299ae5050ec12a274dc2
CRs-Fixed: 2840344
2020-12-18 01:50:09 -08:00
Liangwei Dong
6e67047de5 qcacmn: Report thermal target shutdown level
Support new firmware thermal level WMI_THERMAL_SHUTDOWN_TGT
to indicate target over heat and need to be shutdown completely.

Change-Id: Icdb8aab9fe7b8914681cc46a4ccb5579781c587d
CRs-Fixed: 2835410
2020-12-17 23:46:06 -08:00
Zhaoyang Liu
fe5c7293e1 qcacmn: fix might sleep crash issue during rx buffer smmu mapping
When driver doing ipa rx buffer smmu mapping,
qdf_spin_lock_bh is used to protect rx descriptor pool,
but might sleep function is called by API ipa_is_ready.
This causes kernel panic about sleeping function called
from invalid context as following call trace:

  Call trace:
  ___might_sleep+0x204/0x208
  __might_sleep+0x50/0x88
  __mutex_lock_common+0x5c/0x1078
  mutex_lock_nested+0x40/0x50
  ipa3_is_ready+0x2c/0x60
  ipa_is_ready+0x24/0x38
  dp_ipa_handle_rx_buf_pool_smmu_mapping+0x2dc/0x6d0 [wlan]

Move the ipa is ready check function call outside of spin lock.

Change-Id: I5d3a79dff8a045791834733514a40f7c1ccb0d8b
CRs-Fixed: 2839292
2020-12-17 23:46:02 -08:00
Jinwei Chen
4bb0d61adf qcacmn: set different rx thread default pending threshold
Set different rx thread default pending threshold for def/perf
build.

Change-Id: I35bdac10da80f4cf6e5f3ea6cb499c48ce51f617
CRs-Fixed: 2833939
2020-12-17 15:41:49 -08:00
Vijay Krishnan
901ac719a7 qcacmn: Move WIN specific DFS features to WIN code
Move the WIN only DFS features from common code to WIN specific
Component dev. The following features are moved.
1. WIN Hardware mode switch.
2. StaDFS
3. dfs_set_nol
4. nol_history

CRs-Fixed: 2834311
Change-Id: I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce
2020-12-17 15:41:45 -08:00
Manikanta Pubbisetty
ade01cf0de qcacmn: fix use after unmap case for HTT packets
When the number of HTT packets in the endpoint TxQueue is more
than MaxTxQueueDepth, we hit the overflow condition. If the
overflow condition is hit, in htc_try_send(), when EpSendFull()
returns HTC_SEND_FULL_KEEP, we try to send all the excess packets.

As part of this logic, we are calling restore_tx_packet(); the
intention of calling resotre_tx_packet() is to just perform
skb_pull_head(), but restore_tx_packet() will also unmap the
HTT packet. Later, when we try to send the excess packets, these
would be already unmapped and when the HW/FW try to access this
unmapped location, it would lead to SMMU fault.

Change-Id: Ie60a302d6a2736f7aa12944b7016d2bdb9ffb10d
CRs-Fixed: 2836444
2020-12-17 13:40:03 -08:00
Bapiraju Alla
25509a1510 qcacmn: Request stats over qmi only when target suspend is success
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.

To address this, send stats request over QMI only after the ack is
received for the target suspend command.

Change-Id: Id7a79d52740916f66476bf911e571c0ff466c7d3
CRs-Fixed: 2838737
2020-12-17 11:44:33 -08:00
Srinivas Girigowda
7db601e3af qcacmn: Introduce wmi_validate_handle()
Introduce wmi_validate_handle() with the caller function name
embedded in it to validate the WMI handle and log incase
of error. Calling functions can avoid logging in case
wmi_validate_handle() returns -EINVAL. This reduces logging and
thereby memory foot print.

Change-Id: Ie0a6a84ffad6e5cf2da8f547c7209dc77cdf5729
CRs-Fixed: 2838960
2020-12-17 11:44:29 -08:00
Neha Bisht
0e390d9bab qcacmn: Provide support for avg. phyrate stats
Provide support for average tx and rx phyrate statistics

Change-Id: Ib1c2d2c90ca6a8a0f1ac1bc08d9e1f89537cbb4d
2020-12-17 05:11:54 -08:00
Pavankumar Nandeshwar
958652969d qcacmn: Enable cfr on QCN9100
HAL changes to fetch cfr information from
PHYRX_PPDU_END_TLV & RXPCU_PPDU_END TLV for QCN9100

Change-Id: Idf003d8be49b154cfe6e2e5e0628245ad9d7f499
2020-12-17 03:05:33 -08:00
Pavankumar Nandeshwar
37a9d7cf5c qcacmn: add CFR changes for QCN9100
Add CFR related changes for target type
QCN9100

Change-Id: I44f7a521fb38f883b6e1a6a71e39805a1da69687
2020-12-17 03:05:28 -08:00
Bapiraju Alla
97c6bdfd2a qcacmn: Flush Rx diag event work during idle shutdown
Currently, Rx diag event work is not being flushed during idle shutdown.
This may result in use after free access if the scheduled diag event work
gets the chance to execute after driver modules are closed.

To address this, flush diag events work during idle shutdown.

Change-Id: I348e80d2c86a5e070f0fb67d66b758529fede76c
CRs-Fixed: 2838020
2020-12-16 19:08:29 -08:00
Yeshwanth Sriram Guntuka
2ae7335604 qcacmn: Use the pld register window lock for Lahaina and Cedros
Use the pld register window lock for Lahaina and Cedros.

Change-Id: I34431dce6c5ed6e03f5805e36fd7df47754a8c14
CRs-Fixed: 2835825
2020-12-16 11:55:58 -08:00
Shiva Krishna Pittala
bba4c15b50 qcacmn: Fix qdf_snprintf() wrapper
Current Linux version of qdf_snprintf() doesn't pass the additional
arguments(...) to snprintf(). As a result, the behavior is undefined.
Fix it by passing the additional arguments as a variable-argument-list to
vsnprintf().

Change-Id: Iea8ee0737907eaaea2df99631316d7d45a8e562f
CRs-Fixed: 2838962
2020-12-16 11:55:54 -08:00
Bapiraju Alla
debcd9c86d qcacmn: Discard QMI events when message with invalid length
Currently QMI message length is not being validated before
handling QMI event. This is resulting in illegal memory access
when QMI message length is invalid.

To address this, discard QMI events with invalid length.

Change-Id: Ia9f04bcb4fa3b365cbbf2be8885a8d30f78f8f10
CRs-Fixed: 2839277
2020-12-16 11:55:50 -08:00
Liangwei Dong
d4b3e3d043 qcacmn: Don't unlink connected bssid
In dual station case, wlan0 is connected to AP, wlan1
connects to the same ap and will get failed because two
interfaces can not connect to same band (same ap).
At present wlan1 will do unlink bss of ap after connect fail.
This may corrupt the bss tree in kernel because the bss is
still pointed by wlan0’s wdev -> current_bss.
Fix by avoid the unlink bss if the bss is still connected
in any interfaces.

Change-Id: I27c76eca2d4f130addabbdc2600f6959d24c8511
CRs-Fixed: 2837496
2020-12-16 09:55:49 -08:00
Saket Jha
566de9aa04 qcacmn: Rate limit REO error logs
Rate limit per packet reo error code logs in reo exception path.

Change-Id: Ic025531a122a1ae972cddd9d7241c0504d363055
CRs-Fixed: 2838071
2020-12-16 06:44:30 -08:00
Alan Chen
e940d94d42 qcacmn: Log important resource config during wmi init
FW memory allocation depends upon important resource config sent from
host during wmi init. Hence, log these important resource config parameters
sent during wmi init.

Change-Id: I5e187b905716a5a2c1767bc4b081f54034994653
CRs-Fixed: 2839119
2020-12-16 02:44:47 -08:00
phadiman
d1bb528ae7 qcacmn: Host Static Memory Optimization (in NSS offload mode)
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode

Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)

CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
2020-12-15 13:34:26 -08:00
Surya Prakash Raajen
21de33ef5d qcacmn: Add support for preferred streams in multivdev restart
Add support to send preferred_xt_streams and preferred_rx_streams
in multivdev restart.

CRs-Fixed: 2833470
Change-Id: I2c06a8bd9a64b15126e216eeb65699e104cbca64
2020-12-15 11:45:07 -08:00
Vijay Krishnan
607a31ed7e qcacmn: Move the post NOL feature to win code
The macro QCA_SUPPORT_DFS_CHAN_POSTNOL is specific to WIN code.
Therefore remove the macro QCA_SUPPORT_DFS_CHAN_POSTNOL and
associated code from Common code and add it to component dev.

CRs-Fixed: 2829537
Change-Id: Ib49424c44817d6af5e485c87d6f7b08afee4fa11
2020-12-15 09:50:27 -08:00
Vijay Krishnan
7136aa40cb qcacmn: Move DFS_BANGRADAR from common code to WIN
Remove the following functions from Common dev to component-dev:
1) dfs_bangradar
2) dfs_start_host_based_bangradar
3) dfs_fill_emulate_bang_radar_test
4) dfs_check_bangradar_sanity
5) dfs_start_host_based_bangradar

CRs-Fixed: 2829438
Change-Id: I5d3564bcb89e60629ee7fddc9827e03e9d9da6a2
2020-12-15 09:50:23 -08:00
Vinay Gannevaram
860977d0dc qcacmn: Use local skb pointer for reentrant cld80211_msg_allocator
cld80211_oem_rsp_alloc_skb api is used to alloc skb for reply msg.
A static buffer pointer is returned from this reentrant func
which can be called by kworker and scheduler thread at same
time resulting single buffer access by both threads. After
kworker thread freeing this skb, scheduler is further updating
data in this skb resulting in page fault error. Use local
skb pointer to avoid such race conditions

CRs-Fixed: 2822390
Change-Id: I5f807d06c4890b027c86de9187f17fb83b19db5e
2020-12-15 03:36:00 -08:00
Santosh Anbu
1ba0c0f3b3 qcacmn: Remove unused mlme functions for STA vdev
With connection manager convergence the STA vdev related ops are
being handled under converged code.

Remove unused functions from mlme interface.

Change-Id: Ibd90ef81b235bca1097891eb4964e2b5e741292c
CRs-Fixed: 2837096
2020-12-15 01:36:17 -08:00