Commit Graph

10394 Commits

Author SHA1 Message Date
Nisha Menon
ed3a77563a qcacmn: Add wbm head/tail pointer stats to dp_txrx_stats
Add wbm head/tail pointer stats to dp_txrx_stats and ring
usage percentage for all SRC and DST rings.
Stats added to the following cmd: iwpriv wlan0 txrx_stats 26 0

CRs-Fixed: 2865996
Change-Id: I7d144d87c5f3485ec9ba85f50b036b69a64e53c6
2021-03-11 18:01:27 +05:30
Aditya Kodukula
7679b0651a qcacmn: Add params to the wlan_minidump_remove function
For the minidump feature, the wlan_minidump_remove function
definition is modified. So, update the function parameters
accordingly at all instances of the wlan_minidump_remove function.

Change-Id: I5a346f6cdf423ece02fb08d68e4422251af54876
CRs-Fixed: 2860435
2021-03-09 21:07:01 -08:00
Aditya Kodukula
1c6fef8450 qcacmn: Modify the minidump_remove function
The wlan_minidump_remove function utilizes the updated kernel API.
So, modify the function definition and parameters accordingly.

Change-Id: Ib62a46688400d5d9c2ff45c17dc41d5f0b7f58d0
CRs-Fixed: 2860432
2021-03-09 21:06:58 -08:00
Aditya Kodukula
20380cee21 qcacmn: Add QDF infra for the minidump feature
Add QDF infra for minidump feature and define the
minidump_log and minidump_remove functions.

Change-Id: I875b991b7a7d9295f8b2acd95a7551a747ec962c
CRs-Fixed: 2856193
2021-03-09 21:06:54 -08:00
Vevek Venkatesan
17660198d7 qcacmn: disable all apps CE irqs except wake_irq in bus suspend
In Moselle, currently CE interrupts are not disabled from apps
side during ipci bus suspend, so adding changes to disable all
the CE interrupts except wake_irq during bus suspend and do the
symmetric inverse operation during bus resume, also drain all
the pending FW diag logs from copy engine.

Change-Id: Ib54fc6660fd81aff18787b0b699f3a6cd2d7803d
CRs-Fixed: 2879752
2021-03-09 08:57:09 -08:00
Basamma Yakkanahalli
4adab0e0a9 qcacmn: enable reo_status ring process in NSS offload mode
Add support to process reo_status rings in NSS offload mode
for lowmem profile.

Change-Id: If5aa3649f33fa8e1a9b328b8506dd398646d179c
2021-03-08 15:17:12 -08:00
Ananya Barat
7c33a279fd qcacmn: Do not enable all the dfs error prints by default
A huge number of prints come under dfs_err. Enabling all of these
unnecessarily floods the console and some of these prints show up for
expected behavior such as  the dfs object being null for a 6GHz radio.
Only memory specific prints could be enabled specifically later.

CRs-Fixed: 2887966
Change-Id: I27091924450d1cc3d4e3df38e49f1a537e080bc6
2021-03-07 02:27:41 -08:00
Vevek Venkatesan
7cda609ffb qcacmn: assert if SMMU-S1 map/unmap of IPA doorbell addr failed
If the SMMU-S1 mapping/unmapping of IPA doorbell addresses
failed, do assert.

Change-Id: I41faba7002be37c442d306199876c2204120fe31
CRs-Fixed: 2892321
2021-03-06 23:57:54 -08:00
sheenam monga
7359f9236d qcacmn: Add support to extract big data params
Add wmi support to extract params from
WMI_VDEV_SEND_BIG_DATA_P2_EVENTID.

Change-Id: Ifee6f5e94dc533af54c9333c434cdf9778eae3ca
CRs-Fixed: 2875576
2021-03-05 12:33:45 -08:00
sheenam monga
7ebc682b49 qcacmn: Add support to handle BIG_DATA_P2_EVENTID
Fw advertise big data stats in response of host
command WMI_VDEV_GET_BIG_DATA_P2_CMDID.
Add support to handle BIG_DATA_P2_EVENTID.

Change-Id: I550eb1c99ee1d8c102f9ad673841c410ff0829ef
CRs-Fixed: 2868922
2021-03-05 12:33:42 -08:00
sheenam monga
89ca16cb2f qcacmn: Add support to send WMI_VDEV_GET_BIG_DATA_P2_CMDID to fw
Send WMI_VDEV_GET_BIG_DATA_P2_CMDID to fw to get big data stats.

