Commit Graph

3187 Commits

Author SHA1 Message Date
Jianmin Zhu
f683d0b718 qcacmn: Fix build error
Error: new_start_ch may be used uninitialized

Change-Id: I124d9c305e4f885a1e3d5c77ddd1dab57070b1de
CRs-Fixed: 3152361
2022-03-17 00:25:04 -07:00
Pooventhiran G
f5e2da429b qcacmn: Add Get RxPN WMI to obtain Rx PN
Add WMI support to obtain Rx packet number of a non-bss peer.

Change-Id: I841c1869299ebf5eeb21ee6406426a964d2d7112
CRs-Fixed: 3150832
2022-03-16 19:34:14 -07:00
Sheenam Monga
b17d8fc57f qcacmn: Avoid compilation error when 6G disabled
Currently definition of wlan_reg_get_power_string is
present for 6G only which may cause compilation issue
when 6G is disabled.

Fix is to add definition of wlan_reg_get_power_string
for both 6g enable and disable case to avoid any compilation
issue.

Change-Id: Iaad8f16543306e6ac09e76546062fae554124c1e
CRs-Fixed: 3150997
2022-03-16 11:14:21 -07:00
Jyoti Kumari
7c3b36f765 qcacmn: Print reference id in debug prints
Print ref_id in all debug prints. It will make sure even if
string value is not added in string_from_dbg, there will be ref
id to debug leak issue.

Change-Id: If35a298239dd09cb4169474da34e30e85a2cde92
CRs-Fixed: 3147857
2022-03-16 04:02:08 -07:00
Priyadarshnee Srinivasan
307e380442 qcacmn: Add reg opclass changes for 320MHZ
Add opclass changes to support 320MHZ in 11BE

CRs-Fixed: 3135023
Change-Id: I57827cf0f5f056df0dceee0a6225d4ea7219cce9
2022-03-15 20:44:09 -07:00
shubpawa
68f86baf32 qcacmn: Added support to enable/disable mgmt rx reo sim feature
Add support to enable/disable mgmt rx reo sim feature

cfg80211tool wifiX mgmt_rx_reo_simulation 1 (Enable)
cfg80211tool wifiX mgmt_rx_reo_simulation 0 (Disable)

Change-Id: I3dbe202a86ab2911ea6a0bd1295ba02c39402fa0
CRs-Fixed: 3100349
2022-03-15 07:38:01 -07:00
Wu Gao
ce53a6f23f qcacmn: Fix error of macro CLEAR_PARAM
CLEAR_PARAM failed to clear bit at bit position of "val". This change
correct to ((__param) &= (~(1 << (__val)))).

Change-Id: I20a9203592c0f48c3d2999985edd8ff81f55eb9d
CRs-Fixed: 3137825
2022-03-15 00:10:48 -07:00
Priyadarshnee Srinivasan
4f3cbf6b28 qcacmn: DFS random channel selection for 11BE
Enable the wmi_service to fetch the radar found cfreq from
wmi_service_radar_found_chan_freq_eq_center_freq.

Add changes in DFS random channel selection algorithm
(1) To find a channel of input width 320MHZ. Since 320MHZ in 5G
is 240MHZ (320 - 80 punctured), there are 12 valid 20MHZ subchannels
possible in 240MHZ. Validate the continuity of 240MHZ channel before
declaring the channel to be found.
(2) To find a fallback channel for the input channel
width of CH_WIDTH_320MHZ. The fallback channel of 320MHHZ is
160MHZ.

CRs-Fixed: 3149475
Change-Id: I03cac7f090de20efd912402b5e4df543b47aafed
2022-03-14 22:31:26 -07:00
Deeksha Gupta
b06ca5bc3d qcacmn: Update key management after bss create response
Add support to update key management with higher security
after BSS create response.
Also, Currenlty if there are multiple AKM and ucast cipher.
Host overwrites AKM and ucast cipher value with the new one.
Instead of overwrite, add support to do ORing to keep all values.

Change-Id: I679a86debef649efbce1a08b60512d127f7fbbee
CRs-Fixed: 3113222
2022-03-14 10:11:25 -07:00
Deeksha Gupta
348fee747b qcacmn: Update BSS score calculation based on Security Profile
Update BSS score calculation to consider security profile.

