Commit Graph

1202 Commits

Author SHA1 Message Date
Vulupala Shashank Reddy
87881bd647 qcacld-3.0: Update frequency for Data packets for packet capture
Update frequency in pdev for data packets for packet capture mode

Change-Id: I4d766cc6dca90529f00e90fb1c197ead208b1174
CRs-Fixed: 2643541
2020-04-04 07:42:22 -07:00
Dundi Raviteja
49dcd5d662 qcacld-3.0: Skip QOS NULL frames from monitor interface
Skip QOS NULL frames from monitor interface in
packet capture mode.

Change-Id: I132df424c6537fa0cc6f0621affae54e22a7d531
CRs-Fixed: 2644167
2020-04-03 20:57:21 -07:00
bings
46d6db59ec qcacld-3.0: Configure chan time quota basing on Miracast on/off
If Miracast is on, driver should send WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID
to FW. Currently this wmi is blocked because gEnableMCCAdaptiveScheduler is
set as 1, which is incorrect.

Add a new dynamic_mcc_adaptive_sched flag to allow wmi command
WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID for Miracast case.

Change-Id: I18e713b75a8cafc1b631bf5a1884a9b0123e5dba
CRs-Fixed: 2652271
2020-04-03 16:07:50 -07:00
Vulupala Shashank Reddy
d6e11c6f0f qcacld-3.0: Fix minimum candidate roam score delta value
Change candidate minimum roam score delta value "min_roam_score_delta"
to zero.

Change-Id: Icfb98db30c2333ade40127a7df94e9a0973e4f67
CRs-Fixed: 2655873
2020-04-03 14:19:42 -07:00
Bapiraju Alla
5e23b7cfd7 qcacld-3.0: Add param for OCL mode configuration
Currently there is no provision to configure OCL mode in FW during
driver bootup.

To enable this configuration add a new INI configuration parameter
gOclCfg.

Change-Id: I87c9131f5395c394f745e0170f0d9b3d1571d030
CRs-Fixed: 2644312
2020-04-02 00:11:32 -07:00
gaurank kathpalia
82511bc630 qcacld-3.0: Add support for STA+NAN+NDI+NDI
Add support for four port concurrency for
STA+NAN discovery + NDI + NDI.

Change-Id: I7d6d3f482a61bef7f3d0a31eee3fdfe5e5e9d879
CRs-Fixed: 2633982
2020-04-01 10:46:22 -07:00
gaurank kathpalia
82f3c99fc5 qcacld-3.0: Flush the blacklist BSSIDs in FW
Currently the expectation from the BLM is to flush
all the BSSIDs which are present in the blacklist
when the user does an explicit on-off, which is
meeting the expectation, but the FW does not flush
this info which leads to async between the two.

Fix is to send 0 blacklist BSSID to FW during
Wifi-off so that it also flushes the list.

Change-Id: I7a0629fefb12deaeec0b5eeea06169272621bf82
CRs-Fixed: 2647018
2020-04-01 05:56:59 -07:00
Bapiraju Alla
08410b2625 qcacld-3.0: Fix return type for scheduler_msg callbacks
This fixes a CFI failure in callback assignment

Change-Id: I01fbd8cb65f8e33a66065d29d1aab983647a40ac
CRs-Fixed: 2651013
2020-03-31 09:58:13 -07:00
gaurank kathpalia
fd254c58e8 qcacld-3.0: Correct condition for DBS required
In the API policy_mgr_checkn_update_hw_mode_single_mac_mode
the driver checks that if the bands are different, then go
for DBS and single mac mode is not required.
In the case of STA on 5ghz and SAP now coming up on 6ghz
the bands would be different but the hw mode needed
would be single MAC mode and not DBS, but according to the
check mentioned above the driver would still return and
the final hw mode would be stuck into DBS which would
lead to unnecessary power consumption because of the second
MAC being still swithched on having no vdev attached to it.

Fix is to check whether DBS is required and avoid the condition
mentioned above.

Change-Id: I91d91894dde1a3b84c22f9de59c83a5f0b727315
CRs-Fixed: 2651178
2020-03-31 00:43:10 -07:00
Chaoli Zhou
fdb7949d27 qcacld-3.0: Update policy manage table for GO+SAP+SAP case
Table pm_next_action_three_connection_dbs_2x2_table currently
doesn't support NeGo/Auto 5G + SAP 5G + SAP 2.4G case, which
cause the third connection for 2.4G SAP start failure, so update
the policy manage table to support it.

Change-Id: I4bed516f2ac31387d94c1753a7d539cc07d9814e
2020-03-30 15:28:43 -07:00
gaurank kathpalia
ec1bd31ce7 qcacld-3.0: BIGTK feature support
BIGTK feature support

Change-Id: Ide9b0db436e43152a4180a460f21a7340b443756
CRs-Fixed: 2648269
2020-03-30 13:38:54 -07:00
sheenam monga
bf390c6c5c qcacld-3.0: Register RVS action frames for wake up
Currently the bitmap of action frames that can wake up the host
is sent via the wmi command WMI_WOW_SET_ACTION_WAKE_UP_CMDID.
This bitmap doesn't include RVS action frames so currently the
host doesn't wake up for rvs action frames.

Enable wake up for rvs action frames during runtime.

Change-Id: I9fac8e74cdb7b529f858f7f2027906ca2b3083b3
CRs-Fixed: 2649927
2020-03-30 04:25:36 -07:00
Srinivas Dasari
491ae1e5f7 qcacld-3.0: Unblock wait for NDP_END indcation if req is a failure
When host driver sends NDP_END request to firmware, driver starts
a wait-for-complete and waits for the NDP_END confirm event.
It unblocks the wait upon getting successful NDP_END event from
firmware. But firmware sends response with a failure status if
the NDP is already gone and it doesn't send NDP_END event.
NDP_END requester waits till the timeout(2 seconds) happens for the
NDP_END confirm event from firmware in this case. Unblock the
wait-for-complete in this case also to avoid the unnecessary wait.

Change-Id: I779248455b07cd934ceaf2c23e79f3943aff5e41
CRs-Fixed: 2651663
2020-03-29 17:38:13 -07:00
Gururaj Pandurangi
71a63998bf qcacld-3.0: Cleanup instances of CFG_MAX_TX_POWER
Remove max_tx_power from wlan_mlme_power struct
and ini_tx_power from lim_max_tx_pwr_attr struct
and all their instances.

Change-Id: I982a15b71b64d368b623128e04f09a8f3bf4f5ec
CRs-Fixed: 2645922
2020-03-27 21:09:00 -07:00
Sourav Mohapatra
9eb8bc01a0 qcacld-3.0: Modify cds_trigger_recovery as per modified QDF framework
The QDF framework for triggering self recovery is undergoing changes to
include support for multiple psoc driver. As the MCL host is still
multiple psoc agnostic, create dummy wrappers over the
cds_trigger_recovery so as to maintain compatibility with modified
qdf_trigger_self_recovery

Change-Id: I42163879c3e786a2b9ab2f9f5785be5531754e77
CRs-Fixed: 2617709
2020-03-27 10:17:47 -07:00
bings
9e2de44e7f qcacld-3.0: Init channel avoidance in policy manager
Currenly only hdd initializes channel avoidance from platform.
Policy manager should also initialize channel avoidance from platform.

Change-Id: Iefcaae5ff4789d7d334ab2cab693f5dedfd2ca46
CRs-Fixed: 2645512
2020-03-27 02:51:26 -07:00
Pragaspathi Thilagaraj
4281eb0f89 qcacld-3.0: Increase roam failure reason buffer size
Increase the roam failure reason string buffer size to
60 from 50.
Also add reason string for roam failure reason.

Change-Id: I42f4332463e4063aa0dee39631ca31965db12b62
CRs-Fixed: 2647260
2020-03-26 18:26:02 -07:00
sheenam monga
7475e4b3d7 qcacld-3.0: Add ini support to send ap tx power scoring
Introduce an INI "ap_tx_pwr_scoring" to indicate firmware about ap tx
power weightage so that firmware can use ap tx power weightage to
calculate candidate AP's score.

Change-Id: I8831c571162f044f4ae204ef0edfc59942f36837
CRs-Fixed: 2647115
2020-03-26 07:11:59 -07:00
Qun Zhang
3a8d34c8cb qcacld-3.0: Make sure NULL pm_ctx pointer not be accessed before initialization
Make sure NULL pm_ctx pointer not be accessed before initialization.
Before initialization, __policy_mgr_check_sta_ap_concurrent_ch_intf
return directly when meet error condition.

Change-Id: I4a96ca7c18d7c524969b8ea95d3bc717cfb0862c
CRs-Fixed: 2642567
2020-03-26 02:00:29 -07:00
Qun Zhang
4229b0ba4f qcacld-3.0: Add pointer str1 NULL check before use
Add pointer str1 NULL check before use in mlme_acs_parse_weight_list()
in case user side has wrong configuration.

Change-Id: I7a1552e417a7571d138a2c1c526aa2f9d0015529
CRs-Fixed: 2642567
2020-03-26 02:00:20 -07:00
Qun Zhang
7ed7929ac0 qcacld-3.0: Make sure pointer wasn't dereferenced after being freed
Make sure pointer wasn't dereferenced after being freed, so when
fwol_obj is freed, the function should return directly.

Change-Id: I69c23d2366b2ea0ff1caca9798bdc22063221a9c
CRs-Fixed: 2642567
2020-03-26 02:00:00 -07:00
Amruta Kulkarni
5da0deb270 qcacld-3.0: Add wrapper for blm_get_rssi_blacklist_threshold()
If FEATURE_BLACKLIST_MGR is enabled,
wlan_blm_get_rssi_blacklist_threshold()
would return CFG_BLACKLIST_RSSI_THRESHOLD value
else return value 0.

Change-Id: I0cf5a6561cc217412e3bc6e2a50b85985d1315d7
CRs-Fixed: 2648761
2020-03-25 07:08:45 -07:00
Qun Zhang
b4e2c33bab qcacld-3.0: Replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
Currently QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST aren't aligned with
NUM_CHANNELS, these unalignment may cause some potential OOB access.
So replace QDF_MAX_NUM_CHAN/POLICY_MGR_MAX_CHANNEL_LIST with NUM_CHANNELS
to keep unified.

Change-Id: Ib6c81a3979f2fd29ba1ec678f018a6704b599385
CRs-Fixed: 2644066
2020-03-25 07:08:36 -07:00
Sourav Mohapatra
698d9392c3 qcacld-3.0: Add Q-Q feature 4K QAM (MCS12/MCS13) support
Add host driver support for MCS 12/13, a Q-Q PHY feature.
The following changes are being introduced as a part of this
 - Advertisement of the MCS 12/13 using the QCN IE
 - Interaction between the Host and the FW regarding the target and
   peer capabilities for the new features introduced.
 - The new data structures and variables to populate and use the feature
   capability
 - Routines to add and parse the IE.

Change-Id: I2b91a271d30b1230ef7bb14ee08d0b9da2706db4
CRs-Fixed: 2610277
2020-03-24 10:23:48 -07:00
Abhishek Ambure
2a5240c50c qcacld-3.0: Change INI "sta_disble_roam" type to UINT
As each bit of INI "sta_disable_roam" represents an interface on which
if the connection is present, disable station roaming.

Hence to use all the bits of "sta_disable_roam" INI, change type to
UINT.