Change-Id: I40870a0d9106860f58272a200025870b41d4aef9
CRs-Fixed: 2861082
2021-03-05 12:33:36 -08:00
Amruta Kulkarni
64b096fde9 qcacmn: Support roam start and roam abort request in CM
Add support for roam start and roam abort request
in connection manager.

CRs-Fixed: 2882233
Change-Id: I5780e7f22363ee6014d39b0df9cb068b4afdd71c
2021-03-05 10:10:04 -08:00
Lincoln Tran
9f2767dd41 qcacmn: Update set country API to return failure
When country has not changed, reg_set_country will drop the request.
Return failure in this case so caller will know if no action is taken.

Change-Id: If6095887c6166edc626eab3bde312cc0aa8490b2
CRs-fixed: 2892356
2021-03-05 01:18:33 -08:00
Abhishek Singh
9b797fd035 qcacmn: Add logic to remove preauth and roam ser command
Add logic to remove preauth or roam command from serialization
depending on the state the roaming was in.

Change-Id: Ia381d040ce7e15a725eb2402896bf476d3236566
CRs-fixed: 2882994
2021-03-05 01:18:30 -08:00
Srinivas Girigowda
b29d1e9018 qcacmn: TWT: Add support for not in range and IE validation fail status code
Add support for TWT AP params not in range and IE validation failed
status code.
Presence of num_additional_twt_params is enough to extract the additional
params sent by the firmware, there is no need for extra status check.

Change-Id: I9fa6afd22aa4de1b2a5b75fa98a00f89768dd8cf
CRs-Fixed: 2890682
2021-03-05 01:18:26 -08:00
Karthik Kantamneni
f5fe106f3f qcacmn: Sanitize Rx buffer length received from H.W
Check if Rx single msdu length including padding and tlvs length
is greater than Rx buffer size allocated to H.W and raise error
to catch out of bound access.

Change-Id: I7c70b8a0b6828f7fd88a19141f9087430085c13a
CRs-Fixed: 2873933
2021-03-05 01:18:22 -08:00
Chaoli Zhou
bbccf20880 qcacmn: Correct the WMI command id for CFR
Fix the wmi command id is not right issue for
enable/disable periodic peer CFR capture if
ENABLE_HOST_TO_TARGET_CONVERSION not enabled.

Change-Id: I82ba6c781f67aa73f373a0a914838f482d86f165
CRs-Fixed: 2865389
2021-03-04 21:23:52 -08:00
Ashish Kumar Dhanotiya
ad9b0c99d0 qcacmn: Replace wlan_cm_roam_resp struct with wlan_cm_connect_resp
Structure wlan_cm_roam_resp and wlan_cm_connect_resp are identical
structures and in current code these structures are used for connect
and reassoc functionalities with different functions as these are
identical structures and only one structure can be used to reduce
the duplication of the code.

To address this code duplication issue replace wlan_cm_roam_resp
structure with wlan_cm_connect_resp.

Change-Id: I90949c25f46acd2fa78cebb70c9a04f0718b90c4
CRs-Fixed: 2875232
2021-03-04 06:37:09 -08:00
Amir Patel
6c6f067b65 qcacmn: Fix monitor link descriptor memory alloc failure
In existing approach, monitor rings get initalized
on monitor vap init time,
For linux 5.4 kernel, physical contiguous memory(512Kb) is not
available on vap init time.
Initialize monitor related rings on monitor vap creation time
to get required memory.

Change-Id: I288c27cfcf77b3d224c2f21bbe8ac65670f32dda
CRs-Fixed: 2865141
2021-03-03 00:49:09 -08:00
Shashikala Prabhu
e601f0d39d qcacmn: Modify the WIDE_BW_CHAN_SWITCH IE length check
Modify the length check to drop beacons which has
WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH IE length less than 3. This is to
accommodate the addition of fields to this IE in the future.

Change-Id: I8cba60b631022f4348cce90ae41a003964040ad1
CRs-Fixed: 2884249
2021-03-02 14:22:50 -08:00
Chaithanya Garrepalli
76112c241f qcacmn: fix use after free of tx descriptor
In dp_tx_send_msdu_multiple API fix use after
free of tx_desc in case of HW enqueue failed

