Commit Graph

3662 Commits

Author SHA1 Message Date
Paul Zhang
47c7d6990d qcacmn: resolve race between vdev create and wifi_pos_get_vdev_count
In function wifi_pos_process_app_reg_req(), it uses function
wifi_pos_get_vdev_count to get vdev_count;
Then wifi_pos_process_app_reg_req->
     wifi_pos_get_vdev_list-> wlan_objmgr_iterate_obj_list,
it uses wlan_psoc_get_max_vdev_count to get max_vdev_cnt,
if vdev is not NULL, it invokes function wifi_pos_vdev_iterator
to fill the vdev_info.

For the failure scenario:
In wifi_pos_process_app_reg_req, it gets 2 for vdev_count
from function wifi_pos_get_vdev_count; Then the process is
interrupted and vdev 2 is created in another process; Now
since there are vdev 0, 1, 2, wifi_pos_vdev_iterator is
called 3 times and memory corruption happens since it writes
two more bytes with op mode and vdev id in vdev_info.

Change-Id: I5222836a1448bfaa7df31c919419d448eaa20895
CRs-Fixed: 3320183
2022-11-07 13:10:18 -08:00
Nidhi Jain
d340e5bc02 qcacmn: Enable monitor mode flag for special vap
This change is to enable monitor mode flag is special vap is up.

Change-Id: Id7f169406e25f8f121f5e32074ac3c8049870e01
CRs-Fixed: 3326413
2022-11-07 00:45:03 -08:00
Edayilliam Jayadev
d36d1c8c2a qcacmn: Log time stamp of multi vdev restart response
Log the time stamp corresponding to the start of processing
of multi vdev restart response event.

CRs-Fixed: 3308918
Change-Id: Ia00923b3a1033097429d3856047a4b639408aab8
2022-11-02 01:48:08 -07:00
Divyajyothi Goparaju
28aa42540e qcacmn: Replace wlan_reg_set_channel_params_for_freq
Replace all occurrences of
wlan_reg_set_channel_params_for_freq  API with new API
wlan_reg_set_channel_params_for_pwrmode.

Change-Id: Id751558b32f2b61bd356e1ebce3238598fbd16c1
CRs-Fixed: 3144794
2022-11-01 09:18:51 -07:00
Amith A
0f5cd03b90 qcacmn: Modify wlan_reg_get_eirp_pwr to get client EIRP
Modify wlan_reg_get_eirp_pwr and its sub functions to to get client
EIRP.

Change-Id: Icbc33833ac0fef1d150a491e5398b913e18f3fac
CRs-Fixed: 3316710
2022-11-01 03:39:59 -07:00
Amith A
60e23f8e3b qcacmn: Add an API to check if given 6 GHz freq is Tx-able
Add an API to check if the given input 6 GHz frequency is Tx-able
in the given power mode.

Change-Id: I9e94c1c3ec7c4c31d18bde6e88905a9239636f00
CRs-Fixed: 3305006
2022-10-31 23:18:46 -07:00
Surya Prakash Sivaraj
049bb88ab0 qcacmn: Change err to debug print in roaming path
Change the peer retrieval error message to debug in
wlan_twt_set_peer_capabilities().

The peer twt capability will be set later after peer
is created. Because of this error print, there is a
delay of around 10-20msec in the roaming path.

Change-Id: I5267a61df5726b67ff727101bd553fd4ce07fa5f
CRs-Fixed: 3314202
2022-10-31 23:18:39 -07:00
Deeksha Gupta
433dee00be qcacmn: Rename multi_link into multi_link_bv
In struct ie_list, rename multi_link variable into
multi_link_bv.

Change-Id: Icfa26f20f9004c6e342add97a34505f45372c636
CRs-Fixed: 3313417
2022-10-31 04:09:16 -07:00
Abhishek Singh
d59c9453d6 qcacmn: Remove unused API wlan_serialization_non_scan_cmd_status
Remove unused API wlan_serialization_non_scan_cmd_status from
serialization.

