When we receive a negative EIRP value from AFC APP with UINT, we treat it
as a positive value. See the following reasons why EIRP power value
was changed when we received it as a UINT.
1. In the reg_find_eirp_in_afc_eirp_obj function, the afc 'eirp_power'
(16-bit) value is in units of 0.01, and it is an unsigned integer. For
example, if the negative value is "-1400" then it becomes "64136". With
this value, when we try to get the original EIRP value using division
(eirp_obj->eirp_power / EIRP_PWR_SCALE(100)), it returns "641", but the
expected EIRP value is -14.
2. In the reg_get_sp_eirp function, both the variables 'afc_eirp_pwr'
(8-bit) and 'reg_sp_eirp_pwr'(16-bit) are declared as unsigned integers.
For example, when "-14," is assigned to "afc_eirp_pwr", it becomes "242".
And assuming 'reg_sp_eirp_pwr' is "36", the minimum of the two variables,
using QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr), becomes "36", but the
expected minimum is "-14 or 242".
Process the positive or negative EIRP values that are received from AFC
application. Receive it as an int instead of an unint and typecast it to
int when we check for minimum value from afc power and standard power.
Change-Id: I255225e1f68ab897d36f3d4fbd5e5815a862460b
CRs-Fixed: 3398501
Add a new wrapper API to send peer-level negotiated
tid-to-link mapping to FW as the existing API to send
the mapping received from the beacon/probe response
uses ML dev context whereas the new API uses ML peer
context.
Change-Id: Ifada5600e9524585c69847f332ed0280fd316813
CRs-Fixed: 3423127
If link vdev roam sync failed and new dp mlo peer wasn't created,
assoc vdev roam sync was still handled, dp peer update failed
and asserted for mlo peer not found.
To fix it, if link vdev roam sync failed, return to trigger HO_FAIL,
don't handle assoc vdev roam sync.
Change-Id: I47aa70723cd741839cdb8fb21d446730a8ed80e5
CRs-Fixed: 3468553
Export wlan_reg_get_freq_range() and wlan_reg_get_freq_range() APIs
to be invoked by other modules.
Change-Id: I2de7acf395011bdcc20100fc5980ab69f2b9fbeb
CRs-Fixed: 3459316
reg_set_ap_pwr_type() API is invoked per pdev and the default ap power type
is set for all bands of the pdev (2.4 GHz / 5 GHz/ 6 GHz). Hence, the
user space command g_ap_power_type retrieves SP Power mode for 2.4 GHz
and 5 GHz pdev in outdoor deployment mode.
Since power type is valid only for a 6 GHz pdev, check if the chip
supports 6 GHz channel range and set the power type.
CRs-Fixed: 3459316
Change-Id: Ib5038d5d019ab9ffaa6a607916e5187ecdbd4e2b
Add enum to parse and store AFC response format type. This enum is
used to map the response format negotiated with FW during WMI init.
Change-Id: I5c0b61aeddfce1d1b64f9225f64546f80d0e9e3e
CRs-Fixed: 3420549
Currently many pev related API's are not present in
wlan_regulatory_pdev_obj_created_notification. As a result many info
is not saved to pdev.
To address this issue invoke reg_propagate_mas_chan_list_to_pdev
from wlan_regulatory_pdev_obj_created_notification.
Change-Id: I47b7c09006c93828db32710d1fa882eb1f9b8ba5
CRs-Fixed: 3461593
In the change-id Ied56965c2e8d700a2fc14a5a2b79beed95ac7818,
the call of reg_propagate_mas_chan_list_to_pdev in pdev_obj_creation,
leads to a fatal assert.
Within reg_propagate_mas_chan_list_to_pdev,
ol_ath_fill_umac_legacy_chanlist is called, and internally
within ol_ath_fill_umac_legacy_chanlist, the cookie for the event
ic->ic_wait_for_init_cc_response is set, before the
ic->ic_wait_for_init_cc_response is created in the function
wlan_pdev_update_feature_ptr. This leads to a crash.
To fix this issue, separate fill_umac_legacy_chanlist from the function
reg_propagate_mas_chan_list_to_pdev and call fill_umac_legacy_chanlist
only when WMI_REG_CHAN_LIST_CC_EVENTID or
WMI_REG_CHAN_LIST_CC_EXT_EVENTID is received.
Change-Id: I5fcf85eed32d3ab2cd4fd88ad117fcf22c5875b2
CRs-Fixed: 3427982
Currently host isn't validating the reg rules received from
fw. Host saves these reg rules locally and updates the same
info to kernel.
To address this issue add logic to validate reg rules in host.
Change-Id: I7369126e83ab210720cb5b2db2e11d3aa7491b4a
CRs-Fixed: 3376632
Implement the data structures for DFS puncturing and
un-puncturing state machines. For details of state
machine implementation refer to the change id
I5accbf2866a830447bd776b989c31909060c45ca.
CRs-Fixed: 3462277
Change-Id: I026228fb72302408f2992325099a31a60e986e3c
For MBSSID, aid mgr is allocated twice in
few corner cases of VAP create.
This change adds check, if aid mgr is allocated
by legacy code in vap create, aid mgr allocation
would be skipped
Change-Id: Ie44fab12badb5c9487ce3de333376e1885e727d0
CRs-Fixed: 3461883
1. Start response is received for vdev-0 and continues processing
mlo_sync_complete for partner vdevs holding ap_ctx lock and waiting
on vdev_sm lock of partner vdev
2. During which one of the partner vdev completes CAC_WAIT and continues
processing mlo_sync_complete holding vdev_sm lock and
waiting on ap_ctx lock. This scenario is resulting in RCU_STALL.
The last vdev in MLD to receive start response is responsible for
dispatching MLO_SYNC_COMPLETE event all the partner vdevs and then to self
If vdev_up_bmap is set, then return.
Change-Id: I5ae7146eeba5154331f442f9987593044bde76b4
CRs-Fixed: 3457019
Add if_mgr support to handle STA CSA complete notification and
SAP CSA Started and complete notification.
Before CSA vdev restart on SAP side, disable TDLS off channel.
After CSA, check if TDLS is allowed for the current concurrency
and take action accordingly.
Change-Id: Icbadb898f5b468717f74f92a0993c05b59719205
CRs-Fixed: 3445113
Some IOT APs only allow to connect if last 3 bytes of
BSSID and self MAC is same. They create a new bssid on
receiving unicast probe/auth req from STA and allow STA to
connect to this matching BSSID only. So boost the matching BSSID
to try to connect to this BSSID.
And add logic to refresh the candidate list before next
candidate try when the last candidate connect fail.
Change-Id: I482e122c8c9febbab42f64013fbb78c266f49655
CRs-Fixed: 3432618
In outdoor deployment, when the target sends STOP_TX event, the 6 GHz
AP continues to beacon in the SP power mode, without bringing down the VAP.
In mlme_check_curchan_and_set_ap_pwr_type, since the
afc_power_event_received flag is cleared and set to false during STOP_TX,
the API wlan_reg_get_best_pwr_mode returns LPI as the best power mode.
When LPI is given as input to wlan_reg_set_ap_pwr_and_update_chan_list,
it returns an error as LPI rules are absent in the pdev
(outdoor deployment). But the error status is not handled. Current channel
list also is not updated with the AFC_NOT_FLAG. When the channel list is
sent to the hostapd, NO_IR flag is set based on the presence of the
AFC_NOT_DONE flag in the current channel list. As a result NO_IR flag is
not sent to the hostapd, and the VAP remains in the up state.
To fix this issue, in reg_get_best_pwr_mode_from_eirp_list, skip the
unsupported modes (in this case LPI and VLP), from best power mode
computation. Also, in reg_get_sp_eirp, return the SP EIRP when no rules
other than SP are available.
Also, rename reg_get_eirp_for_non_sp to reg_get_eirp_from_mas_chan_list.
Modify reg_get_sp_eirp to call reg_get_eirp_from_mas_chan_list when
CONFIG_AFC_SUPPORT is not defined.
Change-Id: I1b11bf0580ec6af09ee8f9827bc85fae7930e414
CRs-Fixed: 3436245
Add new params(ul_tid_bitmap & dl_tid_bitmap) for rTWT invite sta cmd.
This will be sent from test command to trigger invite sta.
Change-Id: I843badeb5e826ded5ab4f8083448b2b7fc4c3486
CRs-Fixed: 3456956
In Linux kernel 5.5, commit 43756e347f21 ("scripts/kernel-doc: Add
support for named variable macro arguments") improved how named
variable macro arguments are handled, and changed how they are
documented in kerneldoc comments from "@param...", to "@param",
deprecating the old syntax.
In Linux kernel 6.3, commit 3bdd9f075f54 ("scripts: kernel-doc: Remove
workaround for @param... syntax") removed support for the old syntax.
Currently the dfs_log() documentation uses the old syntax, so update
the documentation to use the new syntax.
Change-Id: I1aa44cd36ffacb0b26ee279496fc5a99b8de371d
CRs-Fixed: 3451492
Allow user configuration options to skip a radio as
primary-umac in multi-link operation.
Change-Id: Ic7c8dd5c1cf7855f4fb762daf9ace7cb82e02cac
CRs-Fixed: 3437922
wlan_reg_recompute_current_chan_list() is defined for MCC only.
Make this wlan_reg_recompute_current_chan_list() common for both WIN
and MCC.
CRs-Fixed: 3451996
Change-Id: Ifcead79a68d0ed04ac1e4b78063f36b91e4d6fd8
mlo setup soc down indication can be called from soc_stop and detach
path. Add logic to handle multiple calls by ignoring down if the state
is already cleaned up.
Change-Id: I6f5c11cc30f38423661063d2834a5b4efa088a49
CRs-Fixed: 3450300
Mutex cannot be acquired or released from
interrupt context.
To fix the warning in log, do not acquire
or release log in while stopping t2lm timer
Change-Id: Ie1e885b162a22e327d3260fecbd71153b947e11b
CRs-Fixed: 3444779
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.
Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
In case of a split-phy 6 GHz radio, there are 6 GHz opclasses and cfis
that do not intersect with the chip range for a given pdev.
The current algorithm appends such opclasses with "num_cfis as 0" to
the AFC request buffer and the buffer with empty cfis are
sent to the AFC server.
This change ensures that the chip unsupported opclasses/cfis are not sent
to the AFC server.
Also, if the reg rule frequency range is not supported by the chip range,
reg_intersect_ranges() is expected to set the out_range as
{low_freq = 0,high_freq = 0}. However, it only sets the low_freq to 0.
Since high_freq is a non-zero value, the chip un-supported range is
considered as a valid range with frequency_low as 0.
This causes the following error from the AFC server:
"error": "The frequency range indicated in the Available Spectrum
Inquiry Request is at least partially outside of the frequency band
under the management of the AFC System (e.g. 5.925-6.425 GHz and
6.525-6.875 GHz bands in US).
To fix this issue, assign high_freq also to 0 if the
reg rule frequency range is not supported by the chip range.
CRs-Fixed: 3442719
Change-Id: I5504376ac31203045b32e23f54a9ab6a41e63a3f
Some devices in WDS station mode have limitation when connected
in 3 LINK MLD association where the Primary umac selected and assoc
link should be same. Make sure to have a sanity check before
going for association in such cases.
If the primary umac and assoc links are set to be different then
the connection will be rejected.
Change-Id: If56461a140d4685ba279b1babe04709d919d1650
CRs-Fixed: 3443733
Do not send assoc response from wlan_mlo_peer_create for
multilink MLO connection. This makes sure that assoc resp
is invoked only once.
Change-Id: Id1acf20bd5e3e3beb16e0dc3073676c421825ae6
CRs-Fixed: 3443511
Driver extracts the vdev from peer, self mac address and
vdev_id. But in some APIs, there can be below scenarios
For example:
1. peer is not available for that vdev( roam vdev),
2. API does not have vdev_id,
3. mac address is not known or incorrect,
4. there is no session available.
While roaming, there can be scenario where driver need to
fetch the vdev before peer creation and session is not
available.
For this, driver introduces new API to fetch roam vdev from
pdev object.
Change-Id: I4a2521773b893a8dc0553335bcadac5a84fbc300
CRs-Fixed: 3441493
Once an incoming MGMT frame is inserted in the MGMT Rx REO egress list from
wlan_mgmt_rx_reo_algo_entry(), there is always a possibility that the same
frame could be sent to upper layers from the other CPUs before
wlan_mgmt_rx_reo_algo_entry() completes its execution in the original
MGMT Rx path. This means that nbuf and MGMT Rx params of a given frame
could be freed before wlan_mgmt_rx_reo_algo_entry() completes.
Hence, make sure to not access frame's nbuf and MGMT Rx params once the
list updates are done for that frame.
Change-Id: I91cbdef4b1ea5b81d39606e47a46021f30193ce5
CRs-Fixed: 3433621
The existing code does not support capability to be set
if trigger based ranging rsta wmi service bit is enabled.
This require addition of ext feature flag for trigger based
ranging rsta support.
Add 11az TB rsta ext feature flag and set the same as per
firmware capability for 11az feature.
Change-Id: I12512175d0b33daa906586c7f96f0c8c3f7400a3
CRs-Fixed: 3437057
In some scenarios, there can be need to get the peer MLD address.
For this, add new API to extract the MLD address from the scan entry
by the BSSID.
Change-Id: I3b78501cb5320b3e834313a048b6fa0a84eab03b
CRs-Fixed: 3441498
1) select lower bw vdev link as primary umac for first station
2) Added support to increase group size to distribute stations
on all PSOCs
Change-Id: Ic6762fbe8e6bc5feef70ddaaa118af121d38a1f4
CRs-Fixed: 3366442
Trigger SAP / GO channel switch on receiving
wmi_csa_ie_received_event_id from FW in STA + SAP / GO DFS SCC
concurrency.
Change-Id: Iff60dffb71b170f56c4fbee4e297b81b87632a2a
CRs-Fixed: 3431365
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:
1. Register the handler
2. Handler to extract the event
Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363