A race between cfg80211 ap stop and wiphy system suspend can lead
to either DPM WD or serialization VDEV disconnect active command
timeout since scheduler thread gets suspended as part of wiphy
suspend and both cfg80211_disconnect and wiphy suspend/resume acquire
RTNL lock.
To address this race condition avoid ap stop when wiphy
suspend is already completed since scheduler thread gets suspended
as part of wiphy suspend and it can't process ap stop.
Change-Id: I5792b524a27326ca9e020600db2b82e16cc7ea96
CRs-Fixed: 3834305
os_if_cstats_log_nan_disc_enable_req_evt is defined but not
called when there is a NAN discovery enable event, this resulted
in missing of NAN discovery enable stats in the chipset stats
Fix this by calling os_if_cstats_log_nan_disc_enable_req_evt
when there is a NAN discovery enable event
Change-Id: Ic9610e01fb0449c5233d6e651c42d395cb1f21c5
CRs-Fixed: 3804972
Support EAPOL send/receive over netlink, and meanwhile
add new function to update the source address of EAPOL
for the legacy wlan client in the mlo sap case.
Change-Id: I138f6f8367501771149929f90b8ff31eeafc8b11
CRs-Fixed: 3693871
Do not create the monitor interface if local packet capture
unsupported conditions exists. like:
a. ML connection exists;
b. 2+ port concurrency exists.
CRs-Fixed: 3658842
Change-Id: I0dc17238d63a1d58264a00e8ad2b93bd74ecdbcc
Currently host driver does not wait for uptree operations in dsc
before it starts vdev transitios, which may lead to memory domain
mismatch.
For example, if modules are closed because of idle shutdown, memory
domain in host driver will be init domain and at that time if some
psoc ops starts, memory allocated as part of this ops will be
allocated in init domain and if at the same time if vdev up starts
which will trigger the vdev trans and will start the modules and change
the memory domain to active domain, now when the memory allocated as
part of psoc operation is released on psoc ops completion will be
released in the active domain which leads the memory domain mismatch.
In current issue, host driver closes the modules because of idle
shutdown and changes the memory domain to init domain, now host driver
receives get features vendor command and starts psoc operation which
allocates memory in init domain, while this psoc operation is still in
progress, host driver receives interface create which starts vdev
operation and changes the memory domain to active domain as part of
start modules. Now, when ongoing psoc operation completes, it
releases the momory in active domain, which results in memory
domain mismatch.
To fix this issue, before starting vdev transition, add wait for uptree
operations in dsc tree, which includes wait for psoc operations and
driver operations as this issue is possible with the driver operations
as well.
Change-Id: I2cf395ebb94cafca728926a6617fdc34a073755a
CRs-Fixed: 3621530
Currently, host driver passes null as argument instead of valid
wdev to "wlan_cfg80211_vendor_event_alloc" function and
WiFi-HAL checks for the valid wdev while receiving NAN responses
and NAN response is dropped due to invalid wdev.
So, to fix this, extract the valid wdev and pass it as argument
to "wlan_cfg80211_vendor_event_alloc" function.
Change-Id: I2c50c1d6d8ebc100b0e7c382420ed031156dcebd
CRs-Fixed: 3642176
Offload TX data packets such as ARP response, EAPOL during roaming are
sent by firmware through HTT msg if packet capture mode is enabled.
Whenever any such packet is received via HTT msg, host inspects the
ether type of the packet and matches with the TX filter set by user
via vendor command. If the ether type matches with the TX filter set
by user, then host forwards that packet to packet capture mode interface
otherwise, drops it.
To inspect the ether type of any packet, host uses generic API which
expects packet to be in SKB format. Currently, whenever any offload
TX data packet is received in HTT msg, host wrongly passes the buffer
received in HTT msg instead of SKB to APIs expecting SKB buffer.
This leads to undefined behavior.
So, to fix above issue, whenever any offload TX data packet received,
first allocate the SKB, copy the payload buf of HTT msg which is TX
packet to SKB data and then pass that SKB to the generic APIs to get
the ether type.
Additionally, this change fixes the minor logging error.
Change-Id: If09d49d8a1dcc04ca81454fc262bb5789a0f56be
CRs-Fixed: 3613594
If LL_LT_SAP is already present and if STA tries to
come up on same mac, then it may result in data loss
on LL_LT_SAP as STA will need ROC on the connection
channel for some time, to avoid these data loss during
STA connection, add logic to switch the bearer for LL_LT_SAP
data to non-wlan and once connection completes, switch back
the bearer to wlan.
Change-Id: I7ace6c6f4f41548ec112882dc81be6c6b5a4eae0
CRs-Fixed: 3627656
Based on new requirement, add changes to send the vendor event
send audio transport switch request and also add changes to process
the response received as a vendor command.
Change-Id: I4b8804c9021ea8807ca785f81f3df431690029fb
CRs-Fixed: 3626954
Based on the new requirement, host driver needs to send the audio
transport switch request from host driver to user space, to
support this requirement, register os_if callback function with
bearer switch state machine
Change-Id: Ib94ff4d9876e79d984401262253602c975b0fb1e
CRs-Fixed: 3626952
Currently, when disabling the power save mode, driver sends
the TWT teardown command 10 times to the firmware. These 10
commands being received by the firmware within 200 ms.
However, this time doesn't enough time for the scanning
process to complete.
To address this issue, added a delay of 500ms between each
TWT teardown command sent by the driver to allow for the
successful completion of scanning before further commands
are issued.
CRs-Fixed: 3626036
Change-Id: I214e5dc94e94eb48f41436f9e5f1a6b9714f4bc1
If power save disable command commes, implicitly driver
teardown the existing TWT session by sending out
TWT_DEL_DIALOG command to fw. In firmware if
command fails due to firmware scan_in_progress or
chan_switch_in_progress then driver should retries
TWT_DEL_DIALOG implicitly.
In driver, add retries logic to the twt del dialog command in
case of power save disable.
CRs-Fixed: 3584286
Change-Id: I71299ea8239f33d194d2b55499f2d8e5946c42ba
Currently mutex is being called while taking rcu read lock
which is resulting in "sleeping function called from invalid context"
warning as mutex is not allowed while holding rcu_read_lock.
To fix the issue replace rcu lock with rtnl lock.
CRs-Fixed: 3600635
Change-Id: I41aa27094ef58363eeda4bdb15f23d312e7bac37
When wpa_supplicant adds tdls peer during sta disconnecting,
scheduler thread clear MLO flag of vdev0, in wlan_key_get_link_vdev,
wlan_vdev_mlme_is_mlo_vdev(vdev0) return true, in
wlan_key_put_link_vdev, wlan_vdev_mlme_is_mlo_vdev(vdev0) return false,
WLAN_OSIF_TDLS_ID vdev ref count is released in both
wlan_key_get_link_vdev and wlan_key_put_link_vdev, while
WLAN_MLO_MGR_ID vdev ref count isn't released, assert will happen.
To fix it, add check in os_if, if vdev not up, reject tdls add peer to
avoid such race condition issue.
Change-Id: I851b269ee4a5649fe76cfa1fc6762b6ca41b0884
CRs-Fixed: 3598336
Add enum for max test command and replace the check for
WFDS_GET_STATS cmd with WFDS_CMD_MAX.
Also, put end of struct at the end of the structure in
struct wfds_ut_cmd_req_msg_v01_ei.
Change-Id: Icc1075fb10d92fba17ffbd71a97904c6c8d866d0
CRs-Fixed: 3591854
Currently PM_LL_LT_SAP_MODE is not handled in policy manager.
With this change add support for PM_LL_LT_SAP_MODE in the policy
manager.
Change-Id: Icfbb3a95dc65225fc7dad5df7dca9306a5029402
CRs-Fixed: 3536491
Currently, there is no check to stop new CP
stats request if any other CP request is in progress
which may cause issue due to updation of callback
function infra_cp_stats_resp_cb as per new request
before getting stats from FW for previous request.
Change-Id: Id31fd9e6bba7c1130af7bbc29b18baaa07b5bf04
CRs-Fixed: 3580194
To support group NDP security, WiFi-HAL and firmware introduces
two new parameters (csid_cap and gtk_required) in NDP initiator
request, responder requestor and NDP indication event.
Host driver will retrieve the CSID capabilities and GTK parameter
and parse it to firmware in NDP Initiator and Responder request
TLV. Also, driver extract these parameters from NDP indication TLV
and will passes to Wifi-HAL in vendor event.
Change-Id: I4487559491754edafaccafa466512d6380b826b3
CRs-Fixed: 3583149
Do not send TWT disable command to firmware if LL_LT_SAP
and other infra connection are present in MCC mode.
Change-Id: I38727bb2bda4afcc00d68560bd46cc26048ef5be
CRs-Fixed: 3550206
Add support for new twt status
HOST_ADD_TWT_STATUS_LINK_SWITCH_IN_PROGRESS and
HOST_ADD_TWT_STATUS_UNSUPPORTED_MODE_MLMR in the twt
ack event
Change-Id: Ica3a66983ea25f2c797827baa16daa4fcddcd099
CRs-Fixed: 3570318
When wpa_supplicant sent tdls mgmt frame during sta disconnecting for NUD
failure, scheduler thread clear MLO flag of vdev0, in
wlan_key_get_link_vdev, wlan_vdev_mlme_is_mlo_vdev(vdev0) return true,
in wlan_key_put_link_vdev, wlan_vdev_mlme_is_mlo_vdev(vdev0) return false,
WLAN_OSIF_TDLS_ID vdev ref count is released in both
wlan_key_get_link_vdev and wlan_key_put_link_vdev, while WLAN_MLO_MGR_ID
vdev ref count isn't released, assert will happen.
To fix it, add check in os_if, if vdev not up, reject tdls frame to
avoid such race condition issue.
Change-Id: I90e60c95888cc63e57d0bd0b75c570d8d677cbaa
CRs-Fixed: 3572133
Currently ret is not initialized and it can return
uninitialized value in some cases.
Change-Id: Ic70ad295108cc89bea371b78f6f14ca356706d2b
CRs-Fixed: 3491253
Currently, driver post NDP end all command on the scheduler but
never release it. This casues timeout in the scheduler and driver
releases the vdev which is never referenced. This causes crash in
driver.
To resolve this issue, release the NDP end all command when NDP
Host Update event received from the firmware.
Change-Id: Iffe4f79b7c131c48cbf2b085d8bbc6e1fb0b5f0a
CRs-Fixed: 3521989
Firmware sends NDP_HOST_UPDATE event as an immediate response to this
request and starts cleaning peers one by one. Once an NDP session is
ended (indicating NDP_END to peer + internal cleanup), firmware sends
NDP_END_IND to host.
Currently, host driver stops the wait timer and change state from NDP
end to disconnected upon receiving the NDP_HOST_UPDATE. But firmware
might still be in the process of NDP cleanup. As the NDP_END_ALL
context is unblocked, driver may send NAN disable request to firmware.
This may cause inconsistency in firmware state machine and firmware may
drop the ongoing NDP_END request. So, peer doesn't get the NDP_END frame
in such cases.
Unblock the NDP_END_ALL-wait call only upon last NDP_END indication to
avoid such issues. This change moves the major functionality of
NDP_HOST_UPDATE processing to last NDP_END indication. Cleanup/remove
the processing of NDP_HOST_UPDATE as it's not needed anymore.
Change-Id: I19d3e40700c1c0501b9c809820262472bf9bdba4
CRs-Fixed: 3512847
To avoid compile issues where the kernel version doesn't support
11be and WLAN_FEATURE_11BE macro alone can't be used.
Use CFG80211_11BE_BASIC to ensure proper kernel version check for
11be support.
Change-Id: I23a1b6f6e1b46a4ce686d8d1a4152c94922281fc
CRs-Fixed: 3482727
With single netdev multi vdev changes, each adapter now can
have multiple VDEVs. To get the right VDEV reference, callers
have to pass the link info corresponding to that VDEV.
Change hdd_objmgr_get_vdev_by_user() API definition to
fetch lock protected VDEV reference from link info
instead of adapter.
The existing callers moved to deflink in adapter.
Change-Id: I3be810994f8768104c9a93491966a13d3b159e5c
CRs-Fixed: 3448468
In case of MLO connection, firmware sends each vdev's status
information via vdev extended stats event. Add support in driver,
to extract that information.
Change-Id: Ia7a0a92baf008e6549830672b68e58be5a8202df
CRs-Fixed: 3483731
Currently for REASSOC command host starts vdev ops
and tries to use vdev. In parallel if host receives
interface down and starts vdev trans then proceeds
to stop adapter and destroys the vdev, this leads
to null pointer dereference if vdev is destroyed
first.
This happens because driver doesn't wait for vdev ops
to complete after starting vdev trans.
To address this issue, start vdev trans and wait for
vdev ops to complete before proceeding to execute
further.
Change-Id: I363d05f742f7569dffed70cfa9b6bb9a0a766d9e
CRs-Fixed: 3445858
Add macro check about CFG80211_LINK_STA_PARAMS_PRESENT for
function wlan_cfg80211_tdls_extract_eht_params.
Change-Id: I1982d97f06e333936ea45828f5082d322664a2c0
CRs-Fixed: 3479244
The vdev ref count does not release properly for
WLAN_OSIF_TDLS_ID, it causes driver crash when
rmmod wifi module.
To address this issue, release the vdev ref count
properly for TDLS module.
Change-Id: I9c206f212ff5ba5a362c91d32519bc7903cbec3d
CRs-Fixed: 3470275
Currently, host driver checks if there are peers present on the NDI
and clean them up as part of NDI cleanup. Cleanup is done in below steps,
1. Set the state to NAN_DATA_END_STATE
2. Send NDP_END_ALL to firmware to end all existing NDP sessions on the
NDI and to cleanup corresponding peers
3. Move the state to NAN_DATA_DISCONNECTED_STATE finally if NDP_END_ALL
goes fine.
But if no peers are present on NDP, none of the above happens and NDI
state stays and doesn't move to DELETED. So, set the NDI state to
DISCONNECTED if no peers are present.
Change-Id: I0d22c240b3e3eee5f62ba8b369bab500e27487b7
CRs-Fixed: 3463614
In wlan_hdd_get_station_stats, NULL checking for
pdev_stats fails as it doesn't pass pdev stats info
to hdd layer. stats will not pass to userspace, it will
display tx bitrate unknown in command "iw p2p0 link" or
"iw p2p0 station dump".
issue only happen on p2p0 and not on wlan0. as wlan0 can
use cached stats in __wlan_hdd_cfg80211_ll_stats_get.
Fix is pass pdev stats info to hdd layer in
get_station_stats_cb.
regression cause is:
Iaefc5629872431cbc6c24090b1edb6cebdad995a
Change-Id: I33b608988aa288e0f8139524de5e20fcbba4f2be
CRs-Fixed: 3457955
Since for MLD device, it can only choice one link for tdls,
add logic like this:
1\ As initiator, it needs to send discovery request on each
link, before send the frame, it needs to force active the link;
2\ As responder, it sends the discovery response the link id,
before send the frame, it needs to force active the link;
3\ For other tdls management and tdls operation, it needs to
find out which link(vdev) is used as tdls link first.
Change-Id: I64e27219eb6c6b3fef62e541423aa8e5d84b1560
CRs-Fixed: 3439568
Set parameter add_sta_params->eht_capable accordingly whether
the peer STA support it or not.
Change-Id: Ib3664be74ece59804321e187fea889610c0a2a86
CRs-Fixed: 3454661
Currently host driver doesn't fill peer mac address
per ml vdev for station stats request as part of peer
stats request hence incorrect stats sent to userspace.
To address this issue, save peer mac per ml vdev in
request info structure.
Change-Id: Iebb1b810e112743602607e31d779be2ba1d48f90
CRs-Fixed: 3450665
Send QMI misc request message to WFDS server and wait
for response before cleaning up the resources pertaining
to WFDS server on LPASS.
Change-Id: I24bc2295c5a625365a6da95be697c46b08f8b6b7
CRs-Fixed: 3448838
Wrong debug ID is used (WLAN_OSIF_ID) to increment the ref
count of the pdev object when sending tx params update event.
This is causing crash as ref count is decremented using
different id, WLAN_DP_ID.
To fix this, use WLAN_DP_ID to get the pdev object and increment
the ref count of right debug id.
Change-Id: If20fc1a4e4c2a37287f7703aa70bb8dc556f0125
CRs-Fixed: 3453570