Problem scenario:
1) Host uses self RX and peer VHT TX NSS intersection to update peer
VHT RX MCS map and self NSS in pe_session.
2) Host updates peer VHT TX MCS map and self TX NSS from PE session
to FW. FW uses these values to select TX rates for data packets.
3) If an AP supports 1 TX NSS and 2 RX NSS and host supports 2 TX and
RX NSS, as a result of intersection host sets VHT TX MCS map to
0xfffe i.e. 1x1 and associates with AP in 1x1. Which leads to low
TX throughput.
Fix:
Use intersection of peer VHT RX MCS map and self VHT TX NSS to update
NSS to firmware.
Change-Id: I4104e3502c45923625143cd32da8cb4529df05a2
CRs-Fixed: 2847115
Currently for converting timestamp to string qdf_snprintf
function is used which may not print timestamp correctly.
Use qdf_snprint instead of qdf_snprintf to print correct
timestamp provided by fw.
Change-Id: I803f678dc38afc03131e589a820d129dc38380ce
CRs-Fixed: 2835199
Initially, Host updates the AKM only after the EAPOL
handshake. Due to this, Enterprise auth is not detected
for initial connection.
So, add new API which gets the AKM from vdev and convert
it to WMI enum and send it in peer assoc command to firmware
during initial connection. In Firmware, this will help to
detect Enterprise auth as part of connection and prioritize
the WLAN connection over BT traffic accordingly.
Change-Id: I503601ca29f3aadd1ee359a535b4e60133f66476
CRs-Fixed: 2844318
With Change-Id: I7f38b3dc6975fcc208ad85e913564dfef5cc1cb7,
Tx register write is permitted after hif bus resume during runtime pm
resume, don't wait WMI_WOW_WAKEUP_HOST_EVENTID.
In F/W, there is an race condition when exit from WOW, both
WAL_TX_TID_TQM and WAL_TX_TID_TRANSITION_TO_TQM_ONGOING are not set yet,
data frame is received from host, assert will hapen.
To fix it, host tx register write shouldn't be permitted to update hp
until receive the WMI_WOW_WAKEUP_HOST_EVENTID.
Change-Id: Ic397652a9a0c4bc81667aed11805b2ce8070ee8d
CRs-Fixed: 2858115
Unsafe channel list event does not change the current channel list.
Hence there is no reason to set the channel list again in wiphy and
inform the kernel. Thus, do not send regulatory event for unsafe
channel list.
Change-Id: I68d60fb412b4664430a9cdefa354fac4070bba7a
CRs-Fixed: 2788194
The hif_om_runtime_get logs the requester for resume
when the device is in runtime suspend/suspending state.
Due to such kind of logging from a softirq context, its
execution time will be longer and can block the execution
of other time critical softirqs.
Fix this by marking the call to hif_om_runtime_get as
a call from critical context and avoid the logging for
this call.
Change-Id: I2d7d0b3645f351af11a016bd45c5930f0df5401a
CRs-Fixed: 2850952
Enable periodic time sync between host and fw by setting
gRemoveTimeStampSyncCmd to 0.
Change-Id: I52168ad6d065262c433c801716eec0d7782bf6e8
CRs-Fixed: 2845017
Currently host checks mac number to indicate
MCC or DBS which may not be correct. Host
may print DBS in case of MCC.
Check DBS support and print concurrency
based on hw mode if hw mode is dbs capable
then print DBS else MCC.
Change-Id: I1578e6a7a6b73b5b6c409653b4dc276954f51c3d
CRs-Fixed: 2845634
Add validation for STA CSA channel change notify event:
1. acquire the wdev->mtx lock before invoke kernel API -
cfg80211_ch_switch_notify. Kernel will access wdev->current_bss
in the API, it maybe changed in other thread.
2. if the bssid is not connected in vdev, don't invoke kernel API -
cfg80211_ch_switch_notify since wdev->current_bss maybe unlinked from
kernel bss list. cfg80211_ch_switch_notify make assumption
current_bss existing on the bss list.
Change-Id: I0dd415a5576d29e3a7729768c8482205677ca3e7
CRs-Fixed: 2855494
The below described scenario can lead to a deadlock
between wlan_hdd_del_virtual_intf and the work handler
to update netdev features.
- netdev features update work is scheduled and takes the
vdev ops DSC lock.
- before the work is able to take the rtnl lock, a delete
interface is called from kernel with rtnl lock held
- wlan_hdd_del_virtual_intf waits indefinitely for all the
ops to be completed on this vdev.
- Now netdev feature update work is waiting for rtnl lock
with vdev ops DSC held, and wlan_hdd_del_virtual_intf is
waiting for vdev ops DSC with rtnl lock held.
In order to fix the above deadlock scenario, set a delete in
progress flag in wlan_hdd_del_virtual_intf and use rtnl_trylock
in the netdev features update work, only if the delete in
progress flag is not set. Using rtnl_trylock with a few equally
time spaced attempts to acquire rtnl lock will make sure the
features update is done it the work is unable to acquire the
rtnl lock due to any other netdev operation (apart from interface
deletion).
Change-Id: Iad6448d4d9bf7f4cbfcfc4c6fb3afb248afaeeec
CRs-Fixed: 2854713
Currently host driver does not validate the mac address which
it receives from FW and based on this mac address host derives
remaining mac addresses. If mac address from FW is multicast
or broadcast address then it will be treated as invalid mac
address and adapter creation will fail.
To address above issue, accept mac address provided by FW only
if it is a valid mac address else derive all the mac address
based on driver's internal logic.
Change-Id: I4c4b60cac082680df90016ec4ba63f744353771c
CRs-Fixed: 2853417
Stop all the TSPEC flows after roaming to new AP due to
disconnect roam trigger as the previoes TSPEC session is not
valid. Firmware clears the TSPEC session on deauth roaming and
doesn't include the RIC IE in roams followed by deauth trigger.
But host entry for the TSPEC flows exist and doesn't allow new
TSPEC session setup commands.
Clear all the TSPEC flows with older AP to allow new TSPEC
session creation with roamed AP due to disconnect roam trigger.
Change-Id: I9d75acba402e6d8380584fd1ffd310c2a21cd19d
CRs-Fixed: 2816035
In OWE transition mode, the beacon from the transition mode AP
should be dropped after sending unicast probe to avoid kernel
entry for BSS with null ssid. But while parsing the IE, the
frame pointer passed points to the fixed fields.
So pass the ssid IE pointer to the OWE transition mode IE
parsing API.
Change-Id: I668bc2dfc32a5a23b44da50ac81bac98250faa2a
CRs-Fixed: 2814173
When a new connection is about to come up, host checks if current
concurrency combination including the new connection is allowed or
not based on the HW capability.
Firmware manages NAN + NDI by dividing up slots. Connection on NDI
is re-negotiable and therefore a 3rd connection with the same MAC
is possible.
Change-Id: I63e39c5cd4945cd308e475c1e03f676336c4e7c1
CRs-Fixed: 2841457
Currently driver does not validate BW before it invokes the kernel
api cfg80211_get_chandef_type. There is a WARN_ON in kernel
if above api is invoked with invalid BW.
To address above issue add a logic to validate the BW
before driver invokes the kernel api.
Change-Id: Ie237aa46813bfa4206a1057a0418d9562dbbae75
CRs-Fixed: 2846462
Add support to get the TWT self and peer capabilities via the
QCA_WLAN_TWT_GET_CAPABILTIES vendor command.
High 16 bits - self capabilities,
Low 16 bits : peer device’s capabilities
The meaning of each bit is below:
Bit 0: Requester Support
Bit 1: Responder Support
Bit 2: Broadcast TWT Support
Bit 3: Flexible TWT Support
Bit 4: TWT Required
Change-Id: I78b0c5902c89fe3a8eec1697fa513aac3c2b7a36
CRs-Fixed: 2847177
Add support for below TWT commands to be sent as asynchronous
commands from userspace:
1. TWT teardown
2. TWT pause
3. TWT resume
Change-Id: I1989fe153cc8a482a9616a7f6879de3b92ef82fb
CRs-Fixed: 2847143
This is the new OP for vendor sub command
QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT to set twt
suspend/resume parameters.
Change-Id: If4ec03364f41ca4960673fb7a13b91a929cfe567
CRs-Fixed: 2797664
Introduce wma_validate_handle() with the caller function name
embedded in it to validate the WMA handle and log incase
of error. Calling functions can avoid logging in case
wma_validate_handle() returns -EINVAL. This reduces logging and
thereby memory foot print.
Change-Id: If38436a590d8b950509bde40468b9ddc3cf33e8d
CRs-Fixed: 2833040
TWT HDD callbacks are registered dynamically when each TWT
command is received from userspace and unregistered while
sending response. This design was in place considering the
existing TWT commands are synchronous and multiple back to
back TWT commands will not be received. But now the TWT
commands from userspace can be received asynchronously.
So register the TWT callbacks statically during start modules in
wlan_hdd_twt_init().
Change-Id: I7dd9333c330a90fca421a2cc2574b2db76536e96
CRs-Fixed: 2830644
Add support for below TWT setup additional parameters:
Minimum TWT wake interval
Maximum TWT wake interval
Minimum TWT wake duration
Maximum TWT wake duration
Make the TWT setup command handling as asynchronous.
Send QCA_NL80211_VENDOR_SUBCMD_CONFIG_TWT event to
userspace when add dialog complete event is received
from firmware.
Change-Id: Ia56bbecd04e0c02a55dc1a7f43ee533a85f82f1d
CRs-Fixed: 2842895
Currently, ongoing STA connection is not aborted when a
stop_adapter is received on SAP. This results in a peer leak in
the below scenario,
1. Turn on SAP.
2. Initiate STA connection to an SSID which has multiple BSSIDs in
dense environment. Connection gets retried to next BSSID when
it fails to connect to the current BSSID.
3. Turn off SAP while connection is happening. stop_bss command
doesn't get processed and waits in queue as the STA connection
is going on.
4. If stop_bss timer(10 seconds) expires while STA connection is
in progress, SAP vdev is destroyed without cleaning up self
peer. So, there would be a peer leak.
Abort the ongoing sta when SAP goes down, so that stop_bss gets
processed cleanly and self peer is also cleaned up.
Same is applicable for P2P_GO as well.
Change-Id: I888a602cd27a9bbec54fb356ed1488cd9fc2847c
CRs-Fixed: 2852023
Incorrect dialog id can cause add dialog request to target to fail.
Validate the id from user before sending it to the target.
Change-Id: Ib40b2554a1a420e9b799aab80a991fbab484667f
CRs-Fixed: 2827838
Currently in SAP and STA mode the driver advertises TWT
capabilities in the HE capabilities IE based on the below ini
values irrespective of the master ini "enable_twt" to enable
the twt feature:
"he_twt_requestor","he_twt_responder", "he_bcast_twt",
"he_flex_twt_sched".
So even with the ini is disabled, twt capabilities are advertised
Advertise TWT capability only if "enable_twt" ini is true.
Change-Id: Iae3a98ee339f3859391e0deb64ddd354634b0cbf
CRs-Fixed: 2844516
Issue1: Driver RTPM state is ON/NONE, Kernel state is RESUMING.
cdp_runtime_resume is already complete,
hif_pm_runtime_get return -E_INPROGRESS,
dp_tx_hw_enqueue will set the flush event,
but cdp_runtime_resume is already done,
this flush event will be handled only on next pkt tx.
Issue2: Driver RTPM state: Resuming
hif_pm_runtime_get returns -EBUSY,
dp_tx_hw_enqueue is interrupted by any IRQ,
cdp_runtime_resume is completed,
dp_tx_hw_enqueue will set the flush event,
This flush event will be handled only on next pkt tx.
Fix:
Introduce a link_state_up atomic variable in hif to track the link state
change by pld_cb.
Set atomic variable link_state_up=1 in pmo_core_psoc_bus_runtime_resume
just after pld_cb. pld_cb brings the PCIe bus out of suspend state.
Set atomic variable link_state_up=0 in pmo_core_psoc_bus_runtime_suspend
just before pld_cb. pld_cb puts the PCIe bus into suspend state.
Introduce dp_runtime_get and dp_runtime_put.
dp_runtime_get get refcount with increment of an atomic variable.
dp_runtime_put return refcount with decrement of this atomic variable.
If hif_pm_runtime_get returns -EBUSY or -EINPROGRESS,
take the dp runtime refcount using dp_runtime_get,
check if the link state is up, write TX ring HP,
return the dp runtime refcount using dp_runtime_put.
cdp_runtime_suspend should reject the suspend, if dp_runtime_get is non
zero.
cdp_runtime_resume should wait until dp_runtime_get becomes zero or time
out, then flush pending tx for runtime suspend.
Change-Id: I7f38b3dc6975fcc208ad85e913564dfef5cc1cb7
CRs-Fixed: 2849002
In beacon, if STA Channel Width is 1, indicate 40M width is supported,
but Secondary Channel Offset is 0, indicate 40M channel is disabled,
20M width should be set instead of 40M.
Refer 802.11-2016 Table 9-168 HT Operation element fields and
subfields.
Change-Id: Ifb130b3447e4f10723295b93e505df929a16486d
CRs-Fixed: 2854933
TDLS pkts statistics API cost 10% CPU cycle of whole RX
thread. The code logic show it may not be caclulated when
bus vote larger than medium. But checking routine always
return false of which may lead more power cost. Fix bus
vote checking routine to return correct vote status in
stead of always false value.
Change-Id: I003c9943ef3a4bbc83db6caaf893408e40e4962b
CRs-Fixed: 2842119
During the driver unload whenever the recovery is triggered in
the current implementation the request is silently dropped, this
is resulting issues in other areas during the driver which is making
it harder to debug the issue.
Trigger system panic to debug the reason for recovery during the
driver unload.
Change-Id: I67c6c7e8b19dcc3371cd6691c0e3f19be4c33c46
CRs-Fixed: 2850591