Commit Graph

5638 Commits

Author SHA1 Message Date
Vevek Venkatesan
e9fa59de57 qcacld-3.0: cdp: Converge cdp_ctrl_ops
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
2020-01-20 17:50:23 -08:00
Nisha Menon
9db78810c9 qcacld-3.0: Update Wifi netdevs for IPA exception path NAPI
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
2020-01-20 14:01:33 -08:00
Jingxiang Ge
19042f697f qcacld-3.0: Reject Vdev trans when driver in unloading/recovering
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
2020-01-20 12:31:40 -08:00
Alok Kumar
2107a96e37 qcacld-3.0: Add driver support for QCA6750
Add driver support for QCA6750

Change-Id: I9e6716d5ed9f91532aba422c32b46b43760a0e88
CRs-Fixed: 2602141
2020-01-20 01:10:01 -08:00
Naman Padhiar
07f0c719e2 qcacld-3.0: Add PLD layer for iWCN architecture
Add PLD layer and introdue IPCI bus type for iWCN architecture.

Change-Id: Ia0164314c539df84205263de16432eec0eb7fb34
2020-01-17 08:52:59 -08:00
Abhishek Ambure
650f992fd2 qcacld-3.0: Update NDI close indication from ndi del resp handler
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
2020-01-17 06:01:33 -08:00
Manikandan Mohan
18aa38c7be qcacld-3.0: Add support to monitor PM QOS votes
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
2020-01-17 06:01:19 -08:00
Liangwei Dong
e0279e36b0 qcacld-3.0: Handle ACS freq list zero
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
2020-01-16 23:46:19 -08:00
Abhishek Singh
fd74c68c85 qcacld-3.0: remove unused broadcast_sta_id from sta ctx
remove unused broadcast_sta_id from sta ctx.

Change-Id: I71265b214bfb1f0c7952f55527a57bfb02e5ad2d
CRs-Fixed: 2604330
2020-01-16 15:46:58 -08:00
Abhishek Singh
bda14831fa qcacld-3.0: Remove unused code for defer key
As setFTPTKState is never set to true the code for defer
key is not been used

Change-Id: I8afcebf00b00bcf39ba7da999c55e5eacdf26aaa
CRs-Fixed: 2604329
2020-01-16 15:46:48 -08:00
Abhishek Ambure
4706d0fe80 qcacld-3.0: Add INI to disable 6ghz support for oem
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
2020-01-16 00:49:13 -08:00
Alan Chen
e3ef9a9add qcacld-3.0: Change CFG_INI_BOOL to CFG_INI_UINT
Change CFG_INI_BOOL to CFG_INI_UINT for enabling runtime PM.

Change-Id: I8470dcbe0cb6de72aa5cf5edcaea36f6e1276d21
CRs-Fixed: 2603915
2020-01-15 21:30:58 -08:00
Tushnim Bhattacharyya
c682bfb442 qcacld-3.0: Replace channel id with frequency for monitor mode
Replace channel ID with channel frequency in
wlan_hdd_change_hw_mode_for_given_chnl.

Change-Id: If1583dae2f13c5e5553d916befb186de00840345
CRs-Fixed: 2584776
2020-01-15 11:29:48 -08:00
Saket Jha
d5c0e02813 qcacld-3.0: Record Monitor Mode Frequency from Pdev
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
2020-01-15 11:29:35 -08:00
bings
3d9cd95e51 qcacld-3.0: Fix build error when enable 6g in kernel 4.4
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
2020-01-15 04:43:24 -08:00
Alan Chen
9fcd4d39f9 qcacld-3.0: Fix remaining compilation issues regarding WLAN_FEATURE_11W
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
2020-01-15 04:43:08 -08:00
Jingxiang Ge
6064426ef7 qcacld-3.0: Fix sta_info_container freed without init
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
2020-01-14 04:05:47 -08:00
gaurank kathpalia
b3b2194db6 qcacld-3.0: Check for valid BW in monitor mode
Check for invalid BW if received as part of
monitor mode vdev start command and reject if
invalid.

