Commit Graph

12674 Commits

Author SHA1 Message Date
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
Vignesh Mohan
657091506b qca-wifi: Do not add 80MHz non DFS channels in precaclist
While initializing the DFS preCAC lists in a SBS device, 36HT80
is added a valid tree node and preCAC is triggered on the channel.
Do not add 80MHz non DFS channels in the preCAC list and handle
the restricted 80p80 as a special case.

Add a new API in regulatory to find out if a given frequency
and width combination has any DFS sub frequencies in it.

Change-Id: I4ca3abbec63e303e48ca9c271c90ce542d3d12ab
2021-02-26 05:17:09 -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
nobelj
4570ba437f qca-wifi: add fix for last set bit to update ba size
update last set bit after enqueue bitmap modified as ba size are updated
based on last set bit.

Change-Id: I56223b8b6ad67445de6d27080b20a34b256c592a
2021-02-24 11:33:58 -08:00
Linux Build Service Account
a1e9b9e99e Merge "qca-wifi: fix on ppdu_info mem error" 2021-02-24 06:20:07 -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
Vijay Krishnan
b3a6790e42 qca-wifi: Move dfs_set_nol back to common code
The dfs_set_nol feature is moved to WIN code as part of an FR58190.
But the dfs_set_nol feature is used by MCL. Therefore moving the
dfs_set_nol feature back to common code so that both MCL and Host can
use the dfs_set_nol feature.

CRs-Fixed: 2883810
Change-Id: I4bfa55cbf984f612043a11893704603d3e282cb5
2021-02-24 10:40:12 +05:30
Ruben Columbus
e141cea9cc qca-wifi: fix on ppdu_info mem error
Fix mem error by collecting bitmap from mppdu_info before mpdu_info is
free.

Change-Id: I5a8aa1975dd868b60ece6e26f9e74bd7d1a5c2af
2021-02-23 14:30:06 -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
Christopher Chopp
a8aa104c16 qca-wifi: Add definitons for resource profile APIs
Add definitions for an API to update the size of
optional and vendor IEs for non-Tx vaps in EMA.

Change-Id: Ia7479cf0e9a60946264a00256685a41647d217f1
2021-02-23 09:42:10 -08:00
Linux Build Service Account
a087772c37 Merge "qca-wifi: Command to configure max auth failure packets" 2021-02-23 06:10:41 -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
Linux Build Service Account
c7c22f091a Merge "qca-wifi: filter out frames with tlv miss" 2021-02-22 18:10:26 -08:00
Sridhar Selvaraj
0b9fda7048 qca-wifi: Command to configure max auth failure packets
Add IEEE80211_PARAM_AP_MAX_AUTH_FAIL for configuring
max auth failure packets to be sent auth failure response
frame in 15 seconds time slot.

Change-Id: I5348ca5436bf719b7c261d1f2cdf97778e635e51
2021-02-22 17:25:10 +05:30
Santosh Anbu
6f28758c51 qcacmn: Handle down event in disconnection progress state
For STA mode with STA CAC enable in  auth/assoc state of assoc sm,
a northbound disconnect request would have to wait until CAC and
assoc is completed and connect request is removed from serialization
queue. During which OSIF timeout is seen as CAC can exceed the
serialization timeout of 60s.

Add change to handle EV_DOWN in disconnection progress state which
brings down the connection immediately on receiving a disconnect
request.

Change-Id: I301e49164c69df99e4617dd6fbc012e449963521
CRs-Fixed: 2882876
2021-02-21 23:48:57 -08:00
Rathees kumar Chinannan
8b5a4d4acb qca-wifi: Add lock for EXTAP table
Change to add lock for EXTAP table to avoid double free issue

Change-Id: Ie5f9d86ca8b4b5bb88e930a4d0fb2d03e5759dae
CRs-Fixed: 2881897
2021-02-21 22:39:03 -08:00
Krishna Rao
c1f8d94b0d qca-wifi: Remove IEEE80211_PARAM_EXT_IFACEUP_ACS
The per-VAP ext_ifu_acs configuration had been deprecated in order to
prevent internal and external ACS from running in parallel and
conflicting with one another. Remove definition of
IEEE80211_PARAM_EXT_IFACEUP_ACS since the deprecation would have
stabilized.

