Fix for null object dereference. Check for null wlan
kobject and return if true.
Change-Id: I90477335c81d44b9cc2762dd4060d9447a0bdb66
CRs-Fixed: 2717466
When wep_default_key is not set as 0 in hostapd.conf, wep key with
key id 0 should not be sent to FW when new station is connected.
Wep key with key id specified in hostapd.conf should be sent to FW.
To fix this issue, wep default key id should be saved for sap mode.
When reference station is connected, set default key id related key
to FW with TX_USAGE flag.
Change-Id: Ic13e311593154911ee21db5172188c7037f429a3
CRs-Fixed: 2700441
PKTLOG can be enabled from both 802.11 and WEXT, customer
integrates pktlog ctrl in script and is toggled frequently.
This leads host pktlog status variable and FW status out of
sync. Host bus vote logic need disable pktlog when TPUT is
high, based on host status. At last, it will not take effect,
KPI continues dropped by PKTLOG.
Change-Id: Ifad7b53060b6046361621bf927c99b6b66e0c278
CRs-Fixed: 2715362
Currently the driver supports the dynamic
configuration of nss and chain to FW for
VDEV if the FW advertises the capability
of supporting the same. However there is
no support to overide this.
Fix is to have an ini to enable/disable
this feature of configuring the dynamic
nss and chains to FW.
Change-Id: I0b84bb5aec53966a43a00c11d4aba3863414005c
CRs-Fixed: 2708303
Replace wlan_reg_is_24ghz_ch with wlan_reg_is_24ghz_ch_freq.
Replace channel with frequency in cds_get_vendor_reg_flags.
Change-Id: I72ffc5550e45be1edf460f9619fead8889cf2967
CRs-Fixed: 2714723
As a part of LL stats get NB operation, the driver sends the LL stats
req to the FW, waits for the response and sends back the stats in a
synchronous reply. All this happens as a part of one single NB
operation.
Within this operation, if an rmmod comes, there can be a possiblity
of a memory leak. In function hdd_link_layer_process_radio_stats, there
is a check to validate the hdd_context and return if the driver is
undergoing load/unload. As a part of the premature return, some stats
are not returned to user space..
To resolve this, remove the validity check from the NB operation. The
operation itself comes with DSC synchronization and ensures that the
hdd_context remains valid atleast until the operation is complete. Thus
there is no need for the redundant check of validity of hdd_context.
Change-Id: I20cc85b715330a28bc077ca47a1721343bba7214
CRs-Fixed: 2714136
Adrastea target expects different attributes in vendor command
QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG. So add an api to parse
the vendor command QCA_NL80211_VENDOR_SUBCMD_PEER_CFR_CAPTURE_CFG
which will be called based on CFR version type.
Change-Id: I965b3cd6b93a288f1074ea0c09306cfff9f6ced0
CRs-Fixed: 2687075
If any group key is gotten before sap bss starts, it should be sent to FW
when sap bss starts. There should be no valid unicast key before sap bss
starts, so no need to set the key to FW as unicast key again.
All the saved group key should be set to FW when sap starts.
Change-Id: I8a36415b896881b2e7c0ab72b9679eb1daa86e80
CRs-Fixed: 2705593
Set IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G flag in wiphy
2.4GHz capabilities
Change-Id: Ia142c4c307ea2f7edb9fac018d5be62ca93a3a11
CRs-Fixed: 2693444
For Lithium target, hdd_gro_rx_dp_thread callback is registered
to handle GRO.
Currently this callback is not registered for target qca6750.
Register hdd_gro_rx_dp_thread callback for target QCA6750 to
handle GRO.
Change-Id: I2991a6b2f6a2a614f4bb7f36bac6ec4909c4d251
CRs-Fixed: 2712504
In case of open mode the crypto params are not updated and thus
older params values are maintained. This can lead to failure
in open mode connect.
Thus Reset crypto params on open mode connect request
Change-Id: Ia986f1b0d7b29410d32090be3e9bfb9db96c6c11
CRs-Fixed: 2713346
As part of GKI kernel whitelisting effort, add kernel version check
for cfg80211_update_owe_info_event.
Change-Id: I06e4f42bbe6d032a816c61eea2e4cc415ebbdff4
CRs-Fixed: 2700291
In FW CFG_TGT_DEFAULT_MAX_STA_VDEVS considers total no of
STA and P2P-CLI vdevs. Check CFG_TGT_DEFAULT_MAX_STA_VDEVS
in change interface APIs for P2P CLI case.
Change-Id: I195d1cdda2d66f3187698254accf4bc3646d78c2
CRs-Fixed: 2701798
Currently, APF memory offset is sent to the firmware without validation.
This may cause out of bound memory access in the firmware.
To avoid this, validate apf memory offset with MAX_APF_MEMORY_LEN in
the driver.
Change-Id: I5657f570a820b73b9e07a6fb1ce54807156def24
CRs-Fixed: 2711515
When vdev destroy event timeout, function wait_for_completion_timeout()
will return zero. Zero means completion event timeout. But our code uses
last status to check timeout or not timeout. SME will not be clean at
this case.
So, correct code to ensure sme can be clean.
Change-Id: I4c0366a9d0f89d374f0e6aa50e0aa32f67fac03e
CRs-Fixed: 2705855
Add null check for 'hdd_ctx' and 'soc' before accessing them in
hdd_set_netdev_flags function.
Change-Id: I0fc115170943c402b522989d76b278ea1fbd4862
CRs-Fixed: 2706429
For kernel 5.4, skip GRO flush when T-put is low will cause
11g TCP RX not stable.
Do not skip GRO flush if T-put is low for kernel >= 5.4.
Change-Id: I89c29b64b9801d2a3c917d88cc31cb18296fd4d7
CRs-Fixed: 2697893
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.
Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.
CRs-Fixed: 2698342
Change-Id: I56319095e6229d77ddb5c790d0af9c6ba0267611
Userspace uses enum qca_vendor_oem_device_type to indicate
device type as vdev or pdev in the oem data vendor nl command.
This attribute is set to 1 to indicate that the oem data command
is meant for pdev and it is 0 for vdev. The default is vdev when
this nl attribute is not present.
The host driver should update the pdev_id of the vdev and fill
the pdev_vdev_flag to 1 for pdev commands.
Change-Id: I8bdf436759e0935c52bb09c2865fcb4a7a5ee4fc
CRs-Fixed: 2693892
QCA_NL80211_VENDOR_SUBCMD_NAN_EXT is introduced to carry NAN
command data along with channel info. This channel info is needed
to enable DBS on DBS supported platforms. The command data is sent
to firmware as it on non-DBS platforms.
Userspace is expected to send NAN commands through
QCA_NL80211_VENDOR_SUBCMD_NAN_EXT if it's supported. It can send
QCA_NL80211_VENDOR_SUBCMD_NAN if QCA_NL80211_VENDOR_SUBCMD_NAN_EXT
is not supported, which is expected to happen on older
platforms(non-DBS).
So legacy NAN command QCA_NL80211_VENDOR_SUBCMD_NAN is not allowed
on DBS platforms, as the command is sent to firmware without
enabling DBS.
Event part of QCA_NL80211_VENDOR_SUBCMD_NAN is still intact as it
carries NAN events from firmware to userspace.
Change-Id: Ie1aaf9f7ea051009125c972de4f0de13942448fb
CRs-Fixed: 2699605
Kernel 5.4 has applied batched GRO_NORMAL packets processing
for all napi_gro_receive() users. this requires NAPI users to
call napi_complete_done() or napi_complete() at the end of every
polling to flush batched GRO_NORMAL packets.
However, by current wlan driver design, napi_gro_recevie()
is not happened in same NAPI polling context and done in another
thread context, it likely packets which have not been flushed from
napi->rx_list will get stall until next RX cycle.
Fix this by adding a manual flushing of the list right after
napi_gro_flush() call to mimic napi_complete() logics.
Change-Id: Id8c1b9360c380c9631c85f5e048ae2cd2798f65b
CRs-Fixed: 2673959
In FTM mode, we are not voting for any DDR frequency,
which leads to uneven TX/RX duty cycle, since the DDR
frequency will entirely depends on any other subsytem's
vote.
Vote for VERY HIGH BW in FTM mode.
Change-Id: I7f85fb9889d9119c7224c9bcd9688327e78f15ff
CRs-Fixed: 2706143
adapter->vdev should never be referenced directly, and instead
must be accessed only via hdd_objmgr_get_vdev() and
hdd_objmgr_put_vdev() so that proper reference counting is
enforced.
Change-Id: Ib3efc05426105494f13ada7efed6175f88c5d141
CRs-Fixed: 2708758
For adrastea targets, enhanced CFR is not supported. When only
CONFIG_WLAN_CFR_ENABLE is set, some compilation errors are
observed as CONFIG_WLAN_ENH_CFR_ENABLE is not set true.
Fix these compilation errors when only CONFIG_WLAN_CFR_ENABLE
is set for targets which do not support enhanced CFR.
Change-Id: Ifafa3880757c5595e1cb2da45aae1c87d50a7aae
CRs-Fixed: 2706901
Currently in the ref_count mechanism used for sta_info, the driver has
no checks to determine if there are any faulty ref counting instances.
In case multiple ref_put are done for a single take_ref, it can lead to
a memory corruption.
Add a sanity check in hdd_sta_info_put_ref that causes a device assert
in case the put_ref is called on a sta_info with already zero ref_count.
Change-Id: I0b502e1df4c37601b46cc727acc94a72a401e051
CRs-Fixed: 2707614
The wlan_mem_stats node will print the DMA, SKB and heap
memory allocated in the wlan host driver. This is applicable
to perf and defconfig builds.
File path to new node is:
/sys/kernel/wifi/wlan/wlan_mem_stats
Change-Id: Ic05423d362de1ef07a3ecbdd6408a7226e2a3c2f
CRs-Fixed: 2680360
System suspend is occurring a few seconds before idle shutdown while
it was set to deinit state. Add a wakelock and prevent suspend during
idle shutdown.
Change-Id: I976bdece04857045e272c5c3e26db51fb63c51cf
CRs-Fixed: 2706275
Currently, NAN discovery interface(wifi-aware0) is created if both
host and firmware support NAN separate vdev feature. But NAN
feature capability(gEnableNanSupport) is the master of these
capabilities. Don't create wifi-aware0 if gEnableNanSupport is
disabled.
Also, don't allow NAN iface creation for the kernels less
than 4.14 as NAN interface is allowed by kernel only from 4.14.
Change-Id: Iaf10974c373b2a77d2c24a78540910f78a3dc768
CRs-Fixed: 2706997
Add driver command support to dump all the function call
mapping which is cached in global buffer.
Change-Id: I03b2162ccda171005e6fa8a7bb09cbf9c4819421
CRs-Fixed: 2677976
Add connect id in the policy manager for the newly designed
connection manager infrastructure.
Change-Id: Ib7bd08e5326ead04da88175636777bf5dd4e255b
CRs-FIxed: 2705700
Check if the soc pointer is not NULL, before we
try to derefernce this pointer.
Change-Id: Ife499e7617365278c4ac8fd41e2ce32d4e19fae9
CRs-Fixed: 2702127
Currently there is no dealloc api for ll_stats request to free
the memory allocated for the ll_stats request's priv structure
because of which memory is not freed from the request manager
infrastructure, instead host frees the memory in request api. with
this mechanism there is a race condition where if timeout occurs then
in the caller api memory is freed for the response list and after
processing the response list if the response callback comes then
memory is allocated and inserted in the response list which will
never be freed as the response list is already processed in the
caller api after the timeout.
Add a dealloc function for ll_stats request to free the memory with
The help of request manager infrastructure.
Change-Id: If91d777901d0c4c598a138b1439de7de024249a4
CRs-Fixed: 2703825
SAP tx timeout indication is received when wlan is suspended
causing excessive logging to console and eventually WD
timeout.
Ignore SAP tx timeout indication when wlan is suspended.
Change-Id: Ie09ac187e6d38c12c6c33a8b4ada19c9aabc45f9
CRs-Fixed: 2705201
hdd_convert_timeout_reason is also used in hdd_connect_done.
Define hdd_convert_timeout_reason when it is used.
Change-Id: Ifa03959969474d9cafb1315d53b83cae21745280
CRs-Fixed: 2703672
When gTcpAdvWinScaleEnable is enabled, tcp_adv_win_scale value
changes according to tput threshold. When wifi is disconnected,
tcp_adv_win_scale value is not reset to default value.
Reset the TCP advance window scale value to default when
bus bw timer stops.
Change-Id: I9b0ae2e8db11a626b3bdc4afc6e051af8943baab
CRs-Fixed: 2696481
Update the HDD callback to check for phymode change or
channel change when country code updates and stop/restart
the adapter accordingly. Include cases for STA mode,
SAP mode, P2P-CLI mode, and P2P-GO mode.
Add conditional compilation flag for MCC specific API in
qcacmn.
Change-Id: I88edb401146e3cef48d757393f89fa48cb6ac895
CRs-fixed: 2658294
Check phymode to verify it is allowed for the current country
before starting SAP or connecting STA.
Change-Id: Ica5e70bbd421c4dc18a34545f63e436bc482fc46
CRs-fixed: 2658294
Currently the driver is not synchronized properly between SSR and wifi
ON/OFF. This causes a potential deadlock resulting in a DSC timeout.
To synchronize, add a wait in wlan_hdd_state_ctrl_param_write
which is called during WiFi ON/OFF. This wait will ensure that the
driver recovery is complete before proceeding with ON/OFF.
Change-Id: Ia1c4f8d7076d77c591276ee380b55a747cf606bd
CRs-Fixed: 2701513
BTC mode should be set according to BTC chain mode, which can be
updated dynamically during runtime.
Change-Id: Ifc95d3340ab19e217bd55a0ca5ce69988650f9e0
CRs-Fixed: 2666550
Hardware filters are supported for STA and P2P client modes.
But it's configured for NDI mode also currently. Don't configure
hw filters for NDI mode as it's not supported.
Change-Id: Ifc8f213a6279c8eb0ddde60c4f9b3538bc841ffc
CRs-Fixed: 2688396
The current policy table for OFFLOADED_PACKETS is incorrect and does
not match the uptream versions. Hence, rearrange the table contents
with the proper parameters to fix this.
Change-Id: I1e6b0ebc3ef4f622833778e0545d50783d524551
CRs-Fixed: 2701205
Any connection in 11g/a is very latency sensitive and
we need to vote for a higher DDR frequency than in
the other phy modes.
Identify the number of latency sensitive connections
in STA mode and vote for higher DDR frequency for the
latency sensitive cases.
Change-Id: I2ce20b2b40213bde52211eae659c9673c6e0d305
CRs-fixed: 2695045
The hostapd sends the EDCA configuration for tx queue set in the
hostapd.conf config file using nl80211 interface.
Add support to extract the configuratin in the cfg80211 callback
function wlan_hdd_set_txq_params and invoke SME api to send the
parameters to MAC layer.
CRs-Fixed: 2693865
Change-Id: I8acfc03d9a6ad17a1df0c03955cf3b4150a4fbef
The change If6d559a3aa7b8719a515e00e271e313c02f8135f has modified
few attribute types from NLA_UNSPEC to NLA_BINARY. But NLA_BINARY
validates only for max length and doesn't validate min length.
This could cause buffer overread if userspace sends less data as
the driver reads fixed length(e.g. 6 bytes for mac_addr) always.
Use VENDOR_NLA_POLICY_MAC_ADDR(NLA_POLICY_ETH_ADDR) or
NLA_EXACT_LEN instead of NLA_UNSPEC which validates for
exact length.
Change-Id: I92cc29716dff29037d14ffd2e269761149c7f74b
CRs-Fixed: 2700695