Change-Id: Iec0375e394c706fa0c39ee18728ac1c02090461c
2021-03-02 14:22:45 -08:00
Karthik Kantamneni
f93e080576 qcacmn: Rate limit tid not setup DP error log
There is possiblity of receiving fragmented packets just before
tid setup is done, so rate limit the tid not setup error log
to avoid excessive cosole logging.

Change-Id: I372d3904650fcbf2ad11313da1087da52a0d3dc6
CRs-Fixed: 2884897
2021-03-02 14:22:40 -08:00
Shwetha G K
a48ce19f53 qcacmn: Validate the periodicity based on target
Allow cfr period to be multiples of 1ms for targets like
qcn9000, qca6018, qca8074v2 and qca5018.

For other targets, restrict it to be multiples of 10ms.

CRs-Fixed: 2878062
Change-Id: I7f5638adf8ef39f7b8b681ae6693f5f032217e88
2021-03-02 10:10:04 -08:00
Shashikala Prabhu
6dac66bcbf qcacmn: Fix compilation error when DIRECT_BUF_RX is disabled
Fix compilation errors when DIRECT_BUF_RX_ENABLE compile-time flag is
disabled.

Change-Id: I2bbce6eb8838ecab02b6462c1c0ee28877accdb4
CRs-Fixed: 2883310
2021-03-02 05:36:48 -08:00
Himanshu Batra
d269165345 qcacmn: Set value for locally_generated flag for disconnect response
Set value for locally_generated flag for disconnect response based on
disconnect req source

Change-Id: I4f693be98ca10a5f883f1a9349ed50876679e723
CRs-Fixed: 2880520
2021-03-01 22:50:10 -08:00
Shashikala Prabhu
c45259af49 qcacmn: Add missing qdf_mem_free in CFR pdev obj create function
Add missing qdf_mem_free in wlan_cfr_pdev_obj_create_handler().

Change-Id: I2f5528a95ec8429ab0a5853db4a0f34a6425903c
CRs-Fixed: 2887089
2021-03-01 18:54:10 -08:00
Kiran Kumar Lokere
a7436df393 qcacmn: QCA vendor attribute to configure Punctured Preamble Rx in HE cap
Add a QCA vendor attribute to enable/disable the Punctured Preamble Rx
support in HE PHY capabilities.
This attribute is used for testing purposes.

Change-Id: I5d0089ddc95beb334c73538431dde3a034a1bc21
CRs-Fixed: 2886737
2021-03-01 13:15:37 -08:00
Kiran Kumar Lokere
f94de208c2 qcacmn: QCA vendor attribute to disable data and management frame Tx
Add a QCA vendor attribute to configure the driver to disable data
and management response frame transmission to test the BSS max
idle period feature.
This attribute is used for testing purposes.

Change-Id: I106da43f9044bd15727152e04a233376e79e034a
CRs-Fixed: 2886732
2021-03-01 13:15:33 -08:00
Kiran Kumar Lokere
1da1673aae qcacmn: QCA vendor attribute to configure RU 242 tone for data Tx
Add a QCA vendor attribute to configure the driver/firmware to
use only RU 242 tone for data frame transmission.
This attribute is used for testing purposes.

Change-Id: I32af9b34b335887279a41f64d7e93b14d6f44f41
CRs-Fixed: 2884735
2021-03-01 13:15:29 -08:00
Kiran Kumar Lokere
ddd3c558ed qcacmn: QCA vendor attribute to configure BSS max idle period
Add a QCA vendor attribute to configure the driver with a specific BSS
max idle period value to advertise in (Re)Association Request frames.
This attribute is used for testing purposes.

Change-Id: Ibe98ab7947b759d9dcd3f963629de4dd6a86b543
CRs-Fixed: 2884705
2021-03-01 11:09:12 -08:00
sheenam monga
fe43d91ba9 qcacmn: Remove unused function wlan_reg_get_channel_state
Remove unused function wlan_reg_get_channel_state

Change-Id: I6f1a0366bae0eff5acbc3dd902f730fd554aee17
CRs-Fixed: 2869902
2021-03-01 09:09:36 -08:00
Jianmin Zhu
0eb2a50ed8 qcacmn: Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state
Remove WLAN_REG_IS_24GHZ_CH in wlan_reg_get_bonded_channel_state.
Remove definition of following:
WLAN_REG_IS_24GHZ_CH
wlan_reg_is_24ghz_ch
WLAN_REG_IS_5GHZ_CH
wlan_reg_is_5ghz_ch