Change-Id: I8bcd22445489ad4d7f02d9e6bb118ef626491fde
CRs-Fixed: 3313124
2022-10-30 23:51:42 -07:00
Liangwei Dong
942fb70e22 qcacmn: Clear Chan freq in wlan_cm_connect_req of partner link
Partner link connect request is copied from primary link.
The upper layer may include BSS channel freq preference in
OS connect req. We have to clear it for partner link connecting,
otherwise the scm_filter_match will filter out the mlo partner
candidate and cause partner connect failed.

Change-Id: I9ca8f2baf5f7e660ed0b72c1dffa886f1c1e8f11
CRs-Fixed: 3320085
2022-10-30 21:42:38 -07:00
Jianmin Zhu
c877314ca8 qcacmn: Detach ml peer before free
In special case, link peer is failed to attach, then mlo peer is deleted
without detaching from ml peer list. When access peer list, assert will
happen for use after free.

Change-Id: Ic7a58fa0708ae6b920a69100e798c0aa8db7fe0d
CRs-Fixed: 3319376
2022-10-28 19:31:23 -07:00
Paul Zhang
2158048410 qcacmn: add __packed for bit mapping structures
Currently, structure tbtt_information_header and
rnr_mld_info don't have attribute __packed. When
fetching the value of bss_param_change_cnt, it
tries to align with byte and causes wrong value.

And these are OTA structures which should be moved
to file wlan_cmn_ieee80211.h.

Change-Id: I326e62e6f513c2b43fe08c278aa4b5a245d2d35c
CRs-Fixed: 3313710
2022-10-27 17:49:38 -07:00
Srinivas Pitla
40aac77ac2 qcacmn: Initiate disconnect for MLO SAE clients
When SAE station is trying to associate to MLO AP.
If this station was connected to other link vap of same MLD,
then if same station is trying to connecting with link VAP,
ML peer entry is found with MLD MAC address.

For SAE stations, initial understanding to handle disconnect
from hostapd, but as hostapd initiates SA query for the connected
link peers only, in this case, hostapd can't initiate SA query
as it was connected to other link VAP.

The fix is to allow initiating deauth of the current ML peer entry.

Change-Id: Iddb53f0156b460a2ede2197a74acf254c83b7b37
CRs-Fixed: 3313785
2022-10-27 11:30:57 -07:00
sandhu
901120c066 qcacmn: Fix incompatible function pointer assignment
Fix incompatible function pointer assignment.
Define a wrapper around mc timer callbacks to
make them compatible with standard scheduler
message callback function signatures.

Change-Id: I07829680d1758ccbd53e8b1fe10b0e30e100a2c6
CRs-Fixed: 3305719
2022-10-26 18:47:58 -07:00
Amruta Kulkarni
ebeaf9b564 qcacmn: Define T2LM control parameters
Define TID to link mapping control field parameters.

Change-Id: I450debf709e89146e440e314ea997461de4e956b
CRs-Fixed: 3245435
2022-10-26 01:17:34 -07:00
Priyadarshnee Srinivasan
f5324ff1ce qcacmn: Add best power mode changes for punctured channels
AFC request or response does not consider punctured channels/BW as an
input. Hence the SP EIRP/PSD power for punctured channels cannot be
derived directly from AFC response data.
Add punc_pattern as an input to the APIs reg_get_best_pwr_mode() and
reg_get_eirp_pwr() (and its dispatchers).
Compute SP EIRP for the punctured channels in
reg_get_sp_eirp_for_punc_chans() using the following formula:
MIN_PSD + 10log10 (Non-punctured BW)
Fetch min_psd from the AFC server response data for the input freq
and BW combination.
Use the total BW and puncture pattern to fetch the
non-punctured BW.

CRs-Fixed: 3306932
Change-Id: Id5c4c404a3155474a01a0dacb3bcf289e92e65ac
2022-10-26 01:16:52 -07:00
Priyadarshnee Srinivasan
7ef4c7a634 qcacmn: Add input puncture bitmap to channel search API
Add input_punc_bitmap to struct ch_params.
Add input puncture bitmap to regualtory channel search APIs.