Change-Id: Ie21924b5f5347088513a6773aafc5531658a32d3
CRs-Fixed: 2882550
2021-02-21 20:49:23 +05:30
Hariharan Basuthkar
5af6064a0c Revert "qcacmn: Fix reg rule parsing order"
This reverts commit I5bb22a1dcd3f1c95d8f4498b03d6cc6eedcfe44c.

Change-Id: Ib7bf273a53f382da36106eab0a1b26af33d35a65
CRs-Fixed: 2880944
2021-02-20 23:34:56 -08:00
Bapiraju Alla
e9dd7d1d40 qcacmn: Update error if failed to read at least one INI parameter
INI parameters parsing can fail because of fail to read INI file or
failed to parse at least one parameter. In some scenarios, driver should
assert if parsing is failed for atleast one INI parameter.

To differentiate these two failures, return different error status
values.

Change-Id: I187d2b2e8f55af47a14561302d8b62e84de7da5a
CRs-Fixed: 2878966
2021-02-19 13:45:01 -08:00
Abhishek Ambure
cd38c6bd4e qcacmn: Add host support for OCV service supported by FW
FW advertises WMI_SERVICE_OCV_SUPPORT bit in service ready event if
firmware supports Operating Channel Validation feature.

Change-Id: Ida1ee9874f9cd32a684ceee728e3323306137c64
CRs-Fixed: 2880794
2021-02-19 05:40:14 -08:00
sheenam monga
df4587eb5f qcacmn: Add additional attributes for the QCA vendor command
QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO to get finer details on roaming
behavior, TSF out of sync count, and the latest TX rate, Rate Index used
for the transmission.

Change-Id: I34d112a263a587603f555069c0244f61dc44ec73
CRs-Fixed: 2876411
2021-02-19 02:35:22 -08:00
Vivek
f56dc1d2c6 qca-wifi: Add command to configure scheduler watchdog timeout
Add command to configure scheduler watchdog timer expiry value

CRs-Fixed: 2834597
Change-Id: I078f8a7ede599c7fdd79f5738c961553386f546f
2021-02-18 09:08:46 -08:00
Harsh Kumar Bijlani
725ee94dca qcacmn: Fix wifistats issue for WIN
For WIN, a specific raw event handler is used for handling
WMI_CTRL_PATH_STATS_EVENTID received from FW.

As a part of control path stats infrastructure, event handler
for WMI_CTRL_PATH_STATS_EVENTID is different and this results
in wifistats functionality break for WIN side.

Make changes to use WIN specific event handler.

Change-Id: I2ac677c3ca55cd783734d1137c39b8ee1d5dcbf5
CRs-Fixed: 2878466
2021-02-18 07:47:10 -08:00
Karthik Kantamneni
3c3d944246 qcacmn: Enhance error signature in qdf_check_state_before_panic
Improve error signature in qdf_check_state_before_panic API.

Change-Id: I5774c07e9359b711f0863c40072962b802318f2f
CRs-Fixed: 2879026
2021-02-18 07:47:05 -08:00
Vijay Krishnan
31dfdf84bf qcacmn: Enable dfs_err logs on default
During wifi load and unload, multiple memory allocations and deallocations
are done in the path of dfs_deinit_precac_list, and at a particular
instance there is a crash seen due to an invalid paging request.

The QDF_TRACE_LEVEL_ERROR logs are not enabled by default. These prints
can be useful in debugging the issue when it occurs the next time.
Hence, the dfs_err prints are enabled by default.

When a crash occurs with the dfs_precac list functionality, debugging the
crash with dumps in T32 is difficult. During wifi unload, the api
wlan_dfs_pdev_obj_destroy_notification is called. On first step, the pdev
component is detached making the pdev component as NULL and after that
dfs component is detached. So when crash happens at this point, pdev
component is already NULL and analysing dumps with T32 is useless at this
stage.

Therefore, modify the order of dfs detach in
wlan_dfs_pdev_obj_destroy_notification. First detach the dfs component and
then detach the pdev component.