Change-Id: I120774ce2472442ebba15e098b4089f8a17cbfc5
CRs-Fixed: 3113215
2022-03-14 10:11:19 -07:00
chunquan
bc71eff483 qcacmn: Rename files with blacklist/whitelist
Rename files with  blacklist/whitelist to denylist/
whitelist. Rename files with blm to dlm.

Change-Id: I6f533c30c664aaaf713cdd2e2e34f9528df139b5
CRs-Fixed: 3099867
2022-03-14 08:50:32 -07:00
Deeksha Gupta
b37b9b12cd qcacmn: Handle status code for TWT Notify event
Handle status code for TWT Notify event

Change-Id: I7065ab52b21ce8ce9dd5d12e30d2380e4c7d0da2
CRs-Fixed: 3138647
2022-03-14 07:28:44 -07:00
Jyoti Kumari
95a1bc6a1a qcacmn: Add TWT ID in string_from_dbgid
Add TWT ID in string_from_dbgid

Change-Id: Ib98b18c6bc52af140d9e351c07ed150f0289faa1
CRs-Fixed: 3147818
2022-03-14 06:09:57 -07:00
Venkateswara Swamy Bandaru
73e1de72ef qcacmn: Add EHT PPET related defines
Add EHT PPET related defines in EHT capability IE.

Change-Id: I0e230e41710910d5542d308fa45940476729ba58
CRs-Fixed: 3148749
2022-03-11 23:49:53 -08:00
Jianmin Zhu
5be34e1968 qcacmn: Fix build error
For platforms which CONFIG_BAND_6GHZ undefined, build failed for
implicit declaration of function
reg_convert_supported_6g_pwr_type_to_ap_pwr_type.

Change-Id: Iefaef8ea64f76f07e040403ada145c99c29db19a
CRs-Fixed: 3147319
2022-03-11 04:53:03 -08:00
Manoj Ekbote
aa7a5cf79d qcacmn: Fix build error with header
Replace TWT_PEER_MAX_SESSIONS with WLAN_MAX_TWT_SESSIONS_PER_PEER

Change-Id: I7eb872a753f38260ff19e16ce211129f7481bfd1
CRs-Fixed: 3136148
2022-03-11 04:52:56 -08:00
Manoj Ekbote
27181a9d1e qcacmn: Add a flag to use the right locking scheme
When the flag is enabled, use spinlock else use mutex in TWT code.

Change-Id: I2504a86569e1341ac0e75c24b0c98bd7d949aac0
CRs-Fixed: 3136148
2022-03-10 16:01:39 -08:00
David Oladunjoye
108624a2a8 qcacmn: umac: Add Missing Kernel Documentation
Function wlan_cp_stats_twt_get_peer_session_params() is missing 
its documentation block, so add it.

Change-Id: I050d45df1861de02998039b76c8c2a7da59af669
CRs-Fixed: 3137344
2022-03-10 12:20:50 -08:00
Amith Ajith
c3bb3fb37a qcacmn: Fix incorrect 6g supported channels reported for opclass 133 & 134
API reg_get_channels_from_opclassmap populates channels from opclass map to
reg_ap_cap as supported and non-supported channels. But for 6g opclass 133
and 134, non-supported channels were also getting reported as supported
channels.

This was due to an error in the logic of reg_get_channels_from_opclassmap
API for opclass 133 and 134. The 20Mhz channels towards the end of the
channel list in the op_class_tbl were causing the issue.

To address this issue, add a logic to get the supported and non-supported
channels from the cfi list object of op_class_tbl for 6GHz in the
reg_get_channels_from_opclassmap API. Also remove the 40MHz centre channel
calculation condition for 6GHz in reg_get_chan_or_chan_center API as it is
being handled in the new API.

CRs-Fixed: 3133022
Change-Id: If6ea18f79786c8549a1c75c557adffa178dd5c71
2022-03-09 17:44:59 -08:00
Venkateswara Swamy Bandaru
6d2cd0a2b4 qcacmn: Fix RNR Overwriting issue
Fix condition check of updating RNR info.

Change-Id: I441351f2236183e304b833c59469e1278485e2dd
CRs-Fixed: 3144862
2022-03-09 04:07:35 -08:00
Srinivas Pitla
d6beb68484 qcacmn: Fix issue in primary umac id
This change fixes psoc id assignment in primary UMAC
selection