Change-Id: Ife4bb31acf89ddbe744bdad376a8a6f5a733b92c
CRs-Fixed: 2647036
2020-03-23 19:56:32 -07:00
Abhinav Kumar
504fb78c41 qcacld-3.0: Clear sae_single_pmk info while processing del pmk
In wlan_mlme_clear_sae_single_pmk_info, driver clears sae_single_pmk
locally while processing del/flush pmk command from supplicant.

Driver should clear entry for sae_single_pmk mlme priv objects.

Fix is to clear entry for sae_single_pmk in mlme priv objects.

Change-Id: Iee71a1a86e293a1028e9b4003d5a48c72d19a8f4
CRs-Fixed: 2636662
2020-03-23 16:06:34 -07:00
Jianmin Zhu
d682eb4e28 qcacld-3.0: Compare mac id for ap-sta force scc
Consider SBS mode and 6GHZ, can't force scc only by band.
for example: 1 port on 5G, another on 6G,  they may be on same
MAC, may be not. Just compare mac id from connection list
directly.

Change-Id: I5bfc9cd14b058a6a4f402c0e2d2f9ae7da8287fb
CRs-Fixed: 2646499
2020-03-23 00:23:56 -07:00
bings
6d1783211f qcacld-3.0: Do not set hw mode if it is not needed for DBS1 and DBS2
policy_mgr_pdev_set_hw_mode returns failure if there is interface doing
CAC, which causes other interfaces start failure.
Check mode action are needed or not can help reduce interface starting
failure.

Change-Id: I165f9287d0a674d907712817a7363a77504c245f
CRs-Fixed: 2625868
2020-03-20 00:15:11 -07:00
Srinivas Dasari
5ab63299b9 qcacld-3.0: cleanup NAN/NDP logging
Few NAN/NDP logs are redundant in the current logging infra.
Optimize the same and add few necessary logs.

Change-Id: Ie261db317af48955a16269539948ff1596c4bbcb
CRs-Fixed: 2644418
2020-03-19 20:41:40 -07:00
Sourav Mohapatra
e3dcef31ef qcacld-3.0: Modify the max value of MWS coex ini params
The max ini params for mws_coex_pcc_channel_avoid_delay and
mws_coex_scc_channel_avoid_delay are set to be at 0xFF. This max value
doesnot correspond with the actual max value needed by the firmware.

Change the max value to include upto 0xFFFFFFFF

Change-Id: If88d7866c584abf43a41b0c6b9f63b21a0a4a2f2
CRs-Fixed: 2632517
2020-03-19 17:39:24 -07:00
Amruta Kulkarni
d7c24f8a19 qcacld-3.0: Add support to handle assoc reject based on rssi
When AP rejects assoc request based on poor rssi
host will put the AP in blacklist mgr list, only when
rssi value improves by threshold value,should the
STA try to connect to AP.

Change-Id: I78009b89ea07afdd5f3381973a9eb7ec1f73d1b5
CRs-Fixed: 2632015
2020-03-19 12:41:56 -07:00
Jianmin Zhu
159c7d8bad qcacld-3.0: Check whether SAP need restart
If there is no STA/P2P CLI on same MAC of SAP/P2P GO,
SAP/P2P Go needn't switch channel to force scc.

Change-Id: I529a57f73f529e41b8c0097fccabbe3e0e516993
CRs-Fixed: 2643106
2020-03-19 10:45:05 -07:00
Dundi Raviteja
25a77e7f71 qcacld-3.0: Process pkt_capture APIs based on packet capture mode
Process pkt_capture APIs only if packet capture mode is present.

Change-Id: Ibf08e550a829c266fd108c0023c016ab36728589
CRs-Fixed: 2640309
2020-03-17 23:27:58 -07:00
Lincoln Tran
f55bc71172 qcacld-3.0: Remove usage of OS specific API in UMAC code
Replace skip_spaces usage with appropriate QDF replacement

Change-Id: I474470d9cfc86fe8df7b6bfc9f1223342255842d
CRs-fixed: 2631974
2020-03-16 17:23:17 -07:00
Pragaspathi Thilagaraj
5feee1adc0 qcacld-3.0: Add new roam failure reason string
Add string conversion for the below new roam failure reasons
introduced:
WMI_ROAM_FAIL_REASON_NO_SCAN_FOR_FINAL_BMISS
WMI_ROAM_FAIL_REASON_DISCONNECT
WMI_ROAM_FAIL_REASON_SYNC
WMI_ROAM_FAIL_REASON_SAE_INVALID_PMKID
WMI_ROAM_FAIL_REASON_SAE_PREAUTH_TIMEOUT
WMI_ROAM_FAIL_REASON_SAE_PREAUTH_FAIL
WMI_ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO

Change-Id: Ia598723a25bcf9e223828f50b714968698ffd917
CRs-Fixed: 2638593
2020-03-14 05:16:53 -07:00
Abhishek Ambure
48b790c62d qcacld-3.0: Add INI support to disable STA roaming
Use INI "sta_disable_roam" to disable roaming on STA interface if
connection on other interfaces ex. p2p, ndp comes up. Each bit of
the INI "sta_disable_roam" represents an interface.
ex. LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
    LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)

As INI "sta_disable_roam" is generic for all the interfaces, cleanup
for INI "p2p_disable_roam" done.

Change-Id: Icd05a97c640ca07978d9960a33de036ed6fe38df
CRs-Fixed: 2637555
2020-03-13 19:22:14 -07:00
Wu Gao
c1b5bd080a qcacld-3.0: Add CFR INI configures to CFG_ALL
This is part of adding channel frequency response(CFR) component. Add
CFG_CFR_ALL to CFG_ALL.

Change-Id: I83c9b05dad9ad31c4663269f3b03f83066e0cfc1
CRs-Fixed: 2637181
2020-03-13 19:22:00 -07:00
Ashish Kumar Dhanotiya
489e2ae31e qcacld-3.0: Update correct MCS parameters in wiphy
Currently MCS parameters are not getting correctly in
wiphy which results in incorrect capabilities for iw list
command output.

To resolve above issue, update MCS parameters correctly in
wiphy band capabilities.

CRs-Fixed: 2633314
Change-Id: I830ad50aa4842bd2a79c97ed7b11b82c35148ff0
2020-03-13 15:31:29 -07:00
Pragaspathi Thilagaraj
7cefe2fdc3 qcacld-3.0: Increase roam failure reason buffer size
Currently the roam failure reason string size is 40 bytes.
Change this to 50 bytes to avoid truncation in some failure
cases.

Change-Id: I6c90e31fc792078354e98c7a5c61ffd5583469c3
CRs-Fixed: 2637901
2020-03-11 19:08:35 -07:00
Pragaspathi Thilagaraj
cb33b74888 qcacld-3.0: Disable simultaneous scan from upper layers
The default value of ini gDualMacFeatureDisable is 0 and this
enables DBS scan with simultaneous scan from upper layer to
firmware. P2P scans get priority over sta scans and when
continuoes p2p scans are issues from some userspace application,
STA doesn't get scan time and APs in the environment are not
seen the scan results on STA interface.

To avoid this, change the default value of the gDualMacFeatureDisable
to 6, which disables simultaneous scans from upper layer to the
firmware.

Change-Id: I7ea3ed521270fc50acba30f84749d35ee60fcaa0
CRs-Fixed: 2632562
2020-03-11 11:03:59 -07:00
Arun Kumar Khandavalli
68c99e72e7 qcacld-3.0: Send vdev delete to firmware on notification
Presently vdev delete is sent to firmware 1st and the object manager
vdev delete is deleted after all the references are released.
With this change the vdev delete is sent to firmware when all the
references are released and the vdev delete is sent to firmware via
the object manager vdev delete notification.

Change-Id: I67bea0d2b2a0d2d9eb4602e5d0b8bbdcafdd4d26
CRs-Fixed: 2618278
2020-03-11 09:36:23 -07:00
Jianmin Zhu
898c426f55 qcacld-3.0: Support Go for 4th connection
When 4th port of Go started, PCL should be same as SAP.

Change-Id: I84557b90a834cc44fd56070b966e5f2bb42d4836
CRs-Fixed: 2629769
2020-03-11 03:49:01 -07:00
Jianmin Zhu
db3f428eb9 qcacld-3.0: IPA uc not ready for race condition
Race condition between ifconfig and ipa uc event handler thread.
While ifconfig thread creating vdev1, the vdev is locked, ipa uc
event handler thread tries to lock psoc, becomes failed for 1
dev locked, gets error EAGAIN but doesn't try again. IPA uc
event is abandoned without handling.

Fix:
IPA uc event handling can't be abandoned but can be blocked
since it is called in separated work thread, block DSC API
should be used here.
Blocked Operation and Transition have no much difference in DSC,
and they need block each other too, should share same
completion and queue, can share same API.

With WDI 3.0 over GSI, WDI control event is not needed. Therefore
provide a wrapper API for wlan_ipa_uc_send_wdi_control_msg().

Change-Id: Idceff767d62c1e81046a696cb58f70a897cbd074
CRs-Fixed: 2618490
2020-03-09 22:45:28 -07:00
Lincoln Tran
4cb4b007a1 qcacld-3.0: Add ini to pass xLNA bypass config to FW
Add new ini CFG_SET_SAP_XLNA_BYPASS under fw_offload to allow host
to pass config to FW. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS makes the
SAP xLNA bypass configureable.

Change-Id: Ie501005f3035f14b3f23cdd260f401a6af81b798
CRs-fixed: 2632088
2020-03-09 20:57:16 -07:00
Alok Kumar
5f09287be2 qcacld-3.0: Disable GRO/LRO for PM_NDI_MODE
Disable GRO/LRO when NDP session is established and
enable it back after tear down of last NDP session.
Enable back GRO/LRO only if there is no active session
or there is no concurrency with STA MODE.

Change-Id: I322888fa18e8bef19844b626c94efac201550b0c
CRs-Fixed: 2631044
2020-03-06 22:06:17 -08:00
hqu
0742c38422 qcacld-3.0: Update PCL table for GC+SAP+SAP case
Bringup 3 ports GC(5G)+SAP(2.4G ACS mode)+SAP(2.4G ACS mode) in
sequence, the second SAP can't get pcl channel, it's wrong.

Fix is to add GC+SAP+SAP configuration items definition to
pm_third_connection_pcl_dbs_2x2_table and
pm_next_action_three_connection_dbs_2x2_table.

Change-Id: I943ed7cdff0bd0920953b60fcb2cfa1f5bf79dc2
CRs-Fixed: 2627832
2020-03-06 16:38:55 -08:00
Surabhi Vishnoi
85d94fc4b9 qcacld-3.0: Clear ftm_time_sync offset on disconnect and add bssid in sysfs
The Qtime offset derived with a connected AP (master) are not
cleared on disconnect. This leads to storage of stale offset
values. So clear the stale Qtime offset values on disconnection.

Currently there is no information in ftm_time_sync sysfs entry
regarding which BSSID the Qtime offset values are derived.
Add the BSSID info in the sysfs entry.

Change-Id: Iac47bccffae005602469a658e5ca0bc9008ac4b4
CRs-Fixed: 2629822
2020-03-06 08:36:24 -08:00
Srikanth Marepalli
f8d599b48d qcacld-3.0: Add INI support for DFS Channel Ageout Time
Add ini support for DFS Channel Ageout Time, the time upto which
DFS channel information such as beacon found is remembered.
This ini is used to set the ageout timer value from host to FW.
If not set, FW will disable ageout time.
This value is sent as a WMI_PDEV_PARAM_SET_DFS_CHAN_AGEOUT_TIME
as part of WMI_PDEV_SET_PARAM_CMDID.