Change-Id: I1dfd7936af354622c52295cfba16941b96dfe649
CRs-Fixed: 2600906
2020-01-14 02:01:30 -08:00
bings
059c4a06c2 qcacld-3.0: Configure TDLS off channel mode when band switches
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
2020-01-10 04:07:57 -08:00
Alok Kumar
a71b36fc0a qcacld-3.0: Register callbacks for packet capture
Add callbacks to register pktcapture Rx Ops and
pktcapture adapter context in pdev for packet capture
mode.

Change-Id: Iefbb24c364dfb460788f7512dee1a6ec4d2b29c1
CRs-Fixed: 2528553
2020-01-10 04:07:42 -08:00
Alok Kumar
5730524bdc qcacld-3.0: Register network interface for pktcapture mode
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
2020-01-10 04:07:28 -08:00
Alok Kumar
f1d581361d qcacld-3.0: Open a mon thread for packet capture mode
Create a mon thread to process the packets for pktcapture
mode only if packet capture mode is enabled.

Change-Id: I64e3687d08acd0d27019ed9e11b5b92b13fcd878
CRs-Fixed: 2528545
2020-01-10 02:46:55 -08:00
Alok Kumar
45b9e9c730 qcacld-3.0: Add CDS API to update parameter for pkt capture mode
Update packet capture mode param in the HDD context
after reading the INI parameter.

Change-Id: I3ea88e376f1ad8ebc96715d08395331470c23d4a
CRs-Fixed: 2528536
2020-01-08 23:38:43 -08:00
Wu Gao
6f585aba54 qcacld-3.0: Don't indicate P2P client deletion event
DUT formed P2P connection with second device and as P2P GO, trigger
assert in target, supplicant get P2P client deletion event, and then
DUT remove P2P GO and change interface type from P2P GO to P2P device
but failed since recovery in progress. This change avoid to indicate
P2P client deletion event to up layer since host will sent P2P GO
stopping event to up layer.

Change-Id: I2221332d062f1e5f74846187ce9b478a11b8eb9f
CRs-Fixed: 2589866
2020-01-08 21:34:57 -08:00
Amruta Kulkarni
e673511908 qcacld-3.0: Change info/err prints to debug in roaming path
In roaming path, while processing roam synch indication info/err
prints at the driver adds up latency to the total roaming
transition time and the KPI for maximum transition time exceeds
the expected 100ms. The printk buffer is protected by a global
raw spinlock for readers and writers. This restricts the contexts that
are allowed to access the buffer. So large latencies exists when
printing to kmsg done with QDF trace levels WARN, INFO, ERROR.

Change the redundant/less significant info, error, warn level
prints in roaming path to debug level.

Change-Id: I8e2a03ddef8f3cd680263939f6e0275b8703e681
CRs-Fixed: 2597624
2020-01-08 20:10:31 -08:00
Bapiraju Alla
80334ca5d6 qcacld-3.0: Validate add del tx pattern configuration
Currently there is no information maintained in the driver regarding the
tx patterns configured, this can result in sending the commands to
firmware without a proper validation i.e. sending the delete pattern
without validating.

To resolve this issue, maintain the add pattern history and validate
whether when the del pattern is issued.

Change-Id: Ie097a36fe46640ddfd539c481491025512571300
CRs-Fixed: 2596705
2020-01-08 15:46:18 -08:00
Yue Ma
cc35052654 qcacld-3.0: Cleanup CRYPTO_SET_KEY_CONVERGED for HDD layer
CRYPTO_SET_KEY_CONVERGED is a temporary flag which is used for
converged crypto component transition. The transition has already
been done, so cleanup legacy code related to the flag in HDD layer
and SAP module.

Change-Id: Ic92e44e53c63ba2752907ace3ffc0f55d18470e2
CRs-fixed: 2593520
2020-01-08 11:30:29 -08:00
Yue Ma
d03d10bcd1 qcacld-3.0: Cleanup WLAN_CONV_CRYPTO_IE_SUPPORT flag
WLAN_CONV_CRYPTO_IE_SUPPORT is a temporary flag which is used for
converged crypto component transition. The transition has already
been done, so cleanup legacy code related to the flag.

Change-Id: Ide9fa97a9eb0b5c197c762205f386651efc51e33
CRs-fixed: 2592096
2020-01-08 11:30:05 -08:00
Alan Chen
8dd79fb92c qcacld-3.0: Release the PDEV ref count by adding a new goto label
The function hdd_rx_mic_error_ind() is not releasing the pdev reference,
causing a pdev object manager leak for the WMI command WLAN_MLME_SB_ID.
To solve this, add a new goto label release_ref_and_return that releases
the pdev ref count before exiting the function.