Change-Id: I7bea616f0bb8e0b98bfe03e9fd66ef24588f59e3
CRs-Fixed: 2883685
2021-03-01 09:09:32 -08:00
Vignesh Mohan
51d711ef4c qcacmn: Introduce an API to fetch the bonded channel pair
Introduce a regulatory core API to fetch the bonded channel
pointer given a frequency and a channel width, using the
static bonded channel arrays for different bandwidths.

Change-Id: I87d91a45c59ba7d9ba6d692bb29822b184b4604b
2021-03-01 05:29:47 -08:00
Pavankumar Nandeshwar
cc26b39f01 qcacmn: skip current rx_desc when in_use bit is not set
As a software WAR for hardware issue where we are
getting wrong cookie value for a buffer which is already
mapped to another rx_desc with different cookie id and
is already has in_use bit set, we will skip the
processing for the current rx_desc when in_use bit
is not set.

Change-Id: I9f469bf1f4b03e0fb9a6694d9445a0c690224ccb
2021-02-28 23:52:12 -08:00
Will Huang
cb60cd6b2b qcacmn: Add back dfs_set_nol() to common code
dfs_set_nol function is also required by MCC DFS function, Change-Id
I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce move implementation from
common code to WIN, add back it.

Change-Id: I46c16eec82024c3af4b4cee02ff19edb0023d3b6
CRs-Fixed: 2875061
2021-02-28 20:00:49 -08:00
Himanshu Batra
311a257c9e qcacmn: Avoid NULL pointer dereferences
Add checks to avoid NULL pointer dereferences

Change-Id: I4b53936d6e08b5bb27c77dd9097a14c87d38f5a6
CRs-Fixed: 2887354
2021-02-26 11:50:35 -08:00
Karthik Kantamneni
c9cec76270 qcacmn: Avoid per packet Rx refill buffer pool lock
Avoid per packet Rx refill buff pool lock, instead
acquire/release lock for burst of nbuf's replenishment.

Change-Id: I778cb9702d31d4b8911cca4e7f06f12c50ef6df9
CRs-Fixed: 2884208
2021-02-25 23:21:25 -08:00
Jingxiang Ge
58b2f08534 qcacmn: Add lock protection for prevent_suspend_list
Need to protect prevent_suspend_list by runtime_lock.
Issue happens when
1 printing lock0 of prevent_suspend_list in thread0
2 thread0 scheduled out and lock0 is released.
3 return back to thread0, it will using lock0 pointer
  to check next lock, then issue happens.

Fix is adding runtime_lock to protect.

Change-Id: I7182651e445cf5008dba73e15b2c261cc125577f
CRs-Fixed: 2883052
2021-02-25 18:31:46 -08:00
Edayilliam Jayadev
4283a1ae62 qcacmn: Reset 160 MHz state machine on error
Reset the 160 MHz state machine on any error
while processing a Spectral report.

CRs-fixed: 2879610
Change-Id: I982d12edc5c9aa24b0255fbcb932d198a6da514b
2021-02-25 07:36:07 -08:00
gaurank kathpalia
10469149f2 qcacmn: Optimize event_handled while handling events
Optimize event_handled while handling connection manager events.

Change-Id: I0e6604fe8757c4a812941e178dbcfe6b00d677eb
CRs-Fixed: 2885958
2021-02-25 07:36:03 -08:00
Lincoln Tran
6118d488dd qcacmn: Expose freq validation API
Create a wrapper for the reg_is_freq_present_in_cur_chan_list API so
other modules can invoke it.

Change-Id: I0e21b15f1e08bb4301329b6b1a3c3c40edc09060
CRs-fixed: 2884768
2021-02-24 23:33:17 -08:00
Nisha Menon
8d4b739df0 qcacmn: Enable device force wake recipe in driver
Enable force wake recipe feature DEVICE_FORCE_WAKE_ENABLE
and disable the generic shadow register write feature
GENERIC_SHADOW_REGISTER_ACCESS_ENABLE.
Force wake recipe will be used to write to the REO remap
control registers by waking up the UMAC instead of using
shadow register writes.
Assert soc wake reg and poll on the scratch reg to check
if UMAC is awake.
Enable HIF_REG_WINDOW_SUPPORT to enable windowed reg
read/write in HIF layer.