Change-Id: I99553fa87a4025f03c52b4b387a414ba06c2c457
CRs-Fixed: 2625996
2020-03-06 02:41:16 -08:00
Abhishek Singh
d043d18792 qcacld-3.0: Optimize PMO logs
Optimize PMO logs.

Change-Id: I99122adece0991711961344cfe69e2869386fef1
CRs-Fixed: 2633552
2020-03-05 22:07:42 -08:00
Pankaj Singh
8cf6c634b6 qcacld-3.0: Disable all roam scan in case p2p connection is present
Glitches seen after the STA disconnection because of the roam scan
triggered on a heartbeat failure ( beacon miss ).STA does a partial
scan followed by full scan causing the DUT to go off-channel from
the STA and P2P home channel, causing the music BLIP.

Fix is to disable roaming irrespective of data traffic present
or not on P2P interface and enabled again once P2P is disconnected.

Change-Id: I5ddf946adbfbe99d5b20c23c46b2b4ac0bfac47f
CRs-Fixed: 2632939
2020-03-04 15:31:46 -08:00
Abhishek Singh
5c4790677d qcacld-3.0: Optimize logs in policy_mgr_is_concurrency_allowed
Optimize logs in policy_mgr_is_concurrency_allowed.

Change-Id: I299ea6ec8252d52786d08630e1a5fb1987bce9db
CRs-Fixed: 2633500
2020-03-03 22:19:54 -08:00
Dundi Raviteja
b3134da83d qcacld-3.0: Check pmf status while processing mgmt packets
Add pmf status checks while processing management packets
in packet capture component.

Change-Id: I04e1f7eb33573a3f77f53f9ffbdf0781041be100
CRs-Fixed: 2633851
2020-03-03 22:19:17 -08:00
Sravan Goud
1945c9fc0b qcacld-3.0: Fix passing invalid ipa iface
Currently in net dev cleanup of ipa host interface if the
ipa interface does not exist for that particular net dev,
last ipa iface reference is passed. This may lead to invalid
access. So fix by validating the iface context before clean
up of host ipa interface.

Change-Id: I753c922b5c82c676a318df87552051fdd74c983c
CRs-Fixed: 2632382
2020-03-03 18:52:37 -08:00
Paul Zhang
dc4c2a6afc qcacld-3.0: enable interop issues ap detection
Enable interop issues ap detection function when driver starts up.

Change-Id: Id7f616e19ab6f5f71191c3a93c5b0b5747766437
CRs-Fixed: 2601974
2020-03-03 14:16:46 -08:00
Sourav Mohapatra
5548977f58 qcacld-3.0: Cleanup unnecessary logging in DSC
There are various entry and exit prints present in DSC that are not
necessary for any debugging purpose.

Cleanup these extra logs

Change-Id: I0f2f5b03ddc3e4535cc352fd13782eac1a235121
CRs-Fixed: 2616198
2020-03-03 00:48:36 -08:00
Paul Zhang
7fb245481a qcacld-3.0: revise comment for ignore_fw_reg_offload_ind
ignore_fw_reg_offload_ind is used to ignore regdb offload
indication from FW and regulatory is treated as non offload.

Change-Id: Ic9a47fe3ec49cf1fa9cbf7ab166decdc4ece0511
CRs-Fixed: 2630994
2020-03-02 20:26:45 -08:00
Pragaspathi Thilagaraj
63eb6363dc qcacld-3.0: Introduce ini for roam_triggers including sta kickout trigger
Introduce ini for roaming_triggers to enable/disable specific
roaming triggers. This will be the master ini to control roaming
triggers. If this ini is set to zero, roaming will not be enabled
on the sta interface unless its enabled via vendor command.
A new roaming trigger - Sta kickout roaming is introduced in
firmware, include this bit support also in the ini.

The value of this ini will be sent over the wmi command
WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID during RSO start.
Reset this value to 0 during RSO stop if RSO stop is due to
disconnect or roam synch failure.

Change-Id: I02f207cdde9d8fb68cd91fab07572baa9e7ac50d
CRs-Fixed: 2631712
2020-03-02 19:12:34 +05:30
sheenam monga
cc1b25f607 qcacld-3.0: Introduce a new ini to enable/diasble roam reason vsie
Introduce an INI "enable_roam_reason_vsie" to inidicate fw to
include/exculde roam reason vsie in reassoc frame

Change-Id: I4d2a44812d8b11a19b0d7d31eb31c826aaeda79d
CRs-Fixed: 2627472
2020-02-29 05:21:03 -08:00
sheenam monga
56b4d46146 qcacld-3.0: Include/Exclude roam reason dynamically in reassoc frame
Currently, if roaming happens roam reason is not sent to AP. AP will
not able to know why roaming happened. As roaming is offloaded to
firmware, firmware will include roam reason vsie based on driver
indication by vdev param
WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE based on
below conditions:

Parse the QCA attribute CONFIG_ROAM_REASON to control
inclusion/exculsion of roam reason vsie dynamically. Vendor subcommand
QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION can control roam
reason vsie inclusion using QCA atrribute CONFIG_ROAM_REASON.
Different operations required to implement this feature can be
specified in QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON, so driver parses
CONFIG_ROAM_REASON, updates enable_roam_reason_vsie and indicates to
firmware by updating vdev param.

a.) If Userspace wants the firmware to include roam reason in reassoc
    frame, it can send QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON with
    value 1 and driver will update enable_roam_reason_vsie  to 1.
    Driver will update vdev parameter
    WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE, so that firmware
    can include roam reason vsie in reassoc frame during roaming.
b.) If this command is not issued, the default behavior of the
    firmware is not to include err reason code in beacon report
    response. Driver will send default value of
    enable_roam_reason_vsie to firmware which is 0.
c.) The userspace requests the firmware to stop roam reason vsie
    reporting when roam reason is not required for AP anymore. If
    userspace doesn't want the roam reason  inclusion, userspace can
    send QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON with value 0 and
    driver will update enable_roam_reason_vsie and notify firmware to
    exclude roam reason.
If userspace requests the driver to get the status of
enable_roam_reason_vsie , to check whether firmware includes roam
reason vsie or not, driver will fill CONFIG_ROAM_REASON attribute and
will update to userspace.

Change-Id: I063c822e99fd6908bd4188b429ffa6a2031cee5d
CRs-Fixed: 2624713
2020-02-29 05:20:40 -08:00
Pankaj Singh
be72e139d5 qcacld-3.0: Clean up logs in TDLS path
Clean up redundant logs in tdls path.

Change-Id: Ibf9ad4021cf0c690470bca252117a6eb34295cec
CRs-Fixed: 2625114
2020-02-28 09:09:52 -08:00
Huashan Qu
1b3be2948e qcacld-3.0: dynamic channel switch implementation
When dynamic channel switch is enabled, trigger acs and switch to best
channel if wlan interference is found in 5g mac.

Change-Id: I56661f5c42a233a0dc0a6400d75cb8f5c0019706
CRs-Fixed: 2599176
2020-02-28 05:55:45 -08:00
Alan Chen
01c969852b qcacld-3.0: Add vdev check for ARP/NS offload in NaN mode
ARP/NS offload cannot be executed in NaN mode, but currently there is no
check on vdev for opmode so it is still trying to execute. Add an if
check for opmode of vdev and return QDF_STATUS_E_INVAL if in NaN mode.

Change-Id: I89accfef625c2a1eae944662acdff5d3fdd6ea9d
CRs-Fixed: 2630329
2020-02-28 05:55:34 -08:00
Vulupala Shashank Reddy
af204caea6 qcacld-3.0: Add support to include ACK status and tx retry count
Extend radiotap header to append ACK status and tx retry count
for packets sent to virtual mon interface.

Change-Id: If110a7de736c3efc0d477617089669104c6f1690
CRs-Fixed: 2627707
2020-02-27 11:44:49 -08:00
Vulupala Shashank Reddy
13b07929c6 qcacld-3.0: Fix OUT OF SYNC for Mgmt Tx Pkts on Virtual Mon Interface
For the MON Interface, sometimes Mgmt Tx Pkts are captured after Rx
Pkts get captured in tcpdump. This is happening because Tx Pkts are
sent to mon after waiting for Tx completion.

Now Mgmt Tx frames are sent twice to MON interface, one without
waiting for Tx completion with magic number as status field, so
that the Tx Pkts get captured in tcpdump before Rx Pkts and normal
Tx Pkts get captured, which is after Tx completion will remain same.

Change-Id: Idfc65087bd62cd8ef64306501b600caec424ba02
CRs-Fixed: 2627716
2020-02-27 10:16:21 -08:00
Vulupala Shashank Reddy
d493c152c9 qcacld-3.0: Record the channel number for pktcapture mode
For packet capture mode, record the channel number on
which STA vdev is operating on.

Change-Id: Id52536b5b238dc1e4fe4c612a651c6fe8ddc17d3
CRs-Fixed: 2627713
2020-02-27 10:15:57 -08:00
Pankaj Singh
ab580fb1fb qcacld-3.0: Remove wait for event from p2p_cleanup_param
Currently the driver waits for cancel roc request in the
API p2p_cleanup_param which gets executed in the scheduler context.
Scan cancel requests also executes in the scheduler context, so
the wait would fail as the scheduler thread is waiting for
the message to get processed which it would only process, which
would in turn cause a latency in P2P connection.

Fix is to remove the wait which is mentioned above.

Change-Id: I12a1a7e4896ecf3a9c6e8f138e18637690cbd049
CRs-Fixed: 2622051
2020-02-27 06:28:59 -08:00
Abhishek Singh
a7d74b38d6 qcacld-3.0: Remove unnecessary enter exit from PMO functions
Remove unnecessary enter exit from PMO functions.

Change-Id: I5b15d5d943f91fad68dfdf98a0f343e6c1379364
CRs-Fixed: 2628634
2020-02-26 16:33:23 -08:00
Surabhi Vishnoi
4eaa25c659 qcacld-3.0: Add sysfs entry to display ftm time sync offset
Add the sysfs entry ftm_time_sync in STA mode to show the offset
derived for the STA(slave) with respect to connected AP(master).

Change-Id: I05b16ccdb983c53fb86eeb14ba98bd3cc9a2dce6
CRs-Fixed: 2621152
2020-02-26 14:56:29 -08:00
Abhishek Singh
d5712927b2 qcacld-3.0: Improve logging in driver
Improve logging in driver by avoiding unnecessary error prints
and combining logs.

Change-Id: Ibab9067aa1bce992f36fca22a5aed88e8d85ba25
CRs-Fixed: 2627549
2020-02-26 11:39:28 -08:00
Vulupala Shashank Reddy
88ab94ce0a qcacld-3.0: Process Tx data packet for pkt capture mode
Process Tx data packets and post into mon thread for
packet capture mode

Change-Id: I71e48b024c3e9b9e92d5dc3ec22e55a384ff572f
CRs-Fixed: 2619330
2020-02-26 10:06:38 -08:00
Vulupala Shashank Reddy
a2deef8c83 qcacld-3.0: Process Rx data packet for pkt capture mode
Process Rx data packets and post to the mon thread for
packet capture mode