Change-Id: Ic798cf5064403120058e01099bb846397e887951
CRs-Fixed: 2598665
2020-01-08 07:50:02 -08:00
gaurank kathpalia
570f0aff4f qcacld-3.0: Fix issue for SMM before vdev start on 2.4ghz
Scenario:-
1. Turn on SAP and STA on 2.4ghz and 5ghz
2. Turn off SAP
3. Turn off STA
4. Turn on SAP on 2.4ghz

Issue:-
In the start ap function, the driver calls
the stop opportunistic timer and calls the handler
to goto SMM mode.
After this, the SAP checks whether it requires the
DBS or not and then requests for DBS also, but since
the driver is already in DBS mode this command gets
rejected, so there would be 2 commands in the serialization
queue which would be SMM and start AP, which would lead to
a crash as SMM is sent before a connection on 2.4ghz as
Hastings is not capable to start a vdev in 2.4ghz without
DBS mode.

Fix:-
1.Not allow SMM if the current connection requires DBS
2. Check the HW capabilty in the active command only and
not before that to protect the reliability of hw mode.

Change-Id: I1c0c05ea05ba14d1556af2612daa3de2ffcba367
CRs-Fixed: 2587508
2020-01-08 02:03:40 -08:00
Sandeep Puligilla
511c6e2402 qcacld-3.0: Add ini support to control 6G SAP fils disc
6Ghz SAP needs to send either a probe response or fils
discovery at every 20ms.

Add a new ini to configure the probe response or
fils discovery frame.

enable_6g_sap_fils_discovery=1 sends fils discovery frame
at every 20ms.
enable_6g_sap_fils_discovery=0 sends probe response frame
at every 20ms

Change-Id: I6c5fb339135cf11be071d73970ea3704441380eb
CRs-Fixed: 2586524
2020-01-07 00:41:09 -08:00
Jianmin Zhu
62de00823d qcacld-3.0: Fix assert in sme_store_nss_chains_cfg
Need check whether vdev is NULL when pass to
sme_store_nss_chains_cfg.

Change-Id: I1bfa62c8a898ad28e7771e27583e5775d515924a
CRs-Fixed: 2597475
2020-01-06 10:54:49 -08:00
Yue Ma
cc2e88a2f9 qcacld-3.0: Cleanup WLAN_CONV_CRYPTO_SUPPORTED flag
WLAN_CONV_CRYPTO_SUPPORTED is a temporary flag which is used for
converged crypto component transition. The transition has already
been done, so cleanup legacy code related to the flag.

Change-Id: I6626a7c9d2ab46cf35ed3593b72c074100954ab8
CRs-fixed: 2593529
2020-01-04 02:15:04 -08:00
Will Huang
0e083cb878 qcacld-3.0: Fix runtime error if undefine WLAN_CONV_CRYPTO_SUPPORTED
wlan_set_vdev_crypto_prarams_from_ie() is defined in qcacmn code but
disabled in Kbuild if CONFIG_CRYPTO_COMPONENT=n, it caused runtime
error if run it.

The #ifdef/#else code should live in common code where define
wlan_set_vdev_crypto_prarams_from_ie(), but there is no motivation
from WIN side to add any code which is not converged.
And it is not appropriate to put it into exist head files, so just
define inlined wrapper functions to cover the not defined case.

Change-Id: I11916703fff860025728f904c8d3906eee1d0037
CRs-Fixed: 2592904
2020-01-03 06:25:57 -08:00
Jianmin Zhu
b01384b43d qcacld-3.0: P2P Go failed to switch to 2G band when 5G disabled
If g_enable_go_force_scc isn't enabled, P2P Go failed to switch
to 2G band when 5G disabled.

Fix: Check whether need switch channel for band restriction
first, check go force scc later.

Change-Id: Icf8de51321debea2806585d47d2bd4fc6486075e
CRs-Fixed: 2594279
2020-01-03 01:26:38 -08:00
Yu Ouyang
1d8f5212b6 qcacld-3.0: Fix pdev undeclared issue
In function hdd_ocb_register_sta(), it will call function
cdp_peer_register(soc, (struct cdp_pdev *)pdev, &sta_desc), but pdev
is undeclared.

