Commit Graph

17710 Commits

Author SHA1 Message Date
Rajesh Chauhan
bcb0f547dd qcacmn: ipa: change prototype of functions to pass dev_addr as const
In kernel 5.17, net_device->dev_addr is changed to const unsigned char*.
Modify prototype of below functions to pass dev_addr as const:

 - ucfg_ipa_wlan_evt()
 - ipa_wlan_evt()
 - wlan_ipa_wlan_evt()
 - __wlan_ipa_wlan_evt()
 - wlan_ipa_cleanup_iface()
 - wlan_ipa_send_msg()
 - wlan_ipa_setup_iface()
 - wlan_ipa_save_bssid_iface_ctx()
 - wlan_ipa_uc_find_add_assoc_sta()
 - wlan_ipa_set_peer_id()
 - wlan_ipa_set_sap_client_auth()

Change-Id: Ib2cbe8de724bc09abf82fa49c0ea08c268be34c0
CRs-Fixed: 3304829
2022-10-03 23:11:27 -07:00
Amruta Kulkarni
5b4c2d3d0c qcacmn: Skip recovery if no rso stop rsp from FW
Current issue:
During disconnect host sends RSO STOP command to FW
and expects a response from FW before continuing disconnect.
If roaming is disabled (from supplicant or due to race condition)
before sending RSO STOP cmd then FW does not respond to the request
and host will assert.

Solution:
To handle this case after rso timer stop expiry continue with
disconnect and clean up the rso state.

Change-Id: Iac7b25d881702b87f946fe0ecfba02b1d806f06b
CRs-Fixed: 3301394
2022-10-03 21:39:57 -07:00
Amit Mehta
95857b39a8 qcacmn: Add API to get and clear pdev obss stats
Add API to send request to Fw to get and clear pdev obss stats.

Change-Id: I2697cc111eba0310d0a65e9911673670ff476c7f
CRs-Fixed: 3295540
2022-10-01 22:31:20 -07:00
Divyajyothi Goparaju
8cafea036b qcacmn: Peer sta connects in HE20 for SAP HE160
SAP secondary channel offset of HT info in beacon is set wrongly.
When STA connects it, channel bonding mode check fails, falls back to
20 MHz width.

SAP secondary channel offset of HT info in beacon is decided by checking
40 MHz bonded frequency list. If primary frequency is start frequency of a
bonded frequency, then secondary channel is above the primary channel,
secondary channel offset should be set to 1, else set to 3.
For example, if SAP primary frequency is 5220 MHz, {5220, 5240} is 40 MHz
bonded frequency, secondary channel offset only can be 1, can't be 3.

Change-Id: Ife56e3d039f3fcf1912bedf696b1703a0e8f194f
CRs-Fixed: 3302759
2022-10-01 19:39:08 -07:00
Divyajyothi Goparaju
7da3869958 qcacmn: Replace reg_is_disable_for_freq
As part of upgrading legacy code
with 6 GHz power APIs,
replace reg_is_disable_for_freq,
wlan_reg_is_disable_for_freq and
reg_set_5g_channel_params_for_freq APIs
with reg_is_disable_for_pwrmode,
wlan_reg_is_disable_for_pwrmode and
reg_set_5g_channel_params_for_pwrmode APIs
respectively.

Change-Id: I70089b02fd3698dcd83d5418993f7ca238ad0e0b
CRs-Fixed: 3145785
2022-10-01 11:35:35 -07:00
Sai Rupesh Chevuru
136869a4c0 qcacmn: Avoid fetching of addr4 from the RX TLV
In defrag path will be receiving raw frames with wifi header,
instead of fetching the addr4 from the tlv, use it from wifi header

Change-Id: I516295660f39135225efd79c6b1bb0b93b1d81d3
CRs-Fixed: 3303206
2022-10-01 09:47:31 -07:00
Liangwei Dong
4639aa873c qcacmn: Check channel invalid for disabled channel
If the requested power mode is not supported, the API
reg_get_chan_state_on_given_pwr_mode may return
CHANNEL_STATE_INVALID flag. Besides check
CHANNEL_STATE_DISABLE for disabled channel, add check
CHANNEL_STATE_INVALID also.
If partner link frequency is not supported by regdomain,
do not enable the partner entry.