Change-Id: Id8ae54677615c27d61c6def1a521c509f602863b
CRs-Fixed: 2618941
2020-02-26 10:06:27 -08:00
Abhinav Kumar
267ed0068e qcacld-3.0: Clear same pmk info while processing del/flush pmk
Clear sae_single_pmk info while processing del/flush pmk command
from supplicant, if required.

Change-Id: Idd974822ef0426461cd9971e54d8244d64b246b5
CRs-Fixed: 2616036
2020-02-26 06:41:25 -08:00
Abhinav Kumar
8747fd098c qcacld-3.0: Update sae_single_pmk info in RSO start command
Requirement is to allow station to just keeps only one
PMK1 and PMKID1 which gets derived while first connection
and re-use it for roaming to other AP which has some
specific VSIE.

To support this feature, STA should Set new flag in 11i
params during RSO start/update when initial connection is
completed based on the VSIE in AP beacon/probe response
frame. This flag will allow fw to roam to AP(s) which has
VSIE with single PMK.

Update PMK info in RSO start command with
sae_single_pmk info if initial connection is completed
with AP contains VSIE.

Change-Id: I839b48da48f92f24444e69405d87560186d7f986
CRs-Fixed: 2616029
2020-02-26 06:40:55 -08:00
Abhinav Kumar
c71e678b18 qcacld-3.0: Add support for sae roaming with single PMK
Requirement is to allow station to just keeps only one
PMK1 and PMKID1 which gets derived while first connection
and re-use it for roaming to other AP which has some
specific VSIE.

To support this feature, STA should:
1. Set new flag in 11i params during RSO start/update when
initial connection is completed based on the VSIE in AP
beacon/probe response frame. This flag will allow fw to roam
to AP(s) which has VSIE with single PMK.
2. STA should dynamically enable this feature if below
vendor specific IE on AP’s Beacon or Probe Response at
the first connection:
Category 	Data
Type 		0xDD
Length 		0x05
OUI 		0x00 40 96
Type 		0x03
Data 		Don’t care
		(EX, 0x05)

Maintain a separate pmk information structure to support sae
roaming using single pmk.

Change-Id: I0aac7659cecd4d8aaff86c9715e512cf46f22615
CRs-Fixed: 2616035
2020-02-26 06:40:44 -08:00
Jia Ding
97b62586f8 qcacld-3.0: Support per AP isolation in WLAN IPA
AP isolation a.k.a intra-bss forwarding is a per AP attribute. Issue in
current IPA implementation is that it does not support per AP control.
In a SAP-SAP configuration, latter SAP configuration will always overwrite
first SAP's isolation configuration.

Fix is to add vdev id parameter from protocol layer so that IPA component
could configure AP isolation on a per AP basis.

Change-Id: I9c96cdcda03eb10b4c2984a757e52d77b5bf6790
CRs-Fixed: 2624757
2020-02-25 21:58:03 -08:00
gaurank kathpalia
c749f7d136 qcacld-3.0: Print the peer only when rx tx is going
Currently the TDLS module prints the peer info
every defined time interval which leads to too
much of information even when no rx tx is
ongoing with the peer which leads to excessive
logging.

Fix is to limit the logs and print only when there
is activity going on.

Change-Id: I6c1bf5a1ce8a858dfe895168178154a6c8b49c1f
CRs-Fixed: 2625632
2020-02-25 10:58:14 -08:00
Jianmin Zhu
b4c5783d46 qcacld-3.0: Fix wrong channel freq API issue
Call channel API with frequency parameters wrongly

Change-Id: Ib810887ddc7eab3e1fa84de50720e2fe2a56bee7
CRs-Fixed: 2627531
2020-02-25 03:01:05 -08:00
Abhinav Kumar
86afc8fbc4 qcacld-3.0: Optimize logs after connect complete
Optimize logs after connect complete i.e roam offload params
and tdls state etc.

Change-Id: I5df7eb236ef1c7369f4d996c4f0eda7225652f12
CRs-Fixed: 2627694
2020-02-25 03:00:49 -08:00
Srinivas Dasari
fc3aea42ea qcacld-3.0: Send assoc request IEs in STA_INFO in SAP mode
Userspace expects the assoc request IEs of a disconnected station
to derive 11kv capabilities. Send the same in STA_INFO as part
of remote station info.

Change-Id: Iab5f39de833cd06e814e83f0149a0d21caf59b9f
CRs-Fixed: 2624922
2020-02-24 04:32:26 -08:00
Abhinav Kumar
406cfe0ee4 qcacld-3.0: Introduce a new compile time flag and INI
Introduce a compile time flag SAE_SINGLE_PMK and new INI
"sae_same_pmk_feature_enabled" to enable/disable SAE
Roaming with same PMK/PMKID feature.

Change-Id: Ifca8ec8bcf6e9a2f1d8409b35390bfee0033bd30
CRs-Fixed: 2616025
2020-02-23 14:43:08 -08:00
Surabhi Vishnoi
bb69422804 qcacld-3.0: Add support to trigger FTM time sync feature
FTM time sync feature is triggered when connection takes place
in case of STA and bss starts in case of SAP. The feature is
stopped when STA disconnects and bss stops.

Change-Id: I963b0134b7432c9827c2fb3d9dce7c81a8666d4d
CRs-Fixed: 2621144
2020-02-23 08:53:35 -08:00
Surabhi Vishnoi
492308b08f qcacld-3.0: Add ini for FTM time sync component
Add ini config required for FTM time sync feature.

"enable_time_sync_ftm"- ini to enable/disable the feature.

"time_sync_ftm_mode" - ini to configure the burst/aggregated mode.
In burst mode the offset derived for each RTT frame is sent by
firmware, in aggregated mode only one offset is sent by firmware.

"time_sync_ftm_role" - ini to configure slave(STA)/master(SAP) role.

Change-Id: I6a06d6fdc4c7556c32ab2d28f1cbaa936b98a85b
CRs-Fixed: 2618654
2020-02-21 01:44:59 -08:00
Vulupala Shashank Reddy
4affa222c9 qcacld-3.0: Register tx and rx ops for packet capture component
Register tx and rx ops to send packet capture mode command and
to receive mgmt offload handler for packet capture component.

Change-Id: I70da00feff29399b98c5916eec17e26b62285db3
CRs-Fixed: 2619321
2020-02-20 16:23:28 -08:00
Jingxiang Ge
ad6337f2b0 qcacld-3.0: Fix spin_lock deadlock issue for resume/wakeup
If resume and fw wakeup happens at the same time.
psoc_ctx->lock maybe doing bottom half operation for resume,
then wakeup interrupt comes on same cpu, the interrupt
handler will also acquire psoc_ctx->lock in
pmo_core_update_wow_initial_wake_up, which cause dead lock.

Using atomic for wow_initial_wake_up, so the interrupt handler
can avoid using spin_lock.

Change-Id: Id0e963a0924415e9660c57a1c1b776d3e609213d
CRs-Fixed: 2624899
2020-02-20 04:51:04 -08:00
Dundi Raviteja
9465ea0c01 qcacld-3.0: Add WMI EVENT handler for offloaded mgmt data
Register event handler for WMI_VDEV_MGMT_OFFLOAD_DATA_EVENTID
to handle offloaded management data.

Change-Id: I340d79b08f8453425092f4582059f184e0dfb625
CRs-Fixed: 2619319
2020-02-20 04:50:41 -08:00
gaurank kathpalia
f3d64f7ffa qcacld-3.0: Add support for NAN msg in kmsg
Add support for the following NAN messages in kmsg:-
1. NAN enable status
2. NAN, NDP match events
3. NDP channel info.
etc.

Change-Id: Icbf8f4ed05a7bd181a076d526dd2e01d70be6b05
CRs-Fixed: 2618835
2020-02-20 01:08:01 -08:00
Amruta Kulkarni
1967ff92ff qcacld-3.0: Log enhancement for policy mgr
Enhance logs in policy mgr module to remove duplicate
or unwanted prints and keep only useful logs to debug.

Change-Id: Ifd585256955aceec29286d82838be0c588228c32
CRs-Fixed: 2614763
2020-02-19 11:31:04 -08:00
Dundi Raviteja
4a89130e93 qcacld-3.0: Process Mgmt Tx and Rx frames for pktcapture mode
Process management Tx and Rx frames for packet capture mode
and post frames to the mon thread.

Change-Id: I14c0a1cf8a8aa4d4a4e16ad6200715b875611c81
CRs-Fixed: 2619317
2020-02-19 08:43:11 -08:00
Vulupala Shashank Reddy
5a60cebf6d qcacld-3.0: Send vdev param command to set pkt capture mode
Send vdev param command to FW for STA vdev to set the packet
capture mode. Send the command only if packet capture support
is enabled.

Change-Id: Ifed2431882b1f7d2869771e812daa5bcd5dc17e9
CRs-Fixed: 2619314
2020-02-19 06:23:46 -08:00
Abhishek Singh
c332b3eba0 qcacld-3.0: Optimize CSA logs for SAP and STA
Optimize CSA logs for SAP and STA.

Change-Id: I1bd00821a2b8cbc41d530eda1aba1e7ecdd9cb7b
CRs-Fixed: 2623007
2020-02-18 04:52:20 -08:00
Abhishek Singh
6d5bac846a qcacld-3.0: Optimize logs in STA disconnect path
Optimize logs in STA disconnect path

Change-Id: I3534f3ab89ebbdd919c02120328013e42d2894f4
CRs-Fixed: 2623124
2020-02-18 01:53:50 -08:00
Vulupala Shashank Reddy
a69961d7dd qcacld-3.0: Add support for packet capture callbacks
Add support to register/deregister packet capture callbacks.

Change-Id: I37c713d6929879aea7e39f6fd87ba2aecd86d802
CRs-Fixed: 2619312
2020-02-17 21:21:06 -08:00
Vulupala Shashank Reddy
aa481cc459 qcacld-3.0: Create mon thread for packet capture
Create mon thread to process the packets for
packet capture.

Change-Id: I0c83b17273f140970b4feea49cd42da4c540046b
CRs-Fixed: 2618657
2020-02-16 04:01:17 -08:00
Abhishek Ambure
83c11be72e qcacld-3.0: Add support to configure candidate min roam score delta
During CU and low rssi based roam triggers, consider AP as roam candidate
only if its roam score is better than connected AP score by at least
min_roam_score_delta.

User configures this candidate minimum roam score delta value using
"min_roam_score_delta" INI. User can set candidate minimum score delta
value between 0 to 10000 and default value is 1850.

Firmware will trigger roaming only if roam score of candidate AP is
greater than "min_roam_score_delta" & "roam_score_delta" values of
connected AP.

Change-Id: I180e769b5629aa405dbd89ed73e39e228adf92db
CRS-Fixed: 2614117
2020-02-15 20:28:04 -08:00
Surabhi Vishnoi
6ecac484fc qcacld-3.0: Add function to handle the FTM time sync events from target
Add the function to parse the FTM timesync start/stop and offset
events received from target and populate them in ftm timsync
priv vdev structure.

