There are API to get vdev by reference from psoc by vdev id,
if either the vdev is in any state or the vdev is created state.
The wlan_objmgr_get_vdev_by_id_from_psoc return the vdev reference
only when the vdev is in CREATED state.
If the VDEV is in ALLOCATED or LOGICALLY DELETED state,
the API returns NULL.
In this new API we need to get the reference when
it would be in ALLOCATED state and not in LOGICALLY DELETED state.
We need an API to get vdev by reference only
if the vdev is not in logically deleted state.
Add API to get vdev from psoc by vdev id if
the vdev is allocated state and not in logically deleted state.
CRs-Fixed: 2901595
Change-Id: I1611c7e2a223ca8c4b0c3bf79ded35b2e958d113
Add APIs to support customer scan filter and candidate list
sorting based on user perference
Change-Id: I9b5d46c7851a0afd4513f50c50c43baf26c29d0c
CRs-Fixed: 2896741
When START cmd is activated in scheduler context, due to system load
the scheduler may not process the START cmd time for certain time.
During which if VDEV is checked for INIT state, we proceed to
further operation and return.
Now, start cmd in scheduler will be processed, which will try to bring
up the VDEV leading to undefined issue.
To fix this
1. When we are waiting on VDEV to move to INIT state, we should also wait
until START cmd is removed from serialization active queue.
2.With this we ensure that START cmd processing is completed in the
scheduler context as well as make sure that STOP moves from pending to
active and moves the VDEV SM to INIT state.
Change-Id: I51d0a695cd8c0a8b54e74226e04f9cd32ce58e4f
CRs-Fixed: 2894578
Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.
Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
There is an API to get the scan aging time,
but there in no API to set the scan aging time
and can be configured through INI.
Add API to set the scan aging time run time.
CRs-Fixed: 2894428
Change-Id: Ide2b2eec780dd7ff07ebd783b0916a68c0e94a2c
Free crypto keys on connect active instead of disconnect complete,
to avoid race between south bound disconnect, leading to key free and
set key req from supplicant using the same key.
Change-Id: Idae5100d255b4df6b84425114cb66fa8d3b504e0
CRs-Fixed: 2897247
For MLO SAP, it can't generate beacon template until all the vdevs
start. To synchronize MLO vdevs start, we add two new substates
WLAN_VDEV_SS_MLO_SYNC_WAIT and WLAN_VDEV_SS_UP_ACTIVE whose parent
state is WLAN_VDEV_S_UP.
Once vdev gets vdev start rsp, notify MLO mgr, who checks whether all
vdevs are active, if so, trigger WLAN_VDEV_SM_EV_MLO_SYNC_COMPLETE for
the vdev which is in WLAN_VDEV_SS_MLO_SYNC_WAIT state.
After vdev translates to WLAN_VDEV_S_UP, MLO SAP will translate to
WLAN_VDEV_SS_MLO_SYNC_WAIT, while the other vdev will translate to
WLAN_VDEV_SS_UP_ACTIVE.
MLO sap will notify MLO mgr once it is in WLAN_VDEV_SS_MLO_SYNC_WAIT.
Then MLO mgr checks whether all the vdevs are active, if so, trigger
WLAN_VDEV_SM_EV_MLO_SYNC_COMPLETE for the vdev which is in
WLAN_VDEV_SS_MLO_SYNC_WAIT state.
If MLO SAP receives WLAN_VDEV_SM_EV_MLO_SYNC_COMPLETE in
WLAN_VDEV_SS_MLO_SYNC_WAIT state, it translates to WLAN_VDEV_SS_UP_ACTIVE
Change-Id: I8be9c02f62719dbdcf4af79d83173c316c64b765
CRs-Fixed: 2866103
In order to support different power levels of 6G AP and client,
the channel list event from FW namely "REG_CHAN_LIST_CC_EVENTID"
is modified to add few parameters specific to 6GHZ devices.
Hence the existing event is replaced by REG_CHAN_LIST_CC_EVENT_EXT for
all 2G/5G/6G pdevs in FW. Therefore, after the service ready event, FW
sends the channel list for the configured country/regdomain via
REG_CHAN_LIST_CC_EVENT_EXT. This mandates that all host software need
to have the processing capability of REG_CHAN_LIST_CC_EVENT_EXT to bring
up the AP.
As there can be host software which has not yet implemented the
version of "REG_CHAN_LIST_CC_EVENT_EXT", backward compatibility is lost
if "ONLY REG_CHAN_LIST_CC_EVENT_EXT" is sent by FW.
Hence a 3 way handshake between host and FW is established.
1. FW advertises its capability of processing REG_CHAN_LIST_CC_EVENT_EXT
id via wmi service bit 'wmi_service_reg_cc_ext_event_support'.
2. If the host is capable of processing the "REG_CHAN_LIST_CC_EVENT_EXT"
event id (which is done based on registration of this event), host
sends the capability in WMI_INIT_CMDID setting a bit in host_service_flags.
3. Based on host capability advertised in WMI_INIT_CMDID, FW decides to
send the old event ("REG_CHAN_LIST_CC_EVENTID") or the new event
("REG_CHAN_LIST_CC_EVENT_EXT").
4. If there is no flag indicated by host to FW in WMI_INIT_CMDID, FW
by default sends the old event ("REG_CHAN_LIST_CC_EVENTID").
CRs-Fixed: 2876360
Change-Id: Ibe95f414ad9fff0e5641bcc6e60450ef9afe245b
- Remove wlan_reg_set_channel_params and the callers
associated code.
- Clean up part of CONFIG_CHAN_NUM_API functions.
Change-Id: If9583e674752d6f47de8d7d6bc946909509957b5
CRs-Fixed: 2883773
As chan num may be same for different bands, getting chan enum
from channel number can provide incorrect results.
Use wlan_reg_get_chan_enum_for_freq API to get chan enum instead
of the wlan_reg_get_chan_enum.
Change-Id: Ibf08bba31e3778cb4857612d2c95813558be5bc9
CRs-Fixed: 2885860
Update default values of INI items to most commonly used values
in WCNSS_qcom_cfg.ini file on commercial devices.
Change-Id: Ie3a4ce2cbf4bc2352d5ebc5be939a47818a6d594
CRs-Fixed: 2874759
The wlan_minidump_remove function utilizes the updated kernel API.
So, modify the function definition and parameters accordingly.
Change-Id: Ib62a46688400d5d9c2ff45c17dc41d5f0b7f58d0
CRs-Fixed: 2860432
A huge number of prints come under dfs_err. Enabling all of these
unnecessarily floods the console and some of these prints show up for
expected behavior such as the dfs object being null for a 6GHz radio.
Only memory specific prints could be enabled specifically later.
CRs-Fixed: 2887966
Change-Id: I27091924450d1cc3d4e3df38e49f1a537e080bc6
Fw advertise big data stats in response of host
command WMI_VDEV_GET_BIG_DATA_P2_CMDID.
Add support to handle BIG_DATA_P2_EVENTID.
Change-Id: I550eb1c99ee1d8c102f9ad673841c410ff0829ef
CRs-Fixed: 2868922
When country has not changed, reg_set_country will drop the request.
Return failure in this case so caller will know if no action is taken.
Change-Id: If6095887c6166edc626eab3bde312cc0aa8490b2
CRs-fixed: 2892356
Add logic to remove preauth or roam command from serialization
depending on the state the roaming was in.
Change-Id: Ia381d040ce7e15a725eb2402896bf476d3236566
CRs-fixed: 2882994
Structure wlan_cm_roam_resp and wlan_cm_connect_resp are identical
structures and in current code these structures are used for connect
and reassoc functionalities with different functions as these are
identical structures and only one structure can be used to reduce
the duplication of the code.
To address this code duplication issue replace wlan_cm_roam_resp
structure with wlan_cm_connect_resp.
Change-Id: I90949c25f46acd2fa78cebb70c9a04f0718b90c4
CRs-Fixed: 2875232
Modify the length check to drop beacons which has
WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH IE length less than 3. This is to
accommodate the addition of fields to this IE in the future.
Change-Id: I8cba60b631022f4348cce90ae41a003964040ad1
CRs-Fixed: 2884249
Allow cfr period to be multiples of 1ms for targets like
qcn9000, qca6018, qca8074v2 and qca5018.
For other targets, restrict it to be multiples of 10ms.
CRs-Fixed: 2878062
Change-Id: I7f5638adf8ef39f7b8b681ae6693f5f032217e88
Introduce a regulatory core API to fetch the bonded channel
pointer given a frequency and a channel width, using the
static bonded channel arrays for different bandwidths.
Change-Id: I87d91a45c59ba7d9ba6d692bb29822b184b4604b
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
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
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
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
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
Remove #ifdef WLAN_FEATURE_INTERFACE_MGR from connection mgr, as
interface manager .h files take care of it.
Change-Id: I5b1e07beecd93c98429318372ed72fdf414712a4
CRs-fixed: 2878656
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
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
Make CM serialization disconnect req as blocking or non blocking based
on feature macro
Change-Id: I71d664e28cba35d44c0c1fac2bd6a38c4bc4c9df
CRs-Fixed: 2879850
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
Add fields to the validate bss data struct to pass more information
to the interface manager when validating a candidate.
Change-Id: I82536585517da87ec0883c6010461d7ee929bd18
CRs-fixed: 2836749
After NOL expiry of the radar hit channel, the scan channel list
of the FW is updated to include 'NOL expired' channel as well
so that FW can initiate subsequent scan on this channel.
Only those channels which are not marked as NOL in regulatory
are updated in the scan channel list.
However, in the current flow of events, the scan channel list is
first updated via dfs_nol_update() API and then channel is
unmarked as NOL in utils_dfs_reg_update_nol_chan_for_freq() API.
Hence the NOL expired channel is not updated to FW and subsequent
scanning does not happen on this channel.
Ensured that the channel is cleared of NOL flag before updating
the scan channel list.
CRs-Fixed: 2877337
Change-Id: I7331bcc12c1dd6a26407c0753f28481cee1ce628
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.
Change-Id: I727fd5a055e4e400ebc174cfb504d60e3335c3c4
CRs-Fixed: 2872244
The current value of scan timeout value is 10 secs.
Earlier for ap platform the scan timeout wass set to default as 50 secs
and and also for ap platform the scan could be triggered for internally
triggered connect and the max scan timeout
of 50 secs should not result in supplicant timeouts.
So setting the max scan timeout value of 50 sec for ap platforms
CRs-Fixed: 2870782
Change-Id: Icd2841f1f5503623f15bdbdea3430ef6559b9a1b
This is a cleanup fix to remove duplicate functions and remove unused
debug logs.
Change-Id: I0ebd203f0d19ad52cf97dcfe32914df59d1ea102
CRs-Fixed: 2863865