Change-Id: I04beaf3cdce4f9487380ac5ab84e1d0070c243dd
CRs-Fixed: 3144033
2022-03-08 23:59:30 -08:00
Vignesh U
1f1b921796 qcacmn: Add supported 6g power types dispatcher APIS
Add the supported 6g power types dispatcher APIs to
i) get the best 6g power for a given frequency.
ii) convert input 6g ap power type to supported 6g power type enum.
iii) get the 6g ap power type from supported 6g power type enum.

Change-Id: I4b8bce5f23c7c0b95f9192ff20d90a908b3e0bd7
CRs-Fixed: 3110989
2022-03-08 04:20:07 -08:00
nakul kachhwaha
dff43f12ea qcacmn: Add support for 6ghz relaxed connection policy
Adding new API to bypass scanning and connection
restrictions to bss operating in 6GHz with different
country code.
This API is based on a cfg item which can be configured
separately from safe mode or rf test mode.

Change-Id: I47396ac8793172e94499377cb0b980f7eee0f39e
CRs-Fixed: 3135147
2022-03-08 01:19:59 -08:00
Aditya Sathish
1cebff1228 qcacmn: Use best regulatory power mode in scan manager
Due to the nature of discrete channel lists for each
power mode on the host driver, it is currently not
possible to scan 6GHz channels which are not part
of the operating regulatory power mode.

To enable scanning all 6GHz channels irrespective of the
regulatory power mode (i.e., standard, low, etc.), the
existing sanity checks for the regulatory current channel
list need to refer to the super channel list
instead.

Additionally, these sanity checks need to check the
channel state and flags for the best power mode instead
of the current power mode. This will allow the scan
manager to access all 6GHz channels irrespective
of the current regulatory power mode.

Multi-band operation (for radios operable on 2.4GHz,
5GHz and/or 6GHz) is also ensured in these sanity
checks.

CRs-Fixed: 3140935
Change-Id: If10c617834dd89f4bbd99669318fd84c63421755
2022-03-07 20:19:12 -08:00
chunquan
19cc13911c qcacmn: Replace blacklist/whitelist with denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
2022-03-05 07:11:01 -08:00
Liangwei Dong
29ffc29223 qcacmn: Add MCC Quota event handler
Handle WMI event WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID
and indicate to protocol layer.

Change-Id: Ie842998ed50a52351dd24857c0565c535a2edca1
CRs-Fixed: 3101765
2022-03-04 09:08:54 -08:00
Amruta Kulkarni
8d0d85c7e4 qcacmn: Add null check for mlo api's
When mlo_dev_ctx is not initialized, it causes NULL ptr
access causing crashes.
Add NULL check in mlo api's to avoid the issue.

Change-Id: Icd7472cab22e3ff441cc9327f0443adb939bbc05
CRs-Fixed: 3143777
2022-03-04 01:50:43 -08:00
Bapiraju Alla
49a86029a8 qcacmn: Update VDEV connected links bitmap after STA link connect
Currently, VDEV connected links bitmap is not being updated properly
for link VDEVs. Because of this, during the disconnect assoc peer
is being deleted first instead of link VDEV peer.

To address this, update VDEV connected links bitmap after STA link
connection complete.

Change-Id: Id8465948fbb3af2f063e04ec9403cb4e3a6f98d8
CRs-Fixed: 3125636
2022-03-03 02:11:18 -08:00
Vulupala Shashank Reddy
f31ce2f1c1 qcacmn: Fix TWT rx frames capture in packet capture mode
Currently the TWT rx frames are dropped in
tgt_mgmt_txrx_rx_frame_handler considering them as unspecified
packets as action category for TWT is not defined.

Define TWT action category so that the TWT frames will not be
considered as unspecified frames and dropped while processing.

Change-Id: I2d9c01e89029bcbb379a5a9c77a7d101de155d6a
CRs-Fixed: 3087275
2022-03-02 18:39:50 -08:00
Deeksha Gupta
8944151a4b qcacmn: Add reg API to check for enable channel state
Add new reg API to check if frequency is active (non-passive) 
or not from the secondary channel list.
The API checks the channel state against CHANNEL_STATE_ENABLE.