Change-Id: Ibdcf97bb0a04fc6490c6bd2c26701036df92c5d4
CRs-Fixed: 2618646
2020-02-15 12:56:09 -08:00
Srinivas Dasari
644dbc18c1 qcacld-3.0: Add reason codes for internal disconnections
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
2020-02-15 08:45:08 -08:00
Jianmin Zhu
5b0746560d qcacld-3.0: suspend scan before scheduler thread suspended
Scan cmd still can be exist after scheduler thread is suspended
when host suspend, the scan cmd can't be removed from
serialization list by either complete or cancel any more since
both depends on scheduler thread, suspend thread blocked 30s to
wait scan cmd cleared.

Roam sync event from F/W can't be handled and Roam sync complete
can't be sent to F/W since scheduler thread suspended, then F/W
assert for roam sync cmd timeout.

After receive F/W down event, host will try SSR, but blocked by
unfinished suspend thread too.

Fix: suspend all components including scan before suspend
scheduler thread, make sure scan cmd is cleared and no new scan
is allowed any more before scheduler thread suspended.

Change-Id: I7a3badeedea018e4d92bbe8660692e42923852aa
CRs-Fixed: 2620650
2020-02-15 01:58:26 -08:00
Srinivas Dasari
4a63e6fdbb qcacld-3.0: Move disconnect ie info to a structure
Move disconnect ie info to a structure (wlan_disconnect_info)
and use it in mlme_legacy_priv. This helps to enhance the
structure further.

Change-Id: Id16e7eeb45a3f4c2fefac297f6730baf6b9e8991
CRs-Fixed: 2621149
2020-02-14 13:34:37 -08:00
Abhishek Singh
a7efaea28f qcacld-3.0: Optimize PMO prints
Optimize PMO prints.

Change-Id: I0595e5b51edfe3ad0a0abb239cb53e67938d2efa
CRs-Fixed: 2621351
2020-02-14 12:09:29 -08:00
Sourav Mohapatra
eb7227cc06 qcacld-3.0: Add param to configure channel avoidance indication from FW
Currently, when WWAN channel changes, the list of WLAN channels that
needs to be avoided is given to WLAN FW. WLAN FW indicates the list
to host. Upon receiving Channel avoidance indication, host switches
the operating-channel of SAP (if any and conflicting).

When there is a frequent channel change from WWAN side, it causes
frequent SAP disconnection. To mitigate this problem, as part of
this change send the configuration to the WLAN FW which delays
the channel avoidance indication before sending it to host.

Change-Id: If67775d59b9f61d3592a5f6609d3b002899e5daf
CRs-Fixed: 2615917
2020-02-14 09:01:44 -08:00
Abhishek Singh
3c56fdd796 qcacld-3.0: Optimize logs in TX assoc req and RX assoc rsp
Optimize logs while sending assoc req and assoc rsp handling
frame by dumping the assoc req frame and not printing each
params separately. Also avoid multiple dump of same frame.

Change-Id: Ibcf2d9aa8de292b9b9f4b4c6a53a0f694d69475c
CRs-Fixed: 2619553
2020-02-13 22:08:33 -08:00
Pankaj Singh
a740a9a310 qcacld-3.0: Reduce excessive logging in P2P module
Currently there are lot of duplicate logging. Identify and
reduce those logs that are not absolutely necessary.

Change-Id: Ia2df5a46610b885be5e27455aef7f7281c7c3c55
CRs-Fixed: 2617719
2020-02-13 08:11:31 -08:00
Vulupala Shashank Reddy
6e5c807513 qcacld-3.0: Add INI parameter for packet capture mode support
Add INI parameter for packet capture mode

"packet_capture_mode" - ini to set packet capture mode.

Change-Id: Ie60c142af753c65b44aa0018440e43a215e51a27
CRs-Fixed: 2614578
2020-02-11 18:43:31 -08:00
Abhishek Ambure
b3f5f95275 qcacld-3.0: Change default value of idle_roam_rssi_delta to 3
idle_roam_rssi_delta - This threshold is the criteria to decide whether
DUT is idle or moving. If rssi delta is more than configured thresold
then its considered as not idle. RSSI delta is entered in dBm. Idle
roaming can be triggered if the connected AP rssi change exceeds or
falls below the rssi delta and if other criteria of ini
"enable_idle_roam" is met.

To enhance idle roaming, idle_roam_rssi_delta default value is changed
to 3.

Change-Id: I9a5b06081d59d8502c40df0485c2b997cbcb2b80
CRs-Fixed: 2619436
2020-02-11 11:04:41 -08:00
Bapiraju Alla
dfd1ba0a7e qcacld-3.0: Change STA default keep alive time from 60 to 30
AP has less keep alive timer than STA, so AP is kicking out the STA and
sending the deauth.

To resolve this change CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT value from
60 to 30.

Change-Id: I0522071bc634b029178de6e09c11d237351a334d
CRs-Fixed: 2616279
2020-02-11 04:14:21 -08:00
Srinivas Dasari
62bb6191b1 qcacld-3.0: Wait for NDP_END indication from firmware
When application issues NDP end to terminate an NDP connection,
host driver sends a request to the firmware and firmware
terminates the NDP by sending NDP end frame to the peer.
Currently, driver returns immediately after posting request to
the firmware. Application might issue NDI delete immediately
after returning from NDP_END request.
But firmware might take some time to complete the NDP termination
and send NDP_END indication to driver.
When driver tries to delete the NDI before receiving NDP_END
indication from firmware, it causes inconsistency in firmware as
the NDI on which the NDP is parked is freed.
So, wait till the NDP_END indication comes from
firmware(or timeout happens) before returning from ndp_end request
context.

Change-Id: Ied7ed36451ef007e38f67d48c54290b9dd674f54
CRs-Fixed: 2616018
2020-02-10 13:32:36 -08:00
Ashish Kumar Dhanotiya
b3ae646bf2 qcacld-3.0: Add support for the NAN config items
Currently there is no inis for NAN component:
1. To configure the keep alive period for the
NDI interface.
2. To enable/disable discovery of NAN cluster with
Master Preference (MP) as 0 when a new device is
enabling NAN.

Add ini support to configure above mentioned values.

Change-Id: I47b67eb89fb8849960a9f492d2909e45b96308f3
CRs-Fixed: 2617839
2020-02-10 11:58:46 -08:00
Surabhi Vishnoi
765dcc910f qcacld-3.0: Add FTM TIME SYNC component in target_if
This patchset adds the FTM TIME SYNC component in
target_if to register the ftm time sync wmi events/cmds.

Change-Id: I4ea14266a912c9d261a67809556774860b5ddab1
CRs-Fixed: 2617055
2020-02-10 06:41:17 -08:00
Amruta Kulkarni
fc875ea635 qcacld-3.0: Cleanup for function wlan_reg_is_dfs_ch()
Replace wlan_reg_is_dfs_ch() with wlan_reg_is_dfs_for_freq()

Change-Id: Ifa62248169ad7b8ff1c62cab44c92d99a8db0e45
CRs-Fixed: 2609311
2020-02-08 02:07:03 -08:00
Pankaj Singh
134bb1fe06 qcacld-3.0: Reduce excessive logging in P2P module
Currently there are lot of duplicate logging. Identify and
reduce those logs that are not absolutely necessary.

Change-Id: I649ce3bec8c3c8542fe9edd08907da9ab01fa948
CRs-Fixed: 2617504
2020-02-07 14:13:03 -08:00
Vevek Venkatesan
656edfa1f8 qcacld-3.0: add support to customize dscp-to-up map table
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
2020-02-06 22:44:57 -08:00
Abhishek Singh
4ec44a7db6 qcacld-3.0: Optimize logs in connect req in HDD and CSR
Remove redundant logs and optimize the logs for connect in
HDD and CSR.

Change-Id: I2d2d63aaaff814d91018e95a30869b81c1349a80
CRs-Fixed: 2615902
2020-02-05 12:31:18 -08:00
Govind Singh
041cf61139 qcacld-3.0: Add FTM TIME SYNC component
Add support for FTM TIME SYNC feature.

Change-Id: Idd022b3b105febd25b9353d7f7c4a046c9143585
CRs-Fixed: 2615242
2020-02-04 17:17:48 -08:00
Abhishek Singh
48175fd4f7 qcacld-3.0: Optimize logs in scan path
Remove redundant logs and optimize the logs in scan path.

Change-Id: Ie6ff84b1a832a29d5fe01c649be4b8143bd13c94
CRs-Fixed: 2612637
2020-02-04 14:15:54 -08:00
gaurank kathpalia
16f2a47c11 qcacld-3.0: Optimize logs in serialization
Remove redundant logs in serialization.

Change-Id: Icaebd5ce800ec035f082210785e95372cf2e7e72
CRs-Fixed: 2612824
2020-02-04 02:01:34 -08:00
Sravan Goud
d257bd19de qcacld-3.0: For system suspend do dp wow ack process
In case of successful wow enable ack from FW for system
suspend call cdp wow ack response process, so that dp
layer will take care of required operations before system
goes to suspend.

Change-Id: Ibc5bf8d62aa055c9c8c7242c00abc3b696bb0051
CRs-Fixed: 2608980
2020-02-04 00:33:19 -08:00
Vulupala Shashank Reddy
9331f42f3e qcacld-3.0: Add support for packet capture mode
Add support for packet capture mode to monitor packets
on WLAN interface.

Change-Id: I8409479ef7855d51e303028d7e18e6bf89055407
CRs-Fixed: 2611293
2020-02-03 21:41:46 -08:00
gaurank kathpalia
ca2ecc8a2a qcacld-3.0: Remove redundent logs from the Sta connect req
Remove redundant logs from the Sta connect req.

Change-Id: I0b0d455802b0df3509010c31b908737c54a861c7
CRs-Fixed: 2614594
2020-02-03 19:46:52 -08:00
Abhinav Kumar
36b42d3545 qcacld-3.0: Make nan_separate_iface_support enable by default
Make nan_separate_iface_support feature enable by default

Change-Id: I0651a47ce68421b0108ab65295a0341cbb22393e
CRs-Fixed: 2613584
2020-02-03 06:04:40 -08:00
Pankaj Singh
50e40422d1 qcacld-3.0: Add support for WLAN thermal mitigation
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
2020-01-31 12:45:29 -08:00
Abhinav Kumar
dafd2a637b qcacld-3.0: Add an ini for separate iface support for NAN
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
2020-01-31 00:57:02 -08:00
Ananya Gupta
a5d2e98580 qcacld-3.0: Reduce Stack usage during IPA Setup
Reduce stack usage by allocating memory dynamically instead of
static allocation during IPA setup.

Change-Id: I438bd1e5b5ca1a467a1ab08d48fbe823190937e8
CRs-Fixed: 2611859
2020-01-30 19:38:28 -08:00
Alok Kumar
a73938f684 qcacld-3.0: Disable peer_unmap_conf_support for FTM mode
In FTM mode, no peer is created in the host. Currently, since
peer_unmap_conf_support feature is enabled, FW is expecting
WMA_SEND_PEER_UNMAP_CONF from host to remove the peer Id from AST.
But host never send this WMI CMD in FTM mode.

Disable peer_unmap_conf_support in FTM mode which allow FW to
delete the peer Id without any WMI CMD expectation from host.

