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
Excessive logging detection was recently added via
If83c6dfccb9d191b02a3a7166b065c0a0704f969. While we would like to enable
this feature with a maximum number of logs per second of 100, there are
still a few outstanding problem areas, like dumping stats via IOCTL.
Instead enable the feature with a max of 500 to catch egregious
regressions, and plan to decrease this to 100 or less once the problem
areas are addressed.
Change-Id: I5b880c2354ec4828e1773eeb43de43a4649d4803
CRs-Fixed: 2340011
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