The non-SP channels will be punctured by ACS module so that AP
can come up in highest possible BW in Standard Power mode
with the given primary frequency. These punctured channels are not
validated (whether supported in the given power mode of operation) by
the regulatory.

CRs-Fixed: 3278013
Change-Id: I56b0495be902fd92fc6da26e1007d60f930ba687
2022-10-26 01:16:27 -07:00
Priyadarshnee Srinivasan
571b7fcf35 qcacmn: Add a dispatcher API to fetch bonded chan entry
Add a dispatcher API wlan_reg_get_bonded_chan_entry to fetch
the bonded channel entry given freq, bandwidth and center of 320 MHz
channel.

CRs-Fixed: 3278013
Change-Id: I9449b3b4d72266fd7f2b6a0ea78b661fbfa5c6a9
2022-10-25 22:09:07 -07:00
Priyadarshnee Srinivasan
cdd62624af qcacmn: Add an API to fetch the AFC freq range and psd limits
Add an API to fetch the freq range and PSD limits from AFC server
response

Change-Id: I583dfbd6f58e6293ba2d9df5d49763f236a2698c
CRs-Fixed: 3306932
2022-10-25 18:38:52 -07:00
Vinay Adella
1f4af7ef5c qcacmn: Check valid link-peer's assoc-resp before adding ML-IE
The assoc-resp buffer of the link-peer can be null, while sending the
assoc-resp frame. This can happen if the ML peers are already setup but
the next association fails. In this case we send the assoc-resp frame
before link-peer's assoc-resp buffer is initialized.

Change-Id: I28d48068b4554b7663b118cc6023df396e45cae9
CRs-Fixed: 3316851
2022-10-25 18:38:43 -07:00
Jianmin Zhu
4be0519c35 qcacmn: Fix build issue
Missing symbol:b'dfs_disable_radar_and_flush_pulses' in wlan.ko.

Change-Id: Iff8464d02dbdb5100db84949b57e9bd2068dd7e9
CRs-Fixed: 3319825
2022-10-24 21:31:05 +08:00
Priyadarshnee Srinivasan
998c233d8f qcacmn: Flush radar pulses after spoof check
Spoof DFS check happens when AP is brought up in a DFS channel in
FCC domain. These spoof pulses are sent by FW in several bursts
via wmi_phyerr_event_id. Once host receives the first set of pulses
and if radar is detected by the host, host sends the radar found params
to FW. However, host does not disable the radar detection. Hence, host
continues to receive the next burst of spoof pulses and detects radar
again. This second set of radar found params when sent to FW is treated
as "real radar" pulses and FW sends a DFS status code of 2. Hence
host does a channel change to a new channel.

Hence the spill-over spoof pulses are treated as "real radar" and causes
frequent channel change on the DUT.

Once the first set of spoof pulses are detected as radar and radar found
params are sent to FW, disable DFS radar detection until the DFS status
check is received from FW. Once FW responds with a DFS status check,
re-enable the radar detection.

Change-Id: I57018776a449203c6467bb384120d4319bc04805
CRs-Fixed: 3305592
2022-10-23 05:15:04 -07:00
Hariharan Basuthkar
1773c16687 qcacmn: Add Regulatory support for EIRP preference
Add regulatory support for giving preference to fill EIRP power
in the WMI_VDEV_SET_TPC_CMD_ID.

Change-Id: Iab28306b15d74109519629cb0b815cd110254d56
CRs-Fixed: 3307372
2022-10-22 19:48:42 -07:00
Krishna Rao
68a8c47232 qcacmn: Add clarification for util_find_mlie()
Add further clarification for util_find_mlie() that the buffer passed
should contain only 802.11 Information Elements, and should not
contain other information like 802.11 header, 802.11 fields that are
not elements, etc.

Change-Id: Id577cdc08189cd0f60053b1345ee15b3bb4f0eca
CRs-Fixed: 3316369
2022-10-22 11:27:23 -07:00
David Oladunjoye
25cb050e32 qcacmn: Add lock to Set/clear WLAN_VDEV_FEXT2_MLO_STA_LINK flag
Currently, this MLO flag is being set/clear without regard for
concurrency. We need to lock the vdev when updating these values to
prevent race condition.