Change-Id: Idf9082adc81187346563f3aedf1f1657164f03cc
CRs-Fixed: 2608929
2020-01-30 17:59:38 -08:00
Alan Chen
4ea561fa80 qcacld-3.0: Disable ARP_NS and GTK offload for NaN mode
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
2020-01-30 00:32:33 -08:00
Srikanth Marepalli
72213318bd qcacld-3.0: Make WMI_ROAM_PMKID_REQUEST_EVENTID event as wakable
Add support to make event WMI_ROAM_PMKID_REQUEST_EVENTID as
wakable in FIPS case.
In FIPS Enabled case, for roaming Firmware sends PMKID request
to host as firmware is not supposed to do crypto functionality
with FIPS enabled.

Change-Id: I09b6b68f77ba75f9e5519ff18017c95d16771f52
CRs-Fixed: 2513790
2020-01-28 11:01:38 -08:00
Arun Kumar Khandavalli
57cb15b903 qcacld-3.0: Selectively reduce the ipa logs
Reduce loglevel of some logs from info to debug.

Change-Id: Ib881af4411da6a25f48a81adf1428b37df43b560
CRs-Fixed: 2607949
2020-01-28 05:30:42 -08:00
Arun Kumar Khandavalli
83d42e241d qcacld-3.0: Selectively reduce the p2p logs
Reduce p2p component logs loglevel form info to debug.

Change-Id: I56e3710a33de280d7c62e88de53f11d61a6515da
CRs-Fixed: 2607028
2020-01-27 05:16:46 -08:00
Abhishek Ambure
2372a9054d qcacld-3.0: Set max limit of RoamRssiDiff INI to 100
STA considers RSSI delta configured by the user along with other
parameters for roaming.

RoamRssiDiff is the number of units (typically measured in dB) AP2 is
better than AP1. STA roams from connected AP1 to AP2 if the RSSI value
of AP2 is greater than AP1 by configured ROAM delta value.

Max limit of RoamRssiDiff is increased to 100 from 30, so user can set
roam delta from 0 to 100 using command SETROAMDELTA.

Change-Id: I69b783ebe5ec971bb62cbac8a34065d52fc25422
CRs-Fixed: 2609589
2020-01-24 21:29:10 -08:00
Pragaspathi Thilagaraj
b2e6d8964f qcacld-3.0: Update roam failure reason string
Update the mlme_get_roam_fail_reason_str() to return
correct string for new roam failure reason enums added.

Change-Id: I24983149fdcd8a0935eea9670832944638c33179
CRs-Fixed: 2607545
2020-01-24 18:43:39 -08:00
Arun Kumar Khandavalli
a0bb689000 qcacld-3.0: selectively reduce the offload logs
Reduce loglevel of some logs from info to debug.

Change-Id: I7026cd376015de62d71ffd0b4eb2e79e13e2e4f0
CRs-Fixed:  2607973
2020-01-24 05:09:18 -08:00
Arun Kumar Khandavalli
32a9096941 qcacld-3.0: selectively reduce the mlme logs
Seletively reduce the mlme component logs from info to debug.

Change-Id: If31157aef1eba8fcd8bee5c654a9e87f4437cc95
CRs-Fixed: 2607165
2020-01-24 03:50:13 -08:00
Rakesh Pillai
ed73605fe2 qcacld-3.0: Remove usage of datapath handles in outer layers
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
2020-01-23 14:27:28 -08:00
gaurank kathpalia
e0334a5e1d qcacld-3.0: Set connection update in success only
Currently the driver sets the connection update
flag in case of the hw mode cb when the set
hw mode is done, irrespective of the status
code sent by the FW. This leads to the completion
for wait for event and the caller to the current
connection update would get a wrong expectation
that the hw mode requested by it was set, which
would not be the case when the hw mode is not set
according to the user or the set hw mode was
rejected by the target itself.

Fix is to set the connection mode only when the
status is success or already the HW mode is set.

Change-Id: Ic7257b0be5a4bcdaecffb788cf3394b06ddfd5e5
CRs-Fixed: 2604062
2020-01-23 03:41:33 -08:00
Arun Kumar Khandavalli
8b61ce1e4c qcacld-3.0: Selectively reduce tdls logs
Reduce tdls logs from info to debug.

Change-Id: I2de71c4aa5d9915afb68bc192dcd6a749f6b3b4e
CRs-Fixed: 2607020
2020-01-23 03:41:19 -08:00
Arun Kumar Khandavalli
f4ed406089 qcacld-3.0: Selectively reduce the policymgr logs
Reduce certain logs of policymgr from info to debug.

Change-Id: Idb2817c20f97d5a8888cbe685bdc3b1eaf77662e
CRs-Fixed: 2607035
2020-01-22 23:02:18 -08:00
Arun Kumar Khandavalli
5aff060d8d qcacld-3.0: selectively reduce the nan logs
Selectively reduce the nan logs loglevel form info to debug.

Change-Id: Ie71e34582d22de14a49b3d07fc286d4c4caccdbd
CRs-Fixed: 2607290
2020-01-22 19:22:30 -08:00
Alan Chen
6569f97e67 qcacld-3.0: Use QDF API to check driver unload in DSC
Use newly defined QDF API in CMN qdf_is_driver_unloading() to check
if driver unload is in progress in DSC.

Change-Id: I2958c6cc3ee6f2ac4302e2dbbf1c68d986fea175
CRs-Fixed: 2605706
2020-01-21 18:19:54 -08:00
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
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
Li Feng
ab5a5ccf2b qcacld-3.0: Enable p2p go gc force scc
Enable p2p go gc force scc by adding logic to check the connected
p2p gc when checking concurrent channel interfering and restart p2p
go if needed.

Change-Id: Idd01fbc2a358b463568844a420e1132355c1de4e
CRs-Fixed: 2604955
2020-01-19 05:00:04 -08:00
Abhishek Singh
81df27d0ce qcacld-3.0: Remove unused crypto params
Remove unused crypto params from wma and peer mlme priv.

Change-Id: I85b4ba0e31b268e98be0afd15637ed3f704b39ac
CRs-Fixed: 2604383
2020-01-17 10:20:00 -08:00
Tushnim Bhattacharyya
fbe8533613 qcacld-3.0: Allow SAP to be on DFS channel with dfs_scc 2
Allow SAP to be on DFS channel if g_sta_sap_scc_on_dfs_chan
is set to 2.

Change-Id: Ifd8ae1d487c8538b2870c69ba420242719756859
CRs-Fixed: 2604548
2020-01-16 23:46:51 -08:00
Arun Kumar Khandavalli
5fdbbe2c4a Revert "qcacld-3.0: Remove NaN offloading option"
This reverts commit I1adb8ead32a0d45a34f72590c33309b17d6c80c0.
Nan offload supported is now supported.

Change-Id: Ic99aa886c82dcf4d9c68f658080bd800117cce87
CRs-Fixed: 2600602
2020-01-16 23:46:34 -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
Amruta Kulkarni
f63bcbe4e3 qcacld-3.0: Reduce mlme logging level from err to debug
In wlan_mlme_configure_chain_mask(),mlme_legacy_err is
updated to mlme_legacy_debug,as its not an error condition.

Change-Id: Ibdf33124ee970bcfcc9d57df9f3b3fc6990072fe
CRs-Fixed: 2599510
2020-01-15 08:19:06 -08:00
Liangwei Dong
f9a0512cae qcacld-3.0: Check SBS supported or not before set hw mode
If the request is SBS action and the HW doesn't support SBS,
return QDF_STATUS_E_NOSUPPORT. The caller will continue to
connect/start_ap instead of failure when
policy_mgr_current_connections_update return
QDF_STATUS_E_NOSUPPORT.

Change-Id: I158f90c13e2685697b82c874a247883f21f013cb
CRs-Fixed: 2602194
2020-01-14 19:42:12 -08:00
Vevek Venkatesan
451f996d6b qcacld-3.0: check if non-zero list count before deleting node
Add a check if list count is non-zero before deleting the node
from IPA tx descriptor list.

Change-Id: I9913c636107686755ffc5da2b585028a4be7a1e9
CRs-Fixed: 2601601
2020-01-14 13:02:04 -08:00
Sravan Goud
dd78eef93a qcacld-3.0: Reset ipa pending tx timer at pipes enable
In case of STA + SAP ipa pending tx timer is started when last
SAP client disconnects. Again if client connects back timer is not
stopped at pipes enable. Later some time if suspend kicks in and
during bus suspend if there are no ipa tx pending ipa pipes are
disabled. This leads to issues such as data stall, invalid IPA
doorbell register access. So reset the timer during ipa enable pipes.

Change-Id: Id6034596f52f98c793674c9d9e5f7918c5c3d455
CRs-Fixed: 2598559
2020-01-12 06:23:53 -08:00
sheenam monga
1fa0514eb7 qcacld-3.0: Fix sta_ds use after free
lim_is_pkt_candidate_for_drop() uses sta_ds to update last assoc
and deauth/disasocc received time without taking any lock for
sta_ds. deletion of sta_ds in pe_delete_session before accessing
sta_ds in dph_lookup_hash_entry can lead lead to Assert.
Similar is the case with sta_ds->last_assoc_received_time and
sta_ds->last_disassoc_deauth_received_time.

Fix is to use peer_priv instead of sta_ds and update
last_assoc_received_time and last_disassoc_deauth_received_time of
peer_mlme_priv_obj. In this case refcount gets increased for valid
peer and peer won't be deleted until lim_is_pkt_candidate_for_drop
releases the ref count of the peer.

Change-Id: I9daf31f9dd7b509eaf38a93078bb7418605b1c74
CRs-Fixed: 2598841
2020-01-11 17:53:06 -08:00
bings
b188056965 qcacld-3.0: Don't disable dfs phyerr offload when no sap/go in DFS ch
According to FW, DFS phyerr offload should be enabled before vdev start,
otherwise FW can't start DFS phyerr offload function.

Do not send DFS phyerr offload disable wmi command before vdev stop, and
FW will handle all the necessary cleanup in vdev stop wmi command.

Without DFS phyerr offload disable wmi command, DFS phyerr offload is
enabled before vdev start.

Change-Id: Id6275e9716afb34316cf46b69dd0b4f82b73ac5d
CRs-Fixed: 2598263
2020-01-11 11:12:29 -08:00
Kiran Kumar Lokere
4dd5c4f06b qcacld-3.0: Set the default SW retry limit value to 16
Set the default software retry limit value to 16 and fix the typo
in configuring the non aggregation software retry limit.

Change-Id: Ia6ef7cc39f47ef91c2c338e48561e0275445750f
CRs-Fixed: 2599467
2020-01-11 01:50:08 -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
Yue Ma
e5a28495ab qcacld-3.0: Cleanup CRYPTO_SET_KEY_CONVERGED for MAC 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 MAC layer.

Change-Id: I34fb7a6a67dd6dba3fa69c98ef10a1bd51383e36
CRs-fixed: 2593525
2020-01-09 20:21:42 -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
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
Jianmin Zhu
e6b80253bc qcacld-3.0: Permit 3 SAP channel switch
During mdm SAP+SAP+SAP case, if 5G band is disabled for modem
N79 band, need all 5G SAP switch to 2G to force scc.
when 5G band is re-enabled, all 5G SAP can switch back to 5G.

Change-Id: Ief7d7c85a7881885bd95c8af6be8d4e428d07041
CRs-Fixed: 2597602
2020-01-07 19:20:58 -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
Pragaspathi Thilagaraj
71a1fa4ca0 qcacld-3.0: Add diag log support to print roaming related stats
When roaming is complete, firmware sends WMI_ROAM_STATS_EVENTID
to host driver. This event has details regarding the roam
trigger reason, roam scan and candidate details, roaming result
and 11kv info sent after roaming to AP. Parse this event and
fill the below diag log report to print this in logcat:
LOG_WLAN_AUTH_ASSOC_TX_RX_INFO
LOG_WLAN_ROAM_TRIGGER_INFO
LOG_WLAN_ROAM_SCAN_INFO
LOG_WLAN_ROAM_RESULT_INFO
LOG_WLAN_RRM_TX_RX_INFO