Change-Id: If41850563e680659ea815f09207ec0b854a2f040
CRs-Fixed: 3136785
2022-03-02 16:15:22 -08:00
sheenam monga
00f035dcde qcacmn: Update gEnableSNRMonitoring to true
Currently in wma_chan_info_event_handler chan info
is updated based on gEnableSNRMonitoring. By default
gEnableSNRMonitoring is set to false, due to which
chan info is not updated.

Fix is to keep gEnableSNRMonitoring enbaled, so that
chan info can be updated.

Change-Id: I77a999d64fca093c8bc50e4532e659f37a3ac593
CRs-Fixed: 3109317
2022-03-02 11:06:13 -08:00
Himanshu Batra
8da6f58098 qcacmn: Fix static analysis issue in MLO disconnect API
Fix static analysis issue in MLO disconnect API

Change-Id: Ibf7b82e4805a81d2d32ea2bfa82a8e1f3756867c
CRs-Fixed: 3140790
2022-03-02 05:28:55 -08:00
Himanshu Batra
7908fb906c qcacmn: Clear MLO cap on connect failure of assoc link
Clear MLO cap on connect failure of assoc link

Change-Id: I62edace42543d527ff6b65861d30f8762f3a6316
CRs-Fixed: 3137865
2022-03-01 05:39:43 -08:00
Jayachandran Sreekumaran
9aefacd777 qcacmn: Dynamic ratemask config support
Add dynamic ratemask config support.

CRs-Fixed: 3112486
Change-Id: If419d1672b92085eb3f27b1d6505b1facfa9c09d
2022-03-01 05:39:25 -08:00
Abhijit Pradhan
3f95481d0e qcacmn: Add powermode APIs under a new macro
Use  CONFIG_REG_ 6G_PWR_MODE for the new API.
Use "_for_pwrmode" as suffix for the new functions.

Change-Id: I9b84944a59062277b76bc48877c47ea5afada0ec
CRs-Fixed: 3133023
2022-02-28 12:57:10 -08:00
Hariharan Basuthkar
e7b559d010 qcacmn: Replace reg curchan with 6g ap power based chan list
The consumers of the current channel list may want to search through 6G
channels that are not part of current channel list and belong to channel
list of different power mode.

Therefore, replace the regulatory current channel list with that of 6G
power based channel list.

Change-Id: Ie2ff8bbfb50a5f95f584b134b18246cb28b1c406
CRs-Fixed: 3110987
2022-02-28 12:57:03 -08:00
Naveen S
5aba520461 qcacmn: Copyright fix for dfs_partial_offload_radar.c
changing the order of recently added QuIC copyright

Change-Id: Ica1a547b960a6eee079c93943b506ed7ce614cbf
CRs-Fixed: 3135032
2022-02-28 12:56:57 -08:00
Venkateswara Swamy Bandaru
fb75228fd8 qcacmn: Fix partner link updation
Fix partner link updation in scan entry when AP MLD has more than one
partner link.

Change-Id: I981f16c9de819390d6830ffe7a5b1e438a4f8403
CRs-Fixed: 3125861
2022-02-28 12:56:51 -08:00
Krishna Rao
f94ac12152 qcacmn: Add support for ML subelement defragmentation
Add support for subelement defragmentation in the common handler for
generating link specific (re)association request/response, as well as
in the helper for parsing partner info from the Link Info field of the
Basic variant Multi-Link element.

CRs-Fixed: 3117210
Change-Id: I3727c9008043ac4132a8675bf15e73949fde63cd
2022-02-28 09:10:22 -08:00
Vinay Adella
dbf8b39a83 qcacmn: Remove excessive logging in console
Move to qdf_debug API to avoid excessive logging.
As these logs can come in interrupt context, it can cause
latencies to other threads.

Change-Id: Ibcada15235a74e9534588ae08d21bf97f4d61393
CRs-Fixed: 3120558
2022-02-28 09:10:17 -08:00
Manoj Ekbote
e78a527ac1 qcacmn: TWT componentization changes
Include relevant header for MAX_SESSIONS and use
the correct build flag to retrieve session params.

CRs-Fixed: 3136148
Change-Id: I28ef98a67cbe479c5d8be93c49f9ae6ce63ba982
2022-02-28 09:10:11 -08:00
Krishna Rao
30b0de6998 qcacmn: Add support for ML IE defragmentation
Add support for Multi-Link element defragmentation in the common
handler for generating link specific (re)association request/response,
as well as in the API for getting per-STA partner link information.

