Account for the Tx buffers allocated for IPA during
init. Add this memory to the overall Tx nbuf memory
allocations. Ensure that the nbuf size is taken from
end pointer to head pointer of nbuf.
Change-Id: Ie3a46c7e7674f3f2e1bf9e0791a7eb53d4bb0b21
CRs-Fixed: 2831015
During TCP Tx traffic account for the Tx nbuf memory mapped
and unmapped in the driver.
Change-Id: I40df92f124eec94f2fa3ddc8bcd910615f4539bf
CRs-Fixed: 2831015
WLAN chip components are little-endian based. When such a chip is attached
to a big-endian Host platform, there will be a mismatch in the order of
bytes for the data that is transferred between the Host and target.
Spectral HW module transfers the Spectral report directly to the Host DDR.
This transfer doesn't go through any byte-order conversion at the HW side.
So, to avoid invalid reads at the Host side on a big-endian platform,
convert the Spectral report to the Host byte-order before using it.
Change-Id: I742537f3a95ffca2e12b83535e83e2870ad06b10
CRs-Fixed: 2838371
Add support for WMI_TWT_NUDGE_DIALOG_CMDID and
WMI_TWT_NUDGE_DIALOG_COMPLETE_EVENTID.
Change-Id: I9d4bf1061f6f08479967619ce50d2756c062f55f
CRs-Fixed: 2825138
Support new firmware thermal level WMI_THERMAL_SHUTDOWN_TGT
to indicate target over heat and need to be shutdown completely.
Change-Id: Icdb8aab9fe7b8914681cc46a4ccb5579781c587d
CRs-Fixed: 2835410
When driver doing ipa rx buffer smmu mapping,
qdf_spin_lock_bh is used to protect rx descriptor pool,
but might sleep function is called by API ipa_is_ready.
This causes kernel panic about sleeping function called
from invalid context as following call trace:
Call trace:
___might_sleep+0x204/0x208
__might_sleep+0x50/0x88
__mutex_lock_common+0x5c/0x1078
mutex_lock_nested+0x40/0x50
ipa3_is_ready+0x2c/0x60
ipa_is_ready+0x24/0x38
dp_ipa_handle_rx_buf_pool_smmu_mapping+0x2dc/0x6d0 [wlan]
Move the ipa is ready check function call outside of spin lock.
Change-Id: I5d3a79dff8a045791834733514a40f7c1ccb0d8b
CRs-Fixed: 2839292
Move the WIN only DFS features from common code to WIN specific
Component dev. The following features are moved.
1. WIN Hardware mode switch.
2. StaDFS
3. dfs_set_nol
4. nol_history
CRs-Fixed: 2834311
Change-Id: I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce
When the number of HTT packets in the endpoint TxQueue is more
than MaxTxQueueDepth, we hit the overflow condition. If the
overflow condition is hit, in htc_try_send(), when EpSendFull()
returns HTC_SEND_FULL_KEEP, we try to send all the excess packets.
As part of this logic, we are calling restore_tx_packet(); the
intention of calling resotre_tx_packet() is to just perform
skb_pull_head(), but restore_tx_packet() will also unmap the
HTT packet. Later, when we try to send the excess packets, these
would be already unmapped and when the HW/FW try to access this
unmapped location, it would lead to SMMU fault.
Change-Id: Ie60a302d6a2736f7aa12944b7016d2bdb9ffb10d
CRs-Fixed: 2836444
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.
To address this, send stats request over QMI only after the ack is
received for the target suspend command.
Change-Id: Id7a79d52740916f66476bf911e571c0ff466c7d3
CRs-Fixed: 2838737
Introduce wmi_validate_handle() with the caller function name
embedded in it to validate the WMI handle and log incase
of error. Calling functions can avoid logging in case
wmi_validate_handle() returns -EINVAL. This reduces logging and
thereby memory foot print.
Change-Id: Ie0a6a84ffad6e5cf2da8f547c7209dc77cdf5729
CRs-Fixed: 2838960
Currently, Rx diag event work is not being flushed during idle shutdown.
This may result in use after free access if the scheduled diag event work
gets the chance to execute after driver modules are closed.
To address this, flush diag events work during idle shutdown.
Change-Id: I348e80d2c86a5e070f0fb67d66b758529fede76c
CRs-Fixed: 2838020
Current Linux version of qdf_snprintf() doesn't pass the additional
arguments(...) to snprintf(). As a result, the behavior is undefined.
Fix it by passing the additional arguments as a variable-argument-list to
vsnprintf().
Change-Id: Iea8ee0737907eaaea2df99631316d7d45a8e562f
CRs-Fixed: 2838962
Currently QMI message length is not being validated before
handling QMI event. This is resulting in illegal memory access
when QMI message length is invalid.
To address this, discard QMI events with invalid length.
Change-Id: Ia9f04bcb4fa3b365cbbf2be8885a8d30f78f8f10
CRs-Fixed: 2839277
In dual station case, wlan0 is connected to AP, wlan1
connects to the same ap and will get failed because two
interfaces can not connect to same band (same ap).
At present wlan1 will do unlink bss of ap after connect fail.
This may corrupt the bss tree in kernel because the bss is
still pointed by wlan0’s wdev -> current_bss.
Fix by avoid the unlink bss if the bss is still connected
in any interfaces.
Change-Id: I27c76eca2d4f130addabbdc2600f6959d24c8511
CRs-Fixed: 2837496
FW memory allocation depends upon important resource config sent from
host during wmi init. Hence, log these important resource config parameters
sent during wmi init.
Change-Id: I5e187b905716a5a2c1767bc4b081f54034994653
CRs-Fixed: 2839119
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode
Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)
CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
Add support to send preferred_xt_streams and preferred_rx_streams
in multivdev restart.
CRs-Fixed: 2833470
Change-Id: I2c06a8bd9a64b15126e216eeb65699e104cbca64
The macro QCA_SUPPORT_DFS_CHAN_POSTNOL is specific to WIN code.
Therefore remove the macro QCA_SUPPORT_DFS_CHAN_POSTNOL and
associated code from Common code and add it to component dev.
CRs-Fixed: 2829537
Change-Id: Ib49424c44817d6af5e485c87d6f7b08afee4fa11
Remove the following functions from Common dev to component-dev:
1) dfs_bangradar
2) dfs_start_host_based_bangradar
3) dfs_fill_emulate_bang_radar_test
4) dfs_check_bangradar_sanity
5) dfs_start_host_based_bangradar
CRs-Fixed: 2829438
Change-Id: I5d3564bcb89e60629ee7fddc9827e03e9d9da6a2
cld80211_oem_rsp_alloc_skb api is used to alloc skb for reply msg.
A static buffer pointer is returned from this reentrant func
which can be called by kworker and scheduler thread at same
time resulting single buffer access by both threads. After
kworker thread freeing this skb, scheduler is further updating
data in this skb resulting in page fault error. Use local
skb pointer to avoid such race conditions
CRs-Fixed: 2822390
Change-Id: I5f807d06c4890b027c86de9187f17fb83b19db5e
With connection manager convergence the STA vdev related ops are
being handled under converged code.
Remove unused functions from mlme interface.
Change-Id: Ibd90ef81b235bca1097891eb4964e2b5e741292c
CRs-Fixed: 2837096
As part of monitor mode init, add check for null monitor vdev before
accessing vdev_id in case prevous cleanup of monitor vdev still ongoing.
Change-Id: I0165684c8aa2abea73fa8c0d1692dac789fb20f6
CRs-Fixed: 2835758
The bcast twt functionality may need to be enabled separately
for requestor and responder roles. Enable such configuration
by looking up WMI service bit support from target:
wmi_service_twt_bcast_req_support
wmi_service_twt_bcast_resp_support
Change-Id: Ibc91173c23cf69f0d248af27d61c77bee3e8f48a
CRs-Fixed: 2828720
TWT nudge is a combination of suspend and resume in a single request.
Add TWT nudge operation and QCA vendor attributes to support
the TWT nudge request.
Change-Id: Iddc4cb6722e88ad9dd65933091bdaa468718f2cf
CRs-fixed: 2822267
Currently, the function "reg_is_regdb_offloaded" always return false
for WIN as "reg_is_regdb_offloaded" is a "static inline" one-line
function defined in a header file "reg_utils.h". Make it common for
both WIN and MCC by moving it to the "reg_services_common.c" file.
Also, by default, initialize the variable
enable_5dot9_ghz_chan_in_master_mode as true for WIN and false for MCC,
in the function wlan_regulatory_psoc_obj_created_notification as
MCC does not support it by default and WIN does it.
Change-Id: Ica023ec0788e1dd6973fef59e33e6e64c336ba26
CRs-Fixed: 2829674
Introduce proper logging APIs for diag module and also rate limit error
logs when skb allocation fails in low memory conditions to avoid excessive
logging side effects
Change-Id: Ia41ff7cfd526180825df61a43f1f59163947f257
CRs-Fixed: 2836681
Currently, reg_set_2g_channel_params_for_freq only considers
enabled channels when filling in the channel params. This
could cause issue when starting vdev in a passive channel.
Update the logic to consider CHANNEL_STATE_DFS as well.
Change-Id: I7a49aaa9a51e09729d7b912a6e3fd62fa240d714
CRs-fixed: 2835565
In other than the FTM modes the memory allocated for the ftm
object is not used. Optimize the memory allocations by checking
for the device mode before allocating.
Change-Id: I5e8e454ae43b480e9d55cadb89c0757a1267b029
CRs-Fixed: 2809963
The current timer modification API does not return the status
of the underlying OS specific API.
The return status of the underlying API could be useful
to detect if the timer was modified even before the timer
has expired before the last update to the timer.
Update the API to return the status of the underlying API.
CRs-Fixed: 2835319
Change-Id: Ieade0ff82386f959d7f29264a25b75a96a72e644
During interrupt mask initialization, bitmap of tx ring
mask and reo dest ring mask are filled in host mode based
on the number of rings.
When NSS offload mode and dynamic HW mode are enabled,
interrupt reset is done based on modified ring count.
This is causing invalid hal_srng access for interrupt
context which are not reset.
So, resetting tx ring mask and reo ring mask based on host
mode ring count. Also reset when mask value is non-zero.
Change-Id: I6e3ef2df7a1f71aa17ebf8499467b39bc84f88bf
Add enum to indicate the connect or disconnect request initiated
due to a config change.
Change-Id: I68e058f37f00b548076874c97903dc78d4f4cb25
CRs-Fixed: 2826533
Update the maximum bandwidth value of the channels in the current
channel list based on the chip's supported modes and the
availability of the adjacent channels.
Also remember the maximum phymode and bandwidth supported by
the device in the regulatory pdev private object.
For determining if a channel is DFS or not, use the flag
REGULATORY_CHAN_RADAR which comes from regulatory rules, instead of
using CHANNEL_STATE_DFS.
Change-Id: I844857ef63af3f7628b37eedfe5098bb88e3e0dc
Add the following new API for the connection manager
to get the active request type, active connect request,
active disconnect request
wlan_cm_get_active_req_type
wlan_cm_get_active_connect_req
wlan_cm_get_active_disconnect_req
CRs-Fixed: 2821225
Change-Id: I8b2a2edfafe09c5642c376f45d4b2ae349145dbf
ALD files are now part of SON project hence make file changes
to include dependent header from SON project.
Change-Id: I72884f35a0d9ac9059ccad274eff492e09e7acaf
CRs-Fixed: 2816301
The scheduler watchdog timeout is currently fixed at 10secs.
There are few customer use cases, where the CPU is busy for
sometime and the scheduler message processing is taking longer than
the coinfigured watchdog timeout value.
Add a new API to be able to configure this value different than the
default as per the requirement.
CRs-Fixed: 2834194
Change-Id: I976f1f0ad17f09cf3960f99ad80226d775b8b2f2
Currently the connection manager queries the
blacklist manager about the action to be taken
and if all the candidates of a certain SSID are
blacklisted then the connection would be rejected.
There are various types of blacklisting, some
can be overridden and some have to be strictly
followed.
Fix is to overide the blacklist candidate and
connect to it if no other candidates are suitable
for connection.
Change-Id: I84358df5f94d4c82989bf81412355f312320dc0b
Crs-Fixed: 2825519
Add drop statistics for duplicate EAPOL frames received
in the REO exception ring as OOR frames. This will help
understand if EAPOL frames are getting dropped which could
cause connection issues.
Change-Id: Ib9d5a3c04ce6638c65166f02261af5c526cc47eb
CRs-Fixed: 2814633
RTPM wow resume gets triggered from ongoing WMI cmds related to SAP
getting started on the 5 GHz DFS channel. Even though PCIe link resume
is successful, there is a link up vote from UMAC and scn link suspended
state is not getting clear. Thus, clear the scn->link_suspended state
at the end of hif_pci_bus_resume_noirq() because before HIF PCIe bus resume
noirq phase is complete, PCIe link is already resumed.
Change-Id: If05593c95d2d63d271fed4abcf84b43e96cc070e
CRs-Fixed: 2833831