CRs-Fixed: 2872097
Change-Id: I157c6e6272bf4dd3676588b7ee6889fdb2efa5dc
2021-02-18 07:47:00 -08:00
Lincoln Tran
98c5d1eef3 qcacmn: Register NDI tx beamform support bit
Add WMI service bit handling for NDI beamforming support.

Change-Id: Ib1a4dc0042510137412f3ad4ded61ea680596978
CRs-fixed: 2876723
2021-02-18 05:35:10 -08:00
Amruta Kulkarni
d5cc294f49 qcacmn: Support roam invoke request in connection manager
Add support for roam invoke request in connection manager.

CRs-Fixed: 2869259
Change-Id: I618add058d39e9452530b1950cff57bfe6100448
2021-02-18 03:12:24 -08:00
Himanshu Batra
051c1e0d79 qcacmn: Make CM ser disconnect req as blocking or non blocking
Make CM serialization disconnect req as blocking or non blocking based
on feature macro

Change-Id: I71d664e28cba35d44c0c1fac2bd6a38c4bc4c9df
CRs-Fixed: 2879850
2021-02-17 22:09:37 -08:00
Linux Build Service Account
92f26e1300 Merge "qcacmn: Add wrapper API for indoor channel check" 2021-02-17 14:39:29 -08:00
Lincoln Tran
a410298d7b qcacmn: Add wrapper API for indoor channel check
Add the wrapper for the reg_is_freq_indoor API so other modules can
invoke it.

Change-Id: I8e5ec63b117b49a8bdd99d2afdee80b080694a4f
CRs-fixed: 2876035
2021-02-17 14:01:10 -08:00
Linux Build Service Account
3f720bf6b6 Merge "qcacmn: Fix out of bound issue in util_scan_parse_mbssid()" 2021-02-17 11:39:15 -08:00
Jyoti Kumari
a426e5e166 qcacmn: Fix out of bound issue in util_scan_parse_mbssid()
During multiple BSSID scan ie parse, there is memory allocation
on new_ie variable of size 1024 which may create buffer overflow
in util_gen_new_ie() if ie length is greater than 1024.

As part of fix, allocate memory of size ie length in new_ie.
And also add check before copying to pos variable in
util_gen_new_ie().

Change-Id: I55e0819817b5a616684067170bf28a314a145fc2
CRs-Fixed: 2867353
2021-02-17 11:13:18 -08:00
Ruben Columbus
3fe93eb170 qca-wifi: filter out frames with tlv miss
using if statement to filter out the frames that might not need to be
counted for stats purposes. this include frames that come in with a
missing tlv.

Change-Id: I828f27cda89934591c4daed9f80dc0794a82833d
2021-02-17 10:25:13 -08:00
Linux Build Service Account
754b0aaaa8 Merge "qcacmn: Update regulatory database to version 34" 2021-02-17 09:08:46 -08:00
Linux Build Service Account
f11591063e Merge "qcacmn: Update interface mangager event data" 2021-02-17 05:37:06 -08:00
Linux Build Service Account
9dc712d2d7 Merge "qcacmn: Unmark 'NOL chan' before channel list update" 2021-02-17 05:37:06 -08:00
Linux Build Service Account
214232ac60 Merge changes Iea1ecb62,I22e11ff8 into wlan-cmn.driver.lnx.2.0
* changes:
  qcacmn: Add service bit to support backward compatibility
  qcacmn: Add service bit to support backward compatibility
2021-02-17 05:08:20 -08:00
Linux Build Service Account
41e7e67376 Merge "qcacmn: Add service bit to support backward compatibility" into wlan-cmn.driver.lnx.2.0 2021-02-17 05:05:11 -08:00
Linux Build Service Account
7087e4eddf Merge /local/mnt/workspace/move_prj/src/qca-wifi-oss into wlan-cmn.driver.lnx
Change-Id: If3eddffec819f3ca199bb7a68f9c62463b36e6fa
Signed-off-by: Linux Build Service Account <lnxbuild@localhost>
2021-02-17 17:36:46 +05:30