Change-Id: Ie09dc8ad5b236d0925327dba73a3f2e73a80109a
CRs-Fixed: 2597057
2020-01-06 20:35:43 -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
gaurank kathpalia
628d3ef690 qcacld-3.0: Check for zero/broadcast BSSID in BLM
Currently the BLM does not check the BSSID of
the entry for 0 or broadcast BSSID, and thus
can lead to addition of many entries with such
property.
This would also result in removal of old valid BSSID
entry data, which is essentially required.

Fix is to check the BSSID of the entry for 0
or broadcast, and reject them if not valid.

Change-Id: I2939673a1c4efb1a22e03ffe82121513c071fa4b
CRs-Fixed: 2595331
2020-01-02 08:15:55 -08:00
Srinivas Dasari
c9e048e52f qcacld-3.0: Add NAN vdev_id entry to policy mgr
Firmware sends vdev id allocated for NAN discovery in NAN enable
response. Validate the same and add corresponding entry to
policy manager.

Change-Id: I5e7426c6739620e05480fb90cecdb8ff156fd4cd
CRs-Fixed: 2592021
2020-01-01 20:03:44 -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
4c50119c27 qcacld-3.0: Get the firmware capability NAN_VDEV_SUPPORT
Firmware advertises service capability bit NAN_VDEV_SUPPORT for
separate NAN vdev creation. This capability can be used to create
separate interface for NAN discovery and process corresponding
commands from userspace.

Change-Id: I45573c94ee2d966afc1e207c9eefc146ff43320f
CRs-Fixed: 2592019
2020-01-01 15:42:33 -08:00
bings
00c391fa56 qcacld-3.0: Add g_prefer_5g_scc_to_dbs to give 5g scc higher priority
Add g_prefer_5g_scc_to_dbs to give higher priority for 5g scc than dbs.
It is bitmap per enum policy_mgr_con_mode.
For example in GO+STA(5G) mode, when TPUT is onfigured as wlan system
preference option, If 5G SCC needs higher priority than dbs, set it as
0x8.

This can make GO have higher TPUT given that STA and ref AP mostly have
low speed at this time. This can improve user experience.

Change-Id: Ib8b4bfeef55d97277843df92d3b82aa7f3b9835d
CRs-Fixed: 2587068
2019-12-30 20:47:06 -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
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
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
Liangwei Dong
825d2fc8f3 qcacld-3.0: Acquire sap context before access
Fix potential race condition issue when the sap_context
of adapter is null and it is accessed in work queue -
 __policy_mgr_check_sta_ap_concurrent_ch_intf.
To acquire/release the "sap_context" by get/put API.

Change-Id: I91dacc6d45c377840f7d30f2f9ff902f53ccd8e8
CRs-Fixed: 2592524
2019-12-26 20:42:30 -08:00
sheenam monga
63736f6880 qcacld-3.0: Add ini support to enable/disable ring buffer
Currently, There is no support to disable ring buffer. Each Ring
buffers is using 2MB and overall 10MB is consumed by 5 ring buffers.

Fix is to add ini support to enable/disable ring buffer.
Boolean ini CFG_ENABLE_RING_BUFFER is added. Default value of
gEnableRingBuffer is 1 which indicates that ring buffers are enabled
by default.

CRs-Fixed: 2592476
Change-Id: I30f95668de6df96e5c388e92e202f8c236132dc2
2019-12-26 06:06:53 -08:00
Liangwei Dong
adbb5df9b7 qcacld-3.0: Add g_pcl_band_priority - Set 5G/6G Channel order
g_pcl_band_priority - Set 5G/6G Channel order
This ini is used to set preference between 5G and 6G channels
during population of PCL.
0 - Prefer 5G channels, 5G channels will be placed before
    the 6G channels in PCL.
1 - Prefer 6G channels, 6G channels will be placed before
    the 5G chennels in PCL.

The change will only add 6Ghz channel to PCL for SAP or STA
mode.

Change-Id: I51b3073d6f4fb01af72ccb0a50d10822ac115bca
CRs-Fixed: 2590007
2019-12-24 02:20:34 -08:00
Jianmin Zhu
e75eb51af1 qcacld-3.0: 5G SAP failed to channel switch for sta connecting
When 5G band is disabled by set band,  need SAP switch channel
to 2G. When 5G band is enabled again, need SAP switch back to
original 5G channel. When sta connecting, SAP can't switch
channel.

Merge logic of SAP channel switch for band change and for force
scc with sta, both are implemented in:
policy_mgr_check_concurrent_intf_and_restart_sap now.

After sta associate succeed or fail,
policy_mgr_check_concurrent_intf_and_restart_sap is called again
to check and try SAP CSA for band capability change.

Change-Id: I8574209aac3cabb748a8ec05050244f480e1a0e9
CRs-Fixed: 2589021
2019-12-20 03:51:51 -08:00
Manikandan Mohan
14d2bf80b3 qcacld-3.0: Fix get channel list with existing connections
Reinitialize pcl_weight index in policy_mgr_get_channel_list
for correct connection count.

Change-Id: I96d38f1cb29014517f2c22e360db5d942eb66519
CRs-Fixed: 2589478
2019-12-19 16:54:10 -08:00
Abhinav Kumar
444a5ebc80 qcacld-3.0: Add ini support to skip full scan after bmiss
Currently, after FINAL_BMISS detection, FW does channel map
based partial scan followed by one full scan if no candidate
found in partial scan to ROAM to another available AP without
disconnection. This results in additional delay by HOST in
issuing disconnection after a heartbeat failure.

Add INI support (bmiss_skip_full_scan) to allow FW to decide
whether firmware does channel map based partial scan or partial
scan followed by full scan in case no candidate is found in
partial scan after final BMISS.

Change-Id: I48f9bb43bb7933e9ff173f618586ea5986530dcd
CRs-Fixed: 2578848
2019-12-17 00:12:04 -08:00
Gururaj Pandurangi
1e8f221be0 qcacld-3.0: Change config type of tx_bf_cap to uint
Change max value of tx_bf_cap to 4294967295 from -1
which is misconfigured. 4294967295 corresponds to
0xFFFFFFFF which is max value for 32 bit unsigned
int since this CFG item is getting used as part of
4 byte dot11f HT capability population.

Change-Id: Ifd0fea080dd9eb1f6995af0df20c68e3f73b891a
CRs-Fixed: 2581060
2019-12-16 21:15:23 -08:00
Jingxiang Ge
8fdd274a24 qcacld-3.0: Vdev trans return directly if psoc/driver is in transition
Issue happen when:
thread1:
       rmmod driver, wlan_hdd_pld_remove which will get psoc trans.
       then try to get rntl_lock in hdd_unregister_wext;

thread2:
       trigger iw del interface, cfgops in kernel will get get rtnl_lock,
       in wlan_hdd_del_virtual_intf, vdev trans will be blocked by psoc
       trans in thread1. as thread1 it is also waiting for rtnl_lock, so
       both thread will be stuck.

Fix is:
       In psoc trans, vdev trans and vdev ops is not allowed, which should
       return directly.

Change-Id: I9cbd04bac438bb9483b4e89e73801fe71859e139
CRs-Fixed: 2583675
2019-12-16 14:19:12 -08:00
Pankaj Singh
f84a5dd718 qcacld-3.0: Fix connection latency situation in driver
In 11D scan procedure if WMI_11D_NEW_COUNTRY_EVENTID event is
received, host processes 11d new country code event.
Host driver as a response sends WMI_SCAN_CHAN_LIST_CMDID
new channel list cmd to firmware.

As a result the ongoing scan procedure is aborted by firmware,
and if the scan was a first scan for connection, then it would
lead to connection latency as the supplicant then have to
scan again.

Fix is to check if any scan is in progress, then delay
WMI_SCAN_CHAN_LIST_CMDID channel list command to FW till
the current scan is complete.

Change-Id: I4e747bb747c32430b5d8024823aa0df4928a8c71
CRs-Fixed: 2569741
2019-12-14 04:04:25 -08:00
sheenam monga
451c68c41a qcacld-3.0: Add ini support to configure MGMT retry limit
Currently, default MGMT retry limit is 4 which means 4
transmissions are supported for any management frame.
In noisy environment, Chances to get connection failure
are higher with 4 retransmissions.

Fix is to add INI support mgmt_retry_max to make
CFG_MGMT_RETRY_MAX configurable. Default value for
CFG_MGMT_RETRY_MAX is 15 to reduce the chances of connection
failure in noisy environment.

Change-Id: Id50cb68813fba517a8a1580a3d6662c73b0a381e
CRs-Fixed: 2575385
2019-12-13 11:51:36 +05:30
Srinivas Dasari
4a32ec5220 qcacld-3.0: Allow/Disallow NDP creation in different concurrencies
Currently in case of STA+NDI+NDI concurrency, the below scenario
can occur,
1) If NDI(NDP) + NDI(NDP) exists and sta tries to connect,
   then all NDPs on 1st NDI is tear down.
2) If STA+NDI(NDPs) exist and then another NDI tries to establish
   the NDP, then it is allowed in the current driver.

Fix is to reject the 2nd NDI(NDP) if STA+NDI(NDPs) concurrency
already exist.

Change-Id: Iadf6c9e10b9cdd59ca7beaace578a52b5e5dbb0f
CRs-Fixed: 2568552
2019-12-11 17:44:33 -08:00
Pragaspathi Thilagaraj
5292e0ab83 qcacld-3.0: Handle WMI_ROAM_STATS_EVENTID from firmware
The event WMI_ROAM_STATS_EVENTID is received after
every roam, once the roam synch complete is sent by the host.
This event contains details regarding the roam trigger reason,
values associated with the trigger, roam scan candidate info,
roam status, roam failure reason.

This helps in debugging/understanding the scenario when roam
failure happens.

WMI_ROAM_STATS_EVENTID Format:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
roam_stats_event_fixed_param |-> Contains vdev id and number of
                             |   roams detail.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
roam_trigger data TLV        |-> Has details on the roam trigger
                             |   reason. Number of roam triggers
                             |   TLV detail is present in the
                             |   fixed param. Maximum 5 roam
                             |   per event is supported
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_scan_info TLV       |-> Has details on the roam scan -
                             |   scan type, rssi threshold,
                             |   reason.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_scan_channel_info   |-> Has details on the roam scan
TLV                          |   channels. Number of channels
                             |   per trigger is found on the
                             |   wmi_roam_scan_info TLV.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_ap_info TLV         |-> Has details on Roam candidate
                             |   APs found during scan. Number
                             |   of roam candidate APs per
                             |   trigger is found on the
                             |   on the wmi_roam_scan_info tlv.
                             |   Max 8 candidates are allowed
                             |   per roam scan.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_result TLV          |-> Info on roam success or failure.
                             |   Fail reason, if roaming failed.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_neighbor_report_info|->After roaming, firmware sends
TLV                          |  neighbor/btm report to roamed AP
                             |  to get list of roam candidates.
                             |  This tlv provides info on this.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