Change-Id: Ie0341b8ff880c21960a655399378b519fc240631
CRs-Fixed: 2595641
2020-01-02 17:04:10 -08:00
Jinwei Chen
8cfe20d562 qcacld-3.0: use user setting for mpdu_density if target value is 0
Use user setting for HT  mpdu_density if target reported value is
0 which means no restriction.

Change-Id: I4be7d3f4137744e5c9e5bdfc7b50e6c338bd4f79
CRs-Fixed: 2592163
2020-01-02 13:08:42 -08:00
Srinivas Dasari
b020999b07 qcacld-3.0: Remove sta_id check in NDP peer handlers
sta_id is carrying an uninitialized value from the caller
lim_send_sme_ndp_(add/del)_sta_rsp(). So, it's failing the
check for its validity and skipping the first NDP peer creation
/last NDP peer cleanup.
Remove the sta_id check as it's no longer used. So that the NDP
peer creation/cleanup happens properly.

Change-Id: I8daff2bfbc57b7a2fa17a121a5a9dec6975137de
CRs-Fixed: 2594317
2020-01-01 20:04:12 -08:00
Srinivas Dasari
ee454da9db qcacld-3.0: Disable NAN in stop_adapter
Framework might not disable NAN discovery explicitly in some
cases like driver unload. So disable NAN from stop_adapter to
terminate NDPs and NAN discovery properly.
Cleanup the API os_if_process_nan_disable_req() by using the
new API ucfg_disable_nan_discovery().

Change-Id: Ic2c834db44c42a44db902c93f67a887de1b6c2fb
CRs-Fixed: 2594318
2020-01-01 18:24:15 -08:00
Srinivas Dasari
baff7dc092 qcacld-3.0: Create an iface for NAN discovery in driver init
Currently, framework issues NAN commands on station interface.
But when connection happens, framework does interface down and
up on the station interface due to MAC randomization. This
terminates all of the NAN operations.
So NAN discovery needs a separate interface to avoid dependency
on the station interface. Create an interface "wifi-aware0"
of type NL80211_IFTYPE_NAN based on the firmware capability
and register to kernel.
Framework issues "IF UP" on the new NAN discovery interface when
it enables NAN. Driver shall create vdev and send VDEV_CREATE
command to firmware for the same. Framework shall issue all
NAN discovery commands on this new interface. Driver shall use
NAN vdev for these NAN operations.
Framework shall do "IF DOWN" once the NAN operations
are done(Ex: up on NAN disable).

Change-Id: Ifd1e1ab5ed64cd97edb00e793214edd2a2365274
CRs-Fixed: 2592020
2020-01-01 18:23:50 -08:00
Srinivas Dasari
d2ba26192b qcacld-3.0: Register dummy APIs to NAN ops
Kernel needs the below to create NAN interface from driver,
1. Register APIs to the NAN ops. Define dummy APIs as the APIs
   are not supported for the current driver design.
2. Define NAN supported bands and 2GHZ is mandatory.
3. Set the iftype NL80211_IFTYPE_NAN in the supported
   interface_modes.

Change-Id: I22db31840da2ba0e44b79077a8790b55f1151684
CRs-Fixed: 2592022
2020-01-01 18:23:26 -08:00
Jianmin Zhu
6cc8f4ac49 qcacld-3.0: WMI_ROAM_INVOKE_CMDID passed channel id to F/W
Testing HSP roaming by issue DRIVER FASTREASSOC
00:24:01:38:b1:a1 6 to trigger manually roaming,
host gave wrong channel number instead of channel freq in
WMI_ROAM_INVOKE_CMDID.

Change-Id: I50157f2aa3447ee7b57a4ddefabd41db0876a50c
CRs-Fixed: 2592946
2019-12-31 04:04:37 -08:00
Sourav Mohapatra
0dce16d5ed qcacld-3.0: Increase the number of supported interfaces
The max number of VDEV that the FW can support is 4. Due to memory
limitation, the host cannot send more than 4 vdev create to the firmware.
But for certain scenarios such as NAN, where there is a need to create two
extra interfaces apart from wlan0, wlan1 and p2p0 (e.g. aware_dataN
interfaces), there needs to be 5 vdevs created in the host.