Change-Id: Ic7adfdcc4e535d6303fa0f4253d1499d369bc222
CRs-Fixed: 3302241
2022-10-01 08:10:58 -07:00
Adwait Nayak
7fdbe9bdc7 qcacmn: Strip MBSSID IE from the TX VAP only for 11BE platforms
While generating the scan entry for TX VAP, the decision to
strip MBSSID IE from the TX VAP beacon, will be taken if the
platform supports 11BE.

CRs-Fixed: 3300515
Change-Id: Ie45da7a02a2811172b2403d5fd1bc4b9271432d5
2022-10-01 03:38:36 -07:00
Adwait Nayak
038333d181 qcacmn: Strip out MBSSID IE while creating scan entry for TX VAP
While processing an beacon with MBSSID IE/ IEs, the driver
creates scan entries for the TX VAP/ profile and every Non-TX
profile present in the MBSSID IE.
The scan entry generation for nontx profile happens as required,
whereas while generating the scan entry for the TX VAP, driver
copies the MBSSID IE/IEs as well. Because of this, multiple
ML IEs would be part of one frame and as a result sometimes
supplicant fails in adapting/ fetching the proper ML IE.
With this change, the host driver takes care of stripping out
the MBSSID IE/IEs from the full beacon frame and while
generating the scan entry for TX VAP/ profile, it uses the data
that only belongs to the TX VAP.
This helps in resolving the duplicate ML IE issue.

Change-Id: I13b3ce94da1970eea8c16b52b1987edc1a5418bc
CRs-Fixed: 3295496
2022-10-01 03:38:30 -07:00
Liangwei Dong
4b20a11518 qcacmn: Fix scan entry assoc state update issue
On disconnecting, the bssid may not be filled in cm_req->discon_req.
Zero bssid will fail to update the scan entry to non association
state which may block the scan entry age out.
Move disconnect bssid fill before update the scan entry for
disconnecting.

Change-Id: Id8a36d8a37c212af727c7b61a24b51f2782c4a2c
CRs-Fixed: 3291599
2022-09-30 20:35:05 -07:00
Shashikala Prabhu
5e43636b8c qcacmn: Add support for 11az RTT
- target_if layer was calling UMAC layer wifi_pos_get_rx_ops(). This was
  leading to compilation errror in WIN platform. Hence, added target_if
  layer API target_if_wifi_pos_get_rx_ops().

- WMI_RX_SERIALIZER_CTX is used to register PASN peer create and delete.
  WIN platform does not use the above context. Hence, use WMI_RX_UMAC_CTX
  for WIN and WMI_RX_SERIALIZER_CTX for MCC.

- WIFI_POS rx_ops callbacks are registered in target_if layer. But, these
  callbacks are called by UMAC component. Hence, move this registration
  function to UMAC layer.

- Add an API to convert host PASN peer type value to target defined value.

Change-Id: I2a262121f959c2343e88158b94468d104b9e164c
CRs-Fixed: 3289852
2022-09-30 07:49:24 -07:00
Kani M
2cfc1273ba qcacmn: Fix for memleak in VLAN cases
During wlan_crypto_setkey, the mem_alloc for key is done and
all keyidx within WLAN_CRYPTO_MAX_VLANKEYIX are to freed in
crypto_free_key.

Change-Id: Ieae0f9f4eecabe1fb23812a9e436037bb4dad128
CRs-Fixed: 3296394
2022-09-30 07:49:17 -07:00
Guru Pratap Sharma
2184df8f12 qcacmn: Exporting wlan_util_vdev_mlme_set_param
doing qdf_export_symbol for wlan_util_vdev_mlme_set_param
so it can be use in offload

Change-Id: I19c1be6ad8e6462aff29c284131fcc4765df7e25
CRs-Fixed: 3301968
2022-09-30 07:49:12 -07:00
Ripan Deuri
cb33f7e1d3 qcacmn: Acquire lock before calling rx tid setup
The rx tid setup function is called from multiple contexts.
Acquire lock before calling that function to avoid race condition.