wmi_roam_neighbor_channel_info|-> This has the info on the
                              |   channel list received as part
                              |   of BTM/Neighbor report.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Print the info received as part of this event into kmsg.
Featurize all the function defines for this roam logging under
WLAN_FEATURE_ROAM_OFFLOAD flag.

Change-Id: Iddc70b572f2e3dc47f08fd1c3c3597cb44981a17
CRs-Fixed: 2576222
2019-12-11 08:52:14 -08:00
Jia Ding
db2e940123 qcacld-3.0: Initialize IPA metering feature and perf level
In IPA uC ready handler, metering feature and perf level are not
initialized. Therefore properly initialize them after IPA pipes
are connected.

Change-Id: I99621bb2c2831d66e11b0ca903ecb324ef898836
CRs-Fixed: 2582409
2019-12-11 05:01:34 -08:00
gaurank kathpalia
0cecbd4d4e qcacld-3.0: Change the default value of normalize acs ini weight
Change the default value of normalize weight ini to
disable all non-PSC 6ghz channels for the SAP ACS
operation, and give weightage only to the PSC
frequencies.

Change-Id: I4c8f349a396ffe4a2f378a59f5a67036b9d573eb
CRs-Fixed: 2578824
2019-12-09 18:56:58 -08:00
Manikandan Mohan
a8a0a0d00e qcacld-3.0: Decouple NDI policy mgr update from active peer count
In multiple NDP peer case NDP indication might come for these
peers before first NDI confirm is sent for first peer. This
results in not updating policy manager session for NDI and
not creating datapath TX pool. Fix this issue by using one
time init flag for NDI instead of relying on peer count.

Change-Id: I812ff9be46580f3fb2da03ae7e1c1a36d205c38f
CRs-fixed: 2573935
2019-12-09 13:55:55 -08:00
Jianmin Zhu
327317eea2 qcacld-3.0: Allow STA+SAP SCC on LTE-coex channel
If STA is on LTE-coex channel,  start SAP on same band, to force
scc, it need select the LTE-coex channel too, or SAP failed to
start.

CRs-Fixed: 2580240
Change-Id: Ib05524711cb2475c3ca5ec7cf61a2b29c05658b6
2019-12-09 13:55:41 -08:00
Jianmin Zhu
61d502d966 qcacld-3.0: SAP CSA from 5G to 2G for modem N79
For SAP/P2P GO on 5G, when receive cmd to disable 5G band when
modem n79 band used, will move to 2G band via CSA.
1. If no active connection on 2G, select ch by safe list, or
channel 6.
2. If there is STA on 2G, force scc with it.
3. If there is SAP/GO on 2G, force scc with it.
4. Handle one race condition that if candidate is already
selected & FW has gone ahead with roaming or about to go ahead
when set_band comes, it will be complicated for FW to stop the
current roaming. Instead, host will check roam sync to make sure
the new AP is on 2G, or disconnect the AP.
5. If 2 SAP on 5G, move both to 2G and keep scc.

When Set band to enable 5G band again, restored all 5G SAP/Go..

Change-Id: I9b2b1ead3b4502022aeefc08359037457bb051f9
CRs-Fixed: 2580204
2019-12-09 13:54:16 -08:00
Arun Kumar Khandavalli
efe77ff948 qcacld-3.0: Don't use vdev_mlme object in the vdev delete response
As part of the new changes, vdev mlme object will be freed before
the vdev delete response is received from the firmware. Hence do
not use the vdev_mlme object in the vdev delete response handler.

Change-Id: Idec5775f6c7ac767baedd173a7bde0d3a358d0fe
CRs-Fixed: 2563381
2019-12-05 23:53:40 -08:00
Abhishek Singh
fe26a582f9 qcacld-3.0: Handle the error action frames in mgmt tx
For Action frame which are not handled, the resp is sent back to the
source without change, except that MSB of the Category set to 1.
so driver may get action frame with WEP BIT set and category with
MSB set.

Due to the error category, driver is not able to determine if its
a RMF frame and thus doesn't add the MIC header and data length to
the frame.

Now with WEP bit set and MIC header and MIC data length not
added to the frame, the firmware assert due to invalid frame length.

Thus reset the WEP bit in the frames sent by mgmt tx path and add
WEP only if keys are set and frame is RMF. Also ignore MSB to get
the actual action category of the action frame.

Change-Id: I2a2918dbb15979e4184dbf8489e5c3ade15d0e6f
CRs-Fixed: 2580233
2019-12-05 16:39:36 -08:00
Bala Venkatesh
81281077ab qcacld-3.0: Remove the INI force_rsne_override
Currently, RSNE if given from userspace is overrided if the Ini
force_rsne_override is disabled as a security. But there
are sufficient checks already in kernel to validatethe RSNE
given by userspace. Hence this INI is no longer required.

Change-Id: Ifcc9298dcfa035d05e9ee4fb78a4fa2c9f249461
CRs-Fixed: 2573540
2019-12-05 16:38:44 -08:00
Kiran Kumar Lokere
571f0d3e65 qcacld-3.0: Add 80+80 restricted BW support
Add support for restricted 80+80 bandwidth in STA and SAP modes.

Change-Id: Id1a61b853584fa84db3bb8f0f2aaf68eecabeaac
CRs-Fixed: 2570023
2019-12-04 14:40:31 -08:00
Amruta Kulkarni
59f6350e8b qcacld-3.0: Enhance logic for dwell time 2g
With this change,in concurrent mode
(SAP on 5g and peer connected + STA Scan ongoing),
active dwell time 2g is not reset to 0.

Change-Id: I20ace5561137a0dd8def497e3bbbbcbeede80ea5
CRs-Fixed: 2572918
2019-12-04 00:09:47 -08:00
Vevek Venkatesan
959ac03d07 qcacld-3.0: setup IPA sys pipes if wlan_ipa_wdi_init succeeds
At present, IPA sys pipes setup done before wlan_ipa_wdi_init,
so chances for IPA uC is not yet up and running. As wdi init
succeeds only if uC is up and running, setting up IPA sys pipes
after wlan_ipa_wdi_init succeeds.

Change-Id: I7dcae49db0b0a2114908284379096f39e6f16a50
CRs-Fixed: 2573929
2019-12-03 20:56:15 -08:00
Sourav Mohapatra
fab026a99a qcacld-3.0: Send RTT capability for STA mode
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
2019-12-03 13:10:29 -08:00
Jia Ding
8d4db30812 qcacld-3.0: Add dual STA support in WLAN IPA component
Currently dual STA is not supported in WLAN IPA component,
where first STA interface info will be overridden by second
STA including iface_ctx and interface registration to IPA
driver.

When second STA is switched to SAP and a ref-client is
connected to SAP, IPA datapath will be enabled for Wifi
sharing feature. But wlan0 interface is not registered
to IPA driver and this will lead to packet drops for
STA on the RX IPA exception path. IPA driver relies
on information such as vdev_id wlan driver registered
to correctly set skb->cb[0] and wlan driver uses
skb->cb[0] to find the correct vdev to pass packets up
to stack. Since STA interface info is not in IPA,
vdev_id for RX exception packets are thus wrong.

Fix is to store multiple STA interfaces in iface_ctx
and all of them are registered to IPA driver.

Change-Id: I745618c22e24b6c56719f8ae5faf653f55b99bca
CRs-Fixed: 2573567
2019-12-02 02:08:35 -08:00
Srinivas Dasari
b24bdd3f73 qcacld-3.0: Consider NAN enabling also as connection in progress
There is a race condition while handling the below scenario,
1. NAN enable request is received from framework.
2. Policy mgr opportunistic timer expired and set hw mode
   initiated to Single MAC mode in scheduler thread at
   the same time

As the opportunistic timer handler doesn't have any info if
NAN enable initiated in DBS mode, it's configuring the hw
mode to Single Mac Mode just before NAN enable request is sent
to firmware. So the NAN enable request is sent to firmware in
Single Mac Mode which is not allowed by firmware.

NAN enable/disable is also similar to connection in progress
status in case of STA. So provide NAN enable/disable status
through hdd_is_connection_in_progress() to the opportunistic
timer handler. Opportunistic timer handler restarts the timer as
connection(NAN enable/disable) is in progress.

Also set hw_mode_change_in_progress before checking the
connection progress status. This is to avoid a possible race in
the below scenario,
1. NAN-enable sets the state but scheduler thread had read the
   state just before that
2. NAN-enable read the hw_mode_change_in_progress just
   before it gets set by scheduler thread.

Change-Id: I1a184c84520deb3f6ad1ec010a0fdefda96a5364
CRs-Fixed: 2566841
2019-12-01 17:39:45 -08:00
Liangwei Dong
b5e89852ab qcacld-3.0: Fix Memory leak sta_ap_intf_check_work_info
At present policy_mgr_check_concurrent_intf_and_restart_sap
will allocate memory for sta_ap_intf_check_work_info for each
work scheduling of sta_ap_intf_check_work. Potential race condition
would be the pm_ctx->sta_ap_intf_check_work_info is overwritten
in other thread context which is calling same function.
It is not necessary to maintain the memory
sta_ap_intf_check_work_info dynamically since only one work
sta_ap_intf_check_work is expected to run at same time.

Move the sta_ap_intf_check_work_info memory allocation to
psoc open handler and free it when psoc close.

Change-Id: I29b2f2528a6d537cb853968153340a75fd5fe88b
CRs-Fixed: 2571624
2019-11-27 04:16:41 -08:00
Liangwei Dong
d4a91a6f12 qcacld-3.0: Refine wma_get_caps_for_phyidx_hwmode
The current function doesn't handle "hw_mode" parameter.
And if band is specified the function needs to find the
correct "phy cap" in mac_phy_cap list.
The "supported_bands" can be a bit mask of
(WLAN_2G_CAPABILITY | WLAN_5G_CAPABILITY), use "&" to find
the phy cap of requested band.
Remove unused API wma_get_phyid_for_given_band.

Change-Id: I4b120d681b820e2a6e2b82f33d67fbcf6136af09
CRs-Fixed: 2571400
2019-11-26 22:00:17 -08:00
gaurank kathpalia
44f1abad87 qcacld-3.0: Block 3 port concurrency for MCC
Currently the 3 port concurrency combinations
which are not PORed should not be allowed to
connect or beacon as it could lead to functional
issues.

Fix is to bloack the 3 port concurrency which are
not PORed.

Change-Id: I792d0484da96fc0ae994fafa2c6b3ac787016815
CRs-Fixed: 2567322
2019-11-22 08:32:25 -08:00
Abhishek Singh
345be418c9 qcacld-3.0: Replace sme_session_id with vdev_id
Replace sme_session_id with vdev_id in SME and LIM.

Change-Id: I7a4a85c440d8d7d7a2a4163bc71776e288da0222
CRs-Fixed: 2569190
2019-11-22 07:12:45 -08:00
Sourav Mohapatra
60c3b2b014 qcacld-3.0: Add checks to NS and ARP offload requests
Currently the offloading of the NS and ARP to firmware is inefficient;
redundant caching is performed even if offload is not sent. This causes
wastage of resources and increases code complexity.

Introduce checks before caching and offload to ensure that the mentioned
inefficiencies are taken care of.

Change-Id: I6013810e1e08adb15c801f4fc21e1b50371bacda
CRs-Fixed: 2569763
2019-11-22 05:35:35 -08:00