To support 5 vdevs in host and in the same time only send 4 vdev
create to the firmware, allow an extra 5th interface to be created.
But do not allow all the 5 vdevs to be "up" simultaneously
(existing check in objmgr).

Change-Id: I5b677ae21043f7ee54194541576aa5125719d9b6
CRs-Fixed: 2472869
2019-12-30 12:12:09 -08:00
Yu Ouyang
e2ed521f0c qcacld-3.0: Fix DSRC compile error
DSRC feature is enabled by SDIO card profile. But when debug SDIO
interface feautre, there are many DSRC module compile issue.

Change-Id: I4429f2a6e68b67140a72ad9634031f459ccda397
CRs-Fixed: 2590115
2019-12-30 04:08:17 -08:00
gaurank kathpalia
d5be743510 qcacld-3.0: Reject monitor mode command if invalid BW
Reject moniotr mode request if the BW given in the
start monitor command does not match with the
FW capability.

Change-Id: Ic1e2f4bcb811ec56526ae179407db197af591c9c
CRs-Fixed: 2590873
2019-12-29 21:05:18 -08:00
Liangwei Dong
0527617342 qcacld-3.0: STA+SAP 6Ghz concurrency
When SAP is on 5G and STA connects to 6Ghz AP, the "force
SCC" logic will move SAP to STA home channel if SAP is 6Ghz capable.
If SAP is not 6Ghz capable, SAP will be moved to 2G (DBS) to
avoid MCC(5G+6G) for DBS HW and SAP will stay on 5G for non-DBS HW.
SAP is 6Ghz capable only when all of below statements are true:
a. SAP config includes WPA3 security - SAE,OWE,SuiteB.
b. SAP is configured by ACS range which includes any 6G channel or
   configured by 6G Fixed channel.
c. SAP has no legacy clients (client doesn't support 6G band).
   legacy client (non 6ghz capable): association request frame has no
   6G band global operating Class.

Change-Id: I7e9723fd1b679326a3df61932850589e6e503f3d
CRs-Fixed: 2593569
2019-12-27 11:22:38 -08:00
Ashish Kumar Dhanotiya
87baef651f qcacld-3.0: Validate assoc response IE len before copy
When host sends assoc response to supplicant, it
allocates a buffer of fixed size and copies a variable
length of assoc response IEs to this fixed sized buffer.
There is a possibility of OOB write to the allocated buffer
if the assoc response IEs length is greater than the
allocated buffer size.

To avoid above issue validate the assoc response IEs length
with the allocated buffer size before data copy to the buffer.

Change-ID: Ib12385e9ff04e5172ae8b505faf959e426fda439
CRs-Fixed: 2583124
2019-12-27 09:22:49 -08:00
Paul Zhang
2236ab76df qcacld-3.0: use debugfs to show ini configs
Create the debugfs interface to show the ini configs.
Usage: cat /sys/kernel/debug/wlan/ini_config

Change-Id: I2c6aeeaae6d79739bb8ab82740e8be678c18fd89
CRs-Fixed: 2572142
2019-12-27 05:17:55 -08:00
Vevek Venkatesan
07bddb2034 qcacld-3.0: cdp: Converge ol_txrx_ops
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
2019-12-27 03:24:24 -08:00
Vevek Venkatesan
0ac759fc1c qcacld-3.0: cdp: Converge cdp_cmn_ops
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.

- txrx_data_tx_cb_set
- txrx_mgmt_tx_cb_set
- txrx_mgmt_send_ext
- txrx_pdev_attach_target
- txrx_pdev_detach
- txrx_vdev_attach
- txrx_vdev_register
- txrx_vdev_detach
- txrx_peer_create
- txrx_peer_delete
- txrx_peer_delete_sync
- txrx_fw_stats_get
- txrx_get_vdev_from_vdev_id
- txrx_pdev_set_ctrl_pdev
- txrx_pdev_attach
- txrx_get_vdev_mac_addr
- txrx_pdev_post_attach
- txrx_pdev_pre_detach
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: Ib8b0b1edd63e7c3f8813b11ca26b50ec121fe255
CRs-Fixed: 2541459
2019-12-27 03:24:09 -08:00