Add descriptor timestamp debug info in ol_tx_desc_t and
add APIs to set these values.
Change-Id: I686fccff4268811474630dbea8369fabe82d1517
CRs-Fixed: 2333654
Currently csr_get_current_band() takes a tHalHandle context param.
However csr is internal to the UMAC, and hence it should be using the
"real" context pointer type instead of the opaque handle, so update
the API to expect a struct mac_context pointer..
This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.
Change-Id: I93a3950b9ee26284ddfdf167b900d2f6983625f7
CRs-Fixed: 2347655
Change "qcacld-3.0: Remove wlan_sap_set_pre_cac_status() handle param"
(Change-Id I1c280be8c7c65a28267a9ab38d76fb8aa94e48af) removed an
unused handle param. As a result the handle param is now unused by
wlan_hdd_set_pre_cac_status(), so remove it from there as well.
Change-Id: Ida61a996b9203928af3a5636c219ab61c68d7d19
CRs-Fixed: 2347654
Function wlan_sap_set_pre_cac_status() currently takes as one
parameter a tHalHandle handle. This handle is converted into a MAC
context pointer. That MAC context pointer is then tested for NULL but
is otherwise unused. Since the MAC context, and hence the handle, are
unnecessary, remove them.
This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.
Change-Id: I1c280be8c7c65a28267a9ab38d76fb8aa94e48af
CRs-Fixed: 2347653
Currently csr_init_operating_classes() takes a tHalHandle context
param. However this is a static internal function, and hence it
should be using the "real" context pointer type instead of the opaque
reference, so update the API to expect a struct mac_context pointer.
This is part of an ongoing campaign to remove or replace all instances
of tHalHandle.
Change-Id: Ib299d109489709b78a8d138987acf2379a341797
CRs-Fixed: 2347652
As part of tdls peer assoc request, WMI_SERVICE_PEER_ASSOC_CONF is
checked and a timer of 6 sec is started. But, in case of any failure
for peer assoc in host, This is not stopped and waited for timer to
expire and sends the response with failure status.
Stop the peer assoc confirm timer and send the add sta response with
failure status in case of any failure in host.
Change-Id: If6ba6aa1297afaea1fd86bf406dcbb6e4e461d25
CRs-Fixed: 2345086
hdd_wlan_startup() does psoc create, psoc start, and vdev create phases.
Split the vdev create phase from the two psoc phases.
Change-Id: I9e2be1e257f80c19f55ec25f809858c7e107f640
CRs-Fixed: 2343033
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.
As part of integrating the DSC APIs into HDD, protect driver mode
change.
Change-Id: I28ae8a61f9ffa7e129cf81ade539df8adc72d853
CRs-Fixed: 2347024
The Driver Synchronization Core (DSC) is a set of synchronization
primitives for use by the driver's orchestration layer. It provides APIs
for ensuring safe state transitions (including bring up and tear down)
of major driver objects: a single driver, associated psocs, and their
associated vdevs.
As part of integrating the DSC APIs into HDD, protect driver load
(insmod) and unload (rmmod).
Change-Id: I37fba3ec4c4c59dedace0ce0f0421d2a442ab290
CRs-Fixed: 2346211
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Since all instances of using
CDS_GET_HAL_CB have been converted, remove the macro.
Change-Id: Ib0ed67cf6af779d2805c3f7bb0cf3667c5d844f9
CRs-Fixed: 2346185
Presently the hdd callbacks registration for the events that
need to update data to HDD/SME/LIM from WMA are done after the
event registration is done. During the modules closing, the
callbacks are unregistered first and then the events gets
unregistered.
Move the callback registration before htc_start happens during
modules starting and similarly during modules stop, move the
deregistration of the callbacks after htc_stop.
Change-Id: Id779025188a65af6f08bfbcb15c35cd2be17b53c
CRs-Fixed: 2220895
Replace QDF_BUG(0) with call cds_trigger_recovery() in
wma_remove_peer(), as it is a possible scenario for NDI
since the NDI vdev is managed by FW.
Change-Id: Ief8a37c732a1feebe3a78f2f03da791712398d43
CRs-Fixed: 2346252
Sched scan start and stop requests are coming in FTM mode
and hence do not access dev->name and reject the request
if driver is in FTM mode.
Change-Id: Ia6a3b4dc2f7c491ecc3d2456238c6583d863c10d
CRs-Fixed: 2345908
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_module to use this API.
Change-Id: I906a57557d38b139728c7f2332e9580abf947d47
CRs-Fixed: 2346184
When supplicant tries to reassoc AP, it will set PSK
before issue connection. In driver, it invokes function
__wlan_hdd_cfg80211_keymgmt_set_key and then
__wlan_hdd_cfg80211_connect.
__wlan_hdd_cfg80211_keymgmt_set_key puts
eWNI_SME_ROAM_SCAN_OFFLOAD_REQ to PE queue, then puts
WMA_ROAM_SCAN_OFFLOAD_REQ to WMA queue.
__wlan_hdd_cfg80211_connect puts SIR_HAL_ROAM_INVOKE to
WMA queue directly.
If the command SIR_HAL_ROAM_INVOKE is issued to fw before
WMA_ROAM_SCAN_OFFLOAD_REQ, then roaming scan is canceled
because scan mode is set.
To avoid this race, send SIR_HAL_ROAM_INVOKE to PE queue,
and then to WMA queue as well.
Change-Id: I08624efc466085e49fa4201deb221276ec5c260f
Rs-Fixed: 2344710
Function crda_regulatory_entry_default() no longer exists, but the
prototype is still present, so remove the obsolete prototype.
Change-Id: I1713ae66489da0deee95d165b704bce31dcc111a
CRs-Fixed: 2345153
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_QPOWER_* ioctl handling into separate
functions.
Change-Id: Ied945040f1c055e261b611f7265e237c76d5f518
CRs-Fixed: 2345117
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_fsm to use this API.
Change-Id: Id4f81e12d2544e1de5d35b0360b6a7dd0e3b3c0b
CRs-Fixed: 2346183
Change "qcacld-3.0: Introduce sap_get_mac_context()" introduced a new
API for retrieving the MAC context. Update sap_api_link_cntl to use
this API.
Change-Id: Icb5cfb0db4acaf7ee58e9527feded83c88bcb8d3
CRs-Fixed: 2346182
Currently the macro CDS_GET_HAL_CB() is used throughout the SAP to
retrieve an opaque handle for the MAC context. This name is an
anachronism given that the HAL layer was moved to firmware many
generations ago. In addition, since the SAP module is internal to the
UMAC, it should normally not be dealing with the opaque handle but
should instead be dealing directly with the MAC context. Finally, per
the coding style, "inline functions are preferable to macros
resembling functions."
To address these issues introduce sap_get_mac_context(), a new inline
function, to replace the current usage of CDS_GET_HAL_CB().
Subsequent changes will actually perform the replacement.
Change-Id: I53160f7f5a315516f5348baea8cc7945483431bd
CRs-Fixed: 2346181
Currently, the target-not-ready flag is only ever cleared in the event
of a firmware down notification from the platform driver. However, we
know that the target is not ready after a certain point in the hif
disable path. Additionally, the hif enable path does not clear this flag
during error handling. Address these issues.
Change-Id: I02555940dfba35874768aa453a24121a101354e5
CRs-Fixed: 2339361
As time goes by, more and more logic gets added to the firmware down
indication handler. Generally, there isn't a good reason why this logic
can't or shouldn't be handled with the rest of the subsystem restart
(SSR) cleanup code during the psoc shutdown phase. Additionally, the
firmware down indication can come in hardware interrupt context on some
platforms. This is incompatible with the current mutex-grabbing design.
On order to unify the SSR cleanup logic and support platforms which send
the firmware down indication in hardware interrupt context, move
processing currently done during firmware down handling to psoc shutdown
instead.
Change-Id: Ie1dea835eca5bad1ac3647a0da544d2c51c24194
CRs-Fixed: 2345287
The platform driver uevent handling in WLAN handles both the firmware-
down and "recovery" events. However, the recovery event on snoc
platforms is actually the firmware-crashed event. Recovery _is_ a valid
uevent for pcie platforms, but I20db3698602ea273038a3f024b4e5f61639f6d74
is adding support for the firmware down event.
Additionally, there is no good reason to handle both events, and the
various handling logics are spread across both events with little rhyme
or reason. Remove handling of the "recovery" platform uevent, and move all
associated logic to the firmware-down uevent handling.
Change-Id: I36b6f607438c930dff1936f372af80be311dfe49
CRs-Fixed: 2339357
It doesn't update wma_handle->num_dbs_hw_modes after event
WMI_SERVICE_READY_EXT_EVENTID comes and re-allocate hw_mode_list,
which will cause potentially OOB read hw_mode_list.
Change-Id: I8e4aa13120bfe185fba3e0000cf289406b6bcfce
CRs-Fixed: 2336889
Change "qcacld-3.0: Rename struct sAniSirGlobal to mac_context"
(Change-Id Ibaaeb5296e42a24c66d4adf4f720d32a9ae41888) introduced a new
name for the global MAC context. In addition, the Linux coding style
document tells us "In general, a pointer, or a struct that has
elements that can reasonably be directly accessed should never be a
typedef."
To align with the new name, as well as to align with the guidance from
the Linux coding style, replace all instances of typedef tAniSirGlobal
with the underlying struct mac_context.
Change-Id: Ibb6c1f69fecbe00a17f4cc98a28706d859fa2928
CRs-Fixed: 2346156
If driver gets all 0s as MAC address from mac.bin, it considers
this as valid address and proceed to derive remaining addresses.
this zero MAC is assigned to any of the interface resulting in
undefined behaviour.
To resolve this issue, validate all the MAC addresses provided by
mac.bin and reject all the addresses if any of the MAC is invalid.
Change-Id: Ia1db8249dd4ca58612b6f9eae5903bc809fed493
CRs-Fixed: 2333912
Currently, the scan is rejected if connection is in progress. And
it uses last_scan_reject_timestamp and reset scan_reject_cnt to
avoid scan stuck issue. last_scan_reject_timestamp and
scan_reject_cnt reset when the next scan issues successfully.
If:
1\ Scan happens and connection is in progress. Initialized
last_scan_reject_timestamp and reset scan_reject_cnt;
2\ Maybe no scan happens for a long time;
3\ scan happens but unfortunately connection is in progress again.
Then false alarm may happen because the time has already expired and
scan_reject_cnt >= 15.
Reset scan reject params if connection is success or it receives
final failure from CSR after trying with all APs.
Change-Id: Icd72d1d2c0adee8bb5b5b9c6537e1c48e37a7121
CRs-Fixed: 2333283
Move power stats from the debugs to sysfs. Also previously
power stats was maintained per vdev but the data received
from the firmware is per pdev. Hence move the power stats
implementation from vdev to pdev.
Change-Id: I10df003fe8f79d35d0758b56d971f4973d27750b
CRs-Fixed: 2345097
The primary data structure used within the protocol stack is currently
named sAniSirGlobal. This naming is problematic for two reasons.
First, the "Ani" and "Sir" are archaic references that should be
replaced throughout the driver. Second, camelCase is frowned upon by
the Linux coding style. In order to address these issues, rename
sAniSirGlobal to mac_context.
Change-Id: Ibaaeb5296e42a24c66d4adf4f720d32a9ae41888
CRs-Fixed: 2345128
QCA_CONFIG_SMP defined to support some thread scheduling features on
SMP target, while some variants defined only for SMP purpose are
referred out of this MACRO, like is_ol_rx_thread_suspended,
ol_rx_event_flag and ol_suspend_rx_event.
Defines separate functions for SMP/UP target to avoid it.
Change-Id: I01884644b7b77e55514cf00426609643386480e8
CRs-Fixed: 2344683
Currently pointer of the vdev object is sent to the callback
hdd_wmm_is_acm_allowed to get the adapter. But this can't
be used to get the adapter. Instead pass the vdev id to get the
adapter.
Change-Id: I3cb2f58d09a263c77a3696a36e863cc4137c7821
CRs-Fixed: 2341804
Enable the scatter-gather feature for wlan interface, if the wlan
interface is binding to the bridge, which might enable SG & TSO feature
for the bridge and improve the TCP TX throughput much better.
Change-Id: I26101756266878f9f41c5dc2d0b5dad189b44ee1
CRs-Fixed: 2246512
__wlan_hdd_cfg80211_change_iface will clear "concurrency_mode"
at the beginning, but in certain case it would be failed in middle of
create new mode adapter, then the "concurrency_mode" is not restored
to original one.
When supplicant trys again to call __wlan_hdd_cfg80211_change_iface,
the no_of_open_sessions will be "255".
That causes the "no_of_open_sessions" messed up.
Fix by restore "concurrency_mode" in error case.
Change-Id: Iac702dfb8204621e93456e2a0c0dbba5adeed838
CRs-Fixed: 2343478
In LFR2 roaming disassociation with old AP happens
immediately after preauth success. But policy_mgr
decrement this entry in association completion handler.
This results in policy_mgr assuming an extra connection
while checking hw mode. policy_mgr session for the
disassociated AP should be removed in disassoc success
response handler.
CRs-Fixed: 2316508
Change-Id: I41db1f5a365d3a510e27d10adcec2a7d765616d5
This fixes below build error.
format '%lu' expects argument of type 'long unsigned int',
but argument 6 has type 'unsigned int' [-Werror=format=]
Change-Id: I54b2e171ab5c7799af3e23a5d1fd8d4cb3034983
CRs-Fixed: 2344741
When override sap channel, call wlan_reg_set_channel_params
to update ch_params.
Change-Id: I4086ec8fea0d68547a1080b0ef455a0e9f64c0b7
CRs-Fixed: 2333666
Add the following HT Caps related INI/CFG items to MLME component.
gShortPreamble, CFG_HT_AMPDU_PARAMS, CFG_EXT_HT_CAP_INFO,
CFG_HT_INFO_FIELD, gEnableAMPDUPS and gMaxAmsduNum.
Change-Id: I019961016a2f0e39c7c62066c04788d3bd3d37e7
CRs-Fixed: 2318579
In STA mode, deauth frame is sent to AP due to disconnect
triggered as part of hdd_stop. Host did not receive deauth
tx complete event and FW_DOWN uevent is received after this.
As part of pe shutdown notifier cb, lim timers are deactivated.
This will result in cleanup failure and disconnect timeout.
Fix is to post SIR_LIM_DEAUTH_ACK_TIMEOUT message to lim
before deactivating the timer.
Change-Id: I75d8a8c861e89bb34526a0af92c446139a5bec1c
CRs-Fixed: 2344575
When scan cannot be cancelled timely after pre-auth response is received,
Then a second attempt of pre-auth request could be sent, which might be
referencing a wrong session and cause NULL pointer access.
Skip to send pre-auth request for such case.
Change-Id: Icb81830ef08cffc172b327e3a8ae170aea1ec58c
CRs-Fixed: 2272022
Add the following WMM BE VO ini configs to MLME cfg:
1. CFG_QOS_WMM_INFRA_DIR_AC_BK_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_BK_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_NAME
Introduce the basic infra APIs related to these configs
from mlme.
Change-Id: I1f8e6f0fa1ff15eda36a20ee06772c4a1ddd9ca8
CRs-Fixed: 2327690
Function csr_set_phy_mode() is not used. Since it is apparently
obsolete, remove it.
Change-Id: I742060a27e6501ee894348d2a915f50f550ef6da
CRs-Fixed: 2344316
Free roam_info in sme_rrm_send_scan_result for all error cases to
avoid memory leak.
Change-Id: I9a30c0c5e349d926092a881c4e2720100836e9d1
CRs-Fixed: 2344465
In function wma_send_bcn_buf_ll, bcn info is filled from
wma handle by mapping the vdev id. For valid vdev id also wma_handle
could have NULL beacon info. So, check for NULL pointer before
accessing the bcn pointer.
Change-Id: I660c8231801eb28962edc364a139e7980febb71e
CRs-Fixed: 2336946
As part of WIN BMI modularization, hif_bmi_register_callbacks
are removed from if_pci.c in qcacmn project. As a result,
MCL needs to invoke hif_bmi_register_callbacks in qcacld project.
Fix is to call bus agnostic hif_register_bmi_callbacks method
in bmi_download_firmware.
Change-Id: I72febb02150cf9c672bea4949c53f1b87fa69cdf
CRs-Fixed: 2332266
Add the following WMM BE VO ini configs to MLME cfg:
1. CFG_QOS_WMM_INFRA_DIR_AC_BE_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_BE_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_NAME
Introduce the basic infra APIs related to these configs
from mlme.
Change-Id: Ibaf06ba2df07a4805d31a4748809c44d143dd12e
CRs-Fixed: 2327689
Add the following WMM AC VI ini configs to MLME cfg:
1. CFG_QOS_WMM_INFRA_DIR_AC_VI_NAME
2. CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_NAME
3. CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_NAME
4. CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_NAME
5. CFG_QOS_WMM_INFRA_SBA_AC_VI_NAME
6. CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_NAME
7. CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_NAME
Introduce the basic infra APIs related to these configs
from mlme
Change-Id: I320f49b216659937dc7f708fdbb7849ae415e249
CRs-Fixed: 2327687
Correct the configuration check to enable/disable the Tx SU
beamformee setting in 20MHz mode operation.
Change-Id: I958d5319acf98931187304f2c6fe2a9aff5991b7
CRs-Fixed: 2343849
Currently driver acquires wakelock for scans received from hdd.
But for RRM scan initiated from AP for beacon reports, the
wakelock is not acquired and if host goes to suspend while scan
is in progress,FW asserts.
Fix is to avoid the system suspend by taking the wakelock
before rrm scan start.
Change-Id: I02ddc9b5e6ba5f1782d00e34f044ace34c54d0b0
CRs-Fixed: 2331741
auth_failure_timeout is updated as part of
lim_check_and_announce_join_success for p2p client with NOA.
And the default value is stored in pe_session->defaultAuthFailureTimeout
After receiving the auth resp or in case of auth failure the
auth_failure_timeout is reset to default value. But there is any other
failure and pe session is deleted then the auth_failure_timeout is
not reset. And p2p cli connection will use the wrong auth timeout.
And can result in connection delay's if GO doesn't send the auth response.
Reset the auth_failure_timeout to defalut as part of pe_delete_session.
And decrease the max value to 5000ms.
Change-Id: I374bf45279f086127ef062b83a06049c895c4675
CRs-Fixed: 2343832
Currently in case of net tx timeout there is no information
which net tx queue is paused. So log the information of all
net tx queue state in case of tx timeout.
Change-Id: I0b92bd98ad68afcaba9b0f3babb135466bdfa503
CRs-Fixed: 2335572
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). In order to reduce the complexity there is a
plan to replace the existing switch with a vtable. As part of that
goal refactor the WE_SET_GTX_* ioctl handling into separate functions.
Change-Id: I8303aaaa8009e568684a9a54dbfd92ea98b3df5e
CRs-Fixed: 2343555
Ida2b81eef0ebbfba2749ca89b63980201830a5e2 moved psoc create into
hdd_context_create(), however the destroy path remained as it was. This
caused a regression in the error path where the psoc was not cleaned up
in all cases. Move the psoc destroy into hdd_context_destroy to maintain
symmetry and avoid leaking the psoc under error conditions.
Change-Id: I3b16c9ea37dcf3e3b0ef262894aead5ff4fac59c
CRs-Fixed: 2342955
Currently if any interface comes up on any of the MAC address
from the driver's default MAC address list and if this MAC is
changed dynamically, now if this interface is deleted, it will
not be able to release this MAC address as this newly
configured MAC doesn't match with any of the MAC from the
driver's default MAC addresses and driver is not able to
release this MAC cosidering it as invalid MAC, because of
this corresponding MAC interface mask bit is also not getting
reset and will never get reset, indicating corresponding MAC
is not available for use. If MAC addresses are changed for all
the interfaces which initially comes up on driver's default
MAC address and later these interfaces are deleted, driver
will not be able to add any of new interfaces even there is
no active interface currently in the driver.
To resolve this issue add one more MAC address list for dynamic
addresses cache all the dynamic address changes in this list,
while releasing the MAC on interface delete, release the MAC
from this dynamic list and reset the corresponding interface
mask bit.
Change-Id: I9b6448dced2d3af75625a5c862d2913c33f9983c
CRs-Fixed: 2328304
Function hdd_override_all_ps is only used for monitor mode. In
this function, unexpected PM objects will cause initialization
malfunction. Move these PM objects setting after vdev creation.
CRs-Fixed: 2338261
Change-Id: I0d0e7b1bc4ec0853a274bdea8db2bbe3a3dbe885
During SSR the sap context is reinitialized and it request for
scan request id again deleting the older request id from scan module
this can lead to situation where the scan requestor list is filled by
SAP request id's and thus next request for request id will return 0.
Now during de init when it try to delete the requestor id 0 it delete
the 0th entry which is for CFG. Now if again SAP register the request
id it will get the 0th index which was freed and thus when CFG
requests a scan the sap callback is called instead of CFG leading to
NULL pointer access.
Fix this by not registering for request id again after SSR for SAP.
Change-Id: Ibc8ad0700b602a9c3d2769d979303499df8d6605
CRs-Fixed: 2341133
Add the basic infra for legacy DP CFG items and the APIs
to be used from other components.
Change-Id: If7ad0e02c65e04ea13a308e680c9ba3b3d84ae25
CRs-Fixed: 2324099
In sap_deinit_ctx() the check to free sap_ctx->channelList is after
sap_ctx is memset to 0 and thus sap_ctx->channelList will always be
NULL and memory will never get freed.
Also there is no need to reset scan_vdev_del_in_progress after vdev
is deleted in firmware as there still can be the race when scan is
processed. scan_vdev_del_in_progress will be deleted with obj_mgr
vdev so no need to reset it.
Change-Id: Ie5f133d4db48485434436e67ce1643d8e1e04106
CRs-Fixed: 2342039
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of all of the WE_PPS_* sub-ioctls
has a complexity greater than 1, so refactor that logic into separate
functions to help reduce the complexity of __iw_setint_getnone().
Change-Id: I2abde9c5e300302c7948049027d2db88c893211a
CRs-Fixed: 2341123
If event posting to VDEV state machine fails, the memory allocated
in lim join and reassoc req is not freed, leading to mem leak.
Fix this by freeing the memory in failure cases.
Change-Id: I3769684e6ad64341b73dd6f6343adc8c0d26d04c
CRs-Fixed: 2342487
When SSR is in progress, when trying to remove self peer, if
wma_remove_peer() is failed then wma_vdev_detach() doesn't send del sta
response and wma_self_peer_remove() can still proceed to start vdev
hold request timer. This can lead to skip of vdev reference count
release by wma acquired during vdev attach.
To address this, release vdev reference count when self peer remove is
failed and when del self sta request is timed-out.
Change-Id: I2703261a848983b10798cb8ec74d1cec5a393ce5
CRs-Fixed: 2342453
Currently Napier FW WAPI TX/RX initial PN logic is fit for WIN
host, modify MCL host to align with WIN so that WAPI can work.
Change-Id: I0b49a25e75d1e9c4856daf8648d6561486005ba9
CRs-Fixed: 2323152
The snoc wlan platform driver supports snoc API with
the device pointer in all upstream kernel, So remove
the redundant snoc APIs from the pld layer.
CRs-Fixed: 2173110
Change-Id: Iee8bce586569e135da81f9a465a9e7df8b042af4
In error cases of set hw mode, set dual config etc are not handled
in all scenarios and thus the active cmd is not removed in this case
resulting in active cmd timeout.
Fix this by handling and sending failure resp for all the error
scenarios.
Change-Id: I21151798f58bf9816458430d96c7fd1d5f0ee07f
CRs-Fixed: 2341816
To help reduce the complexity of future refactorings in
hdd_stop_adapter_ext(), address some simple style issues.
Change-Id: Iae67f1d828c1ffcb102a78617c40db1babf5b009
CRs-Fixed: 2342133
Some target which support sending mgmt frame based on htt would DMA
write this PMF tx frame buffer, it may cause smmu check permission
fault, set a flag to do special DMA map.
Change-Id: I3686be211374d2c316726fa3248dedce87c3faed
CRs-Fixed: 2332329
1) Support SAP, GO standalone case
2) Support SAP + STA concurrency
3) Support GO + STA concurrency
Change-Id: I7da2102f0d8b893bc057bc8ecf0af4ab74f81db4
CR-Fixed:2320218
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_CLEAR_STATS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: I51e72ccf83a6b63792c17d6c65daca6571ef21bb
CRs-Fixed: 2341122
Remove legacy cfg items definitions and related macros for the
converged CFG items.
Change-Id: I12944f50d68dafe989417dda777f29a6233c97a4
CRs-Fixed: 2340856
When the firmware crashes platform driver notifies the driver
through CNSS_FW_DOWN. Since firmware down support is not
present for the PCI bus, The driver flags for target ready
and recovery flags are not getting set resulting in the commands
sent to firmware.
Add the firmware down support for the pci bus.
Change-Id: I20db3698602ea273038a3f024b4e5f61639f6d74
CRs-Fixed: 2338570
When beacon report request action frame is received,
rrm_process_beacon_report_req() is called and num_channels value
is calculated from the action frame directly from user. This
value is assigned to pSmeBcnReportReq->channelList.numChannels
and this num channels value along with the channel list is
posted to sme for further processing. The sme function
sme_rrm_process_beacon_report_req_ind() processes this sme
message eWNI_SME_BEACON_REPORT_REQ_IND. In this function,
the channels in channel list are looped through the received
value pBeaconReq->channelList.numChannels and is copied to the
destination pSmeRrmContext->channelList array from the
pBeaconReq->channelList.channelNumber[] array.
The maximum possible number of channels in channel list
BeaconReq->channelList.channelNumber[] allocated statically
in the definition of tSirChannelList is
SIR_ESE_MAX_MEAS_IE_REQS (8).
So when the pBeaconReq->channelList.numChannels, possible OOB
read occurs.
Validate the value of pBeaconReq->channelList.numChannels
received from the action frame against the maximum supported
number of channels in channel list SIR_ESE_MAX_MEAS_IE_REQS (8).
Place this validation inside the function
sme_rrm_process_beacon_report_req_ind() instead of validating it
at rrm_process_beacon_report_req() so that it defends from other
caller sme_set_ese_beacon_request() which is from user space
command through IOCTL.
Change-Id: I2074b04081328ceab7eeb29c33631a635e9d93c3
CRs-Fixed: 2335974
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_AMSDU has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: I74bbc055c1587fff548512f4c7f325f75345eb95
CRs-Fixed: 2340147
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_VHT_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: I07299bcc7e1cba7b5ceced3ba1cf22c470cb448e
CRs-Fixed: 2340146
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_11N_RATE has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: Iea2ee6bc53a56bb92497d42ac057e6663bc07097
CRs-Fixed: 2340145
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_RTSCTS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: I9f17824abe6ac9e60cc908c46661fe991ecfd9aa
CRs-Fixed: 2340144
One of the HDD functions with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_SHORT_GI has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: Ica2a50216c413985f05a2771641be439c6c9d8cd
CRs-Fixed: 2339229
hdd_set_rx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_rx_stbc().
Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.
Change-Id: I9442a8a46da4066c8b4dafe2cf9ce64f608bb3a9
CRs-Fixed: 2339228
hdd_set_tx_stbc() is called from both the STA and SAP ioctl
handlers. In the STA case the caller checks the mac_handle, but in the
SAP case the mac_handle is not checked. This could result in a bad
mac_handle being used in the SAP case. In order to cover both cases
relocate the mac_handle test to hdd_set_tx_stbc().
Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.
Change-Id: Ie7a01ddbfb958ab87b7baf11e93d8a86c32744b7
CRs-Fixed: 2339227
hdd_set_ldpc() is called from both the STA and SAP ioctl handlers. In
the STA case the caller checks the mac_handle, but in the SAP case the
mac_handle is not checked. This could result in a bad mac_handle being
used in the SAP case. In order to cover both cases relocate the
mac_handle test to hdd_set_ldpc().
Note that this has the added benefit of reducing the cyclomatic
complexity of __iw_setint_getnone(), one of the HDD functions with the
highest complexity.
Change-Id: I97827ee257c9e15e24468ed9800080375f082ff1
CRs-Fixed: 2339226
According to the current code flow of con_mode_handler, the
WLAN modules are stopped, adapter is opened in FTM mode and then
the modules are started. Due to the INI/CFG value accces done as
part of opening the adapter, and since the modules are stopped
at this point, it results in a use after free scenario.
Modify code sequence of con_mode_handler to WLAN start modules
before opening the adapter in FTM mode.
Change-Id: I94afb9b2a3751247b4ae95e27b1374b25890a9d7
CRs-Fixed: 2339777
There is an incorret valid pointer checking after memory
allocation for monitor mode, which will cause net device up
failure. Fix this incorrect checking.
CRs-Fixed: 2338747
Change-Id: Ib1dd4d85ce7e7cace1167a082c103fb0300eb16a
Remove the definition of following INI & CFG Items
for VHT caps which is common for HT and HE caps.
CFG_VHT_LDPC_CODING_CAP
CFG_VHT_SHORT_GI_80MHZ
CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ
CFG_VHT_TXSTBC
CFG_VHT_RXSTBC
CFG_VHT_RX_MCS_MAP
CFG_VHT_TX_MCS_MAP
CFG_VHT_BASIC_MCS_SET
Change-Id: I55390c3391a0be272c609030dae232d767111fcf
CRs-Fixed: 2333183
FW expects the MU EDCA params after vdev up as it checks for
active vdev to save the MU EDCA params. Send the MU EDCA params
to FW after vdev up is sent to FW.
Change-Id: Ia7689f1bad884e73098020e5508f669d9b8881d7
CRs-Fixed: 2337827
Update Nss routine always returns failure status to user space.
Fix issue to send correct response to user space.
Change-Id: I12342ee531fc790b3042d8dcd8f5bb4b7a97e9fe
CRs-Fixed: 2340073
During csr stop, csr_roam_close_session try to purge all the pending
commands for the vdev. But as vdev is already logically deleted,
the cmds are not purged as the purge by vdev API fails to get the
vdev ref.
As in csr stop, driver clean up all the sme session so instead of
calling purge commands for vdev, call purge cmd for all the vdev.
Also the active command timeout for the delete vdev is 30 sec while
HDD waits for 15 sec. The active command timeout should be less
than the HDD timeout. Thus set active cmd timeout as 10 sec and
HDD timeout as 11 sec
Change-Id: I1d45de261c50f1835379a9cc1df4631f3e32f459
CRs-Fixed: 2339694
In wma_vdev_resp_timer(), while handling WMA_DELETE_BSS_REQ if
wma_crash_on_fw_timeout() is true, SSR is triggered, but timer
event_timeout isn't destroyed, wma_target_req, and user_data
isn't freed, result in timer and mem leak.
Change-Id: Ic47af43de671d195c6addd0360b96305af15d9bf
CRs-Fixed: 2337211
As part of PCIe power management for new WLAN devices, it requires
asserting WAKE register before accessing any MMIO registers outside
first 4K range. Add the APIs support in PLD for WLAN host driver.
Change-Id: I307cc6688fca58a52a6eaf3982d675c7a85a6965
CRs-fixed: 2326459
I1bfa8ab7329040c0b5ba989c0d7de7bf7228dd35 moved the idle timeout work
flush in an attempt to address a regression caused by moving the WMI
stop call in Iea53931771afd93ffaeabf704bbaffcf2460284f. Later, the WMI
stop call change was ultimately reverted in
I91046efeab8bc13b9f5c37d5a4d02b66c63e35a9, but the flush call was left
in its new location. Replace the original call site of the idle timeout
work flush, from before Iea53931771afd93ffaeabf704bbaffcf2460284f.
Change-Id: I21d74e02b5491dd3b42bb668329d09e77b416b7d
CRs-Fixed: 2339335
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_NSS has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone(). As part of the
refactoring relocate the mac_handle NULL check to hdd_update_nss()
since that is where it is actually used.
Change-Id: I6fef7680b8013547cb2b8eb649e207e3026144ff
CRs-Fixed: 2338567
Doing the tx desc initialization earlier in ol_tx_hl_base to make sure
all msdu buffers have been mapped before msdu frame is freed if encouter
error.
Change-Id: Iefded014b4a179889e67fa7cc0e0c36e8218dd83
CRs-Fixed: 2337167
this is not required as the session nss has to be 2, which
is expected, and helps to shift back to 2x2 from 1x1, while
hw mode goes to single MAC mode
This reverts commit I54ead1fd26d705a821160b5bc5d816df1d2ab8f4
Change-Id: I3bdcad1df6cc67de2533c89697b8c17d8ac4f573
CRs-Fixed: 2329616
1. Report NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA to
cfg80211.
2. Indicate Random MAC addr frame to source adapter.
Change-Id: Ica66fb43636fc1609febd87b6e6398dac3af25f3
CRs-Fixed: 2322077
Change "qcacld-3.0: Remove sme_set_freq_band()" (Change-Id
I41eeda85754a4d2cb1971dd53eb07a86e5ff4b87") removed the only caller
of csr_set_band(). Since it is now apparently obsolete, remove it.
Change-Id: Ifcfbeecb28964aef82d6b51942436ba18282f1d7
CRs-Fixed: 2339197
Function sme_set_freq_band() is not used. Since it is apparently
obsolete, remove it.
Change-Id: I41eeda85754a4d2cb1971dd53eb07a86e5ff4b87
CRs-Fixed: 2339196
In wlan_hdd_update_phymode() there are two separate calls to
ucfg_mlme_get_vht_channel_width(). In both cases the return status is
checked, and in case of error the following messages is logged:
"Failed to set channel_width"
Since ucfg_mlme_get_vht_channel_width() is a "getter" and not a
"setter" change the log to:
"Failed to get channel_width"
Change-Id: Ifed249e78e4a64d76eae9310da42ee490756337e
CRs-Fixed: 2338478
Currently if ADD_BSS_REQ vdev_start request times out, the
wma_vdev_resp_timer notifies this as ADD_BSS_RSP with failure status
to the upper layer and the SAP FSM moves from STARTING to DISCONNECTED
state. After this the WMA_DEL_STA_SELF_REQ is sent to the FW which does
a VDEV delete. However in cases where the ADD_BSS_REQ has been sent to the
FW but the response has not been received, the FW has the VDEV in started
state and asserts if a VDEV delete is sent without sending a vdev stop.
Send VDEV stop to the FW in case of ADD_BSS_REQ times our in
wma_vdev_resp_timer.
Change-Id: Ib2b95d38cb7fd36b02a738a73dbc1f8102d2169e
CRs-Fixed: 2323293
csr_scan_get_result API defined 'struct scan_filter' of size
800bytes on stack and larger size memory blocks on stack is not
preferred because the stack size is limited.
Modified the memory allocation to dyanmic for scan filter.
Change-Id: I40cb0d97e0451d50aca3e9485327a4ce709e6020
CRs-Fixed: 2332496
Function wlan_hdd_update_phymode() is called from two ioctl handler
functions, __iw_softap_setparam() and __iw_setint_getnone(). Unlike
most of the ioctl "setter" functions which take two parameters (an
adapter and a value), wlan_hdd_update_phymode() currently takes four
parameters (a net device, a mac handle, an hdd context, and a value).
In addition, currently the HDD function with the highest cyclomatic
complexity is __iw_setint_getnone(). In order to reduce the complexity
of that function all of the switch/case handlers are being refactored,
and in anticipation of eventually using a vtable, the refactored
functions all expect two parameters, an adapter and a value.
In order to align with that goal, refine wlan_hdd_update_phymode() to
expect those same two parameters. Note that the net device, mac
handle, and hdd context that are currently being passed can all be
derived from the adapter.
Change-Id: Ib919e6751aee182e2d8fde90a8446935447123db
CRs-Fixed: 2338381
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_TM_LEVEL has a complexity
greater than 1, so refactor that logic into a separate function to
help reduce the complexity of __iw_setint_getnone().
Change-Id: Ifa68b6553b6856a008aa37af55d2ca1760da0970
CRs-Fixed: 2338380
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_5_0 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().
Change-Id: I3eb942b5bbed7cdc8199c5a4233b4443613023b0
CRs-Fixed: 2338379
gcc-4.8 incorrectly flags the use of @next_mode in __con_mode_handler as
potentially uninitialized, while newer versions do not seem to have a
problem. Work around the compiler quirk by initializing @out_mode in
hdd_parse_driver_mode.
Change-Id: Iee101db6eaded8e856e461458d6a80e8279e9ca1
CRs-Fixed: 2338538
Currently the HDD function with the highest cyclomatic complexity is
__iw_setint_getnone(). The handing of WE_SET_MAX_TX_POWER_2_4 has a
complexity greater than 1, so refactor that logic into a separate
function to help reduce the complexity of __iw_setint_getnone().
Change-Id: Ib6da540f9d96893899ad3865fd1c72e15a1c34bf
CRs-Fixed: 2338378
There are a number of style issues in __con_mode_handler. In preparation
for additional work in this area, lightly refactor __con_mode_handler,
and address low hanging style issues.
Change-Id: I7ec7cfd369bd00a0f8acc612ebf92f7a30a7a360
CRs-Fixed: 2337850
Limit the log rate to avoid excessive logging when host hanlde RX
data with invalid peer.
Change-Id: I5dba430809d7567905e919676d8cd3245906b884
CRs-Fixed: 2336919
Wireless application needs to tune parameters per AC based.
Such as VI/VO queue use the different re-transmission attempts
while other queue keeps the default value. It helps to improve
the video/audio performance in noisy environment. this change
add the ability to config re-transmission attempts of non
aggregation QOS packets.
Change-Id: I95404302463275803e3feff3038f04c900b14705
CRs-Fixed: 2323555
Currently host is caching all the connected sta info
in case of SAP, once the sta count reaches to MAX, below
mentioned issues occurs:
1. Driver can not cache the information of newly connected
stations.
2. Some of the info is cached at the time of connection while
remaining info is cached during disconnection. In the
disconnect path driver tries to cache some of the info
such mc_bc count, disconnect reason code, since driver can't
cache anymore info, it does not find the current station which
is getting disconnected in cache sta info structure leading to
an error, and driver is returning an error without completing
the wait for disconnect event which is resulting in timeout.
Since sta_disconnect comes with rtnl_held, any other process
is not able to get the rtnl_lock until this timeout occurs.
To address this issue below mentioned two measures taken care:
Clear the oldest cached sta information and save the newly connected
station's information.
In the disconnect path, do not return any error and simply proceed
with disconnection as failure to cache the information of sta
should not stop the disconnection process.
Change-Id: Ia955a6774033fdfa91ff1fa7c8832b3ec7e8e1a0
CRs-Fixed: 2333075
Currently the sta_context in add_bss params which is used to send the
peer_assoc command to the FW, the ht_enable and vht_enable are set based
on the AP's capability from the beacon. However, the channel width is
set based on the assoc response frame from the AP.
In a scenario where the AP advertises HT and VHT IEs in the beacon but
does not send HT and VHT IEs in the assoc response frame, we will end up
connecting in VHT/HT mode but with incorrect channel width.
Update the sta_context channel width also based on the AP's capability
from the beacon so that the connection would happen in the right channel
width even if HT/VHT IEs are missing in the assoc response frame.
Change-Id: Idb1907abebf32a34f88e935a30ebb8f1bce1d59c
CRs-Fixed: 2324434
Update NSS command is remove once driver receive the tx completion
event for the beacon. If SAP is in CAC wait state driver will not
get the tx completion for the beacon and the update NSS will timeout
after 30 sec and the serialization cmds queues will get stuck.
To avoid this remove the update NSS command from active queue as
soon as beacon is sent to firmware
Change-Id: I6f5b6bce91bdfacd4621020f313be25f74696b9d
CRs-Fixed: 2332302
Currently if hostapd choose channel 149, enable ieee80211d, and
select country_code JP. Driver will choose random channel after regd
updated to JP got from firmware. Since 149 is invalid for JP
country_code, driver choose random channel in JP channel list.
Driver indicate cfg80211 chandef is changed in hdd_chan_change_notify.
However, if we don't update cfg80211_ap_settings.chandef in
cfg80211_ops.start_ap, cfg80211 will copy old chandef back to
wdev->chandef after cfg80211_ops.start_ap. Then reg_wdev_chan_valid
will return false and cfg80211_leave leads to stop
AP in reg_leave_invalid_chans.
Change-Id: I3f89da46b4172fdea2774703f32b9cbabff41eeb
CRs-Fixed: 2315627
The code to start and stop the idle shutdown timer in HDD is currently
copy-pasted in multiple locations. Abstract this logic behind two new
APIs, and call these APIs where appropriate.
Change-Id: I73b05e603454a4817cb9c1606c1207d7fe68e5ab
CRs-Fixed: 2337755
API hdd_nud_filter_netevent is used to filter netevents for
STA interface. It is the driver's responsibility to
filter and act on event if it is for the net device. However,
the NULL check that is present in hdd_validate_adapter comes
with error logs which flood the console.
Add NULL check for adapter after call to hdd_get_adapter_by_macaddr
in hdd_nud_filter_netevent so that if the event is not for
the net device, ignore the event and return to avoid excessive
logging.
Change-Id: Icfb2f27f97712bf8e1422404a85163e801d43641
CRs-Fixed: 2335081