Change-Id: I7a0443e5e09a068301de171afeb4d400bf54b1c8
CRs-Fixed: 3291079
2022-09-30 04:26:34 -07:00
Amit Mehta
c3ea01cd1b qcacmn: Add a tid check for RX to avoid of OOB access
Tid in RX frame header may be larger than MAX TID allowed
value, this will lead a out of boundary array access and
lead to kernel crash at last. Change is aimed to do a TID
check and discard such frame when necessary.

Change-Id: I11f312668a5a42d690c058550f22b0f36f952104
CRs-Fixed: 3264581
2022-09-30 04:26:27 -07:00
Prakash Manjunathappa
44ece0c600 qcacmn: Do not free Tx flow pool in case of MLO link switch
In case of MLO same adapter maps to both vdevs. Tx is done with
primary link vdev pool. In link switch case vdev0 flow pool is
deleted and traffic will continue to flow with same vdev0 flow_id
This is resulting in packets drops within the driver due non-availibilty
of flow pool.
Fix this by skipping flow pool deletion in case of STA MLO connection.

Change-Id: Ie56ea221f7f254484bd31ec4880f2155779fb513
CRs-Fixed: 3292979
2022-09-30 04:26:21 -07:00
Pavankumar Nandeshwar
4db1255f94 qcacmn: Add debug for Umac reset time consumption
Add debug to calculate the time consumed on host during
Umac reset handling.

Change-Id: I1697f61abf13980182a89ae0674f344f93943b86
CRs-Fixed: 3300163
2022-09-30 01:41:05 -07:00
Pavankumar Nandeshwar
7dee89e9ec qcacmn: Add cfg command to enable umac reset skeleton debug
Add cfg command to enable umac reset skeleton debug, which
when enabled will skip post reset procedure handling.

Change-Id: Ieca393e6292660bb3ada40408fd6e71ac78d0a1f
CRs-Fixed: 3296960
2022-09-30 01:40:58 -07:00
Asutosh Mohapatra
238555b44c qcacmn: Save fcc constraint flag in psoc_priv_obj
Currently only pdev_priv_obj has fcc constraint flag and
it's value gets modified according to the SET_FCC_CHANNEL
command. As a result after getting SET_FCC_CHANNEL command
if wifi turned off and turned on or during SSR sequence
its value is reset to false as pdev is deleted and recreated,
hence the tx_power values of fcc frequencies aren't decreased.

To address this issue, store the fcc constraint flag in
psoc_priv_obj and copy its value to fcc constraint
flag in pdev_priv_obj during pdev creation.

Change-Id: Ic2f5450fd763abf04ad89fe4e5148d03f3b5d69a
CRs-Fixed: 3292446
2022-09-29 14:28:44 -07:00
Amit Mehta
b781ebf246 qcacmn: Move Fw diag drain API under feature flag
Currently fw diag drain API is not under feature flag
as we only need to drain the ring in case when diag
events are received on CE7, which in other cases is
resulting in unnecessary error logs being printed.
To fix the issue move fw diag drain api under feature
check.

Change-Id: I7d040fbd1218c5c8ed9a8b2bae58af2f098fee80
CRs-Fixed: 3296285
2022-09-29 10:59:21 -07:00
Pragaspathi Thilagaraj
d95e7863cd qcacmn: Add support to enable/disable responder 11az ranging
Enable/Disable responder 11az ranging based on the below ini:
"enable_responder_11az_support"

With "enable_responder_11az_support" disabled, the below ext
cap advertisement will be disabled:
Non-TB Ranging Responder
TB Ranging Responder

and below vendor capabilities advertisment will be disabled:
QCA_WLAN_VENDOR_FEATURE_PROT_RANGE_NEGO_AND_MEASURE_AP
QCA_WLAN_VENDOR_FEATURE_SECURE_LTF_AP

Change-Id: I82eb70615f8daf82e98e7600418e07fad0672b76
CRs-Fixed: 3296410
2022-09-29 04:22:45 -07:00
Abhishek Singh
1d0d789fe0 qcacmn: Add vdev id info in serialization logs
Enhance serialization logging by adding vdev id info in logs to
differentiate same cmd id across vdevs.

Change-Id: I6706b07044769b56832e67388924f767ad5aabfe
CRs-Fixed: 3297468
2022-09-29 04:22:38 -07:00
Surya Prakash Raajen
c8aaf60162 qcacmn: Fix number of vdev info in app reg for lowi
The actual number of vdev info allocated was less than the number
of vdevs that can be created for each soc, hence fix them, also
previously the arrays were allocated statically consuming
considerable amount of memory, fix them by allocating dynamically
with only number of vdevs per soc

