Commit Graph

1134 Commits

Author SHA1 Message Date
Rajeev Kumar
770edce351 qcacld-3.0: Validate vdev before try to get vdev ref
Validate vdev and make sure its not null before try to get vdev ref
during runtime pm suspend/resume path.

Change-Id: Ieb9cb26703727edbc302447453000e1d33717343
CRs-Fixed: 2715161
2020-06-22 15:55:17 -07:00
Manikanta Pubbisetty
4b9a9fa22f qcacld-3.0: move log out of the lock region
Currently, if the time spent in a spin_lock region exceeds
a certain threshold, a system crash will be triggered.

There are chances that a log within a spin_lock region would
result in a crash if the time taken to log the buffer exceeds
the threshold which triggers the crash.

Avoid this by moving the log out of the lock region.

Change-Id: Ic51556723033e9553443250b9cb4cfee2b402309
CRs-Fixed: 2713234
2020-06-18 21:19:14 -07:00
Utkarsh Bhatnagar
d7a34e4ce9 qcacld-3.0: Release lock in error condition
Release lock when psoc_mc_stats is NULL in
ucfg_mc_cp_stats_inc_wake_lock_stats API.

Change-Id: Ibf316d848b2e1d0a4189eb4cebac27922ce30dcd
CRs-Fixed: 2702093
2020-06-18 17:21:49 -07:00
Yeshwanth Sriram Guntuka
0bfa34876f qcacld-3.0: Update mc_bc rx pkt count in peer stats
Update multicast and broadcast rx packet count on
receiving wmi update stats event from firmware by
fetching the peer stats from DP layer.

Change-Id: I0befdbe952aa4e773bbe072affaf698819b3a80f
CRs-Fixed: 2709871
2020-06-17 12:14:44 -07:00
Utkarsh Bhatnagar
2a74a1d231 qcacld-3.0: Add check in policy_mgr_dump_channel_list
Add check in policy_mgr_dump_channel_list to restrict the
pcl_channels array index to NUM_CHANNELS & len while printing
2G/5G and 6G channel list as pcl_channels is initialized
with size of NUM_CHANNELS.

Change-Id: I5ca573d1c12970974cbb09c5d25f816e2d6c1de5
CRs-Fixed: 2706882
2020-06-17 12:14:40 -07:00
Rajeev Kumar
420442623e qcacld-3.0: Get vdev ref properly in pmo enable/disable RTPM offloads
vdev object is used without get ref in runtime pm enable/disable offloads
api, this can lead to vdev use after free issue. Add vdev ref get before
using it and avoid vdev use after free.

Change-Id: I309abdd568c858288150f575899101bda06e57a7
CRs-Fixed: 2710759
2020-06-17 06:15:02 -07:00
hqu
e2e9ea6d37 qcacld-3.0: Add support for 64-clients
Add support for 64-clients.

Change-Id: Ic97ebb83190b5061734832f6dc6dcdb6d0bdac2b
CRs-Fixed: 2625495
2020-06-15 21:52:20 -07:00
Abhishek Ambure
3118d4c038 qcacld-3.0: Add support for ESS RSSI roam trigger reason
In the beacon, ESS report element gives the information of a BSS
that station learns and uses for roaming. Hence enable BIT(16)
ROAM_TRIGGER_REASON_ESS_RSSI of "roam_triggers" INI.

Change-Id: I47f35c3fad640054a54ccb3874475a1c59b51489
CRs-Fixed: 2688522
2020-06-12 23:33:21 -07:00
Srinivas Dasari
662a62841c qcacld-3.0: Don't create wifi-aware0 interface if NAN is not supported
Currently, NAN discovery interface(wifi-aware0) is created if both
host and firmware support NAN separate vdev feature. But NAN
feature capability(gEnableNanSupport) is the master of these
capabilities. Don't create wifi-aware0 if gEnableNanSupport is
disabled.
Also, don't allow NAN iface creation for the kernels less
than 4.14 as NAN interface is allowed by kernel only from 4.14.

