Enhance logs in ACS module to remove duplicate
prints and keep only useful logs to debug.
Change-Id: I2cf98fb8b4d7a8391617c9ce1baaa5ff6ad42114
CRs-Fixed: 2614609
Reset roam configurations to default while station mode init.
Thus user gets default roam configuration with which STA mode is
initialized.
example: When STA connect to AP, user queries for default roam
scan home away time using following command of wpa_cli.
$wpa_cli
>driver GETSCANHOMEAWAYTIME
<OUTPUT is default value of gRoamScanHomeAwayTime INI>
Change-Id: If525e4a92fee6f4823996c1e1e34b9943fed0432
CRs-Fixed: 2607557
As part of new requirement WLAN subsystem needs to perform thermal
mitigation action as per the thermal state of the device. The
wifi hal sends vendor command QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD
with the thermal level parameter and wlan host performs the required
appropriate action. wlan host driver maps the thermal level to
corresponding duty cycle off percent value and duty cycle value,
send WMI_THERM_THROT_SET_CONF_CMDID cmd to FW.
Make changes to perform vendor command handling, mapping thermal level
to duty cycle value and communicating the thermal information to FW.
change-ID: I77175048c817ab755cdb838018e414ef3ee0b112
CRs-Fixed: 2610395
To set specific channels, user give SETROAMSCANCHANNELS command with
channel count followed by number of channels.
Ex. SETROAMSCANCHANNELS 2 1 11, here 2 is count and 1 & 11 are the
channels.
If channel count is more than the number of channels, driver rejects
SETROAMSCANCHANNELS command and if number of channels are more than
the channel count, driver ignores excess channels in the list.
Change-Id: I276b84b4994bdf25abf36298dc212dcd54ce0dbb
CRs-Fixed: 2609788
In the function hdd_sendactionframe, the parameters passed include the
payload and the corresponding payload length; payload being generic
pointer. The payload is then typecasted into the destination structure
of type tpSirMacVendorSpecificFrameHdr. If the size of the payload
specified in payload_len is less than the size of the destination
structure, there is possiblility of OOB read while accessing the same.
To prevent this security vulnerability, add a sanity check for the
payload_len against the size of the destination structure.
Change-Id: Ib0e7b7bfcf78412d81f18cf887e5296d80272598
CRs-Fixed: 2517858
Add a new INI parameter "nan_separate_iface_support" to
indicate firmware that the host driver supports separate
interface for NAN Discovery.
Change-Id: I6fb313b02c5f3a05638e85494051fb003b2dd867
CRs-Fixed: 2612006
wlan_hdd_pm_qos_notify() is currently directly calling the kernel runtime
pm operation functions. Use the hif api functions to perform these
operations instead.
Change-Id: I8b13a8dd0d5a89f2208b4f319e71b4ffc217ae5c
CRs-Fixed: 2607715
arp_ns_offload and gtk offload command are being issued for NaN mode
vdev. NaN mode vdev does not support ARP_NS and GTK off load features,
so disable them when in NaN mode.
Change-Id: Iab11c92bb5da4004b62e642342a386f532832509
CRs-Fixed: 2608618
Instead of returning the whole valid channel list, just return the
PCL to QCA_WLAN_VENDOR_ATTR_GET_PREFERRED_FREQ_LIST.
Change-Id: I2be4357f1c25732b9d1098f3d16259217fa46b8e
CRs-Fixed: 2607890
Driver/firmware may not support NAN in some platforms. But when
framework tries to enable NAN/NDP, driver returns an error and
logs the failure with error level. This is causing excessive
logs in dmesg. Reduce the log level to debug in order to avoid
spamming dmesg.
Change-Id: Ied8f06fadc3b68a9fc3657e31679b71a3807737e
CRs-Fixed: 2608564
Add check for sta connection during NUD stats request because FW may
assert if NUD stats request is sent to FW when the station is disconnected.
Change-Id: I0521356f677154cd5f4f0ae08b5fcfec2e9cef56
CRs-Fixed: 2610267
Data abort is happening while accessing unmapped sta_info in
hdd_softap_stop_bss(). When calling hdd_sta_info_detach() through
hdd_softap_deregister_sta(), sta_info is not being set to NULL since
a single value only passes a copy of sta_info, so the actual sta_info
is not actually being set to NULL. To fix this, pass a double pointer to
sta_info instead of a single pointer so that it can be set to NULL.
Change-Id: I96f4c7e1563e53498a86c95263dc62a8d3d68e21
CRs-Fixed: 2610763
Pass soc objmgr from hdd context to hif context
to retrieve INI parameters to be used in hif
layer.
Change-Id: I0ad4573fecba0fc78968145394683057d09da312
CRs-Fixed: 2598759
Add ini support to configure the protocol data packet types
for which diag log is sent to user-space.
Change-Id: I10c83aa4af7099feafa86e2b57dc5fd79d02114c
CRs-Fixed: 2595789
Add support to fallback the PMKID generation from firmware to
wpa_supplicant.
In FIPS Enabled case, for roaming Firmware sends PMKID
request to host as firmware is not supposed to do crypto
functionality with FIPS enabled. Once the roam candidate
selection is done in the firmware, it sends the
WMI_ROAM_PMKID_REQUEST_EVENTID. After receiving this event
the host driver triggers an event to wpa_supplicant using
NL80211_CMD_PMKSA_CANDIDATE for PMKID generation. Then
wpa_supplicant responds with PMKID to host using
NL80211_CMD_SET_PMKSA. And host updates the wmi pmk cache
and indicates the firmware via WMI_PDEV_UPDATE_PMK_CACHE_CMDID
wmi command.
Change-Id: I7d33a2b92f97260fa5a7e742b6f877adc7eced55
CRs-Fixed: 2512955
Currently the roam trigger, roam scan , candidates and
roam result related logs are printed at debug level and wouldnot
appear at kmsg. These logs are needed at kmsg for roaming
related debug requirement.
Change-Id: I0d407d04606462c88cf15f3693994f7cf11f6602
CRs-Fixed: 2607349
Even when vdev is in disconnected state, during connect it tries
to wait for disconnect which lead to 1 sec delay in connect.
So call wait for disconnect only if vdev is not already disconnected.
Change-Id: Ib7a9b4628b0e10f71bdebe4b74a70d648825d9d3
CRs-Fixed: 2609462
The HW is capable to send the RSSI from the range
0-127, and when the driver normalizes it with the
noise margin of -96db, then it may happen that the
net RSSI is still positive if the reported RSSI is
greater than 96 db. If this happens then the GUI
shows 0 signal as it considers this RSSI positive
value to be invalid, though the RSSI was very strong.
Fix is to override the RSSI as 0 if the net RSSI
obtained after normalization is positive.
Change-Id: Id00a2ef3bafe77a033627931ae62cd11f3ba4f27
CRs-Fixed: 2606589
In error case during wow pattern add and delete the allocated
memory for pattern string is not freed which is leading to memory
leak. Add the fix to free the allocated memory for wow pattern
properly for both error and success cases.
Change-Id: I5ecc2fb710bba85369a0bacbdd69a039d295e4d8
CRs-Fixed: 2609247
Driver receives roam invoke command from supplicant, Host start
processing it in wpa_supplicant thread and sends ROAM_INVOKE
command to firmware. FW indicates roam invoke failure, so host
clean up the AP (Disconnect). But wpa_supplicant did not get
scheduled till disconnection completion. After disconnection,
wpa_supplicant thread gets resume and sets the roaming in progress
true. This results in roaming in progress remain set in a
disconnection state.
sme_fast_reassoc should be protected with sme lock to avoid
the race between SB disconnect and sme_fast_reassoc.
Fix is to protect sme_fast_reassoc with sme lock and
set roaming in progress flag before sending sme_fast_reassoc
command to FW and reset it again if sme_fast_reassoc fail to
initiate the roam invoke.
Change-Id: I05d92f8d5916decbd2c6f99eb67da0a29525ead5
CRs-Fixed: 2608398
Currently many layers store the datapath handles i.e.
pdev and vdev handles and use them for passing as an
argument to the CDP APIs. This gives way to possible
race conditions, where the datapath handle provided by
the outer layer might be a stale pointer, which in turn
leads to unexpected results.
Remove the storage and usage of all the datapath handles
from the layers currently using them.
- cds_context
- vdev objmgr
- pdev objmgr
Change-Id: Icf24bd3792af203d1a06e153f0badd6e7405559f
CRs-Fixed: 2602199
wlan_hdd_disconnect logic changed as part of
Ib490021775a39614646f8e518860c878cc0fdaae, but wlan_hdd_try_disconnect
was not taken care to avoid the disconnect timeout.
As both API use same code move the logic to separate API and call
the API from wlan_hdd_try_disconnect and wlan_hdd_disconnect.
Change-Id: I20d0f85cc0bb4b6ba826d60051e6f4124b180c24
CRs-Fixed: 2608708
The current implementaion check for peer, vdev and pdev leaks on
psoc in order and if any leak is found for peer then QDF_DEBUG_PANIC
is called and vdev and pdev leaks are not checked. Similar is the case
if vdev leak is found, pdev leaks are not checked.
Invoke new API to check for all the object leaks and then result in panic.
Change-Id: Icf6622760f3646b82f893beb7415b95307e2ccd7
CRs-Fixed: 2604594
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.
Also remove the ops which are used to store
and retrieve such handles, that no more needed.
- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete
Change-Id: I5134ca882f5fcf0e5941317e48712717eddb58fe
CRs-Fixed: 2541708
Add call to hdd_regulatory_chanlist_dump to dump
the curr_chan_list. It will be processed by regulatory
test case in whunt.
Change-Id: I6a35fc61f13f92874b24602a572ebb7bf6c03250
CRs-Fixed: 2606980
Currently PM QoS is only enabled for kernel version 4.19.0 and below but
is supported and needed in kernel version 4.19.72. So enable PM QoS if
kernel version is below 5.4.0.
Change-Id: I440abe1cf9737447faff250b1973f1e6e2fe378e
CRs-Fixed: 2603396
Currently cdp ops are given pdev/vdev handle
as its arguments, which is directly accessed
in those APIs. This can cause a race-condition
in access of the respective handles, if it has
been deleted in parallel.
Hence as a part of cdp convergence, pass only
the pdev_id/vdev_id which will be used to get the
respective handles and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.
- txrx_set_safemode
- txrx_set_drop_unenc
- txrx_get_pdev_param
- txrx_set_pdev_param
- wdi_event_sub
- wdi_event_unsub
Change-Id: Ib3511cbdead75b30e899dbf00f936ffdae316b71
CRs-Fixed: 2541657
Starting Kernel 4.19 IPA LAN RX supports NAPI polling
mechanism. Netdevs that hook into IPA need to call
netif_receive_skb() or similar to deliver the packet
to network stack instead of using netif_rx_ni().
IPA driver exports ipa_get_lan_rx_napi(void) API for
this purpose. If this API call returns true use
netif_receive_skb() or fallback on legacy api.
Add the changes under a feature flag IPA_LAN_RX_NAPI_SUPPORT.
The flag is enabled only for linux kernel version 4.19 and
above.
Change-Id: I3bf200c993461e45da0d07697678c634760e9a89
CRs-Fixed: 2560360
Previously vdev trans will be rejected if psoc in trans. but
it causes issue when __hdd_psoc_idle_shutdown is in psoc trans,
if ifconfig comes here, the ifconfig will fail.
Add checking if psoc trans in driver recovering and unloading,
if yes, it will be safe to reject vdev trans, otherwise, we should
let vdev trans waiting for psoc trans.
At the same time, we also need to make sure driver state has been
set before psoc trans when unloading.
Change-Id: Ic47eebef76b8eadc90780b74f75d4ebef73b822d
CRs-Fixed: 2601435
To close NAN data interface session, BSS stop request is sent to
firmware, as a response driver gets status and reason code for BSS
stop. To update NDI close session to user space, required information
is available in BSS stop response.
Hence, update NDI close indication to user space from ndi delete
response handler in HDD layer.
Change-Id: I2440cb6d15bd393ed9631d595634865fbee8bdd6
CRs-Fixed: 2600852
CPU PM QOS votes can be used as a precondition to decide whether
WLAN device is worth to enter runtime PM suspend. Add support to
monitor PM QOS votes while WLAN device is powered on and enable
this feature if gRuntimePM config value is set as 2.
Change-Id: I7f47a50689efdcb15979e7983474bb23b86da00d
CRs-fixed: 2604780
When all chan in ACS freq list is filtered out
by wlan_hdd_trim_acs_channel_list, the hostapd start will
fail. This happens when PCL is PM_24G_SCC_CH_SBS_CH,
and SAP acs range includes 5G channel list.
One example is STA active on 6Ghz chan. Hostapd start
SAP on 5G ACS range. The intersection of PCL and ACS range
is zero.
Instead of ACS failure, add API wlan_hdd_handel_zero_acs_list
to select one channel from ACS range and report to Hostapd.
When hostapd "start_ap", the driver will force SCC to 6G
or move SAP to 2G based on SAP's configuration.
Change-Id: Ice8bef2a82f43940c570c74c0af8b05d18159f52
CRs-Fixed: 2603699
6Ghz channels information is not used by legacy OEM apps example
"lowi-server" having no support for 6Ghz channels.
Hence "oem_6g_support_disable" INI is added. By default INI value is
1. 6Ghz supported OEM applications sets INI value to 0 and gets 6Ghz
channel information from driver.
Change-Id: I2650e6ad2976b64e46ab0143b2bafc2df2343e94
CRs-Fixed: 2597651
Replace channel ID with channel frequency in
wlan_hdd_change_hw_mode_for_given_chnl.
Change-Id: If1583dae2f13c5e5553d916befb186de00840345
CRs-Fixed: 2584776
Extend WAR mechanism to record monitor mode capture frequency from
pdev if RX PPDU TLV is empty.
Change freq type to qdf_freq_t.
iw dev wlan0 set freq <freq> [HT20|HT40+|HT40-]
Change-Id: Ic66f516f1f0f2ac97563e27b1d7c86032e8690ec
CRs-Fixed: 2568971
When CONFIG_BAND_6GHZ and CFG80211_6GHZ_BAND_SUPPORTED are defined in
kernel 4.4, which means 6g feature is enabled, currently there is a
build error: wlan_hdd_iftype_data_alloc_6ghz is defined but not used.
To fix this issue, refine iftype_data_*g defination with below rules.
1. If CONFIG_BAND_6GHZ and CFG80211_6GHZ_BAND_SUPPORTED are defined,
iftype_data_2g, iftype_data_5g and iftype_data_6g will be defined no
matter the kernel version.
2. If the kernel version is not smaller than 4.19, iftype_data_2g and
iftype_data_5g will be defined.
3. If the kernel version is not smaller than 5.4 and CONFIG_BAND_6GHZ
is defined, iftype_data_6g will be defined.
Change-Id: If75bea9fc4c11d6cacd8dbf49455277f055ed8de
CRs-Fixed: 2600962
When CONFIG_WLAN_FEATURE_11W is disabled, compilation of lahaina still fails
in a few areas. Even though CONFIG_WLAN_FEATURE_11W should be always be
enabled now, add appropriate fixes for the compilation issues in the event
that CONFIG_WLAN_FEATURE_11W is disabled.
Change-Id: I1743678df6b66a63160795374de7969f313f55d9
CRs-Fixed: 2601362
Issue happens when wlan0 is created then hostapd change
it from sta to ap mode before start wlan0 adapter,
then interface is deleted; as hdd_sta_info_init only happens
when start ap adapter, so there will be issue when destroy
sta_obj_lock as sta_obj_lock was never init.
Change:
Move init sta_info to open adapter and init sta_info
for all modes, so this will simply the logic and
no need to consider too much about adapter state change.
Change-Id: I5e90ec120b2ec487507d9bda2f8c18c9a54d2a01
CRs-Fixed: 2554812
Check for invalid BW if received as part of
monitor mode vdev start command and reject if
invalid.
Change-Id: I1dfd7936af354622c52295cfba16941b96dfe649
CRs-Fixed: 2600906
Disable TDLS off channel if 2g or 5g is disabled, restore TDLS off
channel configure when all bands are enabled.
Change-Id: Iabfdcdbf84e4a6313ad04e381b70e21c871d66c2
CRs-Fixed: 2595303