Change-Id: Ied90d62f10f6f12a35eeac3060dd0fae7d0c6cfd
CRs-Fixed: 3305558
2022-10-21 21:31:17 -07:00
Priyadarshnee Srinivasan
71b1f90eb3 qcacmn: Reduce the debug level of scan err print
When the beacon frame is received by the DUT, util_scan_get_phymode_5g
gets invoked. In a highly noisy environment, malformed/incorrect
beacon frames is received and the content of vhtop->vht_op_chwidth
becomes invalid. Hence bad channel print floods the console since
it is under scm_err debug level (the default debug level of SCAN module
				 is ERROR).
Reduce the debug level of the print to scm_debug since it hits for
every in-correct beacon.

Change-Id: I92d99f8d69ac7f892f155f2043c60a4c0c2efa12
CRs-Fixed: 3313827
2022-10-21 03:22:46 -07:00
Amruta Kulkarni
d3119b83c7 qcacmn: Make mlo_clear_connected_links_bmap() api public
mlo_clear_connected_links_bmap api is also used for roaming,
so changing it as public api.

Change-Id: I31225cb04971dbf470338022ca4dc09a9967b5c4
CRs-Fixed: 3317236
2022-10-21 03:22:39 -07:00
Paul Zhang
15a10610be qcacmn: add the enum of ie elements
Add the enum of ie elements:
WLAN_ELEMID_TWT, WLAN_EXTN_ELEMID_UROA,
WLAN_EXTN_ELEMID_BSS_COLOR_CHANGE_ANNOUNCE.

Change-Id: I823ab150bf7f65173774eecd5f3c0f093cb5979f
CRs-Fixed: 3296198
2022-10-20 12:50:39 -07:00
Divyajyothi Goparaju
f3372af250 qcacmn: Replace reg_get_channel_state_for_freq
As part of upgrading legacy code with 6 GHz power APIs,
replace reg_get_channel_state_for_freq api with new api
reg_get_channel_state_for_pwrmode

Change-Id: I3e577148f0ee78f6ec8f96feef42be9ac920467d
CRs-Fixed: 3144822
2022-10-20 12:50:32 -07:00
Jeff Johnson
e12273c5cd qcacmn: Fix misspellings of "forwarded"
The RX REO functionality has numerous misspellings of "forwarded",
including multiple identifiers. Fix these to use the correct spelling.

Change-Id: Idc4e66e7356b978742fea30ae7ef0c9498c4f938
CRs-Fixed: 3313839
2022-10-20 03:00:21 -07:00
Amith A
d64ebfde22 qcacmn: Default power mode setting of 6 GHz AP
In outdoor deployment, if there are VLP rules present, set the default
power mode as VLP, else set it as SP.
In indoor deployment, if there are LP rules present, set the default
power mode as LP, else if VLP rules are present, set it as VLP, else set
it as LP.

In reg_propagate_mas_chan_list_to_pdev, make the call to
reg_save_reg_rules_to_pdev before reg_init_pdev_mas_chan_list as
reg_set_ap_pwr_type which is called in its path requires reg rules.

Change-Id: I773c54b18aceb8db9666d16b08e841216124aaff
CRs-Fixed: 3311810
2022-10-20 01:11:51 -07:00
Asutosh Mohapatra
db0def4e98 qcacmn: Add cosmetic changes for fcc rule specific functions
Place extract_ext_fcc_rules_from_wmi function near its
caller and modify function definiton of empty function
reg_set_pdev_fcc_rules.

Change-Id: I6918addbe81bb410355616023e0c6dac534700b6
CRs-Fixed: 3286479
2022-10-20 01:11:37 -07:00
Jyoti Kumari
e3f7c3a8e9 qcacmn: Support Low Latency SAP and scan concurrency
Low latency SAP can come up on below two profile
a. Gaming
b. Lossless Audio

Scenario: LL SAP is present on 5 GHz channel and scan comes up