Change-Id: I5ea735d44994211f76ce18460332624831742f7b
CRs-Fixed: 3285131
2022-09-29 02:28:02 -07:00
Jithender Miryala
c9587d7abf qcacmn: Update Regulatory Database to 41th version
1. Change (or) Add the following country mapping to Regdomain for 6 GHz.
i) Map Full 6 GHz Reg domain HEX CODE 0x0C to FIJI
ii) Map Full 6 GHz Reg domain Hex code 02 to KENYA, MAURITIUS and MONGOLIA.
iii) Create new Full 6 GHz Reg domain Hex code 0x0D and map to ISRAEL and
KUWAIT.
iv) Create new Full 6 GHz Reg domain Hex code 0x0E and map to NEW ZEALAND,
NIUE, COOK ISLANDS
v) Map Full 6 GHz Reg domain HEX CODE 01 to ANTIGUA AND BARBUDA, ARUBA,
BAHAMAS, CAYMAN ISLANDS, DOMINICAN REPUBLIC, EL SALVADOR, JAMAICA and
VENEZUELA.
vi) Map Full 6 GHz Regdomain Hex code 0x0B to Japan.

2. Add the following regulatory database for 2.4/5 GHz and 5 GHz.
i) Create new 5 GHz Regdomain APL28 (Hex 0x1233) and Full 2 & 5 GHz
Regdomain APL28_ETSIC (0x76)
ii) Update PAKISTAN from APL1_ETSIC to APL28_ETSIC.

3. Add the following regulatory database 2.4/5 GHz and 5 GHz for Auto only
i) Create new 5 GHz Regdomain ETSI19 (Hex 0x0E45) and Full 2 & 5 GHz
Regdomain ETSI19_WORLD (0x7B)
ii) Update ISRAEL from ETSI17_WORLD to ETSI19_WORLD.

Change-Id: I8de892abdc8f446e17ccb6a039ae90ab092b6c0d
CRs-Fixed: 3287062
2022-09-29 02:27:56 -07:00
Azmath Mohammed
6f54fca3a9 qcacmn: Implement qdf support for skb shared info
Implement qdf support for skb shared info and frag list append.
qdf macros will be used to handle skb shared info and list append.

Change-Id: I3e91bfb7a09f2e4547b3210a10919d6c84ec6567
CRs-Fixed: 3243932
2022-09-28 22:31:52 -07:00
Azmath Mohammed
95865c5502 qcacmn: Modify FISA Feature support for DP componentization
Modify FISA Feature support for DP componentization

Change-Id: I64c364881bf2c53794e858acb72babf51997713e
CRs-Fixed: 3243931
2022-09-28 22:31:45 -07:00
Nandha Kishore Easwaran
3e59523895 qcacmn: Handle race condition in ce interrupt handler
Fix race condition in dispatch interrupt when CE0 interrupt is called
from irq context in one core while it is called from user context in
ring full condition. This case has to be handled using locks since
calling paralelly from multiple contextx is leading to interrupt
getting disabled and tasklet not getting scheduled. This is leading
to interrupt being in disabled state. Also change th diff_time variable
signed integer to handle a case where taklet is scheduled just after
the workaround kicks in leading to diff_time becoming negative.

Change-Id: I3894ef90ca48f23404bc9529c4b1623841698293
CRs-Fixed: 3297372
2022-09-28 13:25:12 -07:00
Linux Build Service Account
232e34a0b4 Merge "qcacmn: Send roam auth mlo links event" 2022-09-27 18:42:51 -07:00
Linux Build Service Account
cfad615b2d Merge "qcacmn: Fix compiler warning on shift overflow in QCA vendor definitions" 2022-09-27 18:42:51 -07:00
Amruta Kulkarni
c3051031c5 qcacmn: Send roam auth mlo links event
After mlo roaming is complete send roam auth mlo links
event to kernel.
Also populate cfg roam info structure with mlo link info.