Change-Id: Iaf10974c373b2a77d2c24a78540910f78a3dc768
CRs-Fixed: 2706997
2020-06-10 18:13:36 -07:00
Utkarsh Bhatnagar
8dc550caba qcacld-3.0: Change prior conditions required for chainmask
Change the prior conditions required for configuring Rx Chainmask &
Tx Chainmask.
Below conditions should be met for setting chainmask:
1. Antenna sharing should be disabled.
2. If gEnable2x2 is 1 then enableBTChainSeparation must be 1
   else gEnable2x2 should be 0.
3. DBS should be disabled (gDualMacFeatureDisable = 1)
   or HW should be DBS 2x2 capable
4. set TX/RX chainmask 3 in ini (gSetTxChainmask1x1/gSetRxChainmask1x1)
5. HW should support TX/RX chainmask as 3

Change-Id: If83c55af47abb591cdf1b5d2e3981d80bc305bf2
CRs-Fixed: 2705520
2020-06-10 07:25:58 -07:00
Abhishek Ambure
9e3400ac77 qcacld-3.0: Add support to configure max ndi host supports
Introduce INI "ndi_max_support" to configure max number of ndi
interfaces host supports. Host configures max number of ndi
interfaces support in firmware using WMI_INIT_CMD.

Change-Id: I287b9f96b98103e67cf35d0c02488a28af731044
CRs-Fixed: 2701557
2020-06-10 07:25:54 -07:00
Ashish Kumar Dhanotiya
9f588185d9 qcacld-3.0: Add connect id for the connection manager
Add connect id in the policy manager for the newly designed
connection manager infrastructure.

Change-Id: Ib7bd08e5326ead04da88175636777bf5dd4e255b
CRs-FIxed: 2705700
2020-06-09 14:30:38 -07:00
Abhishek Ambure
a6afc073d0 qcacld-3.0: Add ini support to configure max ndp sessions in fw
Introduce INI "ndp_max_sessions" to configure max number of ndp
sessions host supports. Firmware advertises max number of ndp
sessions supported in wmi_service_ready_ext2 event. If the firmware
advertises non-zero value of max ndp sessions then host configures
max ndp sessions support in firmware using WMI_INIT_CMD.

Host uses a minimum of "ndp_max_sessions" value and firmware
advertised max ndp session value to configure max number of ndp
sessions in firmware.

Change-Id: I613815f384f9b0a61711324c85ecfa095d133360
CRs-Fixed: 2673120
2020-06-08 16:00:50 -07:00
Bapiraju Alla
cd65464616 qcacld-3.0: Add validation for wmi handle
Validate wmi handle obtained in tgt_fwol_pdev_param_send

Change-Id: I99edbdf5be4c17af7fb31b7cbdaf418e5a1150af
CRs-Fixed: 2699765
2020-06-07 17:42:25 -07:00
Lincoln Tran
e4f18a9065 qcacld-3.0: Add logic to handle country code change
Update the HDD callback to check for phymode change or
channel change when country code updates and stop/restart
the adapter accordingly. Include cases for STA mode,
SAP mode, P2P-CLI mode, and P2P-GO mode.

Add conditional compilation flag for MCC specific API in
qcacmn.

Change-Id: I88edb401146e3cef48d757393f89fa48cb6ac895
CRs-fixed: 2658294
2020-06-07 12:29:02 -07:00
hqu
d494c3b85a qcacld-3.0: Change default value for ini np_chan_weight
When config chanlist with DFS channel only, SAP can't be started
due to all DFS channel are all excluded and can't find available
channel in current chanlist. Issue is introduced by
'Change-Id: I53a22a0059d56aa8fca66215fed1ed0588db7db5'.

Fix is to set default ini np_chan_weight value to 1, then DFS channel
will be most likely put at last in available chanlist and DFS channel
will be the last choice when no other normal channel can be used.
If config chanlist with DFS channels only, SAP still can be started
on DFS channel successfully.

Change-Id: I04f70068069ff5c4f68b7d7fa56a2ede40035c6e
CRs-Fixed: 2694415
2020-06-07 08:07:40 -07:00
Dundi Raviteja
9fca084961 qcacld-3.0: Add tgt layer for packet capture mode
Add tgt layer for packet capture mode.