CRs-Fixed: 3116412
Change-Id: I237c593b44ec3a7c3347ccb95633cec362ba5411
2022-02-28 09:10:04 -08:00
Jyoti Kumari
6ff68674b9 qcacmn: Handle TWT disable reason code
When host sends TWT disable command to firmware, send reason code
also as part of it. So that firmware will check and take the
following action:
a. If host sends disable due SCC/MCC concurrency then firmware
will teardown the existing TWT session and send the teardown
reason code as concurrency to host.
b. If it's for other reason then it will take action based on
that.

Change-Id: I5b4584a964f142d17aef5629adeb12e686fd983c
CRs-Fixed: 3098862
2022-02-28 07:53:44 -08:00
Bapiraju Alla
c0267fdbb4 qcacmn: Initialize total_weight while initializing BSS score config
Currently, total_weight is not initialized before calculating
default ML BSS weightage with INI configuration. This may result in
unexpected behavior.

To resolve this, calculate ML bss weight after calculating non-ML
BSS score weight.

Change-Id: I4b9455e0ce69dec5c837f92acad60ac83cdd2502
CRs-Fixed: 3127454
2022-02-25 01:46:00 -08:00
nakul kachhwaha
6c2a986833 qcacmn: Export objmgr APIs and add lmac_if registration APIs
Export objmgr APIs to be used by SON module to register
and unregister create/destroy handler.
Also add lmac_if API to register lmac_if ops from SON
module.

Change-Id: Id4c19807792b9f7b46387ae907f853151e4e28c6
CRs-Fixed: 3118986
2022-02-24 04:25:26 -08:00
Lincoln Tran
badb6230e2 qcacmn: Back to back connect changes
Currently, the code does not handle an MLO connect when in
non-init state. Add logic to clean up any existing connection
before going ahead with the latest request.

Change-Id: Ia5a10bcc1e0d2c8e82d6ea0d82d1a5bf0604a1e5
CRs-fixed: 3116687
2022-02-23 20:49:08 -08:00
Bapiraju Alla
6bb2ad7c5b qcacmn: Get partner vdev using vdev ID instead of link ID
While notifying the ML connection status to the supplicant, partner vdev
information will be filled in the connect response. This partner vdev info
is populated using partner link IDs. This may cause issues since it is
not guaranteed that link id information in the partner vdev is valid while
notifying the connection status to the supplicant.

To address this, get partner vdev information using vdev ID instead of
link ID.

Change-Id: I5e45b038b1fe5b6ab9c6bbb514eefb0ad4c39e66
CRs-Fixed: 3117702
2022-02-23 11:10:35 -08:00
Sai Pavan Akhil Remella
bc1866e129 qcacmn: Use global OC table for lookup while updating RNR db
Operating class field used in RNR IE is of global operating
class. When getting frequency from RNR IE region specific
operating class is used for lookup instead of global.

Added changes to search operating class from global OC
table.

Change-Id: I200ab46187fed91cc66cd954b062c8d8ac44f631
CRs-Fixed: 3131600
2022-02-21 04:55:54 -08:00
Krishna Rao
3f38db23d4 qcacmn: Add APIs to defragment elem/subelem fragment sequence
Add APIs to defragment a sequence of 802.11 element/subelement
fragments. Add an inline mode to carry out the defragmentation within
the source buffer in order to reduce buffer requirements and to
eliminate memory copies/moves for the lead element/sublement.
Conversely, add a non-inline mode to copy the defragmented payload to
a separate buffer.

Add common helper functionality shared between these APIs.

CRs-Fixed: 3124132
Change-Id: Ia68584e918ddcf626b748f2b0c3a5da6492b40b6
2022-02-19 10:54:58 -08:00
Lincoln Tran
94df448341 qcacmn: Return from function if pointers are NULL
In some MLO functions, there are NULL pointer checks, but the logic
continues even if it is NULL. Return from the function in this case so
there is no potential NULL pointer dereference. This also addresses
a static analysis issue.

Change-Id: I22c4a47d724d8576a2ce78059dec219cbc3de91e
CRs-fixed: 3127461
2022-02-19 06:25:14 -08:00