Change-Id: I8710e3a53f05c50b7b276d87a39411cb43d0983f
CRs-Fixed: 3279967
2022-09-27 16:23:16 -07:00
Chaoli Zhou
400309d015 qcacmn: Fix compiler warning on shift overflow in QCA vendor definitions
Fx the following compiler error:
qca-vendor.h:5892:54: error: result of ‘1 << 31’ requires 33 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]
 5892 |  QCA_WLAN_VENDOR_CHANNEL_PROP_FLAG_HE40INTOL     = 1 << 31,

This "1" needs to be marked unsigned for this case of MSB=1.

Change-Id: I27daebd07d0cbf314459254cfc5906f5e56dd4be
CRs-Fixed: 3299457
2022-09-27 13:22:24 -07:00
Linux Build Service Account
4adb6d3293 Merge "qcacmn: Create NOL and CAC HRtimer in softIRQ context by using hrt_mode" 2022-09-27 12:53:33 -07:00
Jithender Miryala
eea229eb7d qcacmn: Create NOL and CAC HRtimer in softIRQ context by using hrt_mode
The NOL and CAC timeout callback function is divided into two parts:
HardIRQ and workqueue. If NOL/CAC expires, the callback function runs in a
HardIRQ context and the rest of the task runs in a workqueue to avoid
deadlock issues.

Issue: Workqueue tasks run in a low-level context. The task's execution
might have been delayed.

To fix this, run the "NOL" and "CAC" timer in softirq context.
Use QDF_CONTEXT_TASKLET instead of QDF_CONTEXT_HARDWARE as a argument in
qdf_hrtimer_init. If it is a "QDF_CONTEXT_TASKLET," the HR timer
initialises with softIRQ mode(HRTIMER_MODE_SOFT) and runs in softRQ
context when timer expires.

Change-Id: I9e23a9dff1a9c4669bb85342b3ffd91bc46ebe95
CRs-Fixed: 3239417
2022-09-27 08:43:36 -07:00
Linux Build Service Account
ab3b83ae82 Merge "qcacmn: Drop 6 GHz beacon out of BSS operating BW" 2022-09-27 08:41:57 -07:00
Jianmin Zhu
5551df9af9 qcacmn: Drop 6 GHz beacon out of BSS operating BW
Duplicated 6 GHz beacons with poor RSSI are received in frequency far away
from primary channel, they are not dropped because HE duplicate beacon
field is set, which makes poor RSSI saved in scan entry.

To fix it, if 6 GHz HE duplicate beacon field is set, compare band width
and center frequency from EHT ops and HE ops with current frequency beacon
received, if current frequency is outside of the BSS operating BW, drop the
leaked beacon.

Change-Id: I580df7efbbe5a7b56cfd14795474ad9a4d432fdc
CRs-Fixed: 3299236
2022-09-27 01:04:18 -07:00
Linux Build Service Account
b985d78078 Merge "qcacmn: Fix issues reported by static analysis tool" 2022-09-27 00:44:11 -07:00
Srinivas Girigowda
7cb3b7dd47 qcacmn: Fix issues reported by static analysis tool
Add changes to fix issues:
1. Array out of bound access
2. Arithmatic expression overrun

Change-Id: Idf9bdea33422015e0310e57d005f7d6941f8151e
CRs-Fixed: 3298301
2022-09-26 17:43:48 -07:00
Linux Build Service Account
b6ef284e96 Merge "qcacmn: Separate GetFrameControl API's for LI chipsets" 2022-09-26 12:34:43 -07:00
Linux Build Service Account
4fad936dbc Merge "qcacmn: Fix incorrect value of gi in rx stats" 2022-09-26 12:34:43 -07:00
Kenvish Butani
a16d867018 qcacmn: Separate GetFrameControl API's for LI chipsets
For 802.11 Fragmented frames, currently there is a
generic GetFrameControl API from RX TLV for all Li
Chipsets. As the offset for frame control in RX TLV
is different for QCN9000 and QCA8074V2, reading the
frame control with generic API gives wrong frame
control value. The Offset is different as the size
of RX_MSDU_START struct is 8DWORDS in QCA8074v2 while
it is 9DWORDS in QCA9000. In the reo reinject path
the destination queue descriptor address read from ring
descriptor address is Invalid

Fix is Separating out the GetFrameControl API from
generic API to Chip specific API. Also fix the reading
of queue descriptor address.