Change-Id: I8e69701c69d6ec1989e36cb09826c1c0bf3f51e7
CRs-Fixed: 2674337
2020-06-02 13:32:50 -07:00
Paul Zhang
7a7fdbb23e qcacld-3.0: enable gSapGetPeerInfo by default
hdd_get_connected_station_info ignores some peer txrx
statistics if gSapGetPeerInfo is not set.

Change-Id: I02e607c081a932601c9c84998f5e9ede3563110e
CRs-Fixed: 2691717
2020-06-02 08:37:36 -07:00
Lincoln Tran
aa5716f95f qcacld-3.0: Update nan_discovery_flush_callback
Update return type of nan_discovery_flush_callback to return
QDF_STATUS to match scheduler_msg_process_fn_t.

Change-Id: I3a2c32beaff471ed3a2e8e3956292257e074cd50
CRs-fixed: 2698305
2020-06-01 23:13:23 -07:00
Jingxiang Ge
cc6e046103 qcacld-3.0: checking fw down when handle runtime suspend failure
In pmo_core_psoc_bus_runtime_suspend, when handing pm suspend fail,
Don't call qdf_bug if fw is already down.

Change-Id: I4be872a27bbc100e85432e42a33ac329fad1dd24
CRs-Fixed: 2694416
2020-06-01 03:01:49 -07:00
Abhishek Ambure
94d53d68a7 qcacld-3.0: Add ini support to send oce subnet id scoring
Introduce an INI "oce_subnet_id_weightage" to indicate firmware
about oce subnet id weightage so that firmware can use subnet id
weightage to calculate candidate AP's score.

Change-Id: Iaf3be1947f8966a2e2c34162d251a31950058231
CRs-Fixed: 2674596
2020-06-01 01:37:25 -07:00
Lincoln Tran
96e8d8ddf1 qcacld-3.0: Update target_if_nan_event_flush_cb
Update return type of target_if_nan_event_flush_cb to return
QDF_STATUS to match scheduler_msg_process_fn_t.

Change-Id: I2f0380edeb21a1c6016358725abab39fdc741466
CRs-fixed: 2698302
2020-05-29 17:18:52 -07:00
Jia Ding
51a9fa1c4a qcacld-3.0: Properly set WLAN_IPA_MAX_STA_COUNT
Set WLAN_IPA_MAX_STA_COUNT to WLAN_MAX_CLIENTS_ALLOWED
if WLAN_MAX_CLIENTS_ALLOWED is defined.

Change-Id: Ic7b3706897cec8ee149bab12cd91c94ae04f75ef
CRs-Fixed: 2658585
2020-05-29 03:13:43 -07:00
Utkarsh Bhatnagar
0a61d6462b qcacld-3.0: Implemented Chainmask NL command
Implemented driver interface for NL command for setting
and getting TX and RX chains. The chains can be set to
either chain 0(1) or chain 1(2) or both(3). This is only valid if
antenna mode is set to 2X2.

Below command can be used to set the chainmask:
iw phy <phyname> set antenna <bitmap> | all | <tx bitmap> <rx bitmap>
Example:
iw phy0 set antenna 1   -- to set both Tx and Rx chain 0.
iw phy0 set antenna all -- to set all/both chains for rx/tx
iw phy0 set antenna 1 2 -- to set chain 0 for tx and chain 1 for rx

Below command can be used to get the chainmask after set:
iw phy <phyname> info

check for "Configured Antennas: TX 0x1 RX 0x1"

Below conditions should be met for setting chainmask:
1. Antenna sharing should be disabled.
2. gEnable2x2 in ini file should be 0
3. enableBTChainSeparation in ini file should be 1
4. DBS should be disabled (gDualMacFeatureDisable = 1)
   or HW should be DBS 2x2 capable
5. set TX/RX chainmask 3 in ini (gSetTxChainmask1x1/gSetRxChainmask1x1)
6. HW should support TX/RX chainmask as 3