DBS: For both profile, allow scan only in 2.4 GHz channel
SBS: For both profile, allow scan on non low latency SAP
channel which are mutually exclusive.

Change-Id: I9d5832a457d08325b9e66099286ae3f18cdc66e1
CRs-Fixed: 3294607
2022-10-19 22:30:53 -07:00
Jeff Johnson
0906d287f3 qcacmn: Fix misspellings of "nonce"
In wlan_crypto_global_api.c there are several functions which use a
misspelled term for "nonce" so replace them with the correct spelling.

Change-Id: Iedc65bbad173c5fc398e25730853bc7b36e86b31
CRs-Fixed: 3313801
2022-10-18 16:30:45 -07:00
Yu Wang
093c816d05 qcacmn: print SSID with QDF_SSID_FMT and QDF_SSID_REF
To protect user privacy, print SSID with QDF_SSID_FMT
and QDF_SSID_REF, then SSID will be hide in logs if
anonymization is enabled.

Change-Id: Ifad0ccd76bd1184a9b1d20f3d7fa4455df924843
CRs-Fixed: 3291826
2022-10-18 11:57:53 -07:00
Kannan Saravanan
38f0453c6d qcacmn: Initial changes for york bring-up in umac layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I2a26e1c45c61630594efd86466f19ea04300939f
CRs-Fixed: 3282641
2022-10-18 10:08:27 -07:00
Jithender Miryala
aa2e2a2b81 qcacmn: Update the regulatory database which was missed in version 41
1. Update "6 GHz max bw support" for KUWAIT country.

2. Do not map "FCC1_AP_SP_6G" to super ID 01(FCC1_6G_01) which is not
allowed.

Change-Id: I61cc359a34257aeb00b8e3449398e0b73bb49590
CRs-Fixed: 3303138
2022-10-18 07:13:49 -07:00
Gururaj Pandurangi
880d85269f qcacmn: Add reg APIs to update tx power on ctry code change
Add a new regulatory callback registration API and a
regulatory API to update tx power whenever the country code
changes without change in operating channel OR if fcc
constraint is set. This MCC-specific regulatory API is
called from HDD and invokes the TPC calculation logic via a
callback during the above-mentioned cases.

Change-Id: I7d3db83129d169b7e0421c20c061de356f32cfa2
CRs-Fixed: 3311432
2022-10-17 19:59:39 -07:00
Liangwei Dong
7f3b6c9512 qcacmn: Add new enum action OUI type support
Add ACTION_OUI_11BE_OUI_ALLOW enum to support new WMI action
oui type WMI_VENDOR_OUI_ACTION_ALLOW_11BE.
Add scan entry to candidate validation struct.

Change-Id: I502a246584cd5ee6b4759d8fbb67629628314560
CRs-Fixed: 3301859
2022-10-17 12:58:09 -07:00
Amith A
c307d90397 qcacmn: Add default tx power values for VLP
The default PSD and EIRP tx-powers are filled only for LPI power mode.
Since VLP support is added, add default PSD and EIRP tx-powers for VLP
power mode.

Change-Id: Ida8eebaf37a6bf6c663a24f832b4e89baf2d8659
CRs-Fixed: 3311795
2022-10-17 12:58:02 -07:00
Sheenam Monga
f390986aac qcacmn: Don't include policy manager headerfile
Logic of checking concurrent vdev while sending
pd threshold command is removed from mlme as it
is handled while concurrenct vdev up and down. So,
we don't need to include policy mgr headerfiles in
vdev_mlme file as no policy manager function is invoked
from mlme.

Change-Id: Iec307437d929df5dceb58bf931fd20fa29b55550
CRs-Fixed: 3313112
2022-10-17 06:49:10 -07:00
Rachit Kankane
c7964d96d6 qcacmn: Add VDEV MLME support for SR Prohibit
Add VDEV MLME variables, function to support SR prohibit
Enable / Disable

