Function wireless_send_event() is only present in the kernel when
wireless extensions are enabled. In order to allow the driver to build
when wireless extensions are disabled, put a wrapper around that
function.
Note that this is only a partial solution to the problem since this
means that when wireless extensions are disabled that the event will
not be sent to userspace. A subsequent effort will need to evaluate
each event to see if a cfg80211-based notification mechanism is
already in place, and if not, if one needs to be added in order to
maintain the underlying functionality.
Change-Id: Icbdddf6735bdc5ffd1ee189b5fabfa67fcce59ea
CRs-Fixed: 2621699
Currently there is logic to set the net device wireless_handlers
pointer to NULL in both hdd_deinit_station_mode() and
hdd_deinit_ap_mode(). This is unnecessary duplication of code, and
worse, this is WEXT-specific logic that exists outside the
WEXT-specific source files. In order to address these issues refactor
the logic into a new function that is exposed by wlan_hdd_wext.h.
Change-Id: I0fab5a7f35941f282ddf2e286fb12bfb8c4c7c50
CRs-Fixed: 2620818
Extend ini value to disconnect from current AP
if roam failure happens after the NUD failure.
Change-Id: Id764c97b5c1748b1d513d85d4063868a1c77141b
CRs-Fixed: 2622087
Currently, host driver sends disconnect reason code as UNSPECIFIED
to kernel in most of the disconnection scenarios. Correct the same
to send proper reason code received from peer in case of peer
initiated disconnections.
Introduce new reason codes for internal disconnections and assign
proper reason code for each possible disconnect scenario.
Change-Id: I99bf4573b59dc810e0a1529fcd48061d10acae4e
CRs-Fixed: 2622310
Update default value of dp_proto_event_bitmap to track all
the supported protocol pkt types.
Change-Id: Ib6355f43fa667f80b31418320f3bdb2373fdf9e1
CRs-Fixed: 2618474
Add support SAR request-response event. When
sar_unsolicited_timer expires driver sends
QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS_EVENT event to
user space and expects user space to set sar power limits
with the vendor command
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS.
Add a request-response event to wait for
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS vendor command from
user space. If driver does not get
QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS command from user space
for a specified number times, driver configures the sar safety
index to the FW.
Change-Id: Ic2b9e0b7fe06093ce849fb46df7bfce5da409ef6
CRs-Fixed: 2615519
Add SAR unsolicited timer to the driver. This timer starts
on every data tx (if not already running) and stops on
command QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS.
If this timer expires, a vendor event
QCA_NL80211_VENDOR_SUBCMD_GET_SAR_LIMITS_EVENT is sent to the
user space to issue the QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS
command.
Change-Id: Ic30e5ac606d2b6b0cbc9209174adcd5213eac08e
CRs-Fixed: 2615510
Add SAR safety timer to the driver. This timer starts
when first QCA_NL80211_VENDOR_SUBCMD_SET_SAR_LIMITS
vendor command is recived. This timer gets
reset on every sar set vendor command.
When this timer expires, configure sar safety index to
the FW and restart the timer.
Change-Id: I0536ab88baf962e1bc2aef39478380534e0e1401
CRs-Fixed: 2615442
As part of new requirement add ini configurations
gSarsafetyTimeout, gSarSafetyUnsolicitedTimeout,
gSarSafetyReqResTimeout, gSarSafetyReqResRetry,
gSarSafetyIndex, gSarSafetySleepIndex,
gEnableSarSafety, gConfigSarSafetySleepIndex.
Change-Id: I18df23896b52aa1bbf8e071e27703d4e9e1738f1
CRs-Fixed: 2612843
Add support to customize DSCP-to-UP map table and send the
customized map values to FW to update its corresponding
map table.
Change-Id: Ibe9704a90468c898dd2e60fdf83a271152f654ce
CRs-Fixed: 2616247
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
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
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
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
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
For packet capture mode, register an interface through
hdd_add_virtual_intf and delete using hdd_del_virtual_intf.
During register, remove the P2P interface and add it back
during deregister.
Change-Id: I79d933c96591cd462e27eda73f5aed2cc7cad8af
CRs-Fixed: 2528549
Create a mon thread to process the packets for pktcapture
mode only if packet capture mode is enabled.
Change-Id: I64e3687d08acd0d27019ed9e11b5b92b13fcd878
CRs-Fixed: 2528545
Update packet capture mode param in the HDD context
after reading the INI parameter.
Change-Id: I3ea88e376f1ad8ebc96715d08395331470c23d4a
CRs-Fixed: 2528536
Create the debugfs interface to show the ini configs.
Usage: cat /sys/kernel/debug/wlan/ini_config
Change-Id: I2c6aeeaae6d79739bb8ab82740e8be678c18fd89
CRs-Fixed: 2572142
Currently txrx_ops.tx.tx is given vdev handle
as its argument, which is directly accessed
by the caller. This can cause a race-condition
in access of the respective handle if it has
been deleted in parallel.
Hence as a part of cdp convergence, pass only
the vdev_id, which will be used to get the
respective handle and hence avoiding unwanted
access of the handle if it has been deleted.
Change-Id: Ie158a2ba805f52658cd6fb12c969fc0d677c1815
CRs-Fixed: 2541631
This change addresses 2 issues:
1. Currently the ini for SAR version specify the SAR
version. If value of the ini is 1 it specifies the SAR
version 1 and if value of ini is 2 it specifies SAR
version 2 and driver converts SAR version 1 (SARV1)
command to SAR version 2 (SARV2) command based on FW
capability.
2. If the value of the ini is SARV1 and FW expects
SARV2 command, currently driver is sending SARV1
command to FW which results in undefined behavior
at FW.
Since the use of this ini is to convert the SARV1 command
to SARV2 command, change this ini from int type to bool
type to just specify if the conversion is enabled or not
to avoid any kind of confusion.
If the ini is SARV1 and FW expects SARV2 command, reject
the user space command to set SAR power limits.
Change-Id: Ie8e3790bd8737fcb251a0481e2e6001a26295773
CRs-Fixed: 2581034
Currently, enable_snr_monitoring doesn't be initialized properly, in
some acs scenario, hostapd will dump survey(NL80211_CMD_GET_SURVEY),
driver return error due to uninitialized enable_snr_monitoring, this
will result in acs won't be started and sap fail to start.
Fix is to remove enable_snr_monitoring from hdd_config struct,
calling ucfg_scan_is_snr_monitor_enabled() everywhere that
enable_snr_monitoring is being used.
Change-Id: I8784867683b21d9441e980a1215b2db712db381a
CRs-Fixed: 2585661
Currently use of comamnd QCA_NL80211_VENDOR_SUBCMD_OEM_DATA
is to pass data blobs from Application to FW but there is
no mechanism to send the data blobs from FW to Application.
To meet the above requirement update the usage of existing
OEM DATA command to use it as a vendor event as well to
send data blob from host to Application.
Change-Id: I502312f25d2754984b86e1cc4e011800a5d4b58a
CRs-Fixed: 2573464
Whenever there is a process waiting on a response from firmware it has the
option of using either a qdf_event or a linux completion event.
The primary difference between these is that if there is an SSR all
qdf_events are immediately completed whereas Linux completion events are
only completed by the normal flow of code.
With new upcoming changes SSR processing will take the normal path for
releasing all of its resources, and the qdf_session_close_event is used for
synchronization.
If we define this as a qdf_event, it will be completed when the SSR begins,
defeating its purpose.
Therefore change this to be a Linux completion event.
Change-Id: Ia6fe504e2a2d01f12c3d3446fffc2fc397566966
CRs-Fixed: 2586190
Due to upgrade to kernel 5.4, struct pm_qos_request fields have changed,
causing compilation issues. Featurizing PM QoS so it is only enabled
for 4.19 kernel.
Change-Id: Ide2a3eb4b2bc970c6469efe8621bec55e50ecbd8
CRs-Fixed: 2580165
In SME layer, boundary check for dscp_to_up_map array is not present.
The dscpmapping is an array of 0x40 elements. Values in dscp_exceptions
are used to index dscpmapping. The indices are not validated to be less
than 0x40. The dscp_exceptions array is received from association
response frame. A malicious AP can send values up to 0xff, causing OOB
write of dscpmapping array.
Hence, max index check is added to avoid OOB write of dscpmapping array.
Change-Id: I73526849677e867673fc0bd0024ed2b003e4f89e
CRs-Fixed: 2569764
Fill HE capability and supported chan width in 6ghz
and remove VHT and HT support from the 6ghz channels
in wiphy structure.
Change-Id: Ibb1fbeca9bb7dc20b8545bc9f2b470cd7bef9fb2
CRs-Fixed: 2575744
Cleanup peer id from the callers of cdp APIs from
where the peer ID was passed, and use mac address
instead to identify the STA.
Change-Id: Ie6dcae77e959439a71c11b1a2fa0daddcaa6e719
CRs-Fixed: 2529822
During uplink traffic, affine RX thread to big cluster if
throughput is high and rx_packet counts above threshold.
Change-Id: I34034e79ee07c229966a279919acc11d1942b890
CRs-Fixed: 2557745
Based on the ini gfine_time_meas_cap, send enable/disable value to the
firmware for STA INITIATOR/RESPONDER mode using VDEV set param.
Change-Id: Idd4142e13061cd1af992bda88d0a0b81edc42fef
CRs-Fixed: 2574050
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.
Change-Id: Ib00135ca59b4c5f0f05edc93dca115bf17174a36
CRs-Fixed: 2561671
Define debugfs node in driver to
export MIB counters to user app.
Define macro WLAN_FEATURE_MIB_STATS for this
feature that gets MIB statistics from fw.
Change-Id: Icae8826309094d17e8f6d4503f617a3a7116d3c9
CRs-Fixed: 2548241
In the 5.4 Linux kernel, the ndo_select_queue function signature has
changed. Add support for it under the kernel version compilation flag.
Change-Id: I7298f27ada14c0d96c19f5168a20971ad760fd77
CRs-Fixed: 2558984
When the chip is power save mode it misses the gpio strobe
from the host platform. The TSF is not latched is not latched
in this case. As a result the reported TSF in the
WMI_VDEV_TSF_REPORT_EVENTID is not correct.
Fix this by adding a retry mechnism when the reported TSF is not proper.
Change-Id: Ica2d5c796e9d021b65e898ee3defe88d62183911
The ANI level determines how well the device is coping with interference
in the wireless environment. Add support in the driver to query the ANI
level from the firmware and populate it for userspace entities to use.
Change-Id: I54934f670aa11737e11eca4d64e12f9dffb4f430
CRs-Fixed: 2554674
Enable Force wake feature through Kbuild
to access address range greater than BAR+4K
at runtime.
Change-Id: Ibe3c3b9b765c256493b1d5f9258e462760d45dc6
CRs-Fixed: 2557978
Since it will takes long time to register spectral to Direct Buffer RX
component, and it will affect wmi ready event handling in pdev open.
So register spectral to dbr after wmi ready event handled.
Change-Id: I51844a708ed69144618e5b0846747601d4d96a9d
CRs-Fixed: 2560822
Currently in SAP+SAP scenario the second ACS request
is moved to pending and is completed when the first
ACS is completed, but since FW serializes the scan
so the reuest for second ACS if not kept in pending
and sent down to FW would automatically be serialized
which would reduce latency in second SAP bringup.
Remove the pending work logic and implementation
to improve latency in second ACS scan.
Change-Id: I439398b406e9371a8e443f5409bd3f25b3062501
CRs-Fixed: 2570259
Currently, userspace is expecting SNR value through
NL80211_STA_INFO_SIGNAL for a disconnected client of SAP. But
the driver sends RSSI value by doing noise floor to the SNR value
received from firmware. Convert this back to SNR and provide to
userspace as per the definition of NL80211_STA_INFO_SIGNAL
and to be in sync with the existing implementation of userspace.
Change-Id: Ia360424a9d44e48fae5a85cf0d2c577e92cd93be
CRs-Fixed: 2552542
hdd_txrx_hist doesn't init when insmod in con_mode 5,
after change back to mission mode, it will cause null
memory access in hdd_bus_bw_work_handler.
test step:
1 insmod wlan.ko con_mode=5
2 echo "0" > con_mode
3 connect with AP
4 issue happens
Move wlan_hdd_init_tx_rx_histogram to start module.
Change-Id: I01b94b9461a87c29cc03b7e3c841bbda6e565188
CRs-Fixed: 2567165
Currently regulatory comnfigs are getting updated from wiphy
init inside regulatory init api which is too late in the driver
init sequence. There are some apis in driver init sequence which
uses these ini configs before wiphy init, one such example
is scm_11d_cc_db_init. since the ini configs are not populated
this may lead to undefined behaviour.
To resolve above issue, populate ini configs at the same place
where all other components inis are getting populated.
Change-Id: I9cb2f069fba3eb76a2c8f7285b6d371cf5fa8de4
CRs-Fixed: 2570148