Change-Id: I04f6667398eac405a6be61bc039e048090578abf
CRs-Fixed: 2693370
2020-05-28 17:28:40 -07:00
gaurank kathpalia
9064ce5cb3 qcacld-3.0: Enable band preference for 6ghz
Enable band preference for 6ghz and give default
max weightage to 6ghz to push it for STA operation.

Change-Id: I2fb1d68bb0d8535b4e9813fdd1551723a1fe4f56
CRs-Fixed: 2688585
2020-05-27 02:15:04 -07:00
Alan Chen
9e714990e7 qcacld-3.0: Rename gAdvancedPowerSaveMode to gOptimizedPowerManagement
Rename gAdvancedPowerSaveMode to gOptimizedPowerManagement.

Change-Id: Ie6260a030ab94c27c993987168d70b768184a91f
CRs-Fixed: 2693883
2020-05-23 21:09:18 -07:00
Bapiraju Alla
920ca1e805 qcacld-3.0: Remove unused wowlan INIs
Remove wowlan_deauth_enable and wowlan_disassoc_enable INI params as
these are unused

Change-Id: I90d10995365771359f1bcd029b9193437ad67a18
CRs-Fixed: 2678156
2020-05-22 04:36:31 -07:00
Srinivas Dasari
9484e68614 qcacld-3.0: Don't limit the max NDPs with a peer in host
Currently, host allows maximum MAX_NDP_INSTANCES_PER_PEER(2) NDPs
per peer. Framework may need more NDPs with the same peer when
multiple NDP applications are running. Firmware shall allow/reject
an NDP based on the max number of NDP connections allowed per peer.
It's platform specific and firmware shall take care of it.
Remove the check in host which limits this.

Change-Id: Ic43f6e2588a8ed8ffd7c8bb87d9b5656352e5cf7
CRs-Fixed: 2684987
2020-05-21 14:13:36 -07:00
Utkarsh Bhatnagar
17b2fc57d7 qcacld-3.0: Remove unused CFG CFG_RMC_ACTION_PERIOD_FREQUENCY
RMC is IBSS specific and CFG_RMC_ACTION_PERIOD_FREQUENCY is not used
now so remove the same

Change-Id: Icafff4bd7eb508d92c383861300146e3a0f2def7
CRs-Fixed: 2689882
2020-05-19 14:47:05 -07:00
Srikanth Marepalli
ec2675cd04 qcacld-3.0: Add support for WPA3 SuiteB roaming
This commit enables support for SuiteB roaming for SHA384.
Based on the WPA3 SuiteB roam service capability advertisement
received from Firmware, we enable the support in Host.

Change-Id: Iab4e6bfc9c8ba7d604c2720c8cb848fce40dd6b4
CRs-Fixed: 2685975
2020-05-19 08:40:58 -07:00
gaurank kathpalia
7ff0f92346 qcacld-3.0: Remove IBSS related INI and CFG
Remove IBSS related INI and CFG.

Change-Id: Iedebb858448d900bf4909fe5cafc2092baa60285
CRs-Fixed: 2687119
2020-05-19 07:22:08 -07:00
Srinivas Dasari
4670f330c1 qcacld-3.0: Replace WLAN_FEATURE_NAN_DATAPATH with WLAN_FEATURE_NAN
WLAN_FEATURE_NAN_DATAPATH is deprecated and the define is also
removed. But there is still some code(NDP wakelock event
configuration) which is guarded in this flag and it never gets
compiled. So replace WLAN_FEATURE_NAN_DATAPATH with overall
NAN feature define WLAN_FEATURE_NAN and move it to a separate
API.
Also, enhance log to print the complete 16-byte bitmap in hex
format.

Change-Id: I1ad51efc2b6a088022601686744802995fb7b4b7
CRs-Fixed: 2679286
2020-05-15 21:45:29 -07:00
gaurank kathpalia
322d8eb806 qcacld-3.0: Cleanup IBSS code from LIM
Cleanup IBSS related code from LIM.