Change-Id: I9b6128f179880dd407dc042f6bbbbde63135f4ed
CRs-Fixed: 3308159
2022-10-17 06:49:01 -07:00
Sheenam Monga
8b79320b92 qcacmn: Send BSS color bit map and partial bssid bitmap
Send BSS color and partial BSSID bitmap to fw when SR
enable is sent to FW, so that FW can classify the srg
and non-srg colors.

Change-Id: I44711fd7e7cc05867d042a04e783ae29b04b388a
CRs-Fixed: 3304796
2022-10-17 06:48:48 -07:00
Sheenam Monga
32aaed0ec6 qcacmn: Add support to set/get SRG param
Add support to set / get SRG min and max pd threshold
offset, SR disable / enable due to concurrency in vdev mlme.
This will be used to verify that PD threshold provided by user
is with in the AP range or not and it will be used to send the
data to userspace whenever queried.
Incase when single MAC concurrency is not supported with SR,
these VDEV mlme variables will also used to enable / disable
SR at dynamically.

Change-Id: I024b31950d9a5c0f5086972e91db440b23ed712f
CRs-Fixed: 3304789
2022-10-17 06:48:42 -07:00
Sheenam Monga
7d1a7719b8 qcacmn: Add SRG pd offset in OBSS_PD_THRESHOLD
Currently, SRG pd offset is not sent to fw as part
of WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD. Add
support to send SRG pd offset provided by userspace,
if provided offset is with in the range of min and max
SRG PD offset advertised by AP.

Change-Id: I8b70dedbabcc6c3a296b8d378b9317924dd5c581
CRs-Fixed: 3304747
2022-10-17 06:48:36 -07:00
Sheenam Monga
663294c0f3 qcacmn: Handle SR Enable vendor command
Handle SR enable vendor command as part of which
send PD threshold value provided by userspace
check the range of the provided threshold,
if threshold lies with in SRG or NON-SRG
range then provide the threshold sent by
userspace else send the MAX of SRG and NON-SRG
offset advertised by AP.

Change-Id: I428a933cc324446fdb4f18f535f1b78228d504fa
CRs-Fixed: 3304779
2022-10-17 06:48:29 -07:00
Rachit Kankane
58ccce90fb qcacmn: Send VDEV command to enabled SR prohibit
Send WMI_VDEV_PARAM_ENABLE_SR_PROHIBIT_CMDID to enable/disable
SR prohibit.

Change-Id: I4123af04ab2c4cf539a4ea7938d2a34e58a7ba45
CRs-Fixed: 3308068
2022-10-17 06:48:22 -07:00
Rachit Kankane
a9083f7afe qcacmn: Add macro for Spatial Reuse
Add below macro for SR:

1. HESIGA_Spatial_reuse_value15_allowed bit
2. NON-SRG PD disabled threshold
3. Minimum PD Threshold
4. Add service bit - wmi_service_obss_per_packet_sr_support

Change-Id: I9560518cadc5c6f916579af63ef44d41c748fd8d
CRs-Fixed: 3307369
2022-10-17 06:48:16 -07:00
Aakanksha Doda
c9dce3011f qcacmn: Move the QCN attributes enum to common code
Move the QCN attributes enum to common code to keep a sync
between FW and Host values.

Change-Id: I0e4da33781c9e5230b6b309942cdc672c707d29f
CRs-Fixed: 3307120
2022-10-17 04:52:23 -07:00
Santosh Anbu
f724435caa qcacmn: Handle EV_DOWN to do peer cleanup in MLO_SYNC_WAIT
Initially there were no peers connected to AP VDEV when the VDEV was in
MLO_SYNC_WAIT state. So EV_DOWN would directly move to STOP state and
proceed with bringing down the vdev.

With CSA in MLO, there can peers connected to AP VDEV in MLO_SYNC_WAIT
which have to be deleted/cleaned up as part EV_DOWN event handling.

Added change to handle the DOWN event as done in START/UP_ACTIVE state.
By moving to SUSPEND, the clients are disconnected then moving to
STOP state.

Change-Id: Ida71914b9719395ab666805cc7072491ffa9baf1
CRs-Fixed: 3308207
2022-10-15 13:51:28 -07:00