CRs-Fixed: 3280809
change-Id: Ifc5eca31b9b7e70c84ca455d56a58c27601cd51d
2022-09-26 10:48:59 -07:00
aloksing
1a5b0d838e qcacmn: Fix incorrect value of gi in rx stats
Increase GI bit size to 2 to store all possible GIs.

CRs-Fixed: 3292869
Change-Id: I7337e36397f3354458deed16823e4092b8277638
2022-09-26 10:48:52 -07:00
Linux Build Service Account
095f075f16 Merge "qcacmn: Add ring stats for direct switch rings" 2022-09-26 08:54:06 -07:00
Jianmin Zhu
e44fc21aea qcacmn: Fix partner link scan entry generated with wrong bssid issue
When partner link probe rsp is generated from ML probe rsp, bssid is
filled wrongly, then scan entry with wrong bssid is added, if no beacon
or probe rsp of partner link is received, then candidate can't be found
by partner link bssid, partner link connect fails, at last MLO connect
fails.

Change-Id: I3fa51dbde1cf9d8e256ecfc17059660a4430056a
CRs-Fixed: 3298706
2022-09-26 02:04:37 -07:00
Pavankumar Nandeshwar
c3630a234b qcacmn: Add ring stats for direct switch rings
Add ring statistics for reo2ppe and ppe2tcl rings

Change-Id: Ib9c15ba2f95d5cb97d238afad8f6f93dc5100e82
CRs-Fixed: 3279422
2022-09-26 02:04:31 -07:00
Tallapragada Kalyan
27da15777b qcacmn: initialize BE specific HAL API callbacks
certain BE specific HAL APIs were only initialized for
KIWI chipset but not for WKK. Now moved all these APIs
under beryllium generic initialization.

These APIs are mainly used in de-frag pkt handling.

CRs-Fixed: 3294784
Change-Id: I6611f1b7ef80b432d24a490ba65880dd55539137
2022-09-26 02:04:24 -07:00
Linux Build Service Account
95f6824d47 Merge "qcacmn: Handle failure during service ready(ext/ext2) handling" 2022-09-26 00:37:54 -07:00
Linux Build Service Account
e47f5a9021 Merge "qcacmn: Add Link Info definitions for Reconfig ML IE" 2022-09-26 00:37:53 -07:00
Shivam Kumar
52c19ba631 qcacmn: Handle failure during service ready(ext/ext2) handling
Any error during ext/ext2 processing should stop normal init
path and return error. Without this, wrong values are passed
to firmware in WMI init which result in firmware assert.
Add proper handling to take care of failures during svc ready
message processing

Change-Id: Id22714a983d1dc2fe7300a178933cd05bf870a55
CRs-Fixed: 3290131
2022-09-25 23:11:07 -07:00
Krishna Rao
2bac69b79e qcacmn: Add Link Info definitions for Reconfig ML IE
Add the following definitions related to the Reconfiguration variant
Multi Link element:
- Fixed fields of Per-STA Profile subelement in Reconfiguration
variant Multi-Link element Link Info field.
- Definitions related to STA Control field of Per-STA Profile
subelement in Reconfiguration variant Multi-Link element Link Info
field.
- Definitions related to STA Info field of Per-STA Profile subelement
in Reconfiguration variant Multi-Link element Link Info field.

Change-Id: I4f5a06a60461f37f6a45bf4c15f203980c0e22b9
CRs-Fixed: 3296891
2022-09-23 22:38:21 -07:00
Krishna Rao
d1a389d7a2 qcacmn: Add control and common info definitions for Reconfig ML IE
Add the following definitions related to the Reconfiguration variant
Multi Link element:
- Encoding for Reconfiguration variant in the Type subfield in
Multi-Link element Control field. (Additionally for completeness, add
the missing encodings for TDLS and Priority Access variants for this
subfield).
- Definitions for bits in the Presence Bitmap subfield in
Reconfiguration variant Multi-Link element Control field.
- Definitions related to Reconfiguration variant Multi-Link element
Common Info field.

Change-Id: Ie5f89438533f372cd020831a0de0fdafac94d6af
CRs-Fixed: 3296867
2022-09-23 21:53:39 -07:00