Change-Id: Idebb0f55aa27751f1fdd7b4c1fb8124ae29eb382
CRs-Fixed: 2687017
2020-05-15 18:47:18 -07:00
gaurank kathpalia
86a93dbbde qcacld-3.0: Remove IBSS specific code from WMA
Remove IBSS specific code from WMA.

Change-Id: Iacdace8435fd8e6c167df24167db23a14efe4f15
CRs-Fixed: 2687016
2020-05-15 16:38:05 -07:00
Abhishek Singh
2281c2d6bb qcacld-3.0: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfiles from
wlan_objmgr_psoc_obj.h

Change-Id: I5f6120a97be3ae6835023ceaef455088820809de
CRs-Fixed: 2657771
2020-05-15 10:41:20 -07:00
Abhinav Kumar
e3e903bf37 qcacld-3.0: Introduce new INI to enable/disable FT-IM
With specific AP(s), FW needs to perform FT initial mobility
association instead of FT roaming for deauth roam trigger.

This ini is used to configure "FT roaming for deauth roam trigger"
behavior from the HOST.

Change-Id: Id754a21f7ac2c330019055646f79c79db3e0c52c
CRs-Fixed: 2665882
2020-05-15 06:56:02 -07:00
Nirav Shah
5537b67b89 qcacld-3.0: Update rx ldpc capability based on ini configuration
Update rx ldpc capability based on ini
configuration(gEnableRXLDPC).

Change-Id: Ic160850f4fbba19a8faebc7f0c0545f21834de93
CRs-Fixed: 2677946
2020-05-13 21:07:14 -07:00
Utkarsh Bhatnagar
f3e4542667 qcacld-3.0: Removed IBSS from wlan_policy_mgr
Removed IBSS feature from wlan policy Manager

Change-Id: If31514e8b67042a798419e29ddda0538e2ebb265
CRs-Fixed: 2681063
2020-05-13 19:17:36 -07:00
Srinivas Dasari
f2f38a5e89 qcacld-3.0: Add a log to print nan separate vdev capa of host and fw
Currently, there is no log to identify whether the firmware doesn't
support NAN separate vdev or it's disabled through the ini param
nan_separate_iface_support. Add a log to print the firmware
and host capabilities when either of these is not supported.

Change-Id: I76ad6e192b7b7fc07c106f652df947767f7b4578
CRs-Fixed: 2684544
2020-05-13 08:37:28 -07:00
Ashish Kumar Dhanotiya
d064902a66 qcacld-3.0: Update disconnect rssi on every disconnect rssi event
Currently there is a check to validate if the station is in
associated state or not in the hdd lost link cp stats info cb,

There is a race condition where if the disconnection happens
from ap in that case the callback gets invoked before the
connection state in the station context gets updated and thus
the rssi on disconnect is not updated.

To address above issue remove the check to validate the station
state and update the rssi on disconnect irrespective of the
state of the connection.

Change-Id: I9cc6a08cdf0a1081adfde7a9423a665bc977cffc
CRs-Fixed: 2678667
2020-05-12 15:36:00 -07:00
Srinivas Dasari
632c058365 qcacld-3.0: Send NDI del rsp in NAN_DATA_DISCONNECTED_STATE state
NDI delete response is sent to userspace only when NDI is in
NAN_DATA_NDI_DELETING_STATE state. But NDI could be in
NAN_DATA_DISCONNECTED_STATE state if cleanup happens through
NDP_END_ALL path. Driver doesn't send response to userspace in
this case.
Send the response to userspace in NAN_DATA_DISCONNECTED_STATE also
as the application might be waiting for NDI delete status.
Also, use set/get APIs and avoid accessing NDI state directly.

Change-Id: I81a6b19a77144c76dde145f126c45b2ca67ff093
CRs-Fixed: 2679581
2020-05-09 00:56:50 -07:00
Lincoln Tran
9faaae1bb7 qcacld-3.0: Cleanup instances of CFG_COUNTRY_CODE
Remove instances of CFG_COUNTRY_CODE and country_code from
wlan_mlme_reg struct.
Remove redundant country code APIs.

This change is needed because the country code is no longer
stored in CFG file, and subsequently, there is no need for
CFG_COUNTRY_CODE.