Change-Id: Ib696e27e19a07c0084c097b95b7780b56e643c8b
CRs-Fixed: 2850590
2021-02-24 19:35:13 -08:00
gaurank kathpalia
fffe13cbc9 qcacmn: Fix the pointer reset in cm_allocate_and_copy_ies_and_keys
In cm_allocate_and_copy_ies_and_keys instead of target's pointer
source's pointers are reset thus making the following code void

Fix this by resetting the target pointers which needs to be allocated
with new memory.

Change-Id: I4417492c43eb27833d365ec4aa644e07ed4eca51
CRs-fixed: 2884187
2021-02-24 01:51:45 -08:00
gaolez
76469c8aee qcacmn: Optimize congestion calculation logic
In current code logic, in case of channel utilization value is 0, the
congestion value treated as “not present” and give it a medium score.
This will cause a very clean channel get a medium score.
To fix the issue, need calculated congestion score from 1-100 and
not 0-100.

Change-Id: Iff030cf4a682d6e585d6f812a522cb8b6683cc44
CRs-Fixed: 2812978
2021-02-24 01:51:40 -08:00
Basamma Yakkanahalli
5c02cbbc5e qcacmn: Reset rxdma2host dst ring mask for ipq5018 target
During interrupt mask initialization bitmap of rxdma2host
destination ring mask is filled in host mode.
To avoid spurious interrupts reset this interrupt mask
when NSS offload is enabled.

Change-Id: I513a78639898c6f2bd9ea5418def03d64d7232d0
2021-02-23 23:40:23 -08:00
Shiva Krishna Pittala
a577961e92 qcacmn: Optimize scm_age_out_entries()
To check if a scan entry is a non-Tx VAP of our connected BSS, the current
implementation of scm_age_out_entries() searches through all scan entries
to find out our connected BSS. This check takes O(n) time where n = number
of scan entries. Running this check in the main loop of
scm_age_out_entries() results in an overall time complexity of O(square(n))

Time complexity can be improved if we do one iteration over scan entries
to find out our connected BSS, and save it in a local variable, and then
use that local variable in the main loop of scm_age_out_entries().
With this approach, we just do two iterations over scan entries
instead of nested iterations.

CRs-Fixed: 2877884
Change-Id: I51be764f4aa6f65ba9068d46eaa42791ac0f8d97
2021-02-23 10:52:04 -08:00
Bapiraju Alla
7f0008db3f qcacmn: Add service bit support for LL_GET_STA command over QMI
For some targets, FW expects WMI_REQUEST_UNIFIED_LL_GET_STA command
always over QMI irrespective of WOW state. FW will crash if this request
is sent over WMI on those targets. Currently there is no direct way for
the host to identify this requirement by FW. So FW may crash when this
WMI_REQUEST_UNIFIED_LL_GET_STA stats request is sent over WMI.

To resolve this, add service bit support for LL_GET_STA request over QMI.
With this change the INI parameter send_ll_and_get_station_stats_over_qmi
becomes obsolete and corresponding code will be removed.

Change-Id: I43f2827a0b1cae6e75f1224f452f8277d53736b2
CRs-Fixed: 2847483
2021-02-23 05:31:18 -08:00
Abhishek Singh
1c177a9a31 qcacmn: Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr
Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr, as
interface manager .h files take care of it.

Change-Id: I5b1e07beecd93c98429318372ed72fdf414712a4
CRs-fixed: 2878656
2021-02-23 05:31:13 -08:00
Jinwei Chen
017c719e4b qcacmn: Add HIF changes to support WCN7850
HIF changes to support WCN7850 WLAN chipset.

Change-Id: I02cd0702839a09b13a10b95237519f900a4cb7f9
2021-02-23 02:51:20 -08:00
Karthik Kantamneni
d4119f1507 qcacmn: Use msleep instead of mdelay in hif_force_wake_request
When hif_force_wake_request is called from non interrupt context
use msleep to avoid mdelay since it is busy wait function.

Change-Id: Icda50e9d18b64369128a4f669ca1259931e5194a
CRs-Fixed: 2883178
2021-02-23 00:37:51 -08:00