Change-Id: Ia4b3b40d0dccfde696352967f2902dfba344a445
CRs-Fixed: 2634079
2020-05-08 18:50:54 -07:00
Ananya Gupta
6dff8e348e qcacld-3.0: Cancel reap timer during driver unload
In case of driver unload, there can be a race condition
since the timer for processing monitor status ring can run
in parallel to the unload time wow ack response handler,
which is also flushing all the monitor status ring entries.
To avoid this race condition, stop the monitor reap timer
as a part of target suspend, and process all the outstanding
entries in the monitor status ring.
This will make sure that the monitor status ring is
processed from only one context at any given time.

Change-Id: Iaff01b2d61ba53eb7ab442b2c1886ba8076a4a8b
CRs-Fixed: 2678973
2020-05-08 14:25:31 -07:00
Jianmin Zhu
25800f4de6 qcacld-3.0: Tx dropped for osif_vdev_sync_op_start failed
osif_psoc_sync_trans_start_wait is wrongly used in
Idceff767d62c1e81046a696cb58f70a897cbd074, which will block any
vdev operation which results in tethering failure and Tx packets
also won't be transmitted whenever ipa event is processed as
we have vdev check in hard transmit too.
Fix:
Don't call osif_psoc_sync_trans_start_wait when handle IPA
event, just check recoverying state.

Change-Id: Ibb5d94e0e22413fdd9dad294fc8da58eba8a700b
CRs-Fixed: 2680423
2020-05-07 13:03:39 -07:00
gaurank kathpalia
e423549d8e qcacld-3.0: Add support for DFS channel weightage in ACS
Add support to provide the channel weightage of
DFS channels so that the weight can be configured
and the user can control whether they are allowed
to be selected for the SAP.

Change-Id: I53a22a0059d56aa8fca66215fed1ed0588db7db5
CRs-Fixed: 2676919
2020-05-07 11:24:02 -07:00
Vulupala Shashank Reddy
d965a28c1c qcacld-3.0: Update OFDM and CCK flags for packet capture mode
Add support to update OFDM and CCK flags for packet capture
mode.

Change-Id: I1acb6b512360b6236a119070aba97409e316646c
CRs-Fixed: 2676302
2020-05-06 01:26:29 -07:00
Alan Chen
06551ba572 qcacld-3.0: Rename gEnablePowerSaveOffload to gAdvancedPowerSaveMode
gEnablePowerSaveOffload is confusing, so change it to
gAdvancedPowerSaveMode.

Value 0: Disable advanced power save
Value 1: Enable advanced power save

Change-Id: Ib5593ef31eedacdc232ffbad183974e2cd847e83
CRs-Fixed: 2676664
2020-05-04 23:12:06 -07:00
Wu Gao
7d07763083 qcacld-3.0: Remove CFG_CFR_ALL
Remove CFG_CFR_ALL from CFG_ALL and avoid duplicate definition, since
WIN needs it and add it to CFG_CONVERGED_ALL by another change.

Change-Id: I4fe82573d069a06bf130937a3e38d045bb80c695
CRs-Fixed: 2673162
2020-05-03 18:18:42 -07:00
Bapiraju Alla
954de3b680 qcacld-3.0: Check for fw down during runtime suspend
Currently there is no check for fw down during runtime suspend. This is
causing issue when host has already received fw down event due to
injected fw crash.

To avoid this, add check for fw down during runtime suspend.

Change-Id: Ic518f7fc95fa3ff9f9a3bd8973e9e37e9ebcf52f
CRs-Fixed: 2676841
2020-05-01 21:51:02 -07:00
Utkarsh Bhatnagar
316ca349b3 qcacld-3.0: Added logs in policy_mgr_is_concurrency_allowed
Increased logging in policy_mgr_is_concurrency_allowed
by adding debug logs in policy_mgr_allow_multiple_sta_connections
and policy_mgr_is_6g_channel_allowed.

Change-Id: Ic285566209b4d63df579913e7390c48891a04855
CRs-Fixed: 2674968
2020-04